-
Notifications
You must be signed in to change notification settings - Fork 31
chore: remove brotli compression and pkg dependency #893
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
+284
−29,881
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Remove experimental ask and console commands that are no longer needed. The ask command provided natural language query interface, but is being command provided an interactive TUI that is superseded by better tooling. Files removed: - packages/cli/src/commands/ask/cmd-ask.mts - packages/cli/src/commands/ask/handle-ask.mts - packages/cli/src/commands/ask/output-ask.mts - packages/cli/src/commands/console/InteractiveConsoleApp.tsx - packages/cli/src/commands/console/cmd-console.mts - packages/cli/src/commands/console/handle-console.mts - packages/cli/src/commands/console/mouse-handler.mts
Remove documentation that is now obsolete after SDK restructuring: - dev/ci-testing.md - dev/scripts.md - dev/testing.md - incremental-builds.md - migration-v3.md - security.md These docs are either outdated, covered in monorepo-level docs, or no longer relevant after the package consolidation in recent refactoring.
CI optimization: - Add lint-setup-script to ensure dependencies are built before linting - Disable redundant type-check job since check script already runs it - Reduces duplicate work and improves CI efficiency LLM script updates: - Update semantic index generator to be command-agnostic - Remove ask command references from README - Clean up deprecated documentation about socket ask integration
Fixed two bugs in the lint script that caused linting to fail when biome.json excluded files were changed: 1. Pattern matching: The isExcludedByBiome() function incorrectly converted glob patterns like **/package.json to regex. The **/ was replaced with .* first, then the remaining * was replaced with [^/]*, resulting in broken patterns that failed to match root-level files. Now uses placeholder approach to preserve regex metacharacters. 2. Config discovery: The getBiomeExcludePatterns() function only looked for biome.json in process.cwd(), failing when running from package subdirectories. Now searches up to 3 parent directories to find the config file, supporting monorepo structure. These fixes allow the check script to pass when only excluded files (like package.json) are changed, preventing false failures in CI.
Removed @yao-pkg/pkg dependency and build:smol script as part of ongoing cleanup of unused build tooling. Also removed Makefile which is no longer needed.
- Fix import statement formatting - Fix multiline string formatting - Convert let to const where appropriate
- Add spawnSync to imports from @socketsecurity/lib/spawn - Remove require() call that triggered n/no-extraneous-require lint error - Use getExecPath() directly in sync version (SEA detection unavailable in sync mode) - Update JSDoc to clarify sync limitations Fixes linting error: src/utils/spawn/spawn-node.mts:173:33 error "@socketsecurity/lib" is extraneous n/no-extraneous-require
This commit completes the removal of the pkg-based compression system and simplifies the CLI loader to directly require the built bundle. Changes: - Remove compress-cli.mjs scripts (no longer needed) - Simplify src/index.mts to directly load cli.js (no decompression) - Add copy-cli.mjs scripts to copy built CLI to dist/ - Update build scripts to use new copy approach - Update esbuild configs to output uncompressed cli.js - Update verify-package scripts for new structure The CLI now ships as an uncompressed bundle, removing the ~10MB→1.7MB compression at the cost of larger npm package size. This simplifies the build process and removes the pkg dependency. Related to previous commit: 3b99270 (chore: remove pkg dependency and related build scripts)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR removes the brotli compression system and pkg dependency, simplifying the CLI build and distribution process.
Changes
1. Remove Compression Scripts
compress-cli.mjsscripts frompackages/cli/andpackages/cli-with-sentry/copy-cli.mjsscripts to copy built CLI directly to dist/2. Simplify Index Loader
src/index.mtsto directly require the built bundle (no decompression)3. Update Build Process
cli.js4. Remove Dependency
Trade-offs
Before: ~13MB uncompressed → ~1.7MB compressed (87% reduction)
After: Ships uncompressed bundle (~13MB)
This change prioritizes:
At the cost of:
Test Plan
Related
Related to commit 3b99270 (chore: remove pkg dependency and related build scripts)