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

refactor: use tegg v4 #765

Merged
merged 15 commits into from
Mar 5, 2025
Merged

refactor: use tegg v4 #765

merged 15 commits into from
Mar 5, 2025

Conversation

fengmk2
Copy link
Member

@fengmk2 fengmk2 commented Mar 2, 2025

No description provided.

@fengmk2 fengmk2 requested a review from Copilot March 2, 2025 14:34
Copy link
Contributor

coderabbitai bot commented Mar 2, 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.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ 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.
  • @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.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Overview

This PR refactors the codebase to support tegg v4 by updating import paths to include explicit “.js” extensions where needed. The changes ensure compatibility with the new module resolution behavior in tegg v4.

  • Updated import statements in various files to append “.js”
  • Adjusted dynamic import usage in app.ts for ChangesStreamService
  • Ensured consistency of import formats across binary adapter modules

Reviewed Changes

File Description
app/common/adapter/NPMRegistry.ts Updated import paths to include “.js” extension
app/common/adapter/binary/NodeBinary.ts Added “.js” extensions to imports
app/common/adapter/binary/AbstractBinary.ts Added “.js” extensions to imports
app/common/PackageUtil.ts Updated import path for PackageRepository
app/common/adapter/binary/ChromeForTestingBinary.ts Added “.js” extensions in import statements
app/common/adapter/binary/GithubBinary.ts Updated import paths for BinaryType and related items
app/common/adapter/binary/ImageminBinary.ts Updated import paths to include “.js” extension
app/common/adapter/NFSAdapter.ts Added “.js” extensions to imported modules
app/common/adapter/binary/PrismaBinary.ts Updated imports with the “.js” extension
app/common/adapter/binary/NwjsBinary.ts Added “.js” extensions to import statements
app/common/adapter/binary/ElectronBinary.ts Updated import paths with “.js” extension
app/common/adapter/binary/CypressBinary.ts Added “.js” extensions to imports
app/common/adapter/binary/BucketBinary.ts Updated import ordering and added “.js” extensions
app/common/adapter/BugVersionStore.ts Updated import for BugVersion with “.js” extension
app.ts Changed import of Application and adjusted lifecycle
app/common/adapter/binary/NodePreGypBinary.ts Updated import paths with “.js” extension
app/common/adapter/binary/PlaywrightBinary.ts Added “.js” extensions in import statements
app/common/adapter/binary/ApiBinary.ts Updated import paths with “.js” for consistency
app/common/adapter/binary/EdgedriverBinary.ts Added “.js” extension to import statements
app/common/FileUtil.ts Updated import of dayjs to include “.js” extension

Copilot reviewed 289 out of 289 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (1)

app.ts:5

  • Consider removing the commented-out import for ChangesStreamService if it is no longer needed, to reduce confusion and keep the code clean.
// import { ChangesStreamService } from './app/core/service/ChangesStreamService.js';
Copy link

socket-security bot commented Mar 2, 2025

@fengmk2 fengmk2 marked this pull request as ready for review March 3, 2025 14:49
@@ -144,7 +145,8 @@ describe('test/core/service/RegistryManagerService/index.test.ts', () => {
await registryManagerService.createSyncChangesStream({ registryId: registry.registryId, since: '100' });
const targetName = 'CUSTOM_WORKER';
const task = await taskRepository.findTaskByTargetName(targetName, TaskType.ChangesStream);
assert((task?.data as ChangesStreamTaskData).since === '');
assert(task);
assert.equal((task.data as ChangesStreamTaskData).since, '100');
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ai 改错了。。。

Copy link

codecov bot commented Mar 4, 2025

Codecov Report

Attention: Patch coverage is 99.41995% with 5 lines in your changes missing coverage. Please review.

Project coverage is 96.54%. Comparing base (b6c781e) to head (f753338).
Report is 2 commits behind head on next.

Files with missing lines Patch % Lines
app/port/webauth/WebauthController.ts 73.33% 4 Missing ⚠️
app/core/service/PackageSearchService.ts 87.50% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             next     #765      +/-   ##
==========================================
- Coverage   96.54%   96.54%   -0.01%     
==========================================
  Files         191      192       +1     
  Lines       19251    19365     +114     
  Branches     2517     1816     -701     
==========================================
+ Hits        18586    18696     +110     
- Misses        665      669       +4     

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

@fengmk2 fengmk2 merged commit 0a64698 into next Mar 5, 2025
15 checks passed
@fengmk2 fengmk2 deleted the tegg-v4 branch March 5, 2025 16:04
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