Keep caniuse-lite up to date to prevent a stylelint error - #1720
Conversation
|
Warning Review limit reached
Next review available in: 37 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (9)
📝 WalkthroughWalkthroughThe pull request updates Precious command handling, TypeScript compiler settings, GeoIP documentation formatting, and development dependencies. ChangesTooling and documentation updates
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
Deploying dev-site with
|
| Latest commit: |
30205a3
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://a332b888.dev-site-4ua.pages.dev |
| Branch Preview URL: | https://wstorey-fix-ci-stale-caniuse.dev-site-4ua.pages.dev |
There was a problem hiding this comment.
Pull request overview
This PR addresses a recurring CI lint failure caused by Browserslist emitting a stale-data warning to stderr when its bundled caniuse-lite data becomes older than six months, which precious treats as a failure. It promotes caniuse-lite to a direct devDependency so Dependabot will keep it updated and prevent timer-based workflow breakage.
Changes:
- Add
caniuse-liteas a directdevDependencyso it is tracked by Dependabot. - Update the lockfile to a newer
caniuse-liteversion and refreshbaseline-browser-mappingto the currently resolved version.
Reviewed changes
Copilot reviewed 1 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
package.json |
Adds caniuse-lite to devDependencies so Dependabot updates it directly. |
pnpm-lock.yaml |
Records the new direct dependency and updates resolved versions for caniuse-lite (and baseline-browser-mapping). |
Files not reviewed (1)
- pnpm-lock.yaml: Generated file
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
84cb10c to
8874af2
Compare
Browserslist prints a warning to stderr once its bundled caniuse-lite data is six months old. stylelint itself still exits 0, but precious treats unexpected stderr as a command failure, so the Precious workflow started failing on main today without anything in the repo changing. caniuse-lite was a transitive dependency, so Dependabot never bumped it and it had not been refreshed since the npm to pnpm conversion in January. Promote it to a direct devDependency so the weekly minor-and-patch group keeps it current, matching what 9a55fd8 did for baseline-browser-mapping for the same reason. Deliberately not silencing the warning: plugin/no-unsupported-browser- features reads this data, so stale data quietly degrades that rule. The build failure is the signal that it went stale. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
TypeScript 6 rejects the deprecated `baseUrl` option, so `tsc` exited 2 before checking anything. Removing it is safe: every import is either relative or a bare package name, so nothing relied on it. That unmasked two further errors. Node's globals were no longer resolving, so `types` now names `node` explicitly. And `tsconfig.format-rawhtml.json` needs an explicit `rootDir` under TypeScript 6; `bin` is the directory that was previously inferred, so the output path is unchanged. `pnpm run format:rawhtml` had been exiting 2 on every file, which meant rawhtml content was silently going unformatted. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Pure `pnpm run format:rawhtml` output, now that it runs again. No content changes, only rewrapping inside rawhtml blocks. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
`precious lint --all` took about 219s, nearly all of it process startup. `invoke` defaults to per-file, and only three commands overrode it, so the rest spawned a `pnpm` process for every matching file. cspell was the worst of these. It ran 143 times, and because `lint:cspell` hardcodes its own `**/*.md` glob, each run rechecked the whole repository: 143 full-repository spell checks, 143s. Four commands find their own targets and ignore any path args they are given, so they now pass none. For `lint:scripts` this is required rather than merely tidy: path args are appended to the whole npm script, so they land on the trailing `eslint .`, and ESLint reports an explicitly-named file that it is configured to ignore as a warning, which --max-warnings=0 turns fatal. `lint-scripts` also matched no files at all, because its include patterns were the only ones written with a leading `./`, which never matches. So neither `tsc` nor eslint has actually been running under precious. `precious lint --all` is now about 17s. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
prettier-scripts baked --write into cmd and appended --check via lint-flags, so linting ran `prettier --write --check`. Prettier honors --write regardless: it reformatted the file on disk and exited 0, and precious only failed the command because of the unexpected stderr. The pre-commit hook runs `precious lint --staged`, so a file could be reformatted in the working tree without being restaged, letting a commit record unformatted content while the tree looked clean. tidy-flags already supplies --write, so dropping it from cmd leaves tidy unchanged and makes lint read-only. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
8874af2 to
e168d40
Compare
`types` is a project-wide option, so adding `node` to make `tsc` work on bin/ also hands the Node globals to the browser code in assets/js/. There, `process.env` now type checks clean but throws a ReferenceError in a browser, and setTimeout returns Node's Timeout rather than number. `lib` has always leaked the same way in reverse, letting bin/ reference `document`. Nothing is broken today — no file in assets/js/ touches a Node API. But before TypeScript 6 stopped auto-loading @types/node, tsc would have caught one, so this trades away a check that was incidentally working. Leaving it as is for now and noting the cost, plus what fixing it would involve, so the next reader doesn't take the line at face value. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Problem
The Precious workflow started failing on
maintoday without anything in the repo changing.Browserslist prints a warning to stderr once its bundled
caniuse-litedata is six months old. stylelint itself still exits 0, butprecioustreats unexpected stderr as a command failure, so the lint broke on a timer:Why it recurred
9a55fd87fixed this same class of bug in January by promotingbaseline-browser-mappingto a direct devDependency so Dependabot keeps it fresh. That fix was correct and has worked —baseline-browser-mappinghas been bumped 9 times since, and has never re-broken CI.But browserslist carries two independent stale-data packages with separate warnings and separate clocks:
baseline-browser-mappingcaniuse-lite(browserslistoldDataWarning)Only the first was promoted.
caniuse-litestayed transitive, so Dependabot never targeted it — it was bumped just once, incidentally, on Feb 23 (bd02b870) riding along on an unrelated group bump. That version was published Feb 23; six months later is today.Fix
Promote
caniuse-liteto a direct devDependency so the weeklyminor-and-patchgroup keeps it current, matching the approach already proven forbaseline-browser-mapping.Deliberately not silencing the warning.
plugin/no-unsupported-browser-featuresis active in.stylelintrc.cjswith a hand-curatedignorelist justified by specific IE11/Safari support notes, and that rule reads this data. Suppressing the warning would let it quietly check against outdated support tables with nobody finding out. The build failure is the signal that the data went stale.Testing
update-browserslist-dbreports "No target browser changes", so no lint results shift.pnpm install --frozen-lockfile(what CI runs) from a cleannode_modules, thenprecious lint --all: 425 passed, 0 failures, exit 0.🤖 Generated with Claude Code
Summary by CodeRabbit
Chores
Documentation