Skip to content

chore: dep cleanup#192

Merged
MihalyToth20 merged 4 commits intomainfrom
dev
Apr 10, 2026
Merged

chore: dep cleanup#192
MihalyToth20 merged 4 commits intomainfrom
dev

Conversation

@MihalyToth20
Copy link
Copy Markdown
Collaborator

@MihalyToth20 MihalyToth20 commented Apr 10, 2026

Summary by CodeRabbit

  • Chores
    • Reorganized dependencies across packages to separate development-only and runtime requirements
    • Enhanced release workflow configuration with improved security through provenance tracking

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Apr 10, 2026

🦋 Changeset detected

Latest commit: 867c329

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@calycode/browser-consumer Patch
@repo/utils Patch
@calycode/cli Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 10, 2026

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: b98355b0-ba85-4b36-8f00-d86a948ecf26

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Walkthrough

Dependency cleanup across the monorepo reclassifying runtime dependencies as development-only in three packages, removing unused dependencies entirely, and updating the GitHub Actions release workflow to use NPM provenance instead of token-based authentication for publishing.

Changes

Cohort / File(s) Summary
Changesets
.changeset/tender-pants-dress.md
Added new patch-level release changeset declaring releases for @calycode/browser-consumer, @repo/utils, and @calycode/cli with message "chore: dep cleanup + release workflow adjustments".
GitHub Actions
.github/workflows/release.yml
Removed NODE_AUTH_TOKEN secret from Node setup and NPM_TOKEN env var; added --provenance flag to Changesets publish command and configured NPM_CONFIG_PROVENANCE: true for provenance-based publishing.
Package Manifests
packages/browser-consumer/package.json, packages/cli/package.json, packages/utils/package.json
Migrated dependencies from dependencies to devDependencies: idb and js-untar in browser-consumer, @repo/types in utils; removed entire dependencies block from cli and removed @calycode/core entirely from browser-consumer.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 Whisker-twitched and carrots munched,
Dev deps bundled, runtime slimmed,
No more tokens, provenance signed,
Packages lighter, workflows refined,
Hop along, the cleanup is done! 🥕✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'chore: dep cleanup' directly and clearly describes the main objective of the pull request, which involves reorganizing and cleaning up dependencies across multiple packages and updating the release workflow configuration.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ 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 dev

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.

Copy link
Copy Markdown
Contributor

@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 the current code and only fix it if needed.

Inline comments:
In @.github/workflows/release.yml:
- Around line 53-56: Change the publish step so it invokes npm directly to
enable npm OIDC Trusted Publishing: replace the current `publish: pnpm -r
publish --provenance` with using `pnpm -r exec npm publish` (remove the
`--provenance` flag since npm will generate provenance under OIDC), keep the
environment variables (`GITHUB_TOKEN`, `NPM_CONFIG_PROVENANCE`) as needed, and
ensure every package in the monorepo has a corresponding npm Trusted Publisher
configured for this GitHub repo (per-package Trusted Publisher settings on npm)
so the `exec npm publish` OIDC flow will succeed.

In `@packages/browser-consumer/package.json`:
- Around line 42-45: The package manifest lists runtime libs under
devDependencies; move "idb" and "js-untar" from devDependencies into
dependencies in packages/browser-consumer/package.json so they are installed for
consumers — these are required at runtime (openDB from idb in
packages/browser-consumer/src/indexeddb-utils.ts and the dynamic import usage in
packages/browser-consumer/src/browser-config-storage.ts). Ensure the versions
remain "^8.0.0" and "^2.0.0" respectively and remove them from devDependencies
to avoid breakage outside the monorepo.
🪄 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: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: c1951b89-66a4-4912-ae08-753e5de99a8a

📥 Commits

Reviewing files that changed from the base of the PR and between 85d6b68 and ef26cf1.

📒 Files selected for processing (5)
  • .changeset/tender-pants-dress.md
  • .github/workflows/release.yml
  • packages/browser-consumer/package.json
  • packages/cli/package.json
  • packages/utils/package.json

Comment on lines +53 to +56
publish: pnpm -r publish --provenance
env:
GITHUB_TOKEN: ${{ secrets.CHANGESETS_GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_CONFIG_PROVENANCE: true
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.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🌐 Web query:

For npm Trusted Publishing with GitHub Actions OIDC, is pnpm -r publish --provenancesufficient withoutNODE_AUTH_TOKEN, and what npm package/repository linkage is required?

💡 Result:

  • No: pnpm -r publish --provenance is not “sufficient” for npm Trusted Publishing (GitHub Actions OIDC) unless it ultimately runs npm publish. npm’s docs explicitly note that trusted publishing (OIDC auth) applies to the npm publish operation, and provenance is generated automatically when publishing via trusted publishing (so --provenance is unnecessary in that case). You also do not need NODE_AUTH_TOKEN for the publish step when OIDC trusted publishing is being used. [1]

    • You may still need NODE_AUTH_TOKEN as a read-only token to install private dependencies during the workflow (OIDC doesn’t cover npm install/npm ci). [1]
  • Required npm↔GitHub linkage (per package):

    1. Configure a Trusted Publisher for the package that matches the GitHub repo and workflow file name (and optionally a GitHub “environment”). You can do this in the npm UI or with:
      npm trust github [package] --file <workflow.yml> --repository <owner/repo> [--environment <env>] [2]
    2. Ensure the package’s package.json has repository.url that exactly matches the GitHub repository you’re publishing from (npm uses this for validation/matching and warns mismatches will fail at publish time). [1]

Practical upshot: keep using pnpm for build/test, but for the publish step in a monorepo run something like pnpm -r exec npm publish (or npm publish in each package) so OIDC trusted publishing actually applies. [1]

Sources:
[1] npm Docs – Trusted publishing for npm packages: https://docs.npmjs.com/trusted-publishers/
[2] npm Docs – npm trust command (npm trust github ... flags): https://docs.npmjs.com/cli/v11/commands/npm-trust/


Publish command bypasses npm Trusted Publishing; reconfigure for OIDC linkage.

The pnpm -r publish command doesn't invoke npm publish directly, so npm's OIDC trusted publishing won't be triggered. For OIDC to work, change to pnpm -r exec npm publish. Additionally, --provenance is redundant—npm auto-generates provenance when OIDC trusted publishing is active.

Critical: Each package must have a Trusted Publisher configured in npm (matching this GitHub repo and workflow file). Without per-package npm Trusted Publisher linkage, publish will fail regardless of id-token: write permission or environment variables. Confirm all packages have this configured at https://npmjs.com/settings/[scope]/teams/developers/tokens (or package-specific settings).

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/release.yml around lines 53 - 56, Change the publish step
so it invokes npm directly to enable npm OIDC Trusted Publishing: replace the
current `publish: pnpm -r publish --provenance` with using `pnpm -r exec npm
publish` (remove the `--provenance` flag since npm will generate provenance
under OIDC), keep the environment variables (`GITHUB_TOKEN`,
`NPM_CONFIG_PROVENANCE`) as needed, and ensure every package in the monorepo has
a corresponding npm Trusted Publisher configured for this GitHub repo
(per-package Trusted Publisher settings on npm) so the `exec npm publish` OIDC
flow will succeed.

Comment on lines +42 to +45
"@repo/types": "workspace:*",
"@repo/utils": "workspace:*",
"idb": "^8.0.0",
"js-untar": "^2.0.0",
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.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify runtime imports for moved deps in browser-consumer source
rg -nP --type ts "(from\s+['\"](idb|js-untar|@repo/types)['\"]|require\(['\"](idb|js-untar|@repo/types)['\"]\))" packages/browser-consumer/src

Repository: calycode/xano-tools

Length of output: 450


🏁 Script executed:

# Check the actual package.json structure for browser-consumer
head -60 packages/browser-consumer/package.json | tail -30

Repository: calycode/xano-tools

Length of output: 1144


🏁 Script executed:

# Search for js-untar imports more broadly, including dynamic requires and indirect usage
rg "js-untar" packages/browser-consumer/

Repository: calycode/xano-tools

Length of output: 450


Move runtime dependencies idb and js-untar from devDependencies to dependencies.

Both are imported at runtime:

  • packages/browser-consumer/src/indexeddb-utils.ts:1 imports openDB from idb
  • packages/browser-consumer/src/browser-config-storage.ts dynamically imports from js-untar

Keeping them as dev-only dependencies will break consumers when this package is installed outside the monorepo. (@repo/types is correctly placed in devDependencies since it uses type-only imports.)

Proposed manifest fix
+    "dependencies": {
+        "idb": "^8.0.0",
+        "js-untar": "^2.0.0"
+    },
     "devDependencies": {
         "@repo/types": "workspace:*",
         "@repo/utils": "workspace:*",
-        "idb": "^8.0.0",
-        "js-untar": "^2.0.0",
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/browser-consumer/package.json` around lines 42 - 45, The package
manifest lists runtime libs under devDependencies; move "idb" and "js-untar"
from devDependencies into dependencies in packages/browser-consumer/package.json
so they are installed for consumers — these are required at runtime (openDB from
idb in packages/browser-consumer/src/indexeddb-utils.ts and the dynamic import
usage in packages/browser-consumer/src/browser-config-storage.ts). Ensure the
versions remain "^8.0.0" and "^2.0.0" respectively and remove them from
devDependencies to avoid breakage outside the monorepo.

@MihalyToth20 MihalyToth20 merged commit 7d58db6 into main Apr 10, 2026
1 of 2 checks 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.

1 participant