Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@swc/cli

Package Overview
Dependencies
Maintainers
1
Versions
71
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.1.57 to 0.1.58

bin/swcx.js

6

lib/swc/__tests__/sources.test.js

@@ -130,3 +130,3 @@ "use strict";

});
describe("slitCompilableAndCopyable", ()=>{
describe("splitCompilableAndCopyable", ()=>{
const extensions = [

@@ -140,3 +140,3 @@ ".ts"

];
const [compilable, copyable] = (0, _sources).slitCompilableAndCopyable(files, extensions, true);
const [compilable, copyable] = (0, _sources).splitCompilableAndCopyable(files, extensions, true);
expect(compilable).toEqual([

@@ -154,3 +154,3 @@ "test.ts"

];
const [compilable, copyable] = (0, _sources).slitCompilableAndCopyable(files, extensions, false);
const [compilable, copyable] = (0, _sources).splitCompilableAndCopyable(files, extensions, false);
expect(compilable).toEqual([

@@ -157,0 +157,0 @@ "test.ts"

@@ -87,3 +87,3 @@ "use strict";

const sourceFiles = await (0, _sources).globSources(filenames, includeDotfiles);
const [compilable, copyable] = (0, _sources).slitCompilableAndCopyable(sourceFiles, extensions, copyFiles);
const [compilable, copyable] = (0, _sources).splitCompilableAndCopyable(sourceFiles, extensions, copyFiles);
if (sync) {

@@ -189,2 +189,7 @@ for (const filename of compilable){

await unlink(getDest(filename, outDir, ".js"));
const sourcemapPath = getDest(filename, outDir, ".js.map");
const sourcemapExists = await (0, _util).exists(sourcemapPath);
if (sourcemapExists) {
await unlink(sourcemapPath);
}
} else if (copyFiles) {

@@ -191,0 +196,0 @@ await unlink(getDest(filename, outDir));

@@ -7,3 +7,3 @@ "use strict";

exports.isCompilableExtension = isCompilableExtension;
exports.slitCompilableAndCopyable = slitCompilableAndCopyable;
exports.splitCompilableAndCopyable = splitCompilableAndCopyable;
exports.requireChokidar = requireChokidar;

@@ -72,3 +72,3 @@ exports.watchSources = watchSources;

}
function slitCompilableAndCopyable(files, allowedExtension, copyFiles) {
function splitCompilableAndCopyable(files, allowedExtension, copyFiles) {
const compilable = [];

@@ -75,0 +75,0 @@ const copyable = [];

@@ -5,2 +5,3 @@ "use strict";

});
exports.exists = exists;
exports.transform = transform;

@@ -40,2 +41,11 @@ exports.compile = compile;

}
async function exists(path) {
let pathExists = true;
try {
await _fs.promises.access(path);
} catch (err) {
pathExists = false;
}
return pathExists;
}
async function transform(filename, code, opts, sync, outputPath) {

@@ -42,0 +52,0 @@ opts = {

{
"name": "@swc/cli",
"version": "0.1.57",
"version": "0.1.58",
"description": "CLI for the swc project",
"main": "lib/swc/index.js",
"scripts": {
"postinstall": "echo \"Beta version of @swc/cli is now available via 'swcx' command. This'll be a default command for @swc/cli@1. Please give it a try and let us know if there are problems!\"",
"prepublishOnly": "yarn build && yarn test && yarn types",

@@ -45,7 +46,10 @@ "types": "tsc",

"swc": "./bin/swc.js",
"swcx": "./bin/swcx.js",
"spack": "./bin/spack.js"
},
"dependencies": {
"bin-wrapper": "^4.1.0",
"commander": "^7.1.0",
"fast-glob": "^3.2.5",
"semver": "^7.3.8",
"slash": "3.0.0",

@@ -60,2 +64,3 @@ "source-map": "^0.7.3"

"@types/node": "^12.19.16",
"@types/semver": "^7.3.13",
"chokidar": "^3.5.1",

@@ -62,0 +67,0 @@ "deepmerge": "^4.2.2",

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

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