-
Notifications
You must be signed in to change notification settings - Fork 8
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: upgrade deps #31
Conversation
BREAKING CHANGE: drop Node.js < 14 support
WalkthroughThe changes encompass modernizing the codebase by migrating to built-in Node.js modules for path and file system operations, adjusting GitHub workflows, and removing Changes
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? TipsChatThere are 3 ways to chat with CodeRabbit:
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)
Additionally, you can add CodeRabbit Configration File (
|
New and removed dependencies detected. Learn more about Socket for GitHub ↗︎
🚮 Removed packages: npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected] |
👍 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. Ignoring: Next stepsTake a deeper look at the dependencyTake 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 packageIf 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 riskTo ignore an alert, reply with a comment starting with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review Details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (16)
- .github/workflows/nodejs.yml (1 hunks)
- .github/workflows/release.yml (1 hunks)
- agent.js (2 hunks)
- app.js (1 hunks)
- app/middleware/egg_loader_trace.js (2 hunks)
- config/config.default.js (1 hunks)
- package.json (1 hunks)
- test/absolute.test.js (2 hunks)
- test/custom.test.js (1 hunks)
- test/development.test.js (1 hunks)
- test/fast_ready_false.test.js (1 hunks)
- test/not-reload.test.js (1 hunks)
- test/override.test.js (1 hunks)
- test/process_mode_single.test.js (1 hunks)
- test/timing.test.js (1 hunks)
- test/utils.js (1 hunks)
Files skipped from review due to trivial changes (3)
- .github/workflows/release.yml
- config/config.default.js
- test/utils.js
Additional comments not posted (22)
.github/workflows/nodejs.yml (2)
1-1
: Renaming the workflow to "CI" clarifies its purpose.
11-16
: Ensure the new job configuration is correctly set up for multiple Node.js versions.test/not-reload.test.js (1)
1-3
: Transition to native Node.js modules enhances maintainability and future-proofing.test/fast_ready_false.test.js (1)
1-1
: Using native Node.js timer promises improves the readability and efficiency of asynchronous operations.test/custom.test.js (1)
1-3
: Adopting native Node.js modules for file and path operations is a positive change.app/middleware/egg_loader_trace.js (2)
1-2
: Switching to native Node.js modules for path and file operations is a good practice.
20-20
: Ensure that thereadJSON
function is correctly imported and used here.Verification successful
The
readJSON
function is correctly imported from the 'utility' module and used inapp/middleware/egg_loader_trace.js
as expected. This confirms the proper implementation as per the review comment.
Scripts Executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the usage of `readJSON` function. # Test: Search for the import and usage of `readJSON`. rg --type js 'readJSON'Length of output: 192
test/absolute.test.js (3)
1-3
: Using native Node.js modules for asynchronous operations and file handling is a commendable update.
9-13
: Correct use of native Node.js methods for file system operations enhances code efficiency.
30-30
: Good practice to ensure directories exist before writing files.package.json (4)
22-23
: Updated dependency versions to align with the new Node.js version requirements.
26-30
: Updated development dependencies reflect the project's alignment with newer standards.
34-34
: Setting the Node.js version requirement to>=14.0.0
is consistent with the PR's objectives.
37-41
: Modifications to the scripts ensure compatibility with the updated Node.js version and dependencies.test/process_mode_single.test.js (2)
1-4
: Switch to native Node.js modules for better maintainability and performance.
4-4
: Ensure that thesleep
function fromnode:timers/promises
is used correctly across the test cases.Verification successful
The revised script using the
--pcre2
flag did not find any instances of incorrect usage patterns for thesleep
function intest/process_mode_single.test.js
. This indicates that thesleep
function is being used correctly with the specified durations (1000, 2000, or 5000 milliseconds) in the test cases.Correct usage of
sleep
function verified in test cases.
- No instances of incorrect usage patterns were found in
test/process_mode_single.test.js
.Scripts Executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify correct usage of `sleep` function in `test/process_mode_single.test.js`. # Test: Search for incorrect usage patterns of `sleep`. Expect: No occurrences of incorrect patterns. rg --type js "sleep\((?!1000|2000|5000)\d+\)" test/process_mode_single.test.jsLength of output: 321
Script:
#!/bin/bash # Description: Verify correct usage of `sleep` function in `test/process_mode_single.test.js` using PCRE2 for advanced regex features. # Test: Search for incorrect usage patterns of `sleep`. Expect: No occurrences of incorrect patterns. rg --type js --pcre2 "sleep\((?!1000|2000|5000)\d+\)" test/process_mode_single.test.jsLength of output: 88
test/timing.test.js (2)
1-4
: Adoption of native Node.js modules enhances compatibility with the latest Node.js versions.
12-12
: Proper use of filesystem operations to ensure the setup of test environment.test/development.test.js (1)
1-4
: Transition to native Node.js modules is consistent with modern Node.js practices.test/override.test.js (1)
1-3
: Use of native Node.js modules for filesystem and timing operations aligns with the updated Node.js version requirements.agent.js (2)
1-2
: Updated to use native Node.js modules for path and filesystem operations, enhancing compatibility and performance.
13-13
: Correct use offs.rm
with options to ensure robust file removal in the agent's runtime directory.
@SocketSecurity ignore npm/[email protected] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review Details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (9)
- test/absolute.test.js (2 hunks)
- test/custom.test.js (1 hunks)
- test/development.test.js (1 hunks)
- test/fast_ready_false.test.js (1 hunks)
- test/not-reload.test.js (1 hunks)
- test/override.test.js (1 hunks)
- test/process_mode_single.test.js (1 hunks)
- test/timing.test.js (3 hunks)
- test/utils.js (1 hunks)
Files skipped from review as they are similar to previous changes (8)
- test/custom.test.js
- test/development.test.js
- test/fast_ready_false.test.js
- test/not-reload.test.js
- test/override.test.js
- test/process_mode_single.test.js
- test/timing.test.js
- test/utils.js
Additional comments not posted (3)
test/absolute.test.js (3)
1-4
: The updated import statements using native Node.js modules are correctly implemented.
9-13
: The replacement ofrimraf
andmkdirp
withfs.rm
andfs.mkdir
using native promises is correctly implemented. Ensure the behavior of these operations matches the expected outcomes in all test scenarios.
30-30
: The use of nativefs
methods for file operations in the test is correctly implemented. Consider reviewing the use ofsleep(5000)
to avoid potential flakiness in tests.
[skip ci] ## [3.0.0](v2.7.0...v3.0.0) (2024-05-08) ### ⚠ BREAKING CHANGES * drop Node.js < 14 support <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Introduced a new GitHub Actions workflow for Node.js releases. - **Enhancements** - Updated continuous integration workflow with improved job configurations. - Enhanced file system operations across multiple JavaScript files using Node.js built-in modules. - **Bug Fixes** - Fixed directory and file operations in test suites to use updated Node.js methods. - **Documentation** - Adjusted documentation comments and removed outdated directives. - **Refactor** - Removed the use of `'use strict';` in several JavaScript files to align with modern standards. - **Dependencies** - Updated various dependencies and Node version requirements to ensure compatibility and security. <!-- end of auto-generated comment: release notes by coderabbit.ai --> ### Features * upgrade deps ([#31](#31)) ([af27674](af27674))
BREAKING CHANGE: drop Node.js < 14 support
Summary by CodeRabbit
'use strict';
in several JavaScript files to align with modern standards.