deps: update amaro to 1.1.0

PR-URL: https://github.com/nodejs/node/pull/58754
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
This commit is contained in:
Node.js GitHub Bot 2025-06-20 10:07:56 -04:00 committed by GitHub
parent 98433c7319
commit 88f4cef8b9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 106 additions and 7 deletions

13
deps/amaro/dist/errors.d.ts vendored Normal file
View file

@ -0,0 +1,13 @@
type SwcError = {
code: "UnsupportedSyntax" | "InvalidSyntax";
message: string;
startColumn: number;
startLine: number;
snippet: string;
filename: string;
endColumn: number;
endLine: number;
};
export declare function isSwcError(error: unknown): error is SwcError;
export declare function wrapAndReThrowSwcError(error: SwcError): never;
export {};

1
deps/amaro/dist/index.d.ts vendored Normal file
View file

@ -0,0 +1 @@
export { transformSync } from "./transform.ts";

File diff suppressed because one or more lines are too long

View file

@ -4,7 +4,7 @@
"강동윤 <kdy1997.dev@gmail.com>" "강동윤 <kdy1997.dev@gmail.com>"
], ],
"description": "wasm module for swc", "description": "wasm module for swc",
"version": "1.11.31", "version": "1.12.1",
"license": "Apache-2.0", "license": "Apache-2.0",
"repository": { "repository": {
"type": "git", "type": "git",

2
deps/amaro/dist/strip-loader.d.ts vendored Normal file
View file

@ -0,0 +1,2 @@
import type { LoadFnOutput, LoadHookContext } from "node:module";
export declare function load(url: string, context: LoadHookContext, nextLoad: (url: string, context?: LoadHookContext) => LoadFnOutput | Promise<LoadFnOutput>): Promise<LoadFnOutput>;

2
deps/amaro/dist/transform-loader.d.ts vendored Normal file
View file

@ -0,0 +1,2 @@
import type { LoadFnOutput, LoadHookContext } from "node:module";
export declare function load(url: string, context: LoadHookContext, nextLoad: (url: string, context?: LoadHookContext) => LoadFnOutput | Promise<LoadFnOutput>): Promise<LoadFnOutput>;

2
deps/amaro/dist/transform.d.ts vendored Normal file
View file

@ -0,0 +1,2 @@
import type { Options, TransformOutput } from "../lib/wasm";
export declare function transformSync(source: string, options?: Options): TransformOutput;

59
deps/amaro/lib/wasm.d.ts vendored Normal file
View file

@ -0,0 +1,59 @@
/* tslint:disable */
/* eslint-disable */
export declare function transform(src: string | Uint8Array, opts?: Options): Promise<TransformOutput>;
export declare function transformSync(src: string | Uint8Array, opts?: Options): TransformOutput;
export type { Options, TransformOutput };
interface Options {
module?: boolean;
filename?: string;
mode?: Mode;
transform?: TransformConfig;
deprecatedTsModuleAsError?: boolean;
sourceMap?: boolean;
}
interface TransformConfig {
/**
* @see https://www.typescriptlang.org/tsconfig#verbatimModuleSyntax
*/
verbatimModuleSyntax?: boolean;
/**
* Native class properties support
*/
nativeClassProperties?: boolean;
importNotUsedAsValues?: "remove" | "preserve";
/**
* Don't create `export {}`.
* By default, strip creates `export {}` for modules to preserve module
* context.
*
* @see https://github.com/swc-project/swc/issues/1698
*/
noEmptyExport?: boolean;
importExportAssignConfig?: "Classic" | "Preserve" | "NodeNext" | "EsNext";
/**
* Disables an optimization that inlines TS enum member values
* within the same module that assumes the enum member values
* are never modified.
*
* Defaults to false.
*/
tsEnumIsMutable?: boolean;
}
type Mode = "strip-only" | "transform";
interface TransformOutput {
code: string;
map?: string;
}

12
deps/amaro/lib/wasm_bg.wasm.d.ts vendored Normal file
View file

@ -0,0 +1,12 @@
/* tslint:disable */
/* eslint-disable */
export const memory: WebAssembly.Memory;
export const transform: (a: number, b: number) => number;
export const transformSync: (a: number, b: number, c: number) => void;
export const __wbindgen_export_0: (a: number) => void;
export const __wbindgen_export_1: WebAssembly.Table;
export const __wbindgen_export_2: (a: number, b: number) => number;
export const __wbindgen_export_3: (a: number, b: number, c: number, d: number) => number;
export const __wbindgen_add_to_stack_pointer: (a: number) => number;
export const __wbindgen_export_4: (a: number, b: number, c: number) => void;
export const __wbindgen_export_5: (a: number, b: number, c: number, d: number) => void;

View file

@ -1,10 +1,11 @@
{ {
"name": "amaro", "name": "amaro",
"version": "1.0.0", "version": "1.1.0",
"description": "Node.js TypeScript wrapper", "description": "Node.js TypeScript wrapper",
"license": "MIT", "license": "MIT",
"type": "commonjs", "type": "commonjs",
"main": "dist/index.js", "main": "dist/index.js",
"types": "dist/index.d.ts",
"homepage": "https://github.com/nodejs/amaro#readme", "homepage": "https://github.com/nodejs/amaro#readme",
"bugs": { "bugs": {
"url": "https://github.com/nodejs/amaro/issues" "url": "https://github.com/nodejs/amaro/issues"
@ -13,6 +14,12 @@
"type": "git", "type": "git",
"url": "https://github.com/nodejs/amaro.git" "url": "https://github.com/nodejs/amaro.git"
}, },
"keywords": [
"typescript",
"nodejs",
"type stripping",
"strip-types"
],
"scripts": { "scripts": {
"clean": "rimraf dist", "clean": "rimraf dist",
"lint": "biome lint --write", "lint": "biome lint --write",
@ -21,7 +28,7 @@
"ci:fix": "biome check --write", "ci:fix": "biome check --write",
"prepack": "npm run build", "prepack": "npm run build",
"postpack": "npm run clean", "postpack": "npm run clean",
"build": "node esbuild.config.mjs", "build": "node esbuild.config.mjs && tsc --noCheck",
"build:wasm": "node tools/build-wasm.js", "build:wasm": "node tools/build-wasm.js",
"typecheck": "tsc --noEmit", "typecheck": "tsc --noEmit",
"test": "node --test \"**/*.test.js\"", "test": "node --test \"**/*.test.js\"",
@ -42,6 +49,7 @@
}, },
"files": [ "files": [
"dist", "dist",
"lib/**/*.d.ts",
"LICENSE.md" "LICENSE.md"
], ],
"engines": { "engines": {

View file

@ -2,5 +2,5 @@
// Refer to tools/dep_updaters/update-amaro.sh // Refer to tools/dep_updaters/update-amaro.sh
#ifndef SRC_AMARO_VERSION_H_ #ifndef SRC_AMARO_VERSION_H_
#define SRC_AMARO_VERSION_H_ #define SRC_AMARO_VERSION_H_
#define AMARO_VERSION "1.0.0" #define AMARO_VERSION "1.1.0"
#endif // SRC_AMARO_VERSION_H_ #endif // SRC_AMARO_VERSION_H_