Repository navigation
Test plain Rolldown builds, add hook filters, and skip Dependabot's cooldown for peer dependencies - #99
Merged
Conversation
Vite never forwards `meta.magicString` to transform hooks (it rebuilds `meta` to add its `ssr` flag), so the Vite-based tests only exercised the fallback that returns code with a generated sourcemap. Add a plain Rolldown test that asserts Rolldown provides the magic string and checks the output code, the stylesheet modules kept in the chunk and the sourcemap position. Rolldown no longer bundles CSS, so the test stands in for a CSS plugin. Breaking only the native branch now fails this test. Move the 'ecij' pre-check into the transform hook's `code` filter, so files that do not reference ecij are skipped before the handler is called. Rolldown, Vite builds and the Vite dev server honor it across the peer range. Also fix the stale description of `stylesheetImportPerFile`, correct the AGENTS.md description of the fallback, and normalize Windows paths in tests. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Dependabot holds back new releases for 3 days by default. On 2026-10-14 it proposed rolldown 1.2.13, hours after 1.2.14 shipped the change that made inlineConst drop ecij's extracted CSS, while consumers get such releases immediately within ecij's peer ranges. Exempt rolldown and vite so compatibility breaks surface in CI first; dev-only tooling keeps the delay as a supply chain safeguard. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
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 |
Drop the `meta.magicString` probe from the plain Rolldown test, which now checks that the plugin works with Rolldown. Code coverage shows whether the native magic string path is still exercised: without this test, its line is reported as uncovered. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Both hooks only answer for the stylesheet IDs generated in `transform`, so filter them on that pattern and let Rolldown skip the handlers for every other module. In plain Rolldown builds `resolveId` otherwise runs for every import, and `load` runs for every module in both Rolldown and Vite builds. The handlers become single expressions, so coverage reports no lines that only a foreign ID matching the pattern could reach. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Fix a misspelling ("outputing"), comma splices, missing verbs, articles
and punctuation, an ambiguous "both fields" after a list of three, and
"Setup" used as a verb in workflow steps and "Set up" as a heading noun.
Capitalize CSS-in-JS, CSS, and Vite consistently, use "e.g.," throughout,
and add serial commas to lists.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Vitest prints the message ahead of the assertion that failed, so a short subject reads best: "JS chunk sourcemap: expected null to be truthy". Co-Authored-By: Claude Opus 5.5 <[email protected]>
Replace every "e.g." with "like", "such as", or "for example", and split the semicolon-joined sentences in the README. Co-Authored-By: Claude Opus 5.5 <[email protected]>
tsdown runs Rolldown plugins, so ecij works with it once @tsdown/css is installed to bundle the extracted CSS. Verified with tsdown 0.23.1. Co-Authored-By: Claude Opus 5.5 <[email protected]>
3 tasks done
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Name the tools in that order, merge the three near-identical setup snippets into one, and refer to "the bundler" where listing them adds nothing. Mention tsdown alongside Vite as a project where `rolldown` is already installed: npm and pnpm 10 and 12 resolve ecij's peer to tsdown's copy. Co-Authored-By: Claude Opus 5.5 <[email protected]>
3 tasks done
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.
Follow-ups from auditing the plugin's workarounds against Rolldown 1.2.14 / Vite 8.3.4 after #98. Neither workaround can be dropped, so the minimum versions stay as they are:
optimization.inlineConst, Rolldown 1.2.14 drops the extracted CSS for both string and template literal class names, and the upstream issues are still open.meta.magicStringis missing: still required, at any version. Vite rebuildsmetato add itsssrflag, which drops Rolldown's lazily createdmagicString, so every Vite build and dev server takes the fallback (checked on Vite 8.2.0 and 8.3.4). Only plain Rolldown builds take the native path.Changes
transform: the manualcode.includes('ecij')check moves into acode: 'ecij'filter.resolveIdandload: filter on the generated stylesheet ID pattern (STYLESHEET_ID_REGEX), the only IDs they answer for.loadotherwise runs for every module, and in plain Rolldown buildsresolveIdruns for every import. For the comprehensive fixture in the Vite dev server, the handlers now run 4 + 4 times instead of 6 + 19, with identical results. The handlers become single expressions, so coverage reports no lines only a foreign ID matching the pattern could reach.stylesheetImportPerFiledescription, and correct AGENTS.md, which described the fallback as Vite-dev-only.rolldownandviteare now excluded from the cooldown; dev-only tooling keeps it as a supply chain safeguard. The config validates against the SchemaStoredependabot-2.0schema. To drop the cooldown entirely later, useexclude: ['*'](default-dayscannot be 0).@tsdown/cssis installed (verified with tsdown 0.23.1). Like Vite, it already depends onrolldown, and npm and pnpm 10 and 12 resolve ecij's peer to that same copy.assert(value, message)becomesexpect(value, message).toBeTruthy(), with a short subject so failures read "JS chunk sourcemap: expected null to be truthy". The plain Rolldown test no longer passes Rolldown's defaultformat: 'es'.Test plan
node --run format:check,lint,typecheck,buildnode --run test: 15/15 against the source and against the builtdist(CI=true)rolldownimports from 1.2.0): the same CSS and class names as current versions🤖 Generated with Claude Code