Merge pull request #4612 from SimonSiefke/update-typescript-version
update typescript version to 5.1.6
This commit is contained in:
+12
-2
@@ -87,7 +87,12 @@
|
|||||||
],
|
],
|
||||||
"@typescript-eslint/naming-convention": [
|
"@typescript-eslint/naming-convention": [
|
||||||
"warn",
|
"warn",
|
||||||
{ "selector": "default", "format": ["camelCase"] },
|
{ "selector": "default", "format": ["camelCase"],
|
||||||
|
"filter": {
|
||||||
|
"regex": "^[a-z]",
|
||||||
|
"match": true
|
||||||
|
}
|
||||||
|
},
|
||||||
// variableLike
|
// variableLike
|
||||||
{ "selector": "variable", "format": ["camelCase", "UPPER_CASE"] },
|
{ "selector": "variable", "format": ["camelCase", "UPPER_CASE"] },
|
||||||
{ "selector": "variable", "filter": "^I.+Service$", "format": ["PascalCase"], "prefix": ["I"] },
|
{ "selector": "variable", "filter": "^I.+Service$", "format": ["PascalCase"], "prefix": ["I"] },
|
||||||
@@ -96,7 +101,12 @@
|
|||||||
{ "selector": "memberLike", "modifiers": ["protected"], "format": ["camelCase"], "leadingUnderscore": "require" },
|
{ "selector": "memberLike", "modifiers": ["protected"], "format": ["camelCase"], "leadingUnderscore": "require" },
|
||||||
{ "selector": "enumMember", "format": ["UPPER_CASE"] },
|
{ "selector": "enumMember", "format": ["UPPER_CASE"] },
|
||||||
// memberLike - Allow enum-like objects to use UPPER_CASE
|
// memberLike - Allow enum-like objects to use UPPER_CASE
|
||||||
{ "selector": "property", "modifiers": ["public"], "format": ["camelCase", "UPPER_CASE"] },
|
{ "selector": "property", "modifiers": ["public"], "format": ["camelCase", "UPPER_CASE"],
|
||||||
|
"filter": {
|
||||||
|
"regex": "^[a-z]",
|
||||||
|
"match": true
|
||||||
|
}
|
||||||
|
},
|
||||||
// restrict on* naming for events only
|
// restrict on* naming for events only
|
||||||
{ "selector": "method", "modifiers": ["public"], "format": ["camelCase", "UPPER_CASE"], "custom": {
|
{ "selector": "method", "modifiers": ["public"], "format": ["camelCase", "UPPER_CASE"], "custom": {
|
||||||
"regex": "^on[A-Z].+",
|
"regex": "^on[A-Z].+",
|
||||||
|
|||||||
+4
-4
@@ -62,12 +62,12 @@
|
|||||||
"@types/utf8": "^3.0.0",
|
"@types/utf8": "^3.0.0",
|
||||||
"@types/webpack": "^5.28.0",
|
"@types/webpack": "^5.28.0",
|
||||||
"@types/ws": "^8.2.0",
|
"@types/ws": "^8.2.0",
|
||||||
"@typescript-eslint/eslint-plugin": "^5.3.0",
|
"@typescript-eslint/eslint-plugin": "^6.2.00",
|
||||||
"@typescript-eslint/parser": "^5.3.0",
|
"@typescript-eslint/parser": "^6.2.00",
|
||||||
"chai": "^4.3.4",
|
"chai": "^4.3.4",
|
||||||
"cross-env": "^7.0.3",
|
"cross-env": "^7.0.3",
|
||||||
"deep-equal": "^2.0.5",
|
"deep-equal": "^2.0.5",
|
||||||
"eslint": "^8.1.0",
|
"eslint": "^8.45.0",
|
||||||
"eslint-plugin-jsdoc": "^39.3.6",
|
"eslint-plugin-jsdoc": "^39.3.6",
|
||||||
"express": "^4.17.1",
|
"express": "^4.17.1",
|
||||||
"express-ws": "^5.0.2",
|
"express-ws": "^5.0.2",
|
||||||
@@ -81,7 +81,7 @@
|
|||||||
"source-map-loader": "^3.0.0",
|
"source-map-loader": "^3.0.0",
|
||||||
"source-map-support": "^0.5.20",
|
"source-map-support": "^0.5.20",
|
||||||
"ts-loader": "^9.3.1",
|
"ts-loader": "^9.3.1",
|
||||||
"typescript": "4.7",
|
"typescript": "^5.1.6",
|
||||||
"utf8": "^3.0.0",
|
"utf8": "^3.0.0",
|
||||||
"webpack": "^5.61.0",
|
"webpack": "^5.61.0",
|
||||||
"webpack-cli": "^4.9.1",
|
"webpack-cli": "^4.9.1",
|
||||||
|
|||||||
@@ -1950,14 +1950,14 @@ describe('InputHandler', () => {
|
|||||||
inputHandler.onColor(ev => stack.push(ev));
|
inputHandler.onColor(ev => stack.push(ev));
|
||||||
// single color query
|
// single color query
|
||||||
await inputHandler.parseP('\x1b]4;0;?\x07');
|
await inputHandler.parseP('\x1b]4;0;?\x07');
|
||||||
assert.deepEqual(stack, [[{ type: ColorRequestType.REPORT, index: 0 }]]);
|
assert.deepEqual(stack, [[{ type: ColorRequestType.REPORT, index: 0 as ColorIndex }]]);
|
||||||
stack.length = 0;
|
stack.length = 0;
|
||||||
await inputHandler.parseP('\x1b]4;123;?\x07');
|
await inputHandler.parseP('\x1b]4;123;?\x07');
|
||||||
assert.deepEqual(stack, [[{ type: ColorRequestType.REPORT, index: 123 }]]);
|
assert.deepEqual(stack, [[{ type: ColorRequestType.REPORT, index: 123 as ColorIndex }]]);
|
||||||
stack.length = 0;
|
stack.length = 0;
|
||||||
// multiple queries
|
// multiple queries
|
||||||
await inputHandler.parseP('\x1b]4;0;?;123;?\x07');
|
await inputHandler.parseP('\x1b]4;0;?;123;?\x07');
|
||||||
assert.deepEqual(stack, [[{ type: ColorRequestType.REPORT, index: 0 }, { type: ColorRequestType.REPORT, index: 123 }]]);
|
assert.deepEqual(stack, [[{ type: ColorRequestType.REPORT, index: 0 as ColorIndex }, { type: ColorRequestType.REPORT, index: 123 as ColorIndex }]]);
|
||||||
stack.length = 0;
|
stack.length = 0;
|
||||||
});
|
});
|
||||||
it('4: set color events', async () => {
|
it('4: set color events', async () => {
|
||||||
@@ -1965,32 +1965,32 @@ describe('InputHandler', () => {
|
|||||||
inputHandler.onColor(ev => stack.push(ev));
|
inputHandler.onColor(ev => stack.push(ev));
|
||||||
// single color query
|
// single color query
|
||||||
await inputHandler.parseP('\x1b]4;0;rgb:01/02/03\x07');
|
await inputHandler.parseP('\x1b]4;0;rgb:01/02/03\x07');
|
||||||
assert.deepEqual(stack, [[{ type: ColorRequestType.SET, index: 0, color: [1, 2, 3] }]]);
|
assert.deepEqual(stack, [[{ type: ColorRequestType.SET, index: 0 as ColorIndex, color: [1, 2, 3] }]]);
|
||||||
stack.length = 0;
|
stack.length = 0;
|
||||||
await inputHandler.parseP('\x1b]4;123;#aabbcc\x07');
|
await inputHandler.parseP('\x1b]4;123;#aabbcc\x07');
|
||||||
assert.deepEqual(stack, [[{ type: ColorRequestType.SET, index: 123, color: [170, 187, 204] }]]);
|
assert.deepEqual(stack, [[{ type: ColorRequestType.SET, index: 123 as ColorIndex, color: [170, 187, 204] }]]);
|
||||||
stack.length = 0;
|
stack.length = 0;
|
||||||
// multiple queries
|
// multiple queries
|
||||||
await inputHandler.parseP('\x1b]4;0;rgb:aa/bb/cc;123;#001122\x07');
|
await inputHandler.parseP('\x1b]4;0;rgb:aa/bb/cc;123;#001122\x07');
|
||||||
assert.deepEqual(stack, [[{ type: ColorRequestType.SET, index: 0, color: [170, 187, 204] }, { type: ColorRequestType.SET, index: 123, color: [0, 17, 34] }]]);
|
assert.deepEqual(stack, [[{ type: ColorRequestType.SET, index: 0 as ColorIndex, color: [170, 187, 204] }, { type: ColorRequestType.SET, index: 123 as ColorIndex, color: [0, 17, 34] }]]);
|
||||||
stack.length = 0;
|
stack.length = 0;
|
||||||
});
|
});
|
||||||
it('4: should ignore invalid values', async () => {
|
it('4: should ignore invalid values', async () => {
|
||||||
const stack: IColorEvent[] = [];
|
const stack: IColorEvent[] = [];
|
||||||
inputHandler.onColor(ev => stack.push(ev));
|
inputHandler.onColor(ev => stack.push(ev));
|
||||||
await inputHandler.parseP('\x1b]4;0;rgb:aa/bb/cc;45;rgb:1/22/333;123;#001122\x07');
|
await inputHandler.parseP('\x1b]4;0;rgb:aa/bb/cc;45;rgb:1/22/333;123;#001122\x07');
|
||||||
assert.deepEqual(stack, [[{ type: ColorRequestType.SET, index: 0, color: [170, 187, 204] }, { type: ColorRequestType.SET, index: 123, color: [0, 17, 34] }]]);
|
assert.deepEqual(stack, [[{ type: ColorRequestType.SET, index: 0 as ColorIndex, color: [170, 187, 204] }, { type: ColorRequestType.SET, index: 123 as ColorIndex, color: [0, 17, 34] }]]);
|
||||||
stack.length = 0;
|
stack.length = 0;
|
||||||
});
|
});
|
||||||
it('104: restore events', async () => {
|
it('104: restore events', async () => {
|
||||||
const stack: IColorEvent[] = [];
|
const stack: IColorEvent[] = [];
|
||||||
inputHandler.onColor(ev => stack.push(ev));
|
inputHandler.onColor(ev => stack.push(ev));
|
||||||
await inputHandler.parseP('\x1b]104;0\x07\x1b]104;43\x07');
|
await inputHandler.parseP('\x1b]104;0\x07\x1b]104;43\x07');
|
||||||
assert.deepEqual(stack, [[{ type: ColorRequestType.RESTORE, index: 0 }], [{ type: ColorRequestType.RESTORE, index: 43 }]]);
|
assert.deepEqual(stack, [[{ type: ColorRequestType.RESTORE, index: 0 as ColorIndex }], [{ type: ColorRequestType.RESTORE, index: 43 as ColorIndex }]]);
|
||||||
stack.length = 0;
|
stack.length = 0;
|
||||||
// multiple in one command
|
// multiple in one command
|
||||||
await inputHandler.parseP('\x1b]104;0;43\x07');
|
await inputHandler.parseP('\x1b]104;0;43\x07');
|
||||||
assert.deepEqual(stack, [[{ type: ColorRequestType.RESTORE, index: 0 }, { type: ColorRequestType.RESTORE, index: 43 }]]);
|
assert.deepEqual(stack, [[{ type: ColorRequestType.RESTORE, index: 0 as ColorIndex }, { type: ColorRequestType.RESTORE, index: 43 as ColorIndex }]]);
|
||||||
stack.length = 0;
|
stack.length = 0;
|
||||||
// full ANSI table restore
|
// full ANSI table restore
|
||||||
await inputHandler.parseP('\x1b]104\x07');
|
await inputHandler.parseP('\x1b]104\x07');
|
||||||
|
|||||||
Reference in New Issue
Block a user