Releases: TiLied/CSharpToJavaScript
0.1.0
BREAKING CHANGE
The library now has a single entry point, consumes a string and outputs a string. Refer to the README.
- CSTOJS now static.
- Added static method Translate.
- Deleted all GenerateOne* methods.
- Added "TranslateFile" option
-
- Transferred "DisableConsoleColors" and "DisableConsoleOutput" to a Log.
-
- Log now public.
- Updated generated csharp.
- Updated logging colors.
Full Changelog: 0.0.10...0.1.0
0.0.10
- dotnet 10
- Clamping large numbers and printing a warning.
- Added workaround for "string.Empty"
- c# object -> js Object
- Added very specific workaround for "Method(new())"
- Added many missing assignments.
- Added "Debug.Assert" to log error.
- Added ecma boolean, function, symbol.
- c# TrimEnd -> js trimEnd
-
- c# TrimStart -> js trimStart
-
- c# ToUpper-> js toUpperCase
-
- c# ToLower-> js toLowerCase
- Added support for top-level statements.
- Added ecma String and updated other.
- More debug logs.
- Added Array.
-
- More pragma ignore.
- Added TypedArray.
- Further improvement to the debug output.
- Added ArrayBuffer, Atomics, DataView, JSON, Map, Set, SharedArrayBuff…
-
- …er, WeakMap, WeakSet.
- Added the rest of ecma objects.
- Added an indexer to an ObjectPrototype.
-
- For emulation "Bracket notation" in js.
- Print an error to the console if there is a compilation error.
- Always run the stopwatch.
- Display certain debug output only with Debug build.
- Changed "CustomCSNamesToJS" to Dictionary.
- Methods now include "options" parameter.
- Renamed "OutPutPath" to "OutputPath".
-
- Added option "OutputFileName".
- Support for a local function.
-
- More debug info with "ErrorLine".
- Fixed default values for properties.
- Fixed "CA1859: Use concrete types when possible for improved performa…
-
- …nce" with Logging.
-
- Added the rest of overrides.
- A few fixes with methods.
- Fixed many warnings.
- Explicitly call "VisitBinaryExpression".
- Fixed a crash where "foregroundcolor" is not supported.
- Changed a little debug output to the file.
- Updated generated documentation.
- Updated generated csharp.
Full Changelog: 0.0.09...0.0.10
0.0.09
For major changelog, see 0.0.08 release
Full Changelog: 0.0.08...0.0.09
0.0.08
Highlight:
Method "GenerateOneContinuously" continuously watching for file modifications:

Options used: UseStrictEquality, KeepBraceOnTheSameLine, NormalizeWhitespace
Rest of changes:
- NullableType is ignored for properties.
-
- Added a console warning if the object initializer is used.
-
- Better output c# lines into js when debug is enabled.
-
- Clean up.
- Added support for property default values.
-
- Updated Microsoft.CodeAnalysis.CSharp to 4.10.0.
- Fixed static properties.
-
- Ignore ArrayType in parameters.
-
- Small changes to code.
- Added missing arithmetic expressions and tokens.
- Added method "GenerateOneContinuously":
generating continuously by watching the cs file. -
- Added option " UseStrictEquality":
replace '==' with '===' default false.
- Added option " UseStrictEquality":
-
- Initial support dictionary to map.
-
- Small changes, bug fixes.
- Small changes, mostly renames.
- Update License.
- Added BigInt.
- Added Error objects.
- Uncomment some piece of code in GlobalObject.
- Added missing GM api alongside documentation.
- Added EnumValue attribute.
- Updated nuget "Microsoft.CodeAnalysis.CSharp" to 4.12.0
- Removed mostly whitespaces when used with "KeepBraceOnTheSameLine".
Still, I recommend using "KeepBraceOnTheSameLine" with the "NormalizeWhitespace" option. -
- Fixed bug where file generates simultaneously.
- Added ValueAttribute and EnumValueAttribute.
- Separate "csharp api to js", needed for GenDocsLib.
-
- Added support for strict inequality.
- Updated comment with strict inequality.
- Added log when using GenerateOneContinuously.
- Updated generated docs.
- Corrected namespace.
- Renamed option AddSBInFront to AddSBAtTheTop.
-
- Renamed option AddSBInEnd to AddSBAtTheBottom.
- Updated generated docs.
See GenDocsLib. - Updated generated c#.
See GenCSharpLib. - Updated generated c#.
- Moved checking attributes to a separate method.
- Added expressions.
Full Changelog: 0.0.07...0.0.08
0.0.07
- Better output to the console.
- Better formatting for logging.
- Back to trace.
-
- Ignore readonly/required keywords.
- C# enums -> JS const objects.
-
- Added modulus/percent token.
-
- C# .? -> JS .?
-
- C# ?? -> JS ??
-
- Lambda "()=>..." in arguments.
-
- Variable declaration with comma.
-
- C# Console.Write -> JS console.log
-
- C# List.FindLast -> JS Array.findLast
-
- C# string.Length -> JS string.length
-
- C# Math.Sqrt -> JS Math.sqrt
- Added option "KeepBraceOnTheSameLine" default false.
-
- Added option "NormalizeWhitespace" default false.
- "NormalizeWhitespace" applies before "KeepBraceOnTheSameLine".
-
- Updated "Microsoft.CodeAnalysis.CSharp" to 4.9.2.
-
- c# bitwise and shift operators -> js bitwise and shift operators.
-
- c# try-catch-finally -> js try-catch-finally.
-
- c# do...while -> js do...while.
-
- Updated generated xml docs.
-
- Updated generated c#.
- Updated generated xml docs with a fixed bug.
- Added ValueAttribute.
-
- Updated generated c# with ValueAttribute.
- Updated generated c# with missing data.
-
- Added static to fields.
- Fixed Paranthesis.
-
- Added Array conversion (new Type[]->new Array()).
-
- Fixed some formating.
-
- Small change to "this.".
- Added numeric length support for array.
- Ignore partial keyword for classes.
-
- Small clean up.
- Updated generated xml docs.
-
- Updated generated csharp.
- Ignore attributes while generating js.
-
- ValueAttribute is now public.
Full Changelog: 0.0.06...0.0.07
0.0.06
- Added "LessThanEqualsToken".
-
- Small changes to comments/code.
- Added Number object.
-
- Further improvement to this.
-
- Small clean-up.
- .Net 8
-
- Updated generated csharp code(Many missing webapi from w3c).
-
- Added method "GenerateOne" returns list of StringBuilders.
-
- Added method "GenerateOneFromStringAsync" writes a file, return empty Task.
-
- Added "System.Console" and "CSharpToJavaScript" references as default.
-
- c# const -> js const.
-
- c# static constructor -> js static constructor.
-
- private js fields for c# auto-implemented properties.
-
- c# static -> js static
-
- Better "this.".
-
- Small changes and fixes.
- Small changes to static and "this".
- Updated Microsoft.CodeAnalysis.CSharp to 4.8.0
-
- Updated generated csharp and xml docs.
- Added "Properties of the Global Object" into "GlobalThis".
Full Changelog: 0.0.05...0.0.06
0.0.05
!Breaking Change!
This update is mostly for CLI, Blazor WebAssembly and Extensions.
- Changed "GenerateOneFromStringAsync" to "GenerateOneFromString".
- Deleted creation of debug.txt when Debug is enabled. Console output is enough.
- Added default references to the compilation.
- Added option "DisableConsoleOutput".
- Added detection for get only, auto implemented properties.
- Improved formatting and detection of the auto implemented properties.
- Small fixes.
Full Changelog: 0.0.04...0.0.05
0.0.04
!Breaking Change!
This update is mostly for CLI and Blazor WebAssembly.
- Deleted method "GenerateManyAsync". Use "GenerateOneAsync" method, that accept folder path now.
- Changed default to "filename" in "GenerateOneAsync". Now default is the name of input cs file with ".js".
- Added option to disable console colors.
- Added method "GenerateOneFromString", that accept a cs string and not a path to file. Returns StringBuilder.
- Fixed a bug where lib crashes without error when passing a file outside a solution.
- Small fixes.
Full Changelog: 0.0.03...0.0.04
0.0.03
!Breaking changes!
- Passing assembly as an argument, no longer required!
- Renamed "GenerateAsync" to "GenerateOneAsync".
- Deleted option "OutPutFileName", now you need to pass as an argument in "GenerateOneAsync", default is still the same: "main.js".
- Added "GenerateManyAsync".
- Added few expressions.
- Further improvement to "this".
- Colorful output to console.
- Added static keyword for methods and properties.
- Other improvements.
- Fixed bugs.
- Microsoft.CodeAnalysis.CSharp updated.
- Updated generated csharp.
- Updated xml docs.
Full Changelog: 0.0.02...0.0.03
0.0.02
Breaking changes!
"GlobalThis" now in "GlobalObject".
Renamed method from "Generate2Async" to "GenerateAsync".
- Updated generated csharp and xml documents.
- Added more comments to code,
- Initial support for built-it types/generics.
- Many missing tokens.
- Support for
whileloop. foreachtofor..of.$"{test}"to`${test}`.- Bug fixes.
Full Changelog: 0.0.01...0.0.02