deps: update amaro to 0.5.1 · nodejs/node@81a10a6 · GitHub
Skip to content

Commit 81a10a6

Browse files
marco-ippolitoRafaelGSS
authored andcommitted
deps: update amaro to 0.5.1
PR-URL: #57704 Backport-PR-URL: #57298 Reviewed-By: Jacob Smith <jacob@frende.me> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> PR-URL: #56350 Fixes: nodejs/typescript#17
1 parent 25f8682 commit 81a10a6

9 files changed

Lines changed: 20 additions & 17 deletions

File tree

deps/amaro/dist/errors.js

Lines changed: 3 additions & 1 deletion

deps/amaro/dist/index.js

Lines changed: 3 additions & 3 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.12",
7+
"version": "1.11.15",
88
"license": "Apache-2.0",
99
"repository": {
1010
"type": "git",

deps/amaro/dist/strip-loader.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"use strict";
2+
import { fileURLToPath } from "node:url";
23
import { isSwcError, wrapAndReThrowSwcError } from "./errors.js";
34
import { transformSync } from "./index.js";
45
export async function load(url, context, nextLoad) {
@@ -10,7 +11,8 @@ export async function load(url, context, nextLoad) {
1011
format: "module"
1112
});
1213
const { code } = transformSync(source.toString(), {
13-
mode: "strip-only"
14+
mode: "strip-only",
15+
filename: fileURLToPath(url)
1416
});
1517
return {
1618
format: format.replace("-typescript", ""),

deps/amaro/dist/transform-loader.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"use strict";
2+
import { fileURLToPath } from "node:url";
23
import { isSwcError, wrapAndReThrowSwcError } from "./errors.js";
34
import { transformSync } from "./index.js";
45
export async function load(url, context, nextLoad) {
@@ -12,7 +13,7 @@ export async function load(url, context, nextLoad) {
1213
const { code, map } = transformSync(source.toString(), {
1314
mode: "transform",
1415
sourceMap: true,
15-
filename: url
16+
filename: fileURLToPath(url)
1617
});
1718
let output = code;
1819
if (map) {

deps/amaro/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "amaro",
3-
"version": "0.5.0",
3+
"version": "0.5.1",
44
"description": "Node.js TypeScript wrapper",
55
"license": "MIT",
66
"type": "commonjs",

lib/internal/modules/typescript.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@ function parseTypeScript(source, options) {
8383
* @returns {Error} the decorated error
8484
*/
8585
function decorateErrorWithSnippet(error, amaroError) {
86-
const errorHints = `${amaroError.filename}:${amaroError.startLine}${amaroError.snippet}`;
87-
error.stack = `${errorHints}${error.stack}`;
86+
const errorHints = `${amaroError.filename}:${amaroError.startLine}\n${amaroError.snippet}`;
87+
error.stack = `${errorHints}\n${error.stack}`;
8888
return error;
8989
}
9090

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
#ifndef SRC_AMARO_VERSION_H_
44
#define SRC_AMARO_VERSION_H_
5-
#define AMARO_VERSION "0.5.0"
5+
#define AMARO_VERSION "0.5.1"
66
#endif // SRC_AMARO_VERSION_H_

test/es-module/test-typescript-eval.mjs

Lines changed: 4 additions & 6 deletions

0 commit comments

Comments
 (0)