Skip to content

Cleaned up dead deps in Koenig packages - #29223

Merged
9larsons merged 2 commits into
mainfrom
slars/koenig-lexical-coverage-v8
Jul 9, 2026
Merged

Cleaned up dead deps in Koenig packages#29223
9larsons merged 2 commits into
mainfrom
slars/koenig-lexical-coverage-v8

Conversation

@9larsons

@9larsons 9larsons commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Dependency cleanup for two koenig packages, found while auditing test-tooling after the mocha→vitest and should→expect work.

1. Fixed the coverage provider

koenig-lexical depended on @vitest/coverage-c8@0.33.0 — the deprecated c8 provider (renamed to @vitest/coverage-v8 long ago), pinned to an ancient version while vitest is 4.1.9, so its coverage script couldn't load it. Swapped to @vitest/coverage-v8: catalog:, matching every other koenig package.

2. Removed dead dependencies

Verified with depcheck and then checked by hand against every config file (depcheck misses config-referenced deps).

koenig-lexical — removed:

  • @emoji-mart/react — the code imports the base emoji-mart Picker, never the react wrapper
  • @tryghost/kg-converters — zero references anywhere
  • cross-fetch — unreferenced (incl. test setup)
  • @babel/core, @babel/plugin-proposal-private-property-in-object, babel-loader — dead webpack/babel toolchain; Storybook here is @storybook/react-vite (no webpack/babel config)
  • codemirror (the v6 meta-package) — all CodeMirror usage is via the individually-declared @codemirror/* packages

kg-unsplash-selector — removed:

  • concurrently (in no script), vite-plugin-css-injected-by-js (not in vite.config)

Kept (depcheck false positives, proven live via config)

postcss / autoprefixer / postcss-import (postcss.config.cjs), the @storybook/* addons + @etchteam/storybook-addon-status (.storybook/main.ts), prettier-plugin-organize-attributes (test/utils/e2e.ts).

Verification

  • koenig-lexical: pnpm build, build-storybook, and test:unit (116 pass) all green.
  • kg-unsplash-selector: build + lint green.
  • Not CI-impacting (koenig coverage isn't run in CI).

no ref

- koenig-lexical still depended on @vitest/coverage-c8@0.33.0 — the deprecated
  c8 coverage provider (renamed to @vitest/coverage-v8 long ago), pinned to an
  ancient 0.33.0 while vitest itself is 4.1.9. Its `coverage` script
  (`vitest run --coverage`) would fail to load that provider against vitest 4
- swaps it for `@vitest/coverage-v8: catalog:`, the same provider every other
  koenig package (and the wider monorepo) already uses, so the coverage script
  works and the dependency is centrally versioned
- test-tooling only; coverage is not run in CI for koenig, so no CI impact
@nx-cloud

nx-cloud Bot commented Jul 9, 2026

Copy link
Copy Markdown

🤖 Nx Cloud AI Fix

Ensure the fix-ci command is configured to always run in your CI pipeline to get automatic fixes in future runs. For more information, please see https://nx.dev/ci/features/self-healing-ci


View your CI Pipeline Execution ↗ for commit d7a9222

Command Status Duration Result
nx run @tryghost/admin-x-settings:test:acceptance ✅ Succeeded 10m 59s View ↗
nx run-many --target=build --projects=tag:publi... ✅ Succeeded <1s View ↗
nx run ghost:test:ci:integration ✅ Succeeded 2m 39s View ↗
nx run-many -t test:unit -p @tryghost/kg-unspla... ✅ Succeeded 9m 7s View ↗
nx run ghost:test:integration ✅ Succeeded 2m 43s View ↗
nx run @tryghost/admin:build ✅ Succeeded 2m 51s View ↗
nx run ghost:test:legacy ✅ Succeeded 3m 19s View ↗
nx run @tryghost/koenig-lexical:test:acceptance ✅ Succeeded 2m 50s View ↗
Additional runs (11) ✅ Succeeded ... View ↗

💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗


☁️ Nx Cloud last updated this comment at 2026-07-09 21:48:16 UTC

@coderabbitai

coderabbitai Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

The Koenig Lexical package replaces @vitest/coverage-c8 with @vitest/coverage-v8 in devDependencies. The Unsplash selector package removes the concurrently and vite-plugin-css-injected-by-js devDependencies.

Possibly related PRs

Suggested reviewers: EvanHahn, acburdine

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title matches the main change: removing unused dependencies and cleaning up package deps in Koenig packages.
Description check ✅ Passed The description is directly about the dependency cleanup and coverage provider update reflected in the diff.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch slars/koenig-lexical-coverage-v8

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@9larsons
9larsons enabled auto-merge (squash) July 9, 2026 21:22
@9larsons
9larsons disabled auto-merge July 9, 2026 21:28
@codecov

codecov Bot commented Jul 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.04%. Comparing base (f30b7b3) to head (d7a9222).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #29223      +/-   ##
==========================================
- Coverage   74.07%   74.04%   -0.04%     
==========================================
  Files        1570     1570              
  Lines      136625   136625              
  Branches    16532    16524       -8     
==========================================
- Hits       101205   101161      -44     
- Misses      34384    34428      +44     
  Partials     1036     1036              
Flag Coverage Δ
admin-tests 55.19% <ø> (ø)
e2e-tests 76.15% <ø> (-0.04%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

no ref

- depcheck (verified by hand against config files) surfaced several devDeps
  with zero references anywhere, incl. config/build tooling
- koenig-lexical: dropped @emoji-mart/react (code imports base emoji-mart, not
  the react wrapper), @tryghost/kg-converters (unreferenced), cross-fetch
  (unreferenced), and the dead webpack/babel toolchain @babel/core /
  @babel/plugin-proposal-private-property-in-object / babel-loader (Storybook
  here is @storybook/react-vite, there is no webpack/babel config) plus the
  codemirror v6 meta-package (all CodeMirror usage is via the individually
  declared @codemirror/* packages)
- kg-unsplash-selector: dropped concurrently (in no script) and
  vite-plugin-css-injected-by-js (not in vite.config)
- verified nothing regressed: koenig-lexical `pnpm build`, `build-storybook`
  and `test:unit` (116 pass) all green; kg-unsplash-selector build + lint green
- kept the config-referenced deps depcheck false-flagged (postcss/autoprefixer/
  postcss-import, the @storybook/* addons, prettier-plugin-organize-attributes)
@9larsons 9larsons changed the title Changed koenig-lexical to the v8 coverage provider Cleaned up koenig-lexical + kg-unsplash-selector test-tooling dependencies Jul 9, 2026
@9larsons 9larsons changed the title Cleaned up koenig-lexical + kg-unsplash-selector test-tooling dependencies Cleaned up dead deps in Koenig packages Jul 9, 2026
@9larsons
9larsons enabled auto-merge (squash) July 9, 2026 21:41
@9larsons
9larsons merged commit 5a656bb into main Jul 9, 2026
51 checks passed
@9larsons
9larsons deleted the slars/koenig-lexical-coverage-v8 branch July 9, 2026 21:52
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