@swc-node/core
Advanced tools
Comparing version 0.7.3 to 0.7.4
@@ -6,2 +6,8 @@ # Change Log | ||
## [0.7.4](https://github.com/Brooooooklyn/swc-node/compare/@swc-node/core@0.7.3...@swc-node/core@0.7.4) (2020-09-11) | ||
### Bug Fixes | ||
- **core:** add support for esModuleInterop ([a7f3331](https://github.com/Brooooooklyn/swc-node/commit/a7f3331f06d597e39cb44be8a8d73f264a417a71)) | ||
## [0.7.3](https://github.com/Brooooooklyn/swc-node/compare/@swc-node/core@0.7.2...@swc-node/core@0.7.3) (2020-09-09) | ||
@@ -8,0 +14,0 @@ |
@@ -9,2 +9,3 @@ export interface Options { | ||
dynamicImport?: boolean; | ||
esModuleInterop?: boolean; | ||
} | ||
@@ -11,0 +12,0 @@ export declare function transformSync(source: string, path: string, options?: Options): any; |
@@ -8,8 +8,9 @@ "use strict"; | ||
function transformOption(path, options) { | ||
var _a, _b; | ||
var _a, _b, _c; | ||
const opts = options == null ? {} : options; | ||
opts.esModuleInterop = (_a = opts.esModuleInterop) !== null && _a !== void 0 ? _a : true; | ||
return JSON.stringify({ | ||
filename: path, | ||
jsc: { | ||
target: (_a = opts.target) !== null && _a !== void 0 ? _a : 'es2018', | ||
target: (_b = opts.target) !== null && _b !== void 0 ? _b : 'es2018', | ||
parser: { | ||
@@ -28,3 +29,4 @@ syntax: 'typescript', | ||
module: { | ||
type: (_b = opts.module) !== null && _b !== void 0 ? _b : 'commonjs', | ||
type: (_c = opts.module) !== null && _c !== void 0 ? _c : 'commonjs', | ||
noInterop: !opts.esModuleInterop, | ||
}, | ||
@@ -31,0 +33,0 @@ sourceMaps: typeof opts.sourcemap === 'undefined' ? true : opts.sourcemap, |
{ | ||
"name": "@swc-node/core", | ||
"version": "0.7.3", | ||
"version": "0.7.4", | ||
"description": "Faster swc nodejs binding", | ||
@@ -64,8 +64,8 @@ "keywords": [ | ||
}, | ||
"gitHead": "4997c8639f4fe67afbd861de9dbc2fa435d974b0", | ||
"gitHead": "38938a204527c3f8df036c98a0494e41661ab652", | ||
"optionalDependencies": { | ||
"@swc-node/core-darwin": "^0.7.3", | ||
"@swc-node/core-linux": "^0.7.3", | ||
"@swc-node/core-win32": "^0.7.3" | ||
"@swc-node/core-darwin": "^0.7.4", | ||
"@swc-node/core-linux": "^0.7.4", | ||
"@swc-node/core-win32": "^0.7.4" | ||
} | ||
} |
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
174674
61