Skip to content

Introduce schema version in FastBoot package.json#337

Merged
rwjblue merged 1 commit intoember-fastboot:masterfrom
kratiahuja:manifest-version
Feb 2, 2017
Merged

Introduce schema version in FastBoot package.json#337
rwjblue merged 1 commit intoember-fastboot:masterfrom
kratiahuja:manifest-version

Conversation

@kratiahuja
Copy link
Copy Markdown
Contributor

@kratiahuja kratiahuja commented Jan 15, 2017

Motivation

ember-cli-fastboot publishes a package.json in the dist directory of any ember app that is used by the fastboot library to read and load app/vendor files, serve the required html file etc. The fastboot micro library has highly dependent on the output format of the package.json. If there is a change in the format of package.json, fastboot library needs to be compatible with it. In order to introduce the compatibility, the package.json will contain a schemaVersion field. This field will be updated everytime there is an incompatible change from ember-cli-fastboot. If apps, are using fastboot version in production that is incompatible with ember-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 schemaVersion under the fastboot namespace. The version starting in here is 1 and will need to be bumped everytime an incompatible change in package.json is introduced. An example of such a change is #325 .

fastboot library changes are here

Future

Everytime the schema version is updated in ember-cli-fastboot, it will also need to be updated in the fastboot library. See this PR for the change: ember-fastboot/fastboot#114

cc: @rwjblue @tomdale

@kratiahuja
Copy link
Copy Markdown
Contributor Author

@rwjblue @tomdale : I took the liberty to drop Node 5 and add Node stable in the travis build matrix.

Comment thread lib/broccoli/fastboot-config.js Outdated
var path = require('path');
var Plugin = require('broccoli-plugin');

var LATEST_SCHEMA_VERSION = '1';
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Per comments in the other PR, this should be an integer instead of a string.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated to use an integer.

@tomdale
Copy link
Copy Markdown
Contributor

tomdale commented Jan 27, 2017

Other than the one comment I left in review, this looks good.

THis is to maintain compatibility between ember-cli-fastboot and fastboot.
@rwjblue rwjblue merged commit 3b1c7d2 into ember-fastboot:master Feb 2, 2017
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.

3 participants