8000 refactor: plugin/config, plugin/ajv by fengmk2 · Pull Request #283 · eggjs/tegg · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

refactor: plugin/config, plugin/ajv #283

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

Merged
merged 3 commits into from
Feb 21, 2025
Merged

refactor: plugin/config, plugin/ajv #283

merged 3 commits into from
Feb 21, 2025

Conversation

fengmk2
Copy link
Member
@fengmk2 fengmk2 commented Feb 16, 2025

plugin start

plugin only can test on mocha
Copy link
coderabbitai bot commented Feb 16, 2025

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

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

@fengmk2
Copy link
Member Author
fengmk2 commented Feb 16, 2025

vitest 是运行时编译的,没法同时使用 vitest + tsx/esm

Copy link
socket-security bot commented Feb 16, 2025

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

Package New capabilities Transitives Size Publisher
npm/@eggjs/tsconfig@1.3.3 None 0 4.23 kB fengmk2
npm/@istanbuljs/nyc-config-typescript@1.0.2 None +1 23.3 kB oss-bot
npm/@vitest/coverage-v8@3.0.6 Transitive: environment, filesystem, shell +38 9.74 MB vitestbot
npm/eslint-config-egg@14.1.0 Transitive: environment, filesystem, unsafe +61 12.1 MB fengmk2
npm/eslint-plugin-import@2.31.0 environment, filesystem, unsafe Transitive: eval +77 5.56 MB ljharb
npm/eslint-plugin-oxlint@0.15.11 None +1 816 kB boshen
npm/eslint@8.57.1 environment, filesystem Transitive: eval, shell, unsafe +78 10 MB eslintbot
npm/lerna@6.6.2 Transitive: environment, eval, filesystem, network, shell, unsafe +501 493 MB jameshenry
npm/nyc@15.1.0 environment, filesystem, unsafe Transitive: eval, shell +112 13.7 MB coreyfarrell
npm/oxlint@0.15.11 None +8 122 MB boshen
npm/rimraf@6.0.1 environment, filesystem Transitive: shell +13 2.99 MB isaacs

🚮 Removed packages: npm/@eggjs/core-decorator@3.52.0, npm/@eggjs/egg-module-common@3.52.0, npm/@eggjs/tegg-ajv-plugin@3.52.0, npm/@eggjs/tegg-aop-runtime@3.52.0, npm/@eggjs/tegg-background-task@3.52.0, npm/@eggjs/tegg-common-util@3.52.0, npm/@eggjs/tegg-dal-plugin@3.52.0, npm/@eggjs/tegg-dynamic-inject-runtime@3.52.0, npm/@eggjs/tegg-lifecycle@3.52.0, npm/@eggjs/tegg-loader@3.52.0, npm/@eggjs/tegg-runtime@3.52.0, npm/@eggjs/tegg@3.52.0, npm/@types/mocha@10.0.10, npm/@types/node@20.17.19, npm/@types/node@22.13.4, npm/coffee@5.5.1, npm/cross-env@7.0.3, npm/egg@3.30.1, npm/egg@4.0.9, npm/globby@14.1.0, npm/mocha@10.8.2, npm/ts-node@10.9.2, npm/typescript@5.7.3

View full report↗︎

Copy link
codecov bot commented Feb 16, 2025

Codecov Report

Attention: Patch coverage is 21.42857% with 33 lines in your changes missing coverage. Please review.

Project coverage is 62.59%. Comparing base (fd09042) to head (5e1e738).
Report is 1 commits behind head on next.

Files with missing lines Patch % Lines
plugin/tegg/app.ts 0.00% 10 Missing ⚠️
vitest.config.ts 0.00% 5 Missing ⚠️
plugin/tegg/lib/run_in_background.ts 0.00% 4 Missing ⚠️
plugin/ajv/lib/Ajv.ts 0.00% 3 Missing ⚠️
plugin/tegg/app/extend/application.unittest.ts 25.00% 3 Missing ⚠️
plugin/tegg/app/extend/context.ts 33.33% 2 Missing ⚠️
plugin/tegg/index.ts 0.00% 2 Missing ⚠️
plugin/tegg/lib/ctx_lifecycle_middleware.ts 0.00% 2 Missing ⚠️
...gg/app/middleware/tegg_ctx_lifecycle_middleware.ts 0.00% 1 Missing ⚠️
plugin/tegg/lib/EggCompatibleObject.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             next     #283      +/-   ##
==========================================
+ Coverage   62.11%   62.59%   +0.47%     
==========================================
  Files         394      395       +1     
  Lines       12170    12171       +1     
  Branches     1747     1726      -21     
==========================================
+ Hits         7560     7618      +58     
+ Misses       4610     4553      -57     

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

@fengmk2
Copy link
Member Author
fengmk2 commented Feb 16, 2025

image

找到了 vitest + tsx/esm 兼容的方式了

fengmk2 added a commit to eggjs/core that referenced this pull request Feb 16, 2025
eggjs/tegg#283

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Bug Fixes**
- Updated the file loading functionality to properly differentiate
TypeScript files from other file types. This modification prevents
unintended processing behavior for TypeScript content, ensuring more
reliable file operations and enhancing overall stability in handling
various file formats.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
@fengmk2 fengmk2 marked this pull request as ready for review February 21, 2025 11:18
@fengmk2 fengmk2 merged commit 662f6fa into next Feb 21, 2025
11 of 12 checks passed
@fengmk2 fengmk2 deleted the plugin/ajv branch February 21, 2025 11:18
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.

1 participant
0