Socket
Socket
Sign inDemoInstall

@swc/cli

Package Overview
Dependencies
Maintainers
0
Versions
70
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@swc/cli - npm Package Compare versions

Comparing version 0.3.13 to 0.3.14

28

lib/swc/compile.js

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc