@swc-node/register
Advanced tools
Comparing version 1.8.0 to 1.9.0
@@ -38,3 +38,3 @@ "use strict"; | ||
const expected = { | ||
baseUrl: process.cwd(), | ||
baseUrl: undefined, | ||
module: 'es6', | ||
@@ -41,0 +41,0 @@ sourcemap: false, |
@@ -57,2 +57,6 @@ "use strict"; | ||
const { options, errors, fileNames } = ts.parseJsonConfigFileContent(config, ts.sys, (0, path_1.dirname)(fullTsConfigPath)); | ||
// if baseUrl not set, use dirname of tsconfig.json. align with ts https://www.typescriptlang.org/tsconfig#paths | ||
if (options.paths && !options.baseUrl) { | ||
options.baseUrl = (0, path_1.dirname)(fullTsConfigPath); | ||
} | ||
if (!errors.length) { | ||
@@ -129,3 +133,3 @@ compilerOptions = options; | ||
function tsCompilerOptionsToSwcConfig(options, filename) { | ||
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m; | ||
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l; | ||
const isJsx = filename.endsWith('.tsx') || filename.endsWith('.jsx') || Boolean(options.jsx); | ||
@@ -154,4 +158,4 @@ const target = (_a = options.target) !== null && _a !== void 0 ? _a : ts.ScriptTarget.ES2018; | ||
: undefined, | ||
baseUrl: (0, path_1.resolve)((_l = options.baseUrl) !== null && _l !== void 0 ? _l : './'), | ||
paths: Object.fromEntries(Object.entries((_m = options.paths) !== null && _m !== void 0 ? _m : {}).map(([aliasKey, aliasPaths]) => { | ||
baseUrl: options.baseUrl ? (0, path_1.resolve)(options.baseUrl) : undefined, | ||
paths: Object.fromEntries(Object.entries((_l = options.paths) !== null && _l !== void 0 ? _l : {}).map(([aliasKey, aliasPaths]) => { | ||
var _a; | ||
@@ -158,0 +162,0 @@ return [ |
{ | ||
"name": "@swc-node/register", | ||
"version": "1.8.0", | ||
"version": "1.9.0", | ||
"description": "SWC node register", | ||
@@ -43,4 +43,4 @@ "keywords": [ | ||
"dependencies": { | ||
"@swc-node/core": "^1.12.0", | ||
"@swc-node/sourcemap-support": "^0.4.0", | ||
"@swc-node/core": "^1.13.0", | ||
"@swc-node/sourcemap-support": "^0.5.0", | ||
"colorette": "^2.0.20", | ||
@@ -84,3 +84,3 @@ "debug": "^4.3.4", | ||
}, | ||
"gitHead": "28c0a9969942499c2dc9a2883360146de14ef907" | ||
"gitHead": "abfb35770bd952fb902ac698668874512e88460d" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
114833
691
+ Added@swc-node/sourcemap-support@0.5.1(transitive)
- Removed@swc-node/sourcemap-support@0.4.0(transitive)
Updated@swc-node/core@^1.13.0