-
Notifications
You must be signed in to change notification settings - Fork 1
test: Add rolldown tests #166
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Warning Rate limit exceeded@vio has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 4 minutes and 59 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (5)
WalkthroughThe changes introduce support for the Changes
Sequence Diagram(s)sequenceDiagram
participant TestSuite as rolldown-package.test.js
participant Bundler as rolldown
participant FS as Filesystem
TestSuite->>Bundler: Run bundler with config (default/dynamic/relative/absolute)
Bundler->>FS: Write stats JSON file (location depends on config)
TestSuite->>FS: Read stats JSON file
TestSuite->>TestSuite: Parse and assert contents
Poem
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (1)
test/package/rolldown-packge.test.js (1)
1-59: Filename has a typoThe filename "rolldown-packge.test.js" contains a typo (missing "a" in "package"). This should be corrected for consistency.
Rename the file from:
rolldown-packge.test.jsTo:
rolldown-package.test.js
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
test/package/package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (4)
test/package/package.json(1 hunks)test/package/rolldown-packge.test.js(1 hunks)test/package/rolldown.config.js(1 hunks)test/package/rollup-package.test.js(1 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (1)
test/package/rolldown.config.js (1)
test/unit/fixtures/rollup-stats.ts (1)
stats(1-33)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: Socket Security: Pull Request Alerts
🔇 Additional comments (11)
test/package/rollup-package.test.js (1)
9-9: Clear test suite description updateThe description has been updated from "package test" to "rollup package test", which is more specific and better reflects the test suite's purpose, especially now that there are tests for both rollup and rolldown bundlers.
test/package/rolldown-packge.test.js (6)
1-8: Well-structured importsThe imports are properly organized and include all necessary dependencies for the test suite. The code reuses the same config imports from the rollup configuration file, which is a good approach for consistency.
9-13: Well-organized test structureThe test suite is properly organized with a clear description and appropriate setup. Using
beforeEachto reset the virtual file system is a good practice for test isolation.
14-23: Correct implementation of basic test caseThis test correctly verifies that rolldown outputs a stats JSON file and that the file contains the expected structure. The approach is consistent with the equivalent rollup test.
25-34: Typo in test caseThere appears to be a potential issue in this test. You're using
dynamicOptionsfor therolldowncall but then usingconfig.outputfor thegeneratecall, which might not be correct if the outputs differ between the two configurations.You should verify this is intentional or update it to:
- await bundle.generate(config.output); + await bundle.generate(dynamicOptions.output);
36-46: Consistent testing of relative path outputTest verifies the stats file generation with a relative path filename, which is important for ensuring the plugin properly handles various path configurations.
48-59: Comprehensive testing of absolute path outputThis test correctly verifies absolute path handling, which completes the coverage of different path configurations. Good attention to detail in testing both relative and absolute paths.
test/package/rolldown.config.js (4)
1-11: Well-structured default configurationThe default configuration is properly structured using
defineConfigfrom rolldown, with appropriate input/output paths and the stats plugin with default options.
13-22: Dynamic configuration with format-based filenameThis configuration showcases how to dynamically generate the stats filename based on the output format, which is a useful pattern for testing. The callback approach to the stats plugin is implemented correctly.
24-34: Configuration with relative path for stats outputThe configuration properly demonstrates using a relative path for the stats output file, which is important for testing path handling in the plugin.
36-46: Configuration with absolute path for stats outputThe absolute path configuration is properly implemented, completing the test coverage for different path types. Writing to '/tmp' is a standard approach for test files.
| "keywords": [], | ||
| "license": "ISC", | ||
| "devDependencies": { | ||
| "rolldown": "^1.0.0-beta.8", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Verification agent
🧩 Analysis chain
Added rolldown dependency correctly
Added rolldown v1.0.0-beta.8 as a development dependency, which is required for the new rolldown tests. This is an appropriate addition to support the new test files.
The beta version is acceptable for testing purposes, but you might want to verify this is the most current beta version available.
🌐 Web query:
What is the latest version of rolldown bundler?
💡 Result:
The latest stable version of Rolldown is 1.0.0-beta.7, which was published about a month ago according to the NPM registry[4][7]. Rolldown is currently in beta status, which means that while it can handle most production use cases, there might still be bugs and rough edges[8].
Rolldown follows a release channel system with two main options:
- Latest: Currently at version 1.0.0-beta.*
- Nightly releases: Published nightly from the main branch under the "nightly" npm dist tag, which can be installed using
npm i rolldown@nightly[8]
The most recent significant release was version 0.15.0, which was published on March 17, 2025. This version includes full test suite support on Node.js versions 18, 20, and 22, along with self-bootstrapping for every commit to ensure correctness[3].
Prior to that, version 0.14.0 added important features such as native watch() support, asset module type support, and umd format support[3].
It's worth noting that Rolldown is still in active development, as it's described as "currently in beta status" with some features like the built-in minification still considered work-in-progress[8].
Citations:
- 1: https://github.com/rolldown/rolldown
- 2: https://rolldown.rs
- 3: https://github.com/rolldown/rolldown/releases
- 4: https://www.npmjs.com/package/rolldown
- 5: https://vite.dev/guide/rolldown
- 6: https://www.infoq.com/news/2024/05/rolldown-open-sourced/
- 7: https://www.npmjs.com/package/rolldown?activeTab=readme
- 8: https://rolldown.rs/guide/getting-started
- 9: https://bsky.app/profile/rolldown.rs
- 10: https://rolldown.rs/guide/
Verify the released Rolldown version
It looks like you’ve added "rolldown": "^1.0.0-beta.8" to test/package/package.json, but according to the npm registry the latest published beta is 1.0.0-beta.7. Please confirm whether v1.0.0-beta.8 has been released:
• If v1.0.0-beta.8 isn’t available yet, change the dependency to ^1.0.0-beta.7.
• If you need the absolute cutting-edge build, consider using the nightly tag (rolldown@nightly).
[test/package/package.json:13]
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
🧹 Nitpick comments (2)
test/package/rolldown-package.test.js (2)
14-23: Enhance test assertions for more comprehensive verification.The test only verifies that the
fileNameproperty exists in the stats output. Consider adding more comprehensive assertions to validate other important properties of the stats object.expect(stats['index.js']).toMatchObject({ fileName: 'index.js', + type: 'chunk', + // Verify other expected properties based on your implementation });
5-5: Consider adding a test helper for common operations.All tests share similar patterns of bundling, generating and reading stats files. Consider creating a helper function to reduce duplication.
async function bundleAndGetStats(config, statsPath) { const bundle = await rolldown(config); await bundle.generate(config.output); const actual = await fs.readFile(statsPath, 'utf8'); return JSON.parse(actual); }Then use it in your tests:
test('should output stats JSON file', async () => { const statsPath = path.join(config.output.dir, 'stats.json'); const stats = await bundleAndGetStats(config, statsPath); expect(stats['index.js']).toMatchObject({ fileName: 'index.js', }); });
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
test/package/package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (4)
test/package/package.json(1 hunks)test/package/rolldown-package.test.js(1 hunks)test/package/rolldown.config.js(1 hunks)test/package/rollup-package.test.js(1 hunks)
✅ Files skipped from review due to trivial changes (2)
- test/package/package.json
- test/package/rolldown.config.js
🚧 Files skipped from review as they are similar to previous changes (1)
- test/package/rollup-package.test.js
🧰 Additional context used
🧬 Code Graph Analysis (1)
test/package/rolldown-package.test.js (2)
test/unit/fixtures/rollup-stats.ts (1)
stats(1-33)test/package/rolldown.config.js (6)
dynamicOptions(13-22)dynamicOptions(13-22)relativeFileNameConfig(24-34)relativeFileNameConfig(24-34)absoluteFileNameConfig(36-46)absoluteFileNameConfig(36-46)
🔇 Additional comments (1)
test/package/rolldown-package.test.js (1)
9-59: LGTM - Well-structured test suite with good coverage.The test suite provides comprehensive coverage for the rolldown bundler integration:
- Tests default configuration
- Tests dynamic file naming
- Tests relative path output
- Tests absolute path output
Each test properly validates the generation of stats files with different configurations, which is excellent for ensuring the plugin works correctly with rolldown.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
♻️ Duplicate comments (1)
test/package/rolldown-package.test.js (1)
7-7:⚠️ Potential issueFix incorrect import path
The import statement is referring to
'./rollup.config'while you're testing Rolldown bundler. This mismatch is causing test failures.-import config, { dynamicOptions, relativeFileNameConfig, absoluteFileNameConfig } from './rollup.config'; +import config, { dynamicOptions, relativeFileNameConfig, absoluteFileNameConfig } from './rolldown.config';
🧹 Nitpick comments (2)
test/package/rolldown-package.test.js (2)
1-60: Add check for rolldown availabilitySince rolldown is a relatively new dependency, it would be good to add a check to skip these tests if rolldown is not available in the environment.
import fs from 'node:fs/promises'; import path from 'node:path'; -import { describe, test, expect, beforeEach } from 'vitest'; +import { describe, test, expect, beforeEach, beforeAll } from 'vitest'; import { rolldown } from 'rolldown'; import { vol } from 'memfs'; import config, { dynamicOptions, relativeFileNameConfig, absoluteFileNameConfig } from './rolldown.config'; +let hasRolldown = true; + +beforeAll(() => { + try { + require.resolve('rolldown'); + } catch (e) { + hasRolldown = false; + console.warn('Rolldown not available, skipping rolldown tests'); + } +}); + describe('rolldown package test', () => { beforeEach(() => { + if (!hasRolldown) { + test.skip('rolldown not available'); + return; + } vol.reset(); }); // Rest of the tests remain unchanged // ... });🧰 Tools
🪛 GitHub Check: Test package on rollup v4 / node 20 / ubuntu-latest
[failure] 29-29: test/package/rolldown-package.test.js > rolldown package test > should output stats JSON file with explicit compilation file name
Error: ENOENT: no such file or directory, open 'dist/stats.es.json'
❯ test/package/rolldown-package.test.js:29:20⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { errno: -2, code: 'ENOENT', syscall: 'open', path: 'dist/stats.es.json' }🪛 GitHub Check: Test package on rollup v4 / node 22 / windows-latest
[failure] 29-29: test/package/rolldown-package.test.js > rolldown package test > should output stats JSON file with explicit compilation file name
Error: ENOENT: no such file or directory, open 'dist/stats.es.json'
❯ test/package/rolldown-package.test.js:29:20⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { errno: -2, code: 'ENOENT', syscall: 'open', path: 'dist/stats.es.json' }🪛 GitHub Check: Test package on rollup v4 / node 22 / ubuntu-latest
[failure] 29-29: test/package/rolldown-package.test.js > rolldown package test > should output stats JSON file with explicit compilation file name
Error: ENOENT: no such file or directory, open 'dist/stats.es.json'
❯ test/package/rolldown-package.test.js:29:20⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { errno: -2, code: 'ENOENT', syscall: 'open', path: 'dist/stats.es.json' }🪛 GitHub Check: Test package on rollup v3 / node 22 / windows-latest
[failure] 29-29: test/package/rolldown-package.test.js > rolldown package test > should output stats JSON file with explicit compilation file name
Error: ENOENT: no such file or directory, open 'dist/stats.es.json'
❯ test/package/rolldown-package.test.js:29:20⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { errno: -2, code: 'ENOENT', syscall: 'open', path: 'dist/stats.es.json' }🪛 GitHub Check: Test package on rollup v3 / node 22 / ubuntu-latest
[failure] 29-29: test/package/rolldown-package.test.js > rolldown package test > should output stats JSON file with explicit compilation file name
Error: ENOENT: no such file or directory, open 'dist/stats.es.json'
❯ test/package/rolldown-package.test.js:29:20⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { errno: -2, code: 'ENOENT', syscall: 'open', path: 'dist/stats.es.json' }🪛 GitHub Actions: ci
[error] 1-1: Test failed: should output stats JSON file with explicit compilation file name. Error: ENOENT: no such file or directory, open 'dist/stats.es.json'
15-16: Consider consistent error handling across bundlersAdd error handling to catch and properly report bundling issues, similar to what you might have in the Rollup tests.
- const bundle = await rolldown(config); - await bundle.generate(config.output); + try { + const bundle = await rolldown(config); + await bundle.generate(config.output); + } catch (error) { + console.error('Rolldown bundling error:', error); + throw error; + }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
test/package/package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (4)
test/package/package.json(1 hunks)test/package/rolldown-package.test.js(1 hunks)test/package/rolldown.config.js(1 hunks)test/package/rollup-package.test.js(2 hunks)
✅ Files skipped from review due to trivial changes (2)
- test/package/package.json
- test/package/rolldown.config.js
🧰 Additional context used
🪛 GitHub Check: Test package on rollup v4 / node 20 / ubuntu-latest
test/package/rolldown-package.test.js
[failure] 29-29: test/package/rolldown-package.test.js > rolldown package test > should output stats JSON file with explicit compilation file name
Error: ENOENT: no such file or directory, open 'dist/stats.es.json'
❯ test/package/rolldown-package.test.js:29:20
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { errno: -2, code: 'ENOENT', syscall: 'open', path: 'dist/stats.es.json' }
test/package/rollup-package.test.js
[failure] 29-29: test/package/rollup-package.test.js > rollup package test > should output stats JSON file with explicit compilation file name
Error: ENOENT: no such file or directory, open 'dist/stats.es.json'
❯ test/package/rollup-package.test.js:29:20
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { errno: -2, code: 'ENOENT', syscall: 'open', path: 'dist/stats.es.json' }
🪛 GitHub Check: Test package on rollup v4 / node 22 / windows-latest
test/package/rolldown-package.test.js
[failure] 29-29: test/package/rolldown-package.test.js > rolldown package test > should output stats JSON file with explicit compilation file name
Error: ENOENT: no such file or directory, open 'dist/stats.es.json'
❯ test/package/rolldown-package.test.js:29:20
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { errno: -2, code: 'ENOENT', syscall: 'open', path: 'dist/stats.es.json' }
test/package/rollup-package.test.js
[failure] 29-29: test/package/rollup-package.test.js > rollup package test > should output stats JSON file with explicit compilation file name
Error: ENOENT: no such file or directory, open 'dist/stats.es.json'
❯ test/package/rollup-package.test.js:29:20
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { errno: -2, code: 'ENOENT', syscall: 'open', path: 'dist/stats.es.json' }
🪛 GitHub Check: Test package on rollup v4 / node 22 / ubuntu-latest
test/package/rolldown-package.test.js
[failure] 29-29: test/package/rolldown-package.test.js > rolldown package test > should output stats JSON file with explicit compilation file name
Error: ENOENT: no such file or directory, open 'dist/stats.es.json'
❯ test/package/rolldown-package.test.js:29:20
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { errno: -2, code: 'ENOENT', syscall: 'open', path: 'dist/stats.es.json' }
test/package/rollup-package.test.js
[failure] 29-29: test/package/rollup-package.test.js > rollup package test > should output stats JSON file with explicit compilation file name
Error: ENOENT: no such file or directory, open 'dist/stats.es.json'
❯ test/package/rollup-package.test.js:29:20
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { errno: -2, code: 'ENOENT', syscall: 'open', path: 'dist/stats.es.json' }
🪛 GitHub Check: Test package on rollup v3 / node 22 / windows-latest
test/package/rolldown-package.test.js
[failure] 29-29: test/package/rolldown-package.test.js > rolldown package test > should output stats JSON file with explicit compilation file name
Error: ENOENT: no such file or directory, open 'dist/stats.es.json'
❯ test/package/rolldown-package.test.js:29:20
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { errno: -2, code: 'ENOENT', syscall: 'open', path: 'dist/stats.es.json' }
test/package/rollup-package.test.js
[failure] 29-29: test/package/rollup-package.test.js > rollup package test > should output stats JSON file with explicit compilation file name
Error: ENOENT: no such file or directory, open 'dist/stats.es.json'
❯ test/package/rollup-package.test.js:29:20
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { errno: -2, code: 'ENOENT', syscall: 'open', path: 'dist/stats.es.json' }
🪛 GitHub Check: Test package on rollup v3 / node 22 / ubuntu-latest
test/package/rolldown-package.test.js
[failure] 29-29: test/package/rolldown-package.test.js > rolldown package test > should output stats JSON file with explicit compilation file name
Error: ENOENT: no such file or directory, open 'dist/stats.es.json'
❯ test/package/rolldown-package.test.js:29:20
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { errno: -2, code: 'ENOENT', syscall: 'open', path: 'dist/stats.es.json' }
test/package/rollup-package.test.js
[failure] 29-29: test/package/rollup-package.test.js > rollup package test > should output stats JSON file with explicit compilation file name
Error: ENOENT: no such file or directory, open 'dist/stats.es.json'
❯ test/package/rollup-package.test.js:29:20
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { errno: -2, code: 'ENOENT', syscall: 'open', path: 'dist/stats.es.json' }
🪛 GitHub Actions: ci
test/package/rolldown-package.test.js
[error] 1-1: Test failed: should output stats JSON file with explicit compilation file name. Error: ENOENT: no such file or directory, open 'dist/stats.es.json'
test/package/rollup-package.test.js
[error] 1-1: Test failed: should output stats JSON file with explicit compilation file name. Error: ENOENT: no such file or directory, open 'dist/stats.es.json'
🔇 Additional comments (2)
test/package/rollup-package.test.js (2)
27-27: Good update to use consistent configuration references!The change to use
dynamicOptions.outputinstead ofconfig.outputfor generating the bundle aligns with the configuration used for creating the bundle. This ensures consistency between bundle creation and generation.
9-9: Nice description update!Updating the test suite description to "rollup package test" provides better clarity about the purpose of these tests, especially now that there are separate test suites for different bundlers.
| import fs from 'node:fs/promises'; | ||
| import path from 'node:path'; | ||
| import { describe, test, expect, beforeEach } from 'vitest'; | ||
| import { rolldown } from 'rolldown'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Verification agent
🧩 Analysis chain
Verify rolldown import
Ensure the rolldown package is correctly installed as a dev dependency and that the import syntax matches the package's export. Check the rolldown documentation to confirm the correct import method.
🏁 Script executed:
#!/bin/bash
# Check if rolldown is installed and how it should be imported
npm list rolldown --depth=0 || yarn list --pattern rolldown --depth=0
# Look for export statements in rolldown source
if [ -d "node_modules/rolldown" ]; then
grep -r "export" --include="*.js" "node_modules/rolldown"
fiLength of output: 341
Add and verify the rolldown dependency and import
It looks like the rolldown module isn’t installed in node_modules (so your test will always fail). To fix:
• In package.json – add rolldown as a devDependency:
npm install --save-dev rolldown• In test/package/rolldown-package.test.js – confirm that the import matches what rolldown actually exports. If it uses a default export, switch to:
import rolldown from 'rolldown';Otherwise, keep the named import ({ rolldown }) if that’s what the docs specify.
Once installed, rerun the test to ensure it resolves correctly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
🧹 Nitpick comments (1)
.github/workflows/ci.yml (1)
143-143: Remove trailing spacesThe line
npm installcontains trailing whitespace and will trigger a YAML lint error. Trim it to:- npm install + npm install🧰 Tools
🪛 YAMLlint (1.35.1)
[error] 143-143: trailing spaces
(trailing-spaces)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
test/package/package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (5)
.github/workflows/ci.yml(2 hunks)test/package/package.json(1 hunks)test/package/rolldown-package.test.js(1 hunks)test/package/rolldown.config.js(1 hunks)test/package/rollup-package.test.js(2 hunks)
✅ Files skipped from review due to trivial changes (2)
- test/package/package.json
- test/package/rolldown.config.js
🚧 Files skipped from review as they are similar to previous changes (2)
- test/package/rollup-package.test.js
- test/package/rolldown-package.test.js
🧰 Additional context used
🪛 actionlint (1.7.4)
.github/workflows/ci.yml
108-108: property "rollup" is not defined in object type {node: number; os: string; rolldown: number}
(expression)
142-142: property "rollup" is not defined in object type {node: number; os: string; rolldown: number}
(expression)
🪛 YAMLlint (1.35.1)
.github/workflows/ci.yml
[error] 143-143: trailing spaces
(trailing-spaces)
🔇 Additional comments (2)
.github/workflows/ci.yml (2)
54-55: Approve test-package-rollup integrationThe renaming from
test-packagetotest-package-rollupand the addition of the-t rollupflag in the test command correctly scopes this job to the Rollup bundler. The matrix configuration and steps are well-defined and align with existing conventions.Also applies to: 105-106
156-157: Approve addition of bundler test dependenciesAdding both
test-package-rollupandtest-package-rolldownto thetestsjob’sneedsensures the pipeline only proceeds when tests for both bundlers have passed.
Summary by CodeRabbit