@modernpoacher/deps 1.4.17 → 1.4.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.js +1 -1
- package/package.json +14 -14
- package/src/index.js +10 -2
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.executeBundle=executeBundle;exports.executeDev=executeDev;exports.executeOptional=executeOptional;exports.executeProd=executeProd;exports.getInstallCommands=void 0;exports.getInstallSaveBundleCommands=getInstallSaveBundleCommands;exports.getInstallSaveBundleSaveExactCommands=getInstallSaveBundleSaveExactCommands;exports.getInstallSaveDevCommands=getInstallSaveDevCommands;exports.getInstallSaveDevSaveExactCommands=getInstallSaveDevSaveExactCommands;exports.getInstallSaveExactCommands=void 0;exports.getInstallSaveOptionalCommands=getInstallSaveOptionalCommands;exports.getInstallSaveOptionalSaveExactCommands=getInstallSaveOptionalSaveExactCommands;exports.getInstallSaveProdCommands=getInstallSaveProdCommands;exports.getInstallSaveProdSaveExactCommands=getInstallSaveProdSaveExactCommands;exports.installSaveBundle=installSaveBundle;exports.installSaveBundleSaveExact=installSaveBundleSaveExact;exports.installSaveDev=installSaveDev;exports.installSaveDevSaveExact=installSaveDevSaveExact;exports.installSaveOptional=installSaveOptional;exports.installSaveOptionalSaveExact=installSaveOptionalSaveExact;exports.installSaveProd=installSaveProd;exports.installSaveProdSaveExact=installSaveProdSaveExact;var _debug=_interopRequireDefault(require("debug"));var _os=require("os");var _child_process=require("child_process");var _common=require("./common");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}const log=(0,_debug.default)('@modernpoacher/deps');log(`\`deps\` (${_os.platform}) is awake`);const getInstallSaveExactCommands=(p,r,f)=>{log('getInstallSaveExactCommands');const
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.executeBundle=executeBundle;exports.executeDev=executeDev;exports.executeOptional=executeOptional;exports.executeProd=executeProd;exports.getInstallCommands=void 0;exports.getInstallSaveBundleCommands=getInstallSaveBundleCommands;exports.getInstallSaveBundleSaveExactCommands=getInstallSaveBundleSaveExactCommands;exports.getInstallSaveDevCommands=getInstallSaveDevCommands;exports.getInstallSaveDevSaveExactCommands=getInstallSaveDevSaveExactCommands;exports.getInstallSaveExactCommands=void 0;exports.getInstallSaveOptionalCommands=getInstallSaveOptionalCommands;exports.getInstallSaveOptionalSaveExactCommands=getInstallSaveOptionalSaveExactCommands;exports.getInstallSaveProdCommands=getInstallSaveProdCommands;exports.getInstallSaveProdSaveExactCommands=getInstallSaveProdSaveExactCommands;exports.installSaveBundle=installSaveBundle;exports.installSaveBundleSaveExact=installSaveBundleSaveExact;exports.installSaveDev=installSaveDev;exports.installSaveDevSaveExact=installSaveDevSaveExact;exports.installSaveOptional=installSaveOptional;exports.installSaveOptionalSaveExact=installSaveOptionalSaveExact;exports.installSaveProd=installSaveProd;exports.installSaveProdSaveExact=installSaveProdSaveExact;var _debug=_interopRequireDefault(require("debug"));var _os=require("os");var _child_process=require("child_process");var _common=require("./common");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}const log=(0,_debug.default)('@modernpoacher/deps');log(`\`deps\` (${_os.platform}) is awake`);const getInstallSaveExactCommands=(p,r,f)=>{log('getInstallSaveExactCommands');const c=(0,_common.transform)(p);log(c);const commands=`npm i ${c}`;return(0,_common.normalise)((0,_common.getRegistryParameter)(r,(0,_common.getForceParameter)(f,(0,_common.getSaveExactParameter)(commands))));};exports.getInstallSaveExactCommands=getInstallSaveExactCommands;const getInstallCommands=(p,r,f)=>{log('getInstallCommands');const c=(0,_common.transform)(p);log(c);const commands=`npm i ${c}`;return(0,_common.normalise)((0,_common.getRegistryParameter)(r,(0,_common.getForceParameter)(f,commands)));};exports.getInstallCommands=getInstallCommands;function getInstallSaveBundleSaveExactCommands(p,r,f){log('getInstallSaveBundleSaveExactCommands');const commands=getInstallSaveExactCommands(p,r,f);return(0,_common.normalise)((0,_common.getSaveBundleParameter)(commands));}function getInstallSaveBundleCommands(p,r,f){log('getInstallSaveBundleCommands');const commands=getInstallCommands(p,r,f);return(0,_common.normalise)((0,_common.getSaveBundleParameter)(commands));}function getInstallSaveOptionalSaveExactCommands(p,r,f){log('getInstallSaveOptionalSaveExactCommands');const commands=getInstallSaveExactCommands(p,r,f);return(0,_common.normalise)((0,_common.getSaveOptionalParameter)(commands));}function getInstallSaveOptionalCommands(p,r,f){log('getInstallSaveOptionalCommands');const commands=getInstallCommands(p,r,f);return(0,_common.normalise)((0,_common.getSaveOptionalParameter)(commands));}function getInstallSaveDevSaveExactCommands(p,r,f){log('getInstallSaveDevSaveExactCommands');const commands=getInstallSaveExactCommands(p,r,f);return(0,_common.normalise)((0,_common.getSaveDevParameter)(commands));}function getInstallSaveDevCommands(p,r,f){log('getInstallSaveDevCommands');const commands=getInstallCommands(p,r,f);return(0,_common.normalise)((0,_common.getSaveDevParameter)(commands));}function getInstallSaveProdSaveExactCommands(p,r,f){log('getInstallSaveProdSaveExactCommands');const commands=getInstallSaveExactCommands(p,r,f);return(0,_common.normalise)((0,_common.getSaveProdParameter)(commands));}function getInstallSaveProdCommands(p,r,f){log('getInstallSaveProdCommands');const commands=getInstallCommands(p,r,f);return(0,_common.normalise)((0,_common.getSaveProdParameter)(commands));}function installSaveBundleSaveExact(d,p,r,f){log('installSaveBundleSaveExact');return new Promise((resolve,reject)=>{const commands=(0,_common.getCommands)(d,getInstallSaveBundleSaveExactCommands(p,r,f));(0,_child_process.spawn)('/bin/bash',['-c',commands],{shell:true,stdio:'inherit'},e=>!e?resolve():reject(e)).on('close',resolve).on('error',reject);});}function installSaveBundle(d,p,r,f){log('installSaveBundle');return new Promise((resolve,reject)=>{const commands=(0,_common.getCommands)(d,getInstallSaveBundleCommands(p,r,f));(0,_child_process.spawn)('/bin/bash',['-c',commands],{shell:true,stdio:'inherit'},e=>!e?resolve():reject(e)).on('close',resolve).on('error',reject);});}function installSaveOptionalSaveExact(d,p,r,f){log('installSaveOptionalSaveExact');return new Promise((resolve,reject)=>{const commands=(0,_common.getCommands)(d,getInstallSaveOptionalSaveExactCommands(p,r,f));(0,_child_process.spawn)('/bin/bash',['-c',commands],{shell:true,stdio:'inherit'},e=>!e?resolve():reject(e)).on('close',resolve).on('error',reject);});}function installSaveOptional(d,p,r,f){log('installSaveOptional');return new Promise((resolve,reject)=>{const commands=(0,_common.getCommands)(d,getInstallSaveOptionalCommands(p,r,f));(0,_child_process.spawn)('/bin/bash',['-c',commands],{shell:true,stdio:'inherit'},e=>!e?resolve():reject(e)).on('close',resolve).on('error',reject);});}function installSaveDevSaveExact(d,p,r,f){log('installSaveDevSaveExact');return new Promise((resolve,reject)=>{const commands=(0,_common.getCommands)(d,getInstallSaveDevSaveExactCommands(p,r,f));(0,_child_process.spawn)('/bin/bash',['-c',commands],{shell:true,stdio:'inherit'},e=>!e?resolve():reject(e)).on('close',resolve).on('error',reject);});}function installSaveDev(d,p,r,f){log('installSaveDev');return new Promise((resolve,reject)=>{const commands=(0,_common.getCommands)(d,getInstallSaveDevCommands(p,r,f));(0,_child_process.spawn)('/bin/bash',['-c',commands],{shell:true,stdio:'inherit'},e=>!e?resolve():reject(e)).on('close',resolve).on('error',reject);});}function installSaveProdSaveExact(d,p,r,f){log('installSaveProdSaveExact');return new Promise((resolve,reject)=>{const commands=(0,_common.getCommands)(d,getInstallSaveProdSaveExactCommands(p,r,f));(0,_child_process.spawn)('/bin/bash',['-c',commands],{shell:true,stdio:'inherit'},e=>!e?resolve():reject(e)).on('close',resolve).on('error',reject);});}function installSaveProd(d,p,r,f){log('installSaveProd');return new Promise((resolve,reject)=>{const commands=(0,_common.getCommands)(d,getInstallSaveProdCommands(p,r,f));(0,_child_process.spawn)('/bin/bash',['-c',commands],{shell:true,stdio:'inherit'},e=>!e?resolve():reject(e)).on('close',resolve).on('error',reject);});}async function executeBundle(directory=_common.DIRECTORY,packages={},configuration={},registry=_common.REGISTRY,force=false){log('executeBundle');const depsExact=(0,_common.getDepsExact)(packages,configuration);if(depsExact.length)await installSaveBundleSaveExact(directory,depsExact,registry,force);const deps=(0,_common.getDeps)(packages);if(deps.length)await installSaveBundle(directory,deps,registry,force);}async function executeOptional(directory=_common.DIRECTORY,packages={},configuration={},registry=_common.REGISTRY,force=false){log('executeOptional');const depsExact=(0,_common.getDepsExact)(packages,configuration);if(depsExact.length)await installSaveOptionalSaveExact(directory,depsExact,registry);const deps=(0,_common.getDeps)(packages);if(deps.length)await installSaveOptional(directory,deps,registry);}async function executeDev(directory=_common.DIRECTORY,packages={},configuration={},registry=_common.REGISTRY,force=false){log('executeDev');const depsExact=(0,_common.getDepsExact)(packages,configuration);if(depsExact.length)await installSaveDevSaveExact(directory,depsExact,registry,force);const deps=(0,_common.getDeps)(packages);if(deps.length)await installSaveDev(directory,deps,registry,force);}async function executeProd(directory=_common.DIRECTORY,packages={},configuration={},registry=_common.REGISTRY,force=false){log('executeProd');const depsExact=(0,_common.getDepsExact)(packages,configuration);if(depsExact.length)await installSaveProdSaveExact(directory,depsExact,registry,force);const deps=(0,_common.getDeps)(packages);if(deps.length)await installSaveProd(directory,deps,registry,force);}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@modernpoacher/deps",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.18",
|
|
4
4
|
"description": "Update NPM package dependencies from the command line",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"deps",
|
|
@@ -50,30 +50,30 @@
|
|
|
50
50
|
"deps-head": "bin/head.sh"
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
|
-
"commander": "^
|
|
54
|
-
"debug": "^4.3.
|
|
55
|
-
"glob-all": "^3.
|
|
53
|
+
"commander": "^9.1.0",
|
|
54
|
+
"debug": "^4.3.4",
|
|
55
|
+
"glob-all": "^3.3.0",
|
|
56
56
|
"module-alias": "^2.2.2",
|
|
57
57
|
"supports-color": "^9.2.1"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
|
-
"@babel/cli": "^7.
|
|
61
|
-
"@babel/core": "^7.
|
|
62
|
-
"@babel/eslint-parser": "^7.
|
|
63
|
-
"@babel/preset-env": "^7.16.
|
|
64
|
-
"@babel/register": "^7.
|
|
60
|
+
"@babel/cli": "^7.17.6",
|
|
61
|
+
"@babel/core": "^7.17.8",
|
|
62
|
+
"@babel/eslint-parser": "^7.17.0",
|
|
63
|
+
"@babel/preset-env": "^7.16.11",
|
|
64
|
+
"@babel/register": "^7.17.7",
|
|
65
65
|
"babel-plugin-module-resolver": "^4.1.0",
|
|
66
|
-
"chai": "^4.3.
|
|
67
|
-
"core-js": "^3.
|
|
66
|
+
"chai": "^4.3.6",
|
|
67
|
+
"core-js": "^3.21.1",
|
|
68
68
|
"cross-env": "^7.0.3",
|
|
69
69
|
"eslint": "7.32.0",
|
|
70
70
|
"eslint-config-standard": "^16.0.3",
|
|
71
71
|
"eslint-import-resolver-babel-module": "^5.3.1",
|
|
72
|
-
"eslint-plugin-import": "^2.25.
|
|
72
|
+
"eslint-plugin-import": "^2.25.4",
|
|
73
73
|
"eslint-plugin-node": "^11.1.0",
|
|
74
|
-
"eslint-plugin-promise": "
|
|
74
|
+
"eslint-plugin-promise": "5.2.0",
|
|
75
75
|
"husky": "^7.0.4",
|
|
76
|
-
"mocha": "^9.
|
|
76
|
+
"mocha": "^9.2.2",
|
|
77
77
|
"rimraf": "^3.0.2"
|
|
78
78
|
},
|
|
79
79
|
"_moduleAliases": {
|
package/src/index.js
CHANGED
|
@@ -43,7 +43,11 @@ log(`\`deps\` (${platform}) is awake`)
|
|
|
43
43
|
export const getInstallSaveExactCommands = (p, r, f) => {
|
|
44
44
|
log('getInstallSaveExactCommands')
|
|
45
45
|
|
|
46
|
-
const
|
|
46
|
+
const c = transform(p)
|
|
47
|
+
|
|
48
|
+
log(c)
|
|
49
|
+
|
|
50
|
+
const commands = `npm i ${c}`
|
|
47
51
|
|
|
48
52
|
return normalise(
|
|
49
53
|
getRegistryParameter(r, getForceParameter(f, getSaveExactParameter(commands)))
|
|
@@ -64,7 +68,11 @@ export const getInstallSaveExactCommands = (p, r, f) => {
|
|
|
64
68
|
export const getInstallCommands = (p, r, f) => {
|
|
65
69
|
log('getInstallCommands')
|
|
66
70
|
|
|
67
|
-
const
|
|
71
|
+
const c = transform(p)
|
|
72
|
+
|
|
73
|
+
log(c)
|
|
74
|
+
|
|
75
|
+
const commands = `npm i ${c}`
|
|
68
76
|
|
|
69
77
|
return normalise(
|
|
70
78
|
getRegistryParameter(r, getForceParameter(f, commands))
|