@modernpoacher/deps 2.2.42 → 2.2.44
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/bin/common/index.mjs
CHANGED
|
@@ -49,6 +49,7 @@ import {
|
|
|
49
49
|
import {
|
|
50
50
|
formatDirectory,
|
|
51
51
|
use,
|
|
52
|
+
trim,
|
|
52
53
|
tidy
|
|
53
54
|
} from '#deps/src/common/format'
|
|
54
55
|
|
|
@@ -82,20 +83,20 @@ const MESSAGE = 'Either no error message has been defined or no error has been s
|
|
|
82
83
|
const SP = String.fromCodePoint(32)
|
|
83
84
|
|
|
84
85
|
const getRmrfCommands = PLATFORM === 'win32'
|
|
85
|
-
? () => tidy(`
|
|
86
|
+
? () => trim(tidy(`
|
|
86
87
|
rmdir /s /q node_modules 2> nul & del package-lock.json 2> nul
|
|
87
|
-
`)
|
|
88
|
-
: () => tidy(`
|
|
88
|
+
`))
|
|
89
|
+
: () => trim(tidy(`
|
|
89
90
|
rm -rf node_modules package-lock.json
|
|
90
|
-
`)
|
|
91
|
+
`))
|
|
91
92
|
|
|
92
93
|
const getNpmiCommands = PLATFORM === 'win32'
|
|
93
|
-
? (registry = REGISTRY, force = false) => tidy(getRegistryParameter(registry, getForceParameter(force, 'npm i')))
|
|
94
|
-
: (registry = REGISTRY, force = false) => tidy(getExportPath(getNvm(getRegistryParameter(registry, getForceParameter(force, 'npm i')))))
|
|
94
|
+
? (registry = REGISTRY, force = false) => trim(tidy(getRegistryParameter(registry, getForceParameter(force, 'npm i'))))
|
|
95
|
+
: (registry = REGISTRY, force = false) => trim(tidy(getExportPath(getNvm(getRegistryParameter(registry, getForceParameter(force, 'npm i'))))))
|
|
95
96
|
|
|
96
97
|
const getDepsCommands = PLATFORM === 'win32'
|
|
97
|
-
? (registry = REGISTRY, force = false) => tidy(getRegistryParameter(registry, getForceParameter(force, 'deps')))
|
|
98
|
-
: (registry = REGISTRY, force = false) => tidy(getExportPath(getNvm(getRegistryParameter(registry, getForceParameter(force, 'deps')))))
|
|
98
|
+
? (registry = REGISTRY, force = false) => trim(tidy(getRegistryParameter(registry, getForceParameter(force, 'deps'))))
|
|
99
|
+
: (registry = REGISTRY, force = false) => trim(tidy(getExportPath(getNvm(getRegistryParameter(registry, getForceParameter(force, 'deps'))))))
|
|
99
100
|
|
|
100
101
|
export const DEPS = PLATFORM === 'win32'
|
|
101
102
|
? `bash "${join(BIN, '.\\bash\\deps.sh')}"`
|
package/package.json
CHANGED
|
@@ -57,7 +57,7 @@ export function trimEnd (v) {
|
|
|
57
57
|
* @returns {string}
|
|
58
58
|
*/
|
|
59
59
|
export function tidy (v) {
|
|
60
|
-
return v.replace(/\n{2,}}/gm, LF)
|
|
60
|
+
return v.replace(/\n{2,}}/gm, LF)
|
|
61
61
|
}
|
|
62
62
|
|
|
63
63
|
/**
|
|
@@ -80,7 +80,7 @@ export function use (key) {
|
|
|
80
80
|
* @returns {void}
|
|
81
81
|
*/
|
|
82
82
|
function write (v) {
|
|
83
|
-
log(v.trimEnd())
|
|
83
|
+
if (v.trim()) log(v.trimEnd())
|
|
84
84
|
}
|
|
85
85
|
|
|
86
86
|
/**
|
package/src/common/index.mjs
CHANGED
|
@@ -19,6 +19,7 @@ import {
|
|
|
19
19
|
|
|
20
20
|
import {
|
|
21
21
|
formatAuthor,
|
|
22
|
+
trim,
|
|
22
23
|
tidy
|
|
23
24
|
} from '#deps/src/common/format'
|
|
24
25
|
|
|
@@ -163,8 +164,8 @@ ${commands}
|
|
|
163
164
|
* @returns {string}
|
|
164
165
|
*/
|
|
165
166
|
export const getCommands = PLATFORM === 'win32'
|
|
166
|
-
? (commands = 'npm i') => tidy(commands)
|
|
167
|
-
: (commands = 'npm i') => tidy(getExportPath(getNvm(commands)))
|
|
167
|
+
? (commands = 'npm i') => trim(tidy(commands))
|
|
168
|
+
: (commands = 'npm i') => trim(tidy(getExportPath(getNvm(commands))))
|
|
168
169
|
|
|
169
170
|
/**
|
|
170
171
|
* @function getProdDependencies
|