Skip to content

feat: generate package-manager-aware CI scripts - #593

Open
huytdps13400 wants to merge 2 commits into
callstack:mainfrom
huytdps13400:fix/452-bun-package-manager
Open

feat: generate package-manager-aware CI scripts#593
huytdps13400 wants to merge 2 commits into
callstack:mainfrom
huytdps13400:fix/452-bun-package-manager

Conversation

@huytdps13400

@huytdps13400 huytdps13400 commented Aug 23, 2026

Copy link
Copy Markdown

Summary

  • detect npm, Yarn, or Bun from the packageManager field or the corresponding lockfile
  • prefer an explicit packageManager declaration and keep Yarn as the fallback
  • render one executable reassure-tests.sh template with the selected install and Reassure commands
  • document npm, Yarn, and Bun init workflows
  • keep Jest as the test runner; this only changes package-manager commands

Verification

  • yarn workspace @callstack/reassure-cli test --runInBand (10/10 passed)
  • yarn validate
  • yarn format:check
  • yarn build
  • git diff --check

Part of #452

# Gather current perf measurements & compare results
git switch --detach -

bun install

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could we make this a template file, with some simple templating syntax for npm/yarn/bun install & npm/yarn/bun run .

It makes more sense then having separate copies of the file

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Implemented in 44fda7d. packages/cli/src/templates/reassure-tests is now the single template, and setUpCiScript() renders its install/run placeholders for npm, Yarn, or Bun after package-manager detection. The focused init suite covers all three outputs plus placeholder removal and executable mode.

@mdjastrzebski

Copy link
Copy Markdown
Member

As far as I can tell this basically changes the template file to use bun instead of yarn. The run script is created from template but intended to be owned by the user, so they can already manually change the yarn installs => bun installs. If you want to continue working on it, then let's change scope so that changes in this PR would detect package manager, say npm/yarn/bun (pnpm might be more difficult due to need for hoisting which is not the default) and make reassure-tests.sh a template file that would be transformed when doing init to use. whatever Pkg Mgr user selected

@huytdps13400 huytdps13400 changed the title feat: generate Bun-compatible CI scripts feat: generate package-manager-aware CI scripts Aug 23, 2026
@huytdps13400

Copy link
Copy Markdown
Author

Thanks for clarifying the intended scope. I updated the PR in 44fda7d to detect npm, Yarn, and Bun from packageManager or lockfiles, then render a single reassure-tests.sh template with the matching commands. Explicit packageManager values take precedence and Yarn remains the fallback.

I also added coverage for all three declarations, npm/Yarn/Bun lockfiles, stale-lockfile precedence, executable mode, and complete placeholder rendering. yarn validate, yarn format:check, yarn build, and all 10 focused CLI tests pass.

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