Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .babelrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"plugins": [ "add-module-exports" ],
"plugins": [ "add-module-exports", "version-inline" ],
"presets": [ "es2015" ]
}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
"babel-cli": "^6.18.0",
"babel-core": "^6.21.0",
"babel-plugin-add-module-exports": "^0.2.1",
"babel-plugin-version-inline": "^1.0.0",
"babel-preset-es2015": "^6.18.0",
"eslint-if-supported": "^1.0.1",
"istanbul": "^1.1.0-alpha.1",
Expand Down
4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* global __VERSION__ */
import Proto from 'uberproto';

import Application from './application';
Expand All @@ -13,5 +14,4 @@ export default function createApplication () {
return app;
}

// TODO use https://github.com/gnandretta/babel-plugin-version-inline
createApplication.version = '__VERSION__';
createApplication.version = __VERSION__;
6 changes: 6 additions & 0 deletions test/application.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ describe('Feathers application', () => {
assert.equal(typeof app.services, 'object');
});

it('sets the version', () => {
const pkg = require('../package.json');

assert.equal(feathers.version, pkg.version);
});

it('is an event emitter', done => {
const app = feathers();
const original = { hello: 'world' };
Expand Down
10 changes: 7 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -503,6 +503,10 @@ babel-plugin-transform-strict-mode@^6.24.1:
babel-runtime "^6.22.0"
babel-types "^6.24.1"

babel-plugin-version-inline@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/babel-plugin-version-inline/-/babel-plugin-version-inline-1.0.0.tgz#b99b6f925db4a4c6789eb08836e66d128dd5993f"

babel-polyfill@^6.23.0:
version "6.23.0"
resolved "https://registry.yarnpkg.com/babel-polyfill/-/babel-polyfill-6.23.0.tgz#8364ca62df8eafb830499f699177466c3b03499d"
Expand Down Expand Up @@ -1183,9 +1187,9 @@ fast-levenshtein@~2.0.4:
version "2.0.6"
resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917"

feathers-commons@^0.8.7:
version "0.8.7"
resolved "https://registry.yarnpkg.com/feathers-commons/-/feathers-commons-0.8.7.tgz#11c6f25b537745a983e8d61552d7db8932d53782"
feathers-commons@^1.0.0-pre.1:
version "1.0.0-pre.1"
resolved "https://registry.yarnpkg.com/feathers-commons/-/feathers-commons-1.0.0-pre.1.tgz#ee5c2a0e4f8b36f6f701b216c641cd90894d9f25"

figures@^1.3.5:
version "1.7.0"
Expand Down