Skip to content

release: 0.12.0 — remove the React adapter's useBeverageLabelMap (CEL-1660) - #16

Merged
mong-x merged 1 commit into
mainfrom
marcus/release-bu-0-12-0
Sep 5, 2026
Merged

release: 0.12.0 — remove the React adapter's useBeverageLabelMap (CEL-1660)#16
mong-x merged 1 commit into
mainfrom
marcus/release-bu-0-12-0

Conversation

@mong-x

@mong-x mong-x commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Ready to merge, then publish — I could not publish it myself

This is the version bump for the CEL-1660 removal that landed in #15. Do not merge this without publishing, or package.json will claim 0.12.0 while the registry still serves 0.11.0, and any consumer bumped to ^0.12.0 will fail to install.

Why it is a PR and not already released

npm publish failed here with ENEEDAUTH — this shell has no registry credential for @cellarnode. I deliberately did not investigate further, because inspecting .npmrc files means reading credentials. So I stopped, parked the commit here, and reset main back to 0.11.0 so nothing drifts in the meantime.

To finish (two steps)

gh pr merge <this PR> --repo CellarNode/beverage-utils --squash
git checkout main && git pull
npm publish

Then verify against the registry rather than the cached packument:

npm view @cellarnode/beverage-utils version --prefer-online   # expect 0.12.0

Why 0.12.0 and not a patch

Removing a public export is breaking. Below 1.0 a caret does not cross a minor, so ^0.11.0 consumers will not receive this automatically — which is the point. producer-dashboard, cellarnode-importer-dashboard and cellarnode-elabel-frontend each need an explicit ^0.11.0^0.12.0 bump once this is live. admin-dashboard-v2 needs nothing (it never imported the package export — its local @/hooks/use-beverage-label-map is a different module with the same name), and the mobile app does not depend on this package at all.

A build bug I found and worked around

npm run build does not clean dist/. After #15 merged, dist/react/ still contained the four removed artifacts (use-beverage-label-map.{js,d.ts,js.map,d.ts.map}, dated Apr 14) — orphaned but present. index.js no longer references them, so nothing resolves through the package entry point, but prepublishOnly runs only build, so a publish from a dirty tree would have shipped the "removed" hook, still reachable by deep import.

I ran rm -rf dist && npm run build before committing, and confirmed 0 matching files afterwards. Please do the same before publishing, since your dist/ is probably also stale.

Worth a follow-up ticket: add a clean step to build (or prepublishOnly) so a removal cannot survive into a published tarball. This repo has no Makefile and no release script — unlike ui, which has release-patch/release-minor/release-major targets that build, version, publish, commit and tag in one go. beverage-utils also has no release tags since v0.1.0, so there is no way to bisect against a published version.

Gates, run after the final commit

npm ci --legacy-peer-deps 0 · tsc --noEmit 0 · vitest run 323/323 · npm run build 0 on a cleaned tree.


Summary by cubic

Bumps @cellarnode/beverage-utils to 0.12.0, publishing the removal of the React adapter's useBeverageLabelMap and beverageLabelMapOptions exports (CEL-1660).

Rollout

  • producer-dashboard, cellarnode-importer-dashboard, and cellarnode-elabel-frontend must bump from ^0.11.0 to ^0.12.0; cellarnode-admin-dashboard-v2 and the mobile app do not import the package.
  • Merge and publish in the same step — a merge without publish leaves package.json ahead of the registry, and npm publish previously failed with ENEEDAUTH.
  • Verify with npm view @cellarnode/beverage-utils version --prefer-online after publishing.

Build

  • npm run build does not clean dist/, so run rm -rf dist && npm run build before publishing to avoid shipping the removed hook via deep import.

Written for commit 507eee8. Summary will update on new commits.

Review in cubic

@coderabbitai

coderabbitai Bot commented Sep 4, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 46 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Team

Run ID: bd847116-f776-4f54-a2fc-dfefdbd9f029

📥 Commits

Reviewing files that changed from the base of the PR and between 3ec7bf9 and 507eee8.

📒 Files selected for processing (2)
  • CHANGELOG.md
  • package.json

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.

@mong-x

mong-x commented Sep 4, 2026

Copy link
Copy Markdown
Contributor Author

Follow-up on the ENEEDAUTH in the description — a useful contrast, since I published a different package successfully from this same shell minutes later.

@cellarnode/ui@0.161.0 published fine via ui's make release-minor. Its release-install target is only pnpm install --frozen-lockfile, so it does nothing special for auth — meaning ui resolves a registry credential by some path that beverage-utils does not. Per the workspace convention, .npmrc routes @cellarnode to npmjs with ${NPM_TOKEN}, and NPM_TOKEN was not set in my environment. ENEEDAUTH (rather than E404) is specifically the "token absent" signal, not "token lacks publish rights".

I did not inspect any .npmrc to confirm which mechanism differs — reading those means reading credentials, so I stopped there deliberately. Flagging it so you can check rather than guess: whatever makes ui publishable from a local shell is worth mirroring here, alongside the missing clean step and the absent release script.

@cubic-dev-ai cubic-dev-ai 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.

No issues found across 2 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Auto-approved: Version bump to 0.12.0 with changelog finalization for the already-merged breaking removal; diff is limited to package metadata and changelog, with no code behavior change, so it is bounded and clearly beneficial.

Re-trigger cubic

@mong-x

mong-x commented Sep 4, 2026

Copy link
Copy Markdown
Contributor Author

Decisive diagnostic, no credentials involved: npm whoami succeeds from the ui checkout (returns mjnong) and fails with ENEEDAUTH from the beverage-utils checkout, on the same machine in the same session. So this is not about publish rights or a scope — it is that ui's repo-local npm config authenticates and this repo's does not.

That is the whole gap. I did not look at either .npmrc, and I am not going to: reconciling them means handling a token, which is yours to do, not mine. Whatever makes ui publishable locally needs mirroring here, and PR #17 adds the release tooling that will use it.

@mong-x

mong-x commented Sep 4, 2026

Copy link
Copy Markdown
Contributor Author

Update: #17 has merged, so the manual rm -rf dist step in the description is no longer needed. build now runs clean first, and prepublishOnly chains build && verify-dist — the orphan guard fails the publish if any dist/ artifact has no corresponding src/ file. That is the exact bug that would otherwise have shipped the "removed" hook.

Verified no conflict against the new main (git merge-tree reports 0): #17 touched scripts, this PR touches version and the CHANGELOG heading, so they are disjoint keys.

Revised steps:

gh pr merge 16 --repo CellarNode/beverage-utils --squash
git checkout main && git pull
make release-minor          # added by #17 — install, build (cleans), version, publish, commit, tag

Note make release-minor would bump 0.11.0 → 0.12.0 by itself, so if you take that route you do not need this PR's version commit — merge one or the other, not both. Merging this PR and then running npm publish directly is the path that matches what is already written here. Either way, verify against the registry rather than the cached packument:

npm view @cellarnode/beverage-utils version --prefer-online   # expect 0.12.0

@mong-x
mong-x merged commit b1be4df into main Sep 5, 2026
3 checks passed
@mong-x
mong-x deleted the marcus/release-bu-0-12-0 branch September 5, 2026 05:02
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