chore(deps): upgrade project dependencies to latest versions#166
chore(deps): upgrade project dependencies to latest versions#166Sourav-kashyap wants to merge 1 commit intomasterfrom
Conversation
.github/workflows/trivy.yaml
Outdated
|
|
||
| - name: Run Trivy vulnerability scanner in repo mode | ||
| uses: aquasecurity/trivy-action@0.28.0 | ||
| uses: aquasecurity/trivy-action@master |
There was a problem hiding this comment.
Pinning a GitHub Actions step to @master instead of a fixed commit SHA or immutable release tag introduces a supply chain security risk (OSSF Scorecard "Pinned-Dependencies" / CWE-829).
The previous version used @0.28.0, which is at least an immutable tag. Moving to @master means any future push to the aquasecurity/trivy-action master branch — including a compromised or broken commit — will be pulled into every workflow run without notice.
Suggestion: Pin to the latest release tag, or ideally to the full commit SHA of that release:
# Option 1 — immutable tag
- uses: aquasecurity/trivy-action@0.30.0
# Option 2 — SHA pin (most secure)
- uses: aquasecurity/trivy-action@18f2510ee396bbf400402947b394f2dd8c87dbb0 # v0.30.0Rationale: Mutable refs like master are explicitly flagged by GitHub's security hardening guidelines and tools like Dependabot / StepSecurity Harden-Runner.
package.json
Outdated
| "semantic-release": "^25.0.3", | ||
| "simple-git": "^3.33.0", | ||
| "source-map-support": "^0.5.21", | ||
| "tslib": "^2.8.1", |
There was a problem hiding this comment.
tslib is already listed in the dependencies section ("tslib": "^2.6.2") and is now also added to devDependencies ("tslib": "^2.8.1") with a different version range. This creates two problems:
- Version skew — library consumers will resolve
^2.6.2fromdependencies, while local development resolves^2.8.1fromdevDependencies. Any behavioral difference between2.6.xand2.8.xwill be invisible until someone installs the package as a consumer. - Misleading signal — placing a runtime dependency in
devDependenciescan confuse tooling and contributors about the package's true runtime requirements.
Suggestion: Remove tslib from devDependencies and update the single entry in dependencies to the version you need:
// In dependencies only:
"tslib": "^2.8.1"Then remove the duplicate entry from devDependencies entirely.
| "@commitlint/config-conventional": "^17.8.1", | ||
| "@loopback/boot": "^8.0.11", | ||
| "@loopback/build": "^12.0.10", | ||
| "@loopback/core": "^7.0.10", |
There was a problem hiding this comment.
I'd like to understand the intent here. @loopback/boot, @loopback/core, @loopback/repository, @loopback/rest, and @loopback/sequelize have been moved into devDependencies, yet they are referenced in the library's source and are listed as peerDependencies in the published package.json. @sourceloop/core is also added here.
This pattern is correct for peer dependency testing (installing them as devDeps satisfies the peer requirement locally and in CI), but it raises a few concerns:
- Implicit coupling — if
@sourceloop/core@^20.0.6introduced breaking API changes this library relies on, those changes need to be reflected in source code, not just in the version range. - Missing peerDependencies update — if these packages are now at major/minor version bumps, the
peerDependenciesblock inpackage.jsonshould be updated accordingly so consumers get correct version resolution warnings. Has thepeerDependenciesblock been reviewed? @loopback/sequelizebeing a devDep is appropriate since it's an optional integration — just confirming that@loopback/sequelizeis NOT listed independenciesorpeerDependencies(so consumers who don't use Sequelize aren't forced to install it).
Could you confirm the peerDependencies ranges have been reviewed for each of these packages?
package.json
Outdated
| "simple-git": "^3.33.0", | ||
| "source-map-support": "^0.5.21", | ||
| "tslib": "^2.8.1", | ||
| "typescript": "~5.2.2" |
There was a problem hiding this comment.
The typescript version is still pinned to ~5.2.2, which was released in September 2023. TypeScript is now at 5.7.x (as of early 2025). This is a dependency-upgrade PR — it seems intentional to stay on 5.2.x, but it's worth being explicit about it.
If the decision is to stay on ~5.2.2, a comment in the PR description or a CHANGELOG entry explaining the constraint (e.g., LoopBack build compatibility) would be helpful. If there is no blocker, I'd suggest taking this opportunity to update to at least ~5.4.x or ~5.6.x:
"typescript": "~5.6.3"Older TypeScript versions miss language improvements and bug fixes that could affect type checking accuracy in the mixin and decorator code this library relies on.
rohit-sourcefuse
left a comment
There was a problem hiding this comment.
Overall Review
What this PR does:
- Bumps all
devDependenciesto their latest patch/minor versions (commitlint, ESLint, semantic-release, simple-git, cz-customizable, etc.) - Adds
@loopback/boot,@loopback/core,@loopback/repository,@loopback/rest,@loopback/sequelize, and@sourceloop/coreas explicitdevDependencies(previously resolved transitively) - Adds
@sourceloop/core@^20.0.6as a new devDependency - Adds
jsdom@^24.1.3as a new devDependency — purpose unclear - Adds
tslib@^2.8.1todevDependencieswhiletslib@^2.6.2remains independencies— creates a version-skew issue - Reformats the
@semantic-release/npmconfig block inpackage.json(cosmetic only) - Reformats the
SequelizeCrudRepositorygeneric type parameters inaudit.mixin.ts(whitespace/formatting only — no logic change) - Changes the Trivy GitHub Actions step from a pinned tag (
@0.28.0) to the mutable@masterref — this is a regression from a security standpoint - All CI checks (node matrix tests on 20/22/24, npm audit, SonarCloud, Trivy) are currently passing
Must-fix before merge
-
trivy.yaml—@masterpinning is a security regression. The previous@0.28.0was an immutable tag;@masteris a mutable ref that can be silently updated with breaking or malicious code at any time. Pin to a specific release tag or commit SHA. See inline comment. -
tslibduplicate independenciesanddevDependencieswith different version ranges.^2.6.2(runtime) vs^2.8.1(dev) will resolve differently for consumers vs local dev. The runtime entry independenciesshould be updated to^2.8.1and thedevDependenciesentry removed. See inline comment. -
jsdom— intent unclear. An audit-log library has no obvious DOM requirement. If this is a transitive dependency accidentally promoted to a direct one, it should be removed. If genuinely needed, it needs a clear explanation. See inline comment.
Nice-to-have follow-up
- Confirm
peerDependenciesranges have been reviewed alongside the newly-explicit devDep versions for@loopback/*and@sourceloop/core— consumers relying on peer resolution should get accurate warnings. - Consider updating
typescriptfrom~5.2.2to a more recent~5.6.xor~5.7.xwhile the dependency train is already moving. No logic changes are needed; the reformatted mixin code compiles fine on newer TS. - The PR description mentions "Fixed breaking changes introduced by major version upgrades" — it would help reviewers to know which packages had breaking changes and what was done to address them, especially given
@actions/corejumping from1.xto3.0.0. - Consider setting up Dependabot or Renovate for automated, incremental dependency updates to avoid these large batch upgrades in the future.
| "husky": "^7.0.4", | ||
| "semantic-release": "^25.0.1", | ||
| "simple-git": "^3.15.1", | ||
| "jsdom": "^24.1.3", |
There was a problem hiding this comment.
jsdom is a full DOM implementation package that is generally used for unit-testing browser-environment code (React components, DOM manipulation, etc.). This package does not appear to have any obvious use in an audit-log library.
I'd flag this as an unexpected addition — could you explain why jsdom@^24.1.3 is needed? A few things to check:
- Is it pulled in transitively by another devDep upgrade (e.g., a test runner config)? If so, it shouldn't need to be in
package.jsondirectly. - If it is genuinely required for tests, a comment or a test file referencing it would clarify the intent.
jsdom@24.xrequires Node ≥ 18 — that aligns with the project's engine constraints, so no issue there, just worth confirming the test setup explicitly relies on it.
If this is a transitive pull-in that got accidentally promoted to a direct dependency, it should be removed.
There was a problem hiding this comment.
jsdom is directly used in src/release_notes/post-processing.js to scrape GitHub issue titles during the
release process. It's NOT transitive
upgrade project dependencies to latest versions GH-165
SonarQube reviewer guide
|



Description
This issue tracks upgrading all project dependencies to their latest stable versions.
Changes
dependenciesanddevDependenciesto latest versionsChecklist: