Previously, jsweet would create temporary directories named ".jsweet" in
the current working directory. These directories would not be cleaned up
after use.
Add a "configured directory" abstraction layer, which controls both
user-provided and default-temporary directories, making sure the
directories and its contents are deleted as soon as they're no longer
needed, or at least upon VM shutdown.
Previously, testing would fail if not run from within the "transpiler"
directory, e.g., when running tests from a parent POM.
Moreover, there was a hardcoded path to src/test/resources/j4ts.js,
which was controlled by the "useJavaRuntime" flag.
Check if we run from the parent POM and adjust paths accordingly.
Change TMPOUT_DIR from String to File. Fix the "useJavaRuntime" flag to
actually specify the path to the j4ts.js file (or null to disable).
The parser is currently generated only when a certain build profile is
enabled.
This is hard to figure out, and building time is negligible.
Enable building the parser by default (enable the profile by default).
Should building fail on CI, then the build.xml script should be fixed
instead.
Typescript would complain about certain errors in the generated file. In
some newer versions of TypeScript, an assert that is always true would
not be permitted.
We currently have two such asserts in our tests, which prevents us from
upgrading the TypeScript version.
Add support for a Java @TsNoCheck annotation, which controls the
inclusion of the corresponding TypeScript comment. While there is no
mandatory package for the annotation, add it to jsweet.lang in core-lib.
Fix tests to use the new annotation.
In some environments, "node" may not be on the PATH.
Add another path that is commonly supported, /opt/local/bin.
Note that we cannot add /opt/homebrew/bin since there's a dependency
that would need changing as well (typescript.java).
For the time being, it is encouraged to add a symbolic link from
/opt/homebrew/bin/node to /opt/local/bin/node (and npm) if that's
necessary.
Some tests try to spawn a new Java process for the
JSweetCommandLineLauncher.
These tests fail with new Java versions >= 16.
Specify --add-opens=jdk.compiler/... statements to allow our code to
access the Java Compiler packages under com.sun.tools.javac...
Tests would fail because "angular.ts" and "jQuery.ts" would already be
included with a differenent case.
Rename Angular to AngularCandy, JQuery to JQueryCandy, which is also in
line with "BackboneCandy".
When an overloaded constructor calls another one using "this(...)", the `printInlinedMethod()` function is called
recursively, which initializes the object fields. In this scenario, we cannot re-initialized those fields after that call,
since we will lose any changes due to constructor parameters passed to `this(...)`.
The fix is completely localized and simple, relying on the existing boolean `skipFirst` variable already set for
the reentrant scenario.