Skip to content

🚀 Promote develop to main (dependency hardening + tooling) - #148

Merged
sergak01 merged 4 commits into
mainfrom
develop
May 7, 2026
Merged

🚀 Promote develop to main (dependency hardening + tooling)#148
sergak01 merged 4 commits into
mainfrom
develop

Conversation

@sergak01

@sergak01 sergak01 commented May 6, 2026

Copy link
Copy Markdown
Contributor

🚀 Promote develop to main (dependency hardening + tooling)


Summary

Merge the current origin/develop line into origin/main to ship npm audit remediation across the workspace and test fixtures, add the reinstall:all helper for local tarball workflows, and include the associated release / changelog updates from develop.


Key changes

  • 🔐 Security / dependencies
    • Root and tests/* lockfiles and overrides adjusted so npm audit is clean (including nested PostCSS / Vite / Next trees and bundled npm patching via postinstall).
    • scripts/patch-npm-bundled-vulnerabilities.mjs extended to sync patched ip-address into npm’s bundled tree.
  • 🧹 Tooling
    • scripts/reinstall-all.mjs plus prereinstall:all / reinstall:all npm scripts for refreshing fixture installs under tests/*.
  • 📊 Release
    • Includes chore(release): 0.18.2-beta.1 [skip ci] and CHANGELOG delta on develop.

Stats

(git diff --stat origin/main...origin/develop)

Metric Value
Files changed 11
Lines +690 / -488

Included commits

(git log origin/main..origin/develop --oneline)


Testing / verification

  • npm ci at repo root succeeds
  • npm run audit:all — exits 0, 0 vulnerabilities (root + each tests/* package with a lockfile)
  • npm run build succeeds (matches prereinstall:all precondition)

Summary by CodeRabbit

  • Bug Fixes

    • Resolved npm audit security vulnerabilities across the workspace.
  • Chores

    • Version bumped to 0.18.2-beta.1.
    • Updated PostCSS and related build tooling dependencies to patched versions for enhanced security.

sergak01 and others added 4 commits May 6, 2026 17:14
- Raise overrides for ip-address and npm; nest postcss overrides for next/vite.

- Align Next.js test fixtures (postcss/vite) and refresh lockfiles.

- Extend postinstall patch to sync ip-address into npm bundled deps.
- Run npm run reinstall under each tests/* package with a package.json.

- Add prereinstall:all (build) and reinstall:all npm scripts.
PP-3374 🔐 Clear npm audit across workspace; add reinstall:all for test fixtures
## [0.18.2-beta.1](v0.18.1...v0.18.2-beta.1) (2026-05-06)

### Bug Fixes

* **deps:** resolve npm audit findings across workspace ([d13ffad](d13ffad))
@coderabbitai

coderabbitai Bot commented May 6, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

This PR addresses npm audit findings across the workspace by bumping the version to 0.18.2-beta.1, expanding package.json overrides to pin PostCSS and patch bundled dependencies, adding new maintenance scripts, and creating a reinstall-all utility to coordinate dependency reinstallation across test packages.

Changes

Npm Audit & Dependency Patching

Layer / File(s) Summary
Version & Changelog
CHANGELOG.md, package.json
Version bumped from 0.18.1-beta.2 to 0.18.2-beta.1 with changelog entry documenting npm audit bug fixes.
Root Dependency Overrides
package.json
Root overrides expanded to include ip-address patch, enforce postcss 8.5.10 for next and vite, and update npm/serialize-javascript/undici constraints.
Bundled Vulnerability Patching
scripts/patch-npm-bundled-vulnerabilities.mjs
Patch script extended to handle ip-address alongside existing brace-expansion and picomatch patches.
Test Package Dependencies
tests/test-commonjs/package.json, tests/test-nextjs-cjs/package.json, tests/test-nextjs/package.json
PostCSS dependencies pinned to ^8.5.10, vite overrides added for next and vite with postcss 8.5.10, and postcss version constraints tightened across test suites.
Maintenance Scripts
package.json, scripts/reinstall-all.mjs
New npm scripts audit:all, prereinstall:all, and reinstall:all added; new reinstall-all.mjs utility scans test directories and orchestrates dependency reinstallation with cross-platform support and aggregated reporting.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • mi-examples/pp-dev#116: Extends patch-npm-bundled-vulnerabilities.mjs and adds ip-address patch alongside dependency overrides.
  • mi-examples/pp-dev#117: Modifies patch script and root package.json overrides to vendor-patch bundled dependencies.
  • mi-examples/pp-dev#125: Introduces repository-wide npm audit and maintenance tooling with cross-workspace scripts and dependency-alignment overrides.

Suggested reviewers

  • MaksymovVolodymyr
  • michailozdemir
  • Sadilenko

🐰 Audit findings patched with care,
PostCSS pinned everywhere,
Scripts now dance in sync,
Dependencies don't stink,
Beta version's here, no despair! 🚀

🚥 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 refers to promoting develop to main with dependency hardening and tooling improvements, which aligns with the PR's actual content covering npm audit fixes, PostCSS patching, and new scripts.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
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 docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch develop

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
scripts/reinstall-all.mjs (1)

56-59: ⚡ Quick win

Spawn errors are silently swallowed; signal-killed processes are misreported as success.

Two issues on line 57:

  1. When spawnSync fails to start the process (e.g. npm not on PATH), spawned.error is set but never printed. Because stdio: 'inherit' was never connected to a live process, the error message is lost — the user only sees failed (exit 1) with no diagnosis.

  2. When a process is killed by a signal (e.g. SIGKILL from OOM), spawned.status is null and spawned.error is undefined, so the expression evaluates to 0 — a silent false-positive success.

🔧 Proposed fix
-  const spawned = runNpmReinstall(cwd);
-  const code = spawned.status ?? (spawned.error ? 1 : 0);
+  const spawned = runNpmReinstall(cwd);
+  if (spawned.error) {
+    console.error(`  Spawn error: ${spawned.error.message}`);
+  } else if (spawned.signal) {
+    console.error(`  Process killed by signal: ${spawned.signal}`);
+  }
+  const code = spawned.status ?? ((spawned.error || spawned.signal) ? 1 : 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 `@scripts/reinstall-all.mjs` around lines 56 - 59, The current status
calculation silently swallows spawn errors and treats signal-terminated
processes as success; update the logic around runNpmReinstall()'s returned
spawned object to (1) if spawned.error is set, set code to non-zero (e.g. 1) and
print the error (message/stack) to stderr so missing binaries or spawn failures
are visible, and (2) if spawned.status is null but spawned.signal is set, treat
this as failure (e.g. map to a non-zero code or 128+signal) and log which signal
killed the process; then push results.push({ label, code }) with that computed
code. Reference runNpmReinstall, spawned, spawned.error, spawned.status,
spawned.signal, and results.push when making the change.
🤖 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`:
- Around line 79-87: Replace the invalid npm override keys "next@*" and "vite@*"
with valid npm semver specifiers: update the override object keys (currently
"next@*" and "vite@*") to use a proper semver range such as "next@" for any
version or a concrete range like "next@^12.0.0" / "vite@^4.0.0" (or whichever
range you intend), so npm will recognize and apply the overrides; keep the
nested object (e.g., the "postcss": "8.5.10" entries) unchanged.

---

Nitpick comments:
In `@scripts/reinstall-all.mjs`:
- Around line 56-59: The current status calculation silently swallows spawn
errors and treats signal-terminated processes as success; update the logic
around runNpmReinstall()'s returned spawned object to (1) if spawned.error is
set, set code to non-zero (e.g. 1) and print the error (message/stack) to stderr
so missing binaries or spawn failures are visible, and (2) if spawned.status is
null but spawned.signal is set, treat this as failure (e.g. map to a non-zero
code or 128+signal) and log which signal killed the process; then push
results.push({ label, code }) with that computed code. Reference
runNpmReinstall, spawned, spawned.error, spawned.status, spawned.signal, and
results.push when making the change.
🪄 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: 9a897253-e6d6-444e-898a-abf23232e5a3

📥 Commits

Reviewing files that changed from the base of the PR and between be5c819 and 795b7b5.

⛔ Files ignored due to path filters (4)
  • package-lock.json is excluded by !**/package-lock.json
  • tests/test-commonjs/package-lock.json is excluded by !**/package-lock.json
  • tests/test-nextjs-cjs/package-lock.json is excluded by !**/package-lock.json
  • tests/test-nextjs/package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (7)
  • CHANGELOG.md
  • package.json
  • scripts/patch-npm-bundled-vulnerabilities.mjs
  • scripts/reinstall-all.mjs
  • tests/test-commonjs/package.json
  • tests/test-nextjs-cjs/package.json
  • tests/test-nextjs/package.json

Comment thread package.json
Comment on lines +79 to +87
"next@*": {
"postcss": "8.5.10"
},
"npm": ">=11.13.0",
"serialize-javascript": ">=7.0.5",
"undici": ">=6.24.0"
"undici": ">=6.24.0",
"vite@*": {
"postcss": "8.5.10"
}

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 | 🔴 Critical

🧩 Analysis chain

🌐 Web query:

Does npm overrides support the "pkg@version": {} object key syntax for nested overrides, and specifically the @* wildcard form?

💡 Result:

Yes, npm overrides supports the "pkg@version": {} object key syntax for nested overrides, where the key is a package specifier that can include a specific version like "bar@2.0.0": { "foo": "1.0.0" } [1][2]. This applies the nested overrides only when the package matches that version specifier [2]. No, there is no evidence or documentation for an "@" wildcard form specifically (e.g., "pkg@": {}); version matching uses semver ranges (e.g., "pkg@^1.0.0"), not shell-style wildcards like @* [1][2]. Searches for "@*" yielded no matching syntax or examples [all].

Citations:


The "pkg@*" syntax in overrides is not valid npm syntax.

npm overrides support the "pkg@version": {} object-key syntax, but only with semver ranges (e.g., "pkg@^1.0.0", "pkg@>=1.0.0"). The @* wildcard form is not recognized—npm does not support shell-style wildcards in override specifiers. The entries "next@*" and "vite@*" will not match intended versions and the overrides will not be applied. Use a proper semver range instead (e.g., "next@" for any version or a specific range like "next@^12" or "next@13.0.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` around lines 79 - 87, Replace the invalid npm override keys
"next@*" and "vite@*" with valid npm semver specifiers: update the override
object keys (currently "next@*" and "vite@*") to use a proper semver range such
as "next@" for any version or a concrete range like "next@^12.0.0" /
"vite@^4.0.0" (or whichever range you intend), so npm will recognize and apply
the overrides; keep the nested object (e.g., the "postcss": "8.5.10" entries)
unchanged.

@sergak01
sergak01 merged commit 0c5ef17 into main May 7, 2026
1 check passed
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.

3 participants