Skip to content

Conversation

@pmcnr-hx
Copy link
Contributor

@pmcnr-hx pmcnr-hx commented May 28, 2016

Export module version so data store modules can check for the minimum required server version.

Also take the opportunity to update to latest dependencies.

Export module version so data store modules can check for the minimum
required server version.
@pmcnr-hx pmcnr-hx force-pushed the export-module-version branch from 488c9fa to ca38098 Compare May 28, 2016 17:58
/* @flow weak */
"use strict";
var jsonApi = module.exports = { };
jsonApi._version = require(require("path").join(__dirname, "../package.json")).version;

Choose a reason for hiding this comment

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

process.env.npm_package_version is a nicer way to get this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It would definitely be nicer, but unfortunately I need this the be the required package version when I require it in the data stores. 😞 process.env.npm_package_version would give me the main package's version.

@pmcnr-hx pmcnr-hx added the In-PR label May 28, 2016
@theninj4
Copy link
Contributor

👍 Nice one!

@connormeredith
Copy link

👍

@reecemillsom
Copy link

taking 3️⃣

@reecemillsom
Copy link

looks good 👍

@pmcnr-hx pmcnr-hx force-pushed the export-module-version branch from 2ba05c6 to c135933 Compare May 31, 2016 08:52
@pmcnr-hx pmcnr-hx merged commit 5b0bb05 into master May 31, 2016
@pmcnr-hx pmcnr-hx deleted the export-module-version branch May 31, 2016 09:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants