Skip to content

Commit 88f4cef

Browse files
deps: update amaro to 1.1.0
PR-URL: #58754 Reviewed-By: Marco Ippolito <[email protected]> Reviewed-By: Chengzhong Wu <[email protected]>
1 parent 98433c7 commit 88f4cef

File tree

11 files changed

+106
-7
lines changed

11 files changed

+106
-7
lines changed

deps/amaro/dist/errors.d.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
type SwcError = {
2+
code: "UnsupportedSyntax" | "InvalidSyntax";
3+
message: string;
4+
startColumn: number;
5+
startLine: number;
6+
snippet: string;
7+
filename: string;
8+
endColumn: number;
9+
endLine: number;
10+
};
11+
export declare function isSwcError(error: unknown): error is SwcError;
12+
export declare function wrapAndReThrowSwcError(error: SwcError): never;
13+
export {};

deps/amaro/dist/index.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { transformSync } from "./transform.ts";

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
"강동윤 <[email protected]>"
55
],
66
"description": "wasm module for swc",
7-
"version": "1.11.31",
7+
"version": "1.12.1",
88
"license": "Apache-2.0",
99
"repository": {
1010
"type": "git",

deps/amaro/dist/strip-loader.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
import type { LoadFnOutput, LoadHookContext } from "node:module";
2+
export declare function load(url: string, context: LoadHookContext, nextLoad: (url: string, context?: LoadHookContext) => LoadFnOutput | Promise<LoadFnOutput>): Promise<LoadFnOutput>;

deps/amaro/dist/transform-loader.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
import type { LoadFnOutput, LoadHookContext } from "node:module";
2+
export declare function load(url: string, context: LoadHookContext, nextLoad: (url: string, context?: LoadHookContext) => LoadFnOutput | Promise<LoadFnOutput>): Promise<LoadFnOutput>;

deps/amaro/dist/transform.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
import type { Options, TransformOutput } from "../lib/wasm";
2+
export declare function transformSync(source: string, options?: Options): TransformOutput;

deps/amaro/lib/wasm.d.ts

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
/* tslint:disable */
2+
/* eslint-disable */
3+
4+
export declare function transform(src: string | Uint8Array, opts?: Options): Promise<TransformOutput>;
5+
export declare function transformSync(src: string | Uint8Array, opts?: Options): TransformOutput;
6+
export type { Options, TransformOutput };
7+
8+
9+
10+
interface Options {
11+
module?: boolean;
12+
filename?: string;
13+
mode?: Mode;
14+
transform?: TransformConfig;
15+
deprecatedTsModuleAsError?: boolean;
16+
sourceMap?: boolean;
17+
}
18+
19+
interface TransformConfig {
20+
/**
21+
* @see https://www.typescriptlang.org/tsconfig#verbatimModuleSyntax
22+
*/
23+
verbatimModuleSyntax?: boolean;
24+
/**
25+
* Native class properties support
26+
*/
27+
nativeClassProperties?: boolean;
28+
importNotUsedAsValues?: "remove" | "preserve";
29+
/**
30+
* Don't create `export {}`.
31+
* By default, strip creates `export {}` for modules to preserve module
32+
* context.
33+
*
34+
* @see https://github.com/swc-project/swc/issues/1698
35+
*/
36+
noEmptyExport?: boolean;
37+
importExportAssignConfig?: "Classic" | "Preserve" | "NodeNext" | "EsNext";
38+
/**
39+
* Disables an optimization that inlines TS enum member values
40+
* within the same module that assumes the enum member values
41+
* are never modified.
42+
*
43+
* Defaults to false.
44+
*/
45+
tsEnumIsMutable?: boolean;
46+
}
47+
48+
49+
50+
type Mode = "strip-only" | "transform";
51+
52+
53+
54+
interface TransformOutput {
55+
code: string;
56+
map?: string;
57+
}
58+
59+

deps/amaro/lib/wasm_bg.wasm.d.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
/* tslint:disable */
2+
/* eslint-disable */
3+
export const memory: WebAssembly.Memory;
4+
export const transform: (a: number, b: number) => number;
5+
export const transformSync: (a: number, b: number, c: number) => void;
6+
export const __wbindgen_export_0: (a: number) => void;
7+
export const __wbindgen_export_1: WebAssembly.Table;
8+
export const __wbindgen_export_2: (a: number, b: number) => number;
9+
export const __wbindgen_export_3: (a: number, b: number, c: number, d: number) => number;
10+
export const __wbindgen_add_to_stack_pointer: (a: number) => number;
11+
export const __wbindgen_export_4: (a: number, b: number, c: number) => void;
12+
export const __wbindgen_export_5: (a: number, b: number, c: number, d: number) => void;

deps/amaro/package.json

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
{
22
"name": "amaro",
3-
"version": "1.0.0",
3+
"version": "1.1.0",
44
"description": "Node.js TypeScript wrapper",
55
"license": "MIT",
66
"type": "commonjs",
77
"main": "dist/index.js",
8+
"types": "dist/index.d.ts",
89
"homepage": "https://github.com/nodejs/amaro#readme",
910
"bugs": {
1011
"url": "https://github.com/nodejs/amaro/issues"
@@ -13,6 +14,12 @@
1314
"type": "git",
1415
"url": "https://github.com/nodejs/amaro.git"
1516
},
17+
"keywords": [
18+
"typescript",
19+
"nodejs",
20+
"type stripping",
21+
"strip-types"
22+
],
1623
"scripts": {
1724
"clean": "rimraf dist",
1825
"lint": "biome lint --write",
@@ -21,7 +28,7 @@
2128
"ci:fix": "biome check --write",
2229
"prepack": "npm run build",
2330
"postpack": "npm run clean",
24-
"build": "node esbuild.config.mjs",
31+
"build": "node esbuild.config.mjs && tsc --noCheck",
2532
"build:wasm": "node tools/build-wasm.js",
2633
"typecheck": "tsc --noEmit",
2734
"test": "node --test \"**/*.test.js\"",
@@ -42,6 +49,7 @@
4249
},
4350
"files": [
4451
"dist",
52+
"lib/**/*.d.ts",
4553
"LICENSE.md"
4654
],
4755
"engines": {

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 "1.0.0"
5+
#define AMARO_VERSION "1.1.0"
66
#endif // SRC_AMARO_VERSION_H_

0 commit comments

Comments
 (0)