fix(node): prefer Module#registerHooks over Module#register#20028
fix(node): prefer Module#registerHooks over Module#register#20028WarningImHack3r wants to merge 1 commit intotailwindlabs:mainfrom
Conversation
WalkthroughThis PR refactors the ESM cache loader's module hook registration mechanism. The 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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 `@packages/`@tailwindcss-node/src/esm-cache.loader.mts:
- Around line 1-7: The import list includes a non-existent type ResolveHookSync
from 'node:module'; remove ResolveHookSync from the import statement in
packages/@tailwindcss-node/src/esm-cache.loader.mts and either use the correct
Node exported type (e.g., ResolveHook or ResolveFnOutput) or add a local type
alias if you need a synchronous resolve-hook signature; update any usages of
ResolveHookSync to the chosen correct type name (e.g., ResolveHook) so the
module import and type references are consistent.
🪄 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: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 795f172f-edda-4b85-995c-53de79a937da
📒 Files selected for processing (4)
packages/@tailwindcss-node/package.jsonpackages/@tailwindcss-node/src/esm-cache.loader.mtspackages/@tailwindcss-node/src/index.ctspackages/@tailwindcss-node/src/index.ts
💤 Files with no reviewable changes (1)
- packages/@tailwindcss-node/package.json
Confidence Score: 4/5The change is safe to merge. The The core logic is sound and the deprecation fix is correct. The one subtlety worth watching is that tsup bundles
Reviews (1): Last reviewed commit: "fix(node): prefer Module#registerHooks i..." | Re-trigger Greptile |
| if (isBuiltin(result.url)) return result | ||
| if (!context.parentURL) return result | ||
| function processResolve(context: ResolveHookContext, resolve: ResolveFnOutput) { | ||
| if (resolve.url === import.meta.url) return resolve |
There was a problem hiding this comment.
import.meta.url points to the wrong file when bundled
When tsup builds index.cts/index.ts, it inlines esm-cache.loader.mts into the output bundle (it is a local import without an external rule). Inside the bundled output, import.meta.url resolves to dist/index.mjs (or dist/index.js), not dist/esm-cache.loader.mjs. The self-reference guard if (resolve.url === import.meta.url) therefore compares against the wrong file — it will skip processing when index.mjs itself is resolved, rather than the loader. In practice this is benign because the id === null check at line 27 already short-circuits for any module whose parent has no ?id= query param, but the semantic intent of this guard is no longer correct in the registerHooks code path.
There was a problem hiding this comment.
Before this PR, esm-cache.loader.mts was not bundled — it was compiled to its own separate file (e.g., dist/esm-cache-loader.mjs) and loaded via:
Module.register?.(pathToFileURL(localRequire.resolve('@tailwindcss/node/esm-cache-loader')))Module#register loads the path you pass it as an independent module in its own context. Because of that, import.meta.url inside esm-cache.loader.mts correctly resolved to dist/esm-cache-loader.mjs — the loader file itself. The self-reference guard if (result.url === import.meta.url) return result was therefore semantically correct: it was asking "is the module being resolved this loader file?", preventing it from trying to rewrite its own URL.
With this PR, resolveSync is inlined into the main bundle alongside index.ts. import.meta.url now evaluates to dist/index.mjs rather than the loader file, so the guard compares against the wrong value. The original code was safe precisely because the file lived outside the bundle as its own module.
Tip: You can customize Greptile's behavior for this repo with .greptile/rules.md and .greptile/config.json.
There was a problem hiding this comment.
@greptile-apps how do you recommend me to fix this? Should I revert the separate bundling or instead adjust the logic inside processResolve? For the latter, what should I change?
There was a problem hiding this comment.
Good news: the tsup config already builds esm-cache.loader.mts as its own entry point (dist/esm-cache.loader.mjs). The problem is that the second build config (the ESM index.ts build) will inline resolveSync from the loader rather than treating it as an external import, since there's no external rule for it.
You have two clean options:
Option A — Mark the loader as external in the index build (recommended)
In tsup.config.ts, add external to the ESM index build so tsup emits import { resolveSync } from './esm-cache.loader.mjs' as a runtime import rather than inlining it. import.meta.url inside the loader will then correctly resolve to dist/esm-cache.loader.mjs at runtime.
| if (resolve.url === import.meta.url) return resolve | |
| { | |
| format: ['esm'], | |
| minify: true, | |
| dts: true, | |
| entry: ['src/index.ts'], | |
| external: ['./esm-cache.loader.mjs'], | |
| define: { | |
| 'process.env.NODE_ENV': '"production"', | |
| }, | |
| }, |
You'd need to do the same for the CJS build (src/index.cts) if it also imports from the loader.
Option B — Drop the import.meta.url guard (simpler)
The guard was always redundant: any module resolved without a ?id= param in its parent URL is already short-circuited by the id === null check a few lines later. Removing the guard fixes the stale import.meta.url reference with no behavioral change:
| if (resolve.url === import.meta.url) return resolve | |
| function processResolve(context: ResolveHookContext, resolve: ResolveFnOutput) { | |
| if (isBuiltin(resolve.url)) return resolve | |
| if (!context.parentURL) return resolve |
I'd lean toward Option A since it preserves the module boundary that the original Module#register architecture relied on, and makes import.meta.url semantically correct again for both the resolve (async) and resolveSync exports.
There was a problem hiding this comment.
@greptile-apps the tsup config sounds like a good idea, but there seems to already be everything in place in the existing config for separate bundling as far as I can tell (I'm no expert in bundling). I also compiled before and after the PR, and I couldn't spot any meaningful difference. Can you take another look at the tsup config? Can you also give me some test cases so that I can actually add a console.log in processResolve and confirm your hypothesis?
There was a problem hiding this comment.
You're right to question this — looking at the actual tsup config and code more carefully, I owe you a correction.
The tsup config is fine. esm-cache.loader.mts is its own entry point AND is imported as './esm-cache.loader.mjs' in index.ts. However, since tsup/esbuild bundles local imports by default, resolveSync (and processResolve) will be inlined into dist/index.mjs. That part of my original claim stands.
But the practical impact is almost certainly zero. Here's why:
- The
import.meta.urlguard short-circuits whenresolve.urlequalsimport.meta.url. With bundling,import.meta.url=dist/index.mjsinstead ofdist/esm-cache.loader.mjs. - The only way this would cause a real problem is if
dist/index.mjsitself got resolved through the hook (e.g., re-imported dynamically) and had a?id=param in its parent URL. That's not a realistic scenario. - The downstream
if (!context.parentURL) return resolveandif (id === null) return resolveguards already handle the cases the self-referential check was protecting against.
To verify with console.log, here are specific test cases:
function processResolve(context: ResolveHookContext, resolve: ResolveFnOutput) {
// Test 1: what does import.meta.url resolve to in the bundled output?
console.log('[loader] import.meta.url:', import.meta.url)
console.log('[loader] resolving:', resolve.url)
if (resolve.url === import.meta.url) {
console.log('[loader] SELF-GUARD triggered') // watch if/when this fires
return resolve
}
// ...rest of function
}Then build and run any project that uses the Tailwind Node integration. You should see:
import.meta.url= something like.../dist/index.mjs(notesm-cache.loader.mjs) — confirming bundling- The
SELF-GUARD triggeredlog should never appear during normal operation, confirming it's benign
Conclusion: My original concern was valid in theory but not in practice. I'd drop the issue — the PR is fine as-is. The redundant guard does no harm.
Tip: You can give me more context with .greptile/rules.md so I get this right next time.
There was a problem hiding this comment.
I'll leave this as-is unless a reviewer explicitly asks for a change.
Here is everything you need to know about this update. Please take a good look at what changed and the test results before merging this pull request. ### What changed? #### ✳️ eslint (9.33.0 → 9.35.0) · [Repo](https://github.com/eslint/eslint) · [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md) <details> <summary>Release Notes</summary> <h4><a href="https://github.com/eslint/eslint/releases/tag/v9.35.0">9.35.0</a></h4> <blockquote><h2 dir="auto">Features</h2> <ul dir="auto"> <li> <a href="https://bounce.depfu.com/github.com/eslint/eslint/commit/42761fa7c872fb9e14c144b692af6967b3662082"><code class="notranslate">42761fa</code></a> feat: implement suggestions for no-empty-function (<a href="https://bounce.depfu.com/github.com/eslint/eslint/pull/20057">#20057</a>) (jaymarvelz)</li> <li> <a href="https://bounce.depfu.com/github.com/eslint/eslint/commit/102f44442ac9bf1fcd4ba6ab9fae43ce09199df6"><code class="notranslate">102f444</code></a> feat: implement suggestions for no-empty-static-block (<a href="https://bounce.depfu.com/github.com/eslint/eslint/pull/20056">#20056</a>) (jaymarvelz)</li> <li> <a href="https://bounce.depfu.com/github.com/eslint/eslint/commit/e51ffff737ca245b3a1d115cb11e1c99737249a3"><code class="notranslate">e51ffff</code></a> feat: add <code class="notranslate">preserve-caught-error</code> rule (<a href="https://bounce.depfu.com/github.com/eslint/eslint/pull/19913">#19913</a>) (Amnish Singh Arora)</li> </ul> <h2 dir="auto">Bug Fixes</h2> <ul dir="auto"> <li> <a href="https://bounce.depfu.com/github.com/eslint/eslint/commit/10e7ae23e30ea0834d9fdeb3a2a1db8103c36cd2"><code class="notranslate">10e7ae2</code></a> fix: update uncloneable options error message (<a href="https://bounce.depfu.com/github.com/eslint/eslint/pull/20059">#20059</a>) (soda-sorcery)</li> <li> <a href="https://bounce.depfu.com/github.com/eslint/eslint/commit/bfa46013e7ea9a522c02f72250fa07160f96a6b8"><code class="notranslate">bfa4601</code></a> fix: ignore empty switch statements with comments in no-empty rule (<a href="https://bounce.depfu.com/github.com/eslint/eslint/pull/20045">#20045</a>) (jaymarvelz)</li> <li> <a href="https://bounce.depfu.com/github.com/eslint/eslint/commit/dfd11deb24fc733faa5db751a2f615eb04e48b15"><code class="notranslate">dfd11de</code></a> fix: add <code class="notranslate">before</code> and <code class="notranslate">after</code> to test case types (<a href="https://bounce.depfu.com/github.com/eslint/eslint/pull/20049">#20049</a>) (Francesco Trotta)</li> <li> <a href="https://bounce.depfu.com/github.com/eslint/eslint/commit/dabbe95c39671c5fa272da012ee1432aa088650f"><code class="notranslate">dabbe95</code></a> fix: correct types for <code class="notranslate">no-restricted-imports</code> rule (<a href="https://bounce.depfu.com/github.com/eslint/eslint/pull/20034">#20034</a>) (Milos Djermanovic)</li> <li> <a href="https://bounce.depfu.com/github.com/eslint/eslint/commit/ea789c7dd234c1a6be499a4644dd0f5c97615972"><code class="notranslate">ea789c7</code></a> fix: no-loss-of-precision false positive with uppercase exponent (<a href="https://bounce.depfu.com/github.com/eslint/eslint/pull/20032">#20032</a>) (sethamus)</li> </ul> <h2 dir="auto">Documentation</h2> <ul dir="auto"> <li> <a href="https://bounce.depfu.com/github.com/eslint/eslint/commit/d265515642f65246bcd45c17979f67c2afb12f95"><code class="notranslate">d265515</code></a> docs: improve phrasing - "if" → "even if" from getting-started section (<a href="https://bounce.depfu.com/github.com/eslint/eslint/pull/20074">#20074</a>) (jjangga0214)</li> <li> <a href="https://bounce.depfu.com/github.com/eslint/eslint/commit/a355a0e5b2e6a47cda099b31dc7d112cfb5c4315"><code class="notranslate">a355a0e</code></a> docs: invert comparison logic for example in <code class="notranslate">no-var</code> doc page (<a href="https://bounce.depfu.com/github.com/eslint/eslint/pull/20064">#20064</a>) (OTonGitHub)</li> <li> <a href="https://bounce.depfu.com/github.com/eslint/eslint/commit/5082fc206de6946d9d4c20e57301f78839b3b9f2"><code class="notranslate">5082fc2</code></a> docs: Update README (GitHub Actions Bot)</li> <li> <a href="https://bounce.depfu.com/github.com/eslint/eslint/commit/99cfd7e056e1703941c9eb8ca1ae7fdb1987ba9d"><code class="notranslate">99cfd7e</code></a> docs: add missing "the" in rule deprecation docs (<a href="https://bounce.depfu.com/github.com/eslint/eslint/pull/20050">#20050</a>) (Josh Goldberg ✨)</li> <li> <a href="https://bounce.depfu.com/github.com/eslint/eslint/commit/6ad8973e5d3c94b8e100b7266f55f8eb0757eb00"><code class="notranslate">6ad8973</code></a> docs: update <code class="notranslate">--no-ignore</code> and <code class="notranslate">--ignore-pattern</code> documentation (<a href="https://bounce.depfu.com/github.com/eslint/eslint/pull/20036">#20036</a>) (Francesco Trotta)</li> <li> <a href="https://bounce.depfu.com/github.com/eslint/eslint/commit/8033b195299a1eaa4a0ed6553d9e034a457bb577"><code class="notranslate">8033b19</code></a> docs: add documentation for <code class="notranslate">--no-config-lookup</code> (<a href="https://bounce.depfu.com/github.com/eslint/eslint/pull/20033">#20033</a>) (Francesco Trotta)</li> </ul> <h2 dir="auto">Chores</h2> <ul dir="auto"> <li> <a href="https://bounce.depfu.com/github.com/eslint/eslint/commit/da87f2fe792cab5b69b62bf5c15e69ab4f433087"><code class="notranslate">da87f2f</code></a> chore: upgrade @eslint/js@9.35.0 (<a href="https://bounce.depfu.com/github.com/eslint/eslint/pull/20077">#20077</a>) (Milos Djermanovic)</li> <li> <a href="https://bounce.depfu.com/github.com/eslint/eslint/commit/af2a0870fdc646091d027516601888923e5bc202"><code class="notranslate">af2a087</code></a> chore: package.json update for @eslint/js release (Jenkins)</li> <li> <a href="https://bounce.depfu.com/github.com/eslint/eslint/commit/70557649e3111c55d8cddf678b6c4079aa6f0ccc"><code class="notranslate">7055764</code></a> test: remove <code class="notranslate">tests/lib/eslint/eslint.config.js</code> (<a href="https://bounce.depfu.com/github.com/eslint/eslint/pull/20065">#20065</a>) (Milos Djermanovic)</li> <li> <a href="https://bounce.depfu.com/github.com/eslint/eslint/commit/84ffb9680b15e45bfd8c8a5db4731576ddd16fc4"><code class="notranslate">84ffb96</code></a> chore: update <code class="notranslate">@eslint-community/eslint-utils</code> (<a href="https://bounce.depfu.com/github.com/eslint/eslint/pull/20069">#20069</a>) (Francesco Trotta)</li> <li> <a href="https://bounce.depfu.com/github.com/eslint/eslint/commit/d5ef9397150cc178e1f9891c3ff49ac4871ec786"><code class="notranslate">d5ef939</code></a> refactor: remove deprecated <code class="notranslate">context.parserOptions</code> usage across rules (<a href="https://bounce.depfu.com/github.com/eslint/eslint/pull/20060">#20060</a>) (sethamus)</li> <li> <a href="https://bounce.depfu.com/github.com/eslint/eslint/commit/1b3881d7e859bec9589e39888656c33c914a8302"><code class="notranslate">1b3881d</code></a> chore: remove redundant word (<a href="https://bounce.depfu.com/github.com/eslint/eslint/pull/20058">#20058</a>) (pxwanglu)</li> </ul></blockquote> <h4><a href="https://github.com/eslint/eslint/releases/tag/v9.34.0">9.34.0</a></h4> <blockquote><h2 dir="auto">Features</h2> <ul dir="auto"> <li> <a href="https://bounce.depfu.com/github.com/eslint/eslint/commit/0bb777a82b533df595cd520d9c89d291efa14a33"><code class="notranslate">0bb777a</code></a> feat: multithread linting (<a href="https://bounce.depfu.com/github.com/eslint/eslint/pull/19794">#19794</a>) (Francesco Trotta)</li> <li> <a href="https://bounce.depfu.com/github.com/eslint/eslint/commit/43a5f9e36f1aade16f81fc49ef4b333660faadab"><code class="notranslate">43a5f9e</code></a> feat: add eslint-plugin-regexp to eslint-config-eslint base config (<a href="https://bounce.depfu.com/github.com/eslint/eslint/pull/19951">#19951</a>) (Pixel998)</li> </ul> <h2 dir="auto">Bug Fixes</h2> <ul dir="auto"> <li> <a href="https://bounce.depfu.com/github.com/eslint/eslint/commit/9b8990397b2d2ed70771bb0e2070261a0c41782c"><code class="notranslate">9b89903</code></a> fix: default value of accessor-pairs option in rule.d.ts file (<a href="https://bounce.depfu.com/github.com/eslint/eslint/pull/20024">#20024</a>) (Tanuj Kanti)</li> <li> <a href="https://bounce.depfu.com/github.com/eslint/eslint/commit/6c074206ae0eae4816197a57648b415832a20e1d"><code class="notranslate">6c07420</code></a> fix: fix spurious failure in neostandard integration test (<a href="https://bounce.depfu.com/github.com/eslint/eslint/pull/20023">#20023</a>) (Kirk Waiblinger)</li> <li> <a href="https://bounce.depfu.com/github.com/eslint/eslint/commit/676f4acaaed6e4f6ffe0c2e21272d4702b311a7b"><code class="notranslate">676f4ac</code></a> fix: allow scientific notation with trailing zeros matching exponent (<a href="https://bounce.depfu.com/github.com/eslint/eslint/pull/20002">#20002</a>) (Sweta Tanwar)</li> </ul> <h2 dir="auto">Documentation</h2> <ul dir="auto"> <li> <a href="https://bounce.depfu.com/github.com/eslint/eslint/commit/0b4a590333b73a21b9e0ddc98462680e09fe3232"><code class="notranslate">0b4a590</code></a> docs: make rulesdir deprecation clearer (<a href="https://bounce.depfu.com/github.com/eslint/eslint/pull/20018">#20018</a>) (Domenico Gemoli)</li> <li> <a href="https://bounce.depfu.com/github.com/eslint/eslint/commit/327c67256fbeaf9d5e365802c2a11f5d32a16522"><code class="notranslate">327c672</code></a> docs: Update README (GitHub Actions Bot)</li> <li> <a href="https://bounce.depfu.com/github.com/eslint/eslint/commit/bf2622991f5b892610a8c3343ff16519e5fd7a79"><code class="notranslate">bf26229</code></a> docs: Fix typo in core-concepts/index.md (<a href="https://bounce.depfu.com/github.com/eslint/eslint/pull/20009">#20009</a>) (Tobias Hernstig)</li> <li> <a href="https://bounce.depfu.com/github.com/eslint/eslint/commit/2309327554acbf011f0d17e7b36fdd68e43adf3a"><code class="notranslate">2309327</code></a> docs: fix typo in the "Configuring Rules" section (<a href="https://bounce.depfu.com/github.com/eslint/eslint/pull/20001">#20001</a>) (ghazi-git)</li> <li> <a href="https://bounce.depfu.com/github.com/eslint/eslint/commit/2b87e21321422c120c2248dae25cac7f9eec0f29"><code class="notranslate">2b87e21</code></a> docs: [no-else-return] clarify sample code. (<a href="https://bounce.depfu.com/github.com/eslint/eslint/pull/19991">#19991</a>) (Yuki Takada (Yukinosuke Takada))</li> <li> <a href="https://bounce.depfu.com/github.com/eslint/eslint/commit/c36570c6657c2a92dbb4f09a8166a4d9909a091a"><code class="notranslate">c36570c</code></a> docs: Update README (GitHub Actions Bot)</li> </ul> <h2 dir="auto">Chores</h2> <ul dir="auto"> <li> <a href="https://bounce.depfu.com/github.com/eslint/eslint/commit/f19ad9493e0ca04c2c1455fbb3402eaad993a8be"><code class="notranslate">f19ad94</code></a> chore: upgrade to <code class="notranslate">@eslint/js@9.34.0</code> (<a href="https://bounce.depfu.com/github.com/eslint/eslint/pull/20030">#20030</a>) (Francesco Trotta)</li> <li> <a href="https://bounce.depfu.com/github.com/eslint/eslint/commit/b48fa20034e53bc65d1a58f3d834705e3087b00c"><code class="notranslate">b48fa20</code></a> chore: package.json update for @eslint/js release (Jenkins)</li> <li> <a href="https://bounce.depfu.com/github.com/eslint/eslint/commit/4bce8a250262ec47207bc260581f979e40c86bda"><code class="notranslate">4bce8a2</code></a> chore: package.json update for eslint-config-eslint release (Jenkins)</li> <li> <a href="https://bounce.depfu.com/github.com/eslint/eslint/commit/0c9999c2a682151cf13bb3a4f8916930678c2f9b"><code class="notranslate">0c9999c</code></a> refactor: prefer default options in <code class="notranslate">grouped-accessor-pairs</code> (<a href="https://bounce.depfu.com/github.com/eslint/eslint/pull/20028">#20028</a>) (루밀LuMir)</li> <li> <a href="https://bounce.depfu.com/github.com/eslint/eslint/commit/d503f1981354c7b86e423879846c61e0405af8fe"><code class="notranslate">d503f19</code></a> ci: fix <code class="notranslate">stale.yml</code> (<a href="https://bounce.depfu.com/github.com/eslint/eslint/pull/20010">#20010</a>) (루밀LuMir)</li> <li> <a href="https://bounce.depfu.com/github.com/eslint/eslint/commit/e2dc67d8b028147de4da35c64efe1d74c9f6a883"><code class="notranslate">e2dc67d</code></a> ci: centralize <code class="notranslate">stale.yml</code> (<a href="https://bounce.depfu.com/github.com/eslint/eslint/pull/19994">#19994</a>) (루밀LuMir)</li> <li> <a href="https://bounce.depfu.com/github.com/eslint/eslint/commit/7093cb8f590ec2a1b5364d7b5687e9b5f4e06f8a"><code class="notranslate">7093cb8</code></a> ci: bump actions/checkout from 4 to 5 (<a href="https://bounce.depfu.com/github.com/eslint/eslint/pull/20005">#20005</a>) (dependabot[bot])</li> </ul></blockquote> <p><em>Does any of this look wrong? <a href="https://depfu.com/packages/npm/eslint/feedback">Please let us know.</a></em></p> </details> <details> <summary>Commits</summary> <p><a href="https://github.com/eslint/eslint/compare/a90d7c4fe5ef83054e29d21d7ffb442103429d03...8401101d1e3e3e4e1edc2a9e59cafc9956bf2610">See the full diff on Github</a>. The new version differs by 42 commits:</p> <ul> <li><a href="https://github.com/eslint/eslint/commit/8401101d1e3e3e4e1edc2a9e59cafc9956bf2610"><code>9.35.0</code></a></li> <li><a href="https://github.com/eslint/eslint/commit/b80f0254f357ad6b1d8d9b4ded0892b8826ba8f4"><code>Build: changelog update for 9.35.0</code></a></li> <li><a href="https://github.com/eslint/eslint/commit/da87f2fe792cab5b69b62bf5c15e69ab4f433087"><code>chore: upgrade @eslint/js@9.35.0 (#20077)</code></a></li> <li><a href="https://github.com/eslint/eslint/commit/af2a0870fdc646091d027516601888923e5bc202"><code>chore: package.json update for @eslint/js release</code></a></li> <li><a href="https://github.com/eslint/eslint/commit/d265515642f65246bcd45c17979f67c2afb12f95"><code>docs: improve phrasing - "if" → "even if" from getting-started section (#20074)</code></a></li> <li><a href="https://github.com/eslint/eslint/commit/70557649e3111c55d8cddf678b6c4079aa6f0ccc"><code>test: remove `tests/lib/eslint/eslint.config.js` (#20065)</code></a></li> <li><a href="https://github.com/eslint/eslint/commit/10e7ae23e30ea0834d9fdeb3a2a1db8103c36cd2"><code>fix: update uncloneable options error message (#20059)</code></a></li> <li><a href="https://github.com/eslint/eslint/commit/42761fa7c872fb9e14c144b692af6967b3662082"><code>feat: implement suggestions for no-empty-function (#20057)</code></a></li> <li><a href="https://github.com/eslint/eslint/commit/102f44442ac9bf1fcd4ba6ab9fae43ce09199df6"><code>feat: implement suggestions for no-empty-static-block (#20056)</code></a></li> <li><a href="https://github.com/eslint/eslint/commit/84ffb9680b15e45bfd8c8a5db4731576ddd16fc4"><code>chore: update `@eslint-community/eslint-utils` (#20069)</code></a></li> <li><a href="https://github.com/eslint/eslint/commit/a355a0e5b2e6a47cda099b31dc7d112cfb5c4315"><code>docs: invert comparison logic for example in `no-var` doc page (#20064)</code></a></li> <li><a href="https://github.com/eslint/eslint/commit/e51ffff737ca245b3a1d115cb11e1c99737249a3"><code>feat: add `preserve-caught-error` rule (tailwindlabs#19913)</code></a></li> <li><a href="https://github.com/eslint/eslint/commit/5082fc206de6946d9d4c20e57301f78839b3b9f2"><code>docs: Update README</code></a></li> <li><a href="https://github.com/eslint/eslint/commit/d5ef9397150cc178e1f9891c3ff49ac4871ec786"><code>refactor: remove deprecated `context.parserOptions` usage across rules (#20060)</code></a></li> <li><a href="https://github.com/eslint/eslint/commit/1b3881d7e859bec9589e39888656c33c914a8302"><code>chore: remove redundant word (#20058)</code></a></li> <li><a href="https://github.com/eslint/eslint/commit/99cfd7e056e1703941c9eb8ca1ae7fdb1987ba9d"><code>docs: add missing "the" in rule deprecation docs (#20050)</code></a></li> <li><a href="https://github.com/eslint/eslint/commit/bfa46013e7ea9a522c02f72250fa07160f96a6b8"><code>fix: ignore empty switch statements with comments in no-empty rule (#20045)</code></a></li> <li><a href="https://github.com/eslint/eslint/commit/dfd11deb24fc733faa5db751a2f615eb04e48b15"><code>fix: add `before` and `after` to test case types (#20049)</code></a></li> <li><a href="https://github.com/eslint/eslint/commit/6ad8973e5d3c94b8e100b7266f55f8eb0757eb00"><code>docs: update `--no-ignore` and `--ignore-pattern` documentation (#20036)</code></a></li> <li><a href="https://github.com/eslint/eslint/commit/dabbe95c39671c5fa272da012ee1432aa088650f"><code>fix: correct types for `no-restricted-imports` rule (#20034)</code></a></li> <li><a href="https://github.com/eslint/eslint/commit/8033b195299a1eaa4a0ed6553d9e034a457bb577"><code>docs: add documentation for `--no-config-lookup` (#20033)</code></a></li> <li><a href="https://github.com/eslint/eslint/commit/ea789c7dd234c1a6be499a4644dd0f5c97615972"><code>fix: no-loss-of-precision false positive with uppercase exponent (#20032)</code></a></li> <li><a href="https://github.com/eslint/eslint/commit/b8875f67a7bc99824f19147f4a669be7e98f3eee"><code>9.34.0</code></a></li> <li><a href="https://github.com/eslint/eslint/commit/2e455fb433c4cae19572d75d866392f3b5a677d0"><code>Build: changelog update for 9.34.0</code></a></li> <li><a href="https://github.com/eslint/eslint/commit/f19ad9493e0ca04c2c1455fbb3402eaad993a8be"><code>chore: upgrade to `@eslint/js@9.34.0` (#20030)</code></a></li> <li><a href="https://github.com/eslint/eslint/commit/b48fa20034e53bc65d1a58f3d834705e3087b00c"><code>chore: package.json update for @eslint/js release</code></a></li> <li><a href="https://github.com/eslint/eslint/commit/4bce8a250262ec47207bc260581f979e40c86bda"><code>chore: package.json update for eslint-config-eslint release</code></a></li> <li><a href="https://github.com/eslint/eslint/commit/0c9999c2a682151cf13bb3a4f8916930678c2f9b"><code>refactor: prefer default options in `grouped-accessor-pairs` (tailwindlabs#20028)</code></a></li> <li><a href="https://github.com/eslint/eslint/commit/0b4a590333b73a21b9e0ddc98462680e09fe3232"><code>docs: make rulesdir deprecation clearer (tailwindlabs#20018)</code></a></li> <li><a href="https://github.com/eslint/eslint/commit/9b8990397b2d2ed70771bb0e2070261a0c41782c"><code>fix: default value of accessor-pairs option in rule.d.ts file (tailwindlabs#20024)</code></a></li> <li><a href="https://github.com/eslint/eslint/commit/6c074206ae0eae4816197a57648b415832a20e1d"><code>fix: fix spurious failure in neostandard integration test (tailwindlabs#20023)</code></a></li> <li><a href="https://github.com/eslint/eslint/commit/676f4acaaed6e4f6ffe0c2e21272d4702b311a7b"><code>fix: allow scientific notation with trailing zeros matching exponent (tailwindlabs#20002)</code></a></li> <li><a href="https://github.com/eslint/eslint/commit/327c67256fbeaf9d5e365802c2a11f5d32a16522"><code>docs: Update README</code></a></li> <li><a href="https://github.com/eslint/eslint/commit/d503f1981354c7b86e423879846c61e0405af8fe"><code>ci: fix `stale.yml` (tailwindlabs#20010)</code></a></li> <li><a href="https://github.com/eslint/eslint/commit/0bb777a82b533df595cd520d9c89d291efa14a33"><code>feat: multithread linting (tailwindlabs#19794)</code></a></li> <li><a href="https://github.com/eslint/eslint/commit/bf2622991f5b892610a8c3343ff16519e5fd7a79"><code>docs: Fix typo in core-concepts/index.md (tailwindlabs#20009)</code></a></li> <li><a href="https://github.com/eslint/eslint/commit/43a5f9e36f1aade16f81fc49ef4b333660faadab"><code>feat: add eslint-plugin-regexp to eslint-config-eslint base config (tailwindlabs#19951)</code></a></li> <li><a href="https://github.com/eslint/eslint/commit/e2dc67d8b028147de4da35c64efe1d74c9f6a883"><code>ci: centralize `stale.yml` (tailwindlabs#19994)</code></a></li> <li><a href="https://github.com/eslint/eslint/commit/7093cb8f590ec2a1b5364d7b5687e9b5f4e06f8a"><code>ci: bump actions/checkout from 4 to 5 (tailwindlabs#20005)</code></a></li> <li><a href="https://github.com/eslint/eslint/commit/2309327554acbf011f0d17e7b36fdd68e43adf3a"><code>docs: fix typo in the "Configuring Rules" section (tailwindlabs#20001)</code></a></li> <li><a href="https://github.com/eslint/eslint/commit/2b87e21321422c120c2248dae25cac7f9eec0f29"><code>docs: [no-else-return] clarify sample code. (tailwindlabs#19991)</code></a></li> <li><a href="https://github.com/eslint/eslint/commit/c36570c6657c2a92dbb4f09a8166a4d9909a091a"><code>docs: Update README</code></a></li> </ul> </details> ---  [Depfu](https://depfu.com) will automatically keep this PR conflict-free, as long as you don't add any commits to this branch yourself. You can also trigger a rebase manually by commenting with `@depfu rebase`. <details><summary>All Depfu comment commands</summary> <blockquote><dl> <dt>@depfu rebase</dt><dd>Rebases against your default branch and redoes this update</dd> <dt>@depfu recreate</dt><dd>Recreates this PR, overwriting any edits that you've made to it</dd> <dt>@depfu merge</dt><dd>Merges this PR once your tests are passing and conflicts are resolved</dd> <dt>@depfu cancel merge</dt><dd>Cancels automatic merging of this PR</dd> <dt>@depfu close</dt><dd>Closes this PR and deletes the branch</dd> <dt>@depfu reopen</dt><dd>Restores the branch and reopens this PR (if it's closed)</dd> <dt>@depfu pause</dt><dd>Ignores all future updates for this dependency and closes this PR</dd> <dt>@depfu pause [minor|major]</dt><dd>Ignores all future minor/major updates for this dependency and closes this PR</dd> <dt>@depfu resume</dt><dd>Future versions of this dependency will create PRs again (leaves this PR as is)</dd> </dl></blockquote> </details> Co-authored-by: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com>
Summary
Fix this warning when building apps with TailwindCSS with Node 26+:
This PR:
Module#registerHooksinstead ofModule#registerby checking its availability at runtimepackage.json, relying on the recommended usage in the docs for theModule#registercallsTest plan
I'd be happy to ensure this works correctly on my end before merging this, but it's not as trivial to test locally as a logic fix. Can you guide me through what I need to do to test this?
I extensively based my change on the docs, following those guides:
Module#registerModule#registerHooksfunction(and other more detailed sections of the same docs page)
Fixes #19893
Closes #19907