Skip to content

chore(PP-3449): promote develop to main - #186

Merged
sergak01 merged 7 commits into
mainfrom
develop
Jul 2, 2026
Merged

chore(PP-3449): promote develop to main#186
sergak01 merged 7 commits into
mainfrom
develop

Conversation

@sergak01

@sergak01 sergak01 commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

chore(PP-3449): promote develop to main

Summary

Promotes develop to main. Since the last promotion (#182), two follow-up changes landed on develop: a safer npm release flow for prerelease/beta versions, and a full dependency refresh across the root package and all three test fixtures.

Key changes

  • 🔧 CI/release: prerelease version tags (e.g. v1.0.0-beta.1) now publish to npm under the beta dist-tag instead of latest, so a beta build can never become the default install for existing consumers. Testers opt in explicitly via npm install @metricinsights/pp-dev@beta. Final versions are unaffected. Also adds workflow_dispatch to release.yml so a given tag can be manually re-run later.
  • 🧹 Dependencies: updated root + test-nextjs + test-nextjs-cjs + test-commonjs to latest, including major bumps (http-proxy-middleware 3→4, ejs 5→6, @types/node 25→26) plus routine minor/patch bumps (next, react, vite, vitest, rollup, sass, prettier, axios, sharp, tailwindcss, etc.).
  • 🔐 Intentionally not bumped where the ecosystem isn't ready: undici stays on 7.x (v8 breaks jsdom's internal file resolution), eslint stays on 9.x in the Next.js fixtures (eslint-config-next doesn't support 10.x yet), and jquery/@types/jquery stay on 3.x in test-commonjs (matches what the real MI backend still serves in production).
  • 🧪 Verified with npm run audit:all (0 vulnerabilities across all 4 packages), tsc --noEmit, eslint, 185 unit + 39 integration tests, and production builds for root and all three fixtures.

Included commits

ada939d Merge pull request #185 from mi-examples/pp-3449-deps-update
e980b76 chore(PP-3449): update dependencies to latest across root and test fixtures
c8e5bd1 Merge pull request #184 from mi-examples/pp-3449-npm-beta-tag
81ed375 ci(release): publish prereleases under npm beta tag, allow manual re-run

Testing

  • npm run audit:all — 0 vulnerabilities (root + 3 fixtures)
  • npx tsc --noEmit — clean
  • npm run lint — clean
  • npm run test:unit — 185 passed
  • npm run test:integration — 39 passed
  • npm run build — succeeds for root and all 3 fixtures

Merge Request: origin/developorigin/main

Summary by CodeRabbit

  • New Features
    • Release workflow can now be started manually.
    • Published packages now automatically use the correct npm tag (beta for prereleases, latest for stable releases).
  • Bug Fixes
    • Prevents the release workflow from failing when manually triggered for non-tag events.
  • Chores
    • Updated project and test dependencies, along with the package version to v0.20.0-beta.4.

sergak01 added 4 commits July 1, 2026 18:38
Prerelease tags (e.g. v1.0.0-beta.1) now publish with --tag beta instead
of the implicit latest, so a beta version never becomes the default
install for existing consumers. Also add workflow_dispatch so a given
tag can be re-published on demand without needing a new push event.
ci(PP-3449): publish prereleases under npm beta dist-tag
…xtures

Bump root, test-nextjs, test-nextjs-cjs, and test-commonjs devDependencies/
dependencies to latest, including major bumps (http-proxy-middleware v4,
ejs v6, @types/node v26, Next.js/React/Tailwind patch releases).

Intentionally NOT bumped:
- undici stays on latest 7.x (not v8): the root/test-nextjs override forces
  a single undici resolution repo-wide, and jsdom pins ^7.25.0 and reaches
  into undici's internal file layout (require('undici/lib/handler/
  wrap-handler.js')), which v8 restructured. Bumping breaks jsdom at runtime.
- eslint stays on latest 9.x (not v10) in test-nextjs/test-nextjs-cjs:
  eslint-config-next@16.2.10 only supports eslint ^3-^9 as a peer; v10
  installs only via forced ERESOLVE overrides.
- jquery/@types/jquery stay on latest 3.x (not v4) in test-commonjs: the
  fixture mirrors a real Portal Page template, and the MI backend that
  serves /js/jquery/jquery-latest.min.js in production still serves v3.

Verified: npm run audit:all (0 vulnerabilities across all 4 packages),
tsc --noEmit, eslint, 185 unit + 39 integration tests, and production
builds all green for root, test-nextjs, test-nextjs-cjs, and test-commonjs.
chore(PP-3449): update dependencies to latest
@coderabbitai

coderabbitai Bot commented Jul 2, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The release workflow now supports manual dispatch and publishes with a computed npm dist-tag based on the version tag format. Root and test fixture package manifests also have updated dependency, devDependency, and override version ranges, plus a package version bump and changelog entry.

Changes

Release Workflow Dist-Tag

Layer / File(s) Summary
Manual trigger and dist-tag publish
.github/workflows/release.yml
Adds workflow_dispatch, computes beta or latest from the version string, and passes the result to npm publish.

Dependency Version Bumps

Layer / File(s) Summary
Root package.json dependency updates
package.json
Bumps the package version, updates the file-type override, and refreshes multiple runtime and tooling dependency ranges.
Test fixture package.json dependency updates
tests/test-commonjs/package.json, tests/test-nextjs-cjs/package.json, tests/test-nextjs/package.json
Updates dependency, devDependency, and override ranges across the test fixture manifests.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

  • mi-examples/pp-dev#116: Both PRs modify package.json and fixture manifests with overlapping dependency and file-type range updates.

Suggested reviewers: MaksymovVolodymyr, Sadilenko

🚥 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 reflects the PR’s purpose: promoting develop to main.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch develop

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.

@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 (2)
.github/workflows/release.yml (1)

67-67: 🔒 Security & Privacy | 🔵 Trivial | 💤 Low value

Harden the run: interpolation flagged by zizmor.

steps.version.outputs.tag is constrained to the literals beta/latest set earlier in the same job, so actual injection risk here is minimal. Still, per GitHub's Actions hardening guidance, passing ${{ }} expressions through an env var rather than interpolating directly into the shell script is the safer pattern and would silence this static-analysis finding.

🔒 Proposed refactor
       - name: Publish to npm
-        run: npm publish --access public --tag ${{ steps.version.outputs.tag }}
+        env:
+          NPM_TAG: ${{ steps.version.outputs.tag }}
+        run: npm publish --access public --tag "$NPM_TAG"
🤖 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 @.github/workflows/release.yml at line 67, The npm publish command is
interpolating steps.version.outputs.tag directly in the run script, which
triggers the zizmor hardening finding. Update the release job in the workflow to
pass that value through an env var first, then reference the env var in the
publish command; use the existing steps.version.outputs.tag output as the source
and keep the npm publish step behavior unchanged.

Source: Linters/SAST tools

tests/test-nextjs/package.json (1)

33-33: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Duplicate rollup entry across dependencies and devDependencies.

rollup: "^4.62.2" is declared in both dependencies (Line 33) and devDependencies (Line 54) with the identical version. If rollup is only needed for the build/dev toolchain, consider dropping it from dependencies to avoid an unnecessary redundant/confusing entry.

♻️ Proposed cleanup (if rollup is dev-only)
   "dependencies": {
     ...
-    "rollup": "^4.62.2",
     "sass": "^1.101.0",

Also applies to: 41-58

🤖 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 `@tests/test-nextjs/package.json` at line 33, `rollup` is duplicated in both
the dependencies and devDependencies sections of the package.json, so remove the
redundant entry from dependencies if it is only used by the build/tooling flow.
Keep the single source of truth in devDependencies and verify the package.json
around the rollup entry and the dependencies/devDependencies blocks stays
consistent.
🤖 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 @.github/workflows/release.yml:
- Line 7: The release workflow can be manually dispatched from a non-tag ref,
which would make VERSION derive from a branch name instead of a release tag.
Update the workflow around workflow_dispatch and the version derivation in the
release job so it only proceeds when GITHUB_REF_NAME matches the expected v* tag
format, or otherwise exits early with a clear guard. Use the existing VERSION
assignment path and the release job steps to add the validation before any
build, bump, or publish actions run.

---

Nitpick comments:
In @.github/workflows/release.yml:
- Line 67: The npm publish command is interpolating steps.version.outputs.tag
directly in the run script, which triggers the zizmor hardening finding. Update
the release job in the workflow to pass that value through an env var first,
then reference the env var in the publish command; use the existing
steps.version.outputs.tag output as the source and keep the npm publish step
behavior unchanged.

In `@tests/test-nextjs/package.json`:
- Line 33: `rollup` is duplicated in both the dependencies and devDependencies
sections of the package.json, so remove the redundant entry from dependencies if
it is only used by the build/tooling flow. Keep the single source of truth in
devDependencies and verify the package.json around the rollup entry and the
dependencies/devDependencies blocks stays consistent.
🪄 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: 94087d2a-b134-4323-abee-db1743bfcbed

📥 Commits

Reviewing files that changed from the base of the PR and between ef78536 and ada939d.

⛔ 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 (5)
  • .github/workflows/release.yml
  • package.json
  • tests/test-commonjs/package.json
  • tests/test-nextjs-cjs/package.json
  • tests/test-nextjs/package.json

Comment thread .github/workflows/release.yml
workflow_dispatch lets this workflow run against any ref (branch or
tag). Without a check, dispatching against main/develop would derive
VERSION from the branch name and proceed to build/bump/publish with
a bogus version. Exit early unless GITHUB_REF_NAME matches a v* tag.

Addresses CodeRabbit review comment on PR #186.
sergak01 and others added 2 commits July 2, 2026 10:39
fix(PP-3449): guard release.yml against non-tag workflow_dispatch runs
# [0.20.0-beta.4](v0.20.0-beta.3...v0.20.0-beta.4) (2026-07-02)

### Bug Fixes

* **PP-3449:** guard release.yml against non-tag workflow_dispatch runs ([a7f463f](a7f463f))

@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

🤖 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 4: The changelog subsection heading is using the wrong markdown level,
skipping from the release title to H3 and causing inconsistent structure. Update
the heading in the changelog section from `### Bug Fixes` to `## Bug Fixes` so
the subsection matches the surrounding release format and markdownlint
expectations.
🪄 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: e53ca605-8a5e-464f-a2ad-d3b4540878b1

📥 Commits

Reviewing files that changed from the base of the PR and between ada939d and 22ab8db.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (3)
  • .github/workflows/release.yml
  • CHANGELOG.md
  • package.json
✅ Files skipped from review due to trivial changes (1)
  • package.json
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/release.yml

Comment thread CHANGELOG.md
@sergak01
sergak01 merged commit 9edc66b into main Jul 2, 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.

4 participants