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/koa@2.18.1 environment, network Transitive: eval, filesystem, unsafe +35 911 kB fengmk2
npm/@eggjs/router@3.0.0 network Transitive: environment, eval +12 701 kB fengmk2
npm/@eggjs/tsconfig@1.3.3 None 0 4.23 kB fengmk2
npm/@eggjs/utils@3.0.1 environment 0 18.6 kB fengmk2
npm/@types/js-yaml@4.0.9 None 0 9.12 kB types
npm/@types/mocha@10.0.6 None 0 95.6 kB types
npm/@types/supertest@6.0.2 None +3 41.4 kB types
npm/egg-bin@6.10.0 environment Transitive: eval, filesystem, network, shell, unsafe +230 20.9 MB fengmk2
npm/eslint-config-egg@13.1.0 Transitive: environment, eval, filesystem, shell, unsafe +227 36.7 MB fengmk2
npm/get-ready@3.1.0 None 0 18.8 kB fengmk2
npm/git-contributor@2.1.5 environment, shell Transitive: filesystem, network +49 5.59 MB xudafeng
npm/is-type-of@2.1.0 None 0 107 kB fengmk2
npm/node-homedir@2.0.0 None 0 8.11 kB fengmk2
npm/performance-ms@1.0.0 None 0 3.27 kB fengmk2
npm/ready-callback@4.0.0 None +2 34.9 kB fengmk2
npm/supertest@7.0.0 network Transitive: environment, eval, filesystem +34 1.84 MB titanism
npm/tshy-after@1.0.0 None 0 5.02 kB fengmk2
npm/tshy@1.15.1 Transitive: environment, filesystem, shell, unsafe +47 4.76 MB isaacs
npm/typescript@5.4.5 None 0 32.4 MB typescript-bot

🚮 Removed packages: npm/@eggjs/router@2.0.1, npm/@types/depd@1.1.36, npm/@types/koa@2.15.0, npm/co@4.6.0, npm/egg-bin@5.18.1, npm/egg-utils@2.5.0, npm/eslint-config-egg@12.3.1, npm/get-ready@2.0.1, npm/git-contributor@1.1.0, npm/koa-convert@1.2.0, npm/koa@2.15.3, npm/node-homedir@1.1.1, npm/ready-callback@3.0.0, npm/supertest@4.0.2, npm/typescript@4.9.5, npm/utility@1.18.0

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/egg-bin@6.10.0

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/foo@1.0.0 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/egg-bin@6.9.0

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

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 ⚠️
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/egg-bin@6.10.0

@fengmk2 fengmk2 mentioned this pull request Jun 17, 2024
20 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/egg-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.

None yet

1 participant