Introduce schema version in FastBoot package.json#337
Merged
rwjblue merged 1 commit intoember-fastboot:masterfrom Feb 2, 2017
kratiahuja:manifest-version
Merged
Introduce schema version in FastBoot package.json#337rwjblue merged 1 commit intoember-fastboot:masterfrom kratiahuja:manifest-version
rwjblue merged 1 commit intoember-fastboot:masterfrom
kratiahuja:manifest-version
Conversation
4 tasks
Contributor
Author
tomdale
previously requested changes
Jan 27, 2017
| var path = require('path'); | ||
| var Plugin = require('broccoli-plugin'); | ||
|
|
||
| var LATEST_SCHEMA_VERSION = '1'; |
Contributor
There was a problem hiding this comment.
Per comments in the other PR, this should be an integer instead of a string.
Contributor
Author
There was a problem hiding this comment.
Updated to use an integer.
Contributor
|
Other than the one comment I left in review, this looks good. |
THis is to maintain compatibility between ember-cli-fastboot and fastboot.
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.
Motivation
ember-cli-fastbootpublishes a package.json in the dist directory of any ember app that is used by thefastbootlibrary to read and load app/vendor files, serve the required html file etc. Thefastbootmicro library has highly dependent on the output format of the package.json. If there is a change in the format of package.json,fastbootlibrary needs to be compatible with it. In order to introduce the compatibility, the package.json will contain aschemaVersionfield. This field will be updated everytime there is an incompatible change fromember-cli-fastboot. If apps, are usingfastbootversion in production that is incompatible withember-cli-fastboot, we will be throwing an error when the fastboot server comes up. This will allow people to be aware of the incompatible change and upgrade their versions for smooth running.Description of changes
The changes in this PR add a field called
schemaVersionunder thefastbootnamespace. The version starting in here is1and will need to be bumped everytime an incompatible change in package.json is introduced. An example of such a change is #325 .fastbootlibrary changes are hereFuture
Everytime the schema version is updated in
ember-cli-fastboot, it will also need to be updated in thefastbootlibrary. See this PR for the change: ember-fastboot/fastboot#114cc: @rwjblue @tomdale