Skip to content

Commit 1e5a252

Browse files
committed
feat: build Socket 2.1 prerelease as Node 27 SEA
1 parent 8fcc0f9 commit 1e5a252

374 files changed

Lines changed: 19203 additions & 2127 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.config/rollup.base.config.mjs‎

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,6 @@ import { nodeResolve } from '@rollup/plugin-node-resolve'
99
import replacePlugin from '@rollup/plugin-replace'
1010
import { purgePolyfills } from 'unplugin-purge-polyfills'
1111

12-
import { readPackageJsonSync } from '@socketsecurity/registry/lib/packages'
13-
import { escapeRegExp } from '@socketsecurity/registry/lib/regexps'
14-
import { spawnSync } from '@socketsecurity/registry/lib/spawn'
15-
import { stripAnsi } from '@socketsecurity/registry/lib/strings'
1612

1713
import constants from '../scripts/constants.js'
1814
import socketModifyPlugin from '../scripts/rollup/socket-modify-plugin.js'
@@ -21,6 +17,13 @@ import {
2117
isBuiltin,
2218
normalizeId,
2319
} from '../scripts/utils/packages.js'
20+
import {
21+
escapeRegExp,
22+
readPackageJsonSync,
23+
spawnSync,
24+
stripAnsi,
25+
} from '../scripts/utils/registry-helpers.js'
26+
import { includedModulesInventoryPlugin } from '../src/sea/rollup-provenance.mjs'
2427

2528
const {
2629
INLINED_SOCKET_CLI_CYCLONEDX_CDXGEN_VERSION,
@@ -38,11 +41,7 @@ const {
3841
VITEST,
3942
} = constants
4043

41-
export const EXTERNAL_PACKAGES = [
42-
'@socketsecurity/registry',
43-
'blessed',
44-
'blessed-contrib',
45-
]
44+
export const EXTERNAL_PACKAGES = ['blessed', 'blessed-contrib']
4645

4746
const builtinAliases = builtinModules.reduce((o, n) => {
4847
if (!n.startsWith('node:')) {
@@ -289,6 +288,15 @@ export default function baseConfig(extendConfig = {}) {
289288
},
290289
}),
291290
...extendPlugins,
291+
...(process.env.SOCKET_SEA_BUILD === 'true'
292+
? [
293+
includedModulesInventoryPlugin({
294+
root: rootPath,
295+
inventoryFile: 'THIRD-PARTY-NOTICES.json',
296+
bundleId: 'core-rollup',
297+
}),
298+
]
299+
: []),
292300
],
293301
}
294302
}

0 commit comments

Comments
 (0)