Skip to content

Commit 35d447d

Browse files
authored
Increment schema version (#239)
Closes #235
1 parent 1840b9e commit 35d447d

File tree

2 files changed

+25
-2
lines changed

2 files changed

+25
-2
lines changed

fixtures/README.md

+12-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,18 @@
22

33
Note that this fixture format is not intended to be used directly, as it has no way of versioning and may change without notice.
44

5-
The [JS Schema](https://github.com/molnarg/js-schema) can be found in the [schema.js](schema.js) file. See there for the details of allowed properties or values. The purpose of this document is to give a high-level overview of the concepts used.
5+
The purpose of this document is to give a high-level overview of the concepts used. The schema provides all the details about the JSON structure.
6+
7+
## Schema
8+
9+
The [JS Schema](https://github.com/molnarg/js-schema) can be found in the [schema.js](schema.js) file. It is a declarative way to describe allowed properties and values. The [Fixture Validator](../tests/fixtures-valid.js) automatically checks the fixtures against this schema and does some more tests programatically.
10+
11+
The schema exports a property `VERSION`. Everytime the schema is updated, this version needs to be incremented using [semantic versioning](http://semver.org).
12+
13+
Given a version number MAJOR.MINOR.PATCH, increment the:
14+
1. MAJOR version when you make incompatible schema changes,
15+
2. MINOR version when you add functionality in a backwards-compatible manner, and
16+
3. PATCH version when you make backwards-compatible bug fixes.
617

718

819
## Goals

fixtures/schema.js

+13-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,18 @@
11
const schema = require('js-schema');
22

3-
module.exports.VERSION = '1.0.0';
3+
/**
4+
* Everytime we update the schema, this version needs to be incremented using semantic versionsing.
5+
*
6+
* Given a version number MAJOR.MINOR.PATCH, increment the:
7+
* 1. MAJOR version when you make incompatible schema changes,
8+
* 2. MINOR version when you add functionality in a backwards-compatible manner, and
9+
* 3. PATCH version when you make backwards-compatible bug fixes.
10+
*
11+
* See http://semver.org
12+
*
13+
* @type {string}
14+
*/
15+
module.exports.VERSION = '2.0.0';
416

517
/**
618
* see https://github.com/molnarg/js-schema

0 commit comments

Comments
 (0)