egg icon indicating copy to clipboard operation
egg copied to clipboard

feat: refactor with typescript to support cjs ane esm both

Open fengmk2 opened this issue 1 year ago • 5 comments

BREAKING CHANGE: Drop Node.js < 18.19.0 support

part of https://github.com/eggjs/egg/issues/3644

Breaking changes:

  • Drop Node.js < 18.19.0 support
  • Drop generator function support

use @eggjs/core@4 https://github.com/eggjs/egg-core/pull/265

fengmk2 avatar Jun 18 '24 01:06 fengmk2

[!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.

176 files out of 258 files are above the max files limit of 75. 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>, 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. (Beta)
  • @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.

coderabbitai[bot] avatar Jun 18 '24 01:06 coderabbitai[bot]

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

Package New capabilities Transitives Size Publisher
npm/@arethetypeswrong/[email protected] Transitive: environment, filesystem, network, shell, unsafe +50 31.5 MB andrewbranch
npm/@eggjs/[email protected] environment Transitive: eval, filesystem, network, shell, unsafe +225 20.8 MB fengmk2
npm/@eggjs/[email protected] environment +18 877 kB fengmk2
npm/@eggjs/[email protected] None +1 141 kB fengmk2
npm/@eggjs/[email protected] environment Transitive: eval, filesystem, network, unsafe +48 2.62 MB fengmk2
npm/@eggjs/[email protected] environment, network Transitive: eval, filesystem, unsafe +34 914 kB fengmk2
npm/@eggjs/[email protected] environment Transitive: eval, filesystem, shell, unsafe +106 8.71 MB fengmk2
npm/@eggjs/[email protected] Transitive: filesystem +3 4.67 MB fengmk2
npm/@eggjs/[email protected] Transitive: environment, eval, filesystem, network +41 2.02 MB fengmk2
npm/@eggjs/[email protected] environment 0 124 kB fengmk2
npm/@eggjs/[email protected] Transitive: unsafe +3 112 kB fengmk2
npm/@types/[email protected] None 0 3.22 kB types
npm/@types/[email protected] None +17 179 kB types
npm/@types/[email protected] None 0 96.1 kB types
npm/@types/[email protected] None 0 3.2 kB types
npm/@types/[email protected] None +1 2.37 MB types
npm/[email protected] environment 0 62.6 kB fengmk2
npm/[email protected] Transitive: environment, eval, filesystem, network, shell, unsafe +114 8.04 MB fengmk2
npm/[email protected] Transitive: environment, eval, filesystem, unsafe +171 18.8 MB fengmk2
npm/[email protected] None 0 20.6 kB fengmk2
npm/[email protected] environment +9 183 kB fengmk2
npm/[email protected] None +1 14 kB fengmk2
npm/[email protected] None 0 12.8 kB fengmk2
npm/[email protected] network, shell +6 90.2 kB fengmk2
npm/[email protected] None 0 6.9 kB fengmk2
npm/[email protected] environment, filesystem Transitive: shell +25 1.09 MB isaacs
npm/[email protected] environment 0 42.2 kB fengmk2
npm/[email protected] environment 0 18 kB fengmk2
npm/[email protected] Transitive: environment, filesystem +110 50 MB sindresorhus
npm/[email protected] None 0 27.6 kB fengmk2
npm/[email protected] environment, filesystem, shell Transitive: unsafe +50 4.59 MB isaacs
npm/[email protected] Transitive: environment, eval, filesystem, network +27 3.06 MB fengmk2

🚮 Removed packages: 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]

View full report↗︎

socket-security[bot] avatar Jun 23 '24 15:06 socket-security[bot]

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

View full report↗︎

socket-security[bot] avatar Jun 23 '24 15:06 socket-security[bot]

跑通第一个单测

fengmk2 avatar Jul 07 '24 15:07 fengmk2

Codecov Report

Attention: Patch coverage is 84.66145% with 333 lines in your changes missing coverage. Please review.

Project coverage is 88.36%. Comparing base (44ab507) to head (510cb44). Report is 6 commits behind head on master.

Files with missing lines Patch % Lines
src/app/extend/context.ts 53.97% 139 Missing :warning:
src/lib/core/base_context_logger.ts 4.47% 64 Missing :warning:
src/lib/core/messenger/ipc.ts 69.59% 45 Missing :warning:
src/lib/core/utils.ts 81.81% 14 Missing :warning:
src/lib/core/messenger/local.ts 69.44% 11 Missing :warning:
src/lib/core/singleton.ts 82.14% 10 Missing :warning:
src/lib/agent.ts 87.87% 8 Missing :warning:
src/lib/core/base_hook_class.ts 76.66% 7 Missing :warning:
src/lib/egg.ts 97.90% 6 Missing :warning:
src/lib/core/base_context_class.ts 76.19% 5 Missing :warning:
... and 7 more
Additional details and impacted files
@@             Coverage Diff             @@
##           master    #5328       +/-   ##
===========================================
- Coverage   99.86%   88.36%   -11.51%     
===========================================
  Files          36       39        +3     
  Lines        3628     3772      +144     
  Branches      520      338      -182     
===========================================
- Hits         3623     3333      -290     
- Misses          5      439      +434     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Jul 07 '24 15:07 codecov[bot]