Skip to content
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

feat: support cjs and esm both #265

Merged
merged 42 commits into from
Jun 17, 2024
Merged

feat: support cjs and esm both #265

merged 42 commits into from
Jun 17, 2024

Conversation

fengmk2
Copy link
Member

@fengmk2 fengmk2 commented Jun 4, 2023

BREAKING CHANGE: Drop Node.js < 18.19.0 support

#264

the core part of eggjs/egg#3644

Breaking changes:

  • Drop Node.js < 18.19.0 support
  • Drop generator function support
  • loader functions change to async function

@fengmk2 fengmk2 marked this pull request as draft June 4, 2023 07:18
Copy link

coderabbitai bot commented Jun 8, 2024

Important

Review skipped

More than 25% of the files skipped due to max files limit. The review is being skipped to prevent a low-quality review.

103 files out of 180 files are above the max files limit of 50. Please upgrade to Pro plan to get higher limits.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

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>.
    • 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 generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @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 as 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 resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration 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.

@fengmk2 fengmk2 self-assigned this Jun 8, 2024
Copy link

socket-security bot commented Jun 8, 2024

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

Package New capabilities Transitives Size Publisher
npm/@eggjs/[email protected] environment, network Transitive: eval, filesystem, unsafe +35 911 kB fengmk2
npm/@eggjs/[email protected] network Transitive: environment, eval +12 701 kB fengmk2
npm/@eggjs/[email protected] None 0 4.23 kB fengmk2
npm/@eggjs/[email protected] environment 0 18.6 kB fengmk2
npm/@types/[email protected] None 0 9.12 kB types
npm/@types/[email protected] None 0 95.6 kB types
npm/@types/[email protected] None +3 41.4 kB types
npm/[email protected] environment Transitive: eval, filesystem, network, shell, unsafe +230 20.9 MB fengmk2
npm/[email protected] Transitive: environment, eval, filesystem, shell, unsafe +227 36.7 MB fengmk2
npm/[email protected] None 0 18.8 kB fengmk2
npm/[email protected] environment, shell Transitive: filesystem, network +49 5.59 MB xudafeng
npm/[email protected] None 0 107 kB fengmk2
npm/[email protected] None 0 8.11 kB fengmk2
npm/[email protected] None 0 3.27 kB fengmk2
npm/[email protected] None +2 34.9 kB fengmk2
npm/[email protected] network Transitive: environment, eval, filesystem +34 1.84 MB titanism
npm/[email protected] None 0 5.02 kB fengmk2
npm/[email protected] Transitive: environment, filesystem, shell, unsafe +47 4.76 MB isaacs
npm/[email protected] None 0 32.4 MB typescript-bot

🚮 Removed packages: npm/@eggjs/[email protected], npm/@types/[email protected], npm/@types/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected]

View full report↗︎

Copy link

socket-security bot commented Jun 8, 2024

👍 Dependency issues cleared. Learn more about Socket for GitHub ↗︎

This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored.

Ignoring: npm/[email protected]

View full report↗︎

Next steps

Take a deeper look at the dependency

Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support [AT] socket [DOT] dev.

Remove the package

If you happen to install a dependency that Socket reports as Known Malware you should immediately remove it and select a different dependency. For other alert types, you may may wish to investigate alternative packages or consider if there are other ways to mitigate the specific risk posed by the dependency.

Mark a package as acceptable risk

To ignore an alert, reply with a comment starting with @SocketSecurity ignore followed by a space separated list of ecosystem/package-name@version specifiers. e.g. @SocketSecurity ignore npm/[email protected] or ignore all packages with @SocketSecurity ignore-all

@fengmk2 fengmk2 changed the title feat: refactor with typescript feat: support cjs and esm both Jun 11, 2024
@fengmk2
Copy link
Member Author

fengmk2 commented Jun 11, 2024

@SocketSecurity ignore npm/[email protected]

Copy link

codecov bot commented Jun 16, 2024

Codecov Report

Attention: Patch coverage is 93.25452% with 194 lines in your changes missing coverage. Please review.

Project coverage is 92.99%. Comparing base (72fafc8) to head (dcc9fc2).
Report is 7 commits behind head on master.

Files Patch % Lines
src/lifecycle.ts 71.07% 105 Missing ⚠️
src/loader/egg_loader.ts 97.17% 48 Missing ⚠️
src/egg.ts 93.02% 30 Missing ⚠️
src/utils/index.ts 89.18% 4 Missing ⚠️
src/utils/timing.ts 96.49% 4 Missing ⚠️
src/loader/file_loader.ts 97.00% 3 Missing ⚠️

❗ There is a different number of reports uploaded between BASE (72fafc8) and HEAD (dcc9fc2). Click for more details.

HEAD has 2 uploads less than BASE
Flag BASE (72fafc8) HEAD (dcc9fc2)
14 12
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #265      +/-   ##
==========================================
- Coverage   99.76%   92.99%   -6.77%     
==========================================
  Files          19       10       -9     
  Lines        2971     3242     +271     
  Branches      556      508      -48     
==========================================
+ Hits         2964     3015      +51     
- Misses          7      227     +220     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@fengmk2 fengmk2 marked this pull request as ready for review June 17, 2024 16:54
@fengmk2
Copy link
Member Author

fengmk2 commented Jun 17, 2024

@SocketSecurity ignore npm/[email protected]

@fengmk2 fengmk2 mentioned this pull request Jun 17, 2024
29 tasks
@fengmk2 fengmk2 merged commit fed5f35 into master Jun 17, 2024
15 of 17 checks passed
@fengmk2 fengmk2 deleted the next branch June 17, 2024 17:08
fengmk2 pushed a commit that referenced this pull request Jun 17, 2024
[skip ci]

## [6.0.0](v5.3.1...v6.0.0) (2024-06-17)

### ⚠ BREAKING CHANGES

* Drop Node.js < 18.19.0 support

#264

the core part of eggjs/egg#3644

Breaking changes:
- Drop Node.js < 18.19.0 support
- Drop generator function support
- loader functions change to async function

### Features

* export asyncLocalStorage instance to global ([#267](#267)) ([910fe85](910fe85))
* support cjs and esm both ([#265](#265)) ([fed5f35](fed5f35))

### Bug Fixes

* use gals lib ([#268](#268)) ([72fafc8](72fafc8))
fengmk2 added a commit to eggjs/egg that referenced this pull request Jun 18, 2024
BREAKING CHANGE: Drop Node.js < 18.19.0 support

part of #3644

Breaking changes:
 - Drop Node.js < 18.19.0 support
 - Drop generator function support

use @eggjs/core@4 eggjs/core#265
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

1 participant