Switch to Node.js 16 LTS, upgrade TypeScript, ESLint, and other dependencies (#395)

* Upgrade TypeScript, ESLint, and other dependencies

This also cleans up various other files where newer ESLint rules complained

* Set CI and CD to use Node.js version 16

* Small tweak

* Fix CD version printing

* Add nvm version for Cloudflare Pages
This commit is contained in:
Keavon Chambers
2021-11-29 03:32:09 -08:00
parent 0e33498b9b
commit fa64cfad4b
19 changed files with 19349 additions and 2660 deletions
+1 -1
View File
@@ -17,7 +17,7 @@ export function panicProxy<T extends object>(module: T): T {
return function (...args: any) {
let result;
try {
// @ts-expect-error
// @ts-expect-error TypeScript does not know what `this` is, since it should be able to be anything
result = targetValue.apply(this, args);
} catch (err: any) {
// Suppress `unreachable` WebAssembly.RuntimeError exceptions
+18 -7
View File
@@ -98,16 +98,25 @@ function parseResponse(responseType: string, data: any): Response {
}
export type Response =
| DocumentChanged
| DisplayFolderTreeStructure
| SetActiveTool
| SetActiveDocument
| UpdateOpenDocumentsList
| UpdateCanvas
| UpdateScrollbars
| UpdateRulers
| UpdateLayer
| DocumentChanged
| DisplayFolderTreeStructure
| UpdateWorkingColors
| SetCanvasZoom
| SetCanvasRotation;
| SetCanvasRotation
| ExportDocument
| SaveDocument
| OpenDocumentBrowse
| UpdateWorkingColors
| DisplayError
| DisplayPanic
| DisplayConfirmationToCloseDocument
| DisplayConfirmationToCloseAllDocuments;
export interface UpdateOpenDocumentsList {
open_documents: Array<string>;
@@ -191,7 +200,9 @@ function newDisplayConfirmationToCloseDocument(input: any): DisplayConfirmationT
};
}
function newDisplayConfirmationToCloseAllDocuments(_input: any): {} {
export type DisplayConfirmationToCloseAllDocuments = Record<string, never>;
function newDisplayConfirmationToCloseAllDocuments(_input: any): DisplayConfirmationToCloseAllDocuments {
return {};
}
@@ -252,12 +263,12 @@ function newSaveDocument(input: any): SaveDocument {
};
}
export type OpenDocumentBrowse = {};
export type OpenDocumentBrowse = Record<string, never>;
function newOpenDocumentBrowse(_: any): OpenDocumentBrowse {
return {};
}
export type DocumentChanged = {};
export type DocumentChanged = Record<string, never>;
function newDocumentChanged(_: any): DocumentChanged {
return {};
}