chore: Add meta-data to core to ensure it is always released #13526
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.
Description of changes
This change introduces a meta-data file to
@aws-amplify/core
which will be automatically updated and committed before releases are run to ensure that a new version ofcore
is published with a correctversion.ts
file (even if there were no other changes in@aws-amplify/core
). Resolves an issue where particular releases of Amplify would use the wrong version in the user-agent headers if there were no changes tocore
in that release. This issue started happening when we fixed conventional commits in #13228. Before this change, all packages were getting published every time which obfuscated the problem.Downsides:
core
(although this is technically more correct given the current UA versioning logic)Alternatives considered:
@aws-amplify/core
using--force-publish
version.ts
before release runsaws-amplify
yet.version.ts
before release runsversion.ts
it's too late in the process andcore
would be skipped.aws-amplify
version directly from package.jsonaws-amplify
PR that introduced original
version.ts
logic: #11301Issue #, if available
Description of how you validated changes
Tested release workflow on Verdaccio. Confirmed that
version.ts
was published with the correct version.Checklist
yarn test
passesBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.