@swc-node/core
Advanced tools
Comparing version 1.10.6 to 1.12.0
@@ -9,2 +9,3 @@ import { Options as SwcOptions, ReactConfig, Config, JscTarget } from '@swc/core'; | ||
emitDecoratorMetadata?: boolean; | ||
useDefineForClassFields?: boolean; | ||
dynamicImport?: boolean; | ||
@@ -20,5 +21,6 @@ esModuleInterop?: boolean; | ||
swc?: SwcOptions; | ||
ignoreDynamic?: boolean; | ||
} | ||
export declare function transformSync(source: string, path: string, options?: Options): import("@swc/core").Output; | ||
export declare function transformJest(source: string, path: string, options?: Options): import("@swc/core").Output; | ||
export declare function transform(source: string, path: string, options?: Options): Promise<import("@swc/core").Output>; | ||
export declare function transformSync(source: string, path: string, options?: Options): import("@swc/types").Output; | ||
export declare function transformJest(source: string, path: string, options?: Options): import("@swc/types").Output; | ||
export declare function transform(source: string, path: string, options?: Options): Promise<import("@swc/types").Output>; |
@@ -8,3 +8,3 @@ "use strict"; | ||
function transformOption(path, options, jest = false) { | ||
var _a, _b, _c, _d, _e, _f; | ||
var _a, _b, _c, _d, _e, _f, _g; | ||
const opts = options !== null && options !== void 0 ? options : {}; | ||
@@ -29,2 +29,3 @@ opts.esModuleInterop = (_a = opts.esModuleInterop) !== null && _a !== void 0 ? _a : true; | ||
decoratorMetadata: Boolean(opts.emitDecoratorMetadata), | ||
useDefineForClassFields: Boolean(opts.useDefineForClassFields), | ||
react: options === null || options === void 0 ? void 0 : options.react, | ||
@@ -49,9 +50,14 @@ // @ts-expect-error | ||
noInterop: !opts.esModuleInterop, | ||
ignoreDynamic: opts.ignoreDynamic, | ||
} | ||
: undefined), | ||
}, | ||
sourceMaps: jest || typeof opts.sourcemap === 'undefined' ? 'inline' : opts.sourcemap, | ||
sourceMaps: ((_f = options === null || options === void 0 ? void 0 : options.swc) === null || _f === void 0 ? void 0 : _f.swcrc) | ||
? undefined | ||
: jest || typeof opts.sourcemap === 'undefined' | ||
? 'inline' | ||
: opts.sourcemap, | ||
inlineSourcesContent: true, | ||
swcrc: false, | ||
...((_f = options === null || options === void 0 ? void 0 : options.swc) !== null && _f !== void 0 ? _f : {}), | ||
...((_g = options === null || options === void 0 ? void 0 : options.swc) !== null && _g !== void 0 ? _g : {}), | ||
}; | ||
@@ -58,0 +64,0 @@ } |
{ | ||
"name": "@swc-node/core", | ||
"version": "1.10.6", | ||
"version": "1.12.0", | ||
"description": "Faster swc nodejs binding", | ||
@@ -44,6 +44,8 @@ "keywords": [ | ||
"peerDependencies": { | ||
"@swc/core": ">= 1.3" | ||
"@swc/core": ">= 1.3", | ||
"@swc/types": ">= 0.1" | ||
}, | ||
"devDependencies": { | ||
"@swc/core": "^1.3.78" | ||
"@swc/core": "^1.3.107", | ||
"@swc/types": "^0.1.5" | ||
}, | ||
@@ -54,3 +56,3 @@ "funding": { | ||
}, | ||
"gitHead": "cc3d1da4f732e21c64e749766328705d4f6cfad5" | ||
"gitHead": "28c0a9969942499c2dc9a2883360146de14ef907" | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
37767
97
2
2