Skip to content

fix(deps): drop deprecated transitive packages and refresh tooling#183

Open
adrianschmidt wants to merge 4 commits into
mainfrom
update-deps
Open

fix(deps): drop deprecated transitive packages and refresh tooling#183
adrianschmidt wants to merge 4 commits into
mainfrom
update-deps

Conversation

@adrianschmidt

@adrianschmidt adrianschmidt commented Jun 2, 2026

Copy link
Copy Markdown
Collaborator

What

Dependency refresh focused on removing deprecated packages from the
production dependency tree, plus an ESLint 9 flat-config migration
and safe tooling/type bumps.

Deprecation fixes (the motivation)

  • Removed the unused direct glob dependency.
  • Replaced lnk with native fs.symlink in the docs generator.
    lnk was the only remaining path to rimraf@2 → glob@7; it was used
    solely on a guarded, watch-mode-only code path.
  • chokidar ^3.3.1 → ^3.6.0 — replaces bundled fsevents@2.1.3
    with fsevents@2.3.3.
  • puppeteer ^22 → ^24.
  • ESLint 8 → 9 via a flat-config migration (see below) — removes
    the @humanwhocodes/* and eslint@8 deprecation warnings.

After this, the production tree contains no glob and no lnk and
resolves a maintained fsevents, and npm ci reports no deprecation
warnings at all
. The cleaned-up production tree is what clears the
fsevents/glob warnings seen by consumers such as lime-elements
(which only installs kompendium's runtime deps).

ESLint 9 flat-config migration

eslint.config.mjs is converted from the FlatCompat shim to native
flat config. Plugin recommended configs are consumed directly:
@typescript-eslint (flat/eslint-recommended), eslint-plugin-sonarjs
(flat recommended), eslint-plugin-jsdoc (flat/recommended),
eslint-plugin-prettier (eslint-plugin-prettier/recommended).
eslint-plugin-sonarjs is bumped 0.25 → 1.x (0.25 only supports
ESLint ≤8). The unused @eslint/eslintrc dependency is removed. All
custom rules and file-specific overrides are preserved.

Tooling / types

Stencil, typescript-eslint, prettier (3.8), eslint plugins, @types/*,
fuse.js (6.6 — FuseOptionKey is now generic; search key type updated
to match), yaml. The .scss diffs are prettier 3.8 reformatting only.

Verification

npm run lint (0 warnings), npm run build, npm test
(96 passed / 5 skipped) all green. npm ci is free of deprecation
warnings.

Summary by CodeRabbit

  • Chores
    • Updated linting/tooling setup and refreshed development dependencies.
    • Bumped the YAML dependency to 2.9.0.
  • Style
    • Reformatted CSS variables and shadow styling for consistent readability (no visual/value changes).
  • Refactor
    • Improved symlink creation during kompendium generation/watching using native filesystem APIs.
    • Tightened index key typing in kompendium search (no runtime behavior change).

@coderabbitai

coderabbitai Bot commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 054bbab2-a6e3-4984-9c74-4cfb067bc8b4

📥 Commits

Reviewing files that changed from the base of the PR and between f500311 and 7173329.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (9)
  • eslint.config.mjs
  • package.json
  • scripts/utils/vermoji.js
  • src/components/navigation/navigation.scss
  • src/kompendium/generator.ts
  • src/kompendium/search.ts
  • src/style/colors.scss
  • src/style/dev-server-modal.scss
  • src/style/shadows.scss
💤 Files with no reviewable changes (1)
  • scripts/utils/vermoji.js
✅ Files skipped from review due to trivial changes (3)
  • src/style/dev-server-modal.scss
  • src/kompendium/search.ts
  • src/style/colors.scss
🚧 Files skipped from review as they are similar to previous changes (3)
  • src/kompendium/generator.ts
  • package.json
  • eslint.config.mjs

📝 Walkthrough

Walkthrough

This PR modernizes the build tooling by migrating ESLint to native flat-config format, bumps development dependencies, refactors generator symlink creation to use Node's built-in APIs, improves type safety in the search module, and reformats SCSS files for visual consistency without functional changes.

Changes

ESLint migration and code improvements

Layer / File(s) Summary
ESLint flat-config setup
eslint.config.mjs
Replaces FlatCompat and compat.extends(...) with direct flat-config imports (js.configs.recommended, typescriptEslint.configs['flat/eslint-recommended'], sonarjs.configs.recommended, jsdoc.configs['flat/recommended'], prettierRecommended); removes explicit languageOptions override from TypeScript file pattern.
Dependency version updates
package.json
Removes @eslint/eslintrc and bumps versions for @eslint/js, @typescript-eslint/*, eslint, prettier, and ESLint plugins; updates yaml from ^2.8.3 to ^2.9.0.
Lint compliance refresh
scripts/utils/vermoji.js
Removes eslint-disable-next-line no-constant-condition comment; the while(true) loop now passes validation under updated ESLint rules.
Symlink generation refactoring
src/kompendium/generator.ts
Replaces external lnk helper with native fs/promises.symlink() call; updates imports to include symlink from fs/promises.
Search type annotation
src/kompendium/search.ts
Constrains keys array type from Fuse.FuseOptionKey[] to Array<Fuse.FuseOptionKey<KompendiumDocument>> for stricter type safety.

SCSS formatting consolidation

Layer / File(s) Summary
CSS custom property multi-line formatting
src/components/navigation/navigation.scss, src/style/colors.scss, src/style/dev-server-modal.scss, src/style/shadows.scss
Reformats CSS variable declarations into consistent multi-line layout (colors, button shadows, shadow depths, showcase values) across light and dark modes without changing computed values or behavior.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 Flat configs hop with lighter grace,
No more compat in this place,
TypeScript stricter, styles align,
Node symlinks now—so fine!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main changes: removing deprecated transitive dependencies (lnk, glob) and upgrading ESLint to flat-config with refreshed tooling versions.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch update-deps
⚔️ Resolve merge conflicts
  • Resolve merge conflict in branch update-deps

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 and usage tips.

@adrianschmidt adrianschmidt marked this pull request as ready for review June 2, 2026 14:53

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
src/kompendium/search.ts (1)

20-33: ⚠️ Potential issue | 🟠 Major

Fix Fuse.js key typing: FuseOptionKey is not generic in v6.6.2

Fuse.js’ shipped TypeScript types define the search “key” typing via FuseOptionKey / FuseOptionKeyObject (plus string / [string] forms), but not as FuseOptionKey<T>—so Array<Fuse.FuseOptionKey<KompendiumDocument>> is likely to fail TypeScript compilation. Use the non-generic Fuse.FuseOptionKey (or Fuse.FuseOptionKeyObject) typing instead, and apply KompendiumDocument-specific safety via a local helper type if needed.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/kompendium/search.ts` around lines 20 - 33, The keys array in
src/kompendium/search.ts uses a non-existent generic
Fuse.FuseOptionKey<KompendiumDocument>; change the typing to use the library's
non-generic Fuse.FuseOptionKey (or Fuse.FuseOptionKeyObject) and, if you want
KompendiumDocument-specific safety, create a local helper type that narrows
allowed string literals to properties of KompendiumDocument and use that for the
keys variable; update the declaration of keys (and any other uses) from
Array<Fuse.FuseOptionKey<KompendiumDocument>> to Array<Fuse.FuseOptionKey> (or
Array<Fuse.FuseOptionKeyObject>) and/or the local helper type so TypeScript
compiles against Fuse v6.6.2.
package.json (1)

53-53: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Typo in lint:src:fix glob skips .js files.

The extension list is {ts,tsx,j,mjs}j should be js. As written, eslint --fix won't process .js files (e.g. this eslint.config.mjs migration touches JS tooling), diverging from the other lint scripts on Lines 52/54. Pre-existing, but trivial to correct.

🐛 Proposed fix
-    "lint:src:fix": "eslint \"**/*.{ts,tsx,j,mjs}\" --fix --max-warnings=0 && prettier --write \"{!(package*).json,.prettierrc}\"",
+    "lint:src:fix": "eslint \"**/*.{ts,tsx,js,mjs}\" --fix --max-warnings=0 && prettier --write \"{!(package*).json,.prettierrc}\"",
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@package.json` at line 53, The npm script "lint:src:fix" in package.json has a
typo in its glob (uses "{ts,tsx,j,mjs}" so ".js" files are skipped); update the
glob in the "lint:src:fix" script to include "js" (e.g., "{ts,tsx,js,mjs}") so
ESLint --fix runs on .js files as intended, matching the other lint scripts.
🧹 Nitpick comments (1)
eslint.config.mjs (1)

27-27: ⚡ Quick win

Move prettierRecommended after the custom rules block.

eslint-plugin-prettier/recommended pulls in eslint-config-prettier, which disables formatting-related core rules. Because it sits before the block at Lines 51–173, the subsequent quotes, semi, comma-dangle, and multiline-ternary entries re-enable formatting rules that can conflict/double-report with Prettier. Convention is to place the Prettier config last. The order matters: prettierConfig goes after all other configs because it disables rules set by previous entries.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@eslint.config.mjs` at line 27, The eslint config currently lists
prettierRecommended before your custom rule overrides, which causes prettier's
disablements to be overridden; move the prettierRecommended entry to the end of
the extends array so it is applied last. Specifically, ensure the symbol
prettierRecommended is relocated after the custom rule block that contains the
rules quotes, semi, comma-dangle, and multiline-ternary so
eslint-config-prettier can properly disable formatting-related core rules and
avoid double-reporting.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/kompendium/generator.ts`:
- Line 98: The symlink call await symlink(source, target) should be wrapped in a
try/catch so failures are surfaced (instead of silently ignored); update the
code around the symlink invocation (referencing the symlink call and the
source/target variables that create kompendium.json at config.publicPath) to
catch errors and log or rethrow them, and optionally pass the 'file' type on
Windows (symlink(source, target, 'file')) if you want explicit file link
behavior.

---

Outside diff comments:
In `@package.json`:
- Line 53: The npm script "lint:src:fix" in package.json has a typo in its glob
(uses "{ts,tsx,j,mjs}" so ".js" files are skipped); update the glob in the
"lint:src:fix" script to include "js" (e.g., "{ts,tsx,js,mjs}") so ESLint --fix
runs on .js files as intended, matching the other lint scripts.

In `@src/kompendium/search.ts`:
- Around line 20-33: The keys array in src/kompendium/search.ts uses a
non-existent generic Fuse.FuseOptionKey<KompendiumDocument>; change the typing
to use the library's non-generic Fuse.FuseOptionKey (or
Fuse.FuseOptionKeyObject) and, if you want KompendiumDocument-specific safety,
create a local helper type that narrows allowed string literals to properties of
KompendiumDocument and use that for the keys variable; update the declaration of
keys (and any other uses) from Array<Fuse.FuseOptionKey<KompendiumDocument>> to
Array<Fuse.FuseOptionKey> (or Array<Fuse.FuseOptionKeyObject>) and/or the local
helper type so TypeScript compiles against Fuse v6.6.2.

---

Nitpick comments:
In `@eslint.config.mjs`:
- Line 27: The eslint config currently lists prettierRecommended before your
custom rule overrides, which causes prettier's disablements to be overridden;
move the prettierRecommended entry to the end of the extends array so it is
applied last. Specifically, ensure the symbol prettierRecommended is relocated
after the custom rule block that contains the rules quotes, semi, comma-dangle,
and multiline-ternary so eslint-config-prettier can properly disable
formatting-related core rules and avoid double-reporting.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 3799a544-f249-4eea-94e6-a2a5051e7c9e

📥 Commits

Reviewing files that changed from the base of the PR and between c2636ac and f500311.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (9)
  • eslint.config.mjs
  • package.json
  • scripts/utils/vermoji.js
  • src/components/navigation/navigation.scss
  • src/kompendium/generator.ts
  • src/kompendium/search.ts
  • src/style/colors.scss
  • src/style/dev-server-modal.scss
  • src/style/shadows.scss
💤 Files with no reviewable changes (1)
  • scripts/utils/vermoji.js

Comment thread src/kompendium/generator.ts Outdated
adrianschmidt and others added 4 commits June 18, 2026 12:22
Shrink the dependency footprint that surfaced deprecation warnings in
consumers (most notably lime-elements):

- Drop the unused direct `glob` dependency.
- Replace `lnk` with a native `fs.symlink` call in the docs generator.
  `lnk` was the last thing pulling in `rimraf@2` -> `glob@7`, and it was
  only used on a guarded, watch-mode-only code path.
- Bump `chokidar` to ^3.6.0, replacing the bundled `fsevents@2.1.3` with
  `fsevents@2.3.3`.
- Bump `puppeteer` to ^24.

The production dependency tree now contains neither `glob` nor `lnk`,
and resolves a maintained `fsevents`.

Also refresh dev tooling and types (Stencil, typescript-eslint,
prettier, eslint plugins, @types/*, fuse.js, yaml). `fuse.js` 6.6 made
`FuseOptionKey` generic, so the search index key type is updated to
match. The .scss changes are prettier 3.8 reformatting only.

ESLint stays on 8.x: moving to 9 requires a flat-config migration,
since eslint-plugin-sonarjs now ships its recommended config in
flat-config format that the current FlatCompat setup cannot consume.
Convert eslint.config.mjs from the FlatCompat shim to native flat
config, which unblocks ESLint 9. Plugin recommended configs are now
consumed directly instead of through FlatCompat:

- @typescript-eslint via configs['flat/eslint-recommended']
- eslint-plugin-sonarjs (1.x) via its flat `recommended`
- eslint-plugin-jsdoc via configs['flat/recommended']
- eslint-plugin-prettier via eslint-plugin-prettier/recommended

eslint-plugin-sonarjs is bumped 0.25 -> 1.x: 0.25 only supports ESLint
<=8, and its newer recommended config ships in flat-config format that
FlatCompat cannot consume. All custom rules and file-specific overrides
are preserved.

Also remove the now-unused @eslint/eslintrc dependency and drop a stale
no-constant-condition disable directive (ESLint 9 no longer flags
`while (true)` by default).

This eliminates the @humanwhocodes/* and eslint@8 deprecation warnings;
npm ci is now free of deprecation warnings.
In watch mode the generator symlinks the public `kompendium.json`
(under `publicPath`, e.g. `www/`) to the real file in the config
folder (under `path`, e.g. `.kompendium/`). The link was created with
a relative source, which the OS resolves relative to the link's own
directory (`publicPath`) rather than the cwd -- producing a broken
link (`www/.kompendium/kompendium.json`) and a 404 for the docs data
on every dev-server reload.

Resolve the source to an absolute path so the link is valid regardless
of its location. Keeps the native `fs.symlink` (no reintroduction of
the removed `lnk`/`glob` dependency).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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