Skip to content

Commit ed0a48e

Browse files
committed
Release. Bump version number
1 parent 002a762 commit ed0a48e

File tree

5 files changed

+94
-7
lines changed

5 files changed

+94
-7
lines changed

docs/_coverpage.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Barchart Market Data SDK <small>JavaScript 5.24.0</small>
1+
# Barchart Market Data SDK <small>JavaScript 5.25.0</small>
22

33
> Inject real-time market data into your JavaScript applications
44

example/browser/example.js

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6047,7 +6047,7 @@ module.exports = (() => {
60476047
'use strict';
60486048

60496049
return {
6050-
version: '5.24.0'
6050+
version: '5.25.0'
60516051
};
60526052
})();
60536053

@@ -6227,7 +6227,7 @@ module.exports = (() => {
62276227

62286228

62296229
static parse(code) {
6230-
return Enum.fromCode(UnitCode, code);
6230+
return Enum.fromCode(AssetClass, code);
62316231
}
62326232
/**
62336233
* Converts the numeric identifier into an enumeration item.
@@ -6302,6 +6302,18 @@ module.exports = (() => {
63026302
static get FOREX() {
63036303
return FOREX;
63046304
}
6305+
/**
6306+
* A cmdtyStats instrument.
6307+
*
6308+
* @public
6309+
* @static
6310+
* @returns {AssetClass}
6311+
*/
6312+
6313+
6314+
static get CMDTY_STATS() {
6315+
return CMDTY_STATS;
6316+
}
63056317

63066318
toString() {
63076319
return `[AssetClass (id=${this.id}, code=${this.code})]`;
@@ -6314,6 +6326,7 @@ module.exports = (() => {
63146326
const FUTURE = new AssetClass('FUT', 'Future', 2);
63156327
const FUTURE_OPTION = new AssetClass('FUTOPT', 'Future Option', 12);
63166328
const FOREX = new AssetClass('FOREX', 'FOREX', 10);
6329+
const CMDTY_STATS = new AssetClass('CMDTY', 'cmdtyStats', 24);
63176330
return AssetClass;
63186331
})();
63196332

@@ -6894,7 +6907,7 @@ module.exports = (() => {
68946907
let t;
68956908
let utc;
68966909

6897-
if (quote.timeUtc !== null && (is.string(timezone) || quote.profile && quote.profile.exchangeRef && quote.profile.exchangeRef && quote.profile.exchangeRef.timezoneExchange)) {
6910+
if (quote.timeUtc && (is.string(timezone) || quote.profile && quote.profile.exchangeRef && quote.profile.exchangeRef && quote.profile.exchangeRef.timezoneExchange)) {
68986911
utc = true;
68996912
let tz;
69006913

@@ -8512,6 +8525,19 @@ module.exports = (() => {
85128525

85138526
return definition;
85148527
});
8528+
parsers.push(symbol => {
8529+
let definition = null;
8530+
const match = symbol.match(types.cmdty.stats);
8531+
8532+
if (match !== null) {
8533+
definition = {};
8534+
definition.symbol = symbol;
8535+
definition.type = 'cmdtyStats';
8536+
definition.asset = AssetClass.CMDTY_STATS;
8537+
}
8538+
8539+
return definition;
8540+
});
85158541
const converters = [];
85168542
converters.push(symbol => {
85178543
let converted = null;

lib/meta.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ module.exports = (() => {
22
'use strict';
33

44
return {
5-
version: '5.24.0'
5+
version: '5.25.0'
66
};
77
})();

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@barchart/marketdata-api-js",
3-
"version": "5.24.0",
3+
"version": "5.25.0",
44
"description": "SDK for streaming market data from Barchart.com",
55
"author": {
66
"name": "Eero Pikat",

test/dist/barchart-marketdata-api-tests-5.js

Lines changed: 62 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1073,7 +1073,7 @@ module.exports = (() => {
10731073

10741074

10751075
static parse(code) {
1076-
return Enum.fromCode(UnitCode, code);
1076+
return Enum.fromCode(AssetClass, code);
10771077
}
10781078
/**
10791079
* Converts the numeric identifier into an enumeration item.
@@ -1148,6 +1148,18 @@ module.exports = (() => {
11481148
static get FOREX() {
11491149
return FOREX;
11501150
}
1151+
/**
1152+
* A cmdtyStats instrument.
1153+
*
1154+
* @public
1155+
* @static
1156+
* @returns {AssetClass}
1157+
*/
1158+
1159+
1160+
static get CMDTY_STATS() {
1161+
return CMDTY_STATS;
1162+
}
11511163

11521164
toString() {
11531165
return `[AssetClass (id=${this.id}, code=${this.code})]`;
@@ -1160,6 +1172,7 @@ module.exports = (() => {
11601172
const FUTURE = new AssetClass('FUT', 'Future', 2);
11611173
const FUTURE_OPTION = new AssetClass('FUTOPT', 'Future Option', 12);
11621174
const FOREX = new AssetClass('FOREX', 'FOREX', 10);
1175+
const CMDTY_STATS = new AssetClass('CMDTY', 'cmdtyStats', 24);
11631176
return AssetClass;
11641177
})();
11651178

@@ -3549,6 +3562,19 @@ module.exports = (() => {
35493562

35503563
return definition;
35513564
});
3565+
parsers.push(symbol => {
3566+
let definition = null;
3567+
const match = symbol.match(types.cmdty.stats);
3568+
3569+
if (match !== null) {
3570+
definition = {};
3571+
definition.symbol = symbol;
3572+
definition.type = 'cmdtyStats';
3573+
definition.asset = AssetClass.CMDTY_STATS;
3574+
}
3575+
3576+
return definition;
3577+
});
35523578
const converters = [];
35533579
converters.push(symbol => {
35543580
let converted = null;
@@ -16214,6 +16240,41 @@ describe('When parsing asset class codes', () => {
1621416240
it('"STK" should parse as "AssetClass.STOCK"', () => {
1621516241
expect(AssetClass.parse('STK')).toEqual(AssetClass.STOCK);
1621616242
});
16243+
it('"STKOPT" should parse as "AssetClass.STOCK_OPTION"', () => {
16244+
expect(AssetClass.parse('STKOPT')).toEqual(AssetClass.STOCK_OPTION);
16245+
});
16246+
it('"FUT" should parse as "AssetClass.FUTURE"', () => {
16247+
expect(AssetClass.parse('FUT')).toEqual(AssetClass.FUTURE);
16248+
});
16249+
it('"FUTOPT" should parse as "AssetClass.FUTURE_OPTION"', () => {
16250+
expect(AssetClass.parse('FUTOPT')).toEqual(AssetClass.FUTURE_OPTION);
16251+
});
16252+
it('"FOREX" should parse as "AssetClass.FOREX"', () => {
16253+
expect(AssetClass.parse('FOREX')).toEqual(AssetClass.FOREX);
16254+
});
16255+
it('"CMDTY" should parse as "AssetClass.CMDTY_STATS"', () => {
16256+
expect(AssetClass.parse('CMDTY')).toEqual(AssetClass.CMDTY_STATS);
16257+
});
16258+
});
16259+
describe('When retrieving identifier from asset classes', () => {
16260+
it('AssetClass.STOCK.id should return 1', () => {
16261+
expect(AssetClass.STOCK.id).toEqual(1);
16262+
});
16263+
it('AssetClass.STOCK_OPTION.id should return 34', () => {
16264+
expect(AssetClass.STOCK_OPTION.id).toEqual(34);
16265+
});
16266+
it('AssetClass.FUTURE.id should return 2', () => {
16267+
expect(AssetClass.FUTURE.id).toEqual(2);
16268+
});
16269+
it('AssetClass.FUTURE_OPTION.id should return 12', () => {
16270+
expect(AssetClass.FUTURE_OPTION.id).toEqual(12);
16271+
});
16272+
it('AssetClass.FOREX.id should return 10', () => {
16273+
expect(AssetClass.FOREX.id).toEqual(10);
16274+
});
16275+
it('AssetClass.CMDTY_STATS.id should return 24', () => {
16276+
expect(AssetClass.CMDTY_STATS.id).toEqual(24);
16277+
});
1621716278
});
1621816279

1621916280
},{"../../../../lib/utilities/data/AssetClass":13}],57:[function(require,module,exports){

0 commit comments

Comments
 (0)