Repository navigation
fix(oxc-plugin): stop installing a flaky oxlint-tsgolint and a vulnerable oxfmt - #269
Merged
Merged
Conversation
🦋 Changeset detectedLatest commit: e1ced7f The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
rqbazan
force-pushed
the
chore/bump-tsgolint
branch
from
October 18, 2026 00:00
7aae95a to
c01d85f
Compare
oxlint-tsgolint 0.23.0 bundles a typescript-go whose macOS realpath (fcntl F_GETPATH) can lose its buffer under concurrent module resolution, so `rr tsc` fails at random with TS2307 on installed modules (microsoft/typescript-go#4060, fixed in #4178). - install range: ^0.23.0 -> ^7.0.2004, which also matches the >=7.0.2003 peer that current oxlint (installed as ^1.0.0) needs - peer range: >=0.15.0 -> >=0.24.0, so the parity test rejects an install range that includes the broken release - dx devDependencies: 0.23.0 -> 0.25.0, the fixed 0.x that still fits the locked oxlint 1.66 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V4iz3teZoyUZW9nXnX9RQr
oxfmt up to 0.66.0 pins tinypool 2.1.0, which has two critical advisories (GHSA-5gmw-xhrv-c9v3, GHSA-85c8-ppgw-ccpr), so every project set up with `rr plugins add oxc` inherited them. 0.73.0 is the latest oxfmt and pins tinypool 2.2.0, matching the devDependency dx already uses. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V4iz3teZoyUZW9nXnX9RQr
oxfmt below 0.67.0 pins tinypool 2.1.0 (two critical advisories). A >=0.67.0 floor makes pnpm warn projects still on a vulnerable oxfmt, and makes the TOOL_VERSIONS parity test reject an install range that includes one, the same way the >=0.24.0 floor does for oxlint-tsgolint. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V4iz3teZoyUZW9nXnX9RQr
rqbazan
force-pushed
the
chore/bump-tsgolint
branch
from
October 18, 2026 00:06
f7e2247 to
e1ced7f
Compare
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
rr plugins add oxchands new projectsoxlint-tsgolint@^0.23.0. That version bundles a typescript-go whose macOSrealpathbreaks under concurrency, sorr tsc/rr checkfail at random with TS2307 on modules that are installed. theme-toggle got the pin from here and hit the bug (withvariablelab/theme-toggle#18 has the full diagnosis).It also hands them
oxfmt@^0.51.0. oxfmt up to 0.66.0 pinstinypool@2.1.0, which has two critical advisories (GHSA-5gmw-xhrv-c9v3, GHSA-85c8-ppgw-ccpr). See oxfmt 0.73 below.Upstream: microsoft/typescript-go#4060, fixed by microsoft/typescript-go#4178 (darwin only), reported against tsgolint in oxc-project/tsgolint#987.
Plus a patch changeset for
@rrlab/oxc-plugin. The lockfile diff only touchesoxlint-tsgolintentries.The two peer floors exist only to warn
The new
>=0.24.0(tsgolint) and>=0.67.0(oxfmt) floors exist only to flag broken or vulnerable versions. Every oxfmt from 0.30.0 to 0.66.0 pins the vulnerable tinypool 2.1.0. tsgolint 0.23.0 is the broken one (0.15–0.22 are fine but outdated; see below). Neither floor blocks an install: when a project updates@rrlab/oxc-pluginwhile still on one of those versions, pnpm 10 and npm 11 both install and print a peer warning (checked). Each floor also turns the existingtool-versions.test.ts(subset(install, peer)) into a regression test: it fails ifinstallever goes back to a broken or vulnerable range.Why the ranges differ
install→^7.0.2004.install()addsoxlint@^1.0.0in the same step, and today that resolves to 1.88.0, which needsoxlint-tsgolint >=7.0.2003. With^0.25.0a new project would still get a broken peer pair:npm ifails with ERESOLVE, and pnpm prints a warning. Pairing 1.88.0 with 7.0.2004 installs with no warning. 7.0.2004 bundles the same typescript-go commit as 0.25.0 (2bd066d), and that commit has the fix. Decision 010 also says to pin 0.x tools to the latest on npm, which is now 7.0.2004. (The old^0.23.0has broken this peer pair ever since oxlint 1.75.)0.25.0. dx's own lockfile keeps oxlint 1.66.0 / 1.50.0, which accept>=0.22.1/>=0.14.1. 0.25.0 is the newest 0.x and fixes the bug without touching oxlint. Bumping oxlint to 1.75+ (and tsgolint to 7.x with it) would also edit the rootpackage.jsonand lockfile that the vulnerabilities PR is changing, so it is left out.>=0.24.0. 0.23.0 is the only tsgolint release with the bug (table below). With this floor, pnpm warns anyone still on 0.23.0, and the existingtool-versions.test.ts(subset(install, peer)) fails ifinstallever goes back to a broken range. 0.15–0.22 are fine but only pair with oxlint from before May (1.66 already needs>=0.22.1), so a plain floor beats>=0.15.0 <0.23.0 || >=0.24.0. Raising a peer floor is usually a breaking change. Here the tsgolint peer is optional, and both floors only make pnpm warn, so this ships as a patch.The typescript-go submodule pinned by each tsgolint tag, compared on GitHub:
c282336c080da62bd066d2bd066doxfmt 0.73
oxfmt pins
tinypoolto an exact version. Up to 0.66.0 that is 2.1.0, which both critical advisories cover (they are fixed in 2.1.2). 0.67.0–0.69.0 pin 2.1.2, and 0.73.0 (latest) pins 2.2.0.^0.73.0matches theoxfmtdevDependency that dx#273 already set, and oxfmt has no peer link to oxlint or tsgolint. The peer goes from>=0.30.0to>=0.67.0, the first oxfmt that pins a fixed tinypool (2.1.2).Evidence
Regression test. Put
installback to^0.23.0and the test fails:The same goes for oxfmt: put
installback to^0.51.0and the test fails:With this PR:
Tests 8 passed (8).The bug, in a project that gets the plugin's tools (theme-toggle), macOS arm64:
oxlint --type-aware --type-checkfailedrr check: 4 / 40)GOMAXPROCS=1rr check: 0 / 50)installpair)The full
installset in a fresh pnpm project (pnpm add -D oxlint@^1.0.0 oxfmt@<range> oxlint-tsgolint@<range>):^0.51.0/^0.23.0)^0.73.0/^7.0.2004)✕ unmet peer oxlint-tsgolint@>=7.0.2003: found 0.23.0tinypoolpnpm audit.>oxfmt>tinypool)oxlint --type-aware --type-check/oxfmt --checkdx itself:
pnpm build && pnpm test && pnpm rr checkpass.pnpm rr checkfailed 0 / 60 before the bump and 0 / 60 after (plus 0 / 30 after rebasing onto dx#272 and dx#273). dx never reproduced the bug, even before the bump, so this loop only shows that nothing broke.CI can't show this bug. It runs on Ubuntu, and the broken code is darwin-only.
Merge Danger
Door: two-way
Reverting this PR and publishing a patch puts the old ranges back.
Blast Radius: new-installs
After a release,
rr plugins add oxcinstalls tsgolint 7.x, which bundles a newer typescript-go, so new projects can see different type-check results than 0.23 gave. It also installs oxfmt 0.73, which can format some files differently than 0.51. Existing projects keep whatever they have. The only change for them is a pnpm peer warning if they are on tsgolint < 0.24 or oxfmt < 0.67, and that warning is the point of the floors.🤖 Generated with Claude Code
https://claude.ai/code/session_01V4iz3teZoyUZW9nXnX9RQr