Skip to content

Commit

Permalink
Merge pull request #36 from Moesif/handle-when-json-can-not-be-imported
Browse files Browse the repository at this point in the history
handle when json files import not supported by bundler
  • Loading branch information
xinghengwang authored Aug 5, 2024
2 parents 1caf274 + 3e04203 commit fea2c4b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions lib/configuration.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,18 @@
*
*
*/
pjson = require('../package.json');
var pjson = require('../package.json');

// some bundlers prevents import of json files
var version = pjson ? pjson.version : '2.1.6';

var configuration = {
//The base Uri for API calls
BaseUri : "https://api.moesif.net",

//Your Application Id for authentication/authorization
ApplicationId : "SET_ME",
UserAgent : 'moesifapi-nodejs/' + pjson.version
UserAgent : 'moesifapi-nodejs/' + version

};

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "moesifapi",
"version": "2.1.5",
"version": "2.1.6",
"description": "Collection/Data Ingestion API for Moesif",
"main": "./lib/index.js",
"keywords": [
Expand Down

0 comments on commit fea2c4b

Please sign in to comment.