Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to TypeScript 4.1.3 #9476

Merged
merged 9 commits into from
Dec 17, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion builder/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
"@types/node": "^14.6.1",
"@types/supports-color": "^5.3.0",
"rimraf": "~3.0.0",
"typescript": "~4.0.2"
"typescript": "~4.1.3"
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 1 addition & 1 deletion buildutils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"prettier": "^2.1.1",
"semver": "^7.3.2",
"sort-package-json": "~1.44.0",
"typescript": "~4.0.2"
"typescript": "~4.1.3"
},
"devDependencies": {
"@types/fs-extra": "^9.0.1",
Expand Down
2 changes: 0 additions & 2 deletions buildutils/src/ensure-package.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,6 @@ export async function ensurePackage(
if (fs.existsSync(path.join(pkgPath, 'typedoc.json'))) {
const name = data.name.split('/');
utils.writeJSONFile(path.join(pkgPath, 'typedoc.json'), {
excludeNotExported: true,
mode: 'file',
out: `../../docs/api/${name[name.length - 1]}`,
theme: '../../typedoc-theme'
});
Expand Down
2 changes: 1 addition & 1 deletion buildutils/src/get-dependency.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import * as path from 'path';
import * as utils from './utils';
import packageJson = require('package-json');
import packageJson from 'package-json';

let allDeps: string[] = [];
let allDevDeps: string[] = [];
Expand Down
21 changes: 9 additions & 12 deletions buildutils/src/utils.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import path = require('path');
import glob = require('glob');
import fs = require('fs-extra');
import childProcess = require('child_process');
import path from 'path';
import glob from 'glob';
import fs from 'fs-extra';
import childProcess from 'child_process';
import { DepGraph } from 'dependency-graph';
import sortPackageJson = require('sort-package-json');
import coreutils = require('@lumino/coreutils');
import sortPackageJson from 'sort-package-json';
import { JSONExt, JSONObject } from '@lumino/coreutils';

type Dict<T> = { [key: string]: T };

Expand Down Expand Up @@ -60,7 +60,7 @@ export function getCorePaths(): string[] {
*/
export function writePackageData(
pkgJsonPath: string,
data: coreutils.JSONObject
data: JSONObject
): boolean {
const text = JSON.stringify(sortPackageJson(data), null, 2) + '\n';
const orig = fs.readFileSync(pkgJsonPath, 'utf8').split('\r\n').join('\n');
Expand All @@ -85,10 +85,7 @@ export function readJSONFile(filePath: string): any {
/**
* Write a json file.
*/
export function writeJSONFile(
filePath: string,
data: coreutils.JSONObject
): boolean {
export function writeJSONFile(filePath: string, data: JSONObject): boolean {
function sortObjByKey(value: any): any {
// https://stackoverflow.com/a/35810961
return typeof value === 'object'
Expand All @@ -110,7 +107,7 @@ export function writeJSONFile(
} catch (e) {
// no-op
}
if (!coreutils.JSONExt.deepEqual(data, orig)) {
if (!JSONExt.deepEqual(data, orig)) {
fs.writeFileSync(filePath, text, 'utf8');
return true;
}
Expand Down
2 changes: 1 addition & 1 deletion buildutils/template/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"jest": "^26.4.2",
"rimraf": "~3.0.0",
"ts-jest": "^26.3.0",
"typescript": "~4.0.2"
"typescript": "~4.1.3"
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 1 addition & 1 deletion examples/cell/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"rimraf": "~3.0.0",
"style-loader": "~2.0.0",
"svg-url-loader": "~6.0.0",
"typescript": "~4.0.2",
"typescript": "~4.1.3",
"url-loader": "~4.1.0",
"watch": "~1.0.2",
"webpack": "^5.3.1",
Expand Down
2 changes: 1 addition & 1 deletion examples/console/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"raw-loader": "~4.0.0",
"rimraf": "~3.0.0",
"style-loader": "~2.0.0",
"typescript": "~4.0.2",
"typescript": "~4.1.3",
"url-loader": "~4.1.0",
"watch": "~1.0.2",
"webpack": "^5.3.1",
Expand Down
2 changes: 1 addition & 1 deletion examples/filebrowser/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"rimraf": "~3.0.0",
"style-loader": "~2.0.0",
"svg-url-loader": "~6.0.0",
"typescript": "~4.0.2",
"typescript": "~4.1.3",
"url-loader": "~4.1.0",
"watch": "~1.0.2",
"webpack": "^5.3.1",
Expand Down
2 changes: 1 addition & 1 deletion examples/notebook/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"rimraf": "~3.0.0",
"style-loader": "~2.0.0",
"svg-url-loader": "~6.0.0",
"typescript": "~4.0.2",
"typescript": "~4.1.3",
"url-loader": "~4.1.0",
"watch": "~1.0.2",
"webpack": "^5.3.1",
Expand Down
2 changes: 1 addition & 1 deletion examples/terminal/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"rimraf": "~3.0.0",
"style-loader": "~2.0.0",
"svg-url-loader": "~6.0.0",
"typescript": "~4.0.2",
"typescript": "~4.1.3",
"url-loader": "~4.1.0",
"watch": "~1.0.2",
"webpack": "^5.3.1",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
"lint-staged": "^10.2.13",
"prettier": "^2.1.1",
"shell-quote": "^1.7.2",
"typedoc": "0.17.0-3",
"typedoc": "~0.20.0-beta.27",
"yarn": "1.21.1"
}
}
4 changes: 2 additions & 2 deletions packages/application-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@
},
"devDependencies": {
"rimraf": "~3.0.0",
"typedoc": "0.17.0-3",
"typescript": "~4.0.2"
"typedoc": "~0.20.0-beta.27",
"typescript": "~4.1.3"
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 0 additions & 2 deletions packages/application-extension/typedoc.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
{
"excludeNotExported": true,
"mode": "file",
"out": "../../docs/api/application-extension",
"theme": "../../typedoc-theme"
}
4 changes: 2 additions & 2 deletions packages/application/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@
"jest": "^26.4.2",
"rimraf": "~3.0.0",
"ts-jest": "^26.3.0",
"typedoc": "0.17.0-3",
"typescript": "~4.0.2"
"typedoc": "~0.20.0-beta.27",
"typescript": "~4.1.3"
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 0 additions & 2 deletions packages/application/typedoc.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
{
"excludeNotExported": true,
"mode": "file",
"out": "../../docs/api/application",
"theme": "../../typedoc-theme"
}
4 changes: 2 additions & 2 deletions packages/apputils-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@
},
"devDependencies": {
"rimraf": "~3.0.0",
"typedoc": "0.17.0-3",
"typescript": "~4.0.2"
"typedoc": "~0.20.0-beta.27",
"typescript": "~4.1.3"
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 0 additions & 2 deletions packages/apputils-extension/typedoc.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
{
"excludeNotExported": true,
"mode": "file",
"out": "../../docs/api/apputils-extension",
"theme": "../../typedoc-theme"
}
4 changes: 2 additions & 2 deletions packages/apputils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@
"jest": "^26.4.2",
"rimraf": "~3.0.0",
"ts-jest": "^26.3.0",
"typedoc": "0.17.0-3",
"typescript": "~4.0.2"
"typedoc": "~0.20.0-beta.27",
"typescript": "~4.1.3"
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 0 additions & 2 deletions packages/apputils/typedoc.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
{
"excludeNotExported": true,
"mode": "file",
"out": "../../docs/api/apputils",
"theme": "../../typedoc-theme"
}
4 changes: 2 additions & 2 deletions packages/attachments/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@
},
"devDependencies": {
"rimraf": "~3.0.0",
"typedoc": "0.17.0-3",
"typescript": "~4.0.2"
"typedoc": "~0.20.0-beta.27",
"typescript": "~4.1.3"
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 0 additions & 2 deletions packages/attachments/typedoc.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
{
"excludeNotExported": true,
"mode": "file",
"out": "../../docs/api/attachments",
"theme": "../../typedoc-theme"
}
4 changes: 2 additions & 2 deletions packages/cells/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@
"jest": "^26.4.2",
"rimraf": "~3.0.0",
"ts-jest": "^26.3.0",
"typedoc": "0.17.0-3",
"typescript": "~4.0.2"
"typedoc": "~0.20.0-beta.27",
"typescript": "~4.1.3"
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 0 additions & 2 deletions packages/cells/typedoc.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
{
"excludeNotExported": true,
"mode": "file",
"out": "../../docs/api/cells",
"theme": "../../typedoc-theme"
}
2 changes: 1 addition & 1 deletion packages/celltags-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"devDependencies": {
"@types/node": "^14.6.1",
"rimraf": "~3.0.0",
"typescript": "~4.0.2"
"typescript": "~4.1.3"
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 1 addition & 1 deletion packages/celltags/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"devDependencies": {
"@types/node": "^14.6.1",
"rimraf": "~3.0.0",
"typescript": "~4.0.2"
"typescript": "~4.1.3"
},
"publishConfig": {
"access": "public"
Expand Down
4 changes: 2 additions & 2 deletions packages/codeeditor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@
"jest": "^26.4.2",
"rimraf": "~3.0.0",
"ts-jest": "^26.3.0",
"typedoc": "0.17.0-3",
"typescript": "~4.0.2"
"typedoc": "~0.20.0-beta.27",
"typescript": "~4.1.3"
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 0 additions & 2 deletions packages/codeeditor/typedoc.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
{
"excludeNotExported": true,
"mode": "file",
"out": "../../docs/api/codeeditor",
"theme": "../../typedoc-theme"
}
4 changes: 2 additions & 2 deletions packages/codemirror-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@
},
"devDependencies": {
"rimraf": "~3.0.0",
"typedoc": "0.17.0-3",
"typescript": "~4.0.2"
"typedoc": "~0.20.0-beta.27",
"typescript": "~4.1.3"
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 0 additions & 2 deletions packages/codemirror-extension/typedoc.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
{
"excludeNotExported": true,
"mode": "file",
"out": "../../docs/api/codemirror-extension",
"theme": "../../typedoc-theme"
}
4 changes: 2 additions & 2 deletions packages/codemirror/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@
"jest": "^26.4.2",
"rimraf": "~3.0.0",
"ts-jest": "^26.3.0",
"typedoc": "0.17.0-3",
"typescript": "~4.0.2"
"typedoc": "~0.20.0-beta.27",
"typescript": "~4.1.3"
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 1 addition & 1 deletion packages/codemirror/src/mode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ export namespace Mode {
*/
export function findByExtension(ext: string | string[]): ISpec | null {
if (typeof ext === 'string') {
return CodeMirror.findModeByExtension(name);
return CodeMirror.findModeByExtension(ext);
}
for (let i = 0; i < ext.length; i++) {
const mode = CodeMirror.findModeByExtension(ext[i]);
Expand Down
2 changes: 0 additions & 2 deletions packages/codemirror/typedoc.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
{
"excludeNotExported": true,
"mode": "file",
"out": "../../docs/api/codemirror",
"theme": "../../typedoc-theme"
}
4 changes: 2 additions & 2 deletions packages/completer-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@
},
"devDependencies": {
"rimraf": "~3.0.0",
"typedoc": "0.17.0-3",
"typescript": "~4.0.2"
"typedoc": "~0.20.0-beta.27",
"typescript": "~4.1.3"
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 0 additions & 2 deletions packages/completer-extension/typedoc.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
{
"excludeNotExported": true,
"mode": "file",
"out": "../../docs/api/completer-extension",
"theme": "../../typedoc-theme"
}
4 changes: 2 additions & 2 deletions packages/completer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@
"jest": "^26.4.2",
"rimraf": "~3.0.0",
"ts-jest": "^26.3.0",
"typedoc": "0.17.0-3",
"typescript": "~4.0.2"
"typedoc": "~0.20.0-beta.27",
"typescript": "~4.1.3"
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 0 additions & 2 deletions packages/completer/typedoc.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
{
"excludeNotExported": true,
"mode": "file",
"out": "../../docs/api/completer",
"theme": "../../typedoc-theme"
}
4 changes: 2 additions & 2 deletions packages/console-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@
},
"devDependencies": {
"rimraf": "~3.0.0",
"typedoc": "0.17.0-3",
"typescript": "~4.0.2"
"typedoc": "~0.20.0-beta.27",
"typescript": "~4.1.3"
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 0 additions & 2 deletions packages/console-extension/typedoc.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
{
"excludeNotExported": true,
"mode": "file",
"out": "../../docs/api/console-extension",
"theme": "../../typedoc-theme"
}
4 changes: 2 additions & 2 deletions packages/console/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@
"jest": "^26.4.2",
"rimraf": "~3.0.0",
"ts-jest": "^26.3.0",
"typedoc": "0.17.0-3",
"typescript": "~4.0.2"
"typedoc": "~0.20.0-beta.27",
"typescript": "~4.1.3"
},
"publishConfig": {
"access": "public"
Expand Down