Skip to content

chore(package): update package.json metadata, scripts, and dependencies#26

Merged
tobrien merged 16 commits intomainfrom
working
Jan 31, 2026
Merged

chore(package): update package.json metadata, scripts, and dependencies#26
tobrien merged 16 commits intomainfrom
working

Conversation

@tobrien
Copy link
Copy Markdown
Collaborator

@tobrien tobrien commented Jan 31, 2026

Automated release PR.

Updated npm-publish.yml to match standardized workflow format that triggers on both release creation and pushes to working branch. Removed redundant build job and simplified to single publish job with smart version tagging (dev for pre-releases, latest for stable versions).
1. Vitest config: Moved maxForks/minForks from deprecated poolOptions to top-level
2. Workflow: Skip npm publish for production versions on non-release pushes
Upgraded all workflows from standard 2-core runners to 8-core runners for improved performance.
Pre-release versions (e.g., 1.5.8-dev.0) now include the short git SHA
in the published version string (e.g., 1.5.8-dev.0+a1b2c3d). This makes
it easier to trace published dev packages back to their source commit.

Production versions remain unchanged and only publish on release events.
The npm version command was failing because it validates semver strictly
and doesn't like the +sha format. Now we directly modify package.json
using Node.js to bypass npm's validation while still updating the version.
npm strips the +sha build metadata when publishing, causing version
conflicts. Now using format like 1.5.5-dev.20260131210612.ab169e2
which is valid semver and ensures unique versions for each build.
- Make prompt confirmation injectable to support non-interactive and test environments
- Improve repo detection (supports SSH aliases, custom hosts, URLs without .git, and Enterprise/port forms)
- Add robust PR creation handling: title truncation to 256 chars with word-boundary logic, reuse-exists check, and improved 422 recovery
- Implement richer workflow/release checks:
  - Inspect repository workflows and determine if they trigger on pull_request or release events
  - Detect and filter workflow runs triggered by a release (time and SHA-aware)
  - Wait/monitor logic for PR checks and release workflows with retry, timeout and user prompts
- Enhance release creation (unescape serialized newlines) and add helpers for issues/milestones:
  - create/get releases, list/open/closed issues, milestone find/create/close, move issues between milestones
  - Helpers to collect issue details and generate release notes respecting token limits
- Improve error handling and logging throughout functions

Tests:
- Add/expand tests in tests/github.test.ts to cover new behavior and edge cases for all updated utilities:
  - getOctokit, branch/repo detection, create/find PRs, title truncation, waiting for checks, merging PRs, releases, workflows, issues, milestones, and many edge/error cases
- Use mocked Octokit and git tools; inject prompt function in tests

Files:
- src/github.ts
- tests/github.test.ts
…stall

Move the version check and publish decision logic before npm install steps.
This saves significant time when the workflow decides not to publish (e.g.,
production versions pushed to working branch), as it skips the expensive
npm install operations entirely.

Time savings: ~2-5 minutes per skipped publish workflow run.
Reduce CI costs by using standard ubuntu-latest runners instead of
8-core runners. The extra cores are not necessary for our build and
test workloads.
@github-advanced-security
Copy link
Copy Markdown

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

@tobrien tobrien merged commit 0d5d6aa into main Jan 31, 2026
5 of 6 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.

2 participants