neon 8.11.2 → 8.11.4
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/dist/cli.js +1 -0
- package/dist/node_version.js +25 -0
- package/package.json +10 -10
package/dist/cli.js
CHANGED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { getCliName } from "./utils/cli_name.js";
|
|
2
|
+
//#region src/node_version.ts
|
|
3
|
+
/** Matches `engines.node` in package.json; npm only warns when it isn't met. */
|
|
4
|
+
const MIN_NODE_VERSION = [
|
|
5
|
+
20,
|
|
6
|
+
19,
|
|
7
|
+
0
|
|
8
|
+
];
|
|
9
|
+
/** The error to print for an unsupported Node.js version, or `undefined` when it is supported. */
|
|
10
|
+
function unsupportedNodeMessage(version, cliName) {
|
|
11
|
+
const parts = version.replace(/^v/, "").split(".").map(Number);
|
|
12
|
+
for (let i = 0; i < MIN_NODE_VERSION.length; i += 1) {
|
|
13
|
+
const actual = parts[i] ?? 0;
|
|
14
|
+
const required = MIN_NODE_VERSION[i];
|
|
15
|
+
if (actual > required) return void 0;
|
|
16
|
+
if (actual < required) return `${cliName} requires Node.js ${MIN_NODE_VERSION[0]}.${MIN_NODE_VERSION[1]} or newer (found ${version.replace(/^v/, "")}).`;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
const message = unsupportedNodeMessage(process.versions.node, getCliName());
|
|
20
|
+
if (message) {
|
|
21
|
+
process.stderr.write(`${message}\n`);
|
|
22
|
+
process.exit(1);
|
|
23
|
+
}
|
|
24
|
+
//#endregion
|
|
25
|
+
export { MIN_NODE_VERSION, unsupportedNodeMessage };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "neon",
|
|
3
|
-
"version": "8.11.
|
|
3
|
+
"version": "8.11.4",
|
|
4
4
|
"description": "CLI tool for Neon, the cloud backend primitives built around Lakebase Postgres",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"neon",
|
|
@@ -72,10 +72,10 @@
|
|
|
72
72
|
"yaml": "^2.9.0",
|
|
73
73
|
"yargs": "17.7.2",
|
|
74
74
|
"yoctocolors": "^2.1.2",
|
|
75
|
-
"@neon/config-runtime": "1.10.
|
|
76
|
-
"@neon/config": "1.9.
|
|
77
|
-
"@neon/
|
|
78
|
-
"@neon/
|
|
75
|
+
"@neon/config-runtime": "1.10.3",
|
|
76
|
+
"@neon/config": "1.9.4",
|
|
77
|
+
"@neon/sdk": "7.5.0",
|
|
78
|
+
"@neon/realtime": "0.1.2"
|
|
79
79
|
},
|
|
80
80
|
"optionalDependencies": {
|
|
81
81
|
"@napi-rs/keyring": "1.3.0",
|
|
@@ -98,7 +98,7 @@
|
|
|
98
98
|
"@types/which": "3.0.4",
|
|
99
99
|
"@types/yargs": "^17.0.35",
|
|
100
100
|
"@vitest/coverage-v8": "^3.0.9",
|
|
101
|
-
"@yao-pkg/pkg": "6.
|
|
101
|
+
"@yao-pkg/pkg": "6.23.0",
|
|
102
102
|
"emocks": "3.0.4",
|
|
103
103
|
"express": "4.19.2",
|
|
104
104
|
"hono": "^4.12.25",
|
|
@@ -111,11 +111,11 @@
|
|
|
111
111
|
"tsx": "4.22.3",
|
|
112
112
|
"typescript": "^5.9.0",
|
|
113
113
|
"vitest": "^3.0.9",
|
|
114
|
-
"@neon-internals/env-core": "0.0.
|
|
115
|
-
"@neon-internals/cli-core": "0.0.0",
|
|
116
|
-
"@neon/env": "1.6.4",
|
|
114
|
+
"@neon-internals/env-core": "0.0.35",
|
|
117
115
|
"@neon/functions": "0.11.0",
|
|
118
|
-
"@neon/
|
|
116
|
+
"@neon/env": "1.6.5",
|
|
117
|
+
"@neon/e2e-harness": "0.0.0",
|
|
118
|
+
"@neon-internals/cli-core": "0.0.0"
|
|
119
119
|
},
|
|
120
120
|
"publishConfig": {
|
|
121
121
|
"access": "public",
|