author
int64 658
755k
| date
stringlengths 19
19
| timezone
int64 -46,800
43.2k
| hash
stringlengths 40
40
| message
stringlengths 5
490
| mods
list | language
stringclasses 20
values | license
stringclasses 3
values | repo
stringlengths 5
68
| original_message
stringlengths 12
491
|
---|---|---|---|---|---|---|---|---|---|
305,159 | 10.03.2022 08:11:16 | -3,600 | 10fd4eb047289870c7cc79078d1fc504d8608603 | feat(core): add expiration time to writeFailed callback | [
{
"change_type": "MODIFY",
"old_path": "packages/core/src/impl/WriteApiImpl.ts",
"new_path": "packages/core/src/impl/WriteApiImpl.ts",
"diff": "@@ -173,7 +173,8 @@ export default class WriteApiImpl implements WriteApi {\nself,\nerror,\nlines,\n- failedAttempts\n+ failedAttempts,\n+ expires\n)\nif (onRetry) {\nonRetry.then(resolve, reject)\n"
},
{
"change_type": "MODIFY",
"old_path": "packages/core/src/options.ts",
"new_path": "packages/core/src/options.ts",
"diff": "@@ -74,6 +74,7 @@ export interface WriteRetryOptions extends RetryDelayStrategyOptions {\n* @param error - write error\n* @param lines - failed lines\n* @param attempts - a number of failed attempts to write the lines\n+ * @param expires - expiration time for the lines to be retried in millis since epoch\n* @returns a Promise to force the API to use it as a result of the flush operation,\n* void/undefined to continue with default retry mechanism\n*/\n@@ -81,7 +82,8 @@ export interface WriteRetryOptions extends RetryDelayStrategyOptions {\nthis: WriteApi,\nerror: Error,\nlines: Array<string>,\n- attempts: number\n+ attempts: number,\n+ expires: number\n): Promise<void> | void\n/**\n"
}
] | TypeScript | MIT License | influxdata/influxdb-client-js | feat(core): add expiration time to writeFailed callback |
305,159 | 10.03.2022 08:13:05 | -3,600 | 91993630dbb40111bcf199a5ba69595b2253a31f | fix(core): call the writeFailed fn also on exceeded max retry time | [
{
"change_type": "MODIFY",
"old_path": "packages/core/src/impl/WriteApiImpl.ts",
"new_path": "packages/core/src/impl/WriteApiImpl.ts",
"diff": "@@ -155,6 +155,16 @@ export default class WriteApiImpl implements WriteApi {\nif (!this.closed && lines.length > 0) {\nif (expires <= Date.now()) {\nconst error = new Error('Max retry time exceeded.')\n+ const onRetry = self.writeOptions.writeFailed.call(\n+ self,\n+ error,\n+ lines,\n+ failedAttempts,\n+ expires\n+ )\n+ if (onRetry) {\n+ return onRetry\n+ }\nLog.error(\n`Write to InfluxDB failed (attempt: ${failedAttempts}).`,\nerror\n"
}
] | TypeScript | MIT License | influxdata/influxdb-client-js | fix(core): call the writeFailed fn also on exceeded max retry time |
305,159 | 10.03.2022 08:43:40 | -3,600 | b363e03f7e0d7b59125bd4f5e63318b04a024321 | fix(core): test writeFailed called when retry expires | [
{
"change_type": "MODIFY",
"old_path": "packages/core/test/unit/WriteApi.test.ts",
"new_path": "packages/core/test/unit/WriteApi.test.ts",
"diff": "@@ -185,6 +185,38 @@ describe('WriteApi', () => {\nexpect(logs.error[0][1].toString()).contains('Max retry time exceeded')\n})\n})\n+ it('call writeFailed also on retry timeout', async () => {\n+ let writeFailedLastError: Error\n+ let writeFailedExpires = Number.MAX_SAFE_INTEGER\n+ const writeFailed = (\n+ error: Error,\n+ _lines: string[],\n+ attempts: number,\n+ expires: number\n+ ): void | Promise<void> => {\n+ writeFailedExpires = expires\n+ writeFailedLastError = error\n+ if (expires <= Date.now()) {\n+ return Promise.resolve() // do not log the the built-in error on timeout\n+ }\n+ }\n+\n+ useSubject({maxRetryTime: 5, batchSize: 1, writeFailed})\n+ subject.writeRecord('test value=1')\n+ // wait for first attempt to fail\n+ await waitForCondition(() => logs.warn.length > 0)\n+ // wait for retry attempt to fail on timeout\n+ await waitForCondition(() => logs.error.length > 0)\n+ await subject.close().then(() => {\n+ expect(logs.warn).to.length(1)\n+ expect(logs.warn[0][0]).contains(\n+ 'Write to InfluxDB failed (attempt: 1)'\n+ )\n+ expect(logs.error).to.length(0)\n+ expect(writeFailedExpires).not.greaterThan(Date.now())\n+ expect(String(writeFailedLastError)).contains('Max retry time exceeded')\n+ })\n+ })\nit('does not retry write when writeFailed handler returns a Promise', async () => {\nuseSubject({\nmaxRetries: 3,\n"
}
] | TypeScript | MIT License | influxdata/influxdb-client-js | fix(core): test writeFailed called when retry expires |
305,159 | 10.03.2022 09:24:51 | -3,600 | a806f3a9da917af213649f9d1e958b4fb20d343f | chore(core): simplify retryAttempt counting | [
{
"change_type": "MODIFY",
"old_path": "packages/core/src/impl/WriteApiImpl.ts",
"new_path": "packages/core/src/impl/WriteApiImpl.ts",
"diff": "@@ -116,7 +116,7 @@ export default class WriteApiImpl implements WriteApi {\n() =>\nthis.sendBatch(\nthis.writeBuffer.reset(),\n- this.writeOptions.maxRetries + 1\n+ this.writeOptions.maxRetries\n).catch(_e => {\n// an error is logged in case of failure, avoid UnhandledPromiseRejectionWarning\n}),\n@@ -131,7 +131,7 @@ export default class WriteApiImpl implements WriteApi {\nthis.writeOptions.maxBatchBytes,\nlines => {\nthis._clearFlushTimeout()\n- return this.sendBatch(lines, this.writeOptions.maxRetries + 1)\n+ return this.sendBatch(lines, this.writeOptions.maxRetries)\n},\nscheduleNextSend\n)\n@@ -146,12 +146,12 @@ export default class WriteApiImpl implements WriteApi {\nsendBatch(\nlines: string[],\n- attempts: number,\n+ retryAttempts: number,\nexpires: number = Date.now() + this.writeOptions.maxRetryTime\n): Promise<void> {\n// eslint-disable-next-line @typescript-eslint/no-this-alias\nconst self: WriteApiImpl = this\n- const failedAttempts = self.writeOptions.maxRetries + 2 - attempts\n+ const failedAttempts = self.writeOptions.maxRetries + 1 - retryAttempts\nif (!this.closed && lines.length > 0) {\nif (expires <= Date.now()) {\nconst error = new Error('Max retry time exceeded.')\n@@ -192,7 +192,7 @@ export default class WriteApiImpl implements WriteApi {\n}\nif (\n!self.closed &&\n- attempts > 1 &&\n+ retryAttempts > 0 &&\n(!(error instanceof HttpError) ||\n(error as HttpError).statusCode >= 429)\n) {\n@@ -202,7 +202,7 @@ export default class WriteApiImpl implements WriteApi {\n)\nself.retryBuffer.addLines(\nlines,\n- attempts - 1,\n+ retryAttempts - 1,\nself.retryStrategy.nextDelay(error, failedAttempts),\nexpires\n)\n"
}
] | TypeScript | MIT License | influxdata/influxdb-client-js | chore(core): simplify retryAttempt counting |
305,159 | 10.03.2022 09:49:30 | -3,600 | 34cd17e950f266a263a54ef9587dee2d021ccfac | chore(core): add test retry attempt counting | [
{
"change_type": "MODIFY",
"old_path": "packages/core/src/options.ts",
"new_path": "packages/core/src/options.ts",
"diff": "@@ -93,7 +93,7 @@ export interface WriteRetryOptions extends RetryDelayStrategyOptions {\n*/\nwriteSuccess(this: WriteApi, lines: Array<string>): void\n- /** max number of write attempts when the write fails */\n+ /** max number of retry attempts when the write fails */\nmaxRetries: number\n/** max time (millis) that can be spent with retries */\nmaxRetryTime: number\n"
},
{
"change_type": "MODIFY",
"old_path": "packages/core/test/unit/WriteApi.test.ts",
"new_path": "packages/core/test/unit/WriteApi.test.ts",
"diff": "@@ -262,6 +262,37 @@ describe('WriteApi', () => {\nexpect(writeOptions.writeFailed).to.not.throw()\nexpect(writeOptions.randomRetry).equals(true)\n})\n+ it('retries as specified by maxRetryCount', async () => {\n+ let writeFailedCount = 0\n+ const writeFailed = (): void => {\n+ writeFailedCount++\n+ }\n+ useSubject({\n+ maxRetryTime: 5000,\n+ retryJitter: 0,\n+ minRetryDelay: 1,\n+ maxRetryDelay: 1,\n+ maxRetries: 3,\n+ batchSize: 1,\n+ writeFailed,\n+ })\n+ subject.writeRecord('test value=1')\n+ // wait for first attempt to fail\n+ await waitForCondition(() => logs.warn.length == 3)\n+ // wait for retry attempt to fail\n+ await waitForCondition(() => logs.error.length == 1)\n+ await subject.close().then(() => {\n+ expect(writeFailedCount).equals(4)\n+ expect(logs.warn).to.length(3)\n+ for (let i = 0; i < 3; i++) {\n+ expect(logs.warn[i][0]).contains(\n+ `Write to InfluxDB failed (attempt: ${i + 1})`\n+ )\n+ }\n+ expect(logs.error).to.length(1)\n+ expect(logs.error[0][0]).contains('Write to InfluxDB failed')\n+ })\n+ })\n})\ndescribe('convert point time to line protocol', () => {\nconst writeAPI = createApi(ORG, BUCKET, 'ms', {\n"
}
] | TypeScript | MIT License | influxdata/influxdb-client-js | chore(core): add test retry attempt counting |
305,159 | 10.03.2022 10:24:11 | -3,600 | 2433c588945d0eabe90d81fc45c612ae3e3dae14 | chore(core): improve documentation of writeFailed fn | [
{
"change_type": "MODIFY",
"old_path": "packages/core/src/options.ts",
"new_path": "packages/core/src/options.ts",
"diff": "@@ -73,7 +73,7 @@ export interface WriteRetryOptions extends RetryDelayStrategyOptions {\n* @param this - the instance of the API that failed\n* @param error - write error\n* @param lines - failed lines\n- * @param attempts - a number of failed attempts to write the lines\n+ * @param attempt - count of already failed attempts to write the lines (1 ... maxRetries+1)\n* @param expires - expiration time for the lines to be retried in millis since epoch\n* @returns a Promise to force the API to use it as a result of the flush operation,\n* void/undefined to continue with default retry mechanism\n"
}
] | TypeScript | MIT License | influxdata/influxdb-client-js | chore(core): improve documentation of writeFailed fn |
305,159 | 10.03.2022 10:25:27 | -3,600 | c5a39c6302348b5949f56fef48d0e75dfc5c0488 | chore(core): add test that verifies count of retries | [
{
"change_type": "MODIFY",
"old_path": "packages/core/test/unit/WriteApi.test.ts",
"new_path": "packages/core/test/unit/WriteApi.test.ts",
"diff": "@@ -201,7 +201,14 @@ describe('WriteApi', () => {\n}\n}\n- useSubject({maxRetryTime: 5, batchSize: 1, writeFailed})\n+ useSubject({\n+ maxRetryTime: 5,\n+ retryJitter: 0,\n+ maxRetryDelay: 5,\n+ minRetryDelay: 5,\n+ batchSize: 1,\n+ writeFailed,\n+ })\nsubject.writeRecord('test value=1')\n// wait for first attempt to fail\nawait waitForCondition(() => logs.warn.length > 0)\n@@ -263,9 +270,13 @@ describe('WriteApi', () => {\nexpect(writeOptions.randomRetry).equals(true)\n})\nit('retries as specified by maxRetryCount', async () => {\n- let writeFailedCount = 0\n- const writeFailed = (): void => {\n- writeFailedCount++\n+ const attempts: number[] = []\n+ const writeFailed = (\n+ _error: Error,\n+ _lines: string[],\n+ attempt: number\n+ ): void => {\n+ attempts.push(attempt)\n}\nuseSubject({\nmaxRetryTime: 5000,\n@@ -282,7 +293,7 @@ describe('WriteApi', () => {\n// wait for retry attempt to fail\nawait waitForCondition(() => logs.error.length == 1)\nawait subject.close().then(() => {\n- expect(writeFailedCount).equals(4)\n+ expect(attempts).deep.equals([1, 2, 3, 4])\nexpect(logs.warn).to.length(3)\nfor (let i = 0; i < 3; i++) {\nexpect(logs.warn[i][0]).contains(\n"
}
] | TypeScript | MIT License | influxdata/influxdb-client-js | chore(core): add test that verifies count of retries |
305,159 | 10.03.2022 10:36:16 | -3,600 | 4c4a7ba64ed0f85d754efb52752f76ff7cbef701 | chore(core): improve docs of maxRetries option | [
{
"change_type": "MODIFY",
"old_path": "packages/core/src/options.ts",
"new_path": "packages/core/src/options.ts",
"diff": "@@ -93,7 +93,7 @@ export interface WriteRetryOptions extends RetryDelayStrategyOptions {\n*/\nwriteSuccess(this: WriteApi, lines: Array<string>): void\n- /** max number of retry attempts when the write fails */\n+ /** max count of retries after the first write fails */\nmaxRetries: number\n/** max time (millis) that can be spent with retries */\nmaxRetryTime: number\n"
}
] | TypeScript | MIT License | influxdata/influxdb-client-js | chore(core): improve docs of maxRetries option |
305,159 | 10.03.2022 10:39:21 | -3,600 | 0bcbd7423d3626029fbb5be84fc973fb2d80e8f8 | chore(core): better document attempts param of writeFailed fn | [
{
"change_type": "MODIFY",
"old_path": "packages/core/src/options.ts",
"new_path": "packages/core/src/options.ts",
"diff": "@@ -73,7 +73,7 @@ export interface WriteRetryOptions extends RetryDelayStrategyOptions {\n* @param this - the instance of the API that failed\n* @param error - write error\n* @param lines - failed lines\n- * @param attempt - count of already failed attempts to write the lines (1 ... maxRetries+1)\n+ * @param attempts - count of already failed attempts to write the lines (1 ... maxRetries+1)\n* @param expires - expiration time for the lines to be retried in millis since epoch\n* @returns a Promise to force the API to use it as a result of the flush operation,\n* void/undefined to continue with default retry mechanism\n"
}
] | TypeScript | MIT License | influxdata/influxdb-client-js | chore(core): better document attempts param of writeFailed fn |
305,159 | 10.03.2022 10:40:16 | -3,600 | 1c5dda958641407e308adace7d1683cc53f21fcf | chore(core): rename attempts to attempt | [
{
"change_type": "MODIFY",
"old_path": "packages/core/src/options.ts",
"new_path": "packages/core/src/options.ts",
"diff": "@@ -73,7 +73,7 @@ export interface WriteRetryOptions extends RetryDelayStrategyOptions {\n* @param this - the instance of the API that failed\n* @param error - write error\n* @param lines - failed lines\n- * @param attempts - count of already failed attempts to write the lines (1 ... maxRetries+1)\n+ * @param attempt - count of already failed attempts to write the lines (1 ... maxRetries+1)\n* @param expires - expiration time for the lines to be retried in millis since epoch\n* @returns a Promise to force the API to use it as a result of the flush operation,\n* void/undefined to continue with default retry mechanism\n@@ -82,7 +82,7 @@ export interface WriteRetryOptions extends RetryDelayStrategyOptions {\nthis: WriteApi,\nerror: Error,\nlines: Array<string>,\n- attempts: number,\n+ attempt: number,\nexpires: number\n): Promise<void> | void\n"
}
] | TypeScript | MIT License | influxdata/influxdb-client-js | chore(core): rename attempts to attempt |
305,170 | 06.04.2022 07:08:09 | 25,200 | 339b2ec5b49702702235936684e841b04b0bd872 | docs: update query example | [
{
"change_type": "MODIFY",
"old_path": "examples/query.ts",
"new_path": "examples/query.ts",
"diff": "@@ -17,7 +17,7 @@ console.log('*** QUERY ROWS ***')\n// Execute query and receive table metadata and rows as they arrive from the server.\n// https://docs.influxdata.com/influxdb/v2.1/reference/syntax/annotated-csv/\nqueryApi.queryRows(fluxQuery, {\n- next(row: string[], tableMeta: FluxTableMetaData) {\n+ next: (row: string[], tableMeta: FluxTableMetaData) => {\n// the following line creates an object for each row\nconst o = tableMeta.toObject(row)\n// console.log(JSON.stringify(o, null, 2))\n@@ -35,11 +35,11 @@ queryApi.queryRows(fluxQuery, {\n// `${p._time} ${p._measurement} in '${p.location}' (${p.example}): ${p._field}=${p._value}`\n// )\n},\n- error(error: Error) {\n+ error: (error: Error) => {\nconsole.error(error)\nconsole.log('\\nFinished ERROR')\n},\n- complete() {\n+ complete: () => {\nconsole.log('\\nFinished SUCCESS')\n},\n})\n@@ -74,14 +74,14 @@ queryApi.queryRows(fluxQuery, {\n// queryApi.queryLines(\n// fluxQuery,\n// {\n-// error(error: Error) {\n+// next: (line: string) => {\n+// console.log(line)\n+// },\n+// error: (error: Error) => {\n// console.error(error)\n// console.log('\\nFinished ERROR')\n// },\n-// next(line: string) {\n-// console.log(line)\n-// },\n-// complete() {\n+// complete: () => {\n// console.log('\\nFinished SUCCESS')\n// },\n// }\n"
}
] | TypeScript | MIT License | influxdata/influxdb-client-js | docs: update query example |
305,159 | 06.04.2022 17:03:44 | -7,200 | 1a90b4f9d344054c10195c1dc0307ef36328541e | chore(examples): use arrow function callbacks | [
{
"change_type": "MODIFY",
"old_path": "examples/influxdb-1.8.ts",
"new_path": "examples/influxdb-1.8.ts",
"diff": "@@ -33,7 +33,7 @@ const point = new Point('mem')\nwriteAPI.writePoint(point)\nwriteAPI\n.close()\n- .then(() => console.log('FINISHED'))\n+ .then(() => console.log('Write FINISHED'))\n.catch(error => {\nconsole.error(error)\n})\n@@ -43,14 +43,14 @@ console.log('*** QUERY ROWS ***')\nconst queryAPI = influxDB.getQueryApi('')\nconst query = `from(bucket: \"${bucket}\") |> range(start: -1h)`\nqueryAPI.queryRows(query, {\n- next(row, tableMeta) {\n+ next: (row, tableMeta) => {\nconst o = tableMeta.toObject(row)\nconsole.log(`${o._time} ${o._measurement} : ${o._field}=${o._value}`)\n},\n- error(error) {\n+ error: (error: Error) => {\nconsole.error(error)\n},\n- complete() {\n- console.log('\\nFinished')\n+ complete: () => {\n+ console.log('\\nQuery FINISHED')\n},\n})\n"
},
{
"change_type": "MODIFY",
"old_path": "examples/queryWithParams.ts",
"new_path": "examples/queryWithParams.ts",
"diff": "@@ -17,24 +17,24 @@ const measurement = 'temperature'\nconst fluxQuery = flux`from(bucket:\"my-bucket\")\n|> range(start: ${start})\n|> filter(fn: (r) => r._measurement == ${measurement})`\n-console.log('query:', fluxQuery)\n+console.log('query:', fluxQuery.toString())\nconsole.log('*** QUERY ROWS ***')\n// performs query and receive line table metadata and rows\n// https://v2.docs.influxdata.com/v2.0/reference/syntax/annotated-csv/\nqueryApi.queryRows(fluxQuery, {\n- next(row: string[], tableMeta: FluxTableMetaData) {\n+ next: (row: string[], tableMeta: FluxTableMetaData) => {\nconst o = tableMeta.toObject(row)\n// console.log(JSON.stringify(o, null, 2))\nconsole.log(\n`${o._time} ${o._measurement} in '${o.location}' (${o.example}): ${o._field}=${o._value}`\n)\n},\n- error(error: Error) {\n+ error: (error: Error) => {\nconsole.error(error)\nconsole.log('\\nFinished ERROR')\n},\n- complete() {\n+ complete: () => {\nconsole.log('\\nFinished SUCCESS')\n},\n})\n"
}
] | TypeScript | MIT License | influxdata/influxdb-client-js | chore(examples): use arrow function callbacks |
305,159 | 06.04.2022 17:18:34 | -7,200 | 7ba7dea637e7e2408034536d9907d700ba60b3fc | chore: preventAssignment in rollup replace | [
{
"change_type": "MODIFY",
"old_path": "packages/core/rollup.config.js",
"new_path": "packages/core/rollup.config.js",
"diff": "@@ -19,10 +19,12 @@ function createConfig({browser, format, out, name, target, noTerser}) {\n'./impl/node/NodeHttpTransport': './impl/browser/FetchTransport',\n'process.env.ROLLUP_BROWSER': 'true',\ndelimiters: ['', ''],\n+ preventAssignment: true,\n}\n: {\n'process.env.ROLLUP_BROWSER': 'false',\ndelimiters: ['', ''],\n+ preventAssignment: true,\n}\n),\ntypescript({\n"
}
] | TypeScript | MIT License | influxdata/influxdb-client-js | chore: preventAssignment in rollup replace |
305,159 | 06.04.2022 17:48:27 | -7,200 | 7434323bde80c57888d0d4beec36c86c100eb9e3 | feat(giraffe): add resultColumnNames to FromFluxResult | [
{
"change_type": "MODIFY",
"old_path": "packages/giraffe/src/csvToTable.ts",
"new_path": "packages/giraffe/src/csvToTable.ts",
"diff": "@@ -41,10 +41,11 @@ function createResult(\ntableLength: number,\ncolumns: Record<string, Column>,\ntableFactory: GiraffeTableFactory,\n- computeFluxGroupKeyUnion = false\n+ {computeFluxGroupKeyUnion, computeResultColumnNames}: TableOptions\n): FromFluxResult {\nlet table = tableFactory(tableLength)\nconst fluxGroupKeyUnion: string[] = []\n+ const resultColumnNames = new Set<string>()\nObject.keys(columns).forEach(key => {\nconst col = columns[key]\nif (!col.multipleTypes) {\n@@ -59,12 +60,16 @@ function createResult(\nif (computeFluxGroupKeyUnion && col.group) {\nfluxGroupKeyUnion.push(key)\n}\n+ if (computeResultColumnNames && col.name === 'result') {\n+ col.data.forEach(x => resultColumnNames.add(x as string))\n+ }\n}\n})\nreturn {\ntable,\nfluxGroupKeyUnion,\n+ resultColumnNames: Array.from(resultColumnNames),\n}\n}\n@@ -97,6 +102,9 @@ export interface TableOptions {\n/** compute also fluxGroupKeyUnion */\ncomputeFluxGroupKeyUnion?: boolean\n+\n+ /** compute also resultColumnNames */\n+ computeResultColumnNames?: boolean\n}\n/**\n@@ -300,27 +308,13 @@ export function createCollector(\ntableSize++\n},\ncomplete(): void {\n- resolve(\n- createResult(\n- tableSize,\n- columns,\n- tableFactory,\n- tableOptions.computeFluxGroupKeyUnion\n- )\n- )\n+ resolve(createResult(tableSize, columns, tableFactory, tableOptions))\n},\nerror(e: Error): void {\nif (e.name === 'AbortError') {\n// eslint-disable-next-line no-console\nconsole.log('queryTable: request aborted:', e)\n- resolve(\n- createResult(\n- tableSize,\n- columns,\n- tableFactory,\n- tableOptions.computeFluxGroupKeyUnion\n- )\n- )\n+ resolve(createResult(tableSize, columns, tableFactory, tableOptions))\n}\nreject(e)\n},\n@@ -350,7 +344,11 @@ export function csvToFromFluxResult(\n/* istanbul ignore next because error is never thrown */\ne => (error = e),\ntableFactory,\n- {computeFluxGroupKeyUnion: true, ...tableOptions}\n+ {\n+ computeFluxGroupKeyUnion: true,\n+ computeResultColumnNames: true,\n+ ...tableOptions,\n+ }\n)\nstringToLines(csv, linesToTables(collector))\n/* istanbul ignore if error is never thrown */\n"
},
{
"change_type": "MODIFY",
"old_path": "packages/giraffe/test/unit/csvToTable.test.ts",
"new_path": "packages/giraffe/test/unit/csvToTable.test.ts",
"diff": "@@ -269,19 +269,35 @@ there\",5\ndescribe('csvToFromFluxResult', () => {\nit('returns a group key union', () => {\n- const CSV = `#group,true,false,false,true\n-#datatype,string,string,string,string\n+ const CSV = `#group,false,true,false,false,true\n+#datatype,string,string,string,string,string\n+#default,_result,,,,\n+,result,a,b,c,d\n+,,1,2,3,4\n+\n+#group,false,false,false,true,false\n+#datatype,string,string,string,string,string\n#default,,,,\n-,a,b,c,d\n-,1,2,3,4\n-\n-#group,false,false,true,false\n-#datatype,string,string,string,string\n-#default,,,,\n-,a,b,c,d\n-,1,2,3,4`\n+,result,a,b,c,d\n+,r2,1,2,3,4`\nconst {fluxGroupKeyUnion} = csvToFromFluxResult(CSV, newTable)\nexpect(fluxGroupKeyUnion).deep.equals(['a', 'c', 'd'])\n})\n+ it('returns resultColumnNames', () => {\n+ const CSV = `#group,false,true,false,false,true\n+#datatype,string,string,string,string,string\n+#default,_result,,,,\n+,result,a,b,c,d\n+,,1,2,3,4\n+\n+#group,false,false,false,true,false\n+#datatype,string,string,string,string,string\n+#default,,,,\n+,result,a,b,c,d\n+,r2,1,2,3,4`\n+\n+ const {resultColumnNames} = csvToFromFluxResult(CSV, newTable)\n+ expect(resultColumnNames).deep.equals(['_result', 'r2'])\n+ })\n})\n"
}
] | TypeScript | MIT License | influxdata/influxdb-client-js | feat(giraffe): add resultColumnNames to FromFluxResult |
305,159 | 09.04.2022 08:37:32 | -7,200 | a6f6b0788b071659ebb05fa58c0dec3e3e6dfddd | chore(core): improve flux function tests | [
{
"change_type": "MODIFY",
"old_path": "packages/core/test/unit/query/flux.test.ts",
"new_path": "packages/core/test/unit/query/flux.test.ts",
"diff": "@@ -187,4 +187,79 @@ describe('Flux Tagged Template', () => {\n'from(bucket:\"my-bucket\")'\n)\n})\n+ it('interpolates parameter with escaping', () => {\n+ const pairs: Array<{value: any; flux: string}> = [\n+ {value: flux`${null}`, flux: 'null'},\n+ {value: flux`${false}`, flux: 'false'},\n+ {value: flux`${1}`, flux: '1'},\n+ {value: flux`${1.1}`, flux: '1.1'},\n+ {value: flux`${-1.1}`, flux: '-1.1'},\n+ {value: flux`${'a'}`, flux: '\"a\"'},\n+ {\n+ value: flux`${new Date(1589521447471)}`,\n+ flux: '2020-05-15T05:44:07.471Z',\n+ },\n+ {value: flux`${/abc/}`, flux: 'regexp.compile(v: \"/abc/\")'},\n+ {\n+ value: flux`${{\n+ toString: function(): string {\n+ return 'whatever'\n+ },\n+ }}`,\n+ flux: '\"whatever\"',\n+ },\n+ {value: flux`${fluxExpression('1ms')}`, flux: '1ms'},\n+ {value: flux`${'abc\\n\\r\\t\\\\\"def'}`, flux: '\"abc\\\\n\\\\r\\\\t\\\\\\\\\\\\\"def\"'},\n+ {value: flux`${'abc${val}def'}`, flux: '\"abc\\\\${val}def\"'},\n+ {value: flux`${'abc$'}`, flux: '\"abc$\"'},\n+ {value: flux`${'a\"$d'}`, flux: '\"a\\\\\"$d\"'},\n+ {value: flux`${[]}`, flux: '[]'},\n+ {value: flux`${['a\"$d']}`, flux: '[\"a\\\\\"$d\"]'},\n+ {\n+ value: flux`${Symbol('thisSym')}`,\n+ flux: `\"${Symbol('thisSym').toString()}\"`,\n+ },\n+ ]\n+ pairs.forEach(pair => {\n+ expect(pair.value.toString()).equals(pair.flux)\n+ })\n+ })\n+ it('interpolates double quoted parameter with escaping', () => {\n+ const pairs: Array<{value: any; flux: string}> = [\n+ {value: flux`\"${null}\"`, flux: '\"\"'},\n+ {value: flux`\"${undefined}\"`, flux: '\"\"'},\n+ {value: flux`\"${false}\"`, flux: '\"false\"'},\n+ {value: flux`\"${1}\"`, flux: '\"1\"'},\n+ {value: flux`\"${1.1}\"`, flux: '\"1.1\"'},\n+ {value: flux`\"${-1.1}\"`, flux: '\"-1.1\"'},\n+ {value: flux`\"${'a'}\"`, flux: '\"a\"'},\n+ {\n+ value: flux`\"${new Date(1589521447471)}\"`,\n+ flux: `\"${new Date(1589521447471)}\"`,\n+ },\n+ {value: flux`\"${/abc/}\"`, flux: `\"${/abc/.toString()}\"`},\n+ {\n+ value: flux`\"${{\n+ toString: function(): string {\n+ return 'whatever'\n+ },\n+ }}\"`,\n+ flux: '\"whatever\"',\n+ },\n+ {value: flux`\"${fluxExpression('1ms')}\"`, flux: '\"1ms\"'},\n+ {value: flux`\"${'abc\\n\\r\\t\\\\\"def'}\"`, flux: '\"abc\\\\n\\\\r\\\\t\\\\\\\\\\\\\"def\"'},\n+ {value: flux`\"${'abc${val}def'}\"`, flux: '\"abc\\\\${val}def\"'},\n+ {value: flux`\"${'abc$'}\"`, flux: '\"abc$\"'},\n+ {value: flux`\"${'a\"$d'}\"`, flux: '\"a\\\\\"$d\"'},\n+ {value: flux`\"${[]}\"`, flux: `\"\"`},\n+ {value: flux`\"${['a\"$d']}\"`, flux: `\"a\\\\\"$d\"`},\n+ {\n+ value: flux`\"${Symbol('thisSym')}\"`,\n+ flux: `\"${Symbol('thisSym').toString()}\"`,\n+ },\n+ ]\n+ pairs.forEach(pair => {\n+ expect(pair.value.toString()).equals(pair.flux)\n+ })\n+ })\n})\n"
}
] | TypeScript | MIT License | influxdata/influxdb-client-js | chore(core): improve flux function tests |
305,159 | 12.04.2022 10:57:07 | -7,200 | c693c33eda553f8258956dd8187c44f933d3462f | feat(core): allow to specify write consistency | [
{
"change_type": "MODIFY",
"old_path": "packages/core/src/impl/WriteApiImpl.ts",
"new_path": "packages/core/src/impl/WriteApiImpl.ts",
"diff": "@@ -89,6 +89,11 @@ export default class WriteApiImpl implements WriteApi {\nthis.httpPath = `/api/v2/write?org=${encodeURIComponent(\norg\n)}&bucket=${encodeURIComponent(bucket)}&precision=${precision}`\n+ if (writeOptions?.consistency) {\n+ this.httpPath += `&consistency=${encodeURIComponent(\n+ writeOptions.consistency\n+ )}`\n+ }\nthis.writeOptions = {\n...DEFAULT_WriteOptions,\n...writeOptions,\n"
},
{
"change_type": "MODIFY",
"old_path": "packages/core/src/options.ts",
"new_path": "packages/core/src/options.ts",
"diff": "@@ -117,6 +117,8 @@ export interface WriteOptions extends WriteRetryOptions {\ngzipThreshold?: number\n/** max size of a batch in bytes */\nmaxBatchBytes: number\n+ /** InfluxDB Enterprise write consistency as explained in https://docs.influxdata.com/enterprise_influxdb/v1.9/concepts/clustering/#write-consistency */\n+ consistency?: 'any' | 'one' | 'quorum' | 'all'\n}\n/** default RetryDelayStrategyOptions */\n"
},
{
"change_type": "MODIFY",
"old_path": "packages/core/test/unit/WriteApi.test.ts",
"new_path": "packages/core/test/unit/WriteApi.test.ts",
"diff": "@@ -648,5 +648,23 @@ describe('WriteApi', () => {\nexpect(logs.warn).deep.equals([])\nexpect(authorization).equals(`Token customToken`)\n})\n+ it('sends consistency param when specified', async () => {\n+ useSubject({\n+ consistency: 'quorum',\n+ })\n+ let uri: any\n+ nock(clientOptions.url)\n+ .post(/.*/)\n+ .reply(function(_uri, _requestBody) {\n+ uri = this.req.path\n+ return [204, '', {}]\n+ })\n+ .persist()\n+ subject.writePoint(new Point('test').floatField('value', 1))\n+ await subject.close()\n+ expect(logs.error).has.length(0)\n+ expect(logs.warn).deep.equals([])\n+ expect(uri).match(/.*&consistency=quorum$/)\n+ })\n})\n})\n"
}
] | TypeScript | MIT License | influxdata/influxdb-client-js | feat(core): allow to specify write consistency |
305,159 | 19.04.2022 09:41:34 | -7,200 | 38d81bedf4c840617efb4aeca6c7f31744f3f451 | chore: use 2.x version in descriptions | [
{
"change_type": "MODIFY",
"old_path": "package.json",
"new_path": "package.json",
"diff": "{\n\"private\": true,\n\"name\": \"@influxdata/influx\",\n- \"description\": \"InfluxDB 2.1 client\",\n+ \"description\": \"InfluxDB 2.x client\",\n\"workspaces\": {\n\"packages\": [\n\"packages/core\",\n"
},
{
"change_type": "MODIFY",
"old_path": "packages/apis/package.json",
"new_path": "packages/apis/package.json",
"diff": "{\n\"name\": \"@influxdata/influxdb-client-apis\",\n\"version\": \"1.25.0\",\n- \"description\": \"InfluxDB 2.1 generated APIs\",\n+ \"description\": \"InfluxDB 2.x generated APIs\",\n\"scripts\": {\n\"apidoc:extract\": \"api-extractor run\",\n\"build\": \"yarn run clean && yarn run lint && rollup -c\",\n"
},
{
"change_type": "MODIFY",
"old_path": "packages/core-browser/package.json",
"new_path": "packages/core-browser/package.json",
"diff": "{\n\"name\": \"@influxdata/influxdb-client-browser\",\n\"version\": \"1.25.0\",\n- \"description\": \"InfluxDB 2.1 client for browser\",\n+ \"description\": \"InfluxDB 2.x client for browser\",\n\"scripts\": {\n\"apidoc:extract\": \"echo \\\"Nothing to do\\\"\",\n\"test\": \"echo \\\"Nothing to do\\\"\",\n"
},
{
"change_type": "MODIFY",
"old_path": "packages/core/package.json",
"new_path": "packages/core/package.json",
"diff": "{\n\"name\": \"@influxdata/influxdb-client\",\n\"version\": \"1.25.0\",\n- \"description\": \"InfluxDB 2.1 client\",\n+ \"description\": \"InfluxDB 2.x client\",\n\"scripts\": {\n\"apidoc:extract\": \"api-extractor run\",\n\"build\": \"yarn run clean && rollup -c\",\n"
},
{
"change_type": "MODIFY",
"old_path": "packages/giraffe/package.json",
"new_path": "packages/giraffe/package.json",
"diff": "{\n\"name\": \"@influxdata/influxdb-client-giraffe\",\n\"version\": \"1.25.0\",\n- \"description\": \"InfluxDB 2.1 client - giraffe integration\",\n+ \"description\": \"InfluxDB 2.x client - giraffe integration\",\n\"scripts\": {\n\"apidoc:extract\": \"api-extractor run\",\n\"build\": \"yarn run clean && rollup -c\",\n"
}
] | TypeScript | MIT License | influxdata/influxdb-client-js | chore: use 2.x version in descriptions |
305,159 | 25.04.2022 13:55:04 | -7,200 | ca52f9bb4e41cd6142ce6ac015ca274f3b8b65a8 | chore: describe installation for Ionic | [
{
"change_type": "MODIFY",
"old_path": "README.md",
"new_path": "README.md",
"diff": "@@ -53,8 +53,7 @@ $ pnpm add @influxdata/influxdb-client\nIf you target Node.js, use [@influxdata/influxdb-client](./packages/core/README.md).\nIt provides main (CJS), module (ESM), and browser (UMD) exports.\n-If you target browsers or [Deno](https://deno.land/), use [@influxdata/influxdb-client-browser](./packages/core-browser/README.md).\n-It provides main (UMD) and module (ESM) exports.\n+If you target browsers (including [Deno](https://deno.land/) and [Ionic](https://ionic.io/)), use [@influxdata/influxdb-client-browser](./packages/core-browser/README.md). It provides main (UMD) and module (ESM) exports.\nTo use InfluxDB management APIs in your project, also add `@influxdata/influxdb-client-apis` as a dependency to your project.\n"
}
] | TypeScript | MIT License | influxdata/influxdb-client-js | chore: describe installation for Ionic |
305,159 | 25.04.2022 15:04:57 | -7,200 | 20baae913c651252fba9041e8103a33038ec1ea6 | chore: repair flickering test | [
{
"change_type": "MODIFY",
"old_path": "packages/core/test/unit/WriteApi.test.ts",
"new_path": "packages/core/test/unit/WriteApi.test.ts",
"diff": "@@ -186,8 +186,8 @@ describe('WriteApi', () => {\n})\n})\nit('call writeFailed also on retry timeout', async () => {\n- let writeFailedLastError: Error\nlet writeFailedExpires = Number.MAX_SAFE_INTEGER\n+ let expired = false\nconst writeFailed = (\nerror: Error,\n_lines: string[],\n@@ -195,17 +195,17 @@ describe('WriteApi', () => {\nexpires: number\n): void | Promise<void> => {\nwriteFailedExpires = expires\n- writeFailedLastError = error\n- if (expires <= Date.now()) {\n- return Promise.resolve() // do not log the the built-in error on timeout\n+ if (error.message.includes('Max retry time exceeded')) {\n+ expired = true\n+ return Promise.resolve() // do not log the built-in error on timeout\n}\n}\nuseSubject({\nmaxRetryTime: 5,\nretryJitter: 0,\n- maxRetryDelay: 5,\n- minRetryDelay: 5,\n+ maxRetryDelay: 3,\n+ minRetryDelay: 3,\nbatchSize: 1,\nwriteFailed,\n})\n@@ -213,15 +213,14 @@ describe('WriteApi', () => {\n// wait for first attempt to fail\nawait waitForCondition(() => logs.warn.length > 0)\n// wait for retry attempt to fail on timeout\n- await waitForCondition(() => logs.error.length > 0)\n+ await waitForCondition(() => expired)\nawait subject.close().then(() => {\n- expect(logs.warn).to.length(1)\n+ expect(logs.warn.length).is.greaterThanOrEqual(1)\nexpect(logs.warn[0][0]).contains(\n'Write to InfluxDB failed (attempt: 1)'\n)\nexpect(logs.error).to.length(0)\nexpect(writeFailedExpires).not.greaterThan(Date.now())\n- expect(String(writeFailedLastError)).contains('Max retry time exceeded')\n})\n})\nit('does not retry write when writeFailed handler returns a Promise', async () => {\n"
},
{
"change_type": "MODIFY",
"old_path": "packages/core/test/unit/util/waitForCondition.ts",
"new_path": "packages/core/test/unit/util/waitForCondition.ts",
"diff": "*/\nexport async function waitForCondition(\ncondition: () => any,\n+ message = 'timeouted',\ntimeout = 100,\nstep = 5\n): Promise<void> {\n@@ -20,5 +21,5 @@ export async function waitForCondition(\nif (condition()) return\n}\n// eslint-disable-next-line no-console\n- console.error('WARN:waitForCondition: timeouted')\n+ console.error(`WARN:waitForCondition: ${message}`)\n}\n"
}
] | TypeScript | MIT License | influxdata/influxdb-client-js | chore: repair flickering test |
305,159 | 25.04.2022 21:20:58 | -7,200 | 45aabad312c8b92668afbc102748a914369d1f42 | chore: add invokable scripts to main readme | [
{
"change_type": "MODIFY",
"old_path": "README.md",
"new_path": "README.md",
"diff": "@@ -38,6 +38,7 @@ InfluxDB 2.x client consists of two main packages\n- sources\n- ... and other InfluxDB domain objects\n- Delete data from a bucket\n+ - Invoke a flux script\n- built on @influxdata/influxdb-client\n## Installation\n"
}
] | TypeScript | MIT License | influxdata/influxdb-client-js | chore: add invokable scripts to main readme |
305,159 | 29.04.2022 06:40:27 | -7,200 | 01872a74063edfbbf9fdf7c311a78d8321860206 | chore(core): repair flickering retryStrategyTest | [
{
"change_type": "MODIFY",
"old_path": "packages/core/test/unit/impl/retryStrategy.test.ts",
"new_path": "packages/core/test/unit/impl/retryStrategy.test.ts",
"diff": "@@ -128,13 +128,14 @@ describe('RetryStrategyImpl', () => {\n})\ndescribe('random interval', () => {\nit('generates exponential data from randomized windows', () => {\n- const subject = new RetryStrategyImpl({\n+ const options = {\nminRetryDelay: 100,\nmaxRetryDelay: 1000,\nretryJitter: 100,\nexponentialBase: 2,\nrandomRetry: true,\n- })\n+ }\n+ const subject = new RetryStrategyImpl(options)\nconst values = [1, 2, 3, 4, 5].reduce((acc, _val, index) => {\nacc.push(subject.nextDelay(undefined, index + 1))\nreturn acc\n@@ -157,7 +158,9 @@ describe('RetryStrategyImpl', () => {\n)\n}\nsubject.success()\n- expect(Math.trunc(subject.nextDelay() / 100) * 100).equals(100)\n+ expect(Math.trunc(subject.nextDelay() / 100) * 100).is.lessThanOrEqual(\n+ options.minRetryDelay + options.retryJitter\n+ )\n})\n})\n})\n"
}
] | TypeScript | MIT License | influxdata/influxdb-client-js | chore(core): repair flickering retryStrategyTest |
305,176 | 11.05.2022 12:13:07 | 25,200 | 4dd5863e87cc10d759982857021997b23473f8d9 | refactor: Deprecate and remove semantic-pull-requests, insert influxdata replacement reusable workflow solution. | [
{
"change_type": "DELETE",
"old_path": ".github/semantic.yml",
"new_path": null,
"diff": "-# docs: https://github.com/probot/semantic-pull-requests#configuration\n-# Always validate the PR title AND all the commits\n-titleAndCommits: true\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": ".github/workflows/semantic.yml",
"diff": "+---\n+name: \"Semantic PR and Commit Messages\"\n+\n+on:\n+ pull_request:\n+ types: [opened, reopened, synchronize, edited]\n+ branches:\n+ - master\n+\n+jobs:\n+ semantic:\n+ uses: influxdata/validate-semantic-github-messages/.github/workflows/semantic.yml@main\n+ with:\n+ CHECK_PR_TITLE_OR_ONE_COMMIT: true\n+\n"
}
] | TypeScript | MIT License | influxdata/influxdb-client-js | refactor: Deprecate and remove semantic-pull-requests, insert influxdata replacement reusable workflow solution. |
305,159 | 12.05.2022 17:32:26 | -7,200 | 5e8303d651fc167408c689789730e639925a35e7 | fix(core): repair flickering test | [
{
"change_type": "MODIFY",
"old_path": "packages/core/test/unit/WriteApi.test.ts",
"new_path": "packages/core/test/unit/WriteApi.test.ts",
"diff": "@@ -174,14 +174,10 @@ describe('WriteApi', () => {\n// wait for retry attempt to fail on timeout\nawait waitForCondition(() => logs.error.length > 0)\nawait subject.close().then(() => {\n- expect(logs.warn).to.length(1)\n+ expect(logs.warn.length).is.greaterThanOrEqual(1)\nexpect(logs.warn[0][0]).contains(\n'Write to InfluxDB failed (attempt: 1)'\n)\n- expect(logs.error).to.length(1)\n- expect(logs.error[0][0]).contains(\n- 'Write to InfluxDB failed (attempt: 2)'\n- )\nexpect(logs.error[0][1].toString()).contains('Max retry time exceeded')\n})\n})\n"
}
] | TypeScript | MIT License | influxdata/influxdb-client-js | fix(core): repair flickering test |
305,159 | 19.05.2022 04:07:27 | -7,200 | 463da5b58d661f6ce925d994efed07e56011c264 | feat(core): use custom transport options in a browser | [
{
"change_type": "MODIFY",
"old_path": "packages/core/src/impl/browser/FetchTransport.ts",
"new_path": "packages/core/src/impl/browser/FetchTransport.ts",
"diff": "@@ -205,6 +205,8 @@ export default class FetchTransport implements Transport {\n...headers,\n},\ncredentials: 'omit' as 'omit',\n+ // override with custom transport options\n+ ...this.connectionOptions.transportOptions,\n// allow to specify custom options, such as signal, in SendOptions\n...other,\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "packages/core/test/unit/impl/browser/FetchTransport.test.ts",
"new_path": "packages/core/test/unit/impl/browser/FetchTransport.test.ts",
"diff": "@@ -284,6 +284,28 @@ describe('FetchTransport', () => {\n}\n)\n})\n+ it('uses custom transport options', async () => {\n+ let request: any\n+ emulateFetchApi(\n+ {\n+ headers: {'content-type': 'text/plain'},\n+ body: '{}',\n+ },\n+ req => (request = req)\n+ )\n+ await transport.request('/whatever', '', {\n+ method: 'GET',\n+ })\n+ expect(request?.credentials).is.deep.equal('omit')\n+ const custom = new FetchTransport({\n+ url: 'http://test:8086',\n+ transportOptions: {credentials: 'my-val'},\n+ })\n+ await custom.request('/whatever', '', {\n+ method: 'GET',\n+ })\n+ expect(request?.credentials).is.deep.equal('my-val')\n+ })\n})\ndescribe('send', () => {\nconst transport = new FetchTransport({url: 'http://test:8086'})\n@@ -477,6 +499,45 @@ describe('FetchTransport', () => {\n})\n}\n)\n+ it('uses custom transport options', async () => {\n+ let request: any\n+ emulateFetchApi(\n+ {\n+ headers: {'content-type': 'text/plain'},\n+ body: '{}',\n+ },\n+ req => (request = req)\n+ )\n+ await new Promise(resolve =>\n+ transport.send(\n+ 'http://test:8086',\n+ '',\n+ {method: 'POST'},\n+ {\n+ next: sinon.fake(),\n+ complete: () => resolve(0),\n+ error: resolve,\n+ }\n+ )\n+ )\n+ expect(request?.credentials).is.deep.equal('omit')\n+ await new Promise(resolve =>\n+ new FetchTransport({\n+ url: 'http://test:8086',\n+ transportOptions: {credentials: 'my-val'},\n+ }).send(\n+ 'http://test:8086',\n+ '',\n+ {method: 'POST'},\n+ {\n+ next: sinon.fake(),\n+ complete: () => resolve(0),\n+ error: resolve,\n+ }\n+ )\n+ )\n+ expect(request?.credentials).is.deep.equal('my-val')\n+ })\n})\ndescribe('chunkCombiner', () => {\nconst options = {url: 'http://test:8086'}\n"
}
] | TypeScript | MIT License | influxdata/influxdb-client-js | feat(core): use custom transport options in a browser |
305,163 | 21.05.2022 18:26:50 | 0 | bd4d646f33f3bfbf39d05c5a82ae07e9d363d1b6 | docs: typo in comment of function convertTimeToNanos | [
{
"change_type": "MODIFY",
"old_path": "packages/core/src/util/currentTime.ts",
"new_path": "packages/core/src/util/currentTime.ts",
"diff": "@@ -96,7 +96,7 @@ export const dateToProtocolTimestamp = {\n}\n/**\n- * convertTimeToNanos converts of Point's timestamp to a string\n+ * convertTimeToNanos converts Point's timestamp to a string.\n* @param value - supported timestamp value\n* @returns line protocol value\n*/\n"
}
] | TypeScript | MIT License | influxdata/influxdb-client-js | docs: typo in comment of function convertTimeToNanos |
305,159 | 23.05.2022 14:46:38 | -7,200 | d2301e6e6c336aa81e99619bd6ec8613ea7fc510 | feat(core): allow to overwrite default write API HTTP path | [
{
"change_type": "MODIFY",
"old_path": "packages/core/src/WriteApi.ts",
"new_path": "packages/core/src/WriteApi.ts",
"diff": "@@ -65,4 +65,11 @@ export default interface WriteApi extends PointSettings {\n* @returns count of points that were not written to InfluxDB\n*/\ndispose(): number\n+\n+ /**\n+ * HTTP path and query parameters of InfluxDB query API. It is\n+ * automatically initialized to `/api/v2/write?org=...`,\n+ * but it can be changed after the API is obtained.\n+ */\n+ httpPath: string\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "packages/core/src/impl/WriteApiImpl.ts",
"new_path": "packages/core/src/impl/WriteApiImpl.ts",
"diff": "@@ -67,9 +67,10 @@ class WriteBuffer {\n}\nexport default class WriteApiImpl implements WriteApi {\n+ public httpPath: string\n+\nprivate writeBuffer: WriteBuffer\nprivate closed = false\n- private httpPath: string\nprivate writeOptions: WriteOptions\nprivate sendOptions: SendOptions\nprivate _timeoutHandle: any = undefined\n"
}
] | TypeScript | MIT License | influxdata/influxdb-client-js | feat(core): allow to overwrite default write API HTTP path |
305,159 | 23.05.2022 14:55:49 | -7,200 | 6b207d27d5c7ee9450d91f09392bd31291502499 | feat(core): add tests for writeApi.path | [
{
"change_type": "MODIFY",
"old_path": "packages/core/src/WriteApi.ts",
"new_path": "packages/core/src/WriteApi.ts",
"diff": "@@ -71,5 +71,5 @@ export default interface WriteApi extends PointSettings {\n* automatically initialized to `/api/v2/write?org=...`,\n* but it can be changed after the API is obtained.\n*/\n- httpPath: string\n+ path: string\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "packages/core/src/impl/WriteApiImpl.ts",
"new_path": "packages/core/src/impl/WriteApiImpl.ts",
"diff": "@@ -67,7 +67,7 @@ class WriteBuffer {\n}\nexport default class WriteApiImpl implements WriteApi {\n- public httpPath: string\n+ public path: string\nprivate writeBuffer: WriteBuffer\nprivate closed = false\n@@ -87,11 +87,11 @@ export default class WriteApiImpl implements WriteApi {\nprecision: WritePrecisionType,\nwriteOptions?: Partial<WriteOptions>\n) {\n- this.httpPath = `/api/v2/write?org=${encodeURIComponent(\n+ this.path = `/api/v2/write?org=${encodeURIComponent(\norg\n)}&bucket=${encodeURIComponent(bucket)}&precision=${precision}`\nif (writeOptions?.consistency) {\n- this.httpPath += `&consistency=${encodeURIComponent(\n+ this.path += `&consistency=${encodeURIComponent(\nwriteOptions.consistency\n)}`\n}\n@@ -238,7 +238,7 @@ export default class WriteApiImpl implements WriteApi {\n},\n}\nthis.transport.send(\n- this.httpPath,\n+ this.path,\nlines.join('\\n'),\nthis.sendOptions,\ncallbacks\n"
},
{
"change_type": "MODIFY",
"old_path": "packages/core/test/unit/WriteApi.test.ts",
"new_path": "packages/core/test/unit/WriteApi.test.ts",
"diff": "@@ -661,5 +661,24 @@ describe('WriteApi', () => {\nexpect(logs.warn).deep.equals([])\nexpect(uri).match(/.*&consistency=quorum$/)\n})\n+ it('allows to overwrite httpPath', async () => {\n+ useSubject({})\n+ expect(subject.path).match(/api\\/v2\\/write\\?.*$/)\n+ const customPath = '/custom/path?whathever=itis'\n+ subject.path = customPath\n+ let uri: any\n+ nock(clientOptions.url)\n+ .post(/.*/)\n+ .reply(function(_uri, _requestBody) {\n+ uri = this.req.path\n+ return [204, '', {}]\n+ })\n+ .persist()\n+ subject.writePoint(new Point('test').floatField('value', 1))\n+ await subject.close()\n+ expect(logs.error).has.length(0)\n+ expect(logs.warn).deep.equals([])\n+ expect(uri).equals(customPath)\n+ })\n})\n})\n"
}
] | TypeScript | MIT License | influxdata/influxdb-client-js | feat(core): add tests for writeApi.path |
305,163 | 24.05.2022 19:12:44 | 0 | 7e53cf7a5a215d12ad96693e33bf899110158afe | docs: typo in comment of function 'next' in interface CommunicationObserver | [
{
"change_type": "MODIFY",
"old_path": "packages/core/src/results/CommunicationObserver.ts",
"new_path": "packages/core/src/results/CommunicationObserver.ts",
"diff": "@@ -16,7 +16,7 @@ export type ResponseStartedFn = (headers: Headers, statusCode?: number) => void\n*/\nexport interface CommunicationObserver<T> {\n/**\n- * Data chunk received, can be called mupliple times.\n+ * Data chunk received, can be called multiple times.\n* @param data - data\n*/\nnext(data: T): void\n"
}
] | TypeScript | MIT License | influxdata/influxdb-client-js | docs: typo in comment of function 'next' in interface CommunicationObserver |
305,159 | 26.05.2022 18:58:05 | -7,200 | f9808aaade47e89efce6f88e75604e2710b87463 | chore: remove name and version from private packages | [
{
"change_type": "MODIFY",
"old_path": "examples/package.json",
"new_path": "examples/package.json",
"diff": "{\n\"private\": true,\n- \"name\": \"@influxdata/influxdb-client-examples\",\n- \"version\": \"0.4.0\",\n\"license\": \"MIT\",\n\"scripts\": {\n\"browser\": \"node scripts/server.js\",\n"
},
{
"change_type": "MODIFY",
"old_path": "package.json",
"new_path": "package.json",
"diff": "{\n\"private\": true,\n- \"name\": \"@influxdata/influx\",\n\"description\": \"InfluxDB 2.x client\",\n\"workspaces\": {\n\"packages\": [\n"
}
] | TypeScript | MIT License | influxdata/influxdb-client-js | chore: remove name and version from private packages |
305,159 | 10.06.2022 19:52:01 | -7,200 | ce6cdd634ab69dcf47b900127358946a56dfa30f | chore(examples): reuse connections in writeAdvanced example | [
{
"change_type": "MODIFY",
"old_path": "examples/writeAdvanced.js",
"new_path": "examples/writeAdvanced.js",
"diff": "@@ -42,19 +42,30 @@ const writeOptions = {\nflushInterval: 0,\n/* maximum size of the retry buffer - it contains items that could not be sent for the first time */\nmaxBufferLines: 30_000,\n- /* the count of retries, the delays between retries follow an exponential backoff strategy if there is no Retry-After HTTP header */\n- maxRetries: 3,\n- /* maximum delay between retries in milliseconds */\n- maxRetryDelay: 15000,\n- /* minimum delay between retries in milliseconds */\n- minRetryDelay: 1000, // minimum delay between retries\n- /* a random value of up to retryJitter is added when scheduling next retry */\n- retryJitter: 1000,\n- // ... or you can customize what to do on write failures when using a writeFailed fn, see the API docs for details\n- // writeFailed: function(error, lines, failedAttempts){/** return promise or void */},\n+ /* the count of internally-scheduled retries upon write failure, the delays between write attempts follow an exponential backoff strategy if there is no Retry-After HTTP header */\n+ maxRetries: 0, // do not retry writes\n+ // ... there are more write options that can be customized, see\n+ // https://influxdata.github.io/influxdb-client-js/influxdb-client.writeoptions.html and\n+ // https://influxdata.github.io/influxdb-client-js/influxdb-client.writeretryoptions.html\n}\n-const influxDB = new InfluxDB({url, token})\n+// Node.js HTTP client OOTB does not reuse established TCP connections, a custom node HTTP agent\n+// can be used to reuse them and thus reduce the count of newly established networking sockets\n+const {Agent} = require('http')\n+const keepAliveAgent = new Agent({\n+ keepAlive: false, // reuse existing connections\n+ keepAliveMsecs: 20 * 1000, // 20 seconds keep alive\n+})\n+process.on('exit', () => keepAliveAgent.destroy())\n+\n+// create InfluxDB with a custom HTTP agent\n+const influxDB = new InfluxDB({\n+ url,\n+ token,\n+ transportOptions: {\n+ agent: keepAliveAgent,\n+ },\n+})\nasync function importData() {\nconst writeApi = influxDB.getWriteApi(org, bucket, 'ns', writeOptions)\n@@ -68,6 +79,7 @@ async function importData() {\nif ((i + 1) % flushBatchSize === 0) {\nconsole.log(`flush writeApi: chunk #${(i + 1) / flushBatchSize}`)\ntry {\n+ // write the data to InfluxDB server, wait for it\nawait writeApi.flush()\n} catch (e) {\nconsole.error()\n@@ -95,6 +107,11 @@ async function importData() {\nconsole.log(`Size of temperature2 measurement since '${start}': `, count)\n}\n+const start = Date.now()\nimportData()\n- .then(() => console.log('FINISHED'))\n+ .then(() =>\n+ console.log(\n+ `FINISHED writing ${demoCount} points (${Date.now() - start} millis}`\n+ )\n+ )\n.catch(e => console.error('FINISHED', e))\n"
}
] | TypeScript | MIT License | influxdata/influxdb-client-js | chore(examples): reuse connections in writeAdvanced example |
305,159 | 21.06.2022 09:52:41 | -7,200 | 36b8a2a9365061f505f0d208f2f88de3b86d705f | chore: revert of do not retry write upon 'hinted handoff queue not empty' error"
This reverts commit | [
{
"change_type": "MODIFY",
"old_path": "packages/core/src/impl/WriteApiImpl.ts",
"new_path": "packages/core/src/impl/WriteApiImpl.ts",
"diff": "@@ -196,20 +196,6 @@ export default class WriteApiImpl implements WriteApi {\nonRetry.then(resolve, reject)\nreturn\n}\n- // ignore informational message about the state of InfluxDB\n- // enterprise cluster, if present\n- if (\n- error instanceof HttpError &&\n- error.json &&\n- typeof error.json.error === 'string' &&\n- error.json.error.includes('hinted handoff queue not empty')\n- ) {\n- Log.warn('Write to InfluxDB returns: ' + error.json.error)\n- responseStatusCode = 204\n- callbacks.complete()\n- return\n- }\n- // retry if possible\nif (\n!self.closed &&\nretryAttempts > 0 &&\n"
},
{
"change_type": "MODIFY",
"old_path": "packages/core/test/unit/WriteApi.test.ts",
"new_path": "packages/core/test/unit/WriteApi.test.ts",
"diff": "@@ -680,29 +680,5 @@ describe('WriteApi', () => {\nexpect(logs.warn).deep.equals([])\nexpect(uri).equals(customPath)\n})\n- it('swallows hinted handoff queue not empty', async () => {\n- useSubject({\n- consistency: 'quorum',\n- })\n- nock(clientOptions.url)\n- .post(/.*/)\n- .reply(function(_uri, _requestBody) {\n- return [\n- 500,\n- '{\"error\": \"write: hinted handoff queue not empty\"}',\n- {'content-type': 'application/json'},\n- ]\n- })\n- .persist()\n- subject.writePoint(new Point('test').floatField('value', 1))\n- await subject.close()\n- expect(logs.error).has.length(0)\n- expect(logs.warn).deep.equals([\n- [\n- 'Write to InfluxDB returns: write: hinted handoff queue not empty',\n- undefined,\n- ],\n- ])\n- })\n})\n})\n"
}
] | TypeScript | MIT License | influxdata/influxdb-client-js | chore: revert of do not retry write upon 'hinted handoff queue not empty' error"
This reverts commit 86264b13ffb6a862876db1d042656cf15d3039ea. |
305,159 | 25.06.2022 10:33:13 | -7,200 | 615f47bfa5310d79ffe87f6595c3765cdc6b75e3 | fix: defines types for typescript 4.7+ | [
{
"change_type": "MODIFY",
"old_path": "packages/apis/package.json",
"new_path": "packages/apis/package.json",
"diff": "\"types\": \"dist/all.d.ts\",\n\"exports\": {\n\".\": {\n+ \"types\": \"./dist/all.d.ts\",\n\"import\": \"./dist/index.mjs\",\n\"require\": \"./dist/index.js\",\n\"deno\": \"./dist/index.mjs\",\n"
},
{
"change_type": "MODIFY",
"old_path": "packages/core-browser/package.json",
"new_path": "packages/core-browser/package.json",
"diff": "\"types\": \"dist/all.d.ts\",\n\"exports\": {\n\".\": {\n+ \"types\": \"./dist/all.d.ts\",\n\"import\": \"./dist/index.browser.mjs\",\n\"require\": \"./dist/index.browser.js\",\n\"deno\": \"./dist/index.browser.mjs\",\n"
},
{
"change_type": "MODIFY",
"old_path": "packages/core/package.json",
"new_path": "packages/core/package.json",
"diff": "\"types\": \"dist/all.d.ts\",\n\"exports\": {\n\".\": {\n+ \"types\": \"./dist/all.d.ts\",\n\"import\": \"./dist/index.mjs\",\n\"require\": \"./dist/index.js\",\n\"deno\": \"./dist/index.browser.mjs\",\n"
},
{
"change_type": "MODIFY",
"old_path": "packages/giraffe/package.json",
"new_path": "packages/giraffe/package.json",
"diff": "\"types\": \"dist/all.d.ts\",\n\"exports\": {\n\".\": {\n+ \"types\": \"./dist/all.d.ts\",\n\"import\": \"./dist/index.mjs\",\n\"require\": \"./dist/index.js\",\n\"default\": \"./dist/index.js\"\n"
}
] | TypeScript | MIT License | influxdata/influxdb-client-js | fix: defines types for typescript 4.7+ |
305,159 | 27.06.2022 07:33:02 | -7,200 | a4c789c88f4feb5ccf976e7635dc4a705f466bcf | chore(examples): improve token example | [
{
"change_type": "MODIFY",
"old_path": "examples/tokens.js",
"new_path": "examples/tokens.js",
"diff": "@@ -40,18 +40,21 @@ async function signInDemo() {\n)\n// authorize communication with session cookies\nconst session = {headers: {cookie: cookies.join('; ')}}\n+\n// get all authorization tokens\nconsole.log('*** GetAuthorizations ***')\nconst authorizationAPI = new AuthorizationsAPI(influxDB)\nconst authorizations = await authorizationAPI.getAuthorizations({}, session)\n// console.log(JSON.stringify(authorizations?.authorizations, null, 2))\n- let hasMyToken = false\n+ let exampleTokenID = undefined\n;(authorizations.authorizations || []).forEach(auth => {\n- console.log(auth.token)\n- console.log(' ', auth.description)\n- hasMyToken = hasMyToken || auth.description === 'example token'\n+ console.log(auth.description)\n+ // console.log(auth.token) // token cannot be retrieved in the cloud\n+ if (auth.description === 'example token') {\n+ exampleTokenID = auth.id\n+ }\n})\n- if (!hasMyToken) {\n+\nconsole.log('*** GetOrganization ***')\nconst orgsResponse = await new OrgsAPI(influxDB).getOrgs({org}, session)\nif (!orgsResponse.orgs || orgsResponse.orgs.length === 0) {\n@@ -59,6 +62,15 @@ async function signInDemo() {\n}\nconst orgID = orgsResponse.orgs[0].id\nconsole.log(' ', org, orgID)\n+\n+ if (exampleTokenID) {\n+ console.log('*** DeleteAuthorization ***')\n+ await authorizationAPI.deleteAuthorizationsID(\n+ {authID: exampleTokenID},\n+ session\n+ )\n+ }\n+\nconsole.log('*** CreateAuthorization ***')\nconst auth = await authorizationAPI.postAuthorizations(\n{\n@@ -81,7 +93,7 @@ async function signInDemo() {\n)\nconsole.log(auth.token)\nconsole.log(' ', auth.description)\n- }\n+\nconsole.log('\\nFinished SUCCESS')\n// invalidate the session\nconst signoutAPI = new SignoutAPI(influxDB)\n"
}
] | TypeScript | MIT License | influxdata/influxdb-client-js | chore(examples): improve token example |
305,159 | 27.06.2022 07:51:12 | -7,200 | 4897405603cf587532659dd84f406e9b47095d74 | chore: upgrade typescript to 4.7.4 | [
{
"change_type": "MODIFY",
"old_path": "examples/package.json",
"new_path": "examples/package.json",
"diff": "\"devDependencies\": {\n\"@types/express\": \"^4.17.2\",\n\"@types/express-http-proxy\": \"^1.5.12\",\n+ \"@types/node\": \"^16\",\n\"express\": \"^4.17.1\",\n\"express-http-proxy\": \"^1.6.0\",\n\"follow-redirects\": \"^1.14.3\",\n"
},
{
"change_type": "MODIFY",
"old_path": "package.json",
"new_path": "package.json",
"diff": "\"gh-pages\": \"^3.1.0\",\n\"lerna\": \"^4.0.0\",\n\"prettier\": \"^1.19.1\",\n- \"rimraf\": \"^3.0.0\",\n- \"ts-node\": \"^8.5.4\",\n- \"typescript\": \"^3.7.4\"\n+ \"rimraf\": \"^3.0.0\"\n},\n\"resolutions\": {\n\"minimist\": \">=1.2.2\"\n"
},
{
"change_type": "MODIFY",
"old_path": "packages/apis/package.json",
"new_path": "packages/apis/package.json",
"diff": "\"devDependencies\": {\n\"@influxdata/influxdb-client\": \"^1.27.0\",\n\"@microsoft/api-extractor\": \"^7.18.4\",\n+ \"@types/node\": \"^16\",\n\"@typescript-eslint/eslint-plugin\": \"^2.9.0\",\n\"@typescript-eslint/parser\": \"^2.9.0\",\n\"chai\": \"^4.2.0\",\n\"rollup-plugin-gzip\": \"^2.2.0\",\n\"rollup-plugin-terser\": \"^7.0.0\",\n\"rollup-plugin-typescript2\": \"^0.27.2\",\n- \"ts-node\": \"^8.5.4\",\n- \"typescript\": \"^4.3.5\"\n+ \"ts-node\": \"^10.8.1\",\n+ \"typescript\": \"^4.7.4\"\n}\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "packages/core/package.json",
"new_path": "packages/core/package.json",
"diff": "\"@rollup/plugin-replace\": \"^2.3.0\",\n\"@types/chai\": \"^4.2.5\",\n\"@types/mocha\": \"^5.2.7\",\n+ \"@types/node\": \"^16\",\n\"@types/sinon\": \"^7.5.1\",\n\"@typescript-eslint/eslint-plugin\": \"^2.9.0\",\n\"@typescript-eslint/parser\": \"^2.9.0\",\n\"rollup-plugin-typescript2\": \"^0.27.2\",\n\"rxjs\": \"^7.2.0\",\n\"sinon\": \"^7.5.0\",\n- \"ts-node\": \"^8.5.4\",\n- \"typescript\": \"^4.3.5\",\n+ \"ts-node\": \"^10.8.1\",\n+ \"typescript\": \"^4.7.4\",\n\"version-bump-prompt\": \"^5.0.6\"\n}\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "packages/giraffe/package.json",
"new_path": "packages/giraffe/package.json",
"diff": "\"@rollup/plugin-replace\": \"^2.3.0\",\n\"@types/chai\": \"^4.2.5\",\n\"@types/mocha\": \"^5.2.7\",\n+ \"@types/node\": \"^16\",\n\"@types/react\": \"^16.9.55\",\n\"@types/sinon\": \"^7.5.1\",\n\"@typescript-eslint/eslint-plugin\": \"^2.9.0\",\n\"nock\": \"^11.7.0\",\n\"nyc\": \"^15.1.0\",\n\"prettier\": \"^1.19.1\",\n- \"react\": \"^16.8.0\",\n- \"react-dom\": \"^16.8.0\",\n+ \"react\": \"^17.0.2\",\n+ \"react-dom\": \"^17.0.2\",\n\"rimraf\": \"^3.0.0\",\n\"rollup\": \"^2.33.3\",\n\"rollup-plugin-dts\": \"^2.0.0\",\n\"rollup-plugin-terser\": \"^7.0.0\",\n\"rollup-plugin-typescript2\": \"^0.27.2\",\n\"sinon\": \"^7.5.0\",\n- \"ts-node\": \"^8.5.4\",\n- \"typescript\": \"^4.3.5\"\n+ \"ts-node\": \"^10.8.1\",\n+ \"typescript\": \"^4.7.4\"\n}\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "yarn.lock",
"new_path": "yarn.lock",
"diff": "\"@babel/helper-validator-identifier\" \"^7.16.7\"\nto-fast-properties \"^2.0.0\"\n+\"@cspotcode/source-map-support@^0.8.0\":\n+ version \"0.8.1\"\n+ resolved \"https://registry.yarnpkg.com/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz#00629c35a688e05a88b1cda684fb9d5e73f000a1\"\n+ integrity sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==\n+ dependencies:\n+ \"@jridgewell/trace-mapping\" \"0.3.9\"\n+\n\"@gar/promisify@^1.0.1\":\nversion \"1.1.3\"\nresolved \"https://registry.yarnpkg.com/@gar/promisify/-/promisify-1.1.3.tgz#555193ab2e3bb3b6adc3d551c9c030d9e860daf6\"\nresolved \"https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.11.tgz#771a1d8d744eeb71b6adb35808e1a6c7b9b8c8ec\"\nintegrity sha512-Fg32GrJo61m+VqYSdRSjRXMjQ06j8YIYfcTqndLYVAaHmroZHLJZCydsWBOTDqXS2v+mjxohBWEMfg97GXmYQg==\n+\"@jridgewell/[email protected]\":\n+ version \"0.3.9\"\n+ resolved \"https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz#6534fd5933a53ba7cbf3a17615e273a0d1273ff9\"\n+ integrity sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==\n+ dependencies:\n+ \"@jridgewell/resolve-uri\" \"^3.0.3\"\n+ \"@jridgewell/sourcemap-codec\" \"^1.4.10\"\n+\n\"@jridgewell/trace-mapping@^0.3.0\":\nversion \"0.3.4\"\nresolved \"https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.4.tgz#f6a0832dffd5b8a6aaa633b7d9f8e8e94c83a0c3\"\nresolved \"https://registry.yarnpkg.com/@tootallnate/once/-/once-1.1.2.tgz#ccb91445360179a04e7fe6aff78c00ffc1eeaf82\"\nintegrity sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw==\n+\"@tsconfig/node10@^1.0.7\":\n+ version \"1.0.9\"\n+ resolved \"https://registry.yarnpkg.com/@tsconfig/node10/-/node10-1.0.9.tgz#df4907fc07a886922637b15e02d4cebc4c0021b2\"\n+ integrity sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==\n+\n+\"@tsconfig/node12@^1.0.7\":\n+ version \"1.0.11\"\n+ resolved \"https://registry.yarnpkg.com/@tsconfig/node12/-/node12-1.0.11.tgz#ee3def1f27d9ed66dac6e46a295cffb0152e058d\"\n+ integrity sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==\n+\n+\"@tsconfig/node14@^1.0.0\":\n+ version \"1.0.3\"\n+ resolved \"https://registry.yarnpkg.com/@tsconfig/node14/-/node14-1.0.3.tgz#e4386316284f00b98435bf40f72f75a09dabf6c1\"\n+ integrity sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==\n+\n+\"@tsconfig/node16@^1.0.2\":\n+ version \"1.0.3\"\n+ resolved \"https://registry.yarnpkg.com/@tsconfig/node16/-/node16-1.0.3.tgz#472eaab5f15c1ffdd7f8628bd4c4f753995ec79e\"\n+ integrity sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ==\n+\n\"@types/[email protected]\":\nversion \"1.0.38\"\nresolved \"https://registry.yarnpkg.com/@types/argparse/-/argparse-1.0.38.tgz#a81fd8606d481f873a3800c6ebae4f1d768a56a9\"\nresolved \"https://registry.yarnpkg.com/@types/node/-/node-12.20.24.tgz#c37ac69cb2948afb4cef95f424fa0037971a9a5c\"\nintegrity sha512-yxDeaQIAJlMav7fH5AQqPH1u8YIuhYJXYBzxaQ4PifsU0GDO38MSdmEDeRlIxrKbC6NbEaaEHDanWb+y30U8SQ==\n+\"@types/node@^16\":\n+ version \"16.11.41\"\n+ resolved \"https://registry.yarnpkg.com/@types/node/-/node-16.11.41.tgz#88eb485b1bfdb4c224d878b7832239536aa2f813\"\n+ integrity sha512-mqoYK2TnVjdkGk8qXAVGc/x9nSaTpSrFaGFm43BUH3IdoBV0nta6hYaGmdOvIMlbHJbUEVen3gvwpwovAZKNdQ==\n+\n\"@types/normalize-package-data@^2.4.0\":\nversion \"2.4.1\"\nresolved \"https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.1.tgz#d3357479a0fdfdd5907fe67e17e0a85c906e1301\"\n@@ -1417,11 +1457,21 @@ acorn-jsx@^5.2.0:\nresolved \"https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937\"\nintegrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==\n+acorn-walk@^8.1.1:\n+ version \"8.2.0\"\n+ resolved \"https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.2.0.tgz#741210f2e2426454508853a2f44d0ab83b7f69c1\"\n+ integrity sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==\n+\nacorn@^7.1.1:\nversion \"7.4.1\"\nresolved \"https://registry.yarnpkg.com/acorn/-/acorn-7.4.1.tgz#feaed255973d2e77555b83dbc08851a6c63520fa\"\nintegrity sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==\n+acorn@^8.4.1:\n+ version \"8.7.1\"\n+ resolved \"https://registry.yarnpkg.com/acorn/-/acorn-8.7.1.tgz#0197122c843d1bf6d0a5e83220a788f278f63c30\"\n+ integrity sha512-Xx54uLJQZ19lKygFXOWsscKUbsBZW0CPykPhVQdhIeIwrbPmJzqeASDInc8nKBnp/JT6igTs82qPXz069H8I/A==\n+\nacorn@^8.5.0:\nversion \"8.7.0\"\nresolved \"https://registry.yarnpkg.com/acorn/-/acorn-8.7.0.tgz#90951fde0f8f09df93549481e5fc141445b791cf\"\n@@ -2162,6 +2212,11 @@ cpr@^3.0.1:\nmkdirp \"~0.5.1\"\nrimraf \"^2.5.4\"\n+create-require@^1.1.0:\n+ version \"1.1.1\"\n+ resolved \"https://registry.yarnpkg.com/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333\"\n+ integrity sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==\n+\ncross-spawn@^6.0.5:\nversion \"6.0.5\"\nresolved \"https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4\"\n@@ -4010,7 +4065,7 @@ lolex@^5.0.1:\ndependencies:\n\"@sinonjs/commons\" \"^1.7.0\"\n-loose-envify@^1.1.0, loose-envify@^1.4.0:\n+loose-envify@^1.1.0:\nversion \"1.4.0\"\nresolved \"https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf\"\nintegrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==\n@@ -5117,15 +5172,6 @@ promzard@^0.3.0:\ndependencies:\nread \"1\"\n-prop-types@^15.6.2:\n- version \"15.8.1\"\n- resolved \"https://registry.yarnpkg.com/prop-types/-/prop-types-15.8.1.tgz#67d87bf1a694f48435cf332c24af10214a3140b5\"\n- integrity sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==\n- dependencies:\n- loose-envify \"^1.4.0\"\n- object-assign \"^4.1.1\"\n- react-is \"^16.13.1\"\n-\npropagate@^2.0.0:\nversion \"2.0.1\"\nresolved \"https://registry.yarnpkg.com/propagate/-/propagate-2.0.1.tgz#40cdedab18085c792334e64f0ac17256d38f9a45\"\n@@ -5195,29 +5241,22 @@ randombytes@^2.1.0:\ndependencies:\nsafe-buffer \"^5.1.0\"\n-react-dom@^16.8.0:\n- version \"16.14.0\"\n- resolved \"https://registry.yarnpkg.com/react-dom/-/react-dom-16.14.0.tgz#7ad838ec29a777fb3c75c3a190f661cf92ab8b89\"\n- integrity sha512-1gCeQXDLoIqMgqD3IO2Ah9bnf0w9kzhwN5q4FGnHZ67hBm9yePzB5JJAIQCc8x3pFnNlwFq4RidZggNAAkzWWw==\n+react-dom@^17.0.2:\n+ version \"17.0.2\"\n+ resolved \"https://registry.yarnpkg.com/react-dom/-/react-dom-17.0.2.tgz#ecffb6845e3ad8dbfcdc498f0d0a939736502c23\"\n+ integrity sha512-s4h96KtLDUQlsENhMn1ar8t2bEa+q/YAtj8pPPdIjPDGBDIVNsrD9aXNWqspUe6AzKCIG0C1HZZLqLV7qpOBGA==\ndependencies:\nloose-envify \"^1.1.0\"\nobject-assign \"^4.1.1\"\n- prop-types \"^15.6.2\"\n- scheduler \"^0.19.1\"\n-\n-react-is@^16.13.1:\n- version \"16.13.1\"\n- resolved \"https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4\"\n- integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==\n+ scheduler \"^0.20.2\"\n-react@^16.8.0:\n- version \"16.14.0\"\n- resolved \"https://registry.yarnpkg.com/react/-/react-16.14.0.tgz#94d776ddd0aaa37da3eda8fc5b6b18a4c9a3114d\"\n- integrity sha512-0X2CImDkJGApiAlcf0ODKIneSwBPhqJawOa5wCtKbu7ZECrmS26NvtSILynQ66cgkT/RJ4LidJOc3bUESwmU8g==\n+react@^17.0.2:\n+ version \"17.0.2\"\n+ resolved \"https://registry.yarnpkg.com/react/-/react-17.0.2.tgz#d0b5cc516d29eb3eee383f75b62864cfb6800037\"\n+ integrity sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA==\ndependencies:\nloose-envify \"^1.1.0\"\nobject-assign \"^4.1.1\"\n- prop-types \"^15.6.2\"\nread-cmd-shim@^2.0.0:\nversion \"2.0.0\"\n@@ -5570,10 +5609,10 @@ safe-buffer@~5.1.0, safe-buffer@~5.1.1:\nresolved \"https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a\"\nintegrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==\n-scheduler@^0.19.1:\n- version \"0.19.1\"\n- resolved \"https://registry.yarnpkg.com/scheduler/-/scheduler-0.19.1.tgz#4f3e2ed2c1a7d65681f4c854fa8c5a1ccb40f196\"\n- integrity sha512-n/zwRWRYSUj0/3g/otKDRPMh6qv2SYMWNq85IEa8iZyAv8od9zDYpGSnpBEjNgcMNq6Scbu5KfIPxNF72R/2EA==\n+scheduler@^0.20.2:\n+ version \"0.20.2\"\n+ resolved \"https://registry.yarnpkg.com/scheduler/-/scheduler-0.20.2.tgz#4baee39436e34aa93b4874bddcbf0fe8b8b50e91\"\n+ integrity sha512-2eWfGgAqqWFGqtdMmcL5zCMK1U8KlXv8SQFGglL3CEtd0aDVDWgeF/YoCmvln55m5zSk3J/20hTaSBeSObsQDQ==\ndependencies:\nloose-envify \"^1.1.0\"\nobject-assign \"^4.1.1\"\n@@ -5729,7 +5768,7 @@ sort-keys@^4.0.0:\ndependencies:\nis-plain-obj \"^2.0.0\"\n-source-map-support@^0.5.17, source-map-support@~0.5.20:\n+source-map-support@~0.5.20:\nversion \"0.5.21\"\nresolved \"https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.21.tgz#04fe7c7f9e1ed2d662233c28cb2b35b9f63f6e4f\"\nintegrity sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==\n@@ -6174,15 +6213,23 @@ trim-repeated@^1.0.0:\ndependencies:\nescape-string-regexp \"^1.0.2\"\n-ts-node@^8.5.4:\n- version \"8.10.2\"\n- resolved \"https://registry.yarnpkg.com/ts-node/-/ts-node-8.10.2.tgz#eee03764633b1234ddd37f8db9ec10b75ec7fb8d\"\n- integrity sha512-ISJJGgkIpDdBhWVu3jufsWpK3Rzo7bdiIXJjQc0ynKxVOVcg2oIrf2H2cejminGrptVc6q6/uynAHNCuWGbpVA==\n- dependencies:\n+ts-node@^10.8.1:\n+ version \"10.8.1\"\n+ resolved \"https://registry.yarnpkg.com/ts-node/-/ts-node-10.8.1.tgz#ea2bd3459011b52699d7e88daa55a45a1af4f066\"\n+ integrity sha512-Wwsnao4DQoJsN034wePSg5nZiw4YKXf56mPIAeD6wVmiv+RytNSWqc2f3fKvcUoV+Yn2+yocD71VOfQHbmVX4g==\n+ dependencies:\n+ \"@cspotcode/source-map-support\" \"^0.8.0\"\n+ \"@tsconfig/node10\" \"^1.0.7\"\n+ \"@tsconfig/node12\" \"^1.0.7\"\n+ \"@tsconfig/node14\" \"^1.0.0\"\n+ \"@tsconfig/node16\" \"^1.0.2\"\n+ acorn \"^8.4.1\"\n+ acorn-walk \"^8.1.1\"\narg \"^4.1.0\"\n+ create-require \"^1.1.0\"\ndiff \"^4.0.1\"\nmake-error \"^1.1.1\"\n- source-map-support \"^0.5.17\"\n+ v8-compile-cache-lib \"^3.0.1\"\nyn \"3.1.1\"\[email protected]:\n@@ -6268,15 +6315,10 @@ typedarray@^0.0.6:\nresolved \"https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777\"\nintegrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=\n-typescript@^3.7.4:\n- version \"3.9.10\"\n- resolved \"https://registry.yarnpkg.com/typescript/-/typescript-3.9.10.tgz#70f3910ac7a51ed6bef79da7800690b19bf778b8\"\n- integrity sha512-w6fIxVE/H1PkLKcCPsFqKE7Kv7QUwhU8qQY2MueZXWx5cPZdwFupLgKK3vntcK98BtNHZtAF4LA/yl2a7k8R6Q==\n-\n-typescript@^4.3.5:\n- version \"4.6.3\"\n- resolved \"https://registry.yarnpkg.com/typescript/-/typescript-4.6.3.tgz#eefeafa6afdd31d725584c67a0eaba80f6fc6c6c\"\n- integrity sha512-yNIatDa5iaofVozS/uQJEl3JRWLKKGJKh6Yaiv0GLGSuhpFJe7P3SbHZ8/yjAHRQwKRoA6YZqlfjXWmVzoVSMw==\n+typescript@^4.7.4:\n+ version \"4.7.4\"\n+ resolved \"https://registry.yarnpkg.com/typescript/-/typescript-4.7.4.tgz#1a88596d1cf47d59507a1bcdfb5b9dfe4d488235\"\n+ integrity sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==\ntypescript@~4.5.2:\nversion \"4.5.5\"\n@@ -6371,6 +6413,11 @@ uuid@^3.3.2, uuid@^3.3.3:\nresolved \"https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee\"\nintegrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==\n+v8-compile-cache-lib@^3.0.1:\n+ version \"3.0.1\"\n+ resolved \"https://registry.yarnpkg.com/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz#6336e8d71965cb3d35a1bbb7868445a7c05264bf\"\n+ integrity sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==\n+\nv8-compile-cache@^2.0.3:\nversion \"2.3.0\"\nresolved \"https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz#2de19618c66dc247dcfb6f99338035d8245a2cee\"\n"
}
] | TypeScript | MIT License | influxdata/influxdb-client-js | chore: upgrade typescript to 4.7.4 |
305,159 | 27.06.2022 08:57:46 | -7,200 | 2725c7e3f25dfcdf776d8a58a602753c44cfc66f | chore: follow new eslint rules | [
{
"change_type": "MODIFY",
"old_path": ".eslintrc.json",
"new_path": ".eslintrc.json",
"diff": "\"extends\": [\n\"eslint:recommended\",\n\"plugin:@typescript-eslint/recommended\",\n- \"plugin:prettier/recommended\",\n- \"prettier/@typescript-eslint\"\n+ \"plugin:prettier/recommended\"\n],\n\"rules\": {\n\"no-console\": \"off\",\n- \"@typescript-eslint/camelcase\": [\"error\", {\"allow\": [\"^DEFAULT_\"]}],\n+ \"@typescript-eslint/naming-convention\": [\n+ \"error\",\n+ {\n+ \"selector\": \"variable\",\n+ \"format\": [\"camelCase\", \"UPPER_CASE\"],\n+ \"filter\": {\n+ \"regex\": \"^DEFAULT_|^Log$\",\n+ \"match\": false\n+ },\n+ \"leadingUnderscore\": \"allow\",\n+ \"trailingUnderscore\": \"allow\"\n+ },\n+ {\n+ \"selector\": \"typeLike\",\n+ \"format\": [\"PascalCase\"]\n+ }\n+ ],\n\"@typescript-eslint/no-explicit-any\": \"off\",\n\"@typescript-eslint/no-unused-vars\": [\n\"error\",\n"
},
{
"change_type": "MODIFY",
"old_path": "packages/core/src/impl/browser/FetchTransport.ts",
"new_path": "packages/core/src/impl/browser/FetchTransport.ts",
"diff": "@@ -204,7 +204,7 @@ export default class FetchTransport implements Transport {\n...this.defaultHeaders,\n...headers,\n},\n- credentials: 'omit' as 'omit',\n+ credentials: 'omit' as const,\n// override with custom transport options\n...this.connectionOptions.transportOptions,\n// allow to specify custom options, such as signal, in SendOptions\n"
},
{
"change_type": "MODIFY",
"old_path": "packages/core/src/results/chunkCombiner.ts",
"new_path": "packages/core/src/results/chunkCombiner.ts",
"diff": "@@ -32,7 +32,10 @@ export interface ChunkCombiner {\n}\n// TextDecoder is available since node v8.3.0 and in all modern browsers\n-declare const TextDecoder: any\n+declare class TextDecoder {\n+ constructor(encoding: string)\n+ decode(chunk: Uint8Array): string\n+}\n/**\n* Creates a chunk combiner instance that uses UTF-8\n"
},
{
"change_type": "MODIFY",
"old_path": "packages/core/test/unit/QueryApi.test.ts",
"new_path": "packages/core/test/unit/QueryApi.test.ts",
"diff": "-/* eslint-disable @typescript-eslint/camelcase */\nimport {expect} from 'chai'\nimport nock from 'nock' // WARN: nock must be imported before NodeHttpTransport, since it modifies node's http\nimport {InfluxDB, ClientOptions, FluxTableMetaData} from '../../src'\n"
},
{
"change_type": "MODIFY",
"old_path": "packages/core/test/unit/impl/browser/emulateBrowser.ts",
"new_path": "packages/core/test/unit/impl/browser/emulateBrowser.ts",
"diff": "@@ -76,7 +76,7 @@ function createResponse({\n}\nlet beforeEmulation:\n- | {fetch: any; AbortController: any; TextEncoder: any}\n+ | {fetch: any; abortController: any; textEncoder: any}\n| undefined\nexport function emulateFetchApi(\n@@ -107,8 +107,8 @@ export function emulateFetchApi(\nif (!beforeEmulation) {\nbeforeEmulation = {\nfetch: globalVars.fetch,\n- AbortController: globalVars.AbortController,\n- TextEncoder: globalVars.TextEncoder,\n+ abortController: globalVars.AbortController,\n+ textEncoder: globalVars.TextEncoder,\n}\n}\nglobalVars.fetch = fetch\n@@ -117,11 +117,11 @@ export function emulateFetchApi(\n}\nexport function removeFetchApi(): void {\nif (beforeEmulation) {\n- const {fetch, AbortController, TextEncoder} = beforeEmulation\n+ const {fetch, abortController, textEncoder} = beforeEmulation\nbeforeEmulation = undefined\nconst globalVars = global as any\nglobalVars.fetch = fetch\n- globalVars.AbortController = AbortController\n- globalVars.TextEncoder = TextEncoder\n+ globalVars.abortController = abortController\n+ globalVars.textEncoder = textEncoder\n}\n}\n"
}
] | TypeScript | MIT License | influxdata/influxdb-client-js | chore: follow new eslint rules |
305,159 | 13.07.2022 05:31:08 | -7,200 | 6f12f3df00f3dd2577b2eddc95bb166ceebccde7 | fix(core): sanitize flux integer | [
{
"change_type": "MODIFY",
"old_path": "packages/core/src/query/flux.ts",
"new_path": "packages/core/src/query/flux.ts",
"diff": "@@ -139,16 +139,41 @@ export function fluxFloat(value: any): FluxParameterLike {\n}\n/**\n- * Creates a flux integer literal.\n+ * Sanitizes integer value to avoid injections.\n+ * @param value - InfluxDB integer literal\n+ * @returns sanitized integer value\n+ * @throws Error if the the value cannot be sanitized\n*/\n-export function fluxInteger(value: any): FluxParameterLike {\n- const val = sanitizeFloat(value)\n+export function sanitizeInteger(value: any): string {\n+ // https://docs.influxdata.com/flux/v0.x/data-types/basic/int/\n+ // Min value: -9223372036854775808\n+ // Max value: 9223372036854775807\n+ // \"9223372036854775807\".length === 19\n+ const strVal = String(value)\n+ const negative = strVal.startsWith('-')\n+ const val = negative ? strVal.substring(1) : strVal\n+ if (val.length === 0 || val.length > 19) {\n+ throw new Error(`not a flux integer: ${strVal}`)\n+ }\nfor (const c of val) {\n- if (c === '.') {\n- throw new Error(`not a flux integer: ${val}`)\n+ if (c < '0' || c > '9') throw new Error(`not a flux integer: ${strVal}`)\n+ }\n+ if (val.length === 19) {\n+ if (negative && val > '9223372036854775808') {\n+ throw new Error(`flux integer out of bounds: ${strVal}`)\n+ }\n+ if (!negative && val > '9223372036854775807') {\n+ throw new Error(`flux integer out of bounds: ${strVal}`)\n}\n}\n- return new FluxParameter(val)\n+ return strVal\n+}\n+\n+/**\n+ * Creates a flux integer literal.\n+ */\n+export function fluxInteger(value: any): FluxParameterLike {\n+ return new FluxParameter(sanitizeInteger(value))\n}\nfunction sanitizeDateTime(value: any): string {\n@@ -216,6 +241,9 @@ export function toFluxValue(value: any): string {\n} else if (typeof value === 'string') {\nreturn `\"${sanitizeString(value)}\"`\n} else if (typeof value === 'number') {\n+ if (Number.isSafeInteger(value)) {\n+ return sanitizeInteger(value)\n+ }\nreturn sanitizeFloat(value)\n} else if (typeof value === 'object') {\nif (typeof value[FLUX_VALUE] === 'function') {\n"
},
{
"change_type": "MODIFY",
"old_path": "packages/core/test/unit/query/flux.test.ts",
"new_path": "packages/core/test/unit/query/flux.test.ts",
"diff": "@@ -31,6 +31,15 @@ describe('Flux Values', () => {\nexpect(() => fluxInteger(NaN)).to.throw()\nexpect(() => fluxInteger(Infinity)).to.throw()\nexpect(() => fluxInteger(-Infinity)).to.throw()\n+ expect(() => fluxInteger('')).to.throw()\n+ expect(fluxInteger('-9223372036854775808').toString()).equals(\n+ '-9223372036854775808'\n+ )\n+ expect(() => fluxInteger('-9223372036854775809').toString()).throws()\n+ expect(fluxInteger('9223372036854775807').toString()).equals(\n+ '9223372036854775807'\n+ )\n+ expect(() => fluxInteger('9223372036854775808').toString()).throws()\n})\nit('creates fluxBool', () => {\nexpect(fluxBool('true').toString()).equals('true')\n"
}
] | TypeScript | MIT License | influxdata/influxdb-client-js | fix(core): sanitize flux integer |
305,159 | 13.07.2022 06:58:59 | -7,200 | 0871a7d085e66c5ddf33074c8fbfcf378db91654 | fit(core): repair flux float sanitizing | [
{
"change_type": "MODIFY",
"old_path": "packages/core/src/query/flux.ts",
"new_path": "packages/core/src/query/flux.ts",
"diff": "@@ -112,24 +112,26 @@ export function fluxString(value: any): FluxParameterLike {\n* @throws Error if the the value cannot be sanitized\n*/\nexport function sanitizeFloat(value: any): string {\n+ const val = Number(value)\n+ if (!isFinite(val)) {\nif (typeof value === 'number') {\n- if (!isFinite(value)) {\n- throw new Error(`not a flux float: ${value}`)\n+ return `float(v: \"${val}\")`\n}\n- return value.toString()\n+ throw new Error(`not a flux float: ${value}`)\n}\n- const val = String(value)\n- let dot = false\n- for (const c of val) {\n+ // try to return a flux float literal if possible\n+ // https://docs.influxdata.com/flux/v0.x/data-types/basic/float/#float-syntax\n+ const strVal = val.toString()\n+ let hasDot = false\n+ for (const c of strVal) {\n+ if ((c >= '0' && c <= '9') || c == '-') continue\nif (c === '.') {\n- if (dot) throw new Error(`not a flux float: ${val}`)\n- dot = !dot\n+ hasDot = true\ncontinue\n}\n- if (c !== '.' && c !== '-' && (c < '0' || c > '9'))\n- throw new Error(`not a flux float: ${val}`)\n+ return `float(v: \"${strVal}\")`\n}\n- return val\n+ return hasDot ? strVal : strVal + '.0'\n}\n/**\n* Creates a flux float literal.\n"
},
{
"change_type": "MODIFY",
"old_path": "packages/core/test/unit/query/flux.test.ts",
"new_path": "packages/core/test/unit/query/flux.test.ts",
"diff": "@@ -59,12 +59,19 @@ describe('Flux Values', () => {\nconst subject = fluxFloat(123.456)\nexpect(subject.toString()).equals('123.456')\nexpect((subject as any)[FLUX_VALUE]()).equals('123.456')\n- expect(fluxFloat('-123').toString()).equals('-123')\n+ expect(fluxFloat('-123').toString()).equals('-123.0')\n+ expect(fluxFloat(1e20).toString()).equals('100000000000000000000.0')\n+ expect(fluxFloat(1e-2).toString()).equals('0.01')\n+ expect(fluxFloat(1e21).toString()).equals('float(v: \"1e+21\")')\n+ expect(fluxFloat(1e-21).toString()).equals('float(v: \"1e-21\")')\n+ expect(fluxFloat(Infinity).toString()).equals('float(v: \"Infinity\")')\n+ expect(fluxFloat(-Infinity).toString()).equals('float(v: \"-Infinity\")')\n+ expect(fluxFloat(NaN).toString()).equals('float(v: \"NaN\")')\nexpect(() => fluxFloat('123..')).to.throw()\nexpect(() => fluxFloat('123.a')).to.throw()\n- expect(() => fluxFloat(NaN)).to.throw()\n- expect(() => fluxFloat(Infinity)).to.throw()\n- expect(() => fluxFloat(-Infinity)).to.throw()\n+ expect(() => fluxFloat({})).to.throw()\n+ expect(() => fluxFloat(undefined)).to.throw()\n+ expect(fluxFloat({toString: () => '1'}).toString()).equals('1.0')\n})\nit('creates fluxDuration', () => {\nconst subject = fluxDuration('1ms')\n@@ -101,6 +108,7 @@ describe('Flux Values', () => {\n{value: 1, flux: '1'},\n{value: 1.1, flux: '1.1'},\n{value: -1.1, flux: '-1.1'},\n+ {value: -1e-21, flux: 'float(v: \"-1e-21\")'},\n{value: 'a', flux: '\"a\"'},\n{value: new Date(1589521447471), flux: '2020-05-15T05:44:07.471Z'},\n{value: /abc/, flux: 'regexp.compile(v: \"/abc/\")'},\n"
}
] | TypeScript | MIT License | influxdata/influxdb-client-js | fit(core): repair flux float sanitizing |
305,159 | 13.07.2022 07:15:56 | -7,200 | 3d7917cf154420ee4d125815b5275d454e6d9f0b | fix(core): repair flux regexp sanitizing | [
{
"change_type": "MODIFY",
"old_path": "packages/core/src/query/flux.ts",
"new_path": "packages/core/src/query/flux.ts",
"diff": "@@ -197,7 +197,10 @@ export function fluxDuration(value: any): FluxParameterLike {\n}\nfunction sanitizeRegExp(value: any): string {\n- return `regexp.compile(v: \"${sanitizeString(value)}\")`\n+ if (value instanceof RegExp) {\n+ return value.toString()\n+ }\n+ return new RegExp(value).toString()\n}\n/**\n"
},
{
"change_type": "MODIFY",
"old_path": "packages/core/test/unit/query/flux.test.ts",
"new_path": "packages/core/test/unit/query/flux.test.ts",
"diff": "@@ -86,10 +86,8 @@ describe('Flux Values', () => {\nexpect((subject as any)[FLUX_VALUE]()).equals(fluxValue)\n})\nit('creates fluxRegExp', () => {\n- const subject = fluxRegExp('/abc/')\n- const fluxValue = 'regexp.compile(v: \"/abc/\")'\n- expect(subject.toString()).equals(fluxValue)\n- expect((subject as any)[FLUX_VALUE]()).equals(fluxValue)\n+ expect(fluxRegExp('abc').toString()).equals('/abc/')\n+ expect(fluxRegExp(/abc/i).toString()).equals('/abc/i')\n})\nit('creates fluxString', () => {\nconst subject = fluxString('abc')\n@@ -111,7 +109,7 @@ describe('Flux Values', () => {\n{value: -1e-21, flux: 'float(v: \"-1e-21\")'},\n{value: 'a', flux: '\"a\"'},\n{value: new Date(1589521447471), flux: '2020-05-15T05:44:07.471Z'},\n- {value: /abc/, flux: 'regexp.compile(v: \"/abc/\")'},\n+ {value: /abc/, flux: '/abc/'},\n{\nvalue: {\ntoString: function (): string {\n@@ -216,7 +214,7 @@ describe('Flux Tagged Template', () => {\nvalue: flux`${new Date(1589521447471)}`,\nflux: '2020-05-15T05:44:07.471Z',\n},\n- {value: flux`${/abc/}`, flux: 'regexp.compile(v: \"/abc/\")'},\n+ {value: flux`${/abc/}`, flux: '/abc/'},\n{\nvalue: flux`${{\ntoString: function (): string {\n"
}
] | TypeScript | MIT License | influxdata/influxdb-client-js | fix(core): repair flux regexp sanitizing |
305,159 | 13.07.2022 12:38:26 | -7,200 | 95747d203ec27663b734f209b26583b470fa0a41 | feat(core): support bigint in flux tagged template | [
{
"change_type": "MODIFY",
"old_path": "packages/core/src/query/flux.ts",
"new_path": "packages/core/src/query/flux.ts",
"diff": "@@ -262,8 +262,10 @@ export function toFluxValue(value: any): string {\n} else if (Array.isArray(value)) {\nreturn `[${value.map(toFluxValue).join(',')}]`\n}\n+ } else if (typeof value === 'bigint') {\n+ return `${value}.0`\n}\n- // use toString value for unrecognized object, bigint, symbol\n+ // use toString value for unrecognized object, symbol\nreturn toFluxValue(value.toString())\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "packages/core/test/unit/query/flux.test.ts",
"new_path": "packages/core/test/unit/query/flux.test.ts",
"diff": "@@ -40,6 +40,12 @@ describe('Flux Values', () => {\n'9223372036854775807'\n)\nexpect(() => fluxInteger('9223372036854775808').toString()).throws()\n+ expect(fluxInteger(BigInt('-9223372036854775808')).toString()).equals(\n+ '-9223372036854775808'\n+ )\n+ expect(fluxInteger(BigInt('9223372036854775807')).toString()).equals(\n+ '9223372036854775807'\n+ )\n})\nit('creates fluxBool', () => {\nexpect(fluxBool('true').toString()).equals('true')\n@@ -72,6 +78,7 @@ describe('Flux Values', () => {\nexpect(() => fluxFloat({})).to.throw()\nexpect(() => fluxFloat(undefined)).to.throw()\nexpect(fluxFloat({toString: () => '1'}).toString()).equals('1.0')\n+ expect(fluxFloat(BigInt('10')).toString()).equals('10.0')\n})\nit('creates fluxDuration', () => {\nconst subject = fluxDuration('1ms')\n@@ -126,6 +133,10 @@ describe('Flux Values', () => {\n{value: [], flux: '[]'},\n{value: ['a\"$d'], flux: '[\"a\\\\\"$d\"]'},\n{value: Symbol('thisSym'), flux: `\"${Symbol('thisSym').toString()}\"`},\n+ {\n+ value: BigInt('123456789123456789123456789'),\n+ flux: '123456789123456789123456789.0',\n+ },\n]\npairs.forEach((pair) => {\nit(`converts ${JSON.stringify(String(pair.value))} to '${\n"
}
] | TypeScript | MIT License | influxdata/influxdb-client-js | feat(core): support bigint in flux tagged template |
305,159 | 14.07.2022 08:57:13 | -7,200 | 58eb15f5452f077e1cc00c1f49d187c3398dee43 | chore(deps-dev): bump and | [
{
"change_type": "MODIFY",
"old_path": "package.json",
"new_path": "package.json",
"diff": "},\n\"license\": \"MIT\",\n\"dependencies\": {\n- \"@microsoft/api-documenter\": \"^7.13.34\",\n+ \"@microsoft/api-documenter\": \"^7.18.3\",\n\"gh-pages\": \"^3.1.0\",\n\"lerna\": \"^5.0.0\",\n\"prettier\": \"^2.7.1\",\n"
},
{
"change_type": "MODIFY",
"old_path": "packages/apis/package.json",
"new_path": "packages/apis/package.json",
"diff": "},\n\"devDependencies\": {\n\"@influxdata/influxdb-client\": \"^1.27.0\",\n- \"@microsoft/api-extractor\": \"^7.18.4\",\n+ \"@microsoft/api-extractor\": \"^7.28.4\",\n\"@types/node\": \"^16\",\n\"@typescript-eslint/eslint-plugin\": \"^5.29.0\",\n\"@typescript-eslint/parser\": \"^5.29.0\",\n"
},
{
"change_type": "MODIFY",
"old_path": "packages/core/package.json",
"new_path": "packages/core/package.json",
"diff": "},\n\"license\": \"MIT\",\n\"devDependencies\": {\n- \"@microsoft/api-extractor\": \"^7.18.4\",\n+ \"@microsoft/api-extractor\": \"^7.28.4\",\n\"@rollup/plugin-replace\": \"^2.3.0\",\n\"@types/chai\": \"^4.2.5\",\n\"@types/mocha\": \"^5.2.7\",\n"
},
{
"change_type": "MODIFY",
"old_path": "packages/giraffe/package.json",
"new_path": "packages/giraffe/package.json",
"diff": "\"devDependencies\": {\n\"@influxdata/giraffe\": \"*\",\n\"@influxdata/influxdb-client\": \"^1.27.0\",\n- \"@microsoft/api-extractor\": \"^7.18.4\",\n+ \"@microsoft/api-extractor\": \"^7.28.4\",\n\"@rollup/plugin-node-resolve\": \"^13.3.0\",\n\"@rollup/plugin-replace\": \"^2.3.0\",\n\"@types/chai\": \"^4.2.5\",\n"
},
{
"change_type": "MODIFY",
"old_path": "yarn.lock",
"new_path": "yarn.lock",
"diff": "npmlog \"^6.0.2\"\nwrite-file-atomic \"^3.0.3\"\n-\"@microsoft/api-documenter@^7.13.34\":\n- version \"7.17.1\"\n- resolved \"https://registry.yarnpkg.com/@microsoft/api-documenter/-/api-documenter-7.17.1.tgz#1237024d1f752213d63aea3b06449a6bf845c682\"\n- integrity sha512-Qjn+pQUoT/nuFgsf/IOBSWSDJyTStHo1jIbWxMfmwh62Zr9NB/OKBPNH+YwKt6NWq4Ds0Ajhurdind2Z8coBkg==\n- dependencies:\n- \"@microsoft/api-extractor-model\" \"7.16.0\"\n- \"@microsoft/tsdoc\" \"0.13.2\"\n- \"@rushstack/node-core-library\" \"3.45.1\"\n- \"@rushstack/ts-command-line\" \"4.10.7\"\n+\"@microsoft/api-documenter@^7.18.3\":\n+ version \"7.18.3\"\n+ resolved \"https://registry.yarnpkg.com/@microsoft/api-documenter/-/api-documenter-7.18.3.tgz#84e66ca2974379cec211125e664850a2b6f8a92d\"\n+ integrity sha512-B3quZHJ3ZRDO3iw+8NfTCHxQwmWltTz0GN3rCBBqNS2CpLgIUHM+lC7vUtb3VFkMeLAOK5eKB88qRNUqKA24pg==\n+ dependencies:\n+ \"@microsoft/api-extractor-model\" \"7.21.0\"\n+ \"@microsoft/tsdoc\" \"0.14.1\"\n+ \"@rushstack/node-core-library\" \"3.49.0\"\n+ \"@rushstack/ts-command-line\" \"4.12.1\"\ncolors \"~1.2.1\"\njs-yaml \"~3.13.1\"\nresolve \"~1.17.0\"\n-\"@microsoft/[email protected]\":\n- version \"7.16.0\"\n- resolved \"https://registry.yarnpkg.com/@microsoft/api-extractor-model/-/api-extractor-model-7.16.0.tgz#3db7360897115f26a857f1f684fb5af82b0ef9f6\"\n- integrity sha512-0FOrbNIny8mzBrzQnSIkEjAXk0JMSnPmWYxt3ZDTPVg9S8xIPzB6lfgTg9+Mimu0RKCpGKBpd+v2WcR5vGzyUQ==\n- dependencies:\n- \"@microsoft/tsdoc\" \"0.13.2\"\n- \"@microsoft/tsdoc-config\" \"~0.15.2\"\n- \"@rushstack/node-core-library\" \"3.45.1\"\n-\n-\"@microsoft/api-extractor@^7.18.4\":\n- version \"7.20.0\"\n- resolved \"https://registry.yarnpkg.com/@microsoft/api-extractor/-/api-extractor-7.20.0.tgz#5dfd8a2cc6a22a7b3baa5e30224672db1de43bbb\"\n- integrity sha512-WKAu5JpkRXWKL3AyxmFXuwNNPpBlsAefwZIDl8M5mhEqRji4w+gexb0pku3Waa0flm3vm0Cwpm+kGYYJ4/gzAA==\n- dependencies:\n- \"@microsoft/api-extractor-model\" \"7.16.0\"\n- \"@microsoft/tsdoc\" \"0.13.2\"\n- \"@microsoft/tsdoc-config\" \"~0.15.2\"\n- \"@rushstack/node-core-library\" \"3.45.1\"\n- \"@rushstack/rig-package\" \"0.3.8\"\n- \"@rushstack/ts-command-line\" \"4.10.7\"\n+\"@microsoft/[email protected]\":\n+ version \"7.21.0\"\n+ resolved \"https://registry.yarnpkg.com/@microsoft/api-extractor-model/-/api-extractor-model-7.21.0.tgz#2138682e738a14038d40165ec77362e69853f200\"\n+ integrity sha512-NN4mXzoQWTuzznIcnLWeV6tGyn6Os9frDK6M/mmTXZ73vUYOvSWoKQ5SYzyzP7HF3YtvTmr1Rs+DsBb0HRx7WQ==\n+ dependencies:\n+ \"@microsoft/tsdoc\" \"0.14.1\"\n+ \"@microsoft/tsdoc-config\" \"~0.16.1\"\n+ \"@rushstack/node-core-library\" \"3.49.0\"\n+\n+\"@microsoft/api-extractor@^7.28.4\":\n+ version \"7.28.4\"\n+ resolved \"https://registry.yarnpkg.com/@microsoft/api-extractor/-/api-extractor-7.28.4.tgz#8e67a69edb4937beda516d42d4f325e6e1258445\"\n+ integrity sha512-7JeROBGYTUt4/4HPnpMscsQgLzX0OfGTQR2qOQzzh3kdkMyxmiv2mzpuhoMnwbubb1GvPcyFm+NguoqOqkCVaw==\n+ dependencies:\n+ \"@microsoft/api-extractor-model\" \"7.21.0\"\n+ \"@microsoft/tsdoc\" \"0.14.1\"\n+ \"@microsoft/tsdoc-config\" \"~0.16.1\"\n+ \"@rushstack/node-core-library\" \"3.49.0\"\n+ \"@rushstack/rig-package\" \"0.3.13\"\n+ \"@rushstack/ts-command-line\" \"4.12.1\"\ncolors \"~1.2.1\"\nlodash \"~4.17.15\"\nresolve \"~1.17.0\"\nsemver \"~7.3.0\"\nsource-map \"~0.6.1\"\n- typescript \"~4.5.2\"\n+ typescript \"~4.6.3\"\n-\"@microsoft/[email protected]\":\n+\"@microsoft/[email protected]\", \"@microsoft/tsdoc-config@~0.16.1\":\nversion \"0.16.1\"\nresolved \"https://registry.yarnpkg.com/@microsoft/tsdoc-config/-/tsdoc-config-0.16.1.tgz#4de11976c1202854c4618f364bf499b4be33e657\"\nintegrity sha512-2RqkwiD4uN6MLnHFljqBlZIXlt/SaUT6cuogU1w2ARw4nKuuppSmR0+s+NC+7kXBQykd9zzu0P4HtBpZT5zBpQ==\njju \"~1.4.0\"\nresolve \"~1.19.0\"\n-\"@microsoft/tsdoc-config@~0.15.2\":\n- version \"0.15.2\"\n- resolved \"https://registry.yarnpkg.com/@microsoft/tsdoc-config/-/tsdoc-config-0.15.2.tgz#eb353c93f3b62ab74bdc9ab6f4a82bcf80140f14\"\n- integrity sha512-mK19b2wJHSdNf8znXSMYVShAHktVr/ib0Ck2FA3lsVBSEhSI/TfXT7DJQkAYgcztTuwazGcg58ZjYdk0hTCVrA==\n- dependencies:\n- \"@microsoft/tsdoc\" \"0.13.2\"\n- ajv \"~6.12.6\"\n- jju \"~1.4.0\"\n- resolve \"~1.19.0\"\n-\n-\"@microsoft/[email protected]\":\n- version \"0.13.2\"\n- resolved \"https://registry.yarnpkg.com/@microsoft/tsdoc/-/tsdoc-0.13.2.tgz#3b0efb6d3903bd49edb073696f60e90df08efb26\"\n- integrity sha512-WrHvO8PDL8wd8T2+zBGKrMwVL5IyzR3ryWUsl0PXgEV0QHup4mTLi0QcATefGI6Gx9Anu7vthPyyyLpY0EpiQg==\n-\n\"@microsoft/[email protected]\":\nversion \"0.14.1\"\nresolved \"https://registry.yarnpkg.com/@microsoft/tsdoc/-/tsdoc-0.14.1.tgz#155ef21065427901994e765da8a0ba0eaae8b8bd\"\nestree-walker \"^1.0.1\"\npicomatch \"^2.2.2\"\n-\"@rushstack/[email protected]\":\n- version \"3.45.1\"\n- resolved \"https://registry.yarnpkg.com/@rushstack/node-core-library/-/node-core-library-3.45.1.tgz#787361b61a48d616eb4b059641721a3dc138f001\"\n- integrity sha512-BwdssTNe007DNjDBxJgInHg8ePytIPyT0La7ZZSQZF9+rSkT42AygXPGvbGsyFfEntjr4X37zZSJI7yGzL16cQ==\n+\"@rushstack/[email protected]\":\n+ version \"3.49.0\"\n+ resolved \"https://registry.yarnpkg.com/@rushstack/node-core-library/-/node-core-library-3.49.0.tgz#0324c1a5ba5e469967b70e9718d1a90750648503\"\n+ integrity sha512-yBJRzGgUNFwulVrwwBARhbGaHsxVMjsZ9JwU1uSBbqPYCdac+t2HYdzi4f4q/Zpgb0eNbwYj2yxgHYpJORNEaw==\ndependencies:\n\"@types/node\" \"12.20.24\"\ncolors \"~1.2.1\"\ntimsort \"~0.3.0\"\nz-schema \"~5.0.2\"\n-\"@rushstack/[email protected]\":\n- version \"0.3.8\"\n- resolved \"https://registry.yarnpkg.com/@rushstack/rig-package/-/rig-package-0.3.8.tgz#0e8b2fbc7a35d96f6ccf34e773f7c1adb1524296\"\n- integrity sha512-MDWg1xovea99PWloSiYMjFcCLsrdjFtYt6aOyHNs5ojn5mxrzR6U9F83hvbQjTWnKPMvZtr0vcek+4n+OQOp3Q==\n+\"@rushstack/[email protected]\":\n+ version \"0.3.13\"\n+ resolved \"https://registry.yarnpkg.com/@rushstack/rig-package/-/rig-package-0.3.13.tgz#80d7b34bc9b7a7feeba133f317df8dbd1f65a822\"\n+ integrity sha512-4/2+yyA/uDl7LQvtYtFs1AkhSWuaIGEKhP9/KK2nNARqOVc5eCXmu1vyOqr5mPvNq7sHoIR+sG84vFbaKYGaDA==\ndependencies:\nresolve \"~1.17.0\"\nstrip-json-comments \"~3.1.1\"\n-\"@rushstack/[email protected]\":\n- version \"4.10.7\"\n- resolved \"https://registry.yarnpkg.com/@rushstack/ts-command-line/-/ts-command-line-4.10.7.tgz#21e3757a756cbd4f7eeab8f89ec028a64d980efc\"\n- integrity sha512-CjS+DfNXUSO5Ab2wD1GBGtUTnB02OglRWGqfaTcac9Jn45V5MeUOsq/wA8wEeS5Y/3TZ2P1k+IWdVDiuOFP9Og==\n+\"@rushstack/[email protected]\":\n+ version \"4.12.1\"\n+ resolved \"https://registry.yarnpkg.com/@rushstack/ts-command-line/-/ts-command-line-4.12.1.tgz#4437ffae6459eb88791625ad9e89b2f0ba254476\"\n+ integrity sha512-S1Nev6h/kNnamhHeGdp30WgxZTA+B76SJ/P721ctP7DrnC+rrjAc6h/R80I4V0cA2QuEEcMdVOQCtK2BTjsOiQ==\ndependencies:\n\"@types/argparse\" \"1.0.38\"\nargparse \"~1.0.9\"\n@@ -6308,10 +6293,10 @@ typescript@^4.7.4:\nresolved \"https://registry.yarnpkg.com/typescript/-/typescript-4.7.4.tgz#1a88596d1cf47d59507a1bcdfb5b9dfe4d488235\"\nintegrity sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==\n-typescript@~4.5.2:\n- version \"4.5.5\"\n- resolved \"https://registry.yarnpkg.com/typescript/-/typescript-4.5.5.tgz#d8c953832d28924a9e3d37c73d729c846c5896f3\"\n- integrity sha512-TCTIul70LyWe6IJWT8QSYeA54WQe8EjQFU4wY52Fasj5UKx88LNYKCgBEHcOMOrFF1rKGbD8v/xcNWVUq9SymA==\n+typescript@~4.6.3:\n+ version \"4.6.4\"\n+ resolved \"https://registry.yarnpkg.com/typescript/-/typescript-4.6.4.tgz#caa78bbc3a59e6a5c510d35703f6a09877ce45e9\"\n+ integrity sha512-9ia/jWHIEbo49HfjrLGfKbZSuWo9iTMwXO+Ca3pRsSpbsMbc7/IU8NKdCZVRRBafVPGnoJeFL76ZOAA84I9fEg==\ntypical@^4.0.0:\nversion \"4.0.0\"\n"
}
] | TypeScript | MIT License | influxdata/influxdb-client-js | chore(deps-dev): bump @microsoft/api-extractor and @microsoft/api-documenter |
305,159 | 14.07.2022 09:21:38 | -7,200 | c6aba74f0d0040f284a4fe0b93d803bfb9e5fe71 | chore: remove version-bump-prompt | [
{
"change_type": "MODIFY",
"old_path": "packages/core/package.json",
"new_path": "packages/core/package.json",
"diff": "\"rxjs\": \"^7.2.0\",\n\"sinon\": \"^7.5.0\",\n\"ts-node\": \"^10.8.1\",\n- \"typescript\": \"^4.7.4\",\n- \"version-bump-prompt\": \"^6.1.0\"\n+ \"typescript\": \"^4.7.4\"\n}\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "yarn.lock",
"new_path": "yarn.lock",
"diff": "\"@jridgewell/resolve-uri\" \"^3.0.3\"\n\"@jridgewell/sourcemap-codec\" \"^1.4.10\"\n-\"@jsdevtools/ez-spawn@^3.0.4\":\n- version \"3.0.4\"\n- resolved \"https://registry.yarnpkg.com/@jsdevtools/ez-spawn/-/ez-spawn-3.0.4.tgz#5641eb26fee6d31ec29f6788eba849470c52c7ff\"\n- integrity sha512-f5DRIOZf7wxogefH03RjMPMdBF7ADTWUMoOs9kaJo06EfwF+aFhMZMDZxHg/Xe12hptN9xoZjGso2fdjapBRIA==\n- dependencies:\n- call-me-maybe \"^1.0.1\"\n- cross-spawn \"^7.0.3\"\n- string-argv \"^0.3.1\"\n- type-detect \"^4.0.8\"\n-\n-\"@jsdevtools/[email protected]\":\n- version \"6.1.0\"\n- resolved \"https://registry.yarnpkg.com/@jsdevtools/version-bump-prompt/-/version-bump-prompt-6.1.0.tgz#5b796c05db9dd2c4e5c01b8674bbae9c98ea0e79\"\n- integrity sha512-NJFLJRiD3LLFBgSxAb6B255xhWCGgdtzmh6UjHK2b7SRGX2DDKJH5O4BJ0GTStBu4NnaNgMbkr1TLW3pLOBkOQ==\n- dependencies:\n- \"@jsdevtools/ez-spawn\" \"^3.0.4\"\n- command-line-args \"^5.1.1\"\n- detect-indent \"^6.0.0\"\n- detect-newline \"^3.1.0\"\n- globby \"^11.0.1\"\n- inquirer \"^7.3.3\"\n- log-symbols \"^4.0.0\"\n- semver \"^7.3.2\"\n-\n\"@lerna/[email protected]\":\nversion \"5.1.8\"\nresolved \"https://registry.yarnpkg.com/@lerna/add/-/add-5.1.8.tgz#9710a838cb1616cf84c47e85aab5a7cc5a36ce21\"\n@@ -1791,11 +1767,6 @@ argparse@^2.0.1:\nresolved \"https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38\"\nintegrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==\n-array-back@^3.0.1, array-back@^3.1.0:\n- version \"3.1.0\"\n- resolved \"https://registry.yarnpkg.com/array-back/-/array-back-3.1.0.tgz#b8859d7a508871c9a7b2cf42f99428f65e96bfb0\"\n- integrity sha512-TkuxA4UCOvxuDK6NZYXCalszEzj+TLszyASooky+i742l9TqsOdYCMJJupxRic61hwquNtppB3hgcuq9SVSH1Q==\n-\narray-differ@^3.0.0:\nversion \"3.0.0\"\nresolved \"https://registry.yarnpkg.com/array-differ/-/array-differ-3.0.0.tgz#3cbb3d0f316810eafcc47624734237d6aee4ae6b\"\n@@ -2013,11 +1984,6 @@ call-bind@^1.0.0, call-bind@^1.0.2:\nfunction-bind \"^1.1.1\"\nget-intrinsic \"^1.0.2\"\n-call-me-maybe@^1.0.1:\n- version \"1.0.1\"\n- resolved \"https://registry.yarnpkg.com/call-me-maybe/-/call-me-maybe-1.0.1.tgz#26d208ea89e37b5cbde60250a15f031c16a4d66b\"\n- integrity sha1-JtII6onje1y95gJQoV8DHBak1ms=\n-\ncallsites@^3.0.0:\nversion \"3.1.0\"\nresolved \"https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73\"\n@@ -2216,16 +2182,6 @@ columnify@^1.6.0:\nstrip-ansi \"^6.0.1\"\nwcwidth \"^1.0.0\"\n-command-line-args@^5.1.1:\n- version \"5.2.1\"\n- resolved \"https://registry.yarnpkg.com/command-line-args/-/command-line-args-5.2.1.tgz#c44c32e437a57d7c51157696893c5909e9cec42e\"\n- integrity sha512-H4UfQhZyakIjC74I9d34fGYDwk3XpSr17QhEd0Q3I9Xq1CETHo4Hcuo87WyWHpAF1aSLjLRf5lD9ZGX2qStUvg==\n- dependencies:\n- array-back \"^3.1.0\"\n- find-replace \"^3.0.0\"\n- lodash.camelcase \"^4.3.0\"\n- typical \"^4.0.0\"\n-\ncommander@^2.18.0, commander@^2.20.0, commander@^2.7.1:\nversion \"2.20.3\"\nresolved \"https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33\"\n@@ -2533,11 +2489,6 @@ detect-indent@^6.0.0:\nresolved \"https://registry.yarnpkg.com/detect-indent/-/detect-indent-6.1.0.tgz#592485ebbbf6b3b1ab2be175c8393d04ca0d57e6\"\nintegrity sha512-reYkTUJAZb9gUuZ2RvVCNhVHdg62RHnJ7WJl8ftMi4diZ6NWlciOzQN88pUhSELEwflJht4oQDv0F0BMlwaYtA==\n-detect-newline@^3.1.0:\n- version \"3.1.0\"\n- resolved \"https://registry.yarnpkg.com/detect-newline/-/detect-newline-3.1.0.tgz#576f5dfc63ae1a192ff192d8ad3af6308991b651\"\n- integrity sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==\n-\ndezalgo@^1.0.0:\nversion \"1.0.3\"\nresolved \"https://registry.yarnpkg.com/dezalgo/-/dezalgo-1.0.3.tgz#7f742de066fc748bc8db820569dddce49bf0d456\"\n@@ -2953,13 +2904,6 @@ find-cache-dir@^3.2.0, find-cache-dir@^3.3.1:\nmake-dir \"^3.0.2\"\npkg-dir \"^4.1.0\"\n-find-replace@^3.0.0:\n- version \"3.0.0\"\n- resolved \"https://registry.yarnpkg.com/find-replace/-/find-replace-3.0.0.tgz#3e7e23d3b05167a76f770c9fbd5258b0def68c38\"\n- integrity sha512-6Tb2myMioCAgv5kfvP5/PkZZ/ntTpVK39fHY7WkWBgvbeE+VHd/tZuZ4mrC+bxh4cfOZeYKVPaJIZtZXV7GNCQ==\n- dependencies:\n- array-back \"^3.0.1\"\n-\[email protected], find-up@^3.0.0:\nversion \"3.0.0\"\nresolved \"https://registry.yarnpkg.com/find-up/-/find-up-3.0.0.tgz#49169f1d7993430646da61ecc5ae355c21c97b73\"\n@@ -3278,7 +3222,7 @@ globals@^13.15.0:\ndependencies:\ntype-fest \"^0.20.2\"\n-globby@^11.0.1, globby@^11.0.2, globby@^11.1.0:\n+globby@^11.0.2, globby@^11.1.0:\nversion \"11.1.0\"\nresolved \"https://registry.yarnpkg.com/globby/-/globby-11.1.0.tgz#bd4be98bb042f83d796f7e3811991fbe82a0d34b\"\nintegrity sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==\n@@ -3779,11 +3723,6 @@ is-typedarray@^1.0.0:\nresolved \"https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a\"\nintegrity sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=\n-is-unicode-supported@^0.1.0:\n- version \"0.1.0\"\n- resolved \"https://registry.yarnpkg.com/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz#3f26c76a809593b52bfa2ecb5710ed2779b522a7\"\n- integrity sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==\n-\nis-weakref@^1.0.2:\nversion \"1.0.2\"\nresolved \"https://registry.yarnpkg.com/is-weakref/-/is-weakref-1.0.2.tgz#9529f383a9338205e89765e0392efc2f100f06f2\"\n@@ -4101,11 +4040,6 @@ locate-path@^5.0.0:\ndependencies:\np-locate \"^4.1.0\"\n-lodash.camelcase@^4.3.0:\n- version \"4.3.0\"\n- resolved \"https://registry.yarnpkg.com/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz#b28aa6288a2b9fc651035c7711f65ab6190331a6\"\n- integrity sha1-soqmKIorn8ZRA1x3EfZathkDMaY=\n-\nlodash.flattendeep@^4.4.0:\nversion \"4.4.0\"\nresolved \"https://registry.yarnpkg.com/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz#fb030917f86a3134e5bc9bec0d69e0013ddfedb2\"\n@@ -4143,14 +4077,6 @@ [email protected]:\ndependencies:\nchalk \"^2.0.1\"\n-log-symbols@^4.0.0:\n- version \"4.1.0\"\n- resolved \"https://registry.yarnpkg.com/log-symbols/-/log-symbols-4.1.0.tgz#3fbdbb95b4683ac9fc785111e792e558d4abd503\"\n- integrity sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==\n- dependencies:\n- chalk \"^4.1.0\"\n- is-unicode-supported \"^0.1.0\"\n-\nlolex@^4.2.0:\nversion \"4.2.0\"\nresolved \"https://registry.yarnpkg.com/lolex/-/lolex-4.2.0.tgz#ddbd7f6213ca1ea5826901ab1222b65d714b3cd7\"\n@@ -5686,7 +5612,7 @@ semver@^6.0.0, semver@^6.3.0:\nresolved \"https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d\"\nintegrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==\n-semver@^7.0.0, semver@^7.3.2, semver@^7.3.7:\n+semver@^7.0.0, semver@^7.3.7:\nversion \"7.3.7\"\nresolved \"https://registry.yarnpkg.com/semver/-/semver-7.3.7.tgz#12c5b649afdbf9049707796e22a4028814ce523f\"\nintegrity sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==\n@@ -5916,7 +5842,7 @@ ssri@^9.0.0:\ndependencies:\nminipass \"^3.1.1\"\n-string-argv@^0.3.1, string-argv@~0.3.1:\n+string-argv@~0.3.1:\nversion \"0.3.1\"\nresolved \"https://registry.yarnpkg.com/string-argv/-/string-argv-0.3.1.tgz#95e2fbec0427ae19184935f816d74aaa4c5c19da\"\nintegrity sha512-a1uQGz7IyVy9YwhqjZIZu1c8JO8dNIe20xBmSS6qu9kv++k3JGzCVmprbNN5Kn+BgzD5E7YYwg1CcjuJMRNsvg==\n@@ -6239,7 +6165,7 @@ type-check@^0.4.0, type-check@~0.4.0:\ndependencies:\nprelude-ls \"^1.2.1\"\[email protected], type-detect@^4.0.0, type-detect@^4.0.5, type-detect@^4.0.8:\[email protected], type-detect@^4.0.0, type-detect@^4.0.5:\nversion \"4.0.8\"\nresolved \"https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c\"\nintegrity sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==\n@@ -6296,11 +6222,6 @@ typescript@~4.6.3:\nresolved \"https://registry.yarnpkg.com/typescript/-/typescript-4.6.4.tgz#caa78bbc3a59e6a5c510d35703f6a09877ce45e9\"\nintegrity sha512-9ia/jWHIEbo49HfjrLGfKbZSuWo9iTMwXO+Ca3pRsSpbsMbc7/IU8NKdCZVRRBafVPGnoJeFL76ZOAA84I9fEg==\n-typical@^4.0.0:\n- version \"4.0.0\"\n- resolved \"https://registry.yarnpkg.com/typical/-/typical-4.0.0.tgz#cbeaff3b9d7ae1e2bbfaf5a4e6f11eccfde94fc4\"\n- integrity sha512-VAH4IvQ7BDFYglMd7BPRDfLgxZZX4O4TFcRDA6EN5X7erNJJq+McIEp8np9aVtxrCJ6qx4GTYVfOWNjcqwZgRw==\n-\nuglify-js@^3.1.4:\nversion \"3.15.3\"\nresolved \"https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.15.3.tgz#9aa82ca22419ba4c0137642ba0df800cb06e0471\"\n@@ -6409,13 +6330,6 @@ validator@^13.7.0:\nresolved \"https://registry.yarnpkg.com/validator/-/validator-13.7.0.tgz#4f9658ba13ba8f3d82ee881d3516489ea85c0857\"\nintegrity sha512-nYXQLCBkpJ8X6ltALua9dRrZDHVYxjJ1wgskNt1lH9fzGjs3tgojGSCBjmEPwkWS1y29+DrizMTW19Pr9uB2nw==\n-version-bump-prompt@^6.1.0:\n- version \"6.1.0\"\n- resolved \"https://registry.yarnpkg.com/version-bump-prompt/-/version-bump-prompt-6.1.0.tgz#9f57b9bf3e57ee87f43929ff4f3f2123be07ccdb\"\n- integrity sha512-GYC83GP8QOunWueKf2mbtZkdmisXhnBZPhIHWUmN/Yi4XXAQlIi9avM/IGWdI7KkJLfMENzGN1Xee+Zl3VJ5jg==\n- dependencies:\n- \"@jsdevtools/version-bump-prompt\" \"6.1.0\"\n-\nwalk-up-path@^1.0.0:\nversion \"1.0.0\"\nresolved \"https://registry.yarnpkg.com/walk-up-path/-/walk-up-path-1.0.0.tgz#d4745e893dd5fd0dbb58dd0a4c6a33d9c9fec53e\"\n"
}
] | TypeScript | MIT License | influxdata/influxdb-client-js | chore: remove version-bump-prompt |
305,159 | 14.07.2022 09:35:19 | -7,200 | f640d95375ac7508b36793d4d02e192d9460c5d3 | chore(test): use nock's delayConnection after upgrade | [
{
"change_type": "MODIFY",
"old_path": "packages/core/test/unit/impl/node/NodeHttpTransport.test.ts",
"new_path": "packages/core/test/unit/impl/node/NodeHttpTransport.test.ts",
"diff": "@@ -302,7 +302,7 @@ describe('NodeHttpTransport', () => {\nit(`fails on socket timeout`, async () => {\nnock(transportOptions.url)\n.get('/test')\n- .socketDelay(2000)\n+ .delayConnection(2000)\n.reply(200, 'ok')\nawait sendTestData({...transportOptions, timeout: 100}, {method: 'GET'})\n.then(() => {\n@@ -452,7 +452,7 @@ describe('NodeHttpTransport', () => {\nit(`is cancelled before the response arrives`, async () => {\nnock(transportOptions.url)\n.get('/test')\n- .socketDelay(2000)\n+ .delayConnection(2000)\n.reply(200, 'yes')\n.persist()\nawait sendTestData(\n"
}
] | TypeScript | MIT License | influxdata/influxdb-client-js | chore(test): use nock's delayConnection after upgrade |
305,159 | 18.07.2022 07:55:41 | -7,200 | b7de2e727c3f1118bb9ad77df57f9c82d1de0216 | chore: remove unsued plugin | [
{
"change_type": "MODIFY",
"old_path": "packages/giraffe/package.json",
"new_path": "packages/giraffe/package.json",
"diff": "\"@influxdata/influxdb-client\": \"^1.27.0\",\n\"@microsoft/api-extractor\": \"^7.28.4\",\n\"@rollup/plugin-node-resolve\": \"^13.3.0\",\n- \"@rollup/plugin-replace\": \"^2.3.0\",\n\"@types/chai\": \"^4.2.5\",\n\"@types/mocha\": \"^5.2.7\",\n\"@types/node\": \"^18\",\n"
}
] | TypeScript | MIT License | influxdata/influxdb-client-js | chore: remove unsued plugin |
305,159 | 18.07.2022 08:01:22 | -7,200 | b20ec51dcaed9461fa24a8ae6fe0154676fd32bf | fix: reorder package export to use browser when required | [
{
"change_type": "MODIFY",
"old_path": "packages/apis/package.json",
"new_path": "packages/apis/package.json",
"diff": "\"exports\": {\n\".\": {\n\"types\": \"./dist/all.d.ts\",\n- \"import\": \"./dist/index.mjs\",\n- \"require\": \"./dist/index.js\",\n- \"deno\": \"./dist/index.mjs\",\n\"browser\": {\n\"import\": \"./dist/index.mjs\",\n\"require\": \"./dist/index.js\",\n\"umd\": \"./dist/index.browser.js\",\n\"script\": \"./dist/influxdbApis.js\"\n- }\n+ },\n+ \"deno\": \"./dist/index.mjs\",\n+ \"import\": \"./dist/index.mjs\",\n+ \"require\": \"./dist/index.js\"\n}\n},\n\"homepage\": \"https://github.com/influxdata/influxdb-client-js\",\n"
},
{
"change_type": "MODIFY",
"old_path": "packages/core-browser/package.json",
"new_path": "packages/core-browser/package.json",
"diff": "\"exports\": {\n\".\": {\n\"types\": \"./dist/all.d.ts\",\n- \"import\": \"./dist/index.browser.mjs\",\n- \"require\": \"./dist/index.browser.js\",\n- \"deno\": \"./dist/index.browser.mjs\",\n- \"node\": {\n- \"import\": \"./dist/index.mjs\",\n- \"require\": \"./dist/index.js\"\n- },\n\"browser\": {\n\"import\": \"./dist/index.browser.mjs\",\n\"require\": \"./dist/index.browser.js\",\n\"script\": \"./dist/influxdb.js\",\n\"umd\": \"./dist/index.browser.js\"\n- }\n+ },\n+ \"deno\": \"./dist/index.browser.mjs\",\n+ \"import\": \"./dist/index.browser.mjs\",\n+ \"require\": \"./dist/index.browser.js\"\n}\n},\n\"homepage\": \"https://github.com/influxdata/influxdb-client-js\",\n"
},
{
"change_type": "MODIFY",
"old_path": "packages/core/package.json",
"new_path": "packages/core/package.json",
"diff": "\"exports\": {\n\".\": {\n\"types\": \"./dist/all.d.ts\",\n- \"import\": \"./dist/index.mjs\",\n- \"require\": \"./dist/index.js\",\n- \"deno\": \"./dist/index.browser.mjs\",\n\"browser\": {\n\"import\": \"./dist/index.browser.mjs\",\n\"require\": \"./dist/index.browser.js\",\n\"script\": \"./dist/influxdb.js\",\n\"default\": \"./dist/index.browser.js\"\n- }\n+ },\n+ \"deno\": \"./dist/index.browser.mjs\",\n+ \"import\": \"./dist/index.mjs\",\n+ \"require\": \"./dist/index.js\"\n}\n},\n\"homepage\": \"https://github.com/influxdata/influxdb-client-js\",\n"
}
] | TypeScript | MIT License | influxdata/influxdb-client-js | fix: reorder package export to use browser when required |
305,159 | 18.07.2022 08:02:12 | -7,200 | 15ef44564fe4a401b8d9ac0e24b543bcff5293bf | fix(build): rely upon rollup resolve exports support | [
{
"change_type": "MODIFY",
"old_path": "packages/giraffe/rollup.config.js",
"new_path": "packages/giraffe/rollup.config.js",
"diff": "@@ -23,7 +23,7 @@ function createConfig({format, out, name, target, noTerser}) {\n}),\n// @influxdata/influxdb-client (core) package uses `module:browser`\n// property in its package.json to point to an ES module created for the browser\n- resolve({mainFields: ['module:browser']}),\n+ resolve({browser: true}),\nnoTerser ? undefined : terser(),\ngzip(),\n],\n"
}
] | TypeScript | MIT License | influxdata/influxdb-client-js | fix(build): rely upon rollup resolve exports support |
305,159 | 18.07.2022 08:34:56 | -7,200 | 2caeb8f37ff5e458673b3bf3aefd6a046dddd872 | feat(build): fail after warnings | [
{
"change_type": "MODIFY",
"old_path": "packages/apis/package.json",
"new_path": "packages/apis/package.json",
"diff": "\"description\": \"InfluxDB 2.x generated APIs\",\n\"scripts\": {\n\"apidoc:extract\": \"api-extractor run\",\n- \"build\": \"yarn run clean && yarn run lint && rollup -c\",\n+ \"build\": \"yarn run clean && yarn run lint && rollup --failAfterWarnings -c\",\n\"clean\": \"rimraf build doc dist reports\",\n\"clean:apis\": \"rimraf src/generated/*API.ts\",\n\"generate\": \"yarn ts-node generator && yarn prettier --write src/generated/*.ts\",\n"
},
{
"change_type": "MODIFY",
"old_path": "packages/core/package.json",
"new_path": "packages/core/package.json",
"diff": "\"description\": \"InfluxDB 2.x client\",\n\"scripts\": {\n\"apidoc:extract\": \"api-extractor run\",\n- \"build\": \"yarn run clean && rollup -c\",\n+ \"build\": \"yarn run clean && rollup --failAfterWarnings -c\",\n\"clean\": \"rimraf dist build coverage .nyc_output doc *.lcov reports\",\n\"coverage\": \"nyc mocha --require ts-node/register 'test/**/*.test.ts' --exit\",\n\"coverage:ci\": \"yarn run coverage && yarn run coverage:lcov\",\n"
},
{
"change_type": "MODIFY",
"old_path": "packages/giraffe/package.json",
"new_path": "packages/giraffe/package.json",
"diff": "\"description\": \"InfluxDB 2.x client - giraffe integration\",\n\"scripts\": {\n\"apidoc:extract\": \"api-extractor run\",\n- \"build\": \"yarn run clean && rollup -c\",\n+ \"build\": \"yarn run clean && rollup --failAfterWarnings -c\",\n\"clean\": \"rimraf dist build coverage .nyc_output doc *.lcov reports\",\n\"coverage\": \"nyc mocha --require ts-node/register 'test/**/*.test.ts' --exit\",\n\"coverage:ci\": \"yarn run coverage && yarn run coverage:lcov\",\n"
}
] | TypeScript | MIT License | influxdata/influxdb-client-js | feat(build): fail after warnings |
305,159 | 18.07.2022 09:02:04 | -7,200 | 70c6422280eb0423fb73571e17122d14178a8a16 | chore: remove old comments | [
{
"change_type": "MODIFY",
"old_path": "packages/giraffe/rollup.config.js",
"new_path": "packages/giraffe/rollup.config.js",
"diff": "@@ -21,8 +21,6 @@ function createConfig({format, out, name, target, noTerser}) {\n},\n},\n}),\n- // @influxdata/influxdb-client (core) package uses `module:browser`\n- // property in its package.json to point to an ES module created for the browser\nresolve({browser: true}),\nnoTerser ? undefined : terser(),\ngzip(),\n"
}
] | TypeScript | MIT License | influxdata/influxdb-client-js | chore: remove old comments |
305,160 | 29.07.2022 15:14:19 | -7,200 | 4b69f8d3a61c88b2cf14cd1c6945b19a35fc7914 | fix: Module '"chalk"' has no exported member 'yellow' | [
{
"change_type": "MODIFY",
"old_path": "packages/apis/generator/logger.ts",
"new_path": "packages/apis/generator/logger.ts",
"diff": "-import {yellow} from 'chalk'\n+import chalk from 'chalk'\n/* eslint-disable no-console */\nconst logger = {\nwarn(message: string, ...otherParameters: any[]): void {\n- message = yellow(message)\n+ message = chalk.yellow(message)\nif (otherParameters.length) {\nconsole.warn(message, ...otherParameters)\n} else {\n"
}
] | TypeScript | MIT License | influxdata/influxdb-client-js | fix: Module '"chalk"' has no exported member 'yellow' (#494) |
305,159 | 29.07.2022 16:09:18 | -7,200 | 75fc77b3687d36274fa11309cefeecea72d1a2e3 | fix(ci): add api typecheck to test:ci target | [
{
"change_type": "MODIFY",
"old_path": "packages/apis/package.json",
"new_path": "packages/apis/package.json",
"diff": "\"generate\": \"yarn ts-node generator && yarn prettier --write src/generated/*.ts\",\n\"test\": \"yarn run lint && yarn run typecheck && yarn run test:unit\",\n\"test:unit\": \"mocha --require ts-node/register 'test/unit/**/*.test.ts' --exit\",\n- \"test:ci\": \"yarn run lint:ci && yarn run test:unit --reporter mocha-junit-reporter --reporter-options mochaFile=../../reports/apis_mocha/test-results.xml\",\n+ \"test:ci\": \"yarn run typecheck && yarn run lint:ci && yarn run test:unit --reporter mocha-junit-reporter --reporter-options mochaFile=../../reports/apis_mocha/test-results.xml\",\n\"typecheck\": \"tsc --noEmit --pretty\",\n\"lint\": \"eslint 'src/**/*.ts'\",\n\"lint:ci\": \"yarn run lint --format junit --output-file ../../reports/apis_eslint/eslint.xml\",\n"
}
] | TypeScript | MIT License | influxdata/influxdb-client-js | fix(ci): add api typecheck to test:ci target |
305,159 | 01.08.2022 07:25:58 | -7,200 | 944457442a6af35e448dacb7353e1c0a7518a64d | chore: add mocha-junit-reporter to dependencies | [
{
"change_type": "MODIFY",
"old_path": "packages/apis/package.json",
"new_path": "packages/apis/package.json",
"diff": "\"eslint-plugin-prettier\": \"^4.2.1\",\n\"eslint-plugin-tsdoc\": \"^0.2.16\",\n\"mocha\": \"^10.0.0\",\n+ \"mocha-junit-reporter\": \"^2.0.2\",\n\"nock\": \"^13.2.8\",\n\"prettier\": \"^2.7.1\",\n\"rimraf\": \"^3.0.0\",\n"
}
] | TypeScript | MIT License | influxdata/influxdb-client-js | chore: add mocha-junit-reporter to dependencies |
305,159 | 01.08.2022 07:31:40 | -7,200 | 7828b1547fbe8bf273d098217ef02dfb4080b396 | chore: add to deps | [
{
"change_type": "MODIFY",
"old_path": "packages/apis/package.json",
"new_path": "packages/apis/package.json",
"diff": "\"devDependencies\": {\n\"@influxdata/influxdb-client\": \"^1.28.0\",\n\"@microsoft/api-extractor\": \"^7.28.4\",\n+ \"@types/mocha\": \"^9.1.1\",\n\"@typescript-eslint/eslint-plugin\": \"^5.29.0\",\n\"@typescript-eslint/parser\": \"^5.29.0\",\n\"chai\": \"^4.2.0\",\n"
},
{
"change_type": "MODIFY",
"old_path": "yarn.lock",
"new_path": "yarn.lock",
"diff": "@@ -4180,7 +4180,7 @@ [email protected]:\nis-plain-obj \"^1.1.0\"\nkind-of \"^6.0.3\"\n-minimist@>=1.2.2, minimist@^1.2.0, minimist@^1.2.5, minimist@^1.2.6:\n+minimist@^1.2.0, minimist@^1.2.5, minimist@^1.2.6:\nversion \"1.2.6\"\nresolved \"https://registry.yarnpkg.com/minimist/-/minimist-1.2.6.tgz#8637a5b759ea0d6e98702cfb3a9283323c93af44\"\nintegrity sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==\n"
}
] | TypeScript | MIT License | influxdata/influxdb-client-js | chore: add @types/mocha to deps |
305,159 | 01.08.2022 07:38:01 | -7,200 | e08580b1b54136936c137b0e87ed78daf90ebd0c | chore: update dependabot PR limit | [
{
"change_type": "MODIFY",
"old_path": ".github/dependabot.yml",
"new_path": ".github/dependabot.yml",
"diff": "version: 2\nupdates:\n- - package-ecosystem: \"npm\"\n- directory: \"/\"\n+ - package-ecosystem: 'npm'\n+ directory: '/'\nschedule:\n- interval: \"weekly\"\n- day: \"sunday\"\n+ interval: 'weekly'\n+ day: 'sunday'\n+ open-pull-requests-limit: 10\n"
}
] | TypeScript | MIT License | influxdata/influxdb-client-js | chore: update dependabot PR limit |
305,159 | 01.08.2022 08:25:12 | -7,200 | 9f7b11165c762f95d3cc532dabcc2a6a429c945d | chore: remove direct dependency on chalk | [
{
"change_type": "MODIFY",
"old_path": "packages/apis/generator/logger.ts",
"new_path": "packages/apis/generator/logger.ts",
"diff": "-import chalk from 'chalk'\n-\n/* eslint-disable no-console */\nconst logger = {\nwarn(message: string, ...otherParameters: any[]): void {\n- message = chalk.yellow(message)\n+ message = `\\u001b[33m${message}\\u001b[0m` // wrap to yellow\nif (otherParameters.length) {\nconsole.warn(message, ...otherParameters)\n} else {\n"
},
{
"change_type": "MODIFY",
"old_path": "packages/apis/package.json",
"new_path": "packages/apis/package.json",
"diff": "\"@typescript-eslint/eslint-plugin\": \"^5.29.0\",\n\"@typescript-eslint/parser\": \"^5.29.0\",\n\"chai\": \"^4.2.0\",\n- \"chalk\": \"^5.0.1\",\n\"eslint\": \"^8.18.0\",\n\"eslint-config-prettier\": \"^8.5.0\",\n\"eslint-plugin-prettier\": \"^4.2.1\",\n"
},
{
"change_type": "MODIFY",
"old_path": "yarn.lock",
"new_path": "yarn.lock",
"diff": "@@ -2118,11 +2118,6 @@ chalk@^4.0.0, chalk@^4.1.0, chalk@^4.1.1:\nansi-styles \"^4.1.0\"\nsupports-color \"^7.1.0\"\n-chalk@^5.0.1:\n- version \"5.0.1\"\n- resolved \"https://registry.yarnpkg.com/chalk/-/chalk-5.0.1.tgz#ca57d71e82bb534a296df63bbacc4a1c22b2a4b6\"\n- integrity sha512-Fo07WOYGqMfCWHOzSXOt2CxDbC6skS/jO9ynEcmpANMoPrD+W1r1K6Vx7iNm+AQmETU1Xr2t+n8nzkV9t6xh3w==\n-\nchardet@^0.7.0:\nversion \"0.7.0\"\nresolved \"https://registry.yarnpkg.com/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e\"\n"
}
] | TypeScript | MIT License | influxdata/influxdb-client-js | chore: remove direct dependency on chalk |
305,159 | 01.08.2022 21:00:15 | -7,200 | dccdf1d3f5005837832511be5325adf858fd812b | chore: switch core package to esbuild | [
{
"change_type": "MODIFY",
"old_path": "packages/core-browser/package.json",
"new_path": "packages/core-browser/package.json",
"diff": "\"module\": \"dist/index.browser.mjs\",\n\"module:browser\": \"dist/index.browser.mjs\",\n\"browser\": \"dist/index.browser.js\",\n- \"types\": \"dist/all.d.ts\",\n+ \"types\": \"dist/index.d.ts\",\n\"exports\": {\n\".\": {\n- \"types\": \"./dist/all.d.ts\",\n+ \"types\": \"./dist/index.d.ts\",\n\"browser\": {\n\"import\": \"./dist/index.browser.mjs\",\n\"require\": \"./dist/index.browser.js\",\n"
},
{
"change_type": "MODIFY",
"old_path": "packages/core/package.json",
"new_path": "packages/core/package.json",
"diff": "\"description\": \"InfluxDB 2.x client\",\n\"scripts\": {\n\"apidoc:extract\": \"api-extractor run\",\n- \"build\": \"yarn run clean && rollup --failAfterWarnings -c\",\n+ \"build\": \"yarn run clean && yarn tsup && yarn tsup --config ./tsup.config.browser.ts\",\n\"clean\": \"rimraf dist build coverage .nyc_output doc *.lcov reports\",\n\"coverage\": \"nyc mocha --require ts-node/register 'test/**/*.test.ts' --exit\",\n\"coverage:ci\": \"yarn run coverage && yarn run coverage:lcov\",\n\"module\": \"dist/index.mjs\",\n\"module:browser\": \"dist/index.browser.mjs\",\n\"browser\": \"dist/index.browser.js\",\n- \"types\": \"dist/all.d.ts\",\n+ \"types\": \"dist/index.d.ts\",\n\"exports\": {\n\".\": {\n- \"types\": \"./dist/all.d.ts\",\n+ \"types\": \"./dist/index.d.ts\",\n\"browser\": {\n\"import\": \"./dist/index.browser.mjs\",\n\"require\": \"./dist/index.browser.js\",\n\"rxjs\": \"^7.2.0\",\n\"sinon\": \"^14.0.0\",\n\"ts-node\": \"^10.8.1\",\n+ \"tsup\": \"^6.2.1\",\n\"typescript\": \"^4.7.4\"\n}\n}\n"
},
{
"change_type": "DELETE",
"old_path": "packages/core/tsconfig.build.json",
"new_path": null,
"diff": "-{\n- \"extends\": \"./tsconfig.json\",\n- \"compilerOptions\": {\n- \"resolveJsonModule\": false,\n- \"lib\": [\"es2015\", \"es2017\"],\n- \"target\": \"es2015\"\n- },\n- \"include\": [\"src/**/*.ts\"]\n-}\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "packages/core/tsup.config.browser.ts",
"diff": "+import {defineConfig} from 'tsup'\n+import {readFile} from 'fs/promises'\n+import pkg from './package.json'\n+\n+const minify = false\n+\n+const outFiles = {\n+ esm: pkg.exports['.'].browser.import,\n+ cjs: pkg.exports['.'].browser.require,\n+ iife: pkg.exports['.'].browser.script,\n+}\n+\n+export default defineConfig({\n+ entry: ['src/index.ts'],\n+ sourcemap: true,\n+ format: ['cjs', 'esm', 'iife'],\n+ globalName: 'influxdb',\n+ dts: false,\n+ minify,\n+ target: ['es2015'],\n+ platform: 'browser',\n+ splitting: false,\n+ define: {\n+ 'process.env.ROLLUP_BROWSER': 'true',\n+ },\n+ esbuildOptions(options, {format}) {\n+ options.outdir = undefined\n+ options.outfile = outFiles[format]\n+ },\n+ esbuildPlugins: [\n+ {\n+ name: 'replace',\n+ setup: (build) => {\n+ build.onLoad({filter: /InfluxDB.ts$/}, async (args) => {\n+ const source = await readFile(args.path, 'utf8')\n+ const contents = source.replace(\n+ './impl/node/NodeHttpTransport',\n+ './impl/browser/FetchTransport'\n+ )\n+ return {\n+ contents,\n+ loader: 'ts',\n+ }\n+ })\n+ },\n+ },\n+ ],\n+})\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "packages/core/tsup.config.ts",
"diff": "+import {defineConfig} from 'tsup'\n+import pkg from './package.json'\n+\n+const minify = true\n+\n+const outFiles = {\n+ esm: pkg.exports['.'].import,\n+ cjs: pkg.exports['.'].require,\n+}\n+export default defineConfig({\n+ entry: ['src/index.ts'],\n+ sourcemap: true,\n+ clean: true,\n+ dts: true,\n+ format: ['cjs', 'esm'],\n+ minify,\n+ target: ['es2015'],\n+ platform: 'node',\n+ splitting: false,\n+ esbuildOptions(options, {format}) {\n+ options.outdir = undefined\n+ options.outfile = outFiles[format]\n+ },\n+ define: {\n+ 'process.env.ROLLUP_BROWSER': 'false',\n+ },\n+})\n"
},
{
"change_type": "MODIFY",
"old_path": "yarn.lock",
"new_path": "yarn.lock",
"diff": "@@ -1785,6 +1785,11 @@ ansi-styles@^4.0.0, ansi-styles@^4.1.0:\ndependencies:\ncolor-convert \"^2.0.1\"\n+any-promise@^1.0.0:\n+ version \"1.3.0\"\n+ resolved \"https://registry.yarnpkg.com/any-promise/-/any-promise-1.3.0.tgz#abc6afeedcea52e809cdc0376aed3ce39635d17f\"\n+ integrity sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==\n+\nanymatch@~3.1.2:\nversion \"3.1.2\"\nresolved \"https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.2.tgz#c0557c096af32f106198f4f4e2a383537e378716\"\n@@ -2003,11 +2008,23 @@ builtins@^5.0.0:\ndependencies:\nsemver \"^7.0.0\"\n+bundle-require@^3.0.2:\n+ version \"3.0.4\"\n+ resolved \"https://registry.yarnpkg.com/bundle-require/-/bundle-require-3.0.4.tgz#2b52ba77d99c0a586b5854cd21d36954e63cc110\"\n+ integrity sha512-VXG6epB1yrLAvWVQpl92qF347/UXmncQj7J3U8kZEbdVZ1ZkQyr4hYeL/9RvcE8vVVdp53dY78Fd/3pqfRqI1A==\n+ dependencies:\n+ load-tsconfig \"^0.2.0\"\n+\nbyte-size@^7.0.0:\nversion \"7.0.1\"\nresolved \"https://registry.yarnpkg.com/byte-size/-/byte-size-7.0.1.tgz#b1daf3386de7ab9d706b941a748dbfc71130dee3\"\nintegrity sha512-crQdqyCwhokxwV1UyDzLZanhkugAgft7vt0qbbdt60C6Zf3CAiGmtUCylbtYwrU6loOUw3euGrNtW1J651ot1A==\n+cac@^6.7.12:\n+ version \"6.7.12\"\n+ resolved \"https://registry.yarnpkg.com/cac/-/cac-6.7.12.tgz#6fb5ea2ff50bd01490dbda497f4ae75a99415193\"\n+ integrity sha512-rM7E2ygtMkJqD9c7WnFU6fruFcN3xe4FM5yUmgxhZzIKJk4uHl9U/fhwdajGFQbQuv43FAUo1Fe8gX/oIKDeSA==\n+\ncacache@^16.0.0, cacache@^16.0.6, cacache@^16.1.0:\nversion \"16.1.1\"\nresolved \"https://registry.yarnpkg.com/cacache/-/cacache-16.1.1.tgz#4e79fb91d3efffe0630d5ad32db55cc1b870669c\"\n@@ -2262,6 +2279,11 @@ commander@^2.18.0, commander@^2.20.0, commander@^2.7.1:\nresolved \"https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33\"\nintegrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==\n+commander@^4.0.0:\n+ version \"4.1.1\"\n+ resolved \"https://registry.yarnpkg.com/commander/-/commander-4.1.1.tgz#9fd602bd936294e9e9ef46a3f4d6964044b18068\"\n+ integrity sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==\n+\ncommon-ancestor-path@^1.0.1:\nversion \"1.0.1\"\nresolved \"https://registry.yarnpkg.com/common-ancestor-path/-/common-ancestor-path-1.0.1.tgz#4f7d2d1394d91b7abdf51871c62f71eadb0182a7\"\n@@ -2457,7 +2479,7 @@ dateformat@^3.0.0:\nresolved \"https://registry.yarnpkg.com/dateformat/-/dateformat-3.0.3.tgz#a6e37499a4d9a9cf85ef5872044d62901c9889ae\"\nintegrity sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q==\n-debug@4, [email protected], debug@^4.1.0, debug@^4.1.1, debug@^4.3.2, debug@^4.3.3, debug@^4.3.4:\n+debug@4, [email protected], debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.3, debug@^4.3.4:\nversion \"4.3.4\"\nresolved \"https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865\"\nintegrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==\n@@ -2684,6 +2706,132 @@ es6-error@^4.0.1:\nresolved \"https://registry.yarnpkg.com/es6-error/-/es6-error-4.1.1.tgz#9e3af407459deed47e9a91f9b885a84eb05c561d\"\nintegrity sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==\[email protected]:\n+ version \"0.14.51\"\n+ resolved \"https://registry.yarnpkg.com/esbuild-android-64/-/esbuild-android-64-0.14.51.tgz#414a087cb0de8db1e347ecca6c8320513de433db\"\n+ integrity sha512-6FOuKTHnC86dtrKDmdSj2CkcKF8PnqkaIXqvgydqfJmqBazCPdw+relrMlhGjkvVdiiGV70rpdnyFmA65ekBCQ==\n+\[email protected]:\n+ version \"0.14.51\"\n+ resolved \"https://registry.yarnpkg.com/esbuild-android-arm64/-/esbuild-android-arm64-0.14.51.tgz#55de3bce2aab72bcd2b606da4318ad00fb9c8151\"\n+ integrity sha512-vBtp//5VVkZWmYYvHsqBRCMMi1MzKuMIn5XDScmnykMTu9+TD9v0NMEDqQxvtFToeYmojdo5UCV2vzMQWJcJ4A==\n+\[email protected]:\n+ version \"0.14.51\"\n+ resolved \"https://registry.yarnpkg.com/esbuild-darwin-64/-/esbuild-darwin-64-0.14.51.tgz#4259f23ed6b4cea2ec8a28d87b7fb9801f093754\"\n+ integrity sha512-YFmXPIOvuagDcwCejMRtCDjgPfnDu+bNeh5FU2Ryi68ADDVlWEpbtpAbrtf/lvFTWPexbgyKgzppNgsmLPr8PA==\n+\[email protected]:\n+ version \"0.14.51\"\n+ resolved \"https://registry.yarnpkg.com/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.14.51.tgz#d77b4366a71d84e530ba019d540b538b295d494a\"\n+ integrity sha512-juYD0QnSKwAMfzwKdIF6YbueXzS6N7y4GXPDeDkApz/1RzlT42mvX9jgNmyOlWKN7YzQAYbcUEJmZJYQGdf2ow==\n+\[email protected]:\n+ version \"0.14.51\"\n+ resolved \"https://registry.yarnpkg.com/esbuild-freebsd-64/-/esbuild-freebsd-64-0.14.51.tgz#27b6587b3639f10519c65e07219d249b01f2ad38\"\n+ integrity sha512-cLEI/aXjb6vo5O2Y8rvVSQ7smgLldwYY5xMxqh/dQGfWO+R1NJOFsiax3IS4Ng300SVp7Gz3czxT6d6qf2cw0g==\n+\[email protected]:\n+ version \"0.14.51\"\n+ resolved \"https://registry.yarnpkg.com/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.14.51.tgz#63c435917e566808c71fafddc600aca4d78be1ec\"\n+ integrity sha512-TcWVw/rCL2F+jUgRkgLa3qltd5gzKjIMGhkVybkjk6PJadYInPtgtUBp1/hG+mxyigaT7ib+od1Xb84b+L+1Mg==\n+\[email protected]:\n+ version \"0.14.51\"\n+ resolved \"https://registry.yarnpkg.com/esbuild-linux-32/-/esbuild-linux-32-0.14.51.tgz#c3da774143a37e7f11559b9369d98f11f997a5d9\"\n+ integrity sha512-RFqpyC5ChyWrjx8Xj2K0EC1aN0A37H6OJfmUXIASEqJoHcntuV3j2Efr9RNmUhMfNE6yEj2VpYuDteZLGDMr0w==\n+\[email protected]:\n+ version \"0.14.51\"\n+ resolved \"https://registry.yarnpkg.com/esbuild-linux-64/-/esbuild-linux-64-0.14.51.tgz#5d92b67f674e02ae0b4a9de9a757ba482115c4ae\"\n+ integrity sha512-dxjhrqo5i7Rq6DXwz5v+MEHVs9VNFItJmHBe1CxROWNf4miOGoQhqSG8StStbDkQ1Mtobg6ng+4fwByOhoQoeA==\n+\[email protected]:\n+ version \"0.14.51\"\n+ resolved \"https://registry.yarnpkg.com/esbuild-linux-arm64/-/esbuild-linux-arm64-0.14.51.tgz#dac84740516e859d8b14e1ecc478dd5241b10c93\"\n+ integrity sha512-D9rFxGutoqQX3xJPxqd6o+kvYKeIbM0ifW2y0bgKk5HPgQQOo2k9/2Vpto3ybGYaFPCE5qTGtqQta9PoP6ZEzw==\n+\[email protected]:\n+ version \"0.14.51\"\n+ resolved \"https://registry.yarnpkg.com/esbuild-linux-arm/-/esbuild-linux-arm-0.14.51.tgz#b3ae7000696cd53ed95b2b458554ff543a60e106\"\n+ integrity sha512-LsJynDxYF6Neg7ZC7748yweCDD+N8ByCv22/7IAZglIEniEkqdF4HCaa49JNDLw1UQGlYuhOB8ZT/MmcSWzcWg==\n+\[email protected]:\n+ version \"0.14.51\"\n+ resolved \"https://registry.yarnpkg.com/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.14.51.tgz#dad10770fac94efa092b5a0643821c955a9dd385\"\n+ integrity sha512-vS54wQjy4IinLSlb5EIlLoln8buh1yDgliP4CuEHumrPk4PvvP4kTRIG4SzMXm6t19N0rIfT4bNdAxzJLg2k6A==\n+\[email protected]:\n+ version \"0.14.51\"\n+ resolved \"https://registry.yarnpkg.com/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.14.51.tgz#b68c2f8294d012a16a88073d67e976edd4850ae0\"\n+ integrity sha512-xcdd62Y3VfGoyphNP/aIV9LP+RzFw5M5Z7ja+zdpQHHvokJM7d0rlDRMN+iSSwvUymQkqZO+G/xjb4/75du8BQ==\n+\[email protected]:\n+ version \"0.14.51\"\n+ resolved \"https://registry.yarnpkg.com/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.14.51.tgz#608a318b8697123e44c1e185cdf6708e3df50b93\"\n+ integrity sha512-syXHGak9wkAnFz0gMmRBoy44JV0rp4kVCEA36P5MCeZcxFq8+fllBC2t6sKI23w3qd8Vwo9pTADCgjTSf3L3rA==\n+\[email protected]:\n+ version \"0.14.51\"\n+ resolved \"https://registry.yarnpkg.com/esbuild-linux-s390x/-/esbuild-linux-s390x-0.14.51.tgz#c9e7791170a3295dba79b93aa452beb9838a8625\"\n+ integrity sha512-kFAJY3dv+Wq8o28K/C7xkZk/X34rgTwhknSsElIqoEo8armCOjMJ6NsMxm48KaWY2h2RUYGtQmr+RGuUPKBhyw==\n+\[email protected]:\n+ version \"0.14.51\"\n+ resolved \"https://registry.yarnpkg.com/esbuild-netbsd-64/-/esbuild-netbsd-64-0.14.51.tgz#0abd40b8c2e37fda6f5cc41a04cb2b690823d891\"\n+ integrity sha512-ZZBI7qrR1FevdPBVHz/1GSk1x5GDL/iy42Zy8+neEm/HA7ma+hH/bwPEjeHXKWUDvM36CZpSL/fn1/y9/Hb+1A==\n+\[email protected]:\n+ version \"0.14.51\"\n+ resolved \"https://registry.yarnpkg.com/esbuild-openbsd-64/-/esbuild-openbsd-64-0.14.51.tgz#4adba0b7ea7eb1428bb00d8e94c199a949b130e8\"\n+ integrity sha512-7R1/p39M+LSVQVgDVlcY1KKm6kFKjERSX1lipMG51NPcspJD1tmiZSmmBXoY5jhHIu6JL1QkFDTx94gMYK6vfA==\n+\[email protected]:\n+ version \"0.14.51\"\n+ resolved \"https://registry.yarnpkg.com/esbuild-sunos-64/-/esbuild-sunos-64-0.14.51.tgz#4b8a6d97dfedda30a6e39607393c5c90ebf63891\"\n+ integrity sha512-HoHaCswHxLEYN8eBTtyO0bFEWvA3Kdb++hSQ/lLG7TyKF69TeSG0RNoBRAs45x/oCeWaTDntEZlYwAfQlhEtJA==\n+\[email protected]:\n+ version \"0.14.51\"\n+ resolved \"https://registry.yarnpkg.com/esbuild-windows-32/-/esbuild-windows-32-0.14.51.tgz#d31d8ca0c1d314fb1edea163685a423b62e9ac17\"\n+ integrity sha512-4rtwSAM35A07CBt1/X8RWieDj3ZUHQqUOaEo5ZBs69rt5WAFjP4aqCIobdqOy4FdhYw1yF8Z0xFBTyc9lgPtEg==\n+\[email protected]:\n+ version \"0.14.51\"\n+ resolved \"https://registry.yarnpkg.com/esbuild-windows-64/-/esbuild-windows-64-0.14.51.tgz#7d3c09c8652d222925625637bdc7e6c223e0085d\"\n+ integrity sha512-HoN/5HGRXJpWODprGCgKbdMvrC3A2gqvzewu2eECRw2sYxOUoh2TV1tS+G7bHNapPGI79woQJGV6pFH7GH7qnA==\n+\[email protected]:\n+ version \"0.14.51\"\n+ resolved \"https://registry.yarnpkg.com/esbuild-windows-arm64/-/esbuild-windows-arm64-0.14.51.tgz#0220d2304bfdc11bc27e19b2aaf56edf183e4ae9\"\n+ integrity sha512-JQDqPjuOH7o+BsKMSddMfmVJXrnYZxXDHsoLHc0xgmAZkOOCflRmC43q31pk79F9xuyWY45jDBPolb5ZgGOf9g==\n+\n+esbuild@^0.14.25:\n+ version \"0.14.51\"\n+ resolved \"https://registry.yarnpkg.com/esbuild/-/esbuild-0.14.51.tgz#1c8ecbc8db3710da03776211dc3ee3448f7aa51e\"\n+ integrity sha512-+CvnDitD7Q5sT7F+FM65sWkF8wJRf+j9fPcprxYV4j+ohmzVj2W7caUqH2s5kCaCJAfcAICjSlKhDCcvDpU7nw==\n+ optionalDependencies:\n+ esbuild-android-64 \"0.14.51\"\n+ esbuild-android-arm64 \"0.14.51\"\n+ esbuild-darwin-64 \"0.14.51\"\n+ esbuild-darwin-arm64 \"0.14.51\"\n+ esbuild-freebsd-64 \"0.14.51\"\n+ esbuild-freebsd-arm64 \"0.14.51\"\n+ esbuild-linux-32 \"0.14.51\"\n+ esbuild-linux-64 \"0.14.51\"\n+ esbuild-linux-arm \"0.14.51\"\n+ esbuild-linux-arm64 \"0.14.51\"\n+ esbuild-linux-mips64le \"0.14.51\"\n+ esbuild-linux-ppc64le \"0.14.51\"\n+ esbuild-linux-riscv64 \"0.14.51\"\n+ esbuild-linux-s390x \"0.14.51\"\n+ esbuild-netbsd-64 \"0.14.51\"\n+ esbuild-openbsd-64 \"0.14.51\"\n+ esbuild-sunos-64 \"0.14.51\"\n+ esbuild-windows-32 \"0.14.51\"\n+ esbuild-windows-64 \"0.14.51\"\n+ esbuild-windows-arm64 \"0.14.51\"\n+\nescalade@^3.1.1:\nversion \"3.1.1\"\nresolved \"https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40\"\n@@ -3242,6 +3390,18 @@ [email protected]:\nonce \"^1.3.0\"\npath-is-absolute \"^1.0.0\"\[email protected]:\n+ version \"7.1.6\"\n+ resolved \"https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6\"\n+ integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==\n+ dependencies:\n+ fs.realpath \"^1.0.0\"\n+ inflight \"^1.0.4\"\n+ inherits \"2\"\n+ minimatch \"^3.0.4\"\n+ once \"^1.3.0\"\n+ path-is-absolute \"^1.0.0\"\n+\[email protected], glob@^7.0.3, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6:\nversion \"7.2.0\"\nresolved \"https://registry.yarnpkg.com/glob/-/glob-7.2.0.tgz#d15535af7732e02e948f4c41628bd910293f6023\"\n@@ -3277,7 +3437,7 @@ globals@^13.15.0:\ndependencies:\ntype-fest \"^0.20.2\"\n-globby@^11.0.2, globby@^11.1.0:\n+globby@^11.0.2, globby@^11.0.3, globby@^11.1.0:\nversion \"11.1.0\"\nresolved \"https://registry.yarnpkg.com/globby/-/globby-11.1.0.tgz#bd4be98bb042f83d796f7e3811991fbe82a0d34b\"\nintegrity sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==\n@@ -3801,6 +3961,11 @@ jju@~1.4.0:\nresolved \"https://registry.yarnpkg.com/jju/-/jju-1.4.0.tgz#a3abe2718af241a2b2904f84a625970f389ae32a\"\nintegrity sha1-o6vicYryQaKykE+EpiWXDzia4yo=\n+joycon@^3.0.1:\n+ version \"3.1.1\"\n+ resolved \"https://registry.yarnpkg.com/joycon/-/joycon-3.1.1.tgz#bce8596d6ae808f8b68168f5fc69280996894f03\"\n+ integrity sha512-34wB/Y7MW7bzjKRjUKTa46I2Z7eV62Rkhva+KkopW7Qvv/OSWBqvkSY7vusOPrNuZcUG3tApvdVgNB8POj3SPw==\n+\n\"js-tokens@^3.0.0 || ^4.0.0\", js-tokens@^4.0.0:\nversion \"4.0.0\"\nresolved \"https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499\"\n@@ -3976,6 +4141,11 @@ libnpmpublish@^6.0.4:\nsemver \"^7.3.7\"\nssri \"^9.0.0\"\n+lilconfig@^2.0.5:\n+ version \"2.0.6\"\n+ resolved \"https://registry.yarnpkg.com/lilconfig/-/lilconfig-2.0.6.tgz#32a384558bd58af3d4c6e077dd1ad1d397bc69d4\"\n+ integrity sha512-9JROoBW7pobfsx+Sq2JsASvCo6Pfo6WWoUW79HuB1BCoBXD4PLWJPqDF6fNj67pqBYTbAHkE57M1kS/+L1neOg==\n+\nlines-and-columns@^1.1.6:\nversion \"1.2.4\"\nresolved \"https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz#eca284f75d2965079309dc0ad9255abb2ebc1632\"\n@@ -4001,6 +4171,11 @@ load-json-file@^6.2.0:\nstrip-bom \"^4.0.0\"\ntype-fest \"^0.6.0\"\n+load-tsconfig@^0.2.0:\n+ version \"0.2.3\"\n+ resolved \"https://registry.yarnpkg.com/load-tsconfig/-/load-tsconfig-0.2.3.tgz#08af3e7744943caab0c75f8af7f1703639c3ef1f\"\n+ integrity sha512-iyT2MXws+dc2Wi6o3grCFtGXpeMvHmJqS27sMPGtV2eUu4PeFnG+33I8BlFK1t1NWMjOpcx9bridn5yxLDX2gQ==\n+\nlocate-path@^2.0.0:\nversion \"2.0.0\"\nresolved \"https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e\"\n@@ -4048,6 +4223,11 @@ lodash.merge@^4.6.2:\nresolved \"https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a\"\nintegrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==\n+lodash.sortby@^4.7.0:\n+ version \"4.7.0\"\n+ resolved \"https://registry.yarnpkg.com/lodash.sortby/-/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438\"\n+ integrity sha512-HDWXG8isMntAyRF5vZ7xKuEvOhT4AhlRt/3czTSjvGUxjYCBVRQY48ViDHyfYz9VIoBkW4TMGQNapx+l3RUwdA==\n+\nlodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.21, lodash@^4.7.0, lodash@~4.17.15:\nversion \"4.17.21\"\nresolved \"https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c\"\n@@ -4249,7 +4429,7 @@ [email protected]:\nis-plain-obj \"^1.1.0\"\nkind-of \"^6.0.3\"\n-minimist@>=1.2.2, minimist@^1.2.0, minimist@^1.2.5, minimist@^1.2.6:\n+minimist@^1.2.0, minimist@^1.2.5, minimist@^1.2.6:\nversion \"1.2.6\"\nresolved \"https://registry.yarnpkg.com/minimist/-/minimist-1.2.6.tgz#8637a5b759ea0d6e98702cfb3a9283323c93af44\"\nintegrity sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==\n@@ -4419,6 +4599,15 @@ [email protected], mute-stream@~0.0.4:\nresolved \"https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d\"\nintegrity sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==\n+mz@^2.7.0:\n+ version \"2.7.0\"\n+ resolved \"https://registry.yarnpkg.com/mz/-/mz-2.7.0.tgz#95008057a56cafadc2bc63dde7f9ff6955948e32\"\n+ integrity sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==\n+ dependencies:\n+ any-promise \"^1.0.0\"\n+ object-assign \"^4.0.1\"\n+ thenify-all \"^1.0.0\"\n+\[email protected]:\nversion \"3.3.3\"\nresolved \"https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.3.tgz#fd8e8b7aa761fe807dba2d1b98fb7241bb724a25\"\n@@ -5069,6 +5258,11 @@ pinkie@^2.0.0:\nresolved \"https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870\"\nintegrity sha1-clVrgM+g1IqXToDnckjoDtT3+HA=\n+pirates@^4.0.1:\n+ version \"4.0.5\"\n+ resolved \"https://registry.yarnpkg.com/pirates/-/pirates-4.0.5.tgz#feec352ea5c3268fb23a37c702ab1699f35a5f3b\"\n+ integrity sha512-8V9+HQPupnaXMA23c5hvl69zXvTwTzyAYasnkb0Tts4XvO4CliqONMOnvlq26rkhLC3nWDFBJf73LU1e1VZLaQ==\n+\npkg-dir@^4.1.0, pkg-dir@^4.2.0:\nversion \"4.2.0\"\nresolved \"https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-4.2.0.tgz#f099133df7ede422e81d1d8448270eeb3e4261f3\"\n@@ -5076,6 +5270,14 @@ pkg-dir@^4.1.0, pkg-dir@^4.2.0:\ndependencies:\nfind-up \"^4.0.0\"\n+postcss-load-config@^3.0.1:\n+ version \"3.1.4\"\n+ resolved \"https://registry.yarnpkg.com/postcss-load-config/-/postcss-load-config-3.1.4.tgz#1ab2571faf84bb078877e1d07905eabe9ebda855\"\n+ integrity sha512-6DiM4E7v4coTE4uzA8U//WhtPwyhiim3eyjEMFCnUpzbrkK9wJHgKDT2mR+HbtSrd/NubVaYTOpSpjUl8NQeRg==\n+ dependencies:\n+ lilconfig \"^2.0.5\"\n+ yaml \"^1.10.2\"\n+\nprelude-ls@^1.2.1:\nversion \"1.2.1\"\nresolved \"https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396\"\n@@ -5442,7 +5644,7 @@ rollup-plugin-typescript2@^0.32.1:\nresolve \"^1.20.0\"\ntslib \"^2.4.0\"\n-rollup@^2.33.3:\n+rollup@^2.33.3, rollup@^2.74.1:\nversion \"2.77.2\"\nresolved \"https://registry.yarnpkg.com/rollup/-/rollup-2.77.2.tgz#6b6075c55f9cc2040a5912e6e062151e42e2c4e3\"\nintegrity sha512-m/4YzYgLcpMQbxX3NmAqDvwLATZzxt8bIegO78FZLl+lAgKJBd1DRAOeEiZcKOIOPjxE6ewHWHNgGEalFXuz1g==\n@@ -5619,6 +5821,13 @@ source-map-support@~0.5.20:\nbuffer-from \"^1.0.0\"\nsource-map \"^0.6.0\"\[email protected]:\n+ version \"0.8.0-beta.0\"\n+ resolved \"https://registry.yarnpkg.com/source-map/-/source-map-0.8.0-beta.0.tgz#d4c1bb42c3f7ee925f005927ba10709e0d1d1f11\"\n+ integrity sha512-2ymg6oRBpebeZi9UUNsgQ89bhx01TcTkmNTGnNO88imTmbSgy4nfujrgVEFKWpMTEGA11EDkTt7mqObTPdigIA==\n+ dependencies:\n+ whatwg-url \"^7.0.0\"\n+\nsource-map@^0.5.0:\nversion \"0.5.7\"\nresolved \"https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc\"\n@@ -5776,6 +5985,18 @@ strong-log-transformer@^2.1.0:\nminimist \"^1.2.0\"\nthrough \"^2.3.4\"\n+sucrase@^3.20.3:\n+ version \"3.24.0\"\n+ resolved \"https://registry.yarnpkg.com/sucrase/-/sucrase-3.24.0.tgz#66a8f2cc845bc441706ce5f3056de283289067b6\"\n+ integrity sha512-SevqflhW356TKEyWjFHg2e5f3eH+5rzmsMJxrVMDvZIEHh/goYrpzDGA6APEj4ME9MdGm8oNgIzi1eF3c3dDQA==\n+ dependencies:\n+ commander \"^4.0.0\"\n+ glob \"7.1.6\"\n+ lines-and-columns \"^1.1.6\"\n+ mz \"^2.7.0\"\n+ pirates \"^4.0.1\"\n+ ts-interface-checker \"^0.1.9\"\n+\[email protected]:\nversion \"8.1.1\"\nresolved \"https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c\"\n@@ -5859,6 +6080,20 @@ text-table@^0.2.0:\nresolved \"https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4\"\nintegrity sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=\n+thenify-all@^1.0.0:\n+ version \"1.6.0\"\n+ resolved \"https://registry.yarnpkg.com/thenify-all/-/thenify-all-1.6.0.tgz#1a1918d402d8fc3f98fbf234db0bcc8cc10e9726\"\n+ integrity sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==\n+ dependencies:\n+ thenify \">= 3.1.0 < 4\"\n+\n+\"thenify@>= 3.1.0 < 4\":\n+ version \"3.3.1\"\n+ resolved \"https://registry.yarnpkg.com/thenify/-/thenify-3.3.1.tgz#8932e686a4066038a016dd9e2ca46add9838a95f\"\n+ integrity sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==\n+ dependencies:\n+ any-promise \"^1.0.0\"\n+\nthrough2@^2.0.0:\nversion \"2.0.5\"\nresolved \"https://registry.yarnpkg.com/through2/-/through2-2.0.5.tgz#01c1e39eb31d07cb7d03a96a70823260b23132cd\"\n@@ -5910,6 +6145,13 @@ to-regex-range@^5.0.1:\ndependencies:\nis-number \"^7.0.0\"\n+tr46@^1.0.1:\n+ version \"1.0.1\"\n+ resolved \"https://registry.yarnpkg.com/tr46/-/tr46-1.0.1.tgz#a8b13fd6bfd2489519674ccde55ba3693b706d09\"\n+ integrity sha512-dTpowEjclQ7Kgx5SdBkqRzVhERQXov8/l9Ft9dVM9fmg0W0KQSVaXX9T4i6twCPNtYiZM53lpSSUAwJbFPOHxA==\n+ dependencies:\n+ punycode \"^2.1.0\"\n+\ntr46@^2.1.0:\nversion \"2.1.0\"\nresolved \"https://registry.yarnpkg.com/tr46/-/tr46-2.1.0.tgz#fa87aa81ca5d5941da8cbf1f9b749dc969a4e240\"\n@@ -5922,6 +6164,11 @@ tr46@~0.0.3:\nresolved \"https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a\"\nintegrity sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=\n+tree-kill@^1.2.2:\n+ version \"1.2.2\"\n+ resolved \"https://registry.yarnpkg.com/tree-kill/-/tree-kill-1.2.2.tgz#4ca09a9092c88b73a7cdc5e8a01b507b0790a0cc\"\n+ integrity sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==\n+\ntreeverse@^2.0.0:\nversion \"2.0.0\"\nresolved \"https://registry.yarnpkg.com/treeverse/-/treeverse-2.0.0.tgz#036dcef04bc3fd79a9b79a68d4da03e882d8a9ca\"\n@@ -5939,6 +6186,11 @@ trim-repeated@^1.0.0:\ndependencies:\nescape-string-regexp \"^1.0.2\"\n+ts-interface-checker@^0.1.9:\n+ version \"0.1.13\"\n+ resolved \"https://registry.yarnpkg.com/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz#784fd3d679722bc103b1b4b8030bcddb5db2a699\"\n+ integrity sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==\n+\nts-node@^10.8.1:\nversion \"10.9.1\"\nresolved \"https://registry.yarnpkg.com/ts-node/-/ts-node-10.9.1.tgz#e73de9102958af9e1f0b168a6ff320e25adcff4b\"\n@@ -5978,6 +6230,26 @@ tslib@^2.1.0, tslib@^2.3.0, tslib@^2.4.0:\nresolved \"https://registry.yarnpkg.com/tslib/-/tslib-2.4.0.tgz#7cecaa7f073ce680a05847aa77be941098f36dc3\"\nintegrity sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==\n+tsup@^6.2.1:\n+ version \"6.2.1\"\n+ resolved \"https://registry.yarnpkg.com/tsup/-/tsup-6.2.1.tgz#d00875e6141252a6a72ee37b56a61856c70ff3f2\"\n+ integrity sha512-KhBhCqVA3bHrIWhkcqTUA7R69H05IcBlHEtCVLEu42XDGUzz+bDqCcfu5PwpkKJ8DqK5tpdgM/qmyk4DdUbkZw==\n+ dependencies:\n+ bundle-require \"^3.0.2\"\n+ cac \"^6.7.12\"\n+ chokidar \"^3.5.1\"\n+ debug \"^4.3.1\"\n+ esbuild \"^0.14.25\"\n+ execa \"^5.0.0\"\n+ globby \"^11.0.3\"\n+ joycon \"^3.0.1\"\n+ postcss-load-config \"^3.0.1\"\n+ resolve-from \"^5.0.0\"\n+ rollup \"^2.74.1\"\n+ source-map \"0.8.0-beta.0\"\n+ sucrase \"^3.20.3\"\n+ tree-kill \"^1.2.2\"\n+\ntsutils@^3.21.0:\nversion \"3.21.0\"\nresolved \"https://registry.yarnpkg.com/tsutils/-/tsutils-3.21.0.tgz#b48717d394cea6c1e096983eed58e9d61715b623\"\n@@ -6164,6 +6436,11 @@ webidl-conversions@^3.0.0:\nresolved \"https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871\"\nintegrity sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE=\n+webidl-conversions@^4.0.2:\n+ version \"4.0.2\"\n+ resolved \"https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.2.tgz#a855980b1f0b6b359ba1d5d9fb39ae941faa63ad\"\n+ integrity sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==\n+\nwebidl-conversions@^6.1.0:\nversion \"6.1.0\"\nresolved \"https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-6.1.0.tgz#9111b4d7ea80acd40f5270d666621afa78b69514\"\n@@ -6177,6 +6454,15 @@ whatwg-url@^5.0.0:\ntr46 \"~0.0.3\"\nwebidl-conversions \"^3.0.0\"\n+whatwg-url@^7.0.0:\n+ version \"7.1.0\"\n+ resolved \"https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-7.1.0.tgz#c2c492f1eca612988efd3d2266be1b9fc6170d06\"\n+ integrity sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg==\n+ dependencies:\n+ lodash.sortby \"^4.7.0\"\n+ tr46 \"^1.0.1\"\n+ webidl-conversions \"^4.0.2\"\n+\nwhatwg-url@^8.4.0:\nversion \"8.7.0\"\nresolved \"https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-8.7.0.tgz#656a78e510ff8f3937bc0bcbe9f5c0ac35941b77\"\n@@ -6328,7 +6614,7 @@ yallist@^4.0.0:\nresolved \"https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72\"\nintegrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==\n-yaml@^1.10.0:\n+yaml@^1.10.0, yaml@^1.10.2:\nversion \"1.10.2\"\nresolved \"https://registry.yarnpkg.com/yaml/-/yaml-1.10.2.tgz#2301c5ffbf12b467de8da2333a459e29e7920e4b\"\nintegrity sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==\n"
}
] | TypeScript | MIT License | influxdata/influxdb-client-js | chore: switch core package to esbuild |
305,159 | 01.08.2022 21:10:06 | -7,200 | 70cd9b9f507a37f403199a54acefb46effeb7c5d | chore(core): build browser first to catch common errors quickly | [
{
"change_type": "MODIFY",
"old_path": "packages/core/package.json",
"new_path": "packages/core/package.json",
"diff": "\"description\": \"InfluxDB 2.x client\",\n\"scripts\": {\n\"apidoc:extract\": \"api-extractor run\",\n- \"build\": \"yarn run clean && yarn tsup && yarn tsup --config ./tsup.config.browser.ts\",\n+ \"build\": \"yarn run clean && yarn tsup --config ./tsup.config.browser.ts && yarn tsup\",\n\"clean\": \"rimraf dist build coverage .nyc_output doc *.lcov reports\",\n\"coverage\": \"nyc mocha --require ts-node/register 'test/**/*.test.ts' --exit\",\n\"coverage:ci\": \"yarn run coverage && yarn run coverage:lcov\",\n"
}
] | TypeScript | MIT License | influxdata/influxdb-client-js | chore(core): build browser first to catch common errors quickly |
305,159 | 02.08.2022 11:38:24 | -7,200 | 63375acce370ce76fc8bb0928225d2d99bb2e83a | chore: emulate UMD output in esbuild | [
{
"change_type": "MODIFY",
"old_path": "packages/core/tsup.config.browser.ts",
"new_path": "packages/core/tsup.config.browser.ts",
"diff": "@@ -26,6 +26,21 @@ export default defineConfig({\nesbuildOptions(options, {format}) {\noptions.outdir = undefined\noptions.outfile = outFiles[format]\n+ if (format === 'cjs') {\n+ // esbuild does not generate UMD format OOTB, see https://github.com/evanw/esbuild/issues/507\n+ // the following code is a trick to generate UMD output in place of cjs\n+ options.format = 'iife'\n+ options.banner = {\n+ js: `(function (global, factory) {\n+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :\n+ typeof define === 'function' && define.amd ? define(['exports'], factory) :\n+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global[\"@influxdata/influxdb-client\"] = {}));\n+})(this, (function (exports) {`,\n+ }\n+ options.footer = {\n+ js: `Object.defineProperty(exports, '__esModule', { value: true });Object.assign(exports, ${options.globalName});}));`,\n+ }\n+ }\n},\nesbuildPlugins: [\n{\n"
}
] | TypeScript | MIT License | influxdata/influxdb-client-js | chore: emulate UMD output in esbuild |
305,159 | 02.08.2022 11:54:07 | -7,200 | d9d059d988426b3933caabbde1707eb3a42b9a95 | chore: allow to configure minification via env | [
{
"change_type": "MODIFY",
"old_path": "packages/core/tsup.config.browser.ts",
"new_path": "packages/core/tsup.config.browser.ts",
"diff": "@@ -2,7 +2,7 @@ import {defineConfig} from 'tsup'\nimport {readFile} from 'fs/promises'\nimport pkg from './package.json'\n-const minify = false\n+const minify = !(process.env.ESBUILD_MINIFY === '0')\nconst outFiles = {\nesm: pkg.exports['.'].browser.import,\n"
},
{
"change_type": "MODIFY",
"old_path": "packages/core/tsup.config.ts",
"new_path": "packages/core/tsup.config.ts",
"diff": "import {defineConfig} from 'tsup'\nimport pkg from './package.json'\n-const minify = true\n+const minify = !(process.env.ESBUILD_MINIFY === '0')\nconst outFiles = {\nesm: pkg.exports['.'].import,\n"
}
] | TypeScript | MIT License | influxdata/influxdb-client-js | chore: allow to configure minification via env |
305,159 | 02.08.2022 13:38:58 | -7,200 | 557acdd9ec7f935fa1428e879b002a0e8a0e0af0 | chore: switch apis package to esbuild | [
{
"change_type": "MODIFY",
"old_path": "packages/apis/package.json",
"new_path": "packages/apis/package.json",
"diff": "\"description\": \"InfluxDB 2.x generated APIs\",\n\"scripts\": {\n\"apidoc:extract\": \"api-extractor run\",\n- \"build\": \"yarn run clean && yarn run lint && rollup --failAfterWarnings -c\",\n+ \"build\": \"yarn run clean && yarn tsup --config ./tsup.config.browser.ts && yarn tsup\",\n\"clean\": \"rimraf build doc dist reports\",\n\"clean:apis\": \"rimraf src/generated/*API.ts\",\n\"generate\": \"yarn ts-node generator && yarn prettier --write src/generated/*.ts\",\n\"main\": \"dist/index.js\",\n\"module\": \"dist/index.mjs\",\n\"browser\": \"dist/index.browser.js\",\n- \"types\": \"dist/all.d.ts\",\n+ \"types\": \"dist/index.d.ts\",\n\"exports\": {\n\".\": {\n- \"types\": \"./dist/all.d.ts\",\n+ \"types\": \"./dist/index.d.ts\",\n\"browser\": {\n\"import\": \"./dist/index.mjs\",\n\"require\": \"./dist/index.js\",\n\"rollup-plugin-terser\": \"^7.0.0\",\n\"rollup-plugin-typescript2\": \"^0.32.1\",\n\"ts-node\": \"^10.8.1\",\n+ \"tsup\": \"^6.2.1\",\n\"typescript\": \"^4.7.4\"\n}\n}\n"
},
{
"change_type": "DELETE",
"old_path": "packages/apis/tsconfig.build.json",
"new_path": null,
"diff": "-{\n- \"extends\": \"./tsconfig.json\",\n- \"compilerOptions\": {\n- \"resolveJsonModule\": false,\n- \"lib\": [\"es2015\"],\n- \"target\": \"es2015\"\n- },\n- \"include\": [\"src/**/*.ts\"]\n-}\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "packages/apis/tsup.config.browser.ts",
"diff": "+import {defineConfig} from 'tsup'\n+import pkg from './package.json'\n+\n+const minify = !(process.env.ESBUILD_MINIFY === '0')\n+\n+const outFiles = {\n+ cjs: pkg.exports['.'].browser.umd,\n+ iife: pkg.exports['.'].browser.script,\n+}\n+\n+export default defineConfig({\n+ entry: ['src/index.ts'],\n+ sourcemap: true,\n+ format: ['cjs', 'iife'],\n+ globalName: 'influxdbApis',\n+ dts: false,\n+ minify,\n+ target: ['es2015'],\n+ platform: 'browser',\n+ splitting: false,\n+ esbuildOptions(options, {format}) {\n+ options.outdir = undefined\n+ options.outfile = outFiles[format]\n+ if (format === 'cjs') {\n+ // esbuild does not generate UMD format OOTB, see https://github.com/evanw/esbuild/issues/507\n+ // the following code is a trick to generate UMD output in place of cjs\n+ options.format = 'iife'\n+ options.banner = {\n+ js: `(function (global, factory) {\n+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :\n+ typeof define === 'function' && define.amd ? define(['exports'], factory) :\n+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global[\"@influxdata/influxdb-client-apis\"] = {}));\n+})(this, (function (exports) {`,\n+ }\n+ options.footer = {\n+ js: `Object.defineProperty(exports, '__esModule', { value: true });Object.assign(exports, ${options.globalName});}));`,\n+ }\n+ }\n+ },\n+})\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "packages/apis/tsup.config.ts",
"diff": "+import {defineConfig} from 'tsup'\n+import pkg from './package.json'\n+\n+const minify = !(process.env.ESBUILD_MINIFY === '0')\n+\n+const outFiles = {\n+ esm: pkg.exports['.'].import,\n+ cjs: pkg.exports['.'].require,\n+}\n+export default defineConfig({\n+ entry: ['src/index.ts'],\n+ sourcemap: true,\n+ dts: true,\n+ format: ['cjs', 'esm'],\n+ minify,\n+ target: ['es2015'],\n+ platform: 'node',\n+ splitting: false,\n+ esbuildOptions(options, {format}) {\n+ options.outdir = undefined\n+ options.outfile = outFiles[format]\n+ },\n+})\n"
},
{
"change_type": "MODIFY",
"old_path": "yarn.lock",
"new_path": "yarn.lock",
"diff": "@@ -4429,7 +4429,7 @@ [email protected]:\nis-plain-obj \"^1.1.0\"\nkind-of \"^6.0.3\"\n-minimist@>=1.2.2, minimist@^1.2.0, minimist@^1.2.5, minimist@^1.2.6:\n+minimist@^1.2.0, minimist@^1.2.5, minimist@^1.2.6:\nversion \"1.2.6\"\nresolved \"https://registry.yarnpkg.com/minimist/-/minimist-1.2.6.tgz#8637a5b759ea0d6e98702cfb3a9283323c93af44\"\nintegrity sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==\n"
}
] | TypeScript | MIT License | influxdata/influxdb-client-js | chore: switch apis package to esbuild |
305,159 | 02.08.2022 13:56:24 | -7,200 | 3d4ca6a7f22940877d78008ef664fcf24c84c970 | chore: switch giraffe package to esbuild | [
{
"change_type": "MODIFY",
"old_path": "packages/giraffe/package.json",
"new_path": "packages/giraffe/package.json",
"diff": "\"description\": \"InfluxDB 2.x client - giraffe integration\",\n\"scripts\": {\n\"apidoc:extract\": \"api-extractor run\",\n- \"build\": \"yarn run clean && rollup --failAfterWarnings -c\",\n+ \"build\": \"yarn run clean && yarn tsup\",\n\"clean\": \"rimraf dist build coverage .nyc_output doc *.lcov reports\",\n\"coverage\": \"nyc mocha --require ts-node/register 'test/**/*.test.ts' --exit\",\n\"coverage:ci\": \"yarn run coverage && yarn run coverage:lcov\",\n},\n\"main\": \"dist/index.js\",\n\"module\": \"dist/index.mjs\",\n- \"types\": \"dist/all.d.ts\",\n+ \"types\": \"dist/index.d.ts\",\n\"exports\": {\n\".\": {\n- \"types\": \"./dist/all.d.ts\",\n+ \"types\": \"./dist/index.d.ts\",\n\"import\": \"./dist/index.mjs\",\n\"require\": \"./dist/index.js\",\n\"default\": \"./dist/index.js\"\n\"rollup-plugin-typescript2\": \"^0.32.1\",\n\"sinon\": \"^14.0.0\",\n\"ts-node\": \"^10.8.1\",\n+ \"tsup\": \"^6.2.1\",\n\"typescript\": \"^4.7.4\"\n}\n}\n"
},
{
"change_type": "DELETE",
"old_path": "packages/giraffe/tsconfig.build.json",
"new_path": null,
"diff": "-{\n- \"extends\": \"./tsconfig.json\",\n- \"compilerOptions\": {\n- \"resolveJsonModule\": false,\n- \"lib\": [\"es2015\", \"es2017\"],\n- \"target\": \"es2015\"\n- },\n- \"include\": [\"src/**/*.ts\"]\n-}\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "packages/giraffe/tsup.config.ts",
"diff": "+import {defineConfig} from 'tsup'\n+import pkg from './package.json'\n+\n+const minify = !(process.env.ESBUILD_MINIFY === '0')\n+\n+const outFiles = {\n+ esm: pkg.exports['.'].import,\n+ cjs: pkg.exports['.'].require,\n+}\n+\n+export default defineConfig({\n+ entry: ['src/index.ts'],\n+ sourcemap: true,\n+ format: ['cjs', 'esm'],\n+ globalName: 'g',\n+ dts: true,\n+ minify,\n+ target: ['es2015'],\n+ platform: 'browser',\n+ splitting: false,\n+ esbuildOptions(options, {format}) {\n+ options.outdir = undefined\n+ options.outfile = outFiles[format]\n+ if (format === 'cjs') {\n+ // esbuild does not generate UMD format OOTB, see https://github.com/evanw/esbuild/issues/507\n+ // the following code is a trick to generate UMD output in place of cjs\n+ options.format = 'iife'\n+ options.banner = {\n+ js: `(function (global, factory) {\n+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :\n+ typeof define === 'function' && define.amd ? define(['exports'], factory) :\n+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global[\"@influxdata/influxdb-client\"] = {}));\n+})(this, (function (exports) {`,\n+ }\n+ options.footer = {\n+ js: `Object.defineProperty(exports, '__esModule', { value: true });Object.assign(exports, ${options.globalName});}));`,\n+ }\n+ }\n+ },\n+})\n"
}
] | TypeScript | MIT License | influxdata/influxdb-client-js | chore: switch giraffe package to esbuild |
305,159 | 02.08.2022 14:05:18 | -7,200 | 2a4c505de8b6e2a056ecf0ec6407cf5a52720aca | chore: add tsup config files to gitignore | [
{
"change_type": "MODIFY",
"old_path": "packages/apis/.npmignore",
"new_path": "packages/apis/.npmignore",
"diff": "@@ -9,7 +9,7 @@ doc\nreports\nyarn-error.log\n/tsconfig.*\n-/rollup.config.js\n+/tsup.*\n/.prettierrc.json\n/generator\n/resources\n"
},
{
"change_type": "MODIFY",
"old_path": "packages/core/.npmignore",
"new_path": "packages/core/.npmignore",
"diff": "@@ -9,7 +9,7 @@ doc\nreports\nyarn-error.log\n/tsconfig.*\n-/rollup.config.js\n+/tsup.*\n/.prettierrc.json\n/src\n/test\n"
},
{
"change_type": "MODIFY",
"old_path": "packages/giraffe/.npmignore",
"new_path": "packages/giraffe/.npmignore",
"diff": "@@ -9,7 +9,7 @@ doc\nreports\nyarn-error.log\n/tsconfig.*\n-/rollup.config.js\n+/tsup.*\n/.prettierrc.json\n/src\n/test\n"
}
] | TypeScript | MIT License | influxdata/influxdb-client-js | chore: add tsup config files to gitignore |
305,159 | 03.08.2022 07:44:53 | -7,200 | 1e4df8f0031a4783359612f0b05c69dbffa3cc6d | chore: gzip built js files | [
{
"change_type": "MODIFY",
"old_path": "package.json",
"new_path": "package.json",
"diff": "\"name\": \"InfluxData\"\n},\n\"license\": \"MIT\",\n- \"dependencies\": {\n+ \"devDependencies\": {\n+ \"@types/node\": \"^16\",\n\"@microsoft/api-documenter\": \"^7.18.3\",\n\"gh-pages\": \"^4.0.0\",\n\"lerna\": \"^5.0.0\",\n\"prettier\": \"^2.7.1\",\n\"rimraf\": \"^3.0.0\"\n- },\n- \"resolutions\": {\n- \"minimist\": \">=1.2.2\"\n}\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "packages/apis/tsup.config.browser.ts",
"new_path": "packages/apis/tsup.config.browser.ts",
"diff": "import {defineConfig} from 'tsup'\n+import {esbuildGzipOutJsPlugin} from '../../scripts/esbuild-gzip-js'\nimport pkg from './package.json'\nconst minify = !(process.env.ESBUILD_MINIFY === '0')\n@@ -37,4 +38,5 @@ export default defineConfig({\n}\n}\n},\n+ esbuildPlugins: [esbuildGzipOutJsPlugin],\n})\n"
},
{
"change_type": "MODIFY",
"old_path": "packages/apis/tsup.config.ts",
"new_path": "packages/apis/tsup.config.ts",
"diff": "import {defineConfig} from 'tsup'\n+import {esbuildGzipOutJsPlugin} from '../../scripts/esbuild-gzip-js'\nimport pkg from './package.json'\nconst minify = !(process.env.ESBUILD_MINIFY === '0')\n@@ -20,4 +21,5 @@ export default defineConfig({\noptions.outdir = undefined\noptions.outfile = outFiles[format]\n},\n+ esbuildPlugins: [esbuildGzipOutJsPlugin],\n})\n"
},
{
"change_type": "MODIFY",
"old_path": "packages/core/tsup.config.browser.ts",
"new_path": "packages/core/tsup.config.browser.ts",
"diff": "import {defineConfig} from 'tsup'\n+import {esbuildGzipOutJsPlugin} from '../../scripts/esbuild-gzip-js'\nimport {readFile} from 'fs/promises'\nimport pkg from './package.json'\n@@ -43,12 +44,13 @@ export default defineConfig({\n}\n},\nesbuildPlugins: [\n+ esbuildGzipOutJsPlugin,\n{\n- name: 'replace',\n+ name: 'replaceTransportImport',\nsetup: (build) => {\nbuild.onLoad({filter: /InfluxDB.ts$/}, async (args) => {\nconst source = await readFile(args.path, 'utf8')\n- const contents = source.replace(\n+ const contents = (source as unknown as string).replace(\n'./impl/node/NodeHttpTransport',\n'./impl/browser/FetchTransport'\n)\n"
},
{
"change_type": "MODIFY",
"old_path": "packages/core/tsup.config.ts",
"new_path": "packages/core/tsup.config.ts",
"diff": "import {defineConfig} from 'tsup'\n+import {esbuildGzipOutJsPlugin} from '../../scripts/esbuild-gzip-js'\nimport pkg from './package.json'\nconst minify = !(process.env.ESBUILD_MINIFY === '0')\n@@ -23,4 +24,5 @@ export default defineConfig({\ndefine: {\n'process.env.BUILD_BROWSER': 'false',\n},\n+ esbuildPlugins: [esbuildGzipOutJsPlugin],\n})\n"
},
{
"change_type": "MODIFY",
"old_path": "packages/giraffe/tsup.config.ts",
"new_path": "packages/giraffe/tsup.config.ts",
"diff": "import {defineConfig} from 'tsup'\n+import {esbuildGzipOutJsPlugin} from '../../scripts/esbuild-gzip-js'\nimport pkg from './package.json'\nconst minify = !(process.env.ESBUILD_MINIFY === '0')\n@@ -37,4 +38,5 @@ export default defineConfig({\n}\n}\n},\n+ esbuildPlugins: [esbuildGzipOutJsPlugin],\n})\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "scripts/esbuild-gzip-js.ts",
"diff": "+import {mkdir, writeFile} from 'fs/promises'\n+import {dirname} from 'path'\n+import {promisify} from 'util'\n+import {gzip} from 'zlib'\n+\n+const compressGz = promisify(gzip)\n+\n+export interface BuildResult {\n+ outputFiles?: Array<{path: string; contents: Uint8Array}>\n+}\n+/**\n+ * ESBuild onEnd callback that additionally gzips all produced JS files.\n+ */\n+export async function esbuildGzipOnEnd(result: BuildResult): Promise<void> {\n+ // gzip js files\n+ await Promise.all(\n+ (result.outputFiles || [])\n+ .filter((x) => x.path.endsWith('js'))\n+ .map(async ({path, contents}) => {\n+ await mkdir(dirname(path), {recursive: true})\n+ await writeFile(path + '.gz', await compressGz(contents, {level: 9}))\n+ })\n+ )\n+}\n+\n+/** ESBuild plugin that gzips output js files */\n+export const esbuildGzipOutJsPlugin = {\n+ name: 'gzipJsFiles',\n+ setup: (build: {\n+ onEnd: (callback: (result: BuildResult) => Promise<void>) => void\n+ }) => {\n+ build.onEnd(esbuildGzipOnEnd)\n+ },\n+}\n"
},
{
"change_type": "MODIFY",
"old_path": "yarn.lock",
"new_path": "yarn.lock",
"diff": "resolved \"https://registry.yarnpkg.com/@types/node/-/node-12.20.24.tgz#c37ac69cb2948afb4cef95f424fa0037971a9a5c\"\nintegrity sha512-yxDeaQIAJlMav7fH5AQqPH1u8YIuhYJXYBzxaQ4PifsU0GDO38MSdmEDeRlIxrKbC6NbEaaEHDanWb+y30U8SQ==\n+\"@types/node@^16\":\n+ version \"16.11.47\"\n+ resolved \"https://registry.yarnpkg.com/@types/node/-/node-16.11.47.tgz#efa9e3e0f72e7aa6a138055dace7437a83d9f91c\"\n+ integrity sha512-fpP+jk2zJ4VW66+wAMFoBJlx1bxmBKx4DUFf68UHgdGCOuyUTDlLWqsaNPJh7xhNDykyJ9eIzAygilP/4WoN8g==\n+\n\"@types/normalize-package-data@^2.4.0\":\nversion \"2.4.1\"\nresolved \"https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.1.tgz#d3357479a0fdfdd5907fe67e17e0a85c906e1301\"\n@@ -4290,7 +4295,7 @@ [email protected]:\nis-plain-obj \"^1.1.0\"\nkind-of \"^6.0.3\"\n-minimist@>=1.2.2, minimist@^1.2.0, minimist@^1.2.5, minimist@^1.2.6:\n+minimist@^1.2.0, minimist@^1.2.5, minimist@^1.2.6:\nversion \"1.2.6\"\nresolved \"https://registry.yarnpkg.com/minimist/-/minimist-1.2.6.tgz#8637a5b759ea0d6e98702cfb3a9283323c93af44\"\nintegrity sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==\n"
}
] | TypeScript | MIT License | influxdata/influxdb-client-js | chore: gzip built js files |
305,159 | 03.08.2022 10:47:39 | -7,200 | e528b2859dd7efed25a710e74141b92669bfd109 | chore: repair giraffe UMD build | [
{
"change_type": "MODIFY",
"old_path": "packages/giraffe/tsup.config.ts",
"new_path": "packages/giraffe/tsup.config.ts",
"diff": "@@ -30,7 +30,7 @@ export default defineConfig({\njs: `(function (global, factory) {\ntypeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :\ntypeof define === 'function' && define.amd ? define(['exports'], factory) :\n- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global[\"@influxdata/influxdb-client\"] = {}));\n+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global[\"@influxdata/influxdb-client-giraffe\"] = {}));\n})(this, (function (exports) {`,\n}\noptions.footer = {\n"
}
] | TypeScript | MIT License | influxdata/influxdb-client-js | chore: repair giraffe UMD build |
305,159 | 03.08.2022 13:48:35 | -7,200 | 44bb05cfc757d1f03edf4e461b7e2342ab9d798f | chore: upgrade giraffe example | [
{
"change_type": "MODIFY",
"old_path": "examples/giraffe.html",
"new_path": "examples/giraffe.html",
"diff": "// required by giraffe\nglobal = window\n</script>\n- <script src=\"https://unpkg.com/[email protected]/umd/react.development.js\"></script>\n- <script src=\"https://unpkg.com/[email protected]/umd/react-dom.development.js\"></script>\n- <script src=\"https://cdn.jsdelivr.net/npm/@influxdata/[email protected]/dist/index.js\"></script>\n+ <script src=\"https://unpkg.com/[email protected]/umd/react.development.js\"></script>\n+ <script src=\"https://unpkg.com/[email protected]/umd/react-dom.development.js\"></script>\n+ <script src=\"https://cdn.jsdelivr.net/npm/@influxdata/[email protected]/dist/index.js\"></script>\n<script src=\"https://unpkg.com/@influxdata/influxdb-client/dist/index.browser.js\"></script>\n<script src=\"https://unpkg.com/@influxdata/influxdb-client-giraffe/dist/index.js\"></script>\n<!-- <script src=\"../packages/giraffe/dist/index.js\"></script> -->\n@@ -60,7 +60,7 @@ from(bucket:\"my-bucket\") |> range(start: -1d) |> filter(fn: (r) => r._measuremen\nconst queryApi = influxDB.getQueryApi(org)\n// execute query and fill query data into giraffe table\n- const giraffe = window['@influxdata/giraffe']\n+ const giraffe = window.Giraffe\n// React functional component that renders query results or an error\nfunction RenderResults({error, table}) {\nif (error) {\n"
}
] | TypeScript | MIT License | influxdata/influxdb-client-js | chore: upgrade giraffe example |
305,159 | 04.08.2022 08:25:01 | -7,200 | c61d9673965afc26e4d912fee9d0029d767c8eec | fix(apidoc): correct generated doc comment links | [
{
"change_type": "MODIFY",
"old_path": "scripts/fix-extracted-api-files.js",
"new_path": "scripts/fix-extracted-api-files.js",
"diff": "const path = require('path')\nconst fs = require('fs')\n+const markdownLinkRE = /\\[([^\\]]*)\\]\\(([^)]*)\\)/g\n+function changeMarkdownLinks(text) {\n+ if (text) {\n+ // changes markdown style [text](link) to tsdoc {@link URL | text }\n+ return text.replace(markdownLinkRE, (match, text, link) => {\n+ const retVal = `{@link ${link} | ${text} }`\n+ console.log(` ${match} => ${retVal}`)\n+ return retVal\n+ })\n+ }\n+ return text\n+}\n+\nfunction replaceInExtractorFile(file) {\n- console.log(`correct references in: ${file}`)\nconst data = fs.readFileSync(file, 'utf8')\nconst json = JSON.parse(data)\n+ console.log(`correct: ${file}`)\nfunction replaceObject(obj) {\nif (typeof obj === 'object') {\n@@ -26,6 +39,10 @@ function replaceInExtractorFile(file) {\n}\n} else {\nfor (const key in obj) {\n+ if (key === 'docComment') {\n+ obj.docComment = changeMarkdownLinks(obj.docComment)\n+ continue\n+ }\nreplaceObject(obj[key])\n}\n}\n@@ -38,7 +55,7 @@ function replaceInExtractorFile(file) {\n}\nconst docsDir = path.resolve(__dirname, '..', 'docs')\n-const files = fs.readdirSync(docsDir).filter(x => /\\.api\\.json$/.test(x))\n-files.forEach(file => {\n+const files = fs.readdirSync(docsDir).filter((x) => /\\.api\\.json$/.test(x))\n+files.forEach((file) => {\nreplaceInExtractorFile(path.resolve(docsDir, file))\n})\n"
}
] | TypeScript | MIT License | influxdata/influxdb-client-js | fix(apidoc): correct generated doc comment links |
305,159 | 04.08.2022 09:08:48 | -7,200 | 91a9f54b102c07be4b27eca9d97dad89c680582a | chore(apidoc): change links to point to the latest influxdb | [
{
"change_type": "MODIFY",
"old_path": "examples/delete.ts",
"new_path": "examples/delete.ts",
"diff": "#!./node_modules/.bin/ts-node\n-///////////////////////////////////////////////////////////////////////\n+/////////////////////////////////////////////////////////////////////////\n// Shows how to delete data from InfluxDB. See //\n-// https://docs.influxdata.com/influxdb/v2.1/write-data/delete-data/ //\n-///////////////////////////////////////////////////////////////////////\n+// https://docs.influxdata.com/influxdb/latest/write-data/delete-data/ //\n+/////////////////////////////////////////////////////////////////////////\nimport {InfluxDB} from '@influxdata/influxdb-client'\nimport {DeleteAPI} from '@influxdata/influxdb-client-apis'\n@@ -36,7 +36,7 @@ async function deleteData(): Promise<void> {\nbody: {\nstart: start.toISOString(),\nstop: stop.toISOString(),\n- // see https://docs.influxdata.com/influxdb/v2.1/reference/syntax/delete-predicate/\n+ // see https://docs.influxdata.com/influxdb/latest/reference/syntax/delete-predicate/\npredicate: '_measurement=\"temperature\"',\n},\n})\n"
},
{
"change_type": "MODIFY",
"old_path": "examples/query.ts",
"new_path": "examples/query.ts",
"diff": "@@ -15,7 +15,7 @@ console.log('*** QUERY ROWS ***')\n// the essential ones are shown/commented below. See also rxjs-query.ts .\n//\n// Execute query and receive table metadata and rows as they arrive from the server.\n-// https://docs.influxdata.com/influxdb/v2.1/reference/syntax/annotated-csv/\n+// https://docs.influxdata.com/influxdb/latest/reference/syntax/annotated-csv/\nqueryApi.queryRows(fluxQuery, {\nnext: (row: string[], tableMeta: FluxTableMetaData) => {\n// the following line creates an object for each row\n"
},
{
"change_type": "MODIFY",
"old_path": "examples/rxjs-query.ts",
"new_path": "examples/rxjs-query.ts",
"diff": "@@ -15,7 +15,7 @@ const fluxQuery =\nconsole.log('*** QUERY ROWS ***')\n// performs query and receive line table metadata and rows\n-// https://docs.influxdata.com/influxdb/v2.1/reference/syntax/annotated-csv/\n+// https://docs.influxdata.com/influxdb/latest/reference/syntax/annotated-csv/\nfrom(queryApi.rows(fluxQuery))\n.pipe(map(({values, tableMeta}) => tableMeta.toObject(values)))\n.subscribe({\n@@ -34,5 +34,5 @@ from(queryApi.rows(fluxQuery))\n})\n// performs query and receive line results in annotated csv format\n-// https://docs.influxdata.com/influxdb/v2.1/reference/syntax/annotated-csv/\n+// https://docs.influxdata.com/influxdb/latest/reference/syntax/annotated-csv/\n// from(queryApi.lines(fluxQuery)).forEach(console.log)\n"
},
{
"change_type": "MODIFY",
"old_path": "packages/core/src/QueryApi.ts",
"new_path": "packages/core/src/QueryApi.ts",
"diff": "@@ -35,7 +35,7 @@ export interface QueryOptions {\n/**\n* Query InfluxDB. Provides methods that notify about result lines of the executed query.\n- * See {@link https://docs.influxdata.com/influxdb/v2.1/api/#operation/PostQuery }\n+ * See {@link https://docs.influxdata.com/influxdb/latest/api/#operation/PostQuery }\n*/\nexport default interface QueryApi {\n/**\n@@ -73,7 +73,7 @@ export default interface QueryApi {\n/**\n* Executes the query and receives result lines (including empty and annotation lines)\n- * through the supplied consumer. See [annotated-csv](https://docs.influxdata.com/influxdb/v2.3/reference/syntax/annotated-csv/).\n+ * through the supplied consumer. See [annotated-csv](https://docs.influxdata.com/influxdb/latest/reference/syntax/annotated-csv/).\n*\n* @param query - query\n* @param consumer - csv result lines and error consumer\n"
},
{
"change_type": "MODIFY",
"old_path": "packages/core/src/impl/QueryApiImpl.ts",
"new_path": "packages/core/src/impl/QueryApiImpl.ts",
"diff": "@@ -128,7 +128,7 @@ export class QueryApiImpl implements QueryApi {\nif (typeof this.options.now === 'function') {\nrequest.now = this.options.now()\n}\n- // https://docs.influxdata.com/influxdb/v2.1/api/#operation/PostQuery requires type\n+ // https://docs.influxdata.com/influxdb/latest/api/#operation/PostQuery requires type\nrequest.type = this.options.type ?? 'flux'\nreturn request\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "packages/core/src/options.ts",
"new_path": "packages/core/src/options.ts",
"diff": "@@ -161,6 +161,6 @@ export interface ClientOptions extends ConnectionOptions {\n/**\n* Timestamp precision used in write operations.\n- * See {@link https://docs.influxdata.com/influxdb/v2.1/api/#operation/PostWrite }\n+ * See {@link https://docs.influxdata.com/influxdb/latest/api/#operation/PostWrite }\n*/\nexport type WritePrecisionType = 'ns' | 'us' | 'ms' | 's'\n"
},
{
"change_type": "MODIFY",
"old_path": "packages/core/src/results/AnnotatedCSVResponse.ts",
"new_path": "packages/core/src/results/AnnotatedCSVResponse.ts",
"diff": "@@ -21,7 +21,7 @@ export interface AnnotatedCSVResponse {\nrows(): Observable<Row>\n/**\n* ConsumesLines consumes result lines (including empty and annotation lines)\n- * through the supplied consumer. See [annotated-csv](https://docs.influxdata.com/influxdb/v2.1/reference/syntax/annotated-csv/).\n+ * through the supplied consumer. See [annotated-csv](https://docs.influxdata.com/influxdb/latest/reference/syntax/annotated-csv/).\n* @param consumer - csv result lines and error consumer\n*/\nconsumeLines(consumer: CommunicationObserver<string>): void\n"
},
{
"change_type": "MODIFY",
"old_path": "packages/core/src/results/FluxTableColumn.ts",
"new_path": "packages/core/src/results/FluxTableColumn.ts",
"diff": "/**\n- * Type of query result column, see {@link https://docs.influxdata.com/influxdb/v2.1/reference/syntax/annotated-csv/#data-types }\n+ * Type of query result column, see {@link https://docs.influxdata.com/influxdb/latest/reference/syntax/annotated-csv/#data-types }\n*/\nexport type ColumnType =\n| 'boolean'\n@@ -53,7 +53,7 @@ const identity = (x: string): any => x\n/**\n* A dictionary of serializers of particular types returned by a flux query.\n- * See {@link https://docs.influxdata.com/influxdb/v2.1/reference/syntax/annotated-csv/#data-types }\n+ * See {@link https://docs.influxdata.com/influxdb/latest/reference/syntax/annotated-csv/#data-types }\n*/\nexport const typeSerializers: Record<ColumnType, (val: string) => any> = {\nboolean: (x: string): any => x === 'true',\n"
}
] | TypeScript | MIT License | influxdata/influxdb-client-js | chore(apidoc): change links to point to the latest influxdb |
305,159 | 04.08.2022 09:20:16 | -7,200 | f04d7e0b8260a7cbb68bc408901c1ee9d57d89ca | chore(docs): point flux links to the latest flux version | [
{
"change_type": "MODIFY",
"old_path": "packages/apis/src/generated/types.ts",
"new_path": "packages/apis/src/generated/types.ts",
"diff": "@@ -2210,16 +2210,16 @@ export interface Task {\n/** Flux script to run for this task. */\nflux: string\n/** Interval at which the task runs. `every` also determines when the task first runs, depending on the specified time.\n-Value is a [duration literal](https://docs.influxdata.com/flux/v0.x/spec/lexical-elements/#duration-literals)). */\n+Value is a [duration literal](https://docs.influxdata.com/flux/latest/spec/lexical-elements/#duration-literals)). */\nevery?: string\n/** [Cron expression](https://en.wikipedia.org/wiki/Cron#Overview) that defines the schedule on which the task runs. Cron scheduling is based on system time.\nValue is a [Cron expression](https://en.wikipedia.org/wiki/Cron#Overview). */\ncron?: string\n- /** [Duration](https://docs.influxdata.com/flux/v0.x/spec/lexical-elements/#duration-literals) to delay execution of the task after the scheduled time has elapsed. `0` removes the offset.\n-The value is a [duration literal](https://docs.influxdata.com/flux/v0.x/spec/lexical-elements/#duration-literals). */\n+ /** [Duration](https://docs.influxdata.com/flux/latest/spec/lexical-elements/#duration-literals) to delay execution of the task after the scheduled time has elapsed. `0` removes the offset.\n+The value is a [duration literal](https://docs.influxdata.com/flux/latest/spec/lexical-elements/#duration-literals). */\noffset?: string\n/** Timestamp of the latest scheduled and completed run.\n-Value is a timestamp in [RFC3339 date/time format](https://docs.influxdata.com/flux/v0.x/data-types/basic/time/#time-syntax). */\n+Value is a timestamp in [RFC3339 date/time format](https://docs.influxdata.com/flux/latest/data-types/basic/time/#time-syntax). */\nreadonly latestCompleted?: string\nreadonly lastRunStatus?: 'failed' | 'success' | 'canceled'\nreadonly lastRunError?: string\n"
},
{
"change_type": "MODIFY",
"old_path": "packages/core/src/query/flux.ts",
"new_path": "packages/core/src/query/flux.ts",
"diff": "@@ -39,7 +39,7 @@ function isFluxParameterLike(value: any): boolean {\n/**\n* Escapes content of the supplied string so it can be wrapped into double qoutes\n- * to become a [flux string literal](https://docs.influxdata.com/flux/v0.x/spec/lexical-elements/#string-literals).\n+ * to become a [flux string literal](https://docs.influxdata.com/flux/latest/spec/lexical-elements/#string-literals).\n* @param value - string value\n* @returns sanitized string\n*/\n@@ -120,7 +120,7 @@ export function sanitizeFloat(value: any): string {\nthrow new Error(`not a flux float: ${value}`)\n}\n// try to return a flux float literal if possible\n- // https://docs.influxdata.com/flux/v0.x/data-types/basic/float/#float-syntax\n+ // https://docs.influxdata.com/flux/latest/data-types/basic/float/#float-syntax\nconst strVal = val.toString()\nlet hasDot = false\nfor (const c of strVal) {\n@@ -147,7 +147,7 @@ export function fluxFloat(value: any): FluxParameterLike {\n* @throws Error if the the value cannot be sanitized\n*/\nexport function sanitizeInteger(value: any): string {\n- // https://docs.influxdata.com/flux/v0.x/data-types/basic/int/\n+ // https://docs.influxdata.com/flux/latest/data-types/basic/int/\n// Min value: -9223372036854775808\n// Max value: 9223372036854775807\n// \"9223372036854775807\".length === 19\n@@ -205,7 +205,7 @@ function sanitizeRegExp(value: any): string {\n/**\n* Creates flux regexp literal out of a regular expression. See\n- * https://docs.influxdata.com/flux/v0.x/data-types/basic/regexp/#regular-expression-syntax\n+ * https://docs.influxdata.com/flux/latest/data-types/basic/regexp/#regular-expression-syntax\n* for details.\n*/\nexport function fluxRegExp(value: any): FluxParameterLike {\n"
}
] | TypeScript | MIT License | influxdata/influxdb-client-js | chore(docs): point flux links to the latest flux version |
305,159 | 04.08.2022 13:42:52 | -7,200 | 74f59f773ba9008a2cb2fa35dabfeb586970d255 | chore: remove giraffe example | [
{
"change_type": "MODIFY",
"old_path": "README.md",
"new_path": "README.md",
"diff": "@@ -83,7 +83,6 @@ See [examples](./examples/README.md) for more advanced use case like the followi\n- Use the client library in the browser or [Deno](./examples/query.deno.ts).\n- Process InfluxDB query results with RX Observables.\n- Customize the writing of measurement points to InfluxDB.\n-- Visualize query results in [Giraffe](https://github.com/influxdata/giraffe).\n- [Reuse connections](https://github.com/influxdata/influxdb-client-js/issues/393#issuecomment-985272866) in communication with InfluxDB.\nJavaScript client API Reference Documentation is available online at https://influxdata.github.io/influxdb-client-js/ .\n"
},
{
"change_type": "MODIFY",
"old_path": "examples/README.md",
"new_path": "examples/README.md",
"diff": "@@ -36,8 +36,6 @@ This directory contains javascript and typescript examples for node.js, browser,\nIt starts a local HTTP server and opens [index.html](./index.html) that contains client examples.\nThe local HTTP server serves all files from this git repository and also proxies requests\nto a configured influxDB database, see [scripts/server.js](./scripts/server.js) for details.\n- - Click `Visualize with Giraffe Line Chart` to open [giraffe.html](./giraffe.html) that\n- shows how visualize query results with [@influxdata/giraffe](https://github.com/influxdata/giraffe).\n- Deno examples\n- [query.deno.ts](./query.deno.ts) shows how to query InfluxDB with [Flux](https://docs.influxdata.com/influxdb/v2.1/get-started/).\nIt is almost the same as node's [query.ts](./query.ts) example, the difference is the import statement that works in [deno](https://deno.land) and built-in typescript support.\n"
},
{
"change_type": "MODIFY",
"old_path": "examples/env_browser.js",
"new_path": "examples/env_browser.js",
"diff": "/*\n- * The following configuration is used in the browser examples\n- * (index.html and giraffe.html).\n- *\n- * Replace the values with your own InfluxDB values.\n+ * The following configuration is used in the browser example.\n*/\n// eslint-disable-next-line no-undef\nwindow.INFLUX_ENV = {\n"
},
{
"change_type": "DELETE",
"old_path": "examples/giraffe.html",
"new_path": null,
"diff": "-<html>\n- <head>\n- <title>Example: Flux Query Results visualized with Giraffe</title>\n- <script>\n- // required by react\n- window.process = {\n- env: 'development',\n- }\n- // required by giraffe\n- global = window\n- </script>\n- <script src=\"https://unpkg.com/[email protected]/umd/react.development.js\"></script>\n- <script src=\"https://unpkg.com/[email protected]/umd/react-dom.development.js\"></script>\n- <script src=\"https://cdn.jsdelivr.net/npm/@influxdata/[email protected]/dist/index.js\"></script>\n- <script src=\"https://unpkg.com/@influxdata/influxdb-client/dist/index.browser.js\"></script>\n- <script src=\"https://unpkg.com/@influxdata/influxdb-client-giraffe/dist/index.js\"></script>\n- <!-- <script src=\"../packages/giraffe/dist/index.js\"></script> -->\n- <script src=\"./env_browser.js\"></script>\n- </head>\n- <body>\n- <h1>Example: Flux Query Results visualized with Giraffe</h1>\n- <fieldset>\n- <legend>Flux Query</legend>\n- <div style=\"display: flex; margin-bottom: 10px\">\n- <textarea id=\"fluxQuery\" style=\"flex: 1\" rows=\"2\">\n-from(bucket:\"my-bucket\") |> range(start: -1d) |> filter(fn: (r) => r._measurement == \"temperature\")</textarea\n- >\n- </div>\n- </fieldset>\n- <fieldset>\n- <legend>Giraffe Visualization</legend>\n- <div\n- style=\"\n- width: 100%;\n- height: 200px;\n- border: 1px solid grey;\n- margin-bottom: 10px;\n- \"\n- id=\"renderArea\"\n- ></div>\n- </fieldset>\n- <button id=\"reloadButton\">Reload</button>\n- <button id=\"sampleButton\">Show Sample Data</button>\n- <button id=\"clientExamples\">\n- Open InfluxDB JavaScript Client Examples\n- </button>\n- <script>\n- // get query from request parameter or use default\n- fluxQuery = new URLSearchParams(window.location.search).get('fluxQuery')\n- if (!fluxQuery) {\n- fluxQuery = `from(bucket:\"my-bucket\") |> range(start: -1d) |> filter(fn: (r) => r._measurement == \"temperature\")`\n- }\n- const fluxQueryInput = document.getElementById('fluxQuery')\n- fluxQueryInput.value = fluxQuery\n-\n- // create query API\n- const {url, token, org} = window.INFLUX_ENV // loaded in ./env_browser.js\n- const influxDBClient = window['@influxdata/influxdb-client']\n- const influxDB = new influxDBClient.InfluxDB({url, token})\n- const queryApi = influxDB.getQueryApi(org)\n-\n- // execute query and fill query data into giraffe table\n- const giraffe = window.Giraffe\n- // React functional component that renders query results or an error\n- function RenderResults({error, table}) {\n- if (error) {\n- // render error message\n- return React.createElement('center', null, error.toString())\n- } else if (table.length) {\n- // render giraffe plot\n- const plotConfig = {\n- table: table,\n- layers: [\n- {\n- type: 'line',\n- x: '_time',\n- y: '_value',\n- },\n- ],\n- valueFormatters: {\n- _time: giraffe.timeFormatter({\n- timeZone: 'UTC',\n- format: 'YYYY-MM-DD HH:mm:ss ZZ',\n- }),\n- },\n- }\n- return React.createElement(giraffe.Plot, {config: plotConfig})\n- } else {\n- // render empty table recevied\n- return React.createElement('center', null, 'Empty Table Received')\n- }\n- }\n- const influxDBClientGiraffe =\n- window['@influxdata/influxdb-client-giraffe']\n- function queryAndVisualize() {\n- influxDBClientGiraffe\n- .queryToTable(queryApi, fluxQueryInput.value, giraffe.newTable)\n- .then((table) => {\n- console.log('queryToTable returns', table)\n- ReactDOM.render(\n- React.createElement(RenderResults, {table}),\n- document.getElementById('renderArea')\n- )\n- })\n- .catch((error) => {\n- console.log('queryToTable fails', error)\n- ReactDOM.render(\n- React.createElement(RenderResults, {error}),\n- document.getElementById('renderArea')\n- )\n- })\n- }\n- queryAndVisualize()\n- document.getElementById('reloadButton').addEventListener('click', () => {\n- queryAndVisualize()\n- })\n- const clientExamples = document.getElementById('clientExamples')\n- clientExamples.addEventListener('click', (e) => {\n- const target =\n- './index.html?fluxQuery=' + encodeURIComponent(fluxQueryInput.value)\n- window.open(target, '_blank')\n- })\n- function sampleAndVisualize() {\n- // create sample query response\n- let queryResponseData =\n- '#datatype,string,long,string,string,dateTime:RFC3339,dateTime:RFC3339,dateTime:RFC3339,double\\n'\n- queryResponseData +=\n- '#group,false,false,true,true,true,true,false,false\\n'\n- queryResponseData += '#default,_result,,,,,,,\\n'\n- queryResponseData +=\n- ',result,table,_measurement,_field,_start,_stop,_time,_value\\n'\n- const time = Math.trunc(Date.now() / 60000) // start this second\n- const sampleStart =\n- ',,0,temperature,value,2010-01-01T00:00:00Z,2030-01-01T00:00:00Z,'\n- const value = Math.random() * Math.PI\n- for (let i = 0; i < 1000; i++) {\n- const _time = new Date((time + i) * 60000).toISOString()\n- const _value = 20 + 15 * Math.sin(value + (i / 1000) * Math.PI)\n- queryResponseData += sampleStart\n- queryResponseData += `${_time},${_value}\\n`\n- }\n- // transform response to giraffe table and visualize\n- const table = influxDBClientGiraffe.csvToTable(\n- queryResponseData,\n- giraffe.newTable\n- )\n- console.log('csvToTable returns', table)\n- ReactDOM.render(\n- React.createElement(RenderResults, {table}),\n- document.getElementById('renderArea')\n- )\n- }\n- document.getElementById('sampleButton').addEventListener('click', () => {\n- sampleAndVisualize()\n- })\n- </script>\n- </body>\n-</html>\n"
},
{
"change_type": "MODIFY",
"old_path": "examples/index.html",
"new_path": "examples/index.html",
"diff": "document.getElementById('pingButton').addEventListener('click', () => {\npingExample()\n})\n- const visualizeInGiraffe = document.getElementById('visualizeInGiraffe')\n- visualizeInGiraffe.addEventListener('click', (e) => {\n- const target =\n- './giraffe.html?fluxQuery=' + encodeURIComponent(queryInput.value)\n- window.open(target, '_blank')\n- })\n</script>\n</head>\n<h1>InfluxDB JavaScript Client Examples</h1>\n@@ -182,7 +176,6 @@ from(bucket:\"my-bucket\") |> range(start: -1d) |> filter(fn: (r) => r._measuremen\n>\n</div>\n<button id=\"queryButton\">Query InfluxDB</button>\n- <button id=\"visualizeInGiraffe\">Visualize with Giraffe Line Chart</button>\n<hr />\n<fieldset>\n<legend>Log</legend>\n"
},
{
"change_type": "MODIFY",
"old_path": "packages/giraffe/api-extractor.json",
"new_path": "packages/giraffe/api-extractor.json",
"diff": "\"$schema\": \"https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json\",\n\"extends\": \"../../scripts/api-extractor-base.json\",\n\"mainEntryPointFilePath\": \"<projectFolder>/dist/index.d.ts\"\n- // \"compiler\": {\n- // /*\n- // * A lot of warnings are issued from giraffe, they must be suppressed.\n- // */\n- // \"skipLibCheck\": true\n- // }\n}\n"
}
] | TypeScript | MIT License | influxdata/influxdb-client-js | chore: remove giraffe example |
305,159 | 04.08.2022 14:22:06 | -7,200 | a17da61d350334bc1be9f5246ec03dd7c0feba0e | feat: replace ts-node with esbuild-runner | [
{
"change_type": "MODIFY",
"old_path": ".vscode/launch.json",
"new_path": ".vscode/launch.json",
"diff": "\"program\": \"${workspaceRoot}/node_modules/mocha/bin/_mocha\",\n\"args\": [\n\"--require\",\n- \"ts-node/register\",\n+ \"esbuild-runner/register\",\n\"--timeout\",\n\"15000\",\n\"--colors\",\n"
},
{
"change_type": "MODIFY",
"old_path": "packages/apis/package.json",
"new_path": "packages/apis/package.json",
"diff": "\"build\": \"yarn run clean && yarn tsup --config ./tsup.config.browser.ts && yarn tsup\",\n\"clean\": \"rimraf build doc dist reports\",\n\"clean:apis\": \"rimraf src/generated/*API.ts\",\n- \"generate\": \"yarn ts-node generator && yarn prettier --write src/generated/*.ts\",\n+ \"generate\": \"yarn esr generator && yarn prettier --write src/generated/*.ts\",\n\"test\": \"yarn run lint && yarn run typecheck && yarn run test:unit\",\n- \"test:unit\": \"mocha --require ts-node/register 'test/unit/**/*.test.ts' --exit\",\n+ \"test:unit\": \"mocha --require esbuild-runner/register 'test/unit/**/*.test.ts' --exit\",\n\"test:ci\": \"yarn run typecheck && yarn run lint:ci && yarn run test:unit --reporter mocha-junit-reporter --reporter-options mochaFile=../../reports/apis_mocha/test-results.xml\",\n\"typecheck\": \"tsc --noEmit --pretty\",\n\"lint\": \"eslint 'src/**/*.ts'\",\n\"@typescript-eslint/eslint-plugin\": \"^5.29.0\",\n\"@typescript-eslint/parser\": \"^5.29.0\",\n\"chai\": \"^4.2.0\",\n+ \"esbuild\": \"^0.14.25\",\n+ \"esbuild-runner\": \"^2.2.1\",\n\"eslint\": \"^8.18.0\",\n\"eslint-config-prettier\": \"^8.5.0\",\n\"eslint-plugin-prettier\": \"^4.2.1\",\n\"nock\": \"^13.2.8\",\n\"prettier\": \"^2.7.1\",\n\"rimraf\": \"^3.0.0\",\n- \"ts-node\": \"^10.8.1\",\n\"tsup\": \"^6.2.1\",\n\"typescript\": \"^4.7.4\"\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "packages/core/package.json",
"new_path": "packages/core/package.json",
"diff": "\"apidoc:extract\": \"api-extractor run\",\n\"build\": \"yarn run clean && yarn tsup --config ./tsup.config.browser.ts && yarn tsup\",\n\"clean\": \"rimraf dist build coverage .nyc_output doc *.lcov reports\",\n- \"coverage\": \"nyc mocha --require ts-node/register 'test/**/*.test.ts' --exit\",\n+ \"coverage\": \"nyc mocha --require esbuild-runner/register 'test/**/*.test.ts' --exit\",\n\"coverage:ci\": \"yarn run coverage && yarn run coverage:lcov\",\n\"coverage:lcov\": \"yarn run --silent nyc report --reporter=text-lcov > coverage/coverage.lcov\",\n\"test\": \"yarn run lint && yarn run typecheck && yarn run test:all\",\n- \"test:all\": \"mocha --require ts-node/register 'test/**/*.test.ts' --exit\",\n- \"test:unit\": \"mocha --require ts-node/register 'test/unit/**/*.test.ts' --exit\",\n- \"test:integration\": \"mocha --require ts-node/register 'test/integration/**/*.test.ts' --exit\",\n+ \"test:all\": \"mocha --require esbuild-runner/register 'test/**/*.test.ts' --exit\",\n+ \"test:unit\": \"mocha --require esbuild-runner/register 'test/unit/**/*.test.ts' --exit\",\n+ \"test:integration\": \"mocha --require esbuild-runner/register 'test/integration/**/*.test.ts' --exit\",\n\"test:ci\": \"yarn run lint:ci && yarn run test:all --exit --reporter mocha-junit-reporter --reporter-options mochaFile=../../reports/core_mocha/test-results.xml\",\n- \"test:watch\": \"mocha --require ts-node/register 'test/unit/**/*.test.ts' --watch-extensions ts --watch\",\n+ \"test:watch\": \"mocha --require esbuild-runner/register 'test/unit/**/*.test.ts' --watch-extensions ts --watch\",\n\"typecheck\": \"tsc --noEmit --pretty\",\n\"lint\": \"eslint 'src/**/*.ts' 'test/**/*.ts'\",\n\"lint:ci\": \"yarn run lint --format junit --output-file ../../reports/core_eslint/eslint.xml\",\n\"@typescript-eslint/eslint-plugin\": \"^5.29.0\",\n\"@typescript-eslint/parser\": \"^5.29.0\",\n\"chai\": \"^4.2.0\",\n+ \"esbuild\": \"^0.14.25\",\n+ \"esbuild-runner\": \"^2.2.1\",\n\"eslint\": \"^8.18.0\",\n\"eslint-config-prettier\": \"^8.5.0\",\n\"eslint-plugin-prettier\": \"^4.0.0\",\n\"rimraf\": \"^3.0.0\",\n\"rxjs\": \"^7.2.0\",\n\"sinon\": \"^14.0.0\",\n- \"ts-node\": \"^10.8.1\",\n\"tsup\": \"^6.2.1\",\n\"typescript\": \"^4.7.4\"\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "packages/giraffe/package.json",
"new_path": "packages/giraffe/package.json",
"diff": "\"apidoc:extract\": \"api-extractor run\",\n\"build\": \"yarn run clean && yarn tsup\",\n\"clean\": \"rimraf dist build coverage .nyc_output doc *.lcov reports\",\n- \"coverage\": \"nyc mocha --require ts-node/register 'test/**/*.test.ts' --exit\",\n+ \"coverage\": \"nyc mocha --require esbuild-runner/register 'test/**/*.test.ts' --exit\",\n\"coverage:ci\": \"yarn run coverage && yarn run coverage:lcov\",\n\"coverage:lcov\": \"yarn run --silent nyc report --reporter=text-lcov > coverage/coverage.lcov\",\n\"test\": \"yarn run lint && yarn run typecheck && yarn run test:unit\",\n- \"test:unit\": \"mocha --require ts-node/register 'test/unit/**/*.test.ts' --exit\",\n+ \"test:unit\": \"mocha --require esbuild-runner/register 'test/unit/**/*.test.ts' --exit\",\n\"test:ci\": \"yarn run lint:ci && yarn run test:unit --exit --reporter mocha-junit-reporter --reporter-options mochaFile=../../reports/giraffe_mocha/test-results.xml\",\n- \"test:watch\": \"mocha --require ts-node/register 'test/unit/**/*.test.ts' --watch-extensions ts --watch\",\n+ \"test:watch\": \"mocha --require esbuild-runner/register 'test/unit/**/*.test.ts' --watch-extensions ts --watch\",\n\"typecheck\": \"tsc --noEmit --pretty\",\n\"lint\": \"eslint 'src/**/*.ts' 'test/**/*.ts'\",\n\"lint:ci\": \"yarn run lint --format junit --output-file ../../reports/giraffe_eslint/eslint.xml\",\n\"@typescript-eslint/eslint-plugin\": \"^5.29.0\",\n\"@typescript-eslint/parser\": \"^5.29.0\",\n\"chai\": \"^4.2.0\",\n+ \"esbuild\": \"^0.14.25\",\n+ \"esbuild-runner\": \"^2.2.1\",\n\"eslint\": \"^8.18.0\",\n\"eslint-config-prettier\": \"^8.5.0\",\n\"eslint-plugin-prettier\": \"^4.2.1\",\n\"react-dom\": \"^17.0.2\",\n\"rimraf\": \"^3.0.0\",\n\"sinon\": \"^14.0.0\",\n- \"ts-node\": \"^10.8.1\",\n\"tsup\": \"^6.2.1\",\n\"typescript\": \"^4.7.4\"\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "yarn.lock",
"new_path": "yarn.lock",
"diff": "\"@babel/helper-validator-identifier\" \"^7.16.7\"\nto-fast-properties \"^2.0.0\"\n-\"@cspotcode/source-map-support@^0.8.0\":\n- version \"0.8.1\"\n- resolved \"https://registry.yarnpkg.com/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz#00629c35a688e05a88b1cda684fb9d5e73f000a1\"\n- integrity sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==\n- dependencies:\n- \"@jridgewell/trace-mapping\" \"0.3.9\"\n-\n\"@eslint/eslintrc@^1.3.0\":\nversion \"1.3.0\"\nresolved \"https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-1.3.0.tgz#29f92c30bb3e771e4a2048c95fa6855392dfac4f\"\nresolved \"https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz#add4c98d341472a289190b424efbdb096991bb24\"\nintegrity sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==\n-\"@jridgewell/[email protected]\":\n- version \"0.3.9\"\n- resolved \"https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz#6534fd5933a53ba7cbf3a17615e273a0d1273ff9\"\n- integrity sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==\n- dependencies:\n- \"@jridgewell/resolve-uri\" \"^3.0.3\"\n- \"@jridgewell/sourcemap-codec\" \"^1.4.10\"\n-\n\"@jridgewell/trace-mapping@^0.3.0\":\nversion \"0.3.4\"\nresolved \"https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.4.tgz#f6a0832dffd5b8a6aaa633b7d9f8e8e94c83a0c3\"\nresolved \"https://registry.yarnpkg.com/@tootallnate/once/-/once-2.0.0.tgz#f544a148d3ab35801c1f633a7441fd87c2e484bf\"\nintegrity sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==\n-\"@tsconfig/node10@^1.0.7\":\n- version \"1.0.9\"\n- resolved \"https://registry.yarnpkg.com/@tsconfig/node10/-/node10-1.0.9.tgz#df4907fc07a886922637b15e02d4cebc4c0021b2\"\n- integrity sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==\n-\n-\"@tsconfig/node12@^1.0.7\":\n- version \"1.0.11\"\n- resolved \"https://registry.yarnpkg.com/@tsconfig/node12/-/node12-1.0.11.tgz#ee3def1f27d9ed66dac6e46a295cffb0152e058d\"\n- integrity sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==\n-\n-\"@tsconfig/node14@^1.0.0\":\n- version \"1.0.3\"\n- resolved \"https://registry.yarnpkg.com/@tsconfig/node14/-/node14-1.0.3.tgz#e4386316284f00b98435bf40f72f75a09dabf6c1\"\n- integrity sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==\n-\n-\"@tsconfig/node16@^1.0.2\":\n- version \"1.0.3\"\n- resolved \"https://registry.yarnpkg.com/@tsconfig/node16/-/node16-1.0.3.tgz#472eaab5f15c1ffdd7f8628bd4c4f753995ec79e\"\n- integrity sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ==\n-\n\"@types/[email protected]\":\nversion \"1.0.38\"\nresolved \"https://registry.yarnpkg.com/@types/argparse/-/argparse-1.0.38.tgz#a81fd8606d481f873a3800c6ebae4f1d768a56a9\"\n@@ -1616,16 +1581,6 @@ acorn-jsx@^5.3.2:\nresolved \"https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937\"\nintegrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==\n-acorn-walk@^8.1.1:\n- version \"8.2.0\"\n- resolved \"https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.2.0.tgz#741210f2e2426454508853a2f44d0ab83b7f69c1\"\n- integrity sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==\n-\n-acorn@^8.4.1:\n- version \"8.7.1\"\n- resolved \"https://registry.yarnpkg.com/acorn/-/acorn-8.7.1.tgz#0197122c843d1bf6d0a5e83220a788f278f63c30\"\n- integrity sha512-Xx54uLJQZ19lKygFXOWsscKUbsBZW0CPykPhVQdhIeIwrbPmJzqeASDInc8nKBnp/JT6igTs82qPXz069H8I/A==\n-\nacorn@^8.8.0:\nversion \"8.8.0\"\nresolved \"https://registry.yarnpkg.com/acorn/-/acorn-8.8.0.tgz#88c0187620435c7f6015803f5539dae05a9dbea8\"\n@@ -1744,11 +1699,6 @@ are-we-there-yet@^3.0.0:\ndelegates \"^1.0.0\"\nreadable-stream \"^3.6.0\"\n-arg@^4.1.0:\n- version \"4.1.3\"\n- resolved \"https://registry.yarnpkg.com/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089\"\n- integrity sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==\n-\nargparse@^1.0.7, argparse@~1.0.9:\nversion \"1.0.10\"\nresolved \"https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911\"\n@@ -2361,11 +2311,6 @@ cpr@^3.0.1:\nmkdirp \"~0.5.1\"\nrimraf \"^2.5.4\"\n-create-require@^1.1.0:\n- version \"1.1.1\"\n- resolved \"https://registry.yarnpkg.com/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333\"\n- integrity sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==\n-\ncross-spawn@^7.0.0, cross-spawn@^7.0.2, cross-spawn@^7.0.3:\nversion \"7.0.3\"\nresolved \"https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6\"\n@@ -2506,11 +2451,6 @@ [email protected]:\nresolved \"https://registry.yarnpkg.com/diff/-/diff-5.0.0.tgz#7ed6ad76d859d030787ec35855f5b1daf31d852b\"\nintegrity sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==\n-diff@^4.0.1:\n- version \"4.0.2\"\n- resolved \"https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d\"\n- integrity sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==\n-\ndiff@^5.0.0:\nversion \"5.1.0\"\nresolved \"https://registry.yarnpkg.com/diff/-/diff-5.1.0.tgz#bc52d298c5ea8df9194800224445ed43ffc87e40\"\n@@ -2697,6 +2637,14 @@ [email protected]:\nresolved \"https://registry.yarnpkg.com/esbuild-openbsd-64/-/esbuild-openbsd-64-0.14.51.tgz#4adba0b7ea7eb1428bb00d8e94c199a949b130e8\"\nintegrity sha512-7R1/p39M+LSVQVgDVlcY1KKm6kFKjERSX1lipMG51NPcspJD1tmiZSmmBXoY5jhHIu6JL1QkFDTx94gMYK6vfA==\n+esbuild-runner@^2.2.1:\n+ version \"2.2.1\"\n+ resolved \"https://registry.yarnpkg.com/esbuild-runner/-/esbuild-runner-2.2.1.tgz#3866fca62cbf9645e939b43a0c65446f9a53064f\"\n+ integrity sha512-VP0VfJJZiZ3cKzdOH59ZceDxx/GzBKra7tiGM8MfFMLv6CR1/cpsvtQ3IsJI3pz7HyeYxtbPyecj3fHwR+3XcQ==\n+ dependencies:\n+ source-map-support \"0.5.19\"\n+ tslib \"2.3.1\"\n+\[email protected]:\nversion \"0.14.51\"\nresolved \"https://registry.yarnpkg.com/esbuild-sunos-64/-/esbuild-sunos-64-0.14.51.tgz#4b8a6d97dfedda30a6e39607393c5c90ebf63891\"\n@@ -4162,11 +4110,6 @@ make-dir@^3.0.0, make-dir@^3.0.2:\ndependencies:\nsemver \"^6.0.0\"\n-make-error@^1.1.1:\n- version \"1.3.6\"\n- resolved \"https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2\"\n- integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==\n-\nmake-fetch-happen@^10.0.3, make-fetch-happen@^10.0.6:\nversion \"10.1.8\"\nresolved \"https://registry.yarnpkg.com/make-fetch-happen/-/make-fetch-happen-10.1.8.tgz#3b6e93dd8d8fdb76c0d7bf32e617f37c3108435a\"\n@@ -5637,6 +5580,14 @@ sort-keys@^4.0.0:\ndependencies:\nis-plain-obj \"^2.0.0\"\[email protected]:\n+ version \"0.5.19\"\n+ resolved \"https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.19.tgz#a98b62f86dcaf4f67399648c085291ab9e8fed61\"\n+ integrity sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==\n+ dependencies:\n+ buffer-from \"^1.0.0\"\n+ source-map \"^0.6.0\"\n+\[email protected]:\nversion \"0.8.0-beta.0\"\nresolved \"https://registry.yarnpkg.com/source-map/-/source-map-0.8.0-beta.0.tgz#d4c1bb42c3f7ee925f005927ba10709e0d1d1f11\"\n@@ -5649,7 +5600,7 @@ source-map@^0.5.0:\nresolved \"https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc\"\nintegrity sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=\n-source-map@^0.6.1, source-map@~0.6.1:\n+source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.1:\nversion \"0.6.1\"\nresolved \"https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263\"\nintegrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==\n@@ -5992,25 +5943,6 @@ ts-interface-checker@^0.1.9:\nresolved \"https://registry.yarnpkg.com/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz#784fd3d679722bc103b1b4b8030bcddb5db2a699\"\nintegrity sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==\n-ts-node@^10.8.1:\n- version \"10.9.1\"\n- resolved \"https://registry.yarnpkg.com/ts-node/-/ts-node-10.9.1.tgz#e73de9102958af9e1f0b168a6ff320e25adcff4b\"\n- integrity sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==\n- dependencies:\n- \"@cspotcode/source-map-support\" \"^0.8.0\"\n- \"@tsconfig/node10\" \"^1.0.7\"\n- \"@tsconfig/node12\" \"^1.0.7\"\n- \"@tsconfig/node14\" \"^1.0.0\"\n- \"@tsconfig/node16\" \"^1.0.2\"\n- acorn \"^8.4.1\"\n- acorn-walk \"^8.1.1\"\n- arg \"^4.1.0\"\n- create-require \"^1.1.0\"\n- diff \"^4.0.1\"\n- make-error \"^1.1.1\"\n- v8-compile-cache-lib \"^3.0.1\"\n- yn \"3.1.1\"\n-\ntsconfig-paths@^3.9.0:\nversion \"3.14.1\"\nresolved \"https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.14.1.tgz#ba0734599e8ea36c862798e920bcf163277b137a\"\n@@ -6021,6 +5953,11 @@ tsconfig-paths@^3.9.0:\nminimist \"^1.2.6\"\nstrip-bom \"^3.0.0\"\[email protected]:\n+ version \"2.3.1\"\n+ resolved \"https://registry.yarnpkg.com/tslib/-/tslib-2.3.1.tgz#e8a335add5ceae51aa261d32a490158ef042ef01\"\n+ integrity sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==\n+\ntslib@^1.8.1:\nversion \"1.14.1\"\nresolved \"https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00\"\n@@ -6183,11 +6120,6 @@ uuid@^8.3.2:\nresolved \"https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2\"\nintegrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==\n-v8-compile-cache-lib@^3.0.1:\n- version \"3.0.1\"\n- resolved \"https://registry.yarnpkg.com/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz#6336e8d71965cb3d35a1bbb7868445a7c05264bf\"\n- integrity sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==\n-\[email protected], v8-compile-cache@^2.0.3:\nversion \"2.3.0\"\nresolved \"https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz#2de19618c66dc247dcfb6f99338035d8245a2cee\"\n@@ -6496,11 +6428,6 @@ yargs@^17.4.0:\ny18n \"^5.0.5\"\nyargs-parser \"^21.0.0\"\[email protected]:\n- version \"3.1.1\"\n- resolved \"https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50\"\n- integrity sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==\n-\nyocto-queue@^0.1.0:\nversion \"0.1.0\"\nresolved \"https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b\"\n"
}
] | TypeScript | MIT License | influxdata/influxdb-client-js | feat: replace ts-node with esbuild-runner |
305,159 | 04.08.2022 16:22:52 | -7,200 | d26abc8d8d1d17dd8e2ab1f2b87805789b36e052 | chore: run examples faster with esr | [
{
"change_type": "MODIFY",
"old_path": "examples/README.md",
"new_path": "examples/README.md",
"diff": "@@ -7,7 +7,7 @@ This directory contains javascript and typescript examples for node.js, browser,\n- [node](https://nodejs.org/en/) installed\n- Run `npm install` in this directory\n- Change variables in [./env.js](env.js) to configure connection to your InfluxDB instance. The file can be used as-is against a new [docker InfluxDB v2.1 OSS GA installation](https://docs.influxdata.com/influxdb/v2.1/get-started/)\n- - Examples are executable. If it does not work for you, run `npm run ts-node EXAMPLE.ts`.\n+ - Examples are executable. If it does not work for you, run `npm run esr EXAMPLE.ts`.\n- [write.js](./write.js)\nWrite data points to InfluxDB.\n- [query.ts](./query.ts)\n"
},
{
"change_type": "MODIFY",
"old_path": "examples/delete.ts",
"new_path": "examples/delete.ts",
"diff": "-#!./node_modules/.bin/ts-node\n+#!./node_modules/.bin/esr\n/////////////////////////////////////////////////////////////////////////\n// Shows how to delete data from InfluxDB. See //\n"
},
{
"change_type": "MODIFY",
"old_path": "examples/influxdb-1.8.ts",
"new_path": "examples/influxdb-1.8.ts",
"diff": "-#!./node_modules/.bin/ts-node\n+#!./node_modules/.bin/esr\n////////////////////////////////////////////////////////////////////\n// Shows how to use forward compatibility APIs from InfluxDB 1.8. //\n////////////////////////////////////////////////////////////////////\n"
},
{
"change_type": "MODIFY",
"old_path": "examples/package.json",
"new_path": "examples/package.json",
"diff": "\"clean\": \"echo 'nothing to clean'\",\n\"build\": \"echo 'nothing to build'\",\n\"test\": \"echo 'run examples to test'\",\n- \"ts-node\": \"ts-node\"\n+ \"esr\": \"esr\"\n},\n\"dependencies\": {\n\"@influxdata/influxdb-client\": \"*\",\n\"@types/express\": \"^4.17.2\",\n\"@types/express-http-proxy\": \"^1.5.12\",\n\"@types/node\": \"^16\",\n+ \"esbuild\": \"0.14.25\",\n+ \"esbuild-runner\": \"^2.2.1\",\n\"express\": \"^4.17.1\",\n\"express-http-proxy\": \"^1.6.0\",\n\"follow-redirects\": \"^1.14.3\",\n\"open\": \"^7.0.0\",\n\"response-time\": \"^2.3.2\",\n\"rxjs\": \"^6.5.5\",\n- \"ts-node\": \"^10.8.1\",\n\"typescript\": \"^4.7.4\"\n}\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "examples/query.ts",
"new_path": "examples/query.ts",
"diff": "-#!./node_modules/.bin/ts-node\n+#!./node_modules/.bin/esr\n//////////////////////////////////////////\n// Shows how to use InfluxDB query API. //\n//////////////////////////////////////////\n"
},
{
"change_type": "MODIFY",
"old_path": "examples/queryWithParams.ts",
"new_path": "examples/queryWithParams.ts",
"diff": "-#!./node_modules/.bin/ts-node\n+#!./node_modules/.bin/esr\n//////////////////////////////////////////\n// Shows how to use InfluxDB query API. //\n//////////////////////////////////////////\n"
},
{
"change_type": "MODIFY",
"old_path": "examples/rxjs-query.ts",
"new_path": "examples/rxjs-query.ts",
"diff": "-#!./node_modules/.bin/ts-node\n+#!./node_modules/.bin/esr\n////////////////////////////////////////////////////\n// Shows how to use InfluxDB query API with rxjs. //\n////////////////////////////////////////////////////\n"
}
] | TypeScript | MIT License | influxdata/influxdb-client-js | chore: run examples faster with esr |
305,159 | 05.08.2022 12:58:43 | -7,200 | 8f64fa28f50de72177a7eae66e2b43dae569b667 | feat(examples): swtich examples to es module syntax | [
{
"change_type": "MODIFY",
"old_path": "README.md",
"new_path": "README.md",
"diff": "@@ -69,11 +69,11 @@ $ pnpm add @influxdata/influxdb-client-apis\nUse the following examples to get started with the JavaScript client for InfluxDB:\n- @influxdata/influxdb-client\n- - [write points](./examples/write.js)\n+ - [write points](./examples/write.mjs)\n- [query data](./examples/query.ts)\n- @influxdata/influxdb-client-apis\n- - [setup / onboarding](./examples/onboarding.js)\n- - [create bucket](./examples/createBucket.js)\n+ - [setup / onboarding](./examples/onboarding.mjs)\n+ - [create bucket](./examples/createBucket.mjs)\nSee [examples](./examples/README.md) for more advanced use case like the following:\n"
},
{
"change_type": "MODIFY",
"old_path": "examples/README.md",
"new_path": "examples/README.md",
"diff": "@@ -8,17 +8,17 @@ This directory contains javascript and typescript examples for node.js, browser,\n- Run `npm install` in this directory\n- Change variables in [./env.js](env.js) to configure connection to your InfluxDB instance. The file can be used as-is against a new [docker InfluxDB v2.1 OSS GA installation](https://docs.influxdata.com/influxdb/v2.1/get-started/)\n- Examples are executable. If it does not work for you, run `npm run esr EXAMPLE.ts`.\n- - [write.js](./write.js)\n+ - [write.mjs](./write.mjs)\nWrite data points to InfluxDB.\n- [query.ts](./query.ts)\nQuery InfluxDB with [Flux](https://docs.influxdata.com/influxdb/v2.1/get-started/).\n- [queryWithParams.ts](./queryWithParams.ts)\nSupply parameters to a [Flux](https://docs.influxdata.com/influxdb/v2.1/get-started/) query.\n- - [ping.js](./ping.js)\n+ - [ping.mjs](./ping.mjs)\nCheck status of InfluxDB server.\n- - [createBucket.js](./createBucket.js)\n+ - [createBucket.mjs](./createBucket.mjs)\nCreates an example bucket.\n- - [onboarding.js](./onboarding.js)\n+ - [onboarding.mjs](./onboarding.mjs)\nPerforms onboarding of a new influxDB database. It creates a new organization, bucket and user that is then used in all examples.\n- [influxdb-1.8.ts](./influxdb-1.8.ts)\nHow to use forward compatibility APIs from InfluxDB 1.8.\n@@ -26,7 +26,7 @@ This directory contains javascript and typescript examples for node.js, browser,\nUse [RxJS](https://rxjs.dev/) to query InfluxDB with [Flux](https://docs.influxdata.com/influxdb/v2.1/get-started/).\n- [writeAdvanced.js](./writeAdvanced.js)\nShows how to control the way of how data points are written to InfluxDB.\n- - [follow-redirects.js](./follow-redirects.js)\n+ - [follow-redirects.mjs](./follow-redirects.mjs)\nShows how to configure the client to follow HTTP redirects.\n- [delete.ts](./delete.ts)\nShows how to delete data from a bucket.\n"
},
{
"change_type": "RENAME",
"old_path": "examples/createBucket.js",
"new_path": "examples/createBucket.mjs",
"diff": "@@ -4,9 +4,9 @@ This example creates a new bucket. If a bucket of the same name already exists,\nit is deleted and then created again.\n*/\n-const {InfluxDB, HttpError} = require('@influxdata/influxdb-client')\n-const {OrgsAPI, BucketsAPI} = require('@influxdata/influxdb-client-apis')\n-const {url, org, token} = require('./env')\n+import {InfluxDB, HttpError} from '@influxdata/influxdb-client'\n+import {OrgsAPI, BucketsAPI} from '@influxdata/influxdb-client-apis'\n+import {url, org, token} from './env.js'\nconst influxDB = new InfluxDB({url, token})\nasync function recreateBucket(name) {\n@@ -49,9 +49,10 @@ async function recreateBucket(name) {\n)\n}\n-recreateBucket('example-bucket')\n- .then(() => console.log('\\nFinished SUCCESS'))\n- .catch((error) => {\n- console.error(error)\n+try {\n+ await recreateBucket('example-bucket')\n+ console.log('\\nFinished SUCCESS')\n+} catch (e) {\n+ console.error(e)\nconsole.log('\\nFinished ERROR')\n- })\n+}\n"
},
{
"change_type": "MODIFY",
"old_path": "examples/delete.ts",
"new_path": "examples/delete.ts",
"diff": "@@ -13,7 +13,7 @@ const influxDB = new InfluxDB({url, token})\n/*\nThe functionality of the DeleteAPI is fully demonstrated with\nthe following sequence of examples:\n- - write.js\n+ - write.mjs\n- query.ts\n- delete.ts\n- query.ts\n"
},
{
"change_type": "RENAME",
"old_path": "examples/follow-redirects.js",
"new_path": "examples/follow-redirects.mjs",
"diff": "// Shows how to configure InfluxDB node.js client to follow redirects. //\n/////////////////////////////////////////////////////////////////////////\n-const {url: targetUrl, token, org} = require('./env')\n-// const {InfluxDB} = require('@influxdata/influxdb-client')\n-const {InfluxDB} = require('../packages/core')\n+import {url as targetUrl, token, org} from './env.js'\n+import {InfluxDB} from '@influxdata/influxdb-client'\n+import {createServer} from 'http'\n+import followRedirects from 'follow-redirects'\n// start a simple HTTP server that always redirects to a configured InfluxDB\n-const http = require('http')\n-const server = http.createServer((req, res) => {\n+const server = createServer((req, res) => {\nconst reqUrl = new URL(req.url, `http://${req.headers.host}`)\nconsole.info(`Redirecting ${req.method} ${reqUrl} to ${targetUrl + req.url}`)\nres.writeHead(307, {location: targetUrl + req.url})\nres.end()\n})\n-server.listen(0, 'localhost', () => {\n+server.listen(0, 'localhost', async () => {\nconst addressInfo = server.address()\nconsole.info('Redirection HTTP server started:', addressInfo)\n@@ -27,21 +27,18 @@ server.listen(0, 'localhost', () => {\ntransportOptions: {\n// The following transport option is required in order to follow HTTP redirects in node.js.\n// Browsers and deno follow redirects OOTB.\n- 'follow-redirects': require('follow-redirects'),\n+ 'follow-redirects': followRedirects,\n},\n}).getQueryApi(org)\n- queryApi\n- .collectRows('buckets()')\n- .then((data) => {\n+ try {\n+ const data = await queryApi.collectRows('buckets()')\nconsole.info('Available buckets:')\ndata.forEach((x) => console.info('', x.name))\nconsole.log('\\nQuery SUCCESS')\n- })\n- .catch((error) => {\n- console.error(error)\n+ } catch (e) {\n+ console.error(e)\nconsole.log('\\nQuery ERROR')\n- })\n- .finally(() => {\n+ } finally {\nserver.close()\n- })\n+ }\n})\n"
},
{
"change_type": "RENAME",
"old_path": "examples/invokableScripts.js",
"new_path": "examples/invokableScripts.mjs",
"diff": "@@ -4,12 +4,13 @@ This example shows how to use API-invokable scripts. See also\nhttps://docs.influxdata.com/influxdb/cloud/api-guide/api-invokable-scripts/ .\n*/\n-const {InfluxDB, HttpError} = require('@influxdata/influxdb-client')\n-const {\n+import {InfluxDB, HttpError} from '@influxdata/influxdb-client'\n+import {\nScriptsAPI,\nFluxScriptInvocationAPI,\n-} = require('@influxdata/influxdb-client-apis')\n-const {url, token} = require('./env')\n+} from '@influxdata/influxdb-client-apis'\n+import {url, token} from './env.js'\n+import {argv} from 'process'\nconst influxDB = new InfluxDB({url, token})\nconst scriptsAPI = new ScriptsAPI(influxDB)\n@@ -60,7 +61,7 @@ async function invokeScript(scriptID) {\nconsole.log('*** Invoke example script ***')\n// parse count as a first script argument or use 10\n- const count = Number.parseInt(require('process').argv[2] || '10')\n+ const count = Number.parseInt(argv[2] || '10')\n// execute script with count parameter\nconst params = {count: count}\n@@ -96,23 +97,20 @@ async function invokeScript(scriptID) {\n// console.log(response)\n}\n-async function example() {\n+try {\nawait listScripts()\nawait deleteScript()\nconst {id} = await createScript()\nawait invokeScript(id)\n-}\n-\n-example()\n- .then(() => console.log('\\nFinished SUCCESS'))\n- .catch((error) => {\n- if (error instanceof HttpError && error.statusCode === 404) {\n+ console.log('\\nFinished SUCCESS')\n+} catch (e) {\n+ if (e instanceof HttpError && e.statusCode === 404) {\nconsole.error(\n`API invokable scripts are not supported by InfluxDB at ${url} .`\n)\nconsole.error('Modify env.js with InfluxDB Cloud URL and token.')\n} else {\n- console.error(error)\n+ console.error(e)\n}\nconsole.log('\\nFinished ERROR')\n- })\n+}\n"
},
{
"change_type": "DELETE",
"old_path": "examples/onboarding.js",
"new_path": null,
"diff": "-#!/usr/bin/env node\n-/*\n-This example setups a new INFLUXDB database with user,organization\n-and bucket that can be then used in examples. All values that used\n-for onboarding are defined in ./env.ts .\n-*/\n-\n-const {InfluxDB} = require('@influxdata/influxdb-client')\n-const {SetupAPI} = require('@influxdata/influxdb-client-apis')\n-const {url, username, password, org, bucket, token} = require('./env')\n-\n-console.log('*** ONBOARDING ***')\n-const setupApi = new SetupAPI(new InfluxDB({url}))\n-\n-setupApi\n- .getSetup()\n- .then(async ({allowed}) => {\n- if (allowed) {\n- await setupApi.postSetup({\n- body: {\n- org,\n- bucket,\n- username,\n- password,\n- token,\n- },\n- })\n- console.log(`InfluxDB '${url}' is now onboarded.`)\n- } else {\n- console.log(`InfluxDB '${url}' has been already onboarded.`)\n- }\n- console.log('\\nFinished SUCCESS')\n- })\n- .catch((error) => {\n- console.error(error)\n- console.log('\\nFinished ERROR')\n- })\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "examples/onboarding.mjs",
"diff": "+#!/usr/bin/env node\n+/*\n+This example setups a new INFLUXDB database with user,organization\n+and bucket that can be then used in examples. All values that used\n+for onboarding are defined in ./env.ts .\n+*/\n+\n+import {InfluxDB} from '@influxdata/influxdb-client'\n+import {SetupAPI} from '@influxdata/influxdb-client-apis'\n+import {url, username, password, org, bucket, token} from './env.js'\n+\n+console.log('*** ONBOARDING ***')\n+const setupApi = new SetupAPI(new InfluxDB({url}))\n+try {\n+ const {allowed} = await setupApi.getSetup()\n+ if (allowed) {\n+ await setupApi.postSetup({\n+ body: {\n+ org,\n+ bucket,\n+ username,\n+ password,\n+ token,\n+ },\n+ })\n+ console.log(`InfluxDB '${url}' is now onboarded.`)\n+ } else {\n+ console.log(`InfluxDB '${url}' has been already onboarded.`)\n+ }\n+ console.log('\\nFinished SUCCESS')\n+} catch (e) {\n+ console.error(e)\n+ console.log('\\nFinished ERROR')\n+}\n"
},
{
"change_type": "MODIFY",
"old_path": "examples/package.json",
"new_path": "examples/package.json",
"diff": "\"private\": true,\n\"license\": \"MIT\",\n\"scripts\": {\n- \"browser\": \"node scripts/server.js\",\n+ \"browser\": \"node scripts/server.mjs\",\n\"clean\": \"echo 'nothing to clean'\",\n\"build\": \"echo 'nothing to build'\",\n\"test\": \"echo 'run examples to test'\",\n"
},
{
"change_type": "RENAME",
"old_path": "examples/ping.js",
"new_path": "examples/ping.mjs",
"diff": "-#!/usr/bin/node\n+#!/usr/bin/env node\n/*\nThis example shows how to check state InfluxDB instance.\nInfluxDB OSS APIs are available through '@influxdata/influxdb-client-apis' package.\nSee https://docs.influxdata.com/influxdb/v2.1/api/\n*/\n+import {InfluxDB} from '@influxdata/influxdb-client'\n+import {PingAPI} from '@influxdata/influxdb-client-apis'\n+import {url} from './env.js'\n-const {InfluxDB} = require('@influxdata/influxdb-client')\n-// const {PingAPI} = require('@influxdata/influxdb-client-apis')\n-const {PingAPI} = require('../packages/apis')\n-const {url} = require('./env')\nconst timeout = 10 * 1000 // timeout for ping\nconsole.log('*** PING STATUS ***')\n"
},
{
"change_type": "RENAME",
"old_path": "examples/scripts/monitor.js",
"new_path": "examples/scripts/monitor.mjs",
"diff": "-const {InfluxDB, Point} = require('@influxdata/influxdb-client')\n-const {url, token, org, bucket} = require('../env')\n-const responseTime = require('response-time')\n+import {InfluxDB, Point} from '@influxdata/influxdb-client'\n+import {url, token, org, bucket} from '../env.js'\n+import responseTime from 'response-time'\n+import {hostname} from 'os'\n// create Influx Write API to report application monitoring data\nconst writeAPI = new InfluxDB({url, token}).getWriteApi(org, bucket, 'ns', {\ndefaultTags: {\nservice: 'influxdb_client_example_app',\n- host: require('os').hostname(),\n+ host: hostname(),\n},\n})\n// write node resource/cpu/memory usage\n@@ -52,7 +53,7 @@ process.on('SIGINT', onShutdown)\nprocess.on('SIGTERM', onShutdown)\n// export a monitoring function for express.js response time monitoring\n-module.exports = function (app) {\n+export default function (app) {\napp.use(\nresponseTime((req, res, time) => {\n// print out request basics\n"
},
{
"change_type": "RENAME",
"old_path": "examples/scripts/server.js",
"new_path": "examples/scripts/server.mjs",
"diff": "-const express = require('express')\n-const path = require('path')\n-const proxy = require('express-http-proxy')\n-const open = require('open')\n-const {url} = require('../env')\n-const monitor = require('./monitor')\n+import express from 'express'\n+import proxy from 'express-http-proxy'\n+import open from 'open'\n+import {url} from '../env.js'\n+import monitor from './monitor.mjs'\nconst port = 3001\nconst proxyPath = '/influx'\n@@ -12,7 +11,8 @@ const app = express()\n// monitor express response time in InfluxDB\nmonitor(app)\n// serve all files of the git repository\n-app.use(express.static(path.join(__dirname, '..', '..'), {index: false}))\n+const dirName = new URL('../..', import.meta.url).pathname\n+app.use(express.static(dirName, {index: false}))\n// create also proxy to InfluxDB\napp.use(proxyPath, proxy(url))\napp.listen(port, () => {\n"
},
{
"change_type": "RENAME",
"old_path": "examples/tokens.js",
"new_path": "examples/tokens.mjs",
"diff": "@@ -8,14 +8,14 @@ for programmatic access to InfluxDB v2. `username + password`\nauthentication might be used to automate management of tokens.\n*/\n-const {InfluxDB} = require('@influxdata/influxdb-client')\n-const {\n+import {InfluxDB} from '@influxdata/influxdb-client'\n+import {\nAuthorizationsAPI,\nOrgsAPI,\nSigninAPI,\nSignoutAPI,\n-} = require('@influxdata/influxdb-client-apis')\n-const {url, username, password, org} = require('./env')\n+} from '@influxdata/influxdb-client-apis'\n+import {url, username, password, org} from './env.js'\nasync function signInDemo() {\nconst influxDB = new InfluxDB({url})\n@@ -101,7 +101,9 @@ async function signInDemo() {\nconsole.log('Signout SUCCESS')\n}\n-signInDemo().catch((error) => {\n- console.error(error)\n+try {\n+ await signInDemo()\n+} catch (e) {\n+ console.error(e)\nconsole.log('\\nFinished ERROR')\n-})\n+}\n"
},
{
"change_type": "RENAME",
"old_path": "examples/write.js",
"new_path": "examples/write.mjs",
"diff": "// Shows how to use InfluxDB write API. //\n//////////////////////////////////////////\n-const {InfluxDB, Point, HttpError} = require('@influxdata/influxdb-client')\n-const {url, token, org, bucket} = require('./env')\n-const {hostname} = require('os')\n+import {InfluxDB, Point, HttpError} from '@influxdata/influxdb-client'\n+import {url, token, org, bucket} from './env.js'\n+import {hostname} from 'os'\nconsole.log('*** WRITE POINTS ***')\n// create a write API, expecting point timestamps in nanoseconds (can be also 's', 'ms', 'us')\n@@ -33,15 +33,13 @@ console.log(` ${point2.toLineProtocol(writeApi)}`)\n// is retried automatically. Read `writeAdvanced.js` for better explanation and details.\n//\n// close() flushes the remaining buffered data and then cancels pending retries.\n-writeApi\n- .close()\n- .then(() => {\n+try {\n+ await writeApi.close()\nconsole.log('FINISHED ... now try ./query.ts')\n- })\n- .catch((e) => {\n+} catch (e) {\nconsole.error(e)\nif (e instanceof HttpError && e.statusCode === 401) {\nconsole.log('Run ./onboarding.js to setup a new InfluxDB database.')\n}\nconsole.log('\\nFinished ERROR')\n- })\n+}\n"
},
{
"change_type": "RENAME",
"old_path": "examples/writeAdvanced.js",
"new_path": "examples/writeAdvanced.mjs",
"diff": "This example shows how to use the client's Write API to control the way of how points\nare sent to InfluxDB server.\n-It is based on the simpler write.js example, it assumes that you are familiar with it.\n-The write.js example asynchronously writes points to InfluxDB and assumes that the library\n+It is based on the simpler write.mjs example, it assumes that you are familiar with it.\n+The write.mjs example asynchronously writes points to InfluxDB and assumes that the library\ntakes care about retries upon failures and optimizes networking to send points in\nbatches and on background. This approach is good for sending various metrics from your\napplication, but it does not scale well when you need to import bigger amount of data. See\nhttps://github.com/influxdata/influxdb-client-js/issues/213 for details.\n*/\n-const {\n+import {\nInfluxDB,\nPoint,\nflux,\nfluxDuration,\nDEFAULT_WriteOptions,\n-} = require('@influxdata/influxdb-client')\n-const {url, token, org, bucket} = require('./env')\n-const {hostname} = require('os')\n+} from '@influxdata/influxdb-client'\n+import {url, token, org, bucket} from './env.js'\n+import {hostname} from 'os'\nconsole.log('*** WRITE POINTS ***')\n/* points/lines are batched in order to minimize networking and increase performance */\n@@ -51,7 +51,7 @@ const writeOptions = {\n// Node.js HTTP client OOTB does not reuse established TCP connections, a custom node HTTP agent\n// can be used to reuse them and thus reduce the count of newly established networking sockets\n-const {Agent} = require('http')\n+import {Agent} from 'http'\nconst keepAliveAgent = new Agent({\nkeepAlive: false, // reuse existing connections\nkeepAliveMsecs: 20 * 1000, // 20 seconds keep alive\n@@ -107,11 +107,13 @@ async function importData() {\nconsole.log(`Size of temperature2 measurement since '${start}': `, count)\n}\n+try {\nconst start = Date.now()\n-importData()\n- .then(() =>\n+ await importData()\nconsole.log(\n`FINISHED writing ${demoCount} points (${Date.now() - start} millis}`\n)\n- )\n- .catch((e) => console.error('FINISHED', e))\n+} catch (e) {\n+ console.error(e)\n+ console.long('FINISHED ERROR')\n+}\n"
},
{
"change_type": "MODIFY",
"old_path": "packages/core/src/InfluxDB.ts",
"new_path": "packages/core/src/InfluxDB.ts",
"diff": "@@ -48,8 +48,8 @@ export default class InfluxDB {\n* Inspect the {@link WriteOptions} to control also advanced options, such retries of failure, retry strategy options, data chunking\n* and flushing windows. See {@link DEFAULT_WriteOptions} to see the defaults.\n*\n- * See also {@link https://github.com/influxdata/influxdb-client-js/blob/master/examples/write.js | write.js example},\n- * {@link https://github.com/influxdata/influxdb-client-js/blob/master/examples/writeAdvanced.js | writeAdvanced.js example},\n+ * See also {@link https://github.com/influxdata/influxdb-client-js/blob/master/examples/write.mjs | write example},\n+ * {@link https://github.com/influxdata/influxdb-client-js/blob/master/examples/writeAdvanced.mjs | writeAdvanced example},\n* and {@link https://github.com/influxdata/influxdb-client-js/blob/master/examples/index.html | browser example}.\n*\n* @param org - Specifies the destination organization for writes. Takes either the ID or Name interchangeably.\n"
}
] | TypeScript | MIT License | influxdata/influxdb-client-js | feat(examples): swtich examples to es module syntax |
305,159 | 05.08.2022 13:06:19 | -7,200 | 5fa84822ce8065352dfac121b2fe569a5472f936 | chore(examples): rename env.js to env.mjs | [
{
"change_type": "MODIFY",
"old_path": "examples/README.md",
"new_path": "examples/README.md",
"diff": "@@ -6,7 +6,7 @@ This directory contains javascript and typescript examples for node.js, browser,\n- Prerequisites\n- [node](https://nodejs.org/en/) installed\n- Run `npm install` in this directory\n- - Change variables in [./env.js](env.js) to configure connection to your InfluxDB instance. The file can be used as-is against a new [docker InfluxDB v2.1 OSS GA installation](https://docs.influxdata.com/influxdb/v2.1/get-started/)\n+ - Change variables in [./env.mjs](env.mjs) to configure connection to your InfluxDB instance. The file can be used as-is against a new [docker InfluxDB v2.3 OSS GA installation](https://docs.influxdata.com/influxdb/v2.3/get-started/)\n- Examples are executable. If it does not work for you, run `npm run esr EXAMPLE.ts`.\n- [write.mjs](./write.mjs)\nWrite data points to InfluxDB.\n"
},
{
"change_type": "MODIFY",
"old_path": "examples/createBucket.mjs",
"new_path": "examples/createBucket.mjs",
"diff": "@@ -6,7 +6,7 @@ it is deleted and then created again.\nimport {InfluxDB, HttpError} from '@influxdata/influxdb-client'\nimport {OrgsAPI, BucketsAPI} from '@influxdata/influxdb-client-apis'\n-import {url, org, token} from './env.js'\n+import {url, org, token} from './env.mjs'\nconst influxDB = new InfluxDB({url, token})\nasync function recreateBucket(name) {\n"
},
{
"change_type": "MODIFY",
"old_path": "examples/delete.ts",
"new_path": "examples/delete.ts",
"diff": "import {InfluxDB} from '@influxdata/influxdb-client'\nimport {DeleteAPI} from '@influxdata/influxdb-client-apis'\n-import {url, token, org, bucket} from './env'\n+import {url, token, org, bucket} from './env.mjs'\nconst influxDB = new InfluxDB({url, token})\n/*\n"
},
{
"change_type": "RENAME",
"old_path": "examples/env.js",
"new_path": "examples/env.mjs",
"diff": "@@ -12,11 +12,4 @@ const username = 'my-user'\n/**InfluxDB password */\nconst password = 'my-password'\n-module.exports = {\n- url,\n- token,\n- org,\n- bucket,\n- username,\n- password,\n-}\n+export {url, token, org, bucket, username, password}\n"
},
{
"change_type": "MODIFY",
"old_path": "examples/follow-redirects.mjs",
"new_path": "examples/follow-redirects.mjs",
"diff": "// Shows how to configure InfluxDB node.js client to follow redirects. //\n/////////////////////////////////////////////////////////////////////////\n-import {url as targetUrl, token, org} from './env.js'\n+import {url as targetUrl, token, org} from './env.mjs'\nimport {InfluxDB} from '@influxdata/influxdb-client'\nimport {createServer} from 'http'\nimport followRedirects from 'follow-redirects'\n"
},
{
"change_type": "MODIFY",
"old_path": "examples/invokableScripts.mjs",
"new_path": "examples/invokableScripts.mjs",
"diff": "@@ -9,7 +9,7 @@ import {\nScriptsAPI,\nFluxScriptInvocationAPI,\n} from '@influxdata/influxdb-client-apis'\n-import {url, token} from './env.js'\n+import {url, token} from './env.mjs'\nimport {argv} from 'process'\nconst influxDB = new InfluxDB({url, token})\n@@ -108,7 +108,7 @@ try {\nconsole.error(\n`API invokable scripts are not supported by InfluxDB at ${url} .`\n)\n- console.error('Modify env.js with InfluxDB Cloud URL and token.')\n+ console.error('Modify env.mjs with InfluxDB Cloud URL and token.')\n} else {\nconsole.error(e)\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "examples/onboarding.mjs",
"new_path": "examples/onboarding.mjs",
"diff": "@@ -7,7 +7,7 @@ for onboarding are defined in ./env.ts .\nimport {InfluxDB} from '@influxdata/influxdb-client'\nimport {SetupAPI} from '@influxdata/influxdb-client-apis'\n-import {url, username, password, org, bucket, token} from './env.js'\n+import {url, username, password, org, bucket, token} from './env.mjs'\nconsole.log('*** ONBOARDING ***')\nconst setupApi = new SetupAPI(new InfluxDB({url}))\n"
},
{
"change_type": "MODIFY",
"old_path": "examples/ping.mjs",
"new_path": "examples/ping.mjs",
"diff": "@@ -7,7 +7,7 @@ See https://docs.influxdata.com/influxdb/v2.1/api/\n*/\nimport {InfluxDB} from '@influxdata/influxdb-client'\nimport {PingAPI} from '@influxdata/influxdb-client-apis'\n-import {url} from './env.js'\n+import {url} from './env.mjs'\nconst timeout = 10 * 1000 // timeout for ping\n"
},
{
"change_type": "MODIFY",
"old_path": "examples/query.ts",
"new_path": "examples/query.ts",
"diff": "//////////////////////////////////////////\nimport {InfluxDB, FluxTableMetaData} from '@influxdata/influxdb-client'\n-import {url, token, org} from './env'\n+import {url, token, org} from './env.mjs'\nconst queryApi = new InfluxDB({url, token}).getQueryApi(org)\nconst fluxQuery =\n"
},
{
"change_type": "MODIFY",
"old_path": "examples/queryWithParams.ts",
"new_path": "examples/queryWithParams.ts",
"diff": "@@ -9,7 +9,7 @@ import {\nflux,\nfluxDuration,\n} from '@influxdata/influxdb-client'\n-import {url, token, org} from './env'\n+import {url, token, org} from './env.mjs'\nconst queryApi = new InfluxDB({url, token}).getQueryApi(org)\nconst start = fluxDuration('-1m')\n"
},
{
"change_type": "MODIFY",
"old_path": "examples/rxjs-query.ts",
"new_path": "examples/rxjs-query.ts",
"diff": "import {InfluxDB} from '@influxdata/influxdb-client'\nimport {from} from 'rxjs'\nimport {map} from 'rxjs/operators'\n-import {url, token, org} from './env'\n+import {url, token, org} from './env.mjs'\nconst queryApi = new InfluxDB({url, token}).getQueryApi(org)\n"
},
{
"change_type": "MODIFY",
"old_path": "examples/scripts/monitor.mjs",
"new_path": "examples/scripts/monitor.mjs",
"diff": "import {InfluxDB, Point} from '@influxdata/influxdb-client'\n-import {url, token, org, bucket} from '../env.js'\n+import {url, token, org, bucket} from '../env.mjs'\nimport responseTime from 'response-time'\nimport {hostname} from 'os'\n"
},
{
"change_type": "MODIFY",
"old_path": "examples/scripts/server.mjs",
"new_path": "examples/scripts/server.mjs",
"diff": "import express from 'express'\nimport proxy from 'express-http-proxy'\nimport open from 'open'\n-import {url} from '../env.js'\n+import {url} from '../env.mjs'\nimport monitor from './monitor.mjs'\nconst port = 3001\n"
},
{
"change_type": "MODIFY",
"old_path": "examples/tokens.mjs",
"new_path": "examples/tokens.mjs",
"diff": "@@ -15,7 +15,7 @@ import {\nSigninAPI,\nSignoutAPI,\n} from '@influxdata/influxdb-client-apis'\n-import {url, username, password, org} from './env.js'\n+import {url, username, password, org} from './env.mjs'\nasync function signInDemo() {\nconst influxDB = new InfluxDB({url})\n"
},
{
"change_type": "MODIFY",
"old_path": "examples/write.mjs",
"new_path": "examples/write.mjs",
"diff": "//////////////////////////////////////////\nimport {InfluxDB, Point, HttpError} from '@influxdata/influxdb-client'\n-import {url, token, org, bucket} from './env.js'\n+import {url, token, org, bucket} from './env.mjs'\nimport {hostname} from 'os'\nconsole.log('*** WRITE POINTS ***')\n"
},
{
"change_type": "MODIFY",
"old_path": "examples/writeAdvanced.mjs",
"new_path": "examples/writeAdvanced.mjs",
"diff": "@@ -21,7 +21,7 @@ import {\nfluxDuration,\nDEFAULT_WriteOptions,\n} from '@influxdata/influxdb-client'\n-import {url, token, org, bucket} from './env.js'\n+import {url, token, org, bucket} from './env.mjs'\nimport {hostname} from 'os'\nconsole.log('*** WRITE POINTS ***')\n"
}
] | TypeScript | MIT License | influxdata/influxdb-client-js | chore(examples): rename env.js to env.mjs |
305,159 | 05.08.2022 13:16:22 | -7,200 | 587b2c3d698cfe79817a35dfa9381ff20d90bb7a | chore(example): validate mjs files with eslint | [
{
"change_type": "MODIFY",
"old_path": "examples/.eslintrc.json",
"new_path": "examples/.eslintrc.json",
"diff": "},\n\"overrides\": [\n{\n- \"files\": [\"*.js\"],\n+ \"files\": [\"*.js\", \"*.mjs\"],\n\"rules\": {\n\"@typescript-eslint/explicit-function-return-type\": \"off\",\n\"@typescript-eslint/naming-convention\": [\"off\"]\n"
}
] | TypeScript | MIT License | influxdata/influxdb-client-js | chore(example): validate mjs files with eslint |
305,159 | 05.08.2022 13:26:05 | -7,200 | 167c89b4fe542318a679e6162119c9be5ec5fc5f | chore: normalize browser resources with fileURLToPath | [
{
"change_type": "MODIFY",
"old_path": "examples/scripts/monitor.mjs",
"new_path": "examples/scripts/monitor.mjs",
"diff": "import {InfluxDB, Point} from '@influxdata/influxdb-client'\nimport {url, token, org, bucket} from '../env.mjs'\nimport responseTime from 'response-time'\n-import {hostname} from 'os'\n+import {hostname} from 'node:os'\n// create Influx Write API to report application monitoring data\nconst writeAPI = new InfluxDB({url, token}).getWriteApi(org, bucket, 'ns', {\n"
},
{
"change_type": "MODIFY",
"old_path": "examples/scripts/server.mjs",
"new_path": "examples/scripts/server.mjs",
"diff": "import express from 'express'\nimport proxy from 'express-http-proxy'\nimport open from 'open'\n+import {fileURLToPath} from 'node:url'\nimport {url} from '../env.mjs'\nimport monitor from './monitor.mjs'\n@@ -11,7 +12,7 @@ const app = express()\n// monitor express response time in InfluxDB\nmonitor(app)\n// serve all files of the git repository\n-const dirName = new URL('../..', import.meta.url).pathname\n+const dirName = fileURLToPath(new URL('../..', import.meta.url))\napp.use(express.static(dirName, {index: false}))\n// create also proxy to InfluxDB\napp.use(proxyPath, proxy(url))\n"
}
] | TypeScript | MIT License | influxdata/influxdb-client-js | chore: normalize browser resources with fileURLToPath |
305,159 | 05.08.2022 13:28:26 | -7,200 | 81eea86312a2595ee01fd9a338f821e3b4f8c8bd | chore(examples): change node imports to use 'node:' prefix | [
{
"change_type": "MODIFY",
"old_path": "examples/follow-redirects.mjs",
"new_path": "examples/follow-redirects.mjs",
"diff": "import {url as targetUrl, token, org} from './env.mjs'\nimport {InfluxDB} from '@influxdata/influxdb-client'\n-import {createServer} from 'http'\n+import {createServer} from 'node:http'\nimport followRedirects from 'follow-redirects'\n// start a simple HTTP server that always redirects to a configured InfluxDB\n"
},
{
"change_type": "MODIFY",
"old_path": "examples/invokableScripts.mjs",
"new_path": "examples/invokableScripts.mjs",
"diff": "@@ -10,7 +10,7 @@ import {\nFluxScriptInvocationAPI,\n} from '@influxdata/influxdb-client-apis'\nimport {url, token} from './env.mjs'\n-import {argv} from 'process'\n+import {argv} from 'node:process'\nconst influxDB = new InfluxDB({url, token})\nconst scriptsAPI = new ScriptsAPI(influxDB)\n"
},
{
"change_type": "MODIFY",
"old_path": "examples/write.mjs",
"new_path": "examples/write.mjs",
"diff": "import {InfluxDB, Point, HttpError} from '@influxdata/influxdb-client'\nimport {url, token, org, bucket} from './env.mjs'\n-import {hostname} from 'os'\n+import {hostname} from 'node:os'\nconsole.log('*** WRITE POINTS ***')\n// create a write API, expecting point timestamps in nanoseconds (can be also 's', 'ms', 'us')\n"
},
{
"change_type": "MODIFY",
"old_path": "examples/writeAdvanced.mjs",
"new_path": "examples/writeAdvanced.mjs",
"diff": "@@ -22,7 +22,7 @@ import {\nDEFAULT_WriteOptions,\n} from '@influxdata/influxdb-client'\nimport {url, token, org, bucket} from './env.mjs'\n-import {hostname} from 'os'\n+import {hostname} from 'node:os'\nconsole.log('*** WRITE POINTS ***')\n/* points/lines are batched in order to minimize networking and increase performance */\n"
}
] | TypeScript | MIT License | influxdata/influxdb-client-js | chore(examples): change node imports to use 'node:' prefix |
305,159 | 05.08.2022 13:52:03 | -7,200 | 9e8479b47273326538e6093ed739e79af8d4545b | fix(examples): setup authroization header in a redirected message | [
{
"change_type": "MODIFY",
"old_path": "examples/follow-redirects.mjs",
"new_path": "examples/follow-redirects.mjs",
"diff": "@@ -28,6 +28,10 @@ server.listen(0, 'localhost', async () => {\n// The following transport option is required in order to follow HTTP redirects in node.js.\n// Browsers and deno follow redirects OOTB.\n'follow-redirects': followRedirects,\n+ beforeRedirect: (options) => {\n+ // setup Authorization header for redirected message\n+ options.headers.authorization = `Token ${token}`\n+ },\n},\n}).getQueryApi(org)\ntry {\n"
}
] | TypeScript | MIT License | influxdata/influxdb-client-js | fix(examples): setup authroization header in a redirected message |
305,159 | 05.08.2022 13:59:14 | -7,200 | efd614b38e3cb26723780c01175726f392352e98 | fix(examples): redirect with authorization header | [
{
"change_type": "MODIFY",
"old_path": "examples/follow-redirects.mjs",
"new_path": "examples/follow-redirects.mjs",
"diff": "@@ -28,9 +28,12 @@ server.listen(0, 'localhost', async () => {\n// The following transport option is required in order to follow HTTP redirects in node.js.\n// Browsers and deno follow redirects OOTB.\n'follow-redirects': followRedirects,\n- beforeRedirect: (options) => {\n- // setup Authorization header for redirected message\n- options.headers.authorization = `Token ${token}`\n+ beforeRedirect: (options, _response, request) => {\n+ // setup Authorization header for a redirected message,\n+ // authorization and cookie headers are removed by follow-redirects\n+ if (request.headers.authorization) {\n+ options.headers.authorization = request.headers.authorization\n+ }\n},\n},\n}).getQueryApi(org)\n"
}
] | TypeScript | MIT License | influxdata/influxdb-client-js | fix(examples): redirect with authorization header |
305,159 | 08.08.2022 09:27:04 | -7,200 | 6e908245c4d6fcf989e84419b7f8002a1dacfed3 | feat: modify query example to use top-level await | [
{
"change_type": "MODIFY",
"old_path": "examples/query.ts",
"new_path": "examples/query.ts",
"diff": "@@ -46,29 +46,27 @@ queryApi.queryRows(fluxQuery, {\n// // Execute query and collect result rows in a Promise.\n// // Use with caution, it copies the whole stream of results into memory.\n-// queryApi\n-// .collectRows(fluxQuery /*, you can specify a row mapper as a second arg */)\n-// .then(data => {\n-// data.forEach(x => console.log(JSON.stringify(x)))\n+// try {\n+// const data = await queryApi.collectRows(\n+// fluxQuery /*, you can specify a row mapper as a second arg */\n+// )\n+// data.forEach((x) => console.log(JSON.stringify(x)))\n// console.log('\\nCollect ROWS SUCCESS')\n-// })\n-// .catch(error => {\n-// console.error(error)\n+// } catch (e) {\n+// console.error(e)\n// console.log('\\nCollect ROWS ERROR')\n-// })\n+// }\n// // Execute query and return the whole result as a string.\n// // Use with caution, it copies the whole stream of results into memory.\n-// queryApi\n-// .queryRaw(fluxQuery)\n-// .then(result => {\n+// try {\n+// const result = await queryApi.queryRaw(fluxQuery)\n// console.log(result)\n// console.log('\\nQueryRaw SUCCESS')\n-// })\n-// .catch(error => {\n-// console.error(error)\n+// } catch (e) {\n+// console.error(e)\n// console.log('\\nQueryRaw ERROR')\n-// })\n+// }\n// Execute query and receive result lines in annotated csv format\n// queryApi.queryLines(\n"
},
{
"change_type": "MODIFY",
"old_path": "examples/tsconfig.json",
"new_path": "examples/tsconfig.json",
"diff": "{\n\"compilerOptions\": {\n+ \"module\": \"esnext\",\n+ \"moduleResolution\": \"node\",\n+ \"target\": \"es2017\",\n\"allowJs\": true\n},\n\"exclude\": [\"**/*.js\"]\n"
}
] | TypeScript | MIT License | influxdata/influxdb-client-js | feat: modify query example to use top-level await |
305,159 | 08.08.2022 09:27:26 | -7,200 | 28eef07425fffdfa2c824e7b28d3ce96913593ce | chore: upgrade circle CI to use the latest node 14 LTS | [
{
"change_type": "MODIFY",
"old_path": ".circleci/config.yml",
"new_path": ".circleci/config.yml",
"diff": "@@ -21,7 +21,7 @@ jobs:\nparameters:\nimage:\ntype: string\n- default: &default-image 'cimg/node:14.17.6'\n+ default: &default-image 'cimg/node:14.19'\ndocker:\n- image: << parameters.image >>\nsteps:\n"
}
] | TypeScript | MIT License | influxdata/influxdb-client-js | chore: upgrade circle CI to use the latest node 14 LTS |
305,159 | 08.08.2022 10:32:29 | -7,200 | 3c77d427f9e56ab6a415c5992c2f34350257a7e5 | chore: update examples/README.md | [
{
"change_type": "MODIFY",
"old_path": "examples/README.md",
"new_path": "examples/README.md",
"diff": "@@ -24,7 +24,7 @@ This directory contains javascript and typescript examples for node.js, browser,\nHow to use forward compatibility APIs from InfluxDB 1.8.\n- [rxjs-query.ts](./rxjs-query.ts)\nUse [RxJS](https://rxjs.dev/) to query InfluxDB with [Flux](https://docs.influxdata.com/influxdb/v2.1/get-started/).\n- - [writeAdvanced.js](./writeAdvanced.js)\n+ - [writeAdvanced.mjs](./writeAdvanced.mjs)\nShows how to control the way of how data points are written to InfluxDB.\n- [follow-redirects.mjs](./follow-redirects.mjs)\nShows how to configure the client to follow HTTP redirects.\n"
}
] | TypeScript | MIT License | influxdata/influxdb-client-js | chore: update examples/README.md
Co-authored-by: Vlasta Hajek <[email protected]> |
305,171 | 10.08.2022 15:26:54 | 18,000 | 2b130b275608b9df25969286dff9a017452fd548 | docs: Update to match python pr | [
{
"change_type": "MODIFY",
"old_path": ".github/ISSUE_TEMPLATE/BUG_REPORT.yml",
"new_path": ".github/ISSUE_TEMPLATE/BUG_REPORT.yml",
"diff": "@@ -6,7 +6,7 @@ body:\nattributes:\nvalue: |\nThanks for taking time to fill out this bug report! We reserve this repository issues for bugs with reproducible problems.\n- Please redirect any questions about the JavaScript client usage to our [Community Slack](https://influxdata.com/slack) or [Community Page](https://community.influxdata.com/) we have a lot of talented community members there who could help answer your question more quickly.\n+ Please redirect any questions about the JavaScript client usage to our [Community Slack](https://app.slack.com/client/TH8RGQX5Z/C03TNRVRFB2) or [Community Page](https://community.influxdata.com/) we have a lot of talented community members there who could help answer your question more quickly.\n* Please add a :+1: or comment on a similar existing bug report instead of opening a new one.\n* Please check whether the bug can be reproduced with the latest release.\n@@ -24,13 +24,11 @@ body:\n- type: textarea\nid: reproduce\nattributes:\n- label: Steps to reproduce\n- description: Describe the steps to reproduce the bug.\n+ label: Code sample to reproduce problem\n+ description: Provide a code sample that reproduces the problem\nvalue: |\n- 1.\n- 2.\n- 3.\n- ...\n+ ```javascript\n+ ```\nvalidations:\nrequired: true\n- type: textarea\n"
}
] | TypeScript | MIT License | influxdata/influxdb-client-js | docs: Update to match python pr |
305,159 | 22.08.2022 17:27:48 | -7,200 | 44b51f7df585750a3b540520ea3acdae02e040a6 | fix(core): repair coverage that doesn't work with esbuild-runner | [
{
"change_type": "MODIFY",
"old_path": "packages/core/package.json",
"new_path": "packages/core/package.json",
"diff": "\"apidoc:extract\": \"api-extractor run\",\n\"build\": \"yarn run clean && yarn tsup --config ./tsup.config.browser.ts && yarn tsup\",\n\"clean\": \"rimraf dist build coverage .nyc_output doc *.lcov reports\",\n- \"coverage\": \"nyc mocha --require esbuild-runner/register 'test/**/*.test.ts' --exit\",\n+ \"coverage\": \"nyc mocha --require ts-node/register 'test/**/*.test.ts' --exit\",\n\"coverage:ci\": \"yarn run coverage && yarn run coverage:lcov\",\n\"coverage:lcov\": \"yarn run --silent nyc report --reporter=text-lcov > coverage/coverage.lcov\",\n\"test\": \"yarn run lint && yarn run typecheck && yarn run test:all\",\n\"rimraf\": \"^3.0.0\",\n\"rxjs\": \"^7.2.0\",\n\"sinon\": \"^14.0.0\",\n+ \"ts-node\": \"^10.9.1\",\n\"tsup\": \"^6.2.1\",\n\"typescript\": \"^4.7.4\"\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "packages/giraffe/package.json",
"new_path": "packages/giraffe/package.json",
"diff": "\"apidoc:extract\": \"api-extractor run\",\n\"build\": \"yarn run clean && yarn tsup\",\n\"clean\": \"rimraf dist build coverage .nyc_output doc *.lcov reports\",\n- \"coverage\": \"nyc mocha --require esbuild-runner/register 'test/**/*.test.ts' --exit\",\n+ \"coverage\": \"nyc mocha --require ts-node/register 'test/**/*.test.ts' --exit\",\n\"coverage:ci\": \"yarn run coverage && yarn run coverage:lcov\",\n\"coverage:lcov\": \"yarn run --silent nyc report --reporter=text-lcov > coverage/coverage.lcov\",\n\"test\": \"yarn run lint && yarn run typecheck && yarn run test:unit\",\n\"react-dom\": \"^17.0.2\",\n\"rimraf\": \"^3.0.0\",\n\"sinon\": \"^14.0.0\",\n+ \"ts-node\": \"^10.9.1\",\n\"tsup\": \"^6.2.1\",\n\"typescript\": \"^4.7.4\"\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "yarn.lock",
"new_path": "yarn.lock",
"diff": "\"@babel/helper-validator-identifier\" \"^7.16.7\"\nto-fast-properties \"^2.0.0\"\n+\"@cspotcode/source-map-support@^0.8.0\":\n+ version \"0.8.1\"\n+ resolved \"https://registry.yarnpkg.com/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz#00629c35a688e05a88b1cda684fb9d5e73f000a1\"\n+ integrity sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==\n+ dependencies:\n+ \"@jridgewell/trace-mapping\" \"0.3.9\"\n+\n\"@esbuild/[email protected]\":\nversion \"0.15.5\"\nresolved \"https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.15.5.tgz#91aef76d332cdc7c8942b600fa2307f3387e6f82\"\nresolved \"https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz#add4c98d341472a289190b424efbdb096991bb24\"\nintegrity sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==\n+\"@jridgewell/[email protected]\":\n+ version \"0.3.9\"\n+ resolved \"https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz#6534fd5933a53ba7cbf3a17615e273a0d1273ff9\"\n+ integrity sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==\n+ dependencies:\n+ \"@jridgewell/resolve-uri\" \"^3.0.3\"\n+ \"@jridgewell/sourcemap-codec\" \"^1.4.10\"\n+\n\"@jridgewell/trace-mapping@^0.3.0\":\nversion \"0.3.4\"\nresolved \"https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.4.tgz#f6a0832dffd5b8a6aaa633b7d9f8e8e94c83a0c3\"\nresolved \"https://registry.yarnpkg.com/@tootallnate/once/-/once-2.0.0.tgz#f544a148d3ab35801c1f633a7441fd87c2e484bf\"\nintegrity sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==\n+\"@tsconfig/node10@^1.0.7\":\n+ version \"1.0.9\"\n+ resolved \"https://registry.yarnpkg.com/@tsconfig/node10/-/node10-1.0.9.tgz#df4907fc07a886922637b15e02d4cebc4c0021b2\"\n+ integrity sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==\n+\n+\"@tsconfig/node12@^1.0.7\":\n+ version \"1.0.11\"\n+ resolved \"https://registry.yarnpkg.com/@tsconfig/node12/-/node12-1.0.11.tgz#ee3def1f27d9ed66dac6e46a295cffb0152e058d\"\n+ integrity sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==\n+\n+\"@tsconfig/node14@^1.0.0\":\n+ version \"1.0.3\"\n+ resolved \"https://registry.yarnpkg.com/@tsconfig/node14/-/node14-1.0.3.tgz#e4386316284f00b98435bf40f72f75a09dabf6c1\"\n+ integrity sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==\n+\n+\"@tsconfig/node16@^1.0.2\":\n+ version \"1.0.3\"\n+ resolved \"https://registry.yarnpkg.com/@tsconfig/node16/-/node16-1.0.3.tgz#472eaab5f15c1ffdd7f8628bd4c4f753995ec79e\"\n+ integrity sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ==\n+\n\"@types/[email protected]\":\nversion \"1.0.38\"\nresolved \"https://registry.yarnpkg.com/@types/argparse/-/argparse-1.0.38.tgz#a81fd8606d481f873a3800c6ebae4f1d768a56a9\"\n@@ -1586,7 +1621,12 @@ acorn-jsx@^5.3.2:\nresolved \"https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937\"\nintegrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==\n-acorn@^8.8.0:\n+acorn-walk@^8.1.1:\n+ version \"8.2.0\"\n+ resolved \"https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.2.0.tgz#741210f2e2426454508853a2f44d0ab83b7f69c1\"\n+ integrity sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==\n+\n+acorn@^8.4.1, acorn@^8.8.0:\nversion \"8.8.0\"\nresolved \"https://registry.yarnpkg.com/acorn/-/acorn-8.8.0.tgz#88c0187620435c7f6015803f5539dae05a9dbea8\"\nintegrity sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w==\n@@ -1704,6 +1744,11 @@ are-we-there-yet@^3.0.0:\ndelegates \"^1.0.0\"\nreadable-stream \"^3.6.0\"\n+arg@^4.1.0:\n+ version \"4.1.3\"\n+ resolved \"https://registry.yarnpkg.com/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089\"\n+ integrity sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==\n+\nargparse@^1.0.7, argparse@~1.0.9:\nversion \"1.0.10\"\nresolved \"https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911\"\n@@ -2316,6 +2361,11 @@ cpr@^3.0.1:\nmkdirp \"~0.5.1\"\nrimraf \"^2.5.4\"\n+create-require@^1.1.0:\n+ version \"1.1.1\"\n+ resolved \"https://registry.yarnpkg.com/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333\"\n+ integrity sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==\n+\ncross-spawn@^7.0.0, cross-spawn@^7.0.2, cross-spawn@^7.0.3:\nversion \"7.0.3\"\nresolved \"https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6\"\n@@ -2456,6 +2506,11 @@ [email protected]:\nresolved \"https://registry.yarnpkg.com/diff/-/diff-5.0.0.tgz#7ed6ad76d859d030787ec35855f5b1daf31d852b\"\nintegrity sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==\n+diff@^4.0.1:\n+ version \"4.0.2\"\n+ resolved \"https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d\"\n+ integrity sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==\n+\ndiff@^5.0.0:\nversion \"5.1.0\"\nresolved \"https://registry.yarnpkg.com/diff/-/diff-5.1.0.tgz#bc52d298c5ea8df9194800224445ed43ffc87e40\"\n@@ -4242,6 +4297,11 @@ make-dir@^3.0.0, make-dir@^3.0.2:\ndependencies:\nsemver \"^6.0.0\"\n+make-error@^1.1.1:\n+ version \"1.3.6\"\n+ resolved \"https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2\"\n+ integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==\n+\nmake-fetch-happen@^10.0.3, make-fetch-happen@^10.0.6:\nversion \"10.1.8\"\nresolved \"https://registry.yarnpkg.com/make-fetch-happen/-/make-fetch-happen-10.1.8.tgz#3b6e93dd8d8fdb76c0d7bf32e617f37c3108435a\"\n@@ -6075,6 +6135,25 @@ ts-interface-checker@^0.1.9:\nresolved \"https://registry.yarnpkg.com/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz#784fd3d679722bc103b1b4b8030bcddb5db2a699\"\nintegrity sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==\n+ts-node@^10.9.1:\n+ version \"10.9.1\"\n+ resolved \"https://registry.yarnpkg.com/ts-node/-/ts-node-10.9.1.tgz#e73de9102958af9e1f0b168a6ff320e25adcff4b\"\n+ integrity sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==\n+ dependencies:\n+ \"@cspotcode/source-map-support\" \"^0.8.0\"\n+ \"@tsconfig/node10\" \"^1.0.7\"\n+ \"@tsconfig/node12\" \"^1.0.7\"\n+ \"@tsconfig/node14\" \"^1.0.0\"\n+ \"@tsconfig/node16\" \"^1.0.2\"\n+ acorn \"^8.4.1\"\n+ acorn-walk \"^8.1.1\"\n+ arg \"^4.1.0\"\n+ create-require \"^1.1.0\"\n+ diff \"^4.0.1\"\n+ make-error \"^1.1.1\"\n+ v8-compile-cache-lib \"^3.0.1\"\n+ yn \"3.1.1\"\n+\ntsconfig-paths@^3.9.0:\nversion \"3.14.1\"\nresolved \"https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.14.1.tgz#ba0734599e8ea36c862798e920bcf163277b137a\"\n@@ -6247,6 +6326,11 @@ uuid@^8.3.2:\nresolved \"https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2\"\nintegrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==\n+v8-compile-cache-lib@^3.0.1:\n+ version \"3.0.1\"\n+ resolved \"https://registry.yarnpkg.com/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz#6336e8d71965cb3d35a1bbb7868445a7c05264bf\"\n+ integrity sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==\n+\[email protected], v8-compile-cache@^2.0.3:\nversion \"2.3.0\"\nresolved \"https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz#2de19618c66dc247dcfb6f99338035d8245a2cee\"\n@@ -6555,6 +6639,11 @@ yargs@^17.4.0:\ny18n \"^5.0.5\"\nyargs-parser \"^21.0.0\"\[email protected]:\n+ version \"3.1.1\"\n+ resolved \"https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50\"\n+ integrity sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==\n+\nyocto-queue@^0.1.0:\nversion \"0.1.0\"\nresolved \"https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b\"\n"
}
] | TypeScript | MIT License | influxdata/influxdb-client-js | fix(core): repair coverage that doesn't work with esbuild-runner |
305,159 | 22.08.2022 16:11:06 | -7,200 | 6c44ff7f2e871cd4935d7648251b488e547773fe | chore: remove unused code from the test | [
{
"change_type": "MODIFY",
"old_path": "packages/core/test/unit/impl/RetryBuffer.test.ts",
"new_path": "packages/core/test/unit/impl/RetryBuffer.test.ts",
"diff": "@@ -32,14 +32,12 @@ describe('RetryBuffer', () => {\nexpect(input).deep.equals(output)\n})\nit('ignores lines on heavy load', async () => {\n- const input = [] as Array<[string[], number]>\nconst output = [] as Array<[string[], number]>\nconst subject = new RetryBuffer(5, (lines, countdown) => {\noutput.push([lines, countdown])\nreturn Promise.resolve()\n})\nfor (let i = 0; i < 10; i++) {\n- if (i >= 5) input.push([['a' + i], i])\nsubject.addLines(['a' + i], i, 100, Date.now() + 1000)\n}\nawait subject.flush()\n"
}
] | TypeScript | MIT License | influxdata/influxdb-client-js | chore: remove unused code from the test |
305,159 | 22.08.2022 16:28:04 | -7,200 | afbe962309128506448626c1764af09d05b6f4c9 | feat(core): improve retry buffer to consistenly remove oldest items and respect scheduled retry interval | [
{
"change_type": "MODIFY",
"old_path": "packages/core/src/impl/RetryBuffer.ts",
"new_path": "packages/core/src/impl/RetryBuffer.ts",
"diff": "import {Log} from '../util/logger'\n-/* interval between successful retries */\n-const RETRY_INTERVAL = 1\n-\ninterface RetryItem {\nlines: string[]\nretryCount: number\n+ retryTime: number\nexpires: number\nnext?: RetryItem\n}\n+type FindOldestExpiredResult = [found: RetryItem, parent?: RetryItem]\n+\n+function findOldestExpires(first: RetryItem): FindOldestExpiredResult {\n+ let oldestExpires = Number.MIN_SAFE_INTEGER\n+ let parent = undefined\n+ let found = first\n+ let currentParent = first\n+ while (currentParent.next) {\n+ if (currentParent.next.expires > oldestExpires) {\n+ oldestExpires = currentParent.next.expires\n+ parent = currentParent\n+ found = currentParent.next\n+ }\n+ currentParent = currentParent.next\n+ }\n+ return [found, parent]\n+}\n+\n/**\n* Retries lines up to a limit of max buffer size.\n*/\nexport default class RetryBuffer {\nfirst?: RetryItem\n- last?: RetryItem\nsize = 0\n- nextRetryTime = 0\nclosed = false\nprivate _timeoutHandle: any = undefined\n@@ -27,7 +41,13 @@ export default class RetryBuffer {\nlines: string[],\nretryCountdown: number,\nstarted: number\n- ) => Promise<void>\n+ ) => Promise<void>,\n+ private onShrink: (entry: {\n+ lines: string[]\n+ retryCount: number\n+ retryTime: number\n+ expires: number\n+ }) => void = () => undefined\n) {}\naddLines(\n@@ -40,22 +60,23 @@ export default class RetryBuffer {\nif (!lines.length) return\nlet retryTime = Date.now() + delay\nif (expires < retryTime) {\n- delay = expires - Date.now()\nretryTime = expires\n}\n- if (retryTime > this.nextRetryTime) this.nextRetryTime = retryTime\n// ensure at most maxLines are in the Buffer\nif (this.first && this.size + lines.length > this.maxLines) {\nconst origSize = this.size\nconst newSize = origSize * 0.7 // reduce to 70 %\ndo {\n- const newFirst = this.first.next as RetryItem\n- this.size -= this.first.lines.length\n- this.first.next = undefined\n- this.first = newFirst\n- if (!this.first) {\n- this.last = undefined\n+ // remove oldest item\n+ const [found, parent] = findOldestExpires(this.first)\n+ this.size -= found.lines.length\n+ if (parent) {\n+ parent.next = found.next\n+ } else {\n+ this.first = found.next\n}\n+ found.next = undefined\n+ this.onShrink(found)\n} while (this.first && this.size + lines.length > newSize)\nLog.error(\n`RetryBuffer: ${\n@@ -68,15 +89,25 @@ export default class RetryBuffer {\nconst toAdd: RetryItem = {\nlines,\nretryCount,\n+ retryTime,\nexpires,\n}\n- if (this.last) {\n- this.last.next = toAdd\n- this.last = toAdd\n+ // insert sorted according to retryTime\n+ let current: RetryItem | undefined = this.first\n+ let parent = undefined\n+ for (;;) {\n+ if (!current || current.retryTime > retryTime) {\n+ toAdd.next = current\n+ if (parent) {\n+ parent.next = toAdd\n} else {\nthis.first = toAdd\n- this.last = toAdd\n- this.scheduleRetry(delay)\n+ this.scheduleRetry(retryTime - Date.now())\n+ }\n+ break\n+ }\n+ parent = current\n+ current = current.next\n}\nthis.size += lines.length\n}\n@@ -87,24 +118,27 @@ export default class RetryBuffer {\nthis.first = this.first.next\ntoRetry.next = undefined\nthis.size -= toRetry.lines.length\n- if (!this.first) this.last = undefined\nreturn toRetry\n}\nreturn undefined\n}\nscheduleRetry(delay: number): void {\n+ if (this._timeoutHandle) {\n+ clearTimeout(this._timeoutHandle)\n+ }\nthis._timeoutHandle = setTimeout(() => {\nconst toRetry = this.removeLines()\nif (toRetry) {\n- this.retryLines(toRetry.lines, toRetry.retryCount, toRetry.expires)\n- .then(() => {\n- // continue with successfull retry\n- this.scheduleRetry(RETRY_INTERVAL)\n- })\n- .catch((_e) => {\n- // already logged\n- this.scheduleRetry(this.nextRetryTime - Date.now())\n+ this.retryLines(\n+ toRetry.lines,\n+ toRetry.retryCount,\n+ toRetry.expires\n+ ).finally(() => {\n+ // schedule next retry execution\n+ if (this.first) {\n+ this.scheduleRetry(this.first.retryTime - Date.now())\n+ }\n})\n} else {\nthis._timeoutHandle = undefined\n"
},
{
"change_type": "MODIFY",
"old_path": "packages/core/test/unit/impl/RetryBuffer.test.ts",
"new_path": "packages/core/test/unit/impl/RetryBuffer.test.ts",
"diff": "@@ -25,20 +25,30 @@ describe('RetryBuffer', () => {\n}\nawait waitForCondition(() => output.length >= 10)\nexpect(output).length.is.greaterThan(0)\n- subject.addLines([], 1, 1, Date.now() + 1000) // shall be ignored\n+ subject.addLines([], 1, 1, Date.now() + 1000) // empty lines are ignored\nsubject.close()\n- subject.addLines(['x'], 1, 1, Date.now() + 1000) // shall be ignored\n+ subject.addLines(['x'], 1, 1, Date.now() + 1000) // ignored after calling flush\nawait subject.flush()\nexpect(input).deep.equals(output)\n})\nit('ignores lines on heavy load', async () => {\nconst output = [] as Array<[string[], number]>\n- const subject = new RetryBuffer(5, (lines, countdown) => {\n+ const subject = new RetryBuffer(\n+ 5,\n+ (lines, countdown) => {\noutput.push([lines, countdown])\nreturn Promise.resolve()\n- })\n+ },\n+ ({expires}) => {\n+ for (let actual = subject.first; actual; actual = actual?.next) {\n+ if (actual.expires > expires) {\n+ expect.fail('Oldest items were not removed from the retry buffer')\n+ }\n+ }\n+ }\n+ )\nfor (let i = 0; i < 10; i++) {\n- subject.addLines(['a' + i], i, 100, Date.now() + 1000)\n+ subject.addLines(['a' + i], i, 100 - i, Date.now() + 1000 - i)\n}\nawait subject.flush()\nexpect(subject.close()).equals(0)\n"
}
] | TypeScript | MIT License | influxdata/influxdb-client-js | feat(core): improve retry buffer to consistenly remove oldest items and respect scheduled retry interval |
305,159 | 22.08.2022 16:54:44 | -7,200 | 36a7717152ca5984c80b05a4076ee263ef1d6f10 | feat: test that retry buffer removes the oldest items | [
{
"change_type": "MODIFY",
"old_path": "packages/core/src/impl/RetryBuffer.ts",
"new_path": "packages/core/src/impl/RetryBuffer.ts",
"diff": "@@ -8,14 +8,14 @@ interface RetryItem {\nnext?: RetryItem\n}\n-type FindOldestExpiredResult = [found: RetryItem, parent?: RetryItem]\n+type FindShrinkCandidateResult = [found: RetryItem, parent?: RetryItem]\n-function findOldestExpires(first: RetryItem): FindOldestExpiredResult {\n+function findShrinkCandidate(first: RetryItem): FindShrinkCandidateResult {\nlet parent = undefined\nlet found = first\nlet currentParent = first\nwhile (currentParent.next) {\n- if (currentParent.next.expires > found.expires) {\n+ if (currentParent.next.expires < found.expires) {\nparent = currentParent\nfound = currentParent.next\n}\n@@ -65,8 +65,8 @@ export default class RetryBuffer {\nconst origSize = this.size\nconst newSize = origSize * 0.7 // reduce to 70 %\ndo {\n- // remove oldest item\n- const [found, parent] = findOldestExpires(this.first)\n+ // remove \"oldest\" item\n+ const [found, parent] = findShrinkCandidate(this.first)\nthis.size -= found.lines.length\nif (parent) {\nparent.next = found.next\n"
},
{
"change_type": "MODIFY",
"old_path": "packages/core/test/unit/impl/RetryBuffer.test.ts",
"new_path": "packages/core/test/unit/impl/RetryBuffer.test.ts",
"diff": "@@ -41,14 +41,42 @@ describe('RetryBuffer', () => {\n},\n({expires}) => {\nfor (let actual = subject.first; actual; actual = actual?.next) {\n- if (actual.expires > expires) {\n- expect.fail('Oldest items were not removed from the retry buffer')\n+ if (actual.expires < expires) {\n+ expect.fail(\n+ `${actual.expires} entry was not removed from the retry buffer, but ${expires} was!`\n+ )\n+ }\n+ }\n+ }\n+ )\n+ for (let i = 0; i < 10; i++) {\n+ subject.addLines(['a' + i], i, 100 + i, Date.now() + 1000 + i)\n+ }\n+ await subject.flush()\n+ expect(subject.close()).equals(0)\n+ expect(logs.error).length.is.greaterThan(0) // 5 entries over limit\n+ expect(output).length.is.lessThan(6) // at most 5 items will be written\n+ })\n+ it('ignores lines on heavy load with descending expiration', async () => {\n+ const output = [] as Array<[string[], number]>\n+ const subject = new RetryBuffer(\n+ 5,\n+ (lines, countdown) => {\n+ output.push([lines, countdown])\n+ return Promise.resolve()\n+ },\n+ ({expires}) => {\n+ for (let actual = subject.first; actual; actual = actual?.next) {\n+ if (actual.expires < expires) {\n+ expect.fail(\n+ `${actual.expires} entry was not removed from the retry buffer, but ${expires} was!`\n+ )\n}\n}\n}\n)\nfor (let i = 0; i < 10; i++) {\n- subject.addLines(['a' + i], i, 100 - i, Date.now() + 1000 - i)\n+ subject.addLines(['a' + i], i, 100 + i, Date.now() + 1000 - i)\n}\nawait subject.flush()\nexpect(subject.close()).equals(0)\n"
}
] | TypeScript | MIT License | influxdata/influxdb-client-js | feat: test that retry buffer removes the oldest items |
305,159 | 22.08.2022 17:13:35 | -7,200 | 774be7a348ed4977f7488bf56747f852e9edb4a5 | feat: add writeRetrySkipped callback to writeApi | [
{
"change_type": "MODIFY",
"old_path": "packages/core/src/impl/RetryBuffer.ts",
"new_path": "packages/core/src/impl/RetryBuffer.ts",
"diff": "@@ -43,7 +43,6 @@ export default class RetryBuffer {\nprivate onShrink: (entry: {\nlines: string[]\nretryCount: number\n- retryTime: number\nexpires: number\n}) => void = () => undefined\n) {}\n@@ -72,6 +71,9 @@ export default class RetryBuffer {\nparent.next = found.next\n} else {\nthis.first = found.next\n+ if (this.first) {\n+ this.scheduleRetry(this.first.retryTime - Date.now())\n+ }\n}\nfound.next = undefined\nthis.onShrink(found)\n"
},
{
"change_type": "MODIFY",
"old_path": "packages/core/src/impl/WriteApiImpl.ts",
"new_path": "packages/core/src/impl/WriteApiImpl.ts",
"diff": "@@ -146,7 +146,8 @@ export default class WriteApiImpl implements WriteApi {\nthis.retryStrategy = createRetryDelayStrategy(this.writeOptions)\nthis.retryBuffer = new RetryBuffer(\nthis.writeOptions.maxBufferLines,\n- this.sendBatch\n+ this.sendBatch,\n+ this.writeOptions.writeRetrySkipped\n)\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "packages/core/src/options.ts",
"new_path": "packages/core/src/options.ts",
"diff": "@@ -93,6 +93,13 @@ export interface WriteRetryOptions extends RetryDelayStrategyOptions {\n*/\nwriteSuccess(this: WriteApi, lines: Array<string>): void\n+ /**\n+ * WriteRetrySkipped is informed about lines that were removed from the retry buffer\n+ * to keep the size of the retry buffer under the configured limit (maxBufferLines).\n+ * @param entry - lines that were skipped\n+ */\n+ writeRetrySkipped(entry: {lines: Array<string>; expires: number}): void\n+\n/** max count of retries after the first write fails */\nmaxRetries: number\n/** max time (millis) that can be spent with retries */\n@@ -137,6 +144,7 @@ export const DEFAULT_WriteOptions: WriteOptions = {\nflushInterval: 60000,\nwriteFailed: function () {},\nwriteSuccess: function () {},\n+ writeRetrySkipped: function () {},\nmaxRetries: 5,\nmaxRetryTime: 180_000,\nmaxBufferLines: 32_000,\n"
}
] | TypeScript | MIT License | influxdata/influxdb-client-js | feat: add writeRetrySkipped callback to writeApi |
305,159 | 22.08.2022 18:27:20 | -7,200 | 1600af41e3824b45014d6b109a59d04936703154 | feat(core): add test for writeRetrySkipped callback | [
{
"change_type": "MODIFY",
"old_path": "packages/core/src/impl/RetryBuffer.ts",
"new_path": "packages/core/src/impl/RetryBuffer.ts",
"diff": "@@ -83,7 +83,7 @@ export default class RetryBuffer {\norigSize - this.size\n} oldest lines removed to keep buffer size under the limit of ${\nthis.maxLines\n- } lines`\n+ } lines.`\n)\n}\nconst toAdd: RetryItem = {\n"
},
{
"change_type": "MODIFY",
"old_path": "packages/core/test/unit/WriteApi.test.ts",
"new_path": "packages/core/test/unit/WriteApi.test.ts",
"diff": "@@ -242,6 +242,45 @@ describe('WriteApi', () => {\n])\n})\n})\n+ const withWriteRetryOptions = [true, false]\n+ for (const withWriteRetry of withWriteRetryOptions) {\n+ it(`informs about skipped retry ${\n+ withWriteRetry ? 'with' : 'without'\n+ } callback`, async () => {\n+ const skippedLines: string[][] = []\n+ let failedAttempts = 0\n+ const writeOptions: Partial<WriteOptions> = {\n+ flushInterval: 0,\n+ batchSize: 1,\n+ maxBufferLines: 1,\n+ writeFailed: () => {\n+ failedAttempts++\n+ },\n+ }\n+ if (withWriteRetry) {\n+ writeOptions.writeRetrySkipped = ({lines}) => {\n+ skippedLines.push(lines)\n+ }\n+ }\n+ useSubject(writeOptions)\n+ subject.writeRecord('test value=1')\n+ subject.writeRecord('test value=2')\n+ // wait for http calls to finish\n+ await waitForCondition(() => failedAttempts == 2)\n+ await subject.close().then(() => {\n+ expect(logs.error).to.length(2)\n+ expect(logs.error[0][0]).equals(\n+ 'RetryBuffer: 1 oldest lines removed to keep buffer size under the limit of 1 lines.'\n+ )\n+ expect(logs.error[1][0]).equals(\n+ 'Retry buffer closed with 1 items that were not written to InfluxDB!'\n+ )\n+ if (withWriteRetry) {\n+ expect(skippedLines).deep.equals([['test value=1']])\n+ }\n+ })\n+ })\n+ }\nit('uses the pre-configured batchSize', async () => {\nuseSubject({flushInterval: 0, maxRetries: 0, batchSize: 2})\nsubject.writeRecords(['test value=1', 'test value=2', 'test value=3'])\n"
}
] | TypeScript | MIT License | influxdata/influxdb-client-js | feat(core): add test for writeRetrySkipped callback |
305,180 | 25.08.2022 10:03:11 | 21,600 | bb3e3f49e1fdbb357602bdbf8c38e7b1450a0442 | chore(release): prepare to release influxdb-client-js-1.29.0 | [
{
"change_type": "MODIFY",
"old_path": "CHANGELOG.md",
"new_path": "CHANGELOG.md",
"diff": "-## 1.29.0 [unreleased]\n+## 1.29.0 [2022-08-25]\n### Other\n1. [#238](https://github.com/influxdata/influxdb-client-js/pull/238): Respect context path in client's url option.\n1. [#240](https://github.com/influxdata/influxdb-client-js/pull/240): Add helpers to let users choose how to deserialize dateTime:RFC3339 query response data type.\n-1. [#248](https://github.com/influxdata/influxdb-client-js/pull/248): Change default InfluxDB URL to http://localhost:8086 .\n+1. [#248](https://github.com/influxdata/influxdb-client-js/pull/248): Change default InfluxDB URL to <http://localhost:8086> .\n1. [#250](https://github.com/influxdata/influxdb-client-js/pull/250): Simplify precision for WriteApi retrieval.\n1. [#253](https://github.com/influxdata/influxdb-client-js/pull/253): Allow to simply receive the whole query response as a string.\n1. [#257](https://github.com/influxdata/influxdb-client-js/pull/257): Regenerate APIs from swagger.\n"
},
{
"change_type": "MODIFY",
"old_path": "packages/core/src/impl/version.ts",
"new_path": "packages/core/src/impl/version.ts",
"diff": "-export const CLIENT_LIB_VERSION = '1.28.0'\n+export const CLIENT_LIB_VERSION = '1.29.0'\n"
}
] | TypeScript | MIT License | influxdata/influxdb-client-js | chore(release): prepare to release influxdb-client-js-1.29.0 |
305,180 | 25.08.2022 10:09:40 | 21,600 | 84934286a6f2b9515807a28693401f5c9c11f551 | chore(release): publish v1.29.0 [skip CI] | [
{
"change_type": "MODIFY",
"old_path": "lerna.json",
"new_path": "lerna.json",
"diff": "{\n- \"version\": \"1.28.0\",\n+ \"version\": \"1.29.0\",\n\"npmClient\": \"yarn\",\n\"packages\": [\n\"packages/*\"\n"
},
{
"change_type": "MODIFY",
"old_path": "packages/apis/package.json",
"new_path": "packages/apis/package.json",
"diff": "{\n\"name\": \"@influxdata/influxdb-client-apis\",\n- \"version\": \"1.28.0\",\n+ \"version\": \"1.29.0\",\n\"description\": \"InfluxDB 2.x generated APIs\",\n\"scripts\": {\n\"apidoc:extract\": \"api-extractor run\",\n\"@influxdata/influxdb-client\": \"*\"\n},\n\"devDependencies\": {\n- \"@influxdata/influxdb-client\": \"^1.28.0\",\n+ \"@influxdata/influxdb-client\": \"^1.29.0\",\n\"@microsoft/api-extractor\": \"^7.28.4\",\n\"@types/mocha\": \"^9.1.1\",\n\"@typescript-eslint/eslint-plugin\": \"^5.29.0\",\n"
},
{
"change_type": "MODIFY",
"old_path": "packages/core-browser/package.json",
"new_path": "packages/core-browser/package.json",
"diff": "{\n\"name\": \"@influxdata/influxdb-client-browser\",\n- \"version\": \"1.28.0\",\n+ \"version\": \"1.29.0\",\n\"description\": \"InfluxDB 2.x client for browser\",\n\"scripts\": {\n\"apidoc:extract\": \"echo \\\"Nothing to do\\\"\",\n},\n\"license\": \"MIT\",\n\"devDependencies\": {\n- \"@influxdata/influxdb-client\": \"^1.28.0\",\n+ \"@influxdata/influxdb-client\": \"^1.29.0\",\n\"cpr\": \"^3.0.1\",\n\"rimraf\": \"^3.0.0\"\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "packages/core/package.json",
"new_path": "packages/core/package.json",
"diff": "{\n\"name\": \"@influxdata/influxdb-client\",\n- \"version\": \"1.28.0\",\n+ \"version\": \"1.29.0\",\n\"description\": \"InfluxDB 2.x client\",\n\"scripts\": {\n\"apidoc:extract\": \"api-extractor run\",\n"
},
{
"change_type": "MODIFY",
"old_path": "packages/giraffe/package.json",
"new_path": "packages/giraffe/package.json",
"diff": "{\n\"name\": \"@influxdata/influxdb-client-giraffe\",\n- \"version\": \"1.28.0\",\n+ \"version\": \"1.29.0\",\n\"description\": \"InfluxDB 2.x client - giraffe integration\",\n\"scripts\": {\n\"apidoc:extract\": \"api-extractor run\",\n\"license\": \"MIT\",\n\"devDependencies\": {\n\"@influxdata/giraffe\": \"*\",\n- \"@influxdata/influxdb-client\": \"^1.28.0\",\n+ \"@influxdata/influxdb-client\": \"^1.29.0\",\n\"@microsoft/api-extractor\": \"^7.28.4\",\n\"@types/chai\": \"^4.2.5\",\n\"@types/mocha\": \"^9.1.1\",\n"
}
] | TypeScript | MIT License | influxdata/influxdb-client-js | chore(release): publish v1.29.0 [skip CI] |
305,159 | 05.09.2022 08:45:46 | -7,200 | 1b22f4254a4cd124141f56238e0c873cffea2776 | chore(deps-dev): revert bump from 7.29.3 to 7.30.0"
This reverts commit it fails in CI | [
{
"change_type": "MODIFY",
"old_path": "yarn.lock",
"new_path": "yarn.lock",
"diff": "\"@microsoft/tsdoc-config\" \"~0.16.1\"\n\"@rushstack/node-core-library\" \"3.50.2\"\n-\"@microsoft/[email protected]\":\n- version \"7.24.0\"\n- resolved \"https://registry.yarnpkg.com/@microsoft/api-extractor-model/-/api-extractor-model-7.24.0.tgz#df71615f7c7d2c4f520c8b179d03a85efcdaf452\"\n- integrity sha512-lFzF5h+quTyVB7eaKJkqrbQRDGSkrHzXyF8iMVvHdlaNrodGeyhtQeBFDuRVvBXTW2ILBiOV6ZWwUM1eGKcD+A==\n- dependencies:\n- \"@microsoft/tsdoc\" \"0.14.1\"\n- \"@microsoft/tsdoc-config\" \"~0.16.1\"\n- \"@rushstack/node-core-library\" \"3.51.1\"\n-\n\"@microsoft/api-extractor@^7.28.4\":\n- version \"7.30.0\"\n- resolved \"https://registry.yarnpkg.com/@microsoft/api-extractor/-/api-extractor-7.30.0.tgz#37a6f3ad4b6f9148bea2bcc8e3718903223c6ea6\"\n- integrity sha512-XmtvrW74SzGvv59cjNC6+TE13XbIm4qrKKZtveoFRNbKdyTR4eIqnLmPvh1fgfolSF+iKfXlHHsQJpcgwdNztA==\n+ version \"7.29.3\"\n+ resolved \"https://registry.yarnpkg.com/@microsoft/api-extractor/-/api-extractor-7.29.3.tgz#f91ca61833c170c6c47a0fc064fa010460a11457\"\n+ integrity sha512-PHq+Oo8yiXhwi11VQ1Nz36s+aZwgFqjtkd41udWHtSpyMv2slJ74m1cHdpWbs2ovGUCfldayzdpGwnexZLd2bA==\ndependencies:\n- \"@microsoft/api-extractor-model\" \"7.24.0\"\n+ \"@microsoft/api-extractor-model\" \"7.23.1\"\n\"@microsoft/tsdoc\" \"0.14.1\"\n\"@microsoft/tsdoc-config\" \"~0.16.1\"\n- \"@rushstack/node-core-library\" \"3.51.1\"\n+ \"@rushstack/node-core-library\" \"3.50.2\"\n\"@rushstack/rig-package\" \"0.3.14\"\n\"@rushstack/ts-command-line\" \"4.12.2\"\ncolors \"~1.2.1\"\ntimsort \"~0.3.0\"\nz-schema \"~5.0.2\"\n-\"@rushstack/[email protected]\":\n- version \"3.51.1\"\n- resolved \"https://registry.yarnpkg.com/@rushstack/node-core-library/-/node-core-library-3.51.1.tgz#e123053c4924722cc9614c0091fda5ed7bbc6c9d\"\n- integrity sha512-xLoUztvGpaT5CphDexDPt2WbBx8D68VS5tYOkwfr98p90y0f/wepgXlTA/q5MUeZGGucASiXKp5ysdD+GPYf9A==\n- dependencies:\n- \"@types/node\" \"12.20.24\"\n- colors \"~1.2.1\"\n- fs-extra \"~7.0.1\"\n- import-lazy \"~4.0.0\"\n- jju \"~1.4.0\"\n- resolve \"~1.17.0\"\n- semver \"~7.3.0\"\n- z-schema \"~5.0.2\"\n-\n\"@rushstack/[email protected]\":\nversion \"0.3.14\"\nresolved \"https://registry.yarnpkg.com/@rushstack/rig-package/-/rig-package-0.3.14.tgz#f2611b59245fd7cc29c6982566b2fbb4a4192bc5\"\n"
}
] | TypeScript | MIT License | influxdata/influxdb-client-js | chore(deps-dev): revert bump @microsoft/api-extractor from 7.29.3 to 7.30.0"
This reverts commit e07173538ffc9571f31c7d73ebe2a2f940ad1e14, it fails in CI |
305,159 | 05.09.2022 10:33:55 | -7,200 | 64b99fa8c2b40246ac7dea68627dc611b1782f7f | chore: upgrade typescrpt to 4.8.2 | [
{
"change_type": "MODIFY",
"old_path": "examples/package.json",
"new_path": "examples/package.json",
"diff": "\"open\": \"^7.0.0\",\n\"response-time\": \"^2.3.2\",\n\"rxjs\": \"^6.5.5\",\n- \"typescript\": \"^4.7.4\"\n+ \"typescript\": \"^4.8.2\"\n}\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "packages/apis/package.json",
"new_path": "packages/apis/package.json",
"diff": "\"prettier\": \"^2.7.1\",\n\"rimraf\": \"^3.0.0\",\n\"tsup\": \"^6.2.1\",\n- \"typescript\": \"^4.7.4\"\n+ \"typescript\": \"^4.8.2\"\n}\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "packages/core/package.json",
"new_path": "packages/core/package.json",
"diff": "\"sinon\": \"^14.0.0\",\n\"ts-node\": \"^10.9.1\",\n\"tsup\": \"^6.2.1\",\n- \"typescript\": \"^4.7.4\"\n+ \"typescript\": \"^4.8.2\"\n}\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "packages/core/src/impl/browser/FetchTransport.ts",
"new_path": "packages/core/src/impl/browser/FetchTransport.ts",
"diff": "@@ -124,7 +124,7 @@ export default class FetchTransport implements Transport {\n} else {\nif (response.body) {\nconst reader = response.body.getReader()\n- let chunk: ReadableStreamDefaultReadResult<Uint8Array>\n+ let chunk: ReadableStreamReadResult<Uint8Array>\ndo {\nchunk = await reader.read()\nobserver.next(chunk.value)\n"
},
{
"change_type": "MODIFY",
"old_path": "packages/giraffe/package.json",
"new_path": "packages/giraffe/package.json",
"diff": "\"sinon\": \"^14.0.0\",\n\"ts-node\": \"^10.9.1\",\n\"tsup\": \"^6.2.1\",\n- \"typescript\": \"^4.7.4\"\n+ \"typescript\": \"^4.8.2\"\n}\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "yarn.lock",
"new_path": "yarn.lock",
"diff": "@@ -6266,7 +6266,12 @@ typedarray@^0.0.6:\nresolved \"https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777\"\nintegrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=\n-typescript@^4.7.4, typescript@~4.7.4:\n+typescript@^4.8.2:\n+ version \"4.8.2\"\n+ resolved \"https://registry.yarnpkg.com/typescript/-/typescript-4.8.2.tgz#e3b33d5ccfb5914e4eeab6699cf208adee3fd790\"\n+ integrity sha512-C0I1UsrrDHo2fYI5oaCGbSejwX4ch+9Y5jTQELvovfmFkK3HHSZJB8MSJcWLmCUBzQBchCrZ9rMRV6GuNrvGtw==\n+\n+typescript@~4.7.4:\nversion \"4.7.4\"\nresolved \"https://registry.yarnpkg.com/typescript/-/typescript-4.7.4.tgz#1a88596d1cf47d59507a1bcdfb5b9dfe4d488235\"\nintegrity sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==\n"
}
] | TypeScript | MIT License | influxdata/influxdb-client-js | chore: upgrade typescrpt to 4.8.2 |
305,159 | 13.09.2022 07:56:52 | -7,200 | 48cae63645a3a387e79a0afc6c89bcd3653e52c1 | fix: detect and repair wrong documentation references | [
{
"change_type": "MODIFY",
"old_path": "scripts/fix-extracted-api-files.js",
"new_path": "scripts/fix-extracted-api-files.js",
"diff": "/* eslint-disable @typescript-eslint/no-var-requires */\nconst path = require('path')\nconst fs = require('fs')\n+const referenceIds = {}\n+\n+const ignoredReferencePackages = [\n+ '!' /* ts&js builtin types */,\n+ '@influxdata/giraffe!' /* giraffe references */,\n+]\nconst markdownLinkRE = /\\[([^\\]]*)\\]\\(([^)]*)\\)/g\nfunction changeMarkdownLinks(text) {\n@@ -9,16 +15,33 @@ function changeMarkdownLinks(text) {\n// changes markdown style [text](link) to tsdoc {@link URL | text }\nreturn text.replace(markdownLinkRE, (match, text, link) => {\nconst retVal = `{@link ${link} | ${text} }`\n- console.log(` ${match} => ${retVal}`)\n+ console.log(` CHANGED ${match} => ${retVal}`)\nreturn retVal\n})\n}\nreturn text\n}\n-function replaceInExtractorFile(file) {\n- const data = fs.readFileSync(file, 'utf8')\n- const json = JSON.parse(data)\n+function storeCanonicalReferences(json, references) {\n+ function walk(obj) {\n+ if (typeof obj === 'object') {\n+ if (Array.isArray(obj)) {\n+ obj.forEach(walk)\n+ } else {\n+ const canonicalReference = obj['canonicalReference']\n+ if (canonicalReference && obj['kind'] && obj['kind'] !== 'Reference') {\n+ references[canonicalReference] = true\n+ }\n+ for (const key in obj) {\n+ walk(obj[key])\n+ }\n+ }\n+ }\n+ }\n+ walk(json)\n+}\n+\n+function fixExtractedFile(file, json, errors = []) {\nconsole.log(`correct: ${file}`)\nfunction replaceObject(obj) {\n@@ -28,14 +51,22 @@ function replaceInExtractorFile(file) {\n} else {\nif (obj['kind'] === 'Reference') {\nconst canonicalReference = obj['canonicalReference']\n- if (canonicalReference.indexOf('!default:') > 0) {\n- const text = obj['text']\n- const replaced = canonicalReference.replace(\n- /!(default):/,\n- `!${text}:`\n- )\n- console.log(` ${canonicalReference} => ${replaced}`)\n+ if (canonicalReference && !referenceIds[canonicalReference]) {\n+ if (canonicalReference.indexOf('!~') > 0) {\n+ const replaced = canonicalReference.replace('!~', '!')\n+ console.log(` FIXED ${canonicalReference} => ${replaced}`)\nobj.canonicalReference = replaced\n+ return\n+ }\n+ // report unresolved reference\n+ for (const ignoredPackage of ignoredReferencePackages) {\n+ if (canonicalReference.startsWith(ignoredPackage)) {\n+ return\n+ }\n+ }\n+ const msg = ` MISSING ${canonicalReference}`\n+ errors.push(`${file}: ${msg}`)\n+ console.log(msg)\n}\n} else {\nfor (const key in obj) {\n@@ -56,6 +87,21 @@ function replaceInExtractorFile(file) {\nconst docsDir = path.resolve(__dirname, '..', 'docs')\nconst files = fs.readdirSync(docsDir).filter((x) => /\\.api\\.json$/.test(x))\n-files.forEach((file) => {\n- replaceInExtractorFile(path.resolve(docsDir, file))\n-})\n+const fileToJson = files.reduce((acc, file) => {\n+ file = path.resolve(docsDir, file)\n+ const json = JSON.parse(fs.readFileSync(file, 'utf8'))\n+ acc[file] = json\n+ storeCanonicalReferences(json, referenceIds)\n+ return acc\n+}, {})\n+\n+const errors = []\n+for (const [file, json] of Object.entries(fileToJson)) {\n+ fixExtractedFile(file, json, errors)\n+}\n+\n+if (errors.length) {\n+ console.error(`\\n\\nERRORS:`)\n+ errors.forEach((e) => console.error(e))\n+ process.exit(1)\n+}\n"
}
] | TypeScript | MIT License | influxdata/influxdb-client-js | fix: detect and repair wrong documentation references |
305,159 | 13.09.2022 08:02:03 | -7,200 | e739bf969d35416b6ca1adb9c4d03a8cf8edc816 | chore: improve output format | [
{
"change_type": "MODIFY",
"old_path": "scripts/fix-extracted-api-files.js",
"new_path": "scripts/fix-extracted-api-files.js",
"diff": "@@ -42,7 +42,7 @@ function storeCanonicalReferences(json, references) {\n}\nfunction fixExtractedFile(file, json, errors = []) {\n- console.log(`correct: ${file}`)\n+ console.log(`\\nCheck and correct: ${file}`)\nfunction replaceObject(obj) {\nif (typeof obj === 'object') {\n"
}
] | TypeScript | MIT License | influxdata/influxdb-client-js | chore: improve output format |
305,159 | 13.09.2022 09:10:10 | -7,200 | 56267eb3b8a4ca70db6ee7dc8cdc027af24e7d2b | chore: print total number of fixes applied to api-extractor results | [
{
"change_type": "MODIFY",
"old_path": "scripts/fix-extracted-api-files.js",
"new_path": "scripts/fix-extracted-api-files.js",
"diff": "const path = require('path')\nconst fs = require('fs')\nconst referenceIds = {}\n+let fixedReferenceCount = 0\n+let fixedMarkdownLinks = 0\nconst ignoredReferencePackages = [\n'!' /* ts&js builtin types */,\n@@ -16,6 +18,7 @@ function changeMarkdownLinks(text) {\nreturn text.replace(markdownLinkRE, (match, text, link) => {\nconst retVal = `{@link ${link} | ${text} }`\nconsole.log(` CHANGED ${match} => ${retVal}`)\n+ fixedMarkdownLinks++\nreturn retVal\n})\n}\n@@ -54,6 +57,7 @@ function fixExtractedFile(file, json, errors = []) {\nif (canonicalReference && !referenceIds[canonicalReference]) {\nif (canonicalReference.indexOf('!~') > 0) {\nconst replaced = canonicalReference.replace('!~', '!')\n+ fixedReferenceCount++\nconsole.log(` FIXED ${canonicalReference} => ${replaced}`)\nobj.canonicalReference = replaced\nreturn\n@@ -100,6 +104,8 @@ for (const [file, json] of Object.entries(fileToJson)) {\nfixExtractedFile(file, json, errors)\n}\n+console.info('Fixed markdown links: ' + fixedMarkdownLinks)\n+console.info('Fixed references: ' + fixedReferenceCount)\nif (errors.length) {\nconsole.error(`\\n\\nERRORS:`)\nerrors.forEach((e) => console.error(e))\n"
}
] | TypeScript | MIT License | influxdata/influxdb-client-js | chore: print total number of fixes applied to api-extractor results |
305,159 | 13.09.2022 09:33:04 | -7,200 | da94357607e5c9d6ca36e499f53e78ba70dcd448 | chore: upgrade api-extractor and api-documenter | [
{
"change_type": "MODIFY",
"old_path": "package.json",
"new_path": "package.json",
"diff": "\"license\": \"MIT\",\n\"devDependencies\": {\n\"@types/node\": \"^18\",\n- \"@microsoft/api-documenter\": \"^7.18.3\",\n+ \"@microsoft/api-documenter\": \"^7.19.12\",\n\"gh-pages\": \"^4.0.0\",\n\"lerna\": \"^5.0.0\",\n\"prettier\": \"^2.7.1\",\n"
},
{
"change_type": "MODIFY",
"old_path": "packages/apis/package.json",
"new_path": "packages/apis/package.json",
"diff": "},\n\"devDependencies\": {\n\"@influxdata/influxdb-client\": \"^1.29.0\",\n- \"@microsoft/api-extractor\": \"^7.28.4\",\n+ \"@microsoft/api-extractor\": \"^7.31.0\",\n\"@types/mocha\": \"^9.1.1\",\n\"@typescript-eslint/eslint-plugin\": \"^5.29.0\",\n\"@typescript-eslint/parser\": \"^5.29.0\",\n"
},
{
"change_type": "MODIFY",
"old_path": "packages/core/package.json",
"new_path": "packages/core/package.json",
"diff": "},\n\"license\": \"MIT\",\n\"devDependencies\": {\n- \"@microsoft/api-extractor\": \"^7.28.4\",\n+ \"@microsoft/api-extractor\": \"^7.31.0\",\n\"@types/chai\": \"^4.2.5\",\n\"@types/mocha\": \"^9.1.1\",\n\"@types/sinon\": \"^10.0.13\",\n"
},
{
"change_type": "MODIFY",
"old_path": "packages/giraffe/package.json",
"new_path": "packages/giraffe/package.json",
"diff": "\"devDependencies\": {\n\"@influxdata/giraffe\": \"*\",\n\"@influxdata/influxdb-client\": \"^1.29.0\",\n- \"@microsoft/api-extractor\": \"^7.28.4\",\n+ \"@microsoft/api-extractor\": \"^7.31.0\",\n\"@types/chai\": \"^4.2.5\",\n\"@types/mocha\": \"^9.1.1\",\n\"@types/react\": \"^16.9.55\",\n"
},
{
"change_type": "MODIFY",
"old_path": "yarn.lock",
"new_path": "yarn.lock",
"diff": "npmlog \"^6.0.2\"\nwrite-file-atomic \"^4.0.1\"\n-\"@microsoft/api-documenter@^7.18.3\":\n- version \"7.19.5\"\n- resolved \"https://registry.yarnpkg.com/@microsoft/api-documenter/-/api-documenter-7.19.5.tgz#c8736c50e5dda1b4b856beb069952dc3e723a5e7\"\n- integrity sha512-MYEsoZ8b7XvrvRmsTlodmY1OZHa5o1IW8SoyuCEpsTKaYh+mSq7fHjLzBdvS1Vk+Ses0/gzhzZAyz1n1CRLE9g==\n+\"@microsoft/api-documenter@^7.19.12\":\n+ version \"7.19.12\"\n+ resolved \"https://registry.yarnpkg.com/@microsoft/api-documenter/-/api-documenter-7.19.12.tgz#6e23eb01392dbb48b8fc781a9f70eabd134854bd\"\n+ integrity sha512-QrYBmjMhg3rVgevHaG+4ltIiyGClbM+mJIM8f/rmwT9Q0oDhlUbBc1/AqHRrTiuV960+qhC0l3YzMoO0awh7eQ==\ndependencies:\n- \"@microsoft/api-extractor-model\" \"7.23.1\"\n+ \"@microsoft/api-extractor-model\" \"7.24.0\"\n\"@microsoft/tsdoc\" \"0.14.1\"\n- \"@rushstack/node-core-library\" \"3.50.2\"\n+ \"@rushstack/node-core-library\" \"3.51.1\"\n\"@rushstack/ts-command-line\" \"4.12.2\"\ncolors \"~1.2.1\"\njs-yaml \"~3.13.1\"\nresolve \"~1.17.0\"\n-\"@microsoft/[email protected]\":\n- version \"7.23.1\"\n- resolved \"https://registry.yarnpkg.com/@microsoft/api-extractor-model/-/api-extractor-model-7.23.1.tgz#d93704882241e7720094d41c7005b07eb593c073\"\n- integrity sha512-axlZ33H2LfYX7goAaWpzABWZl3JtX/EUkfVBsI4SuMn3AZYBJsP5MVpMCq7jt0PCefWGwwO+Rv+lCmmJIjFhlQ==\n+\"@microsoft/[email protected]\":\n+ version \"7.24.0\"\n+ resolved \"https://registry.yarnpkg.com/@microsoft/api-extractor-model/-/api-extractor-model-7.24.0.tgz#df71615f7c7d2c4f520c8b179d03a85efcdaf452\"\n+ integrity sha512-lFzF5h+quTyVB7eaKJkqrbQRDGSkrHzXyF8iMVvHdlaNrodGeyhtQeBFDuRVvBXTW2ILBiOV6ZWwUM1eGKcD+A==\ndependencies:\n\"@microsoft/tsdoc\" \"0.14.1\"\n\"@microsoft/tsdoc-config\" \"~0.16.1\"\n- \"@rushstack/node-core-library\" \"3.50.2\"\n+ \"@rushstack/node-core-library\" \"3.51.1\"\n-\"@microsoft/api-extractor@^7.28.4\":\n- version \"7.29.3\"\n- resolved \"https://registry.yarnpkg.com/@microsoft/api-extractor/-/api-extractor-7.29.3.tgz#f91ca61833c170c6c47a0fc064fa010460a11457\"\n- integrity sha512-PHq+Oo8yiXhwi11VQ1Nz36s+aZwgFqjtkd41udWHtSpyMv2slJ74m1cHdpWbs2ovGUCfldayzdpGwnexZLd2bA==\n+\"@microsoft/api-extractor@^7.31.0\":\n+ version \"7.31.0\"\n+ resolved \"https://registry.yarnpkg.com/@microsoft/api-extractor/-/api-extractor-7.31.0.tgz#a4dd2af2e176a330652a19f9254f77d4fdcea06f\"\n+ integrity sha512-1gVDvm/eKmntBn5X5Rc+XDREm9gfxQ/BQfGFf7Rf4uWvJc4Q4GxidC3lBODYDOcikjG983bzbo0xTu5BS8J93Q==\ndependencies:\n- \"@microsoft/api-extractor-model\" \"7.23.1\"\n+ \"@microsoft/api-extractor-model\" \"7.24.0\"\n\"@microsoft/tsdoc\" \"0.14.1\"\n\"@microsoft/tsdoc-config\" \"~0.16.1\"\n- \"@rushstack/node-core-library\" \"3.50.2\"\n+ \"@rushstack/node-core-library\" \"3.51.1\"\n\"@rushstack/rig-package\" \"0.3.14\"\n\"@rushstack/ts-command-line\" \"4.12.2\"\ncolors \"~1.2.1\"\nnode-addon-api \"^3.2.1\"\nnode-gyp-build \"^4.3.0\"\n-\"@rushstack/[email protected]\":\n- version \"3.50.2\"\n- resolved \"https://registry.yarnpkg.com/@rushstack/node-core-library/-/node-core-library-3.50.2.tgz#43df3f8422898a448114fcb9c7d4e967625da585\"\n- integrity sha512-+zpZBcaX5s+wA0avF0Lk3sd5jbGRo5SmsEJpElJbqQd3KGFvc/hcyeNSMqV5+esJ1JuTfnE1QyRt8nvxFNTaQg==\n+\"@rushstack/[email protected]\":\n+ version \"3.51.1\"\n+ resolved \"https://registry.yarnpkg.com/@rushstack/node-core-library/-/node-core-library-3.51.1.tgz#e123053c4924722cc9614c0091fda5ed7bbc6c9d\"\n+ integrity sha512-xLoUztvGpaT5CphDexDPt2WbBx8D68VS5tYOkwfr98p90y0f/wepgXlTA/q5MUeZGGucASiXKp5ysdD+GPYf9A==\ndependencies:\n\"@types/node\" \"12.20.24\"\ncolors \"~1.2.1\"\njju \"~1.4.0\"\nresolve \"~1.17.0\"\nsemver \"~7.3.0\"\n- timsort \"~0.3.0\"\nz-schema \"~5.0.2\"\n\"@rushstack/[email protected]\":\n@@ -6065,11 +6064,6 @@ through@2, \"through@>=2.2.7 <3\", through@^2.3.4, through@^2.3.6:\nresolved \"https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5\"\nintegrity sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=\n-timsort@~0.3.0:\n- version \"0.3.0\"\n- resolved \"https://registry.yarnpkg.com/timsort/-/timsort-0.3.0.tgz#405411a8e7e6339fe64db9a234de11dc31e02bd4\"\n- integrity sha1-QFQRqOfmM5/mTbmiNN4R3DHgK9Q=\n-\ntmp@^0.0.33:\nversion \"0.0.33\"\nresolved \"https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9\"\n"
}
] | TypeScript | MIT License | influxdata/influxdb-client-js | chore: upgrade api-extractor and api-documenter |
305,159 | 13.09.2022 09:56:56 | -7,200 | e4d3b4f86bc5236a178f34891e44907858d29c63 | fix(docs): ignore reference check for symbol declaration, map specific references | [
{
"change_type": "MODIFY",
"old_path": "scripts/fix-extracted-api-files.js",
"new_path": "scripts/fix-extracted-api-files.js",
"diff": "@@ -9,7 +9,15 @@ let fixedMarkdownLinks = 0\nconst ignoredReferencePackages = [\n'!' /* ts&js builtin types */,\n'@influxdata/giraffe!' /* giraffe references */,\n+ '@influxdata/influxdb-client!~__global' /*ignore global symbol declaration in packages/core/src/observable/symbol.ts */,\n]\n+const mappedReferences = {\n+ // defect in api-extractor naming\n+ '@influxdata/influxdb-client!FLUX_VALUE':\n+ '@influxdata/influxdb-client!FLUX_VALUE:var',\n+ '@influxdata/influxdb-client!Headers:type':\n+ '@influxdata/influxdb-client!Headers_2:type',\n+}\nconst markdownLinkRE = /\\[([^\\]]*)\\]\\(([^)]*)\\)/g\nfunction changeMarkdownLinks(text) {\n@@ -57,17 +65,26 @@ function fixExtractedFile(file, json, errors = []) {\nif (canonicalReference && !referenceIds[canonicalReference]) {\nif (canonicalReference.indexOf('!~') > 0) {\nconst replaced = canonicalReference.replace('!~', '!')\n+ if (referenceIds[replaced]) {\nfixedReferenceCount++\nconsole.log(` FIXED ${canonicalReference} => ${replaced}`)\nobj.canonicalReference = replaced\nreturn\n}\n- // report unresolved reference\n+ }\n+ const mapped = mappedReferences[canonicalReference]\n+ if (mapped && referenceIds[mapped]) {\n+ fixedReferenceCount++\n+ console.log(` FIXED ${canonicalReference} => ${mapped}`)\n+ obj.canonicalReference = mapped\n+ return\n+ }\nfor (const ignoredPackage of ignoredReferencePackages) {\nif (canonicalReference.startsWith(ignoredPackage)) {\nreturn\n}\n}\n+ // report unresolved references\nconst msg = ` MISSING ${canonicalReference}`\nerrors.push(`${file}: ${msg}`)\nconsole.log(msg)\n"
}
] | TypeScript | MIT License | influxdata/influxdb-client-js | fix(docs): ignore reference check for symbol declaration, map specific references |
305,159 | 14.09.2022 00:04:39 | -7,200 | ef63105e639bd7d4507d2d8fbea51adef31f67e9 | fix: use node script in place of sed | [
{
"change_type": "MODIFY",
"old_path": "Makefile",
"new_path": "Makefile",
"diff": "@@ -20,7 +20,7 @@ publish:\ngit checkout master\ngit pull\nyarn install --frozen-lockfile\n- sed -i '' -e \"s/CLIENT_LIB_VERSION = '.*'/CLIENT_LIB_VERSION = '$(VERSION)'/\" packages/core/src/impl/version.ts\n+ node scripts/change-version.js\nyarn run build\nyarn run test\n@echo \"Publishing $(VERSION)...\"\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "scripts/change-version.js",
"diff": "+// eslint-disable-next-line @typescript-eslint/no-var-requires\n+const {readFileSync, writeFileSync} = require('fs')\n+const VERSION = process.env.VERSION\n+\n+if (!VERSION) {\n+ console.error('VERSION environment variable is not defined!')\n+ process.exit(1)\n+}\n+\n+const fileName = __dirname + '/../packages/core/src/impl/version.ts'\n+const content = readFileSync(fileName, 'utf-8')\n+const updatedVersion = content.replace(\n+ /CLIENT_LIB_VERSION = '[^']*'/,\n+ `CLIENT_LIB_VERSION = '${VERSION}'`\n+)\n+writeFileSync(fileName, updatedVersion, 'utf8')\n"
}
] | TypeScript | MIT License | influxdata/influxdb-client-js | fix: use node script in place of sed #568 |
305,159 | 14.09.2022 21:55:45 | -7,200 | dda18067135b0b52bd0cc30c5436185f52699e36 | chore: add links to associated 3rd party defects | [
{
"change_type": "MODIFY",
"old_path": "scripts/fix-extracted-api-files.js",
"new_path": "scripts/fix-extracted-api-files.js",
"diff": "@@ -12,7 +12,7 @@ const ignoredReferencePackages = [\n'@influxdata/influxdb-client!~__global' /*ignore global symbol declaration in packages/core/src/observable/symbol.ts */,\n]\nconst mappedReferences = {\n- // defect in api-extractor naming\n+ // defect in api-extractor naming https://github.com/microsoft/rushstack/issues/3629\n'@influxdata/influxdb-client!FLUX_VALUE':\n'@influxdata/influxdb-client!FLUX_VALUE:var',\n'@influxdata/influxdb-client!Headers:type':\n@@ -64,6 +64,7 @@ function fixExtractedFile(file, json, errors = []) {\nconst canonicalReference = obj['canonicalReference']\nif (canonicalReference && !referenceIds[canonicalReference]) {\nif (canonicalReference.indexOf('!~') > 0) {\n+ // https://github.com/microsoft/rushstack/issues/3624\nconst replaced = canonicalReference.replace('!~', '!')\nif (referenceIds[replaced]) {\nfixedReferenceCount++\n"
}
] | TypeScript | MIT License | influxdata/influxdb-client-js | chore: add links to associated 3rd party defects |
305,159 | 15.09.2022 10:20:48 | -7,200 | a167b922e4d536501ccaa1b6f9b31ae76ae5b296 | fix(docs): rename Headers to HttpHeaders to avoid clash with DOM's Headers type | [
{
"change_type": "MODIFY",
"old_path": "packages/core/src/results/CommunicationObserver.ts",
"new_path": "packages/core/src/results/CommunicationObserver.ts",
"diff": "@@ -2,14 +2,18 @@ import {Cancellable} from './Cancellable'\n/**\n* Type of HTTP headers.\n*/\n-export type Headers = {[header: string]: string | string[] | undefined}\n+export type HttpHeaders = {[header: string]: string | string[] | undefined}\n+export {HttpHeaders as Headers}\n/**\n* Informs about a start of response processing.\n* @param headers - response HTTP headers\n* @param statusCode - response status code\n*/\n-export type ResponseStartedFn = (headers: Headers, statusCode?: number) => void\n+export type ResponseStartedFn = (\n+ headers: HttpHeaders,\n+ statusCode?: number\n+) => void\n/**\n* Observes communication with the server.\n"
},
{
"change_type": "MODIFY",
"old_path": "scripts/fix-extracted-api-files.js",
"new_path": "scripts/fix-extracted-api-files.js",
"diff": "@@ -15,8 +15,6 @@ const mappedReferences = {\n// defect in api-extractor naming https://github.com/microsoft/rushstack/issues/3629\n'@influxdata/influxdb-client!FLUX_VALUE':\n'@influxdata/influxdb-client!FLUX_VALUE:var',\n- '@influxdata/influxdb-client!Headers:type':\n- '@influxdata/influxdb-client!Headers_2:type',\n}\nconst markdownLinkRE = /\\[([^\\]]*)\\]\\(([^)]*)\\)/g\n"
}
] | TypeScript | MIT License | influxdata/influxdb-client-js | fix(docs): rename Headers to HttpHeaders to avoid clash with DOM's Headers type |
305,159 | 16.09.2022 13:47:58 | -7,200 | a9adcc51b9d018ffb639ebb76a9893f207eed65c | feat: automatically regenerate code with | [
{
"change_type": "MODIFY",
"old_path": "packages/apis/DEVELOPMENT.md",
"new_path": "packages/apis/DEVELOPMENT.md",
"diff": "@@ -10,12 +10,15 @@ $ yarn build\n## Re-generate APIs code\n+```\n+yarn regenerate\n+```\n+\n+It performs the following steps:\n+\n- fetch latest versions of openapi files\n- - `yarn fetchSwaggerFiles`\n-- re-generate src/generated/types.ts and resources/operations.json using [oats](https://github.com/bonitoo-io/oats)\n- - `rm -rf src/generated/*.ts`\n- - `oats -i 'types' --storeOperations resources/operations.json --patchScript $PWD/scripts/patchSwagger.js resources/oss.yml resources/invocable-scripts.yml > src/generated/types.ts`\n+- re-generate src/generated/types.ts and resources/operations.json using [oats](https://github.com/influxdata/oats)\n- generate src/generated APIs from resources/operations.json\n- - `yarn generate`\n-- validate\n- - `yarn test`\n+- validates the generated output\n+\n+Create a new git branch with the regenerated code and submit a new pull request to review the changes.\n"
},
{
"change_type": "MODIFY",
"old_path": "packages/apis/package.json",
"new_path": "packages/apis/package.json",
"diff": "\"build\": \"yarn run clean && yarn tsup --config ./tsup.config.browser.ts && yarn tsup\",\n\"clean\": \"rimraf build doc dist reports\",\n\"clean:apis\": \"rimraf src/generated/*API.ts\",\n- \"generate\": \"yarn esr generator && yarn prettier --write src/generated/*.ts\",\n\"test\": \"yarn run lint && yarn run typecheck && yarn run test:unit\",\n\"test:unit\": \"mocha --require esbuild-runner/register 'test/unit/**/*.test.ts' --exit\",\n\"test:ci\": \"yarn run typecheck && yarn run lint:ci && yarn run test:unit --reporter mocha-junit-reporter --reporter-options mochaFile=../../reports/apis_mocha/test-results.xml\",\n\"lint\": \"eslint 'src/**/*.ts'\",\n\"lint:ci\": \"yarn run lint --format junit --output-file ../../reports/apis_eslint/eslint.xml\",\n\"lint:fix\": \"eslint --fix 'src/**/*.ts'\",\n- \"fetchSwaggerFiles\": \"node ./scripts/fetchSwaggerFiles.js\"\n+ \"regenerate\": \"yarn fetchSwaggerFiles && yarn generate && yarn test\",\n+ \"fetchSwaggerFiles\": \"node ./scripts/fetchSwaggerFiles.js\",\n+ \"generate\": \"yarn generate:clean && yarn generate:types && yarn generate:apis\",\n+ \"generate:clean\": \"rm -rf src/generated/*.ts\",\n+ \"generate:types\": \"oats -i 'types' --storeOperations resources/operations.json --patchScript $PWD/scripts/patchSwagger.js resources/oss.yml resources/invocable-scripts.yml > src/generated/types.ts\",\n+ \"generate:apis\": \"yarn esr generator && yarn prettier --write src/generated/*.ts\"\n},\n\"main\": \"dist/index.js\",\n\"module\": \"dist/index.mjs\",\n},\n\"devDependencies\": {\n\"@influxdata/influxdb-client\": \"^1.29.0\",\n+ \"@influxdata/oats\": \"^0.7.0\",\n\"@microsoft/api-extractor\": \"^7.31.0\",\n\"@types/mocha\": \"^9.1.1\",\n\"@typescript-eslint/eslint-plugin\": \"^5.29.0\",\n"
},
{
"change_type": "MODIFY",
"old_path": "yarn.lock",
"new_path": "yarn.lock",
"diff": "dependencies:\nmerge-images \"^2.0.0\"\n+\"@influxdata/oats@^0.7.0\":\n+ version \"0.7.0\"\n+ resolved \"https://registry.yarnpkg.com/@influxdata/oats/-/oats-0.7.0.tgz#dd3d94a7b8d42a5d8dbedf4e2ccdb097dd9563f4\"\n+ integrity sha512-i78Y0svY0H9nYo1YZ0KzTV4KO6mj+jItTJcUgZq8/y6TJlexE3wma9qpG2lxzwj1LGBSogTjfUWVYdRUm2m05Q==\n+ dependencies:\n+ commander \"^2.20.0\"\n+ humps \"^2.0.1\"\n+ lodash \"^4.17.14\"\n+ swagger-parser \"^8.0.0\"\n+\n\"@isaacs/string-locale-compare@^1.1.0\":\nversion \"1.1.0\"\nresolved \"https://registry.yarnpkg.com/@isaacs/string-locale-compare/-/string-locale-compare-1.1.0.tgz#291c227e93fd407a96ecd59879a35809120e432b\"\n@@ -1980,6 +1990,11 @@ caching-transform@^4.0.0:\npackage-hash \"^4.0.0\"\nwrite-file-atomic \"^3.0.0\"\n+call-me-maybe@^1.0.1:\n+ version \"1.0.1\"\n+ resolved \"https://registry.yarnpkg.com/call-me-maybe/-/call-me-maybe-1.0.1.tgz#26d208ea89e37b5cbde60250a15f031c16a4d66b\"\n+ integrity sha512-wCyFsDQkKPwwF8BDwOiWNx/9K45L/hvggQiDbve+viMNMQnWhrlYIuBk09offfwCRtCO9P6XwUttufzU11WCVw==\n+\ncallsites@^3.0.0:\nversion \"3.1.0\"\nresolved \"https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73\"\n@@ -2195,7 +2210,7 @@ columnify@^1.6.0:\nstrip-ansi \"^6.0.1\"\nwcwidth \"^1.0.0\"\n-commander@^2.18.0, commander@^2.7.1:\n+commander@^2.18.0, commander@^2.20.0, commander@^2.7.1:\nversion \"2.20.3\"\nresolved \"https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33\"\nintegrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==\n@@ -3628,6 +3643,11 @@ humanize-ms@^1.2.1:\ndependencies:\nms \"^2.0.0\"\n+humps@^2.0.1:\n+ version \"2.0.1\"\n+ resolved \"https://registry.yarnpkg.com/humps/-/humps-2.0.1.tgz#dd02ea6081bd0568dc5d073184463957ba9ef9aa\"\n+ integrity sha512-E0eIbrFWUhwfXJmsbdjRQFQPrl5pTEoKlz163j1mTqqUnU9PgR4AgB8AIITzuB3vLBdxZXyZ9TDIrwB2OASz4g==\n+\niconv-lite@^0.4.24:\nversion \"0.4.24\"\nresolved \"https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b\"\n@@ -4029,6 +4049,15 @@ json-parse-even-better-errors@^2.3.0, json-parse-even-better-errors@^2.3.1:\nresolved \"https://registry.yarnpkg.com/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz#7c47805a94319928e05777405dc12e1f7a4ee02d\"\nintegrity sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==\n+json-schema-ref-parser@^7.1.3:\n+ version \"7.1.4\"\n+ resolved \"https://registry.yarnpkg.com/json-schema-ref-parser/-/json-schema-ref-parser-7.1.4.tgz#abb3f2613911e9060dc2268477b40591753facf0\"\n+ integrity sha512-AD7bvav0vak1/63w3jH8F7eHId/4E4EPdMAEZhGxtjktteUv9dnNB/cJy6nVnMyoTPBJnLwFK6tiQPSTeleCtQ==\n+ dependencies:\n+ call-me-maybe \"^1.0.1\"\n+ js-yaml \"^3.13.1\"\n+ ono \"^6.0.0\"\n+\njson-schema-traverse@^0.4.1:\nversion \"0.4.1\"\nresolved \"https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660\"\n@@ -4937,6 +4966,11 @@ onetime@^5.1.0, onetime@^5.1.2:\ndependencies:\nmimic-fn \"^2.1.0\"\n+ono@^6.0.0:\n+ version \"6.0.1\"\n+ resolved \"https://registry.yarnpkg.com/ono/-/ono-6.0.1.tgz#1bc14ffb8af1e5db3f7397f75b88e4a2d64bbd71\"\n+ integrity sha512-5rdYW/106kHqLeG22GE2MHKq+FlsxMERZev9DCzQX1zwkxnFwBivSn5i17a5O/rDmOJOdf4Wyt80UZljzx9+DA==\n+\nopen@^8.4.0:\nversion \"8.4.0\"\nresolved \"https://registry.yarnpkg.com/open/-/open-8.4.0.tgz#345321ae18f8138f82565a910fdc6b39e8c244f8\"\n@@ -4946,6 +4980,16 @@ open@^8.4.0:\nis-docker \"^2.1.1\"\nis-wsl \"^2.2.0\"\n+openapi-schemas@^1.0.2:\n+ version \"1.0.3\"\n+ resolved \"https://registry.yarnpkg.com/openapi-schemas/-/openapi-schemas-1.0.3.tgz#0fa2f19e44ce8a1cdab9c9f616df4babe1aa026b\"\n+ integrity sha512-KtMWcK2VtOS+nD8RKSIyScJsj8JrmVWcIX7Kjx4xEHijFYuvMTDON8WfeKOgeSb4uNG6UsqLj5Na7nKbSav9RQ==\n+\n+openapi-types@^1.3.5:\n+ version \"1.3.5\"\n+ resolved \"https://registry.yarnpkg.com/openapi-types/-/openapi-types-1.3.5.tgz#6718cfbc857fe6c6f1471f65b32bdebb9c10ce40\"\n+ integrity sha512-11oi4zYorsgvg5yBarZplAqbpev5HkuVNPlZaPTknPDzAynq+lnJdXAmruGWP0s+dNYZS7bjM+xrTpJw7184Fg==\n+\noptionator@^0.9.1:\nversion \"0.9.1\"\nresolved \"https://registry.yarnpkg.com/optionator/-/optionator-0.9.1.tgz#4f236a6373dae0566a6d43e1326674f50c291499\"\n@@ -5983,6 +6027,24 @@ supports-preserve-symlinks-flag@^1.0.0:\nresolved \"https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09\"\nintegrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==\n+swagger-methods@^2.0.1:\n+ version \"2.0.2\"\n+ resolved \"https://registry.yarnpkg.com/swagger-methods/-/swagger-methods-2.0.2.tgz#5891d5536e54d5ba8e7ae1007acc9170f41c9590\"\n+ integrity sha512-/RNqvBZkH8+3S/FqBPejHxJxZenaYq3MrpeXnzi06aDIS39Mqf5YCUNb/ZBjsvFFt8h9FxfKs8EXPtcYdfLiRg==\n+\n+swagger-parser@^8.0.0:\n+ version \"8.0.4\"\n+ resolved \"https://registry.yarnpkg.com/swagger-parser/-/swagger-parser-8.0.4.tgz#ddec68723d13ee3748dd08fd5b7ba579327595da\"\n+ integrity sha512-KGRdAaMJogSEB7sPKI31ptKIWX8lydEDAwWgB4pBMU7zys5cd54XNhoPSVlTxG/A3LphjX47EBn9j0dOGyzWbA==\n+ dependencies:\n+ call-me-maybe \"^1.0.1\"\n+ json-schema-ref-parser \"^7.1.3\"\n+ ono \"^6.0.0\"\n+ openapi-schemas \"^1.0.2\"\n+ openapi-types \"^1.3.5\"\n+ swagger-methods \"^2.0.1\"\n+ z-schema \"^4.2.2\"\n+\ntar-stream@~2.2.0:\nversion \"2.2.0\"\nresolved \"https://registry.yarnpkg.com/tar-stream/-/tar-stream-2.2.0.tgz#acad84c284136b060dc3faa64474aa9aebd77287\"\n@@ -6357,7 +6419,7 @@ validate-npm-package-name@^4.0.0:\ndependencies:\nbuiltins \"^5.0.0\"\n-validator@^13.7.0:\n+validator@^13.6.0, validator@^13.7.0:\nversion \"13.7.0\"\nresolved \"https://registry.yarnpkg.com/validator/-/validator-13.7.0.tgz#4f9658ba13ba8f3d82ee881d3516489ea85c0857\"\nintegrity sha512-nYXQLCBkpJ8X6ltALua9dRrZDHVYxjJ1wgskNt1lH9fzGjs3tgojGSCBjmEPwkWS1y29+DrizMTW19Pr9uB2nw==\n@@ -6634,6 +6696,17 @@ yocto-queue@^0.1.0:\nresolved \"https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b\"\nintegrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==\n+z-schema@^4.2.2:\n+ version \"4.2.4\"\n+ resolved \"https://registry.yarnpkg.com/z-schema/-/z-schema-4.2.4.tgz#73102a49512179b12a8ec50b1daa676b984da6e4\"\n+ integrity sha512-YvBeW5RGNeNzKOUJs3rTL4+9rpcvHXt5I051FJbOcitV8bl40pEfcG0Q+dWSwS0/BIYrMZ/9HHoqLllMkFhD0w==\n+ dependencies:\n+ lodash.get \"^4.4.2\"\n+ lodash.isequal \"^4.5.0\"\n+ validator \"^13.6.0\"\n+ optionalDependencies:\n+ commander \"^2.7.1\"\n+\nz-schema@~5.0.2:\nversion \"5.0.2\"\nresolved \"https://registry.yarnpkg.com/z-schema/-/z-schema-5.0.2.tgz#f410394b2c9fcb9edaf6a7511491c0bb4e89a504\"\n"
}
] | TypeScript | MIT License | influxdata/influxdb-client-js | feat: automatically regenerate code with @influxdata/oats |
305,159 | 16.09.2022 16:01:44 | -7,200 | aea9e0420b8f77566c588a2d7f32ab2094fbfc30 | fix(docs): repair code blocks so that they are indented to the start of the line | [
{
"change_type": "MODIFY",
"old_path": "packages/apis/package.json",
"new_path": "packages/apis/package.json",
"diff": "\"description\": \"InfluxDB 2.x generated APIs\",\n\"scripts\": {\n\"apidoc:extract\": \"api-extractor run\",\n- \"build\": \"yarn run clean && yarn tsup --config ./tsup.config.browser.ts && yarn tsup\",\n+ \"build\": \"yarn run clean && yarn tsup --config ./tsup.config.browser.ts && yarn tsup && node ../../scripts/repair-doc-code-blocks.js ./dist/index.d.ts\",\n\"clean\": \"rimraf build doc dist reports\",\n\"clean:apis\": \"rimraf src/generated/*API.ts\",\n\"test\": \"yarn run lint && yarn run typecheck && yarn run test:unit\",\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "scripts/repair-doc-code-blocks.js",
"diff": "+// This script repairs code blocks (wrapped between ```)\n+// in the supplied typescript file so that\n+// the backticks are indented to the start of the line.\n+//\n+// ES-Lint correctly complain about tsdoc/syntax that this script fixes :\n+// warning tsdoc-code-fence-opening-indent: The opening backtick for a code fence must appear at the start of the line\n+\n+// eslint-disable-next-line @typescript-eslint/no-var-requires\n+const {readFileSync, writeFileSync} = require('fs')\n+\n+const fileName = process.argv[2]\n+if (!fileName) {\n+ console.error('ERROR: Please supply a file to repair')\n+ process.exit(1)\n+}\n+const lines = readFileSync(fileName, 'utf8').split('\\n')\n+let backTicksCorrected = 0\n+let result = ''\n+let cutPrefix = 0\n+for (let line of lines) {\n+ const trippleBackTickIndex = line.indexOf('```')\n+ if (trippleBackTickIndex >= 0) {\n+ backTicksCorrected++\n+ line = line.substring(trippleBackTickIndex)\n+ result += line\n+ result += '\\n'\n+ cutPrefix = cutPrefix === 0 ? trippleBackTickIndex : 0\n+ continue\n+ }\n+ result += line.length >= cutPrefix ? line.substring(cutPrefix) : line\n+ result += '\\n'\n+}\n+writeFileSync(fileName, result)\n+console.info(`${backTicksCorrected / 2} code blocks indented in ${fileName}`)\n"
}
] | TypeScript | MIT License | influxdata/influxdb-client-js | fix(docs): repair code blocks so that they are indented to the start of the line |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.