Release v21.064 (from f0bc1e45)

Fixes tradingview/charting_library#6237
Fixes tradingview/charting_library#6543
This commit is contained in:
jenkins@nwork.local
2022-03-17 12:24:26 +00:00
parent 3ba86a7da7
commit 243978127e
583 changed files with 1816 additions and 1856 deletions

File diff suppressed because one or more lines are too long

View File

@@ -148,6 +148,8 @@ export class SymbolsStorage {
pricescale: extractField(data, 'pricescale', symbolIndex),
type: extractField(data, 'type', symbolIndex),
session: extractField(data, 'session-regular', symbolIndex),
session_holidays: extractField(data, 'session-holidays', symbolIndex),
corrections: extractField(data, 'corrections', symbolIndex),
timezone: extractField(data, 'timezone', symbolIndex),
supported_resolutions: definedValueOrDefault(extractField(data, 'supported-resolutions', symbolIndex, true), this._datafeedSupportedResolutions),
has_daily: definedValueOrDefault(extractField(data, 'has-daily', symbolIndex), true),

View File

@@ -1,13 +1,13 @@
{
"private": true,
"dependencies": {
"tslib": "2.1.0"
"tslib": "2.3.0"
},
"devDependencies": {
"@rollup/plugin-node-resolve": "~9.0.0",
"rollup": "~2.28.2",
"rollup-plugin-terser": "~7.0.2",
"typescript": "4.2.3"
"typescript": "4.3.5"
},
"scripts": {
"compile": "tsc",

View File

@@ -17,8 +17,7 @@ export default [
plugins: [
nodeResolve(),
!isDevelopmentEnv && terser({
ecma: 2017,
safari10: true,
ecma: 2018,
output: { inline_script: true },
}),
],

View File

@@ -24,6 +24,8 @@ interface ExchangeDataResponseSymbolData {
'exchange-traded': string;
'session-regular': string;
'corrections'?: string;
'session-holidays'?: string;
'fractional': boolean;
@@ -262,6 +264,8 @@ export class SymbolsStorage {
pricescale: extractField(data, 'pricescale', symbolIndex),
type: extractField(data, 'type', symbolIndex),
session: extractField(data, 'session-regular', symbolIndex),
session_holidays: extractField(data, 'session-holidays', symbolIndex),
corrections: extractField(data, 'corrections', symbolIndex),
timezone: extractField(data, 'timezone', symbolIndex),
supported_resolutions: definedValueOrDefault(extractField(data, 'supported-resolutions', symbolIndex, true), this._datafeedSupportedResolutions),
has_daily: definedValueOrDefault(extractField(data, 'has-daily', symbolIndex), true),

View File

@@ -70,7 +70,7 @@ type UdfDatafeedTimescaleMark = UdfDatafeedMarkType<TimescaleMark>;
function extractField<Field extends keyof Mark>(data: UdfDatafeedMark, field: Field, arrayIndex: number): Mark[Field];
function extractField<Field extends keyof TimescaleMark>(data: UdfDatafeedTimescaleMark, field: Field, arrayIndex: number): TimescaleMark[Field];
function extractField<Field extends keyof(TimescaleMark | Mark)>(data: UdfDatafeedMark | UdfDatafeedTimescaleMark, field: Field, arrayIndex: number): (TimescaleMark | Mark)[Field] {
function extractField<T, TField extends keyof T>(data: T, field: TField, arrayIndex: number): T[TField] {
const value = data[field];
return Array.isArray(value) ? value[arrayIndex] : value;
}

View File

@@ -4,7 +4,7 @@
"importHelpers": true,
"lib": [
"dom",
"es2017"
"es2018"
],
"module": "es6",
"moduleResolution": "node",
@@ -16,7 +16,7 @@
"rootDir": "src",
"sourceMap": false,
"strict": true,
"target": "es2017",
"target": "es2018",
"types": []
},
"include": [