@rpcbase/cli 0.64.0 → 0.65.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/bin.js CHANGED
@@ -65,9 +65,14 @@ yargs(hideBin(process.argv))
65
65
  default: false,
66
66
  description: "Print output without writing any files"
67
67
  })
68
+ .option("all", {
69
+ type: "boolean",
70
+ default: false,
71
+ description: "Doesn't filter @rpcbase/ dependencies, updates everything"
72
+ })
68
73
  }, async(argv) => {
69
74
  if (argv.version) return print_versions()
70
- await update()
75
+ await update(argv)
71
76
  })
72
77
  // Increment pkg
73
78
  .command(["increment-pkg <files...>"], "Bump a package version if necessary by checking its source on github", (yargs) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rpcbase/cli",
3
- "version": "0.64.0",
3
+ "version": "0.65.0",
4
4
  "license": "SSPL-1.0",
5
5
  "bin": {
6
6
  "rb": "./bin.js"
@@ -18,7 +18,8 @@ const get_package_files = () => {
18
18
  return files
19
19
  }
20
20
 
21
- const get_outdated = async(dir) => {
21
+
22
+ const get_outdated = async({dir, all}) => {
22
23
 
23
24
  const output = execSync("npm outdated --json || true", {cwd: dir})
24
25
  const outdated = JSON.parse(output.toString())
@@ -27,7 +28,7 @@ const get_outdated = async(dir) => {
27
28
 
28
29
  Object.keys(outdated)
29
30
  // get our rpcbase packages only
30
- .filter((name) => name.startsWith("@rpcbase"))
31
+ .filter((name) => all ? true : name.startsWith("@rpcbase"))
31
32
  // skip if package is linked but already at latest version
32
33
  .filter((name) => {
33
34
  const version_data = outdated[name]
@@ -45,7 +46,7 @@ const get_outdated = async(dir) => {
45
46
  }
46
47
 
47
48
 
48
- const update = async() => {
49
+ const update = async(args) => {
49
50
  const working_dir = process.cwd()
50
51
 
51
52
  const package_files = get_package_files()
@@ -56,7 +57,7 @@ const update = async() => {
56
57
 
57
58
  console.log("updating", path.relative(working_dir, dir) || ".")
58
59
 
59
- const outdated = await get_outdated(dir)
60
+ const outdated = await get_outdated({dir, all: args.all})
60
61
 
61
62
  const package_json = JSON.parse(fs.readFileSync(package_file, "utf8"))
62
63