Skip to content

fix: Update release process and version handling in pipeline#71

Merged
jamesvillarrubia merged 4 commits intomainfrom
fix/version-command-and-workflow
Oct 7, 2025
Merged

fix: Update release process and version handling in pipeline#71
jamesvillarrubia merged 4 commits intomainfrom
fix/version-command-and-workflow

Conversation

@jamesvillarrubia
Copy link
Owner

@jamesvillarrubia jamesvillarrubia commented Oct 7, 2025

Summary

Type: fix

  • What kind of change does this PR introduce?

    • This PR introduces changes to the release and build process in the CI/CD pipeline, and updates how the version is handled in the `pullcraft.ts` script.
  • What is the current behavior?

    • Previously, the version was a placeholder and the build step was run before the release step in the CI/CD pipeline.
  • What is the new behavior?

    • The version is now dynamically pulled from `package.json`, ensuring accuracy. The build step now occurs after the release step in the CI/CD pipeline, which includes changes to both the release and prerelease workflows. Additionally, the npm publish step has been added directly after building.
  • Does this PR introduce a breaking change?

    • No breaking changes are introduced. However, the order of operations in the CI/CD pipeline has changed, which could affect how builds and releases are handled.
  • **Has Testing been included for this PR?

    • No specific new tests were added; existing CI/CD workflows should validate these changes.

Other Information

  • The changes ensure that the build uses the most recent version number, which is crucial for accurate releases. The modification in `.release-it.cjs` to disable automatic npm publishing aligns with the new manual publish steps added in the GitHub Actions workflow.

  • This update is crucial for maintaining accurate versioning and improving the reliability of the release process in automated environments.


…lish steps

- Updated CLI to read version from package.json dynamically instead of using placeholder
- Excluded bin directory from CJS build (only ESM bin is used)
- Removed redundant chmod from CJS build script
- Configured release-it to skip npm publish (handled separately in workflow)
- Updated GitHub Actions workflow to explicitly run build after version bump
- This ensures published npm package has correct version in --version output
…kflow

- Updated npm.publish to false in .release-it.js example
- Added explicit build step after version bump in workflow examples
- Added separate npm publish step with NODE_AUTH_TOKEN
- Applied changes to both release and prerelease job examples
@jamesvillarrubia jamesvillarrubia changed the title ci: Update CI workflows and release process fix: Replaces placeholder version for cli command with real version in pipeline Oct 7, 2025
@jamesvillarrubia jamesvillarrubia changed the title fix: Replaces placeholder version for cli command with real version in pipeline fix: Update release process and version handling in pipeline Oct 7, 2025
The bin directory is excluded from CJS builds because it uses import.meta.url
which is only available in ESM. Only the ESM bin is used as the executable.
@codecov
Copy link

codecov bot commented Oct 7, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.91%. Comparing base (fee8d5e) to head (6de7222).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #71   +/-   ##
=======================================
  Coverage   98.91%   98.91%           
=======================================
  Files           3        3           
  Lines         736      736           
  Branches       75       75           
=======================================
  Hits          728      728           
  Misses          7        7           
  Partials        1        1           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

…flag

- Modified pullcraft.ts to use VERSION_PLACEHOLDER that gets replaced at bundle time
- Updated build.bundle.js to read version from package.json and inject via esbuild define
- Removed --experimental-default-type=module flag from build.sea.js (incompatible with Node v23)
- Version now works correctly for both npm installs and SEA bundles
@jamesvillarrubia jamesvillarrubia merged commit abb67fa into main Oct 7, 2025
4 checks passed
@jamesvillarrubia jamesvillarrubia deleted the fix/version-command-and-workflow branch October 7, 2025 18:59
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