Skip to content

Commit 5cdc823

Browse files
author
Benjamin E. Coe
authored
fix(deps): pin TypeScript below 3.7.0 (#1897)
1 parent a3e9285 commit 5cdc823

File tree

4 files changed

+11
-8
lines changed

4 files changed

+11
-8
lines changed

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"license": "Apache-2.0",
33
"dependencies": {
4-
"google-auth-library": "^5.2.0",
5-
"googleapis-common": "^3.1.0"
4+
"google-auth-library": "^5.6.1",
5+
"googleapis-common": "^3.2.0"
66
},
77
"files": [
88
"build/src",
@@ -88,6 +88,6 @@
8888
"server-destroy": "^1.0.1",
8989
"source-map-support": "^0.5.12",
9090
"tmp": "^0.1.0",
91-
"typescript": "~3.7.0"
91+
"typescript": "3.6.4"
9292
}
9393
}

renovate.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,6 @@
1414
"extends": "packages:linters",
1515
"groupName": "linters"
1616
}
17-
]
17+
],
18+
"ignoreDeps": ["typescript"]
1819
}

src/generator/docs.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,10 @@
1515
import * as execa from 'execa';
1616
import * as fs from 'fs';
1717
import * as nunjucks from 'nunjucks';
18-
import Q from 'p-queue';
1918
import * as path from 'path';
2019
import {promisify} from 'util';
20+
// there is a typings issue with p-queue and TypeScript 3.6.4.
21+
const {default: Q} = require('p-queue');
2122

2223
const readdir = promisify(fs.readdir);
2324
const writeFile = promisify(fs.writeFile);

src/generator/generator.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,11 @@ import {
2525
} from 'googleapis-common';
2626
import * as mkdirp from 'mkdirp';
2727
import * as nunjucks from 'nunjucks';
28-
import Q from 'p-queue';
2928
import * as path from 'path';
3029
import * as url from 'url';
3130
import * as util from 'util';
31+
// there is a typings issue with p-queue and TypeScript 3.6.4.
32+
const {default: Q} = require('p-queue');
3233

3334
const writeFile = util.promisify(fs.writeFile);
3435
const readDir = util.promisify(fs.readdir);
@@ -236,7 +237,7 @@ export class Generator {
236237
const queue = new Q({concurrency: 10});
237238
console.log(`Generating ${apis.length} APIs...`);
238239
queue.addAll(
239-
apis.map(api => {
240+
apis.map((api: {[key: string]: string}) => {
240241
return async () => {
241242
this.log('Generating API for %s...', api.id);
242243
this.logResult(
@@ -365,7 +366,7 @@ export class Generator {
365366
fragment = fragment.replace(/`\*/gi, '`<');
366367
fragment = fragment.replace(/\*`/gi, '>`');
367368
const lines = fragment.split('\n');
368-
lines.forEach((line, i) => {
369+
lines.forEach((line: string, i: number) => {
369370
lines[i] = '*' + (line ? ' ' + lines[i] : '');
370371
});
371372
fragment = lines.join('\n');

0 commit comments

Comments
 (0)