Skip to content

Commit f183fc4

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

535 files changed

Lines changed: 38197 additions & 3645 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 & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,20 @@ 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'
16-
1712
import constants from '../scripts/constants.js'
1813
import socketModifyPlugin from '../scripts/rollup/socket-modify-plugin.js'
1914
import {
2015
getPackageName,
2116
isBuiltin,
2217
normalizeId,
2318
} from '../scripts/utils/packages.js'
19+
import {
20+
escapeRegExp,
21+
readPackageJsonSync,
22+
spawnSync,
23+
stripAnsi,
24+
} from '../scripts/utils/registry-helpers.js'
25+
import { includedModulesInventoryPlugin } from '../src/sea/rollup-provenance.mjs'
2426

2527
const {
2628
INLINED_SOCKET_CLI_CYCLONEDX_CDXGEN_VERSION,
@@ -38,11 +40,7 @@ const {
3840
VITEST,
3941
} = constants
4042

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

4745
const builtinAliases = builtinModules.reduce((o, n) => {
4846
if (!n.startsWith('node:')) {
@@ -289,6 +287,15 @@ export default function baseConfig(extendConfig = {}) {
289287
},
290288
}),
291289
...extendPlugins,
290+
...(process.env.SOCKET_SEA_BUILD === 'true'
291+
? [
292+
includedModulesInventoryPlugin({
293+
root: rootPath,
294+
inventoryFile: 'THIRD-PARTY-NOTICES.json',
295+
bundleId: 'core-rollup',
296+
}),
297+
]
298+
: []),
292299
],
293300
}
294301
}

0 commit comments

Comments
 (0)