Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dev-packages/node-overhead-gh-action/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"mysql2": "^3.14.4"
},
"devDependencies": {
"@actions/artifact": "2.1.11",
"@actions/artifact": "5.0.3",
"@actions/core": "1.10.1",
"@actions/exec": "1.1.1",
"@actions/github": "^5.0.0",
Expand Down
2 changes: 1 addition & 1 deletion dev-packages/size-limit-gh-action/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"fix": "eslint . --format stylish --fix"
},
"dependencies": {
"@actions/artifact": "2.1.11",
"@actions/artifact": "5.0.3",
Copy link

Choose a reason for hiding this comment

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

Bug: The uploadArtifact function is called with a string for the third parameter, but the updated @actions/artifact@v5 API expects an options object.
Severity: MEDIUM

Suggested Fix

Update the calls to uploadArtifact in size-limit-gh-action/index.mjs and node-overhead-gh-action/index.mjs. The third argument, __dirname, should be removed as the new API version does not require a root directory path in the same way. The call should be await artifactClient.uploadArtifact(ARTIFACT_NAME, files);.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.

Location: dev-packages/size-limit-gh-action/package.json#L17

Potential issue: The `uploadArtifact` function from `@actions/artifact@v5` is being
called with an incompatible signature. The code passes `__dirname`, a string, as the
third argument. However, version 5 of the API expects this argument to be an options
object. This mismatch will likely cause a runtime error when the GitHub Actions workflow
attempts to execute the artifact upload step, preventing artifacts from being saved.

Copy link
Member

Choose a reason for hiding this comment

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

"@actions/core": "1.10.1",
"@actions/exec": "1.1.1",
"@actions/github": "^5.0.0",
Expand Down
Loading
Loading