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: add EDGEDRIVER_CDNURL env #50

Merged
merged 2 commits into from
May 11, 2024
Merged

feat: add EDGEDRIVER_CDNURL env #50

merged 2 commits into from
May 11, 2024

Conversation

fengmk2
Copy link
Member

@fengmk2 fengmk2 commented May 11, 2024

cnpm/cnpmcore#594

EDGEDRIVER_CDNURL=https://npmmirror.com/mirrors/edgedriver EDGEDRIVER_VERSION=126.0.2578.0 npx edgedriver -v

Summary by CodeRabbit

  • Chores

    • Expanded Node.js version support in CI workflows.
    • Streamlined release process by removing manual triggers and checks.
  • Documentation

    • Updated contributor list and project documentation.
  • New Features

    • Added new environment variable for Edge Driver URL to enhance compatibility in China.

cnpm/cnpmcore#594

```bash
EDGEDRIVER_CDNURL=https://npmmirror.com/mirrors/edgedriver EDGEDRIVER_VERSION=126.0.2578.0 npx edgedriver -v
```
Copy link

coderabbitai bot commented May 11, 2024

Walkthrough

The recent updates refine Node.js workflows by adding a new version and streamlining the release process. The repository is kept clean with the exclusion of package-lock.json in .gitignore. The README.md now reflects the latest contributors and timestamp changes. Additionally, a new environment variable specific to China is introduced in package.json, optimizing for that region.

Changes

Files Change Summary
.github/workflows/... Updated Node.js versions; streamlined release process.
.gitignore Added exclusion for package-lock.json.
README.md Updated contributors and timestamp.
package.json Added environment variable for Chinese mirror URLs.

🐇✨
In the code's lively burrow, changes hop—
A version here, a tweak, and then a stop.
Lock files hidden, where no eyes can see,
Contributors shift, as lively as can be.
With every commit, the burrow grows,
Under moon's soft glow, the change-log shows.
🌟🐾


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.

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 a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @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 merged commit b14b16a into master May 11, 2024
8 checks passed
@fengmk2 fengmk2 deleted the env-EDGEDRIVER_CDNURL branch May 11, 2024 13:24
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 4

Review Details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits Files that changed from the base of the PR and between bd64aec and 355dffe.
Files selected for processing (5)
  • .github/workflows/nodejs.yml (1 hunks)
  • .github/workflows/release.yml (1 hunks)
  • .gitignore (1 hunks)
  • README.md (1 hunks)
  • package.json (1 hunks)
Files skipped from review due to trivial changes (2)
  • .github/workflows/release.yml
  • .gitignore
Additional Context Used
LanguageTool (4)
README.md (4)

Near line 16: Unpaired symbol: ‘]’ seems to be missing
Context: ...ps://github.com/mafintosh/prebuild) and [node-pre-gyp](https://github.com/mapbox/...


Near line 33: Unpaired symbol: ‘]’ seems to be missing
Context: ...ub>](https://github.com/elrrrrrrr)
|[<img src="https://avatars.githubusercont...


Near line 35: It appears that a hyphen is missing (if ‘auto’ is not used in the context of ‘cars’).
Context: ...//github.com/xudafeng/git-contributor), auto updated at Sat May 11 2024 21:19:34 GMT+0800....


Near line 35: Commas set off the year in a month-day-year date.
Context: ...afeng/git-contributor), auto updated at Sat May 11 2024 21:19:34 GMT+0800. <!-- GITCONTR...

Additional comments not posted (1)
.github/workflows/nodejs.yml (1)

15-15: Ensure compatibility of Node.js version 22 with the tools used in this workflow.

@@ -28,10 +28,10 @@ Binary mirror config for [prebuild](https://github.com/mafintosh/prebuild) and [

## Contributors

|[<img src="https://avatars.githubusercontent.com/u/156269?v=4" width="100px;"/><br/><sub><b>fengmk2</b></sub>](https://github.com/fengmk2)<br/>|[<img src="https://avatars.githubusercontent.com/u/4635838?v=4" width="100px;"/><br/><sub><b>gemwuu</b></sub>](https://github.com/gemwuu)<br/>|[<img src="https://avatars.githubusercontent.com/u/6897780?v=4" width="100px;"/><br/><sub><b>killagu</b></sub>](https://github.com/killagu)<br/>|[<img src="https://avatars.githubusercontent.com/u/1119126?v=4" width="100px;"/><br/><sub><b>looksgood</b></sub>](https://github.com/looksgood)<br/>|[<img src="https://avatars.githubusercontent.com/u/36290410?v=4" width="100px;"/><br/><sub><b>WEN-JY</b></sub>](https://github.com/WEN-JY)<br/>|[<img src="https://avatars.githubusercontent.com/u/4136679?v=4" width="100px;"/><br/><sub><b>yibn2008</b></sub>](https://github.com/yibn2008)<br/>|
|[<img src="https://avatars.githubusercontent.com/u/156269?v=4" width="100px;"/><br/><sub><b>fengmk2</b></sub>](https://github.com/fengmk2)<br/>|[<img src="https://avatars.githubusercontent.com/u/4635838?v=4" width="100px;"/><br/><sub><b>gemwuu</b></sub>](https://github.com/gemwuu)<br/>|[<img src="https://avatars.githubusercontent.com/u/32174276?v=4" width="100px;"/><br/><sub><b>semantic-release-bot</b></sub>](https://github.com/semantic-release-bot)<br/>|[<img src="https://avatars.githubusercontent.com/u/6897780?v=4" width="100px;"/><br/><sub><b>killagu</b></sub>](https://github.com/killagu)<br/>|[<img src="https://avatars.githubusercontent.com/u/1119126?v=4" width="100px;"/><br/><sub><b>looksgood</b></sub>](https://github.com/looksgood)<br/>|[<img src="https://avatars.githubusercontent.com/u/36290410?v=4" width="100px;"/><br/><sub><b>WEN-JY</b></sub>](https://github.com/WEN-JY)<br/>|
Copy link

Choose a reason for hiding this comment

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

Add alt text for contributor images to improve accessibility.

- [<img src="https://avatars.githubusercontent.com/u/156269?v=4" width="100px;"/><br/><sub><b>fengmk2</b></sub>](https://github.com/fengmk2)<br/>
+ [<img src="https://avatars.githubusercontent.com/u/156269?v=4" alt="fengmk2" width="100px;"/><br/><sub><b>fengmk2</b></sub>](https://github.com/fengmk2)<br/>

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
|[<img src="https://avatars.githubusercontent.com/u/156269?v=4" width="100px;"/><br/><sub><b>fengmk2</b></sub>](https://github.com/fengmk2)<br/>|[<img src="https://avatars.githubusercontent.com/u/4635838?v=4" width="100px;"/><br/><sub><b>gemwuu</b></sub>](https://github.com/gemwuu)<br/>|[<img src="https://avatars.githubusercontent.com/u/32174276?v=4" width="100px;"/><br/><sub><b>semantic-release-bot</b></sub>](https://github.com/semantic-release-bot)<br/>|[<img src="https://avatars.githubusercontent.com/u/6897780?v=4" width="100px;"/><br/><sub><b>killagu</b></sub>](https://github.com/killagu)<br/>|[<img src="https://avatars.githubusercontent.com/u/1119126?v=4" width="100px;"/><br/><sub><b>looksgood</b></sub>](https://github.com/looksgood)<br/>|[<img src="https://avatars.githubusercontent.com/u/36290410?v=4" width="100px;"/><br/><sub><b>WEN-JY</b></sub>](https://github.com/WEN-JY)<br/>|
|[<img src="https://avatars.githubusercontent.com/u/156269?v=4" alt="fengmk2" width="100px;"/><br/><sub><b>fengmk2</b></sub>](https://github.com/fengmk2)<br/>|[<img src="https://avatars.githubusercontent.com/u/4635838?v=4" width="100px;"/><br/><sub><b>gemwuu</b></sub>](https://github.com/gemwuu)<br/>|[<img src="https://avatars.githubusercontent.com/u/32174276?v=4" width="100px;"/><br/><sub><b>semantic-release-bot</b></sub>](https://github.com/semantic-release-bot)<br/>|[<img src="https://avatars.githubusercontent.com/u/6897780?v=4" width="100px;"/><br/><sub><b>killagu</b></sub>](https://github.com/killagu)<br/>|[<img src="https://avatars.githubusercontent.com/u/1119126?v=4" width="100px;"/><br/><sub><b>looksgood</b></sub>](https://github.com/looksgood)<br/>|[<img src="https://avatars.githubusercontent.com/u/36290410?v=4" width="100px;"/><br/><sub><b>WEN-JY</b></sub>](https://github.com/WEN-JY)<br/>|

| :---: | :---: | :---: | :---: | :---: | :---: |
[<img src="https://avatars.githubusercontent.com/u/985607?v=4" width="100px;"/><br/><sub><b>dead-horse</b></sub>](https://github.com/dead-horse)<br/>|[<img src="https://avatars.githubusercontent.com/u/2784308?v=4" width="100px;"/><br/><sub><b>yisibl</b></sub>](https://github.com/yisibl)<br/>
[<img src="https://avatars.githubusercontent.com/u/6996341?v=4" width="100px;"/><br/><sub><b>yuler</b></sub>](https://github.com/yuler)<br/>|[<img src="https://avatars.githubusercontent.com/u/4136679?v=4" width="100px;"/><br/><sub><b>yibn2008</b></sub>](https://github.com/yibn2008)<br/>|[<img src="https://avatars.githubusercontent.com/u/985607?v=4" width="100px;"/><br/><sub><b>dead-horse</b></sub>](https://github.com/dead-horse)<br/>|[<img src="https://avatars.githubusercontent.com/u/5574625?v=4" width="100px;"/><br/><sub><b>elrrrrrrr</b></sub>](https://github.com/elrrrrrrr)<br/>|[<img src="https://avatars.githubusercontent.com/u/2784308?v=4" width="100px;"/><br/><sub><b>yisibl</b></sub>](https://github.com/yisibl)<br/>
Copy link

Choose a reason for hiding this comment

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

Fix table formatting by ensuring proper use of leading and trailing pipes.

- |[<img src="https://avatars.githubusercontent.com/u/6996341?v=4" width="100px;"/><br/><sub><b>yuler</b></sub>](https://github.com/yuler)<br/>|[<img src="https://avatars.githubusercontent.com/u/4136679?v=4" width="100px;"/><br/><sub><b>yibn2008</b></sub>](https://github.com/yibn2008)<br/>|
+ |[<img src="https://avatars.githubusercontent.com/u/6996341?v=4" width="100px;"/><br/><sub><b>yuler</b></sub>](https://github.com/yuler)|[<img src="https://avatars.githubusercontent.com/u/4136679?v=4" width="100px;"/><br/><sub><b>yibn2008</b></sub>](https://github.com/yibn2008)|

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
[<img src="https://avatars.githubusercontent.com/u/6996341?v=4" width="100px;"/><br/><sub><b>yuler</b></sub>](https://github.com/yuler)<br/>|[<img src="https://avatars.githubusercontent.com/u/4136679?v=4" width="100px;"/><br/><sub><b>yibn2008</b></sub>](https://github.com/yibn2008)<br/>|[<img src="https://avatars.githubusercontent.com/u/985607?v=4" width="100px;"/><br/><sub><b>dead-horse</b></sub>](https://github.com/dead-horse)<br/>|[<img src="https://avatars.githubusercontent.com/u/5574625?v=4" width="100px;"/><br/><sub><b>elrrrrrrr</b></sub>](https://github.com/elrrrrrrr)<br/>|[<img src="https://avatars.githubusercontent.com/u/2784308?v=4" width="100px;"/><br/><sub><b>yisibl</b></sub>](https://github.com/yisibl)<br/>
|[<img src="https://avatars.githubusercontent.com/u/6996341?v=4" width="100px;"/><br/><sub><b>yuler</b></sub>](https://github.com/yuler)|[<img src="https://avatars.githubusercontent.com/u/4136679?v=4" width="100px;"/><br/><sub><b>yibn2008</b></sub>](https://github.com/yibn2008)|[<img src="https://avatars.githubusercontent.com/u/985607?v=4" width="100px;"/><br/><sub><b>dead-horse</b></sub>](https://github.com/dead-horse)|[<img src="https://avatars.githubusercontent.com/u/5574625?v=4" width="100px;"/><br/><sub><b>elrrrrrrr</b></sub>](https://github.com/elrrrrrrr)|[<img src="https://avatars.githubusercontent.com/u/2784308?v=4" width="100px;"/><br/><sub><b>yisibl</b></sub>](https://github.com/yisibl)|


This project follows the git-contributor [spec](https://github.com/xudafeng/git-contributor), auto updated at `Thu Aug 25 2022 07:53:47 GMT+0800`.
This project follows the git-contributor [spec](https://github.com/xudafeng/git-contributor), auto updated at `Sat May 11 2024 21:19:34 GMT+0800`.
Copy link

Choose a reason for hiding this comment

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

Correct the timestamp format by adding a comma after the day.

- auto updated at `Sat May 11 2024 21:19:34 GMT+0800`.
+ auto updated at `Sat May 11, 2024 21:19:34 GMT+0800`.

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
This project follows the git-contributor [spec](https://github.com/xudafeng/git-contributor), auto updated at `Sat May 11 2024 21:19:34 GMT+0800`.
This project follows the git-contributor [spec](https://github.com/xudafeng/git-contributor), auto updated at `Sat May 11, 2024 21:19:34 GMT+0800`.

package.json Outdated
@@ -47,6 +47,7 @@
"china": {
"ENVS": {
"COREPACK_NPM_REGISTRY": "https://registry.npmmirror.com",
"EDGEDRIVER_CDNURL": "https://npmmirror.com/mirrors/edgedriver",
Copy link

Choose a reason for hiding this comment

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

Tip

Codebase Verification

The verification process has revealed that the redirected URL https://cdn.npmmirror.com/binaries/edgedriver results in a HTTP 404 error, indicating that the resource could not be found. This suggests that either the URL is incorrect or the resource is not available at the specified location. It is recommended to review and correct the EDGEDRIVER_CDNURL to ensure it points to a valid and accessible resource.

  • Check and update the EDGEDRIVER_CDNURL in the package.json to a valid URL where the Edge Driver binaries are available.
Analysis chain

Verify the availability and correctness of the EDGEDRIVER_CDNURL.

Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify the availability and correctness of the `EDGEDRIVER_CDNURL`.

# Test: Check if the URL is reachable and correct.
curl -I https://npmmirror.com/mirrors/edgedriver

Length of output: 668



Script:

#!/bin/bash
# Description: Verify the availability and correctness of the redirected `EDGEDRIVER_CDNURL`.

# Test: Check if the redirected URL is reachable and correct.
curl -I https://cdn.npmmirror.com/binaries/edgedriver

Length of output: 1107

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Review Details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits Files that changed from the base of the PR and between 355dffe and ed3aea8.
Files selected for processing (1)
  • test/index.test.js (3 hunks)
Additional comments not posted (2)
test/index.test.js (2)

231-231: Ensure consistency in the URL format for EDGEDRIVER_CDNURL.

Refer to the previous comment regarding the URL format for EDGEDRIVER_CDNURL.


309-309: Ensure consistency in the URL format for EDGEDRIVER_CDNURL.

Refer to the previous comment regarding the URL format for EDGEDRIVER_CDNURL.

@@ -154,6 +154,7 @@ describe('test/index.test.js', () => {
assert.deepStrictEqual(options, {
env: {
NODEJS_ORG_MIRROR: 'https://cdn.npmmirror.com/binaries/node',
EDGEDRIVER_CDNURL: 'https://npmmirror.com/mirrors/edgedriver',
Copy link

Choose a reason for hiding this comment

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

Ensure consistency in the URL format for EDGEDRIVER_CDNURL.

- EDGEDRIVER_CDNURL: 'https://npmmirror.com/mirrors/edgedriver',
+ EDGEDRIVER_CDNURL: 'https://cdn.npmmirror.com/mirrors/edgedriver',

The URL for EDGEDRIVER_CDNURL should match the format used for other CDN URLs in the project, which typically start with https://cdn.npmmirror.com. This change will ensure consistency across all environment variables.


Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
EDGEDRIVER_CDNURL: 'https://npmmirror.com/mirrors/edgedriver',
EDGEDRIVER_CDNURL: 'https://cdn.npmmirror.com/mirrors/edgedriver',

fengmk2 pushed a commit that referenced this pull request May 11, 2024
[skip ci]

## [2.14.0](v2.13.0...v2.14.0) (2024-05-11)

### Features

* add EDGEDRIVER_CDNURL env ([#50](#50)) ([b14b16a](b14b16a))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant