Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
584 commits
Select commit Hold shift + click to select a range
7a58fd8
Fix fetch-list-scans test mocking to use withSdk pattern
jdalton Oct 6, 2025
b8da054
Fix scan metadata and supported files test mocking to use withSdk pat…
jdalton Oct 6, 2025
95bef80
Fix fetch-purls-shallow-score test description string
jdalton Oct 6, 2025
07d593d
Fix import in fetch-diff-scan and fetch-scan tests
jdalton Oct 6, 2025
584f220
Fix fetch-view-repo test mocking to use withSdk pattern
jdalton Oct 6, 2025
7b88c27
Fix fetch-delete-org-full-scan test mocking to use withSdk pattern
jdalton Oct 6, 2025
0c6fe2b
Fix fetch-report-data test constants mock to use importOriginal
jdalton Oct 6, 2025
544a058
Add missing beforeEach import to fetch-report-data test
jdalton Oct 6, 2025
de9fa08
Simplify cdxgen command forwarding to remove complex validation
jdalton Oct 6, 2025
08ae7d7
Enable unknown flag forwarding for fix command
jdalton Oct 6, 2025
f21b54c
Add .custom-node-build to gitignore
jdalton Oct 6, 2025
784eb19
Fix output-view-repo test to use logger.success
jdalton Oct 6, 2025
8cac94e
Add .custom-node-build to lint ignore files
jdalton Oct 6, 2025
3e1ed58
Exclude test files from TypeScript compilation
jdalton Oct 6, 2025
a1dbb8d
Fix vitest command execution in test scripts
jdalton Oct 6, 2025
981c72c
fix: enterprise plan filter (#785)
ahmadnassri Oct 6, 2025
c721aab
Fix test failures: ESLint config, npm issueRules tests, and config ti…
jdalton Oct 6, 2025
8c81b47
Add TODO comments for remaining test failures
jdalton Oct 6, 2025
0c7a142
Add pkg-binaries to gitignore
jdalton Oct 6, 2025
9c1870c
Add @yao-pkg/pkg dependency for binary builds
jdalton Oct 6, 2025
2d15649
Add Windows shell support to run-command utility
jdalton Oct 6, 2025
f0b565c
Remove obsolete cdxgen flag validation tests
jdalton Oct 6, 2025
9fa11bd
Improve pnpm output scrubber to filter progress lines
jdalton Oct 6, 2025
9e1a8a6
Add pkg configuration and build scripts
jdalton Oct 6, 2025
d47e59f
Update snapshot
jdalton Oct 6, 2025
ef03a46
Enable provenance workflow
jdalton Oct 6, 2025
0872098
Inline getApiBaseUrlFromConfig in to constants.mts
jdalton Oct 6, 2025
8e706ba
Fix repo/repos/repositories aliases to point to repository command
jdalton Oct 6, 2025
629cf44
Add test for repo alias
jdalton Oct 6, 2025
167e558
fix: resolve circular dependency in constants initialization
jdalton Oct 6, 2025
d4b0712
fix: standardize dry-run validation in organization policy license co…
jdalton Oct 6, 2025
f375d5b
build: use yoga-layout-prebuilt to avoid top-level await in CommonJS
jdalton Oct 7, 2025
35146ce
build: migrate from yoga-layout-prebuilt to yoga-layout 3.2.1 with sy…
jdalton Oct 7, 2025
2cd1aba
build: configure TypeScript JSX and vitest mocking for Ink components
jdalton Oct 7, 2025
3e17d88
feat: add centralized Ink and React imports wrapper
jdalton Oct 7, 2025
ffd0bab
refactor: update TSX components to use centralized Ink imports
jdalton Oct 7, 2025
2e2c5a7
test: update test snapshots and expectations for API changes
jdalton Oct 7, 2025
ad64708
use main().catch(console.error) pattern in all scripts
jdalton Oct 7, 2025
cc20963
optimize rollup external checks ordering
jdalton Oct 7, 2025
fd00215
use pnpm exec for tool commands in scripts
jdalton Oct 7, 2025
8f3d61b
build: add yoga-layout patch for synchronous WASM loading
jdalton Oct 7, 2025
10dd325
build: bundle external wrappers in rollup for pkg compatibility
jdalton Oct 7, 2025
e4d4323
feat: add pkg binary detection to bin/cli.js
jdalton Oct 7, 2025
8188e4e
build: configure pkg.json for yao-pkg with yoga-layout WASM
jdalton Oct 7, 2025
b66fd38
chore: ignore pkg/yao-pkg built binaries
jdalton Oct 7, 2025
1bd64e5
build: add script to build yao-pkg patched Node.js
jdalton Oct 7, 2025
7e5a656
docs: add yao-pkg build documentation
jdalton Oct 7, 2025
93b099c
build: add yao-pkg build commands and restore full platform targets
jdalton Oct 7, 2025
915e1e3
Add Babel plugins for strict mode and ICU removal
jdalton Oct 7, 2025
1ba98fd
Enable strict mode and ICU removal Babel plugins in build
jdalton Oct 7, 2025
8ee4904
Add Node.js build and cleanup scripts
jdalton Oct 7, 2025
5eaf3de
Update build:yao-pkg:node script to use new .mjs file
jdalton Oct 7, 2025
fcfa27d
Remove old bash build scripts
jdalton Oct 7, 2025
35c5ca3
Add comprehensive documentation for build system
jdalton Oct 7, 2025
60ddf18
Clean up whitespace in yoga-layout module
jdalton Oct 7, 2025
5a103f0
Fix ICU removal Babel plugin regex transformation
jdalton Oct 7, 2025
3220386
optimize vitest for parallel execution in non-coverage mode
jdalton Oct 7, 2025
0805c20
refactor: split bootstrap download into separate functions with file …
jdalton Oct 7, 2025
ab8d57e
refactor: switch SEA detection from node:sea to IPC handshake
jdalton Oct 7, 2025
9db2843
test: add comprehensive tests for SEA detection utilities
jdalton Oct 7, 2025
8f1a911
docs: add comprehensive SEA bootstrap and update documentation
jdalton Oct 7, 2025
2cf2157
feat: initialize IPC handler for SEA stub communication
jdalton Oct 7, 2025
febf5a4
feat: add bootstrap stub update capability to self-update command
jdalton Oct 7, 2025
9984a19
build: add nanotar dependency and enhance SEA bootstrap build config
jdalton Oct 7, 2025
e444e8f
build: enhance yao-pkg Node.js build with size optimizations
jdalton Oct 7, 2025
37ce063
docs: update yao-pkg build documentation with optimization details
jdalton Oct 7, 2025
98f53b7
feat: add build dependency checker and stub bundle verification
jdalton Oct 7, 2025
f8de059
chore: add experimental V8 JIT disabler script
jdalton Oct 7, 2025
9eb59ff
feat: add experimental bootstrap loader for stub distribution
jdalton Oct 7, 2025
d1dde6f
docs: add bootstrap architecture and CI setup documentation
jdalton Oct 7, 2025
b607b2e
Update deps
jdalton Oct 7, 2025
968cc10
fix: add missing organization:quota to SDK method mapping
jdalton Oct 7, 2025
0a82ad6
test: simplify external tool tests to focus on exit codes
jdalton Oct 7, 2025
f26e7d4
fix: correct CLI_DIR constant and requirements.json import
jdalton Oct 7, 2025
09ddc4b
feat: add affected test runner for faster test execution
jdalton Oct 7, 2025
515f60a
feat: integrate affected testing into npm scripts
jdalton Oct 7, 2025
d07f2a1
test: update optimize test snapshot
jdalton Oct 7, 2025
6ea7031
docs: remove attribution from bootstrap documentation
jdalton Oct 7, 2025
b3ff207
docs: remove attribution from improvement documentation
jdalton Oct 7, 2025
e7ffe42
docs: remove marketing language from SEA update review
jdalton Oct 7, 2025
0731757
refactor: add constant for CLI install lock file name
jdalton Oct 7, 2025
3d74250
style: apply linter fixes to test-affected script
jdalton Oct 7, 2025
9bd91a5
fix: add file extension filtering to affected test mapper
jdalton Oct 7, 2025
3ff369f
feat: add catastrophic delete protection to bootstrap remove()
jdalton Oct 7, 2025
7715b1a
docs: add comprehensive bootstrap and update flow documentation
jdalton Oct 7, 2025
e468a61
refactor: improve bootstrap with consistent flags and simplified IPC
jdalton Oct 7, 2025
6cca79d
docs: add stub package and binary distribution flow documentation
jdalton Oct 7, 2025
da54a75
refactor: rename bootstrap to stub for clarity
jdalton Oct 7, 2025
be81a40
docs: update documentation to use stub terminology
jdalton Oct 7, 2025
456f623
docs: add @socketbin binary package strategy documentation
jdalton Oct 7, 2025
e1ed552
feat: implement @socketbin binary distribution system
jdalton Oct 7, 2025
79954ab
docs: add @socketbin organization setup checklist
jdalton Oct 7, 2025
de0bbbd
Add no-period reference for error messages in CLAUDE.md
jdalton Oct 7, 2025
57f91e5
Replace lint-fix with smart lint-affected script
jdalton Oct 7, 2025
30ea1d7
Add lint-affected script for smart linting
jdalton Oct 7, 2025
f21c253
docs: clarify commit changes means create actual commits
jdalton Oct 7, 2025
73e49e0
feat: add placeholder packages for @socketbin namespace
jdalton Oct 7, 2025
482f1b3
feat: add trusted publisher verification script
jdalton Oct 7, 2025
df81522
chore: remove placeholder publishing scripts
jdalton Oct 7, 2025
e9737d6
fix: update @socketbin workflow for trusted publisher
jdalton Oct 7, 2025
6fee37b
Bundle zod as external dependency
jdalton Oct 8, 2025
43ac07e
fix: clean --json output and fix all linting errors
jdalton Oct 8, 2025
041b9b0
Revert external zod - bundle into vendor.js instead
jdalton Oct 8, 2025
10f2dfc
fix: improve --dry-run validation and add Node.js error filtering
jdalton Oct 8, 2025
bc1da0e
fix: improve error filtering and dry-run test expectations
jdalton Oct 8, 2025
7f5ad4e
feat: add project context awareness and rich progress utilities
jdalton Oct 8, 2025
4936ec8
feat: implement Claude CLI-inspired enhancements
jdalton Oct 8, 2025
fa619c0
docs: add comprehensive documentation for Claude CLI-inspired features
jdalton Oct 8, 2025
f5d2ded
refactor: rename 'ai' command to 'ask' for clarity
jdalton Oct 8, 2025
bc6b48d
refactor: DRY out Socket CLI with shared utilities
jdalton Oct 8, 2025
fe8f04a
feat: complete migration to DRY utilities with all features
jdalton Oct 8, 2025
985d49c
chore: remove cleanup script after migration
jdalton Oct 8, 2025
740836d
feat: add interactive help system for better UX
jdalton Oct 8, 2025
ca592c3
feat: add interactive tour command for onboarding
jdalton Oct 8, 2025
2f6a668
docs: reorganize documentation structure
jdalton Oct 8, 2025
82c1b10
Unify scripts with flag-based configuration from socket-packageurl-js
jdalton Oct 8, 2025
14a51fb
fix(build): resolve TypeScript syntax errors in .mts files
jdalton Oct 8, 2025
8d01105
fix(typescript): remove parameter properties for erasableSyntaxOnly
jdalton Oct 8, 2025
02103e4
fix(types): use bracket notation for index signature access
jdalton Oct 8, 2025
f1a5ab5
fix(lint): remove unused imports and parameters
jdalton Oct 8, 2025
aec4665
fix(types): improve type safety in API wrapper and progress utilities
jdalton Oct 8, 2025
d12544a
fix(utils): correct chalkTable function signature
jdalton Oct 8, 2025
1d427c3
fix(lint): remove unused functions and fix inline comments
jdalton Oct 8, 2025
6a832fb
refactor: remove unused tour command
jdalton Oct 8, 2025
5b984a6
fix: restore Socket ASCII header display
jdalton Oct 8, 2025
cb4c99f
refactor: split organization commands into separate modules
jdalton Oct 8, 2025
c6783f6
refactor: split repository commands into separate modules
jdalton Oct 8, 2025
4ce0f93
chore: add esbuild and optimized rollup configs
jdalton Oct 8, 2025
d8c875b
feat: add bordered input and lazy ink utilities
jdalton Oct 8, 2025
6dae9a3
docs: add UI component demo files
jdalton Oct 8, 2025
8939acf
refactor: remove unused inline-status utility
jdalton Oct 8, 2025
de6e71a
refactor: update scan commands
jdalton Oct 8, 2025
3a02261
refactor: update various commands
jdalton Oct 8, 2025
16d203c
refactor: update utility modules
jdalton Oct 8, 2025
35b0949
chore: update dependencies and configs
jdalton Oct 8, 2025
1405811
chore: remove UI component demo files
jdalton Oct 8, 2025
665a172
chore: add lint:affected scripts to package.json
jdalton Oct 8, 2025
63e0605
feat: improve interactive help system
jdalton Oct 8, 2025
a3f8524
feat: add visual spacing after CLI banner
jdalton Oct 8, 2025
a65e37a
refactor: improve help system display
jdalton Oct 8, 2025
433431d
refactor: remove redundant package scripts
jdalton Oct 8, 2025
4c163ca
fix: display banner when launching socket with no arguments
jdalton Oct 8, 2025
b17f420
refactor: move configuration files to .config folder
jdalton Oct 8, 2025
c4c6794
refactor: bundle external modules as separate self-contained builds
jdalton Oct 8, 2025
63f7f81
chore: move build artifacts to dedicated build directory
jdalton Oct 8, 2025
6a71bde
fix: resolve eslint errors in build scripts and utils
jdalton Oct 8, 2025
1c206f3
Fix missing references and import extensions
jdalton Oct 8, 2025
d0ca0ac
refactor: merge test-changed.mjs into unified test.mjs
jdalton Oct 8, 2025
7b56ad7
refactor: reorganize build system into scripts/build/ directory
jdalton Oct 8, 2025
2537754
refactor: rename coverage.mjs to cover.mjs for consistency
jdalton Oct 8, 2025
9bc1400
chore: remove obsolete create-placeholder-packages.mjs script
jdalton Oct 8, 2025
ea22426
fix: apply linter auto-fixes to build scripts
jdalton Oct 8, 2025
5b51ad3
test: update test snapshots to remove Socket banner
jdalton Oct 8, 2025
8e2917d
chore: update build configuration files
jdalton Oct 8, 2025
f09ad96
docs: update build documentation and gitignore
jdalton Oct 8, 2025
e6905a9
chore: update package dependencies and script changes
jdalton Oct 8, 2025
68e21c1
test: use os.tmpdir() instead of hardcoded /tmp paths
jdalton Oct 8, 2025
d64be3e
feat: add configurable network timeout for API calls
jdalton Oct 8, 2025
ac37843
fix: process exit race condition and Windows signal handling
jdalton Oct 8, 2025
64c60ac
fix: improve Windows compatibility and robustness in SEA stub
jdalton Oct 8, 2025
ca8540d
feat: add getSafeCwd() helper for deleted directory handling
jdalton Oct 8, 2025
66d61a5
fix: update CI workflow to use unified test commands
jdalton Oct 8, 2025
e32cfcf
Replace process.exit() with error throwing in binary path utilities
jdalton Oct 9, 2025
f94342e
Add Alpine/musl binary build support
jdalton Oct 9, 2025
381187a
Update to socket-node naming convention
jdalton Oct 9, 2025
63ab8c8
Add unified scripts with interactive bump support
jdalton Oct 9, 2025
010d11a
Update package.json scripts for unified approach
jdalton Oct 9, 2025
78d56c3
Update husky pre-commit to use unified precommit script
jdalton Oct 9, 2025
4467b94
Add colorful version notifications and config-based version management
jdalton Oct 9, 2025
ddae367
Add GitHub workflow for binary releases
jdalton Oct 9, 2025
16d599c
Add Docker configuration for cross-platform builds
jdalton Oct 9, 2025
f266a52
Update pnpm-lock.yaml
jdalton Oct 9, 2025
82ae566
Add sync-claude script and update bump.mjs
jdalton Oct 9, 2025
2ed622e
Remove placeholder package creation script
jdalton Oct 9, 2025
acc7d0d
Replace sync-claude.mjs with enhanced claude.mjs
jdalton Oct 9, 2025
35986e8
Add comprehensive Claude operations (review, test, docs, refactor, op…
jdalton Oct 9, 2025
3730ce5
Restrict pnpm registry overrides to CI environments
jdalton Oct 9, 2025
439b595
Add tests for CI-aware pnpm routing behavior
jdalton Oct 9, 2025
ae490ce
Fix ENV type definition to allow direct property access
jdalton Oct 9, 2025
9e196d1
Replace trash with deleteAsync in test fixtures
jdalton Oct 9, 2025
a3b7075
Add "Let's get dangerous\!" mode with --dangerously-skip-permissions
jdalton Oct 9, 2025
2aa9a22
Add parallel execution support for Claude commands
jdalton Oct 9, 2025
4b08a1b
Add --green flag for CI automation and test monitoring
jdalton Oct 9, 2025
3fa49d6
Update build scripts and utilities
jdalton Oct 9, 2025
3b4bd32
Pin all dependencies to exact versions and add gh CLI check
jdalton Oct 9, 2025
972e294
Add --node and --stub options to build command
jdalton Oct 9, 2025
c5f85a6
Rename tiny-node to socket-node throughout codebase
jdalton Oct 9, 2025
502cf5e
Reorganize build outputs to centralized binaries directory
jdalton Oct 9, 2025
78191f5
Improve --green auto-fix behavior with 10 automatic attempts before i…
jdalton Oct 9, 2025
a25289c
Update lock file and constants
jdalton Oct 9, 2025
6bc83a8
Update claude.mjs with --green fixes and progress indicators
jdalton Oct 9, 2025
dcde98c
Fix variable name conflict in runGreen function
jdalton Oct 9, 2025
e70e6ce
Add auto-signing for macOS stub binaries
jdalton Oct 9, 2025
4174ea1
Add binaries directory to gitignore
jdalton Oct 9, 2025
04be738
Rename signingWarningBuffer to _signingWarningBuffer
jdalton Oct 9, 2025
90eee16
Fix CI issues and update tests
jdalton Oct 9, 2025
606ca61
Add local run instructions to build output
jdalton Oct 9, 2025
443138b
Fix CI issues and update tests
jdalton Oct 9, 2025
27011f6
Add version consistency check to yao-pkg publish script
jdalton Oct 9, 2025
eb55ffe
Add version consistency check to SEA publish script
jdalton Oct 9, 2025
8b0ff4b
Add version consistency validation to publish workflow
jdalton Oct 9, 2025
1e6931b
Rename flag to --no-version-check in yao publisher
jdalton Oct 9, 2025
701a936
Rename flag to --no-version-check in SEA publisher
jdalton Oct 9, 2025
f8071ee
Fix CI issues and update tests
jdalton Oct 9, 2025
230a15e
Fix Claude script authentication and workflow detection
jdalton Oct 9, 2025
bc7d92a
Enhance claude CLI with intuitive auto-fix defaults and watch mode
jdalton Oct 9, 2025
e362895
Use relative paths in build script output
jdalton Oct 9, 2025
7bf1136
Replace claude.mjs with wrapper that defers to socket-registry
jdalton Oct 9, 2025
cb3c18a
Bundle ink as self-contained external module
jdalton Oct 9, 2025
09312b9
Fix build system for zero-dependency bundling
jdalton Oct 9, 2025
655babf
Fix macOS ARM64 stub binary malformation with ldid support
jdalton Oct 9, 2025
760c475
Auto-install ldid for macOS ARM64 stub builds
jdalton Oct 9, 2025
382a3d6
Add comprehensive dependency auto-install for build tools
jdalton Oct 9, 2025
4ace7dd
Rename inject.mts to preload-arborist.mts and instrument-with-sentry.…
jdalton Oct 10, 2025
62220cf
Update constants to use new preload file paths
jdalton Oct 10, 2025
686c97c
Update build configs and constants for renamed preload files
jdalton Oct 10, 2025
9d37b1f
Update remaining references to preload files
jdalton Oct 10, 2025
96d3964
Remove unused esbuild-inject-helper script
jdalton Oct 10, 2025
c4c86b2
Add yarn-cli.js wrapper for forwarding to Socket Firewall
jdalton Oct 10, 2025
7bc05dc
Move metadata files to .config with clearer names
jdalton Oct 10, 2025
d34f260
Update build configs to inline JSON files
jdalton Oct 10, 2025
5bcc624
Add architecture documentation and utility organization
jdalton Oct 10, 2025
c488eb3
Move metadata files from .config to data directory
jdalton Oct 10, 2025
466ca10
Update imports for relocated metadata files
jdalton Oct 10, 2025
abc5189
Fix imports in errors index module
jdalton Oct 10, 2025
0910525
Fix imports in output index module
jdalton Oct 10, 2025
079271a
fix: exclude tsx files from TypeScript checking
jdalton Oct 10, 2025
8ba9440
chore: add TypeScript check configuration
jdalton Oct 10, 2025
b64ad74
test: update snapshots for all CLI commands
jdalton Oct 10, 2025
75c6ae1
refactor: centralize code-signing functionality
jdalton Oct 10, 2025
5c479ed
refactor: update build scripts to use centralized code-signing
jdalton Oct 10, 2025
cdb1d2c
build: add comprehensive build infrastructure
jdalton Oct 10, 2025
b420aba
build: add yao-pkg and socket-node patches
jdalton Oct 10, 2025
420b2ed
build: update ESLint config to ignore build patch files
jdalton Oct 10, 2025
e27e2bb
deps: update @types/node to 20.19.20 and add lodash
jdalton Oct 10, 2025
b9aaee5
build: add build lock file for Node version tracking
jdalton Oct 10, 2025
07f6614
fix: correct scan command import to use cmd-scan instead of index
jdalton Oct 10, 2025
dcb0aff
Remove lodash dep
jdalton Oct 10, 2025
0dd60d3
feat: restore repository create handler from v1.1.23
jdalton Oct 11, 2025
310863c
feat: restore repository delete handler from v1.1.23
jdalton Oct 11, 2025
b232a32
feat: restore organization dependencies API from v1.1.23
jdalton Oct 11, 2025
53e0207
feat: restore organization quota API from v1.1.23
jdalton Oct 11, 2025
0465b4d
feat: restore organization security policy API from v1.1.23
jdalton Oct 11, 2025
95b8ee6
feat: restore organization license policy API from v1.1.23
jdalton Oct 11, 2025
795cf59
feat: restore repository list API from v1.1.23
jdalton Oct 11, 2025
532d798
fix: restore proper command delegation for subcommands
jdalton Oct 11, 2025
9ca41a4
test: fix test expectations and update snapshots
jdalton Oct 11, 2025
2f92e2a
chore: update dependencies and build configuration
jdalton Oct 11, 2025
b16f2d2
fix: improve organization capabilities detection for plan variants
dacoburn Oct 11, 2025
ed627ae
Merge branch 'main' into doug/fix-plan-detection
dacoburn Oct 11, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
11 changes: 8 additions & 3 deletions .config/babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const scriptsPath = path.join(rootPath, 'scripts')
const babelPluginsPath = path.join(scriptsPath, 'babel')

module.exports = {
presets: ['@babel/preset-typescript'],
presets: ['@babel/preset-react', '@babel/preset-typescript'],
plugins: [
'@babel/plugin-proposal-export-default-from',
'@babel/plugin-transform-export-namespace-from',
Expand All @@ -21,7 +21,12 @@ module.exports = {
version: '^7.27.1',
},
],
path.join(babelPluginsPath, 'transform-set-proto-plugin.js'),
path.join(babelPluginsPath, 'transform-url-parse-plugin.js'),
// Run strict-mode transformations first to fix loose-mode code
path.join(babelPluginsPath, 'babel-plugin-strict-mode.mjs'),
path.join(babelPluginsPath, 'babel-plugin-inline-require-calls.js'),
path.join(babelPluginsPath, 'transform-set-proto-plugin.mjs'),
path.join(babelPluginsPath, 'transform-url-parse-plugin.mjs'),
// Run ICU removal last to transform Intl/locale APIs
path.join(babelPluginsPath, 'babel-plugin-remove-icu.mjs'),
],
}
15 changes: 9 additions & 6 deletions biome.json → .config/biome.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
{
"$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
"$schema": "../node_modules/@biomejs/biome/configuration_schema.json",
"files": {
"includes": [
"**",
"!**/.cache",
"!**/.DS_Store",
"!**/._.DS_Store",
"!**/.env",
"!**/.git",
"!**/.github",
"!**/.husky",
"!**/.nvm",
"!**/.rollup.cache",
"!**/.type-coverage",
"!**/.vscode",
"!**/coverage",
"!**/dist",
"!**/package.json",
"!**/package-lock.json"
"!**/pnpm-lock.yaml",
"!test/**/fixtures",
"!test/**/packages"
],
"maxSize": 8388608
},
Expand Down Expand Up @@ -64,8 +66,9 @@
"useSingleVarDeclarator": "error",
"noUnusedTemplateLiteral": "error",
"useNumberNamespace": "error",
"noInferrableTypes": "error",
"noUselessElse": "error"
"noInferrableTypes": "off",
"noUselessElse": "error",
"useNumericSeparators": "error"
}
}
}
Expand Down
238 changes: 238 additions & 0 deletions .config/build-config.json5
Original file line number Diff line number Diff line change
@@ -0,0 +1,238 @@
{
"$schema": "https://json-schema.org/draft-07/schema#",
"version": "1.0.0",

// Configuration for building custom Node.js binaries
// Size optimizations: ~24.5MB saved from configure flags
"node": {
"defaultVersion": "v22.19.0",
"currentVersion": "v24.9.0",

"build": {
// Configure flags for custom Node.js build
// These remove unnecessary features to reduce binary size
"configureArgs": [
"--without-intl", // Remove ICU/Internationalization (saves ~12MB)
"--without-npm", // Remove npm package manager (saves ~2MB)
"--without-corepack", // Remove corepack (yarn/pnpm) (saves ~1MB)
"--without-inspector", // Remove Chrome DevTools debugger (saves ~1MB)
"--without-amaro", // Remove TypeScript support (saves ~0.5MB)
"--without-sqlite", // Remove SQLite database (saves ~1MB)
"--without-node-snapshot", // Disable V8 snapshot (saves ~4MB)
"--without-node-code-cache", // Disable V8 code cache (saves ~3MB)
"--without-node-options", // Remove NODE_OPTIONS support (saves ~0.1MB, security)
// Security patches:
// - disable-eval-flag-v24.patch: ALWAYS removes -e/--eval (no exceptions)
// - restrict-require-flag-v24.patch: Removes -r/--require unless IPC subprocess
// - make-issea-detect-pkg-v24.patch: Makes isSea() return true for pkg binaries
"--disable-single-executable-application", // Disable SEA support (saves ~0.5MB)
"--openssl-no-asm", // Disable OpenSSL assembly (saves ~0.5MB, but slower crypto)
"--enable-lto", // Link Time Optimization (saves ~2-3MB, slower build)
"--v8-lite-mode" // V8 lite mode for embedded systems (saves ~5MB)

// Size reduction options
// "--without-ssl", // Remove OpenSSL/crypto (saves ~3MB) - WARNING: Breaks HTTPS
// "--without-dtrace", // INVALID in v24 - DTrace support is auto-detected
// "--without-etw", // INVALID in v24 - ETW is Windows-specific, auto-detected
// "--without-perfctr", // INVALID in v24 - Windows performance counters (saves ~0.1MB)

// Feature flags
// "--shared", // Build shared library instead of executable
// "--fully-static", // INVALID in v24 - Use --enable-static
// "--partly-static", // INVALID in v24 - No longer supported
// "--enable-pgo-generate", // Profile Guided Optimization - generate
// "--enable-pgo-use", // Profile Guided Optimization - use profile

// V8 options
// "--v8-enable-hugepage", // INVALID in v24 - Use runtime flag instead
// "--without-v8-platform-macos", // INVALID in v24 - Use --without-v8-platform
// "--without-bundled-v8", // Use system V8 instead of bundled

// OpenSSL options
// "--shared-openssl", // Use system OpenSSL instead of bundled
// "--openssl-fips", // Enable FIPS 140-2 compliance

// Build options
// "--ninja", // Use Ninja build system instead of Make
// "--debug", // Debug build (much larger)
// "--gdb", // Add GDB debugging support
// "--coverage", // Add code coverage support
// "--asan", // AddressSanitizer (memory error detector)
// "--ubsan", // UndefinedBehaviorSanitizer

// Target options
// "--dest-cpu=x64", // Target CPU architecture
// "--dest-os=linux", // Target operating system
// "--cross-compiling", // Enable cross-compilation
// "--without-siphash", // Remove SipHash (hash flooding protection)
// "--with-ltcg", // Link-time code generation (Windows)

// Experimental
// "--experimental-http-parser", // Use experimental HTTP parser
// "--experimental-sea-config" // Single Executable Application config
]
},

// V8 runtime flags - these generate patches for V8 behavior
"v8Flags": [
// "--harmony-import-assertions", // REMOVED in v24 - replaced by harmony-import-attributes
"--harmony-import-attributes" // Enable import attributes (for @yao-pkg/pkg) - Already default in v24

// Memory management
// "--max-old-space-size=4096", // Set max heap memory (MB)
// "--max-semi-space-size=16", // Set semi-space size (MB)
// "--expose-gc", // Expose global.gc() for manual GC
// "--trace-gc", // Trace garbage collection
// "--trace-gc-verbose", // Verbose GC tracing

// Debugging & tracing
// "--trace-deprecation", // Trace deprecation warnings
// "--throw-deprecation", // Throw on deprecation
// "--pending-deprecation", // Show pending deprecations
// "--trace-warnings", // Trace warning origins
// "--trace-sync-io", // Trace synchronous I/O
// "--abort-on-uncaught-exception", // Abort on uncaught exceptions

// Module system
// "--preserve-symlinks", // Don't resolve symlinks for modules
// "--preserve-symlinks-main", // Don't resolve symlinks for main module
// "--experimental-modules", // Enable experimental ESM features
// "--experimental-wasm-modules", // Enable WASM modules
// "--experimental-vm-modules", // Enable VM modules support

// Security & policy
// "--experimental-policy", // Enable policy feature
// "--zero-fill-buffers", // Zero-fill Buffer/Uint8Array allocations
// "--disable-proto=throw", // Disable __proto__ (security)
// "--no-expose-wasm", // Don't expose WASM (security) - Can't use: We need WASM for yoga-layout (base64-encoded WASM module)

// Performance & profiling
// "--no-force-async-hooks-checks", // Disable async hooks checks (faster)
// "--track-heap-objects", // Track heap object allocations
// "--heap-prof", // Enable heap profiling
// "--prof", // Generate V8 profiler output

// Reporting
// "--diagnostic-dir=./reports", // Set diagnostics directory
// "--report-uncaught-exception", // Report on uncaught exceptions
// "--report-on-signal", // Generate report on signal (SIGUSR2)
// "--report-on-fatalerror" // Generate report on fatal error
],

// Node.js process flags (separate from V8 flags)
"nodeFlags": [
"--no-deprecation", // Disable deprecation warnings
"--no-warnings" // Disable process warnings

// Available Node.js flags
// "--enable-source-maps", // Enable source map support
// "--preserve-symlinks", // Preserve symbolic links
// "--preserve-symlinks-main", // Preserve symlinks for main module
// "--inspect", // Enable inspector (requires --without-inspector not set)
// "--inspect-brk", // Enable inspector with break (requires --without-inspector not set)
// "--napi-modules", // REMOVED - N-API is always enabled
// "--trace-event-categories", // Trace event categories
// "--trace-event-file-pattern", // Trace event file pattern
// "--trace-exit", // Trace exit
// "--trace-sigint", // Trace SIGINT
// "--trace-tls", // Trace TLS
// "--tls-min-v1.0", // Allow TLS 1.0
// "--tls-min-v1.1", // Allow TLS 1.1
// "--tls-min-v1.2", // Minimum TLS 1.2
// "--tls-min-v1.3", // Minimum TLS 1.3
// "--use-openssl-ca", // Use OpenSSL CA store
// "--use-bundled-ca", // Use bundled CA store
// "--enable-fips", // Enable FIPS crypto
// "--force-fips", // Force FIPS crypto
// "--redirect-warnings", // Redirect warnings to file
// "--throw-deprecation", // Throw on deprecation
// "--pending-deprecation", // Show pending deprecations
// "--input-type", // Set input type (commonjs/module)
// "--experimental-loader", // Custom ESM loader hooks
// "--experimental-modules", // REMOVED - ESM is stable
// "--experimental-wasm-modules", // REMOVED - Use --experimental-wasm-modules in V8 flags
// "--experimental-json-modules", // REMOVED - JSON modules are stable
// "--experimental-top-level-await" // REMOVED - Top-level await is stable
]
},

// Node.js SEA (Single Executable Application) configuration
// Used for injecting empty SEA blob into socket-node binary
// Makes isSea() return true for both yao-pkg and native SEA builds
// See: https://nodejs.org/api/single-executable-applications.html
"sea": {
"main": "// Empty SEA main - actual code injected via other mechanism\n"
},

// @yao-pkg/pkg configuration for creating standalone executables
// This follows the @yao-pkg/pkg configuration format
// See: https://github.com/yao-pkg/pkg#config
// Size optimizations: bytecode disabled, Brotli compression (up to 60% reduction)
"yao": {
"name": "socket",
"bytecode": false, // Disabled to reduce binary size
"compress": "Brotli", // Use Brotli compression to reduce size of JavaScript bundle (up to 60% reduction)
// Dictionaries map native .node files and dynamic requires that pkg can't detect at build time
// Typically includes: native C/C++ modules (bcrypt, sqlite3, canvas), WASM files, binary assets
// We use empty {} because Socket CLI is pure JS/TS without native dependencies - reduces binary size
"dictionary": {},

// Entry points for different CLI commands
"binaries": {
"socket": "dist/cli.js",
"socket-npm": "dist/npm-cli.js",
"socket-npx": "dist/npx-cli.js",
"socket-pnpm": "dist/pnpm-cli.js",
"socket-yarn": "dist/yarn-cli.js"
},

// Build targets for all platforms
// Linux targets work for both glibc and musl (Alpine) due to static compilation
// linuxstatic targets create fully static binaries (best for Docker containers)
// Note: linuxstatic cannot load native .node modules
"targets": [
"node24-macos-arm64",
"node24-macos-x64",
"node24-linux-arm64",
"node24-linux-x64",
"node24-linuxstatic-arm64", // Fully static for Docker/Alpine ARM64
"node24-linuxstatic-x64", // Fully static for Docker/Alpine x64
"node24-win-arm64",
"node24-win-x64"
],

// Files to include in the packaged binary
"assets": [
"dist/**/*",
"requirements.json",
"translations.json",
"shadow-bin/**/*"
]
},

// Build-related paths (all relative to repo root)
"paths": {
"buildDir": "build/socket-node",
"outputDir": "build/output",
"patchesDir": "build/patches",
"distDir": "dist",
// @yao-pkg/pkg's cache directory - hardcoded format, not configurable
// Must be: ~/.pkg-cache/{version}/built-{node_version}-{platform}-{arch}
"yaoCache": "~/.pkg-cache/{yao_version}",

// Node.js build artifacts and their locations
"socketNode": {
// Where Node.js build system outputs (hardcoded in GYP/GN, not configurable)
"buildOutput": "build/socket-node/{node_version}/out/Release/node",

// Processed versions (following Node's out/ structure)
"strippedOutput": "build/socket-node/{node_version}/out/Stripped/node",
"signedOutput": "build/socket-node/{node_version}/out/Signed/node"
}
},

// Source download configuration
"source": {
"baseUrl": "https://github.com/nodejs/node/archive/refs/tags"
}
}
Loading
Loading