Repository navigation
perf: split jsonc-parser edit and format out of project-context - #343
Conversation
🦋 Changeset detectedLatest commit: 9a61b1e The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configuration
📒 Files selected for processing: 3
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
View your CI Pipeline Execution ↗ for commit 9a61b1e
☁️ Nx Cloud last updated this comment at |
commit: |
Merging this PR will not alter performance
|
🎯 Changes
workspace-patterns.tsimportedparsefrom'jsonc-parser', whichtsdown.config.tsaliased tojsonc-parser/lib/esm/main.js. Becausemain.jsalso imports./impl/editand./impl/format(used byinstallandmaintainer), Rolldown bundled the entirejsonc-parsermodule graph (scanner.js,string-intern.js,format.js,parser.js,edit.js,main.js) into the shareddist/project-context-*.mjschunk, which is loaded on startup byintent list,intent load,intent stale, andintent validate.workspace-patterns.ts'sjsonc-parser/lib/esm/main.jsimport atjsonc-parser/lib/esm/impl/parser.jsintsdown.config.ts, soedit.js,format.js,string-intern.js(which eagerly allocates 1,220 whitespace strings at module evaluation time), andmain.jsmove into a separate chunk (dist/main-*.mjs) loaded only byinstallandmaintainer.dist/project-context-*.mjsshrinks from54.14 kBraw (11.82 kBgzip) to34.21 kBraw (7.83 kBgzip) —-19.93 kBraw (-3.99 kBgzip) on every read-only CLI command.tsdown v0.22.14/rolldown v1.2.12)main(cb45f14)9a61b1e)dist/project-context-*.mjs(raw)dist/project-context-*.mjs(gzip)✅ Checklist
pnpm run test:pr(runpnpm build:allfirst).🚀 Release Impact