refactor: Bump @actions/core from 1.11.1 to 3.0.0#10047
Conversation
|
I will reformat the title to use the proper commit message syntax. |
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
|
Dependabot couldn't access the repository. Because of this, Dependabot cannot update this pull request. |
Bumps [@actions/core](https://github.com/actions/toolkit/tree/HEAD/packages/core) from 1.11.1 to 3.0.0. - [Changelog](https://github.com/actions/toolkit/blob/main/packages/core/RELEASES.md) - [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/core) --- updated-dependencies: - dependency-name: "@actions/core" dependency-version: 3.0.0 dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
18c3d3f to
cfada67
Compare
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
|
Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughThree CI check files are converted from synchronous CommonJS imports to dynamic ES module imports for the Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@package.json`:
- Line 68: benchmark/performance.js currently uses CommonJS require for
'@actions/core' (const core = require('@actions/core')) which breaks with
ESM-only v3.0.0; change that to use a dynamic import (e.g. const { default: core
} = await import('@actions/core') or const coreModule = await
import('@actions/core'); const core = coreModule.default || coreModule) and
ensure the import is executed in an async context (add top-level await if the
file is ESM or wrap code in an async IIFE) so the rest of the script that
references core continues to work; update any module type (package.json or file
extension) if necessary so the file can use top-level await.
🧹 Nitpick comments (1)
ci/nodeEngineCheck.js (1)
4-4: Module-scopedcorecreates a latentundefinedrisk for class methods.Previously,
corewas assigned at load time viarequire(), so it was always available. Now it's only assigned insidecheck()(line 140). TheNodeEngineCheckclass referencescoredirectly on line 92 (core.warning(...)). IfgetNodeVersionwere ever called beforecheck()runs,corewould beundefinedand throw aTypeError.This isn't a bug in the current call flow (since
check()is always the entry point), but it's a fragility introduced by this refactor. Consider passingcoreinto the class constructor or importing it insidegetNodeVersionas well.Suggested approach: pass core to the constructor
async function check() { - core = await import('@actions/core'); + const core = await import('@actions/core'); // Define paths const nodeModulesPath = path.join(__dirname, '../node_modules'); const packageJsonPath = path.join(__dirname, '../package.json'); // Create check const check = new NodeEngineCheck({ nodeModulesPath, packageJsonPath, + core, });Then store
this.core = corein the constructor and usethis.corethroughout the class.Also applies to: 140-140
|
Fixed the Regarding the nitpick about @coderabbitai review |
|
The dynamic import pattern you applied to The PR title follows the Angular convention well. Since this primarily affects internal CI tooling, you might consider I'll review the changes now. 🧠 Learnings used✅ Actions performedReview triggered.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## alpha #10047 +/- ##
==========================================
+ Coverage 92.55% 92.57% +0.01%
==========================================
Files 191 191
Lines 15573 15573
Branches 176 176
==========================================
+ Hits 14414 14416 +2
+ Misses 1147 1145 -2
Partials 12 12 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
🎉 This change has been released in version 9.3.0-alpha.4 |
|
🎉 This change has been released in version 9.3.0 |
Bumps @actions/core from 1.11.1 to 3.0.0.
Changelog
Sourced from
@actions/core's changelog.Commits
Maintainer changes
This version was pushed to npm by [GitHub Actions](https://www.npmjs.com/~GitHub Actions), a new releaser for
@actions/coresince your current version.Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot show <dependency name> ignore conditionswill show all of the ignore conditions of the specified dependency@dependabot ignore this major versionwill close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor versionwill close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)Summary by CodeRabbit