fix: Amplify test fails when CLI is installed from Verdaccio #55
+62
−7
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The Amplify tests (used to) work like this:
npm create amplify
, which runsnpx create-amplify
package.json
to point to the correct CLI versionnpm install
and run the Amplify CLIHowever, during the first step (
npx create-amplify
) the Amplify CLI already picks a baked-in CLI version (let's say[email protected]
) andnpm install
s it, before we have had a time to hack thepackage.json
file.This works fine if
2.1002.0
is available to install, but in the case where we have an isolated run with the candidate packages in Verdaccio, only the release candidate is available which will have a version like2.1002.999
, and the first step of this test fails.What we do instead is download the installer and change the package version it is about to install by editing one of its data files,
default_packages.json
.