Skip to content

chore: tooling updates#125

Draft
GabrielCousin wants to merge 26 commits intomainfrom
gabrielcousin/-/tooling-updates
Draft

chore: tooling updates#125
GabrielCousin wants to merge 26 commits intomainfrom
gabrielcousin/-/tooling-updates

Conversation

@GabrielCousin
Copy link
Copy Markdown
Member

Summary

A batch of developer tooling and CI modernisation tasks:

  • Package manager: Switch from Yarn to npm; add .npmrc; commit package-lock.json
  • Node.js: Pin Node 22 via .mise.toml; declare engines.node >= 20 in package.json
  • ESLint: Migrate from .eslintrc.json to ESLint v9 flat config (eslint.config.mjs) + typescript-eslint v8; enforce no-explicit-any
  • TypeScript: Replace remaining any types with proper types across src/
  • Test infrastructure: Migrate from legacy runTest.ts/suite/index.ts to @vscode/test-cli (.vscode-test.mjs); replace simple-mock with sinon; upgrade Mocha to v11
  • CI: Migrate to jdx/mise-action@v2; remove xvfb-run-macos.sh shim; drop global vsce install in favour of npx; add @vscode/vsce as devDependency
  • Dependabot: Add monthly schedule with cooldown grouping
  • GitHub templates: Add feature-request issue template; remove stale duplicate bug-report template
  • Misc: Lowercase .MD.md doc extensions; ignore .worktrees/ in .gitignore; update ggshield pre-commit pin to v1.49.0

Test plan

  • npm install succeeds from a clean checkout
  • npm run lint passes with no errors
  • npm run compile (or equivalent build) succeeds
  • CI workflow passes (build + test jobs green)
  • Extension tests pass via @vscode/test-cli runner

@GabrielCousin GabrielCousin force-pushed the gabrielcousin/-/tooling-updates branch from e9a501b to b6e0130 Compare April 3, 2026 12:03
@GabrielCousin GabrielCousin force-pushed the gabrielcousin/-/tooling-updates branch from ce4be66 to 67cad5e Compare April 17, 2026 20:51
Aligns the pre-commit hook version with the ggshield version bundled
by the extension.

Refs: FRNT-1205
- Replace yarn.lock with package-lock.json
- Add .npmrc: engine-strict=true, min-release-age=3 (supply-chain protection)
- Bump @types/node from pinned 20.2.5 to ^22 (FRNT-1204)
- Update package.json scripts to use npm run

Refs: FRNT-1204
- npm and github-actions ecosystems, monthly schedule
- 3-day cooldown on all updates (supply-chain protection)
- Groups: typescript-eslint, vscode

Refs: FRNT-1207
- Replace actions/setup-node@v4 (hardcoded versions) with mise-action@v2
  so CI picks up the Node version from .mise.toml
- Switch yarn → npm ci for installs
- Update vsce install to @vscode/vsce (current package name)
- Remove XQuartz install step (handled in next commit with test-cli)

Refs: FRNT-1209
- Add @vscode/test-cli; configure via .vscode-test.mjs
- Update test script to use vscode-test binary
- Add compile-tests and check scripts; update pretest
- Delete manual boilerplate: runTest.ts, suite/index.ts
- Delete scripts/xvfb-run-macos.sh (display handled by test-cli)
- Remove glob and @types/glob devDeps
- Update .vscode/launch.json to use testConfiguration
- Exclude package-lock.json from codespell (integrity hashes)

Refs: FRNT-1211
simple-mock has been unmaintained since 2018. All 4 affected test files
migrated to sinon: stub/restore API is equivalent, property names
(called, callCount, lastCall.args) are identical.

Refs: FRNT-1212
mocha ^10 → ^11 to attempt resolving serialize-javascript/diff audit
vulnerabilities. Production deps are clean (npm audit --omit=dev: 0 vulns).
Remaining 4 vulns are dev-only in mocha 11.7.5's own transitive deps
(serialize-javascript ≤7.0.4, diff 6.x) — upstream has not released a fix yet.

Add @vscode/vsce as an explicit devDependency so the CI no longer needs a
separate global install step.
@vscode/vsce is now a devDependency, so npm ci makes the binary available.
Drop the separate global install step and invoke via npx instead.
Replace .eslintrc.json with eslint.config.mjs using recommendedTypeChecked preset.
Promote critical rules from warn → error; add no-floating-promises and
only-throw-error. Fix all resulting violations across source and test files.

- fixes FRNT-1214
Replace all explicit any annotations with types imported from existing
packages (vscode, sinon, child_process) or TypeScript built-ins (unknown,
inline object types, typeof console.log). Enable @typescript-eslint/no-explicit-any
as an error in ESLint to prevent regressions.
Split tsconfig.json into a solution-style config referencing tsconfig.src.json
(extension source) and tsconfig.test.json (tests, adds mocha types). Explicit
types fields ensure @types/node and @types/mocha are reliably resolved by both
tsc and VS Code. Update compile, compile-tests, check, and watch scripts
accordingly. ESLint parserOptions now reference both concrete configs.
- Add build.mjs esbuild script (outputs dist/extension.js)
- Update main entry point to ./dist/extension.js
- Replace tsc compile/watch scripts with esbuild equivalents
- Keep tsc for type-checking (check) and test compilation (compile-tests)
- Remove outDir from tsconfig.src.json; add it explicitly to tsconfig.test.json
- Update .vscodeignore: exclude node_modules/, src/, out/; drop **/*.ts, **/*.map, **/tsconfig.json

- fixes FRNT-1210
@GabrielCousin GabrielCousin force-pushed the gabrielcousin/-/tooling-updates branch from 67cad5e to 2a06255 Compare April 17, 2026 20:53
esbuild's __export helper defines exports via Object.defineProperty with
only get/enumerable (non-configurable), which sinon cannot stub. Switch
pretest to compile with tsc, which generates writable exports.exports.*
assignments that sinon can stub.

Also remove compile-tests script (now inlined in pretest), fix .vscodeignore
to exclude out/test/ from the vsix package, and update .gitignore to include
dist/.
- bundle: true with dist/extension.js as output (single file, tree-shaken)
- restore --production flag for minification on publish
- tests still compile via tsc into out/ (sinon-compatible writable exports)
- clean .gitignore: remove Next.js/CRA leftovers, fix tsbuildinfo glob
- fix .vscodeignore: exclude out/ (test artefacts), keep dist/
pretest must run esbuild (dist/extension.js) before vscode-test, since
VS Code loads the extension from the main entry point during tests.
tsc still compiles test files to out/ for sinon compatibility.
- tsc compiles tests to dist/ (was out/)
- vscode-test looks for dist/test/**/*.test.js
- .vscodeignore excludes dist/test/ from vsix
- .gitignore drops the now-unused out/ entry
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