Skip to content

Add tests for NewCommand skeleton package resolution - #16

Merged
roble merged 2 commits into
mainfrom
dev
Jul 21, 2026
Merged

Add tests for NewCommand skeleton package resolution#16
roble merged 2 commits into
mainfrom
dev

Conversation

@roble

@roble roble commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

This pull request updates how the NewCommand resolves the skeleton package version for new Saucebase applications, ensuring it always installs the latest stable release instead of accidentally installing a development version. It also introduces comprehensive tests for this logic. The main changes are grouped below:

Improvements to Skeleton Version Resolution:

  • The command now fetches the latest published release of the skeleton from Packagist and pins the install to that version, preventing accidental installation of dev-main when offline or when the latest version can't be determined. If offline, it falls back to a numeric constraint defined by the new SKELETON_FALLBACK constant (^2.0). [1] [2]
  • The latestVersion method now accepts a package name parameter and queries Packagist dynamically, rather than being hardcoded for the installer package.

Testing Enhancements:

  • Added NewCommandTest with a testable subclass to verify that the skeleton is pinned to the latest stable release, correctly falls back when offline, and respects command options. This ensures robust coverage of the new version resolution logic.

@roble
roble merged commit b1d301d into main Jul 21, 2026
2 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.

1 participant