@rpcbase/cli 0.14.0 → 0.17.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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rpcbase/cli",
3
- "version": "0.14.0",
3
+ "version": "0.17.0",
4
4
  "license": "SSPL-1.0",
5
5
  "bin": {
6
6
  "rb": "./bin.js"
@@ -10,6 +10,7 @@ const exec = util.promisify(require("child_process").exec)
10
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
+ // TODO: sort files
13
14
  const files = out.toString().trim().split("\n")
14
15
  .map((f) => path.join(working_dir, f))
15
16
  return files
@@ -20,10 +21,20 @@ const get_outdated = async(dir) => {
20
21
  const output = execSync("npm outdated --json || true", {cwd: dir})
21
22
  const outdated = JSON.parse(output.toString())
22
23
 
23
- // WARNING: we only filter rpcbase deps for now
24
24
  const target_deps = {}
25
+
25
26
  Object.keys(outdated)
27
+ // get our rpcbase packages only
26
28
  .filter((name) => name.startsWith("@rpcbase"))
29
+ // skip if package is linked but already at latest version
30
+ .filter((name) => {
31
+ const version_data = outdated[name]
32
+ if (version_data.wanted === version_data.latest &&
33
+ version_data.current === "linked") {
34
+ return false
35
+ }
36
+ return true
37
+ })
27
38
  .forEach((key) => {
28
39
  target_deps[key] = outdated[key].latest
29
40
  })