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: refactor with typescript to support cjs ane esm both #5328

Draft
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

fengmk2
Copy link
Member

@fengmk2 fengmk2 commented 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

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
@fengmk2 fengmk2 self-assigned this Jun 18, 2024
Copy link

coderabbitai bot commented Jun 18, 2024

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

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

@fengmk2 fengmk2 mentioned this pull request Jun 18, 2024
26 tasks
Copy link

socket-security bot commented Jun 23, 2024

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

Package New capabilities Transitives Size Publisher
npm/@eggjs/[email protected] environment 0 81.4 kB fengmk2
npm/[email protected] environment 0 62.6 kB fengmk2
npm/[email protected] None +2 230 kB fengmk2
npm/[email protected] Transitive: environment, eval, filesystem, unsafe +149 18 MB fengmk2
npm/[email protected] None 0 20.6 kB fengmk2
npm/[email protected] environment, network Transitive: shell +3 69.9 kB fengmk2
npm/[email protected] None 0 107 kB fengmk2
npm/[email protected] Transitive: environment, eval, network, unsafe +32 1.04 MB fengmk2
npm/[email protected] None 0 2.36 kB jongleberry
npm/[email protected] None 0 12.8 kB fengmk2
npm/[email protected] Transitive: environment, eval, filesystem, network +13 182 kB coderhaoxin
npm/[email protected] None 0 6.72 kB styfle
npm/[email protected] None 0 23.5 kB fengmk2
npm/[email protected] None 0 5.82 kB fengmk2
npm/[email protected] environment, filesystem, unsafe 0 11.2 MB prettier-bot
npm/[email protected] environment, shell +3 34.3 kB fengmk2
npm/[email protected] None +5 56.9 kB fengmk2
npm/[email protected] environment 0 17.8 kB fengmk2
npm/[email protected] unsafe 0 14.2 kB popomore
npm/[email protected] network Transitive: environment, eval, filesystem +33 1.75 MB titanism
npm/[email protected] None 0 22.4 MB andrewbranch, minestarks, rbuckton, ...5 more
npm/[email protected] Transitive: eval +19 2.39 MB fengmk2
npm/[email protected] None +4 194 kB fengmk2
npm/[email protected] None 0 9.01 kB fengmk2

🚮 Removed packages: npm/@umijs/[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 23, 2024

🚨 Potential security issues detected. Learn more about Socket for GitHub ↗︎

To accept the risk, merge this PR and you will not be notified again.

Alert Package NoteSourceCI
Possible typosquat attack npm/[email protected] ⚠︎

View full report↗︎

Next steps

What is a typosquat?

Package name is similar to other popular packages and may not be the package you want.

Use care when consuming similarly named packages and ensure that you did not intend to consume a different package. Malicious packages often publish using similar names as existing popular packages.

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
Copy link
Member Author

fengmk2 commented Jul 7, 2024

跑通第一个单测

Copy link

codecov bot commented Jul 7, 2024

Codecov Report

Attention: Patch coverage is 26.42857% with 721 lines in your changes missing coverage. Please review.

Project coverage is 18.13%. Comparing base (44ab507) to head (9f66f32).
Report is 1 commits behind head on master.

Files Patch % Lines
src/lib/egg.ts 21.82% 197 Missing ⚠️
src/lib/core/utils.ts 12.98% 67 Missing ⚠️
src/lib/core/base_context_logger.ts 4.47% 64 Missing ⚠️
src/lib/application.ts 26.31% 56 Missing ⚠️
src/lib/agent.ts 16.66% 55 Missing ⚠️
src/lib/core/singleton.ts 21.42% 44 Missing ⚠️
src/lib/core/logger.ts 11.90% 37 Missing ⚠️
src/lib/start.ts 36.36% 35 Missing ⚠️
src/lib/core/httpclient.ts 40.38% 31 Missing ⚠️
src/lib/core/context_httpclient.ts 18.18% 27 Missing ⚠️
... and 7 more
Additional details and impacted files
@@             Coverage Diff             @@
##           master    #5328       +/-   ##
===========================================
- Coverage   99.86%   18.13%   -81.73%     
===========================================
  Files          36       20       -16     
  Lines        3628     1974     -1654     
  Branches      520       11      -509     
===========================================
- Hits         3623      358     -3265     
- Misses          5     1616     +1611     

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

1 participant