Skip to content

refactor(scripts): consolidate releaser into scripts/lib - #134

Merged
wyattjoh merged 1 commit into
mainfrom
refactor/scripts-releaser
Apr 9, 2026
Merged

refactor(scripts): consolidate releaser into scripts/lib#134
wyattjoh merged 1 commit into
mainfrom
refactor/scripts-releaser

Conversation

@wyattjoh

@wyattjoh wyattjoh commented Apr 9, 2026

Copy link
Copy Markdown
Contributor

Reorganizes the scripts directory to reduce nesting and improve cohesion.

  • Move scripts/releaser/targets.ts to scripts/lib/targets.ts — already shared by build.ts and sign-macos.ts, now lives with other shared lib utilities
  • Add run() and publish() to scripts/lib/npm.ts alongside the existing isPublished() — all npm subprocess logic in one place
  • Flatten scripts/releaser/index.ts to scripts/releaser.ts — the subdirectory only held one file
  • Update import paths in build.ts, sign-macos.ts, and package.json

@wyattjoh

wyattjoh commented Apr 9, 2026

Copy link
Copy Markdown
Contributor Author

Stack: npm-publishing-fixes

Part of a stacked PR chain. Do not merge manually.

Base automatically changed from fix/npm-publish-auth to main April 9, 2026 20:20
@wyattjoh
wyattjoh changed the base branch from main to fix/ci-release-node-lts April 9, 2026 20:50
@wyattjoh
wyattjoh force-pushed the refactor/scripts-releaser branch 3 times, most recently from 26e0afd to 5ea4dbb Compare April 9, 2026 20:56
Base automatically changed from fix/ci-release-node-lts to main April 9, 2026 21:01
@wyattjoh
wyattjoh force-pushed the refactor/scripts-releaser branch from 5ea4dbb to 7d8511f Compare April 9, 2026 21:02
@wyattjoh
wyattjoh marked this pull request as ready for review April 9, 2026 21:02
@coderabbitai

coderabbitai Bot commented Apr 9, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 350d2bf4-d74d-4ece-b8bb-bd35bd31e09e

📥 Commits

Reviewing files that changed from the base of the PR and between f031159 and 31f96b0.

📒 Files selected for processing (6)
  • package.json
  • scripts/build.ts
  • scripts/lib/npm.ts
  • scripts/lib/targets.ts
  • scripts/releaser.ts
  • scripts/sign-macos.ts
✅ Files skipped from review due to trivial changes (3)
  • scripts/build.ts
  • scripts/lib/targets.ts
  • package.json
🚧 Files skipped from review as they are similar to previous changes (2)
  • scripts/sign-macos.ts
  • scripts/lib/npm.ts

📝 Walkthrough

Walkthrough

NPM release scripts were changed to run scripts/releaser.ts (preserving --tag canary/snapshot). Common utilities and target definitions were moved/centralized under scripts/lib/: a new scripts/lib/npm.ts exports run and publish, and scripts/lib/targets.ts is now the source for targets. Import paths in scripts/releaser.ts, scripts/build.ts, and scripts/sign-macos.ts were updated to the new locations. scripts/releaser.ts had several local helper functions removed in favor of the imported helpers and its artifact/wrapper package path constants were adjusted upward one directory. Minor comment edits only.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 60.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main change: consolidating the releaser functionality into the scripts/lib directory to reduce nesting.
Description check ✅ Passed The description is directly related to the changeset, providing clear details about the reorganization, file movements, and import path updates.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Comment @coderabbitai help to get the list of available commands and usage tips.

@wyattjoh
wyattjoh force-pushed the refactor/scripts-releaser branch from 7d8511f to f031159 Compare April 9, 2026 21:10
@wyattjoh
wyattjoh changed the base branch from main to fix/disable-npm-provenance April 9, 2026 21:10
@wyattjoh
wyattjoh marked this pull request as draft April 9, 2026 21:10
Base automatically changed from fix/disable-npm-provenance to main April 9, 2026 21:14
- Move targets to scripts/lib/targets.ts (shared by build, sign-macos,
  and releaser)
- Move run() and publish() helpers into scripts/lib/npm.ts alongside
  the existing isPublished()
- Flatten scripts/releaser/index.ts to scripts/releaser.ts now that
  the directory only held one file
- Update import paths in build.ts, sign-macos.ts, and package.json
@wyattjoh
wyattjoh force-pushed the refactor/scripts-releaser branch from f031159 to 31f96b0 Compare April 9, 2026 21:38
@wyattjoh
wyattjoh marked this pull request as ready for review April 9, 2026 21:39
@wyattjoh

wyattjoh commented Apr 9, 2026

Copy link
Copy Markdown
Contributor Author

!snapshot

@github-actions

github-actions Bot commented Apr 9, 2026

Copy link
Copy Markdown
Contributor

Snapshot published

npm install -g clerk@0.0.2-snapshot.v20260409214324
Package Version
clerk 0.0.2-snapshot.v20260409214324

Published from 31f96b0

@wyattjoh
wyattjoh merged commit 5affe13 into main Apr 9, 2026
6 checks passed
@wyattjoh
wyattjoh deleted the refactor/scripts-releaser branch April 9, 2026 21:56
rafa-thayto added a commit that referenced this pull request Apr 10, 2026
PR #134 moved shared helpers to scripts/lib/ but the sparse checkout in
sign-macos.yml was never updated, causing `Cannot find module './lib/targets.ts'`.
rafa-thayto added a commit that referenced this pull request Apr 10, 2026
PR #134 moved shared helpers to scripts/lib/ but the sparse checkout in
sign-macos.yml was never updated, causing `Cannot find module './lib/targets.ts'`.
wyattjoh pushed a commit that referenced this pull request Apr 10, 2026
PR #134 moved shared helpers to scripts/lib/ but the sparse checkout in
sign-macos.yml was never updated, causing `Cannot find module './lib/targets.ts'`.
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