Skip to content

Commit 7feb489

Browse files
committed
refactor(builders): use shared NODE_VERSION from bootstrap package
Update smol and SEA builders to import NODE_VERSION from bootstrap package: Changes: - node-smol-builder: Import NODE_VERSION from @socketsecurity/bootstrap - node-sea-builder: Import NODE_VERSION with env var fallback - Both builders now use workspace dependency on bootstrap package - Removed hardcoded version constants from build scripts Benefits: - Single source of truth for Node.js version across all packages - No more manual version synchronization needed - Version changes only need to happen in one place - Leverages pnpm workspace protocol for clean dependency management The NODE_VERSION constant is now centrally managed in: packages/bootstrap/.config/node-version.mjs
1 parent d7e6e81 commit 7feb489

File tree

5 files changed

+17
-3
lines changed

5 files changed

+17
-3
lines changed

packages/node-sea-builder/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"dependencies": {
3+
"@socketsecurity/bootstrap": "workspace:*",
34
"@socketsecurity/build-infra": "workspace:*"
45
},
56
"description": "Native Node.js SEA binary builder (fallback)",

packages/node-sea-builder/scripts/constants.mjs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,15 @@
33
* Environment variables can override defaults.
44
*/
55

6-
// Environment variables.
6+
import { NODE_VERSION } from '@socketsecurity/bootstrap/.config/node-version.mjs'
7+
8+
// Environment variables (can override defaults).
79
const ENV = {
8-
SOCKET_CLI_SEA_NODE_VERSION: process.env.SOCKET_CLI_SEA_NODE_VERSION,
10+
SOCKET_CLI_SEA_NODE_VERSION: process.env.SOCKET_CLI_SEA_NODE_VERSION || NODE_VERSION,
911
SOCKET_NODE_DOWNLOAD_URL: process.env.SOCKET_NODE_DOWNLOAD_URL,
1012
}
1113

1214
export default {
1315
ENV,
16+
NODE_VERSION,
1417
}

packages/node-smol-builder/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"dependencies": {
3+
"@socketsecurity/bootstrap": "workspace:*",
34
"@socketsecurity/build-infra": "workspace:*",
45
"@socketsecurity/lib": "catalog:"
56
},

packages/node-smol-builder/scripts/build.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ import { whichBinSync } from '@socketsecurity/lib/bin'
6666
import { WIN32 } from '@socketsecurity/lib/constants/platform'
6767
import { logger } from '@socketsecurity/lib/logger'
6868
import { spawn } from '@socketsecurity/lib/spawn'
69+
import { NODE_VERSION } from '@socketsecurity/bootstrap/.config/node-version.mjs'
6970
import colors from 'yoctocolors-cjs'
7071

7172
import {
@@ -170,7 +171,6 @@ const RUN_FULL_TESTS = !!values['test-full'] || !!values.testFull
170171
const AUTO_YES = !!values.yes
171172

172173
// Configuration
173-
const NODE_VERSION = 'v24.10.0'
174174
const ROOT_DIR = join(__dirname, '..')
175175
const NODE_SOURCE_DIR = join(ROOT_DIR, 'build', 'node-source')
176176
const NODE_DIR = NODE_SOURCE_DIR // Alias for compatibility.

pnpm-lock.yaml

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)