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.18 to 0.1.19

.vscode/settings.json

5

lib/package.json
{
"name": "@swc/cli",
"version": "0.1.18",
"version": "0.1.19",
"description": "CLI for the swc project",
"main": "index.js",
"scripts": {
"prepublish": "tsc",
"test": "jest"

@@ -23,3 +24,3 @@ },

],
"author": "강동윤 <kdy1@outlook.kr>",
"author": "강동윤 <kdy1997.dev@gmail.com>",
"license": "MIT",

@@ -26,0 +27,0 @@ "bugs": {

3

lib/src/dir.js
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());

@@ -8,0 +9,0 @@ });

"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());

@@ -8,0 +9,0 @@ });

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

commander_1.default.option("--include-dotfiles", "Include dotfiles when compiling and copying non-compilable files");
commander_1.default.option("-C, --config <config>", "Override a config from .swcrc file. e.g. -C module.type=amd -C module.moduleId=hello", collect);
commander_1.default.version(`@swc/cli: ${package_json_1.default.version}

@@ -102,2 +103,24 @@ @swc/core: ${core_1.version}`);

};
for (const cfg of opts.config) {
const i = cfg.indexOf('=');
let key, value;
if (i === -1) {
key = cfg;
value = true;
}
else {
key = cfg.substring(0, i);
value = cfg.substring(i + 1);
}
let obj = swcOptions;
const ks = key.split('.');
for (const k of ks.slice(0, ks.length - 1)) {
if (!obj[k]) {
obj[k] = {};
}
obj = obj[k];
}
obj[ks[ks.length - 1]] = value;
}
console.log(swcOptions);
let cliOptions = {

@@ -104,0 +127,0 @@ outDir: opts.outDir,

{
"name": "@swc/cli",
"version": "0.1.18",
"version": "0.1.19",
"description": "CLI for the swc project",
"main": "index.js",
"scripts": {
"prepublish": "tsc",
"test": "jest"

@@ -23,3 +24,3 @@ },

],
"author": "강동윤 <kdy1@outlook.kr>",
"author": "강동윤 <kdy1997.dev@gmail.com>",
"license": "MIT",

@@ -26,0 +27,0 @@ "bugs": {

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