Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions deps/amaro/dist/errors.d.ts
Original file line number Diff line number Diff line change
@@ -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 change: 1 addition & 0 deletions deps/amaro/dist/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { transformSync } from "./transform.ts";
6 changes: 3 additions & 3 deletions deps/amaro/dist/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion deps/amaro/dist/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"강동윤 <[email protected]>"
],
"description": "wasm module for swc",
"version": "1.11.31",
"version": "1.12.1",
"license": "Apache-2.0",
"repository": {
"type": "git",
Expand Down
2 changes: 2 additions & 0 deletions deps/amaro/dist/strip-loader.d.ts
Original file line number Diff line number Diff line change
@@ -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 changes: 2 additions & 0 deletions deps/amaro/dist/transform-loader.d.ts
Original file line number Diff line number Diff line change
@@ -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 changes: 2 additions & 0 deletions deps/amaro/dist/transform.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import type { Options, TransformOutput } from "../lib/wasm";
export declare function transformSync(source: string, options?: Options): TransformOutput;
59 changes: 59 additions & 0 deletions deps/amaro/lib/wasm.d.ts
Original file line number Diff line number Diff line change
@@ -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 changes: 12 additions & 0 deletions deps/amaro/lib/wasm_bg.wasm.d.ts
Original file line number Diff line number Diff line change
@@ -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;
12 changes: 10 additions & 2 deletions deps/amaro/package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
{
"name": "amaro",
"version": "1.0.0",
"version": "1.1.0",
"description": "Node.js TypeScript wrapper",
"license": "MIT",
"type": "commonjs",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"homepage": "https://github.com/nodejs/amaro#readme",
"bugs": {
"url": "https://github.com/nodejs/amaro/issues"
Expand All @@ -13,6 +14,12 @@
"type": "git",
"url": "https://github.com/nodejs/amaro.git"
},
"keywords": [
"typescript",
"nodejs",
"type stripping",
"strip-types"
],
"scripts": {
"clean": "rimraf dist",
"lint": "biome lint --write",
Expand All @@ -21,7 +28,7 @@
"ci:fix": "biome check --write",
"prepack": "npm run build",
"postpack": "npm run clean",
"build": "node esbuild.config.mjs",
"build": "node esbuild.config.mjs && tsc --noCheck",
"build:wasm": "node tools/build-wasm.js",
"typecheck": "tsc --noEmit",
"test": "node --test \"**/*.test.js\"",
Expand All @@ -42,6 +49,7 @@
},
"files": [
"dist",
"lib/**/*.d.ts",
"LICENSE.md"
],
"engines": {
Expand Down
2 changes: 1 addition & 1 deletion src/amaro_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
// Refer to tools/dep_updaters/update-amaro.sh
#ifndef 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_
Loading