Skip to content

Commit a561755

Browse files
nodejs-github-botRafaelGSS
authored andcommitted
deps: update amaro to 0.5.0
PR-URL: #57687Fixes: #56830 Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
1 parent 98df744 commit a561755

6 files changed

Lines changed: 35 additions & 14 deletions

File tree

‎deps/amaro/README.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ console.log(code); // "const foo = 'bar';"
2929

3030
It is possible to use Amaro as an external loader to execute TypeScript files.
3131
This allows the installed Amaro to override the Amaro version used by Node.js.
32+
In order to use Amaro as an external loader, type stripping needs to be enabled.
3233

3334
```bash
3435
node --experimental-strip-types --import="amaro/register" script.ts
@@ -51,7 +52,7 @@ node --experimental-transform-types --import="amaro/transform" script.ts
5152
5253
### TypeScript Version
5354

54-
The supported TypeScript version is 5.5.4, except the stage 3 decorator proposal.
55+
The supported TypeScript version is 5.8.
5556

5657
## License (MIT)
5758

‎deps/amaro/dist/errors.js‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,19 @@ export function isSwcError(error) {
33
returnerror.code!==void0;
44
}
55
exportfunctionwrapAndReThrowSwcError(error){
6+
consterrorHints=`${error.filename}:${error.startLine}${error.snippet}`;
67
switch(error.code){
78
case"UnsupportedSyntax": {
89
constunsupportedSyntaxError=newError(error.message);
910
unsupportedSyntaxError.name="UnsupportedSyntaxError";
11+
unsupportedSyntaxError.stack=`${errorHints}${unsupportedSyntaxError.stack}`;
1012
throwunsupportedSyntaxError;
1113
}
12-
case"InvalidSyntax":
13-
thrownewSyntaxError(error.message);
14+
case"InvalidSyntax": {
15+
constsyntaxError=newSyntaxError(error.message);
16+
syntaxError.stack=`${errorHints}${syntaxError.stack}`;
17+
throwsyntaxError;
18+
}
1419
default:
1520
thrownewError(error.message);
1621
}

‎deps/amaro/dist/index.js‎

Lines changed: 21 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎deps/amaro/dist/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"강동윤 <kdy1997.dev@gmail.com>"
55
],
66
"description": "wasm module for swc",
7-
"version": "1.11.5",
7+
"version": "1.11.12",
88
"license": "Apache-2.0",
99
"repository": {
1010
"type": "git",

‎deps/amaro/package.json‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "amaro",
3-
"version": "0.4.1",
3+
"version": "0.5.0",
44
"description": "Node.js TypeScript wrapper",
55
"license": "MIT",
66
"type": "commonjs",
@@ -24,8 +24,8 @@
2424
"build": "node esbuild.config.mjs",
2525
"build:wasm": "node tools/build-wasm.js",
2626
"typecheck": "tsc --noEmit",
27-
"test": "node --test --experimental-test-snapshots \"**/*.test.js\"",
28-
"test:regenerate": "node --test --experimental-test-snapshots --test-update-snapshots \"**/*.test.js\""
27+
"test": "node --test \"**/*.test.js\"",
28+
"test:regenerate": "node --test --test-update-snapshots \"**/*.test.js\""
2929
},
3030
"devDependencies": {
3131
"@biomejs/biome": "1.8.3",

‎src/amaro_version.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
// Refer to tools/dep_updaters/update-amaro.sh
33
#ifndefSRC_AMARO_VERSION_H_
44
#defineSRC_AMARO_VERSION_H_
5-
#defineAMARO_VERSION "0.4.1"
5+
#defineAMARO_VERSION "0.5.0"
66
#endif// SRC_AMARO_VERSION_H_

0 commit comments

Comments
 (0)