Skip to content

SP-3565: Update dependencies#140

Open
Alex-1089 wants to merge 4 commits into
mainfrom
SP-3565_update-dependencies
Open

SP-3565: Update dependencies#140
Alex-1089 wants to merge 4 commits into
mainfrom
SP-3565_update-dependencies

Conversation

@Alex-1089
Copy link
Copy Markdown
Contributor

@Alex-1089 Alex-1089 commented May 18, 2026

Summary by CodeRabbit

  • Chores
    • Bumped action version; raised Node requirement to 24; upgraded core dependencies and dev tooling; updated build/runtime targets and excludes for compatibility.
  • CI
    • Updated workflow steps: artifact uploader and checkout to newer releases.
  • Tests
    • Added a Jest mock for action core and adjusted test/mock linting and typings for more reliable tests.
  • Documentation
    • Added Unreleased changelog entry and updated README examples and badges to reflect repo/name changes.

Review Change Stack

@Alex-1089 Alex-1089 self-assigned this May 18, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 18, 2026

📝 Walkthrough

Walkthrough

Updates project to Node 24: package version and engine, build target, action runtime, and workflow uploader. Bumps @actions/core and devDependencies. Adds a Jest mock for @actions/core and adjusts tests, ESLint overrides, tsconfig excludes, and the changelog.

Changes

Runtime, deps, and test wiring

Layer / File(s) Summary
Runtime & build/workflow updates
.node-version, action.yml, esbuild.config.mjs, .github/workflows/check-dist.yml, .github/workflows/ci.yml
Node pinned to 24.15.0; action runtime and esbuild target set to node24; workflows updated to use actions/upload-artifact@v7 and actions/checkout@v6.
Dependency and package version bumps
package.json
Package version -> 1.6.3; engines.node -> >=24; bump @actions/core to ^3.0.0 and update devDependency ranges for @types/node, eslint-plugin-jest, and globals.
Jest mock and test/config updates
__mocks__/@actions/core.ts, __tests__/dep-track-policy-check.test.ts, eslint.config.mjs, tsconfig.json
Add __mocks__/@actions/core.ts with mocked core API; update test to use typed mock function and simplify TEST_REPO_DIR; include __mocks__ in eslint override and exclude it in tsconfig.
Changelog and README updates
CHANGELOG.md, README.md
Add Unreleased 1.6.3 changelog entry listing runtime and dependency upgrades and note the new Jest mock; update README badges and workflow examples to reference gha-code-scan and checkout@v6.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • eeisegn
  • agustingroh

Poem

I hop through lines and bump the node,
A mock to keep the tests in code,
Dependencies polished, workflows bright,
README badges gleam tonight,
🐇✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main objective of the pull request—updating multiple dependencies across the project (Node.js, npm packages, GitHub Actions, and build configuration).
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch SP-3565_update-dependencies

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

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Copy Markdown

🔍 SCANOSS Code Similarity Detected

📄 1 snippet matches found

🔗 View detailed findings on commit 96ef510

Files with similarities:

  • dist/index.js

💡 Click the commit link above to see detailed annotations for each match.

@github-actions
Copy link
Copy Markdown

SCANOSS SCAN Completed 🚀

  • Detected components: 3
  • Undeclared components: 1
  • Declared components: 2
  • Detected files: 66
  • Detected files undeclared: 1
  • Detected files declared: 65
  • Licenses detected: 2
  • Licenses detected with copyleft: 0
  • Policies: ❌ 1 fail ✅ 1 pass (2 total)

View more details on SCANOSS Action Summary

Copy link
Copy Markdown

@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

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@package.json`:
- Line 80: The devDependency "`@types/node`" in package.json is set to "^25.3.5"
which permits TypeScript to accept newer Node APIs not available on the declared
runtime "node>=20"; change the package.json entry for "`@types/node`" to a major
version that matches the runtime floor (e.g., "^20.x" or "20.x") so types
reflect Node 20 APIs, then run package manager install to update lockfile and
rebuild types; target the "`@types/node`" declaration in package.json when making
this edit.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 758406be-f996-4845-b1e6-d80f3571e9cb

📥 Commits

Reviewing files that changed from the base of the PR and between 5901b4b and 96ef510.

⛔ Files ignored due to path filters (3)
  • dist/index.js is excluded by !**/dist/**
  • dist/licenses.txt is excluded by !**/dist/**
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (1)
  • package.json

Comment thread package.json
"@octokit/types": "^15.0.0",
"@types/jest": "^29.5.12",
"@types/node": "^20.11.20",
"@types/node": "^25.3.5",
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

cat -n package.json | head -100 | tail -80

Repository: scanoss/gha-code-scan

Length of output: 2644


🌐 Web query:

@types/node versioning scheme Node 20 Node 25 compatibility

💡 Result:

The @types/node package follows a versioning scheme where the major and minor versions correspond to the Node.js version they are intended to support [1][2]. For example, @types/node version 20.x.x provides type definitions for Node.js 20, and version 25.x.x provides definitions for Node.js 25 [3][4]. Because these packages are maintained by the community via DefinitelyTyped, they are updated independently of the Node.js release cycle [3][5]. While the major and minor versions are designed to match the target Node.js version, the patch version of @types/node is used to manage updates, bug fixes, and improvements to the type definitions themselves, rather than tracking the specific patch version of the Node.js runtime [3][4]. In practice, you should install the version of @types/node that matches the major and minor version of the Node.js runtime you are using in your project [1][2]. If you are using Node.js 20, you should use @types/node version 20.x.x; if you are using Node.js 25, you should use @types/node version 25.x.x [3][4]. Using a version of @types/node that does not match your Node.js runtime may result in type errors or missing definitions for APIs that were added or removed in specific Node.js releases [1][2].

Citations:


🌐 Web query:

@types/node 20.19.0 npm package version

💡 Result:

The @types/node package version 20.19.0 is a set of TypeScript type definitions corresponding to Node.js version 20.19.0 [1][2]. It was published to the npm registry in June 2025 [1][3]. Key details regarding this package and version include: Purpose: The @types/node package provides TypeScript type definitions for Node.js APIs, allowing developers to use TypeScript with Node.js projects [1][4]. Versioning Strategy: The @types/node package follows a versioning scheme where the major and minor versions align with the corresponding Node.js release [5]. The patch version (e.g.,.0 in 20.19.0) is managed by the DefinitelyTyped project and is incremented independently as updates to the type definitions are published [5]. Context: Node.js 20.19.0 was released on March 13, 2025, as an LTS (Long Term Support) version [2]. As of May 18, 2026, Node.js 20 has reached its official end-of-life (EOL), which occurred on April 30, 2026 [6]. Usage: It is typically installed as a development dependency using the command npm install --save-dev @types/node [1][5]. Because the @types/node package is frequently updated to reflect changes in the Node.js ecosystem, newer versions (such as 20.19.41 as of May 2026) are available and generally recommended for projects still utilizing the Node.js 20 runtime [1][5].

Citations:


Align @types/node major with declared runtime floor.

@types/node is currently ^25.3.5, but the runtime contract is Node >=20 (line 26). Using @types/node v25 allows newer Node APIs to type-check while failing at runtime on Node 20.

Suggested fix
-    "`@types/node`": "^25.3.5",
+    "`@types/node`": "^20.19.0",
📝 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. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"@types/node": "^25.3.5",
"`@types/node`": "^20.19.0",
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@package.json` at line 80, The devDependency "`@types/node`" in package.json is
set to "^25.3.5" which permits TypeScript to accept newer Node APIs not
available on the declared runtime "node>=20"; change the package.json entry for
"`@types/node`" to a major version that matches the runtime floor (e.g., "^20.x"
or "20.x") so types reflect Node 20 APIs, then run package manager install to
update lockfile and rebuild types; target the "`@types/node`" declaration in
package.json when making this edit.

…Upgraded Node.js to 24. Updated CHANGELOG.md. Added __mocks__/** as test files.
@github-actions
Copy link
Copy Markdown

🔍 SCANOSS Code Similarity Detected

📄 1 snippet matches found

🔗 View detailed findings on commit 7dcbaae

Files with similarities:

  • dist/index.js

💡 Click the commit link above to see detailed annotations for each match.

@github-actions
Copy link
Copy Markdown

SCANOSS SCAN Completed 🚀

  • Detected components: 3
  • Undeclared components: 1
  • Declared components: 2
  • Detected files: 66
  • Detected files undeclared: 1
  • Detected files declared: 65
  • Licenses detected: 2
  • Licenses detected with copyleft: 0
  • Policies: ❌ 1 fail ✅ 1 pass (2 total)

View more details on SCANOSS Action Summary

@github-actions
Copy link
Copy Markdown

🔍 SCANOSS Code Similarity Detected

📄 1 snippet matches found

🔗 View detailed findings on commit 08cb65c

Files with similarities:

  • dist/index.js

💡 Click the commit link above to see detailed annotations for each match.

@github-actions
Copy link
Copy Markdown

SCANOSS SCAN Completed 🚀

  • Detected components: 3
  • Undeclared components: 1
  • Declared components: 2
  • Detected files: 66
  • Detected files undeclared: 1
  • Detected files declared: 65
  • Licenses detected: 2
  • Licenses detected with copyleft: 0
  • Policies: ❌ 1 fail ✅ 1 pass (2 total)

View more details on SCANOSS Action Summary

Copy link
Copy Markdown

@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.

♻️ Duplicate comments (1)
package.json (1)

80-80: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Align @types/node major with the declared runtime floor.

Line 80 sets @types/node to ^25.3.5 while Line 26 allows Node >=24; this can let Node 25-only APIs pass type-checking while still failing on Node 24 at runtime.

Suggested fix
-    "`@types/node`": "^25.3.5",
+    "`@types/node`": "^24.0.0",
#!/bin/bash
set -euo pipefail

python - <<'PY'
import json, re
with open("package.json", "r", encoding="utf-8") as f:
    p = json.load(f)

engine = p.get("engines", {}).get("node", "")
types = p.get("devDependencies", {}).get("`@types/node`", "")

def major(v):
    m = re.search(r'(\d+)', v or "")
    return int(m.group(1)) if m else None

engine_major = major(engine)
types_major = major(types)

print(f"engines.node = {engine} (major: {engine_major})")
print(f"`@types/node` = {types} (major: {types_major})")

if engine_major is not None and types_major is not None and types_major != engine_major:
    print("Mismatch detected: `@types/node` major differs from runtime floor major.")
else:
    print("No major-version mismatch detected.")
PY
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@package.json` at line 80, The devDependency `@types/node` (currently ^25.3.5)
is a higher major than the declared runtime floor in engines.node (>=24), so
update package.json to align majors: change devDependencies["`@types/node`"] to a
24.x range (e.g., ^24.0.0) so type checks target the runtime floor; after
editing package.json run npm/yarn install and update any CI or lockfile
accordingly to ensure types and runtime major versions match.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Duplicate comments:
In `@package.json`:
- Line 80: The devDependency `@types/node` (currently ^25.3.5) is a higher major
than the declared runtime floor in engines.node (>=24), so update package.json
to align majors: change devDependencies["`@types/node`"] to a 24.x range (e.g.,
^24.0.0) so type checks target the runtime floor; after editing package.json run
npm/yarn install and update any CI or lockfile accordingly to ensure types and
runtime major versions match.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 83efc534-3784-4947-8803-044b1193f182

📥 Commits

Reviewing files that changed from the base of the PR and between 96ef510 and 08cb65c.

⛔ Files ignored due to path filters (2)
  • dist/index.js is excluded by !**/dist/**
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (10)
  • .github/workflows/check-dist.yml
  • .node-version
  • CHANGELOG.md
  • __mocks__/@actions/core.ts
  • __tests__/dep-track-policy-check.test.ts
  • action.yml
  • esbuild.config.mjs
  • eslint.config.mjs
  • package.json
  • tsconfig.json
✅ Files skipped from review due to trivial changes (7)
  • .node-version
  • .github/workflows/check-dist.yml
  • esbuild.config.mjs
  • CHANGELOG.md
  • eslint.config.mjs
  • tsconfig.json
  • mocks/@actions/core.ts

@github-actions
Copy link
Copy Markdown

🔍 SCANOSS Code Similarity Detected

📄 1 snippet matches found

🔗 View detailed findings on commit 1e6dafd

Files with similarities:

  • dist/index.js

💡 Click the commit link above to see detailed annotations for each match.

@github-actions
Copy link
Copy Markdown

SCANOSS SCAN Completed 🚀

  • Detected components: 3
  • Undeclared components: 1
  • Declared components: 2
  • Detected files: 66
  • Detected files undeclared: 1
  • Detected files declared: 65
  • Licenses detected: 2
  • Licenses detected with copyleft: 0
  • Policies: ❌ 1 fail ✅ 1 pass (2 total)

View more details on SCANOSS Action Summary

Copy link
Copy Markdown

@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: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@CHANGELOG.md`:
- Line 13: Fix the package name typo in the changelog by replacing the string
"eslint-plugin jest" with the correct package name "eslint-plugin-jest" (update
the entry that currently reads "Upgraded eslint-plugin jest to 29.15.2" so it
reads "Upgraded eslint-plugin-jest to 29.15.2").
- Line 10: Add a missing reference definition for the release tag [1.6.3] used
in the changelog: locate the other version reference links at the bottom of the
file (the pattern like [1.6.2]: https://...) and add a new line defining [1.6.3]
with the appropriate release URL or commit/tag link (e.g., [1.6.3]:
<release/compare or tag URL>) so the in-text `[1.6.3]` entry resolves correctly.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 3c0f7c84-795e-4552-83be-2cc979ed659a

📥 Commits

Reviewing files that changed from the base of the PR and between 08cb65c and 1e6dafd.

📒 Files selected for processing (3)
  • .github/workflows/ci.yml
  • CHANGELOG.md
  • README.md
✅ Files skipped from review due to trivial changes (2)
  • .github/workflows/ci.yml
  • README.md

Comment thread CHANGELOG.md

## [Unreleased]

## [1.6.3] - 2026-05-18
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Add the missing 1.6.3 release reference link.

Line 10 introduces [1.6.3], but there’s no matching reference definition at the bottom of the file, so this entry won’t link like prior versions.

Suggested patch
+[1.6.3]: https://github.com/scanoss/gha-code-scan/compare/v1.6.2...v1.6.3
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@CHANGELOG.md` at line 10, Add a missing reference definition for the release
tag [1.6.3] used in the changelog: locate the other version reference links at
the bottom of the file (the pattern like [1.6.2]: https://...) and add a new
line defining [1.6.3] with the appropriate release URL or commit/tag link (e.g.,
[1.6.3]: <release/compare or tag URL>) so the in-text `[1.6.3]` entry resolves
correctly.

Comment thread CHANGELOG.md
## [1.6.3] - 2026-05-18
### Changed
- Upgraded Node.js to 24
- Upgraded eslint-plugin jest to 29.15.2
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Fix package name typo in changelog text.

Line 13 says eslint-plugin jest; package name should be eslint-plugin-jest.

Suggested patch
-- Upgraded eslint-plugin jest to 29.15.2
+- Upgraded eslint-plugin-jest to 29.15.2
📝 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. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- Upgraded eslint-plugin jest to 29.15.2
- Upgraded eslint-plugin-jest to 29.15.2
🧰 Tools
🪛 LanguageTool

[grammar] ~13-~13: Use a hyphen to join words.
Context: ...d Node.js to 24 - Upgraded eslint-plugin jest to 29.15.2 - Upgraded @types/node t...

(QB_NEW_EN_HYPHEN)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@CHANGELOG.md` at line 13, Fix the package name typo in the changelog by
replacing the string "eslint-plugin jest" with the correct package name
"eslint-plugin-jest" (update the entry that currently reads "Upgraded
eslint-plugin jest to 29.15.2" so it reads "Upgraded eslint-plugin-jest to
29.15.2").

Comment thread CHANGELOG.md

## [Unreleased]

## [1.6.3] - 2026-05-18
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please add the reference version at the bottom of the file

Comment thread CHANGELOG.md
## [1.6.3] - 2026-05-18
### Changed
- Upgraded Node.js to 24
- Upgraded eslint-plugin jest to 29.15.2
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please fix typo. It should be eslint-plugin-jest

Comment thread CHANGELOG.md
- Added __mocks__/@actions/core.ts to mock @actions/core for tests
- Updated actions/checkout to v6 in README.md
### Fixed
- Changed 'code-scan-action' to 'gha-code-scan' in README.md
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Could you also add a note to README.md recommending users migrate to scanoss/gha-code-scan? The rename redirect keeps old references working, but we should point users to the canonical name.

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.

2 participants