@swc-node/core
Advanced tools
Comparing version 1.10.1 to 1.10.2
@@ -8,3 +8,3 @@ "use strict"; | ||
function transformOption(path, options, jest = false) { | ||
var _a, _b, _c, _d; | ||
var _a, _b, _c, _d, _e; | ||
const opts = options == null ? {} : options; | ||
@@ -14,26 +14,28 @@ opts.esModuleInterop = (_a = opts.esModuleInterop) !== null && _a !== void 0 ? _a : true; | ||
filename: path, | ||
jsc: { | ||
target: (_b = opts.target) !== null && _b !== void 0 ? _b : DEFAULT_ES_TARGET, | ||
externalHelpers: jest ? true : false, | ||
parser: { | ||
syntax: 'typescript', | ||
tsx: typeof opts.jsx !== 'undefined' ? opts.jsx : path.endsWith('.tsx'), | ||
decorators: Boolean(opts.experimentalDecorators), | ||
dynamicImport: Boolean(opts.dynamicImport), | ||
}, | ||
transform: { | ||
legacyDecorator: Boolean(opts.experimentalDecorators), | ||
decoratorMetadata: Boolean(opts.emitDecoratorMetadata), | ||
react: options === null || options === void 0 ? void 0 : options.react, | ||
hidden: { | ||
jest, | ||
jsc: ((_b = options === null || options === void 0 ? void 0 : options.swc) === null || _b === void 0 ? void 0 : _b.swcrc) | ||
? undefined | ||
: { | ||
target: (_c = opts.target) !== null && _c !== void 0 ? _c : DEFAULT_ES_TARGET, | ||
externalHelpers: jest ? true : false, | ||
parser: { | ||
syntax: 'typescript', | ||
tsx: typeof opts.jsx !== 'undefined' ? opts.jsx : path.endsWith('.tsx'), | ||
decorators: Boolean(opts.experimentalDecorators), | ||
dynamicImport: Boolean(opts.dynamicImport), | ||
}, | ||
transform: { | ||
legacyDecorator: Boolean(opts.experimentalDecorators), | ||
decoratorMetadata: Boolean(opts.emitDecoratorMetadata), | ||
react: options === null || options === void 0 ? void 0 : options.react, | ||
hidden: { | ||
jest, | ||
}, | ||
}, | ||
keepClassNames: opts.keepClassNames, | ||
paths: opts.paths, | ||
}, | ||
keepClassNames: opts.keepClassNames, | ||
paths: opts.paths, | ||
}, | ||
minify: false, | ||
isModule: true, | ||
module: { | ||
type: (_c = options === null || options === void 0 ? void 0 : options.module) !== null && _c !== void 0 ? _c : 'commonjs', | ||
type: (_d = options === null || options === void 0 ? void 0 : options.module) !== null && _d !== void 0 ? _d : 'commonjs', | ||
noInterop: !opts.esModuleInterop, | ||
@@ -44,3 +46,3 @@ }, | ||
swcrc: false, | ||
...((_d = options === null || options === void 0 ? void 0 : options.swc) !== null && _d !== void 0 ? _d : {}), | ||
...((_e = options === null || options === void 0 ? void 0 : options.swc) !== null && _e !== void 0 ? _e : {}), | ||
}; | ||
@@ -47,0 +49,0 @@ } |
{ | ||
"name": "@swc-node/core", | ||
"version": "1.10.1", | ||
"version": "1.10.2", | ||
"description": "Faster swc nodejs binding", | ||
@@ -53,3 +53,3 @@ "keywords": [ | ||
}, | ||
"gitHead": "b7d69a6bf629d388a8266764bd54b308f32e0f91" | ||
"gitHead": "b05e078db237784dc5f5e46fc2524280d56c00d7" | ||
} |
Sorry, the diff of this file is not supported yet
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
35606
78