Merge branch 'master' into feature/lint-with-putout

This commit is contained in:
coderaiser
2021-05-15 01:24:29 +03:00
committed by GitHub
9 changed files with 1502 additions and 1566 deletions
+1 -1
View File
@@ -43,7 +43,7 @@
"@typescript-eslint/array-type": [
"warn",
{
"default": "array-simple",
"default": "array",
"readonly": "generic"
}
],
+12 -3
View File
@@ -15,6 +15,15 @@ interface IFontMetadata {
blob: () => Promise<Blob>;
}
interface IFontAccessNavigator {
fonts: {
query: () => Promise<IFontMetadata[]>;
};
permissions: {
request?: (permission: { name: string }) => Promise<{state: string}>;
};
}
let fontsPromise: Promise<FontList | Record<string, IFontMetadata[]>> | undefined = undefined;
/**
@@ -28,7 +37,7 @@ export default async function load(fontFamily: string, cacheSize: number): Promi
// Web environment that supports font access API
if (typeof navigator !== 'undefined' && 'fonts' in navigator) {
try {
const status = await (navigator as any).permissions.request?.({
const status = await (navigator as IFontAccessNavigator).permissions.request?.({
name: 'local-fonts'
});
if (status && status.state !== 'granted') {
@@ -44,8 +53,8 @@ export default async function load(fontFamily: string, cacheSize: number): Promi
}
const fonts: Record<string, IFontMetadata[]> = {};
try {
const fontsIterator: AsyncIterableIterator<IFontMetadata> = (navigator as any).fonts.query();
for await (const metadata of fontsIterator) {
const fontsIterator = await (navigator as IFontAccessNavigator).fonts.query();
for (const metadata of fontsIterator) {
if (!fonts.hasOwnProperty(metadata.family)) {
fonts[metadata.family] = [];
}
@@ -35,7 +35,7 @@ perfContext('Terminal: sh -c "dd if=/dev/urandom count=40 bs=1k | hexdump | lolc
chunks.push(data as unknown as Buffer);
length += data.length;
});
await new Promise(resolve => p.on('exit', () => resolve()));
await new Promise<void>(resolve => p.on('exit', () => resolve()));
contentUtf8 = Buffer.concat(chunks, length);
// translate to content string
const buffer = new Uint32Array(contentUtf8.length);
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "xterm-addon-webgl",
"version": "0.11.0",
"version": "0.11.1",
"author": {
"name": "The xterm.js authors",
"url": "https://xtermjs.org/"
+1 -2
View File
@@ -3,8 +3,7 @@
* @license MIT
*/
import { IEvent } from 'node-pty';
import { Terminal, ITerminalAddon } from 'xterm';
import { Terminal, ITerminalAddon, IEvent } from 'xterm';
declare module 'xterm-addon-webgl' {
/**
+7 -7
View File
@@ -10,7 +10,7 @@ jobs:
steps:
- task: NodeTool@0
inputs:
versionSpec: '10.x'
versionSpec: '14.x'
displayName: 'Install Node.js'
- task: YarnInstaller@3
inputs:
@@ -43,7 +43,7 @@ jobs:
steps:
- task: NodeTool@0
inputs:
versionSpec: '10.x'
versionSpec: '14.x'
displayName: 'Install Node.js'
- task: CacheBeta@1
inputs:
@@ -63,7 +63,7 @@ jobs:
steps:
- task: NodeTool@0
inputs:
versionSpec: '10.x'
versionSpec: '14.x'
displayName: 'Install Node.js'
- task: CacheBeta@1
inputs:
@@ -92,7 +92,7 @@ jobs:
displayName: Install required packages
- task: NodeTool@0
inputs:
versionSpec: '10.x'
versionSpec: '14.x'
displayName: 'Install Node.js'
- task: YarnInstaller@3
inputs:
@@ -111,7 +111,7 @@ jobs:
steps:
- task: NodeTool@0
inputs:
versionSpec: '10.x'
versionSpec: '14.x'
displayName: 'Install Node.js'
- script: yarn --frozen-lockfile
displayName: 'Install dependencies and build'
@@ -128,7 +128,7 @@ jobs:
steps:
- task: NodeTool@0
inputs:
versionSpec: '10.x'
versionSpec: '14.x'
displayName: 'Install Node.js'
- script: yarn --frozen-lockfile
displayName: 'Install dependencies and build'
@@ -151,7 +151,7 @@ jobs:
steps:
- task: NodeTool@0
inputs:
versionSpec: '10.x'
versionSpec: '14.x'
displayName: 'Install Node.js'
- task: YarnInstaller@3
inputs:
+24 -24
View File
@@ -34,37 +34,37 @@
"vtfeatures": "node bin/extract_vtfeatures.js src/**/*.ts src/*.ts"
},
"devDependencies": {
"@types/chai": "^4.2.14",
"@types/chai": "^4.2.18",
"@types/debug": "^4.1.5",
"@types/deep-equal": "^1.0.1",
"@types/glob": "^7.1.3",
"@types/jsdom": "^16.2.5",
"@types/mocha": "^8.0.3",
"@types/node": "^10.17.17",
"@types/jsdom": "^16.2.10",
"@types/mocha": "^8.2.2",
"@types/node": "^14.14.44",
"@types/utf8": "^2.1.6",
"@types/webpack": "^4.41.24",
"@types/ws": "^7.2.9",
"@typescript-eslint/eslint-plugin": "^4.0.0",
"@typescript-eslint/parser": "^3.10.1",
"chai": "^4.2.0",
"deep-equal": "^2.0.4",
"eslint": "^7.12.1",
"@types/webpack": "^5.28.0",
"@types/ws": "^7.4.4",
"@typescript-eslint/eslint-plugin": "^4.23.0",
"@typescript-eslint/parser": "^4.23.0",
"chai": "^4.3.4",
"deep-equal": "^2.0.5",
"eslint": "^7.26.0",
"express": "^4.17.1",
"express-ws": "^4.0.0",
"glob": "^7.0.5",
"jsdom": "^16.4.0",
"mocha": "^8.2.1",
"mustache": "^4.0.1",
"node-pty": "^0.9.0",
"glob": "^7.1.7",
"jsdom": "^16.5.3",
"mocha": "^8.4.0",
"mustache": "^4.2.0",
"node-pty": "^0.10.1",
"nyc": "^15.1.0",
"playwright": "^1.5.2",
"source-map-loader": "^1.1.2",
"ts-loader": "^8.0.8",
"typescript": "4.0",
"playwright": "^1.11.0",
"source-map-loader": "^2.0.1",
"ts-loader": "^9.1.2",
"typescript": "^4.2.4",
"utf8": "^3.0.0",
"webpack": "^5.4.0",
"webpack-cli": "^4.2.0",
"ws": "^7.3.1",
"xterm-benchmark": "^0.1.3"
"webpack": "^5.37.0",
"webpack-cli": "^4.7.0",
"ws": "^7.4.5",
"xterm-benchmark": "^0.2.1"
}
}
+1 -1
View File
@@ -73,7 +73,7 @@ describe('Escape Sequence Files', function(): void {
// register handler to trigger viewport scraping, wait for it to finish
let content = '';
const OSC_CODE = 12345;
await new Promise(resolve => {
await new Promise<void>(resolve => {
customHandler = term.registerOscHandler(OSC_CODE, () => {
// grab terminal viewport content
content = terminalToString(term);
+1454 -1526
View File
File diff suppressed because it is too large Load Diff