You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SWC since version 1.8.0 (2024-11-04) supports ES2023 and ES2024
Once using ts-node with swc having a target equals to ES2023 or ES2024 the application should execute correctly
Actual Behavior
The application fails with error:
return bindings.transformSync(isModule ? JSON.stringify(src) : src, isModule, toBuffer(newOptions));
^
Error: x jsc.target should be es5 or upper to use getter / setter
Steps to reproduce the problem
In a project using ts-node with swc set the target to ES2023 or ES2024 and it will fail. Once you set the target as ES2022 the project work as expected.
Minimal reproduction
Same as above
Specifications
ts-node version: 10.9.2
node version: 22.15.0
TypeScript version: 5.8.3
tsconfig.json, if you're using one:
{}
package.json:
{}
Operating system and version:
If Windows, are you using WSL or WSL2?:
The text was updated successfully, but these errors were encountered:
@cspotcode I've opened a PR resolving this issue, but I would also like to propose that instead of automatically downgrading the target to ES3 in this line we should raise an exception letting the user know that the specified target is not currently supported.
Search Terms
Expected Behavior
ts-node
withswc
having a target equals to ES2023 or ES2024 the application should execute correctlyActual Behavior
Steps to reproduce the problem
In a project using
ts-node
withswc
set the target to ES2023 or ES2024 and it will fail. Once you set the target as ES2022 the project work as expected.Minimal reproduction
Same as above
Specifications
The text was updated successfully, but these errors were encountered: