| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff 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 {}; | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1 @@ | |||
| 1 | + export { transformSync } from "./transform.ts"; | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -4,7 +4,7 @@ | |||
| 4 | 4 | "강동윤 <kdy1997.dev@gmail.com>" | |
| 5 | 5 | ], | |
| 6 | 6 | "description": "wasm module for swc", | |
| 7 | - "version": "1.11.31", | ||
| 7 | + "version": "1.12.1", | ||
| 8 | 8 | "license": "Apache-2.0", | |
| 9 | 9 | "repository": { | |
| 10 | 10 | "type": "git", | |
| Original file line number | Diff line number | Diff 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>; | ||
| Original file line number | Diff line number | Diff 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>; | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,2 @@ | |||
| 1 | + import type { Options, TransformOutput } from "../lib/wasm"; | ||
| 2 | + export declare function transformSync(source: string, options?: Options): TransformOutput; | ||
| Original file line number | Diff line number | Diff 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 | + | ||
| Original file line number | Diff line number | Diff 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; | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,10 +1,11 @@ | |||
| 1 | 1 | { | |
| 2 | 2 | "name": "amaro", | |
| 3 | - "version": "1.0.0", | ||
| 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\"", | |
@@ -42,6 +49,7 @@ | |||
| 42 | 49 | }, | |
| 43 | 50 | "files": [ | |
| 44 | 51 | "dist", | |
| 52 | + "lib/**/*.d.ts", | ||
| 45 | 53 | "LICENSE.md" | |
| 46 | 54 | ], | |
| 47 | 55 | "engines": { | |
| Back | FazBrowse Home | New Git URL |
0 commit comments