@zuplo/cli 2.4.0 → 3.0.1

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/.tool-versions CHANGED
@@ -1 +1 @@
1
- nodejs 18.20.4
1
+ nodejs 20.17.0
package/README.md CHANGED
@@ -67,6 +67,12 @@ Commands:
67
67
 
68
68
  # Changelog
69
69
 
70
+ ## v3
71
+
72
+ - Version 3 requires Node.js 20. Critical bug fixes will be provided for v2
73
+ (using Node.js 18) until September 30, 2024. We encourage you to upgrade to v3
74
+ as soon as possible.
75
+
70
76
  ## v2
71
77
 
72
78
  - Removes the use of Deno's test runner. We now use the built-in test runner in
package/dist/cli.js CHANGED
@@ -1,5 +1,5 @@
1
1
 
2
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="56d3c48c-3960-5c1d-adbd-d0a76d0ac940")}catch(e){}}();
2
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="5bed4802-7e5a-5ed5-8398-99b134255b05")}catch(e){}}();
3
3
  import * as dotenv from "dotenv";
4
4
  dotenv.config();
5
5
  import * as Sentry from "@sentry/node";
@@ -24,9 +24,10 @@ import variable from "./cmds/variable/index.js";
24
24
  import { shutdownAnalytics } from "./common/analytics/lib.js";
25
25
  import { MAX_WAIT_PENDING_TIME_MS, SENTRY_DSN } from "./common/constants.js";
26
26
  import { logger } from "./common/logger.js";
27
- import { warnIfOutdatedVersion } from "./common/outdated.js";
27
+ import { warnIfOutdatedVersion, warnNodeVersion } from "./common/outdated.js";
28
28
  import { printCriticalFailureToConsoleAndExit } from "./common/output.js";
29
29
  const MIN_NODE_VERSION = "18.0.0";
30
+ const RECOMMENDED_NODE_VERSION = "20.0.0";
30
31
  if (gte(process.versions.node, MIN_NODE_VERSION)) {
31
32
  let packageJson;
32
33
  try {
@@ -36,6 +37,7 @@ if (gte(process.versions.node, MIN_NODE_VERSION)) {
36
37
  logger.error(e);
37
38
  await printCriticalFailureToConsoleAndExit(`Unable to load @zuplo/cli. The package.json is missing or malformed.`);
38
39
  }
40
+ warnNodeVersion(packageJson?.version, RECOMMENDED_NODE_VERSION);
39
41
  Sentry.init({
40
42
  dsn: SENTRY_DSN,
41
43
  release: packageJson?.version,
@@ -90,4 +92,4 @@ else {
90
92
  Consider using a Node.js version manager such as https://github.com/nvm-sh/nvm.`);
91
93
  }
92
94
  //# sourceMappingURL=cli.js.map
93
- //# debugId=56d3c48c-3960-5c1d-adbd-d0a76d0ac940
95
+ //# debugId=5bed4802-7e5a-5ed5-8398-99b134255b05
@@ -1,14 +1,22 @@
1
1
 
2
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="f9015546-77f3-5e6e-9d05-4742665613e8")}catch(e){}}();
2
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="cd2ee7a4-a15a-5f1c-9e4f-fdfb14857c05")}catch(e){}}();
3
3
  import chalk from "chalk";
4
4
  import { existsSync, mkdirSync } from "node:fs";
5
5
  import { readFile, writeFile } from "node:fs/promises";
6
6
  import { join } from "node:path";
7
- import { gt } from "semver";
7
+ import { gt, inc, lt } from "semver";
8
8
  import { ZUPLO_VERSION_CHECK_FILE } from "./constants.js";
9
9
  import { printWarningToConsole } from "./output.js";
10
10
  import box from "./utils/box.js";
11
11
  import { ZUPLO_XDG_STATE_HOME } from "./xdg/lib.js";
12
+ export async function warnNodeVersion(currentCliVersion, desiredNodeVersion) {
13
+ const currentNodeVersion = process.versions.node;
14
+ if (lt(currentNodeVersion, desiredNodeVersion)) {
15
+ const nextMajorCliVersion = inc(currentCliVersion, "major");
16
+ printWarningToConsole(box(`You are using Node.js ${currentNodeVersion}. The recommended version for the @zuplo/cli is ${desiredNodeVersion} or greater.
17
+ Some features might not work as expected. Please update your Node.js version as soon as possible.`));
18
+ }
19
+ }
12
20
  export async function warnIfOutdatedVersion(currentVersion) {
13
21
  if (!process.env.ZUPLO_OVERRIDE_CI_TO_TEST &&
14
22
  (process.env.CI || process.env.ZUPLO_DISABLE_UPDATE_CHECK)) {
@@ -67,4 +75,4 @@ async function getVersionCheckInfo() {
67
75
  return versionCheckInfo;
68
76
  }
69
77
  //# sourceMappingURL=outdated.js.map
70
- //# debugId=f9015546-77f3-5e6e-9d05-4742665613e8
78
+ //# debugId=cd2ee7a4-a15a-5f1c-9e4f-fdfb14857c05
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zuplo/cli",
3
- "version": "2.4.0",
3
+ "version": "3.0.1",
4
4
  "type": "module",
5
5
  "repository": "https://github.com/zuplo/cli",
6
6
  "description": "The command-line interface for Zuplo",
@@ -16,7 +16,7 @@
16
16
  "test:ci": "find dist -name \"*.test.js\" | xargs node --test"
17
17
  },
18
18
  "engines": {
19
- "node": ">=18.0.0"
19
+ "node": ">=20.0.0"
20
20
  },
21
21
  "bin": {
22
22
  "zup": "zup.js"
@@ -60,9 +60,9 @@
60
60
  "@opentelemetry/api": "^1.8.0",
61
61
  "@sentry/node": "7.69.0",
62
62
  "@swc/core": "1.3.78",
63
- "@zuplo/core": "5.2458.0",
63
+ "@zuplo/core": "5.2491.0",
64
64
  "@zuplo/pino-pretty-configurations": "^1.5.0",
65
- "@zuplo/runtime": "5.2458.0",
65
+ "@zuplo/runtime": "5.2491.0",
66
66
  "chalk": "^5.1.2",
67
67
  "chokidar": "^3.5.3",
68
68
  "dotenv": "^16.3.1",
@@ -76,18 +76,18 @@
76
76
  "jose": "^4.14.4",
77
77
  "js-yaml": "^4.1.0",
78
78
  "jsonc-parser": "3.2.0",
79
- "minimatch": "^9.0.3",
80
- "open": "^9.1.0",
79
+ "minimatch": "^10.0.1",
80
+ "open": "^10.1.0",
81
81
  "pino": "^9.3.2",
82
82
  "pino-pretty": "^11.2.2",
83
83
  "posthog-node": "4.0.1",
84
84
  "prettier": "^3.3.3",
85
- "rimraf": "^5.0.10",
85
+ "rimraf": "^6.0.1",
86
86
  "semver": "^7.5.2",
87
87
  "simple-git": "^3.17.0",
88
88
  "strip-ansi": "^7.1.0",
89
89
  "tar": "^7.4.3",
90
- "uuid": "^9.0.1",
90
+ "uuid": "^10.0.0",
91
91
  "workerd": "1.20240725.0",
92
92
  "yargs": "^17.7.1"
93
93
  }