amaro 0.5.3 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +33 -9
- package/dist/errors.d.ts +13 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +3 -3
- package/dist/package.json +1 -1
- package/dist/strip-loader.d.ts +2 -0
- package/dist/transform-loader.d.ts +2 -0
- package/dist/transform.d.ts +2 -0
- package/lib/wasm.d.ts +59 -0
- package/lib/wasm_bg.wasm.d.ts +12 -0
- package/package.json +10 -3
package/dist/package.json
CHANGED
package/lib/wasm.d.ts
ADDED
|
@@ -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
|
+
|
|
@@ -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;
|
package/package.json
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "amaro",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "Node.js TypeScript wrapper",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "commonjs",
|
|
7
7
|
"main": "dist/index.js",
|
|
8
|
+
"types": "dist/index.d.ts",
|
|
8
9
|
"homepage": "https://github.com/nodejs/amaro#readme",
|
|
9
10
|
"bugs": {
|
|
10
11
|
"url": "https://github.com/nodejs/amaro/issues"
|
|
@@ -13,6 +14,12 @@
|
|
|
13
14
|
"type": "git",
|
|
14
15
|
"url": "https://github.com/nodejs/amaro.git"
|
|
15
16
|
},
|
|
17
|
+
"keywords": [
|
|
18
|
+
"typescript",
|
|
19
|
+
"nodejs",
|
|
20
|
+
"type stripping",
|
|
21
|
+
"strip-types"
|
|
22
|
+
],
|
|
16
23
|
"scripts": {
|
|
17
24
|
"clean": "rimraf dist",
|
|
18
25
|
"lint": "biome lint --write",
|
|
@@ -21,7 +28,7 @@
|
|
|
21
28
|
"ci:fix": "biome check --write",
|
|
22
29
|
"prepack": "npm run build",
|
|
23
30
|
"postpack": "npm run clean",
|
|
24
|
-
"build": "node esbuild.config.mjs",
|
|
31
|
+
"build": "node esbuild.config.mjs && tsc --noCheck",
|
|
25
32
|
"build:wasm": "node tools/build-wasm.js",
|
|
26
33
|
"typecheck": "tsc --noEmit",
|
|
27
34
|
"test": "node --test \"**/*.test.js\"",
|
|
@@ -37,12 +44,12 @@
|
|
|
37
44
|
},
|
|
38
45
|
"exports": {
|
|
39
46
|
".": "./dist/index.js",
|
|
40
|
-
"./register": "./dist/register-strip.mjs",
|
|
41
47
|
"./strip": "./dist/register-strip.mjs",
|
|
42
48
|
"./transform": "./dist/register-transform.mjs"
|
|
43
49
|
},
|
|
44
50
|
"files": [
|
|
45
51
|
"dist",
|
|
52
|
+
"lib/**/*.d.ts",
|
|
46
53
|
"LICENSE.md"
|
|
47
54
|
],
|
|
48
55
|
"engines": {
|