Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add SDK version into volatile #232

Merged
merged 1 commit into from
Jun 20, 2017
Merged

Add SDK version into volatile #232

merged 1 commit into from
Jun 20, 2017

Conversation

samniisan
Copy link
Contributor

  • Adds the current version of the SDK into volatile for every Kuzzle query.
  • Modified webpack config to integrate the version at build time.

@codecov-io
Copy link

codecov-io commented Jun 16, 2017

Codecov Report

Merging #232 into 5.x will increase coverage by 0.28%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##              5.x     #232      +/-   ##
==========================================
+ Coverage   98.41%   98.69%   +0.28%     
==========================================
  Files          17       17              
  Lines        2142     2449     +307     
  Branches      609      725     +116     
==========================================
+ Hits         2108     2417     +309     
+ Misses         34       32       -2
Impacted Files Coverage Δ
src/Kuzzle.js 98.94% <100%> (+0.17%) ⬆️
src/Room.js 100% <0%> (ø) ⬆️
src/security/Security.js 97.78% <0%> (+0.04%) ⬆️
src/Collection.js 99.4% <0%> (+1.36%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5387731...9a1db7e. Read the comment docs.

src/Kuzzle.js Outdated
@@ -198,6 +198,10 @@ function Kuzzle (host, options, cb) {
value: undefined,
enumerable: true,
writable: true
},
sdkVersion: {
value: (typeof SDKVERSION === 'undefined') ? JSON.parse(require('fs').readFileSync('package.json', {encoding: 'utf-8'})).version : SDKVERSION,
Copy link
Contributor

Choose a reason for hiding this comment

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

You can require a JSON file directly:

value: (typeof SDKVERSION === 'undefined') ? require('../package.json').version : SDKVERSION

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@scottinet scottinet merged commit 9161bc9 into 5.x Jun 20, 2017
@scottinet scottinet deleted the 35-sdk-version branch June 20, 2017 13:14
@scottinet scottinet mentioned this pull request Jun 30, 2017
@stafyniaksacha stafyniaksacha mentioned this pull request Jul 19, 2017
@scottinet scottinet mentioned this pull request Aug 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants