@rpcbase/cli 0.17.0 → 0.19.0
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/package.json
CHANGED
package/src/update/index.js
CHANGED
|
@@ -11,8 +11,10 @@ const get_package_files = () => {
|
|
|
11
11
|
const working_dir = process.cwd()
|
|
12
12
|
const out = execSync(`find . -name "package.json" -not -path ".*/node_modules/*"`)
|
|
13
13
|
// TODO: sort files
|
|
14
|
-
const
|
|
15
|
-
|
|
14
|
+
const find_output = out.toString().trim().split("\n")
|
|
15
|
+
|
|
16
|
+
const files = find_output.map((f) => path.join(working_dir, f))
|
|
17
|
+
|
|
16
18
|
return files
|
|
17
19
|
}
|
|
18
20
|
|
|
@@ -26,6 +26,10 @@ const get_root_dir = (run_configs) => {
|
|
|
26
26
|
const verify_project = async(run_configs) => {
|
|
27
27
|
let result_errors = []
|
|
28
28
|
|
|
29
|
+
console.log("WARNING VERIFY_PROJECT IS BROKEN, SKIPPING FOR NOW")
|
|
30
|
+
return result_errors
|
|
31
|
+
|
|
32
|
+
|
|
29
33
|
const project_root_dir = get_root_dir(run_configs)
|
|
30
34
|
|
|
31
35
|
// check if all installed packages match semver in package json file
|
|
@@ -10,8 +10,17 @@ const exec = util.promisify(require("child_process").exec)
|
|
|
10
10
|
const LIST_CMD = "npm ls --depth=0 --json || true"
|
|
11
11
|
|
|
12
12
|
const get_installed_pkgs = async(wd) => {
|
|
13
|
-
const {stdout: npm_out} = await exec(LIST_CMD, {cwd: wd})
|
|
14
|
-
|
|
13
|
+
const {stdout: npm_out, stderr} = await exec(LIST_CMD, {cwd: wd})
|
|
14
|
+
|
|
15
|
+
let npm_json
|
|
16
|
+
try {
|
|
17
|
+
npm_json = JSON.parse(npm_out)
|
|
18
|
+
} catch (err) {
|
|
19
|
+
console.log("failed to parse npm_json:")
|
|
20
|
+
console.log(npm_json)
|
|
21
|
+
console.log("STDERR:", stderr)
|
|
22
|
+
throw err
|
|
23
|
+
}
|
|
15
24
|
const deps = npm_json.dependencies || {}
|
|
16
25
|
|
|
17
26
|
const result = {}
|