Skip to content

build: copy package docs only at vsix package time#796

Open
lukecotter wants to merge 2 commits into
certinia:mainfrom
lukecotter:chore-vsix-package-docs
Open

build: copy package docs only at vsix package time#796
lukecotter wants to merge 2 commits into
certinia:mainfrom
lukecotter:chore-vsix-package-docs

Conversation

@lukecotter
Copy link
Copy Markdown
Collaborator

📝 PR Overview

📚 Stacked on #795. This branch is based on chore-typecheck-tsgo-project-refs, so the diff currently also shows that PR's tsgo commit. Review/merge #795 first — once it lands in main, this PR's diff reduces to just the packaging commit below.

rollup.config.mjs and rolldown.config.ts copy CHANGELOG.md/LICENSE.txt/README.md into lana/ on every build/watch, but those files are only needed when packaging the .vsix (lana/.vscodeignore includes exactly them, and the copies are gitignored artifacts). This moves the copy to package time so dev builds stay clean and fast.

🛠️ Changes made (this PR's commit only)

  • Remove the { src: ['CHANGELOG.md','LICENSE.txt','README.md'], dest: 'lana' } target from both rollup.config.mjs and rolldown.config.ts (the sibling log-viewer/out → lana/out runtime copy stays).
  • Add scripts/copy-package-docs.mjs (ESM, parallel copyFile via Promise.all) and a copy:package-docs script; run it from lana's vscode:prepublish so vsce gets the docs at package time.
  • Drop the redundant rm -rf lana/out from the rolldown scripts (cleanDir: true already clears output); keep it for rollup, which has no native clean.

🧩 Type of change (check all applicable)

  • 🐛 Bug fix - something not working as expected
  • ✨ New feature – adds new functionality
  • ♻️ Refactor - internal changes with no user impact
  • ⚡ Performance Improvement
  • 📝 Documentation - README or documentation site changes
  • 🔧 Chore - dev tooling, CI, config
  • 💥 Breaking change

🔗 Related Issues

✅ Tests added?

  • 👍 yes
  • 🙅 no, not needed
  • 🙋 no, I need help

📚 Docs updated?

  • 🙅 not needed

Test plan

  • build:dev (rollup) and build:dev:fast (rolldown) no longer regenerate the lana/ docs; lana/out fully populated
  • vsce package --no-dependencies succeeds with README/CHANGELOG/LICENSE present in the .vsix
  • pnpm lint and pnpm test (886/886) green

- replace the three inline `tsc --noemit` calls (build:dev, build:dev:fast, lint) with one `tsgo -b` over project references; swc/rolldown stay transpile-only
- wire references: apex-log-parser becomes composite (emitDeclarationOnly), log-viewer/lana reference it, new root solution tsconfig — enables incremental caching
- gate prod `build` on `typecheck` and run it in `lint` (preserves CI PR gate); add @typescript/native-preview (tsgo), ~7.7x faster cold than tsc
- move the CHANGELOG/LICENSE/README copy out of rollup/rolldown into scripts/copy-package-docs.mjs, run from lana's vscode:prepublish — docs are no longer regenerated on every dev build/watch
- drop the redundant `rm -rf lana/out` from rolldown scripts (its cleanDir already clears output); keep it for rollup which has no native clean
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant