Skip to content

Conversation

@fengmk2
Copy link
Member

@fengmk2 fengmk2 commented Mar 14, 2025

BREAKING CHANGE: drop Node.js < 18.19.0 support

part of eggjs/egg#3644

eggjs/egg#5257

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.

BREAKING CHANGE: drop Node.js < 18.19.0 support

part of eggjs/egg#3644

eggjs/egg#5257
@fengmk2 fengmk2 requested a review from Copilot March 14, 2025 01:42
@coderabbitai
Copy link

coderabbitai bot commented Mar 14, 2025

Walkthrough

This 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

File(s) Change Summary
.github/workflows/nodejs.yml Reworked Node.js CI configuration: renamed job to "Job", updated Node.js versions (18.19.0, 18, 20, 22), removed paths-ignore, and now references an external workflow (node-test.yml@master) with added Codecov token.
.github/workflows/npm-publish.yml Workflow file removed; previously used for npm package publishing via manual trigger and contained steps for checkout, setup, test, and publish.
.github/workflows/release.yml New workflow added for release process triggered on pushes to the master branch; calls an external workflow (node-release.yml@master) and passes authentication tokens (NPM_TOKEN and GIT_TOKEN).
LICENSE.md, README.md, package.json Updated documentation and metadata: added an updated copyright line, changed the README title and CI badge with new project details, added a Node.js engine requirement (>=18.19.0), and updated the "mocha" dependency.

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
Loading
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
Loading

Poem

I'm a hopping coder with ears so keen,
Leaping through workflows in a CI dream.
Node tests and releases now dance in the night,
With secrets and tokens keeping processes tight.
I nibble on code, agile and free —
A bunny cheer for change, as joyful as can be!
🐰✨

Tip

⚡🧪 Multi-step agentic review comment chat (experimental)
  • We're introducing multi-step agentic chat in review comments. This experimental feature enhances review discussions with the CodeRabbit agentic chat by enabling advanced interactions, including the ability to create pull requests directly from comments.
    - To enable this feature, set early_access to true under 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.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@socket-security
Copy link

socket-security bot commented Mar 14, 2025

New, updated, and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/mocha@10.8.211.1.0 Transitive: shell +84 8.01 MB voxpelli

View full report↗︎

Copy link

Copilot AI left a 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.

Copy link

@coderabbitai coderabbitai bot left a 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

📥 Commits

Reviewing files that changed from the base of the PR and between cc03010 and 3fbd98a.

📒 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 at node-modules/github-actions/.github/workflows/node-release.yml@master and passes the necessary secrets (NPM_TOKEN and GIT_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 to ubuntu-latest with Node.js versions "18.19.0, 18, 20, 22". The inclusion of the CODECOV_TOKEN secret supports integrated code coverage reporting. All changes align well with your updated Node.js requirements and Mocha support.

@fengmk2 fengmk2 merged commit 8b90ade into master Mar 14, 2025
9 of 10 checks passed
@fengmk2 fengmk2 deleted the use-mocha-11 branch March 14, 2025 01:47
Copy link

@coderabbitai coderabbitai bot left a 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

📥 Commits

Reviewing files that changed from the base of the PR and between 3fbd98a and e7f5d85.

📒 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.

fengmk2 pushed a commit that referenced this pull request Mar 14, 2025
[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))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants