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

@smarthr/create-lint-set

Package Overview
Dependencies
Maintainers
0
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@smarthr/create-lint-set - npm Package Compare versions

Comparing version 1.1.4 to 1.1.5

36

lib/createLintSet.js

@@ -97,14 +97,20 @@ "use strict";

// インストール
var installPackages = function (targetDir, itemList, useYarn) { return __awaiter(void 0, void 0, void 0, function () {
var installPackages = function (targetDir, itemList, pmName) { return __awaiter(void 0, void 0, void 0, function () {
var targetPackages, command, args;
return __generator(this, function (_a) {
targetPackages = itemList.map(function (item) { return item.packages; }).flat();
if (useYarn) {
command = 'yarn';
args = __spreadArray(['add', '--dev', '--exact', '--cwd', targetDir], targetPackages, true);
switch (pmName) {
case 'pnpm':
command = 'pnpm';
args = __spreadArray(['add', '--save-dev', '--save-exact', '--dir', targetDir], targetPackages, true);
break;
case 'yarn':
command = 'yarn';
args = __spreadArray(['add', '--dev', '--exact', '--cwd', targetDir], targetPackages, true);
break;
case 'npm':
command = 'npm';
args = __spreadArray(['install', '--save-dev', '--save-exact', '--prefix', targetDir], targetPackages, true);
break;
}
else {
command = 'npm';
args = __spreadArray(['install', '--save-dev', '--save-exact', '--prefix', targetDir], targetPackages, true);
}
return [2 /*return*/, new Promise(function (resolve, reject) {

@@ -163,3 +169,3 @@ var child = (0, cross_spawn_1.default)(command, args, { stdio: 'inherit' });

var init = function () { return __awaiter(void 0, void 0, void 0, function () {
var projectPath, scriptDir, currentDir, targetDir, targetDirFiles, isUsingYarn, itemsWithFilteredPackages;
var projectPath, scriptDir, currentDir, targetDir, targetDirFiles, pmName, itemsWithFilteredPackages;
return __generator(this, function (_a) {

@@ -177,5 +183,13 @@ switch (_a.label) {

;
isUsingYarn = targetDirFiles.includes('yarn.lock');
pmName = (function () {
if (targetDirFiles.includes('pnpm-lock.yaml')) {
return 'pnpm';
}
if (targetDirFiles.includes('yarn.lock')) {
return 'yarn';
}
return 'npm';
})();
itemsWithFilteredPackages = filterInstallPackages(targetDir, items_1.items);
return [4 /*yield*/, installPackages(targetDir, itemsWithFilteredPackages, isUsingYarn)];
return [4 /*yield*/, installPackages(targetDir, itemsWithFilteredPackages, pmName)];
case 1:

@@ -182,0 +196,0 @@ _a.sent();

{
"name": "@smarthr/create-lint-set",
"version": "1.1.4",
"version": "1.1.5",
"description": "Lint installer",

@@ -25,3 +25,3 @@ "author": "SmartHR",

"scripts": {
"prebuild": "yarn copy-templates",
"prebuild": "pnpm clean && pnpm copy-templates",
"copy-templates": "mkdir lib && cp -r src/templates lib/templates",

@@ -39,3 +39,3 @@ "clean": "rimraf lib"

},
"gitHead": "4f3c5e5bb5058f40344a8945b42089dd201e9ead"
"gitHead": "32268ddecb4340a1311b869f09888085e5c12502"
}

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