Set placeholder dev version#403
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 version in package.json does nothing for releases: the publish workflow stamps the real number from the release tag with npm version before packing, testing and publishing. Carrying the stale 3.40.1 around is actively misleading on this branch, since a dev checkout reports itself as a v3 release through sls --version and through the serverless.version property exposed to plugins.
This sets the field to 4.0.0-dev, which is valid semver that npm happily accepts but is clearly not a real release. The major is kept truthful rather than using something like 0.0.0-development because the frameworkVersion validation in the service class compares against a coerced version, so a dev checkout run against a service pinned to a v4 range keeps validating as expected, while still failing loudly anywhere the placeholder would be the wrong thing to expose. The version-sensitive tests either stub the version or read it from package.json directly, so nothing depends on the old value.