-
Notifications
You must be signed in to change notification settings - Fork 0
feat: use mocha@11 #2
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
BREAKING CHANGE: drop Node.js < 18.19.0 support part of eggjs/egg#3644 eggjs/egg#5257
WalkthroughThis set of changes restructures multiple GitHub Actions workflows and updates project metadata. The Node.js CI workflow now uses a single job that calls an external testing workflow with updated Node.js version specifications and a Codecov token. The npm publishing workflow has been removed, while a new release workflow has been introduced that also leverages an external workflow and secure tokens. Additionally, documentation files including LICENSE, README, and package.json have been updated with revised copyright, title, and dependency specifications. Changes
Sequence Diagram(s)sequenceDiagram
participant GitHub as "GitHub Event"
participant CI as "nodejs.yml Workflow"
participant Ext as "node-test External Workflow"
GitHub ->> CI: Push/PR event (master branch)
CI ->> Ext: Trigger external node-test workflow with updated Node.js versions
Ext -->> CI: Return test results
CI -->> GitHub: Report CI status
sequenceDiagram
participant GitHub as "GitHub Event"
participant Release as "release.yml Workflow"
participant ExtRelease as "node-release External Workflow"
GitHub ->> Release: Push event (master branch)
Release ->> ExtRelease: Invoke external node-release workflow with tokens
ExtRelease -->> Release: Return release status
Release -->> GitHub: Finalize release process
Poem
Tip ⚡🧪 Multi-step agentic review comment chat (experimental)
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 (
|
|
New, updated, and removed dependencies detected. 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.
Pull Request Overview
This PR upgrades the project to use mocha@11 while dropping support for Node.js versions below 18.19.0. The changes include adding a new release workflow, updating the project branding and badges in the README, modifying the Node.js CI workflow to reflect the new version support, and updating the LICENSE file.
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| .github/workflows/release.yml | Added a release workflow that references an external Node.js release action. |
| README.md | Updated header and badges to reflect the new npm package name and dependency. |
| .github/workflows/nodejs.yml | Modified CI workflow trigger and updated job configuration with new Node versions. |
| LICENSE.md | Updated copyright information with new contributors. |
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: 0
🧹 Nitpick comments (1)
README.md (1)
8-9: Clarify Fork Information
A note has been added indicating that this project is forked from the original mochawesome and now includes Mocha as a dependency. Consider rephrasing for improved clarity, for example:Forked from mochawesome with Mocha added as a dependency.
This minor text refinement could enhance readability.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (6)
.github/workflows/nodejs.yml(1 hunks).github/workflows/npm-publish.yml(0 hunks).github/workflows/release.yml(1 hunks)LICENSE.md(1 hunks)README.md(1 hunks)package.json(2 hunks)
💤 Files with no reviewable changes (1)
- .github/workflows/npm-publish.yml
🧰 Additional context used
🪛 LanguageTool
README.md
[style] ~6-~6: ‘in conjunction with’ might be wordy. Consider a shorter alternative.
Context: ...a]. It runs on Node.js (>=10) and works in conjunction with [mochawesome-report-generator][marge] t...
(EN_WORDINESS_PREMIUM_IN_CONJUNCTION_WITH)
🔇 Additional comments (11)
LICENSE.md (1)
4-4: License Update Verification
The updated license now includes a new copyright
statement: “Copyright (c) 2023-present node-modules and the contributors.”
This addition appropriately acknowledges the current contributors and aligns with the PR’s documentation updates. Ensure that the legal review (if applicable) confirms this change..github/workflows/release.yml (3)
1-2: Set Release Workflow Name
The workflow's name ("Release") is concise and accurately reflects its purpose.
3-6: Validate Trigger Conditions
The workflow is configured to trigger on pushes to the master branch. Ensure that triggering on push only meets your release criteria and that additional events (if needed) are covered in your overall release process.
7-13: Confirm External Workflow Integration and Secret Management
The job correctly references the external reusable workflow located atnode-modules/github-actions/.github/workflows/node-release.yml@masterand passes the necessary secrets (NPM_TOKENandGIT_TOKEN). Please verify these secrets are properly set in the repository.package.json (2)
50-52: Enforce Node.js Version with Engines Field
The addition of the"engines": { "node": ">=18.19.0" }field ensures that the project runs only on supported Node.js versions. This aligns with the breaking change to drop support for older Node versions.
61-61: Update Mocha Dependency Version
The Mocha dependency has been updated to"mocha": "^11.1.0", which satisfies the PR objective to support Mocha version 11. This change helps ensure compatibility with the new features and fixes provided in Mocha v11.README.md (2)
1-1: Update Project Title
The project title has been updated to “mochawesome-with-mocha” to reflect the fork and the inclusion of Mocha as a dependency.
3-4: Refresh CI and Package Badges
The badges now correctly reference the new npm package and updated CI workflow. This update maintains consistency with the repository’s new identity and CI configuration..github/workflows/nodejs.yml (3)
1-2: Confirm Workflow Naming
The workflow is named "Node.js CI," which clearly indicates its purpose.
3-8: Review Trigger Configuration
The workflow is set to trigger on both push and pull_request events on the master branch. This simplified trigger configuration is effective; just verify that no additional paths or conditions are required in your CI/CD strategy.
10-17: Assess CI Job Configuration
The job named "Job" leverages an external workflow (node-test.yml) and explicitly sets the operating system toubuntu-latestwith Node.js versions"18.19.0, 18, 20, 22". The inclusion of theCODECOV_TOKENsecret supports integrated code coverage reporting. All changes align well with your updated Node.js requirements and Mocha support.
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: 0
🧹 Nitpick comments (1)
package.json (1)
14-14: Update CI Script Command
Replacing the previous "prepack" script with the new"ci": "npm run test"command clarifies the intent for continuous integration runs. Ensure that all CI configurations and documentation referencing the old script are updated accordingly.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
package.json(3 hunks)
🔇 Additional comments (2)
package.json (2)
50-52: Enforce Minimum Node.js Version
The addition of the"engines": { "node": ">=18.19.0" }field effectively enforces the new Node.js version requirement, aligning with the breaking change introduced for Mocha 11 support. Verify that contributors and CI pipelines are aligned with this update.
61-61: Upgrade Mocha Dependency to Version 11
Updating the Mocha dependency from "^10.2.0" to "^11.1.0" meets the PR objective. Please ensure that any Mocha-specific configurations and tests are reviewed for compatibility with the breaking changes in Mocha 11.
[skip ci] ## [8.0.0](v7.1.3...v8.0.0) (2025-03-14) ### ⚠ BREAKING CHANGES * drop Node.js < 18.19.0 support part of eggjs/egg#3644 eggjs/egg#5257 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Introduced an automated release process on main branch updates. - **Improvements** - Streamlined the CI testing process with enhanced Node.js version support. - Updated project documentation and branding to reflect the fork and new Mocha integration. - Upgraded platform requirements with a new Node.js engine specification and improved testing framework. - **Chores** - Removed the automated npm publishing process. - Refreshed license information to acknowledge current contributors. <!-- end of auto-generated comment: release notes by coderabbit.ai --> ### Features * use mocha@11 ([#2](#2)) ([8b90ade](8b90ade))
BREAKING CHANGE: drop Node.js < 18.19.0 support
part of eggjs/egg#3644
eggjs/egg#5257
Summary by CodeRabbit