Comparing version 0.3.13 to 0.3.14
@@ -30,5 +30,19 @@ "use strict"; | ||
function withSourceMap(output, options, destFile, destDir) { | ||
let dts; | ||
// TODO: Remove once fixed in core | ||
if (output.output) { | ||
const json = JSON.parse(output.output); | ||
if (json.__swc_isolated_declarations__) { | ||
dts = json.__swc_isolated_declarations__; | ||
} | ||
} | ||
let dtsPath; | ||
if (dts) { | ||
dtsPath = (0, _path.join)(destDir, (0, _path.basename)(destFile) + ".d.ts"); | ||
} | ||
if (!output.map || options.sourceMaps === "inline") { | ||
return { | ||
sourceCode: output.code | ||
sourceCode: output.code, | ||
dts, | ||
dtsPath | ||
}; | ||
@@ -47,14 +61,2 @@ } | ||
output.code += `\n//# sourceMappingURL=${(0, _slash.default)((0, _path.relative)(destDir, sourceMapPath))}`; | ||
let dts; | ||
// TODO: Remove once fixed in core | ||
if (output.output) { | ||
const json = JSON.parse(output.output); | ||
if (json.__swc_isolated_declarations__) { | ||
dts = json.__swc_isolated_declarations__; | ||
} | ||
} | ||
let dtsPath; | ||
if (dts) { | ||
dtsPath = (0, _path.join)(destDir, (0, _path.basename)(destFile) + ".d.ts"); | ||
} | ||
return { | ||
@@ -61,0 +63,0 @@ sourceMap: output.map, |
{ | ||
"name": "@swc/cli", | ||
"version": "0.3.13", | ||
"version": "0.3.14", | ||
"description": "CLI for the swc project", | ||
@@ -46,3 +46,3 @@ "main": "lib/swc/index.js", | ||
"devDependencies": { | ||
"@swc/cli": "=0.3.12", | ||
"@swc/cli": "=0.3.13", | ||
"@swc/core": "^1.6.4", | ||
@@ -49,0 +49,0 @@ "@swc/types": "^0.1.9", |
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
170809
1730