Repository navigation
Conversation
@aboutbits/eslint-config 5 only supports TypeScript 5, so both are updated together. The CommonJS build keeps the deprecated node10 resolution until the package becomes ESM-only.
useMatchMediaQuery now uses useSyncExternalStore instead of calling hooks conditionally, and LocationProvider fetches the location again when highAccuracy changes.
The tsc builds for CommonJS and ESM are replaced by a single tsdown build.
The Jest rules need the jest package to detect its version, which is no longer installed since the tests run on Vitest.
The lockfile kept @typescript-eslint/parser nested under @aboutbits/eslint-config, where eslint-plugin-import cannot resolve it.
lukasvice
reviewed
Dec 3, 2026
| // set explicitly, otherwise tsdown derives a Node target from engines.node | ||
| target: 'es2025', | ||
| dts: true, | ||
| exports: true, |
Member
There was a problem hiding this comment.
With a single bundle, the createContext(...) call from LocationProvider sits at the top level of dist/index.js, so every import of the package runs it. That breaks AsyncView in a Server Componen-
unbundle: true restores that, as in aboutbits/react-ui#398.
Suggested change
| exports: true, | |
| exports: true, | |
| unbundle: true, |
| "peerDependencies": { | ||
| "react": "^18.0.0 || ^19.0.0" | ||
| "react": "^19.0.0", | ||
| "react-dom": "^19.0.0" |
Member
There was a problem hiding this comment.
react-dom is a new peer dependency, but nothing in src outside the tests imports it, and the build output only imports react and react/jsx-runtime. Can we drop it here? It stays a dev dependency for the tests.
| "prepublishOnly": "npm run checks", | ||
| "prepare": "npm run build", | ||
| "preversion": "npm run checks", | ||
| "version": "npm run test && npm run lint && git add -A src", |
Member
There was a problem hiding this comment.
Nit: preversion already runs npm run checks, so test and lint run twice on a release. react-pagination has just git add -A src here.
Suggested change
| "version": "npm run test && npm run lint && git add -A src", | |
| "version": "git add -A src", |
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.
Why
Move the package to the same baseline as the other About Bits libraries: Node 26, ESM-only, React 19 only, TypeScript 6 and the current About Bits ESLint and TypeScript configs.
What changed
The package now ships one ESM bundle with type declarations, built by tsdown, and runs its tests with Vitest.
"type": "module", anexportsmap with the root entry only), peerreactandreact-dom^19,engines.node>=26. The exported names are unchanged.~6.0,@aboutbits/eslint-config6 with the React rules,@aboutbits/ts-config1.2, Vitest 5 with jsdom in place of Jest, CI on Node 26 only.useMatchMediaQueryandLocationProviderchange behaviour, see below.Review notes
useSyncExternalStore. During server rendering and hydration it returnsundefined, then the real value.highAccuracychanges, instead of only on mount. A result that settles after a newer request is dropped.@aboutbits/eslint-config6.2 allows onlytypescript <6.1.@aboutbits/eslint-confighas no Vitest config, and the Jest rules fail without thejestpackage.vitest/globals.target: 'es2025'explicitly; otherwise tsdown derives a Node target fromengines.node..jscopies next to the sources insrc/; they are removed.Where to look
highAccuracychanges, and this guard decides which result the context shows.undefinedduring server rendering and hydration.Test scope
useMatchMediaQuery: updates, removal on unmount, and a new query.LocationProviderhas no tests.package-lock.jsonis regenerated and can be skipped.Risk: needs a human review, assessed at 76dbcb0
src/useMatchMediaQuery/__test__/useMatchMediaQuery.test.tsx; only a check of its fix.