diff --git a/CHANGELOG.md b/CHANGELOG.md index ab35f5a17..96a101d7f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## [24.3.4](https://github.com/jest-community/eslint-plugin-jest/compare/v24.3.3...v24.3.4) (2021-04-05) + + +### Bug Fixes + +* support all variations of `describe`, `it`, & `test` ([#792](https://github.com/jest-community/eslint-plugin-jest/issues/792)) ([0968b55](https://github.com/jest-community/eslint-plugin-jest/commit/0968b557dd9cdb5cfcaf8a0d84e8a456825e6b25)) + ## [24.3.3](https://github.com/jest-community/eslint-plugin-jest/compare/v24.3.2...v24.3.3) (2021-04-02) diff --git a/package.json b/package.json index f4001bfdd..46927e758 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "eslint-plugin-jest", - "version": "24.3.3", + "version": "24.3.4", "description": "Eslint rules for Jest", "keywords": [ "eslint", diff --git a/src/rules/__tests__/consistent-test-it.test.ts b/src/rules/__tests__/consistent-test-it.test.ts index 9fc950da3..028177b56 100644 --- a/src/rules/__tests__/consistent-test-it.test.ts +++ b/src/rules/__tests__/consistent-test-it.test.ts @@ -213,6 +213,32 @@ ruleTester.run('consistent-test-it with fn=test', rule, { }, ], }, + { + code: dedent` + describe.only.each()("%s", () => { + test("is valid, but should not be", () => {}); + + it("is not valid, but should be", () => {}); + }); + `, + output: dedent` + describe.only.each()("%s", () => { + it("is valid, but should not be", () => {}); + + it("is not valid, but should be", () => {}); + }); + `, + options: [{ fn: TestCaseName.test, withinDescribe: TestCaseName.it }], + errors: [ + { + messageId: 'consistentMethodWithinDescribe', + data: { + testKeywordWithinDescribe: TestCaseName.it, + oppositeTestKeyword: TestCaseName.test, + }, + }, + ], + }, { code: 'describe("suite", () => { it("foo") })', output: 'describe("suite", () => { test("foo") })', diff --git a/src/rules/__tests__/lowercase-name.test.ts b/src/rules/__tests__/lowercase-name.test.ts index 9c608ea0d..31fbbf54c 100644 --- a/src/rules/__tests__/lowercase-name.test.ts +++ b/src/rules/__tests__/lowercase-name.test.ts @@ -52,6 +52,10 @@ ruleTester.run('lowercase-name', rule, { 'describe(function () {})', 'describe(``)', 'describe("")', + dedent` + describe.each()(1); + describe.each()(2); + `, 'describe(42)', { code: 'describe(42)', diff --git a/src/rules/__tests__/no-conditional-expect.test.ts b/src/rules/__tests__/no-conditional-expect.test.ts index 1b294ea8e..b611d33fb 100644 --- a/src/rules/__tests__/no-conditional-expect.test.ts +++ b/src/rules/__tests__/no-conditional-expect.test.ts @@ -143,6 +143,14 @@ ruleTester.run('logical conditions', rule, { `, errors: [{ messageId: 'conditionalExpect' }], }, + { + code: ` + it.each\`\`('foo', () => { + something || expect(something).toHaveBeenCalled(); + }) + `, + errors: [{ messageId: 'conditionalExpect' }], + }, { code: ` function getValue() { @@ -202,6 +210,14 @@ ruleTester.run('conditional conditions', rule, { `, errors: [{ messageId: 'conditionalExpect' }], }, + { + code: ` + it.each\`\`('foo', () => { + something ? noop() : expect(something).toHaveBeenCalled(); + }) + `, + errors: [{ messageId: 'conditionalExpect' }], + }, { code: ` function getValue() { @@ -275,6 +291,19 @@ ruleTester.run('switch conditions', rule, { `, errors: [{ messageId: 'conditionalExpect' }], }, + { + code: ` + it.each\`\`('foo', () => { + switch(something) { + case 'value': + expect(something).toHaveBeenCalled(); + default: + break; + } + }) + `, + errors: [{ messageId: 'conditionalExpect' }], + }, { code: ` function getValue() { @@ -343,6 +372,18 @@ ruleTester.run('if conditions', rule, { `, errors: [{ messageId: 'conditionalExpect' }], }, + { + code: ` + it.each\`\`('foo', () => { + if(!doSomething) { + // do nothing + } else { + expect(something).toHaveBeenCalled(); + } + }) + `, + errors: [{ messageId: 'conditionalExpect' }], + }, { code: ` function getValue() { @@ -438,6 +479,30 @@ ruleTester.run('catch conditions', rule, { `, errors: [{ messageId: 'conditionalExpect' }], }, + { + code: ` + it.each\`\`('foo', () => { + try { + + } catch (err) { + expect(err).toMatch('Error'); + } + }) + `, + errors: [{ messageId: 'conditionalExpect' }], + }, + { + code: ` + it.skip.each\`\`('foo', () => { + try { + + } catch (err) { + expect(err).toMatch('Error'); + } + }) + `, + errors: [{ messageId: 'conditionalExpect' }], + }, { code: ` function getValue() { diff --git a/src/rules/__tests__/no-export.test.ts b/src/rules/__tests__/no-export.test.ts index 3e56e91f4..e6cc6f356 100644 --- a/src/rules/__tests__/no-export.test.ts +++ b/src/rules/__tests__/no-export.test.ts @@ -1,4 +1,5 @@ import { TSESLint } from '@typescript-eslint/experimental-utils'; +import dedent from 'dedent'; import resolveFrom from 'resolve-from'; import rule from '../no-export'; @@ -23,7 +24,40 @@ ruleTester.run('no-export', rule, { invalid: [ { code: - 'export const myThing = "invalid"; test("a test", () => { expect(1).toBe(1);});', + 'export const myThing = "invalid"; test("a test", () => { expect(1).toBe(1);});', + parserOptions: { sourceType: 'module' }, + errors: [{ endColumn: 34, column: 1, messageId: 'unexpectedExport' }], + }, + { + code: dedent` + export const myThing = 'invalid'; + + test.each()('my code', () => { + expect(1).toBe(1); + }); + `, + parserOptions: { sourceType: 'module' }, + errors: [{ endColumn: 34, column: 1, messageId: 'unexpectedExport' }], + }, + { + code: dedent` + export const myThing = 'invalid'; + + test.each\`\`('my code', () => { + expect(1).toBe(1); + }); + `, + parserOptions: { sourceType: 'module' }, + errors: [{ endColumn: 34, column: 1, messageId: 'unexpectedExport' }], + }, + { + code: dedent` + export const myThing = 'invalid'; + + test.only.each\`\`('my code', () => { + expect(1).toBe(1); + }); + `, parserOptions: { sourceType: 'module' }, errors: [{ endColumn: 34, column: 1, messageId: 'unexpectedExport' }], }, diff --git a/src/rules/__tests__/no-identical-title.test.ts b/src/rules/__tests__/no-identical-title.test.ts index ee63925f6..6285c376f 100644 --- a/src/rules/__tests__/no-identical-title.test.ts +++ b/src/rules/__tests__/no-identical-title.test.ts @@ -12,224 +12,233 @@ const ruleTester = new TSESLint.RuleTester({ ruleTester.run('no-identical-title', rule, { valid: [ - [ - 'describe("describe", function() {', - ' it("it", function() {});', - '});', - ].join('\n'), - ['describe();describe();'].join('\n'), - ['it();it();'].join('\n'), - [ - 'describe("describe1", function() {', - ' it("it1", function() {});', - ' it("it2", function() {});', - '});', - ].join('\n'), - ['it("it1", function() {});', 'it("it2", function() {});'].join('\n'), - [ - 'it.concurrent("it1", function() {});', - 'it.concurrent("it2", function() {});', - ].join('\n'), - ['it.only("it1", function() {});', 'it("it2", function() {});'].join('\n'), - ['it.only("it1", function() {});', 'it.only("it2", function() {});'].join( - '\n', - ), - [ - 'it.concurrent.only("it1", function() {});', - 'it.concurrent("it2", function() {});', - ].join('\n'), - [ - 'it.concurrent.only("it1", function() {});', - 'it.concurrent.only("it2", function() {});', - ].join('\n'), - ['describe("title", function() {});', 'it("title", function() {});'].join( - '\n', - ), - [ - 'describe("describe1", function() {', - ' it("it1", function() {});', - ' describe("describe2", function() {', - ' it("it1", function() {});', - ' });', - '});', - ].join('\n'), - [ - 'describe("describe1", function() {', - ' describe("describe2", function() {', - ' it("it1", function() {});', - ' });', - ' it("it1", function() {});', - '});', - ].join('\n'), - [ - 'describe("describe1", function() {', - ' describe("describe2", function() {});', - '});', - ].join('\n'), - [ - 'describe("describe1", function() {', - ' describe("describe2", function() {});', - '});', - 'describe("describe2", function() {});', - ].join('\n'), - [ - 'describe("describe1", function() {});', - 'describe("describe2", function() {});', - ].join('\n'), - ['it("it" + n, function() {});', 'it("it" + n, function() {});'].join('\n'), - ['it(`it${n}`, function() {});', 'it(`it${n}`, function() {});'].join('\n'), + 'it(); it();', + 'describe(); describe();', + 'describe("foo", () => {}); it("foo", () => {});', + dedent` + describe("foo", () => { + it("works", () => {}); + }); + `, + dedent` + it('one', () => {}); + it('two', () => {}); + `, + dedent` + describe('foo', () => {}); + describe('foe', () => {}); + `, + dedent` + it(\`one\`, () => {}); + it(\`two\`, () => {}); + `, + dedent` + describe(\`foo\`, () => {}); + describe(\`foe\`, () => {}); + `, + dedent` + describe('foo', () => { + test('this', () => {}); + test('that', () => {}); + }); + `, + dedent` + test.concurrent('this', () => {}); + test.concurrent('that', () => {}); + `, + dedent` + test.concurrent('this', () => {}); + test.only.concurrent('that', () => {}); + `, + dedent` + test.only.concurrent('this', () => {}); + test.concurrent('that', () => {}); + `, + dedent` + test.only.concurrent('this', () => {}); + test.only.concurrent('that', () => {}); + `, + dedent` + test.concurrent.only('this', () => {}); + test.concurrent.only('that', () => {}); + `, + dedent` + describe('foo', () => { + it('works', () => {}); + + describe('foe', () => { + it('works', () => {}); + }); + }); + `, + dedent` + describe('foo', () => { + describe('foe', () => { + it('works', () => {}); + }); + + it('works', () => {}); + }); + `, + "describe('foo', () => describe('foe', () => {}));", + dedent` + describe('foo', () => { + describe('foe', () => {}); + }); + + describe('foe', () => {}); + `, + 'test("number" + n, function() {});', + 'test("number" + n, function() {}); test("number" + n, function() {});', 'it(`${n}`, function() {});', - [ - 'describe("title " + foo, function() {', - ' describe("describe1", function() {});', - '});', - 'describe("describe1", function() {});', - ].join('\n'), - [ - 'describe("describe1", function() {', - ' describe("describe2", function() {});', - ' describe("title " + foo, function() {', - ' describe("describe2", function() {});', - ' });', - '});', - ].join('\n'), - [ - 'describe("describe", () => {', - ' it(`testing ${someVar} with the same title`, () => {});', - ' it(`testing ${someVar} with the same title`, () => {});', - '});', - ].join('\n'), - ['it(`it1`, () => {});', 'it(`it2`, () => {});'].join('\n'), - [ - 'describe(`describe1`, () => {});', - 'describe(`describe2`, () => {});', - ].join('\n'), - [ - 'const test = { content: () => "foo" }', - 'test.content(`testing backticks with the same title`);', - 'test.content(`testing backticks with the same title`);', - ].join('\n'), - [ - 'const describe = { content: () => "foo" }', - 'describe.content(`testing backticks with the same title`);', - 'describe.content(`testing backticks with the same title`);', - ].join('\n'), - dedent` - describe.each\` - description - ${'b'} - \`("$description", () => {}) + 'it(`${n}`, function() {}); it(`${n}`, function() {});', + dedent` + describe('a class named ' + myClass.name, () => { + describe('#myMethod', () => {}); + }); + + describe('something else', () => {}); + `, + dedent` + describe('my class', () => { + describe('#myMethod', () => {}); + describe('a class named ' + myClass.name, () => {}); + }); + `, + dedent` + describe("foo", () => { + it(\`ignores $\{someVar} with the same title\`, () => {}); + it(\`ignores $\{someVar} with the same title\`, () => {}); + }); + `.replace(/\\\{/u, '{'), + dedent` + const test = { content: () => "foo" }; + test.content(\`something that is not from jest\`, () => {}); + test.content(\`something that is not from jest\`, () => {}); + `, + dedent` + const describe = { content: () => "foo" }; + describe.content(\`something that is not from jest\`, () => {}); + describe.content(\`something that is not from jest\`, () => {}); + `, + dedent` + describe.each\` + description + ${'b'} + \`('$description', () => {}); - describe.each\` - description - ${'a'} - \`("$description", () => {}) + describe.each\` + description + ${'a'} + \`('$description', () => {}); `, dedent` - describe("top level", () => { - describe.each\`\`("nested each", () => { - describe.each\`\`("nested nested each", () => {}) - }) + describe('top level', () => { + describe.each\`\`('nested each', () => { + describe.each\`\`('nested nested each', () => {}); + }); - describe("nested", () => {}) - }) + describe('nested', () => {}); + }); `, ], invalid: [ { - code: [ - 'describe("describe1", function() {', - ' it("it1", function() {});', - ' it("it1", function() {});', - '});', - ].join('\n'), - errors: [{ messageId: 'multipleTestTitle', column: 7, line: 3 }], + code: dedent` + describe('foo', () => { + it('works', () => {}); + it('works', () => {}); + }); + `, + errors: [{ messageId: 'multipleTestTitle', column: 6, line: 3 }], }, { - code: ['it("it1", function() {});', 'it("it1", function() {});'].join( - '\n', - ), + code: dedent` + it('works', () => {}); + it('works', () => {}); + `, errors: [{ messageId: 'multipleTestTitle', column: 4, line: 2 }], }, { - code: [ - 'it.concurrent("it1", function() {});', - 'it.concurrent("it1", function() {});', - ].join('\n'), - errors: [{ messageId: 'multipleTestTitle', column: 15, line: 2 }], + code: dedent` + test.only('this', () => {}); + test('this', () => {}); + `, + errors: [{ messageId: 'multipleTestTitle', column: 6, line: 2 }], }, { - code: [ - 'it.only("it1", function() {});', - 'it("it1", function() {});', - ].join('\n'), - errors: [{ messageId: 'multipleTestTitle', column: 4, line: 2 }], + code: dedent` + xtest('this', () => {}); + test('this', () => {}); + `, + errors: [{ messageId: 'multipleTestTitle', column: 6, line: 2 }], }, { - code: [ - 'it.concurrent.only("it1", function() {});', - 'it.concurrent("it1", function() {});', - ].join('\n'), - errors: [{ messageId: 'multipleTestTitle', column: 15, line: 2 }], + code: dedent` + test.only('this', () => {}); + test.only('this', () => {}); + `, + errors: [{ messageId: 'multipleTestTitle', column: 11, line: 2 }], }, { - code: ['fit("it1", function() {});', 'it("it1", function() {});'].join( - '\n', - ), - errors: [{ messageId: 'multipleTestTitle', column: 4, line: 2 }], + code: dedent` + test.concurrent('this', () => {}); + test.concurrent('this', () => {}); + `, + errors: [{ messageId: 'multipleTestTitle', column: 17, line: 2 }], }, { - code: [ - 'it.only("it1", function() {});', - 'it.only("it1", function() {});', - ].join('\n'), - errors: [{ messageId: 'multipleTestTitle', column: 9, line: 2 }], + code: dedent` + test.concurrent.only('this', () => {}); + test.concurrent('this', () => {}); + `, + errors: [{ messageId: 'multipleTestTitle', column: 17, line: 2 }], }, { - code: [ - 'it.concurrent.only("it1", function() {});', - 'it.concurrent.only("it1", function() {});', - ].join('\n'), - errors: [{ messageId: 'multipleTestTitle', column: 20, line: 2 }], + code: dedent` + test.concurrent.only('this', () => {}); + test.concurrent.only('this', () => {}); + `, + errors: [{ messageId: 'multipleTestTitle', column: 22, line: 2 }], }, { - code: [ - 'describe("describe1", function() {});', - 'describe("describe1", function() {});', - ].join('\n'), + code: dedent` + describe('foo', () => {}); + describe('foo', () => {}); + `, errors: [{ messageId: 'multipleDescribeTitle', column: 10, line: 2 }], }, { - code: [ - 'describe("describe1", function() {});', - 'xdescribe("describe1", function() {});', - ].join('\n'), + code: dedent` + describe('foo', () => {}); + xdescribe('foo', () => {}); + `, errors: [{ messageId: 'multipleDescribeTitle', column: 11, line: 2 }], }, { - code: [ - 'fdescribe("describe1", function() {});', - 'describe("describe1", function() {});', - ].join('\n'), + code: dedent` + fdescribe('foo', () => {}); + describe('foo', () => {}); + `, errors: [{ messageId: 'multipleDescribeTitle', column: 10, line: 2 }], }, { - code: [ - 'describe("describe1", function() {', - ' describe("describe2", function() {});', - '});', - 'describe("describe1", function() {});', - ].join('\n'), + code: dedent` + describe('foo', () => { + describe('foe', () => {}); + }); + describe('foo', () => {}); + `, errors: [{ messageId: 'multipleDescribeTitle', column: 10, line: 4 }], }, { - code: [ - 'describe("describe", () => {', - ' it(`testing backticks with the same title`, () => {});', - ' it(`testing backticks with the same title`, () => {});', - '});', - ].join('\n'), - errors: [{ messageId: 'multipleTestTitle', column: 8, line: 3 }], + code: dedent` + describe("foo", () => { + it(\`catches backticks with the same title\`, () => {}); + it(\`catches backticks with the same title\`, () => {}); + }); + `, + errors: [{ messageId: 'multipleTestTitle', column: 6, line: 3 }], }, ], }); diff --git a/src/rules/__tests__/no-if.test.ts b/src/rules/__tests__/no-if.test.ts index 5b91441ab..d6554638e 100644 --- a/src/rules/__tests__/no-if.test.ts +++ b/src/rules/__tests__/no-if.test.ts @@ -812,6 +812,34 @@ ruleTester.run('if statements', rule, { }, ], }, + { + code: dedent` + it.each\`\`('foo', () => { + callExpression() + if ('bar') {} + }) + `, + errors: [ + { + data: { condition: 'if' }, + messageId: 'conditionalInTest', + }, + ], + }, + { + code: dedent` + it.only.each\`\`('foo', () => { + callExpression() + if ('bar') {} + }) + `, + errors: [ + { + data: { condition: 'if' }, + messageId: 'conditionalInTest', + }, + ], + }, { code: dedent` describe('valid', () => { diff --git a/src/rules/__tests__/no-test-return-statement.test.ts b/src/rules/__tests__/no-test-return-statement.test.ts index 5959e03ea..686c078f4 100644 --- a/src/rules/__tests__/no-test-return-statement.test.ts +++ b/src/rules/__tests__/no-test-return-statement.test.ts @@ -52,6 +52,30 @@ ruleTester.run('no-test-return-statement', rule, { `, errors: [{ messageId: 'noReturnValue', column: 3, line: 2 }], }, + { + code: dedent` + it.skip("one", function () { + return expect(1).toBe(1); + }); + `, + errors: [{ messageId: 'noReturnValue', column: 3, line: 2 }], + }, + { + code: dedent` + it.each\`\`("one", function () { + return expect(1).toBe(1); + }); + `, + errors: [{ messageId: 'noReturnValue', column: 3, line: 2 }], + }, + { + code: dedent` + it.only.each\`\`("one", function () { + return expect(1).toBe(1); + }); + `, + errors: [{ messageId: 'noReturnValue', column: 3, line: 2 }], + }, { code: dedent` it("one", myTest); diff --git a/src/rules/__tests__/prefer-hooks-on-top.test.ts b/src/rules/__tests__/prefer-hooks-on-top.test.ts index e5cfa4209..d7ba071be 100644 --- a/src/rules/__tests__/prefer-hooks-on-top.test.ts +++ b/src/rules/__tests__/prefer-hooks-on-top.test.ts @@ -45,6 +45,48 @@ ruleTester.run('basic describe block', rule, { }, ], }, + { + code: dedent` + describe('foo', () => { + beforeEach(() => {}); + test.each\`\`('bar', () => { + someFn(); + }); + beforeAll(() => {}); + test.only('bar', () => { + someFn(); + }); + }); + `, + errors: [ + { + messageId: 'noHookOnTop', + column: 3, + line: 6, + }, + ], + }, + { + code: dedent` + describe('foo', () => { + beforeEach(() => {}); + test.only.each\`\`('bar', () => { + someFn(); + }); + beforeAll(() => {}); + test.only('bar', () => { + someFn(); + }); + }); + `, + errors: [ + { + messageId: 'noHookOnTop', + column: 3, + line: 6, + }, + ], + }, ], }); diff --git a/src/rules/__tests__/require-top-level-describe.test.ts b/src/rules/__tests__/require-top-level-describe.test.ts index 26c218e84..b97d20a0b 100644 --- a/src/rules/__tests__/require-top-level-describe.test.ts +++ b/src/rules/__tests__/require-top-level-describe.test.ts @@ -12,6 +12,7 @@ const ruleTester = new TSESLint.RuleTester({ ruleTester.run('require-top-level-describe', rule, { valid: [ + 'it.each()', 'describe("test suite", () => { test("my test") });', 'describe("test suite", () => { it("my test") });', dedent` @@ -89,9 +90,25 @@ ruleTester.run('require-top-level-describe', rule, { `, errors: [{ messageId: 'unexpectedHook' }], }, + { + code: "it.skip('test', () => {});", + errors: [{ messageId: 'unexpectedTestCase' }], + }, { code: "it.each([1, 2, 3])('%n', () => {});", errors: [{ messageId: 'unexpectedTestCase' }], }, + { + code: "it.skip.each([1, 2, 3])('%n', () => {});", + errors: [{ messageId: 'unexpectedTestCase' }], + }, + { + code: "it.skip.each``('%n', () => {});", + errors: [{ messageId: 'unexpectedTestCase' }], + }, + { + code: "it.each``('%n', () => {});", + errors: [{ messageId: 'unexpectedTestCase' }], + }, ], }); diff --git a/src/rules/__tests__/unbound-method.test.ts b/src/rules/__tests__/unbound-method.test.ts index a425f721a..1a50877c5 100644 --- a/src/rules/__tests__/unbound-method.test.ts +++ b/src/rules/__tests__/unbound-method.test.ts @@ -63,7 +63,7 @@ const invalidTestCases: Array> = [ errors: [ { line: 9, - messageId: 'unbound', + messageId: 'unboundWithoutThisAnnotation', }, ], }, @@ -72,7 +72,7 @@ const invalidTestCases: Array> = [ errors: [ { line: 1, - messageId: 'unbound', + messageId: 'unboundWithoutThisAnnotation', }, ], }, @@ -87,7 +87,7 @@ const invalidTestCases: Array> = [ errors: [ { line: 10, - messageId: 'unbound', + messageId: 'unboundWithoutThisAnnotation', }, ], }, @@ -101,7 +101,7 @@ const invalidTestCases: Array> = [ errors: [ { line: 9, - messageId: 'unbound' as const, + messageId: 'unboundWithoutThisAnnotation' as const, }, ], })), @@ -115,7 +115,7 @@ const invalidTestCases: Array> = [ errors: [ { line: 9, - messageId: 'unbound' as const, + messageId: 'unboundWithoutThisAnnotation' as const, }, ], })), @@ -237,7 +237,7 @@ function addContainsMethodsClassInvalid( errors: [ { line: 18, - messageId: 'unbound', + messageId: 'unboundWithoutThisAnnotation', }, ], })); @@ -460,6 +460,22 @@ class Foo { } const { bound } = new Foo(); `, + // https://github.com/typescript-eslint/typescript-eslint/issues/1866 + ` +class BaseClass { + x: number = 42; + logThis() {} +} +class OtherClass extends BaseClass { + superLogThis: any; + constructor() { + super(); + this.superLogThis = super.logThis; + } +} +const oc = new OtherClass(); +oc.superLogThis(); + `, ], invalid: [ { @@ -477,7 +493,7 @@ Promise.resolve().then(console.log); errors: [ { line: 10, - messageId: 'unbound', + messageId: 'unboundWithoutThisAnnotation', }, ], }, @@ -489,7 +505,7 @@ const x = console.log; errors: [ { line: 3, - messageId: 'unbound', + messageId: 'unboundWithoutThisAnnotation', }, ], }, @@ -504,15 +520,15 @@ function foo(arg: ContainsMethods | null) { errors: [ { line: 20, - messageId: 'unbound', + messageId: 'unboundWithoutThisAnnotation', }, { line: 21, - messageId: 'unbound', + messageId: 'unboundWithoutThisAnnotation', }, { line: 22, - messageId: 'unbound', + messageId: 'unboundWithoutThisAnnotation', }, ], }, @@ -554,7 +570,7 @@ ContainsMethods.unboundStatic; errors: [ { line: 8, - messageId: 'unbound', + messageId: 'unboundWithoutThisAnnotation', }, ], }, @@ -569,7 +585,7 @@ const x = CommunicationError.prototype.foo; errors: [ { line: 5, - messageId: 'unbound', + messageId: 'unboundWithoutThisAnnotation', }, ], }, @@ -579,7 +595,7 @@ const x = CommunicationError.prototype.foo; errors: [ { line: 1, - messageId: 'unbound', + messageId: 'unboundWithoutThisAnnotation', }, ], }, @@ -598,7 +614,7 @@ instance.unbound = x; // THIS SHOULD NOT errors: [ { line: 9, - messageId: 'unbound', + messageId: 'unboundWithoutThisAnnotation', }, ], }, @@ -626,7 +642,7 @@ const { unbound } = new Foo(); errors: [ { line: 5, - messageId: 'unbound', + messageId: 'unboundWithoutThisAnnotation', }, ], }, @@ -655,7 +671,7 @@ let unbound; errors: [ { line: 6, - messageId: 'unbound', + messageId: 'unboundWithoutThisAnnotation', }, ], }, @@ -684,7 +700,7 @@ const { foo } = CommunicationError.prototype; errors: [ { line: 5, - messageId: 'unbound', + messageId: 'unboundWithoutThisAnnotation', }, ], }, @@ -699,7 +715,7 @@ let foo; errors: [ { line: 6, - messageId: 'unbound', + messageId: 'unboundWithoutThisAnnotation', }, ], }, @@ -711,7 +727,7 @@ const { log } = console; errors: [ { line: 3, - messageId: 'unbound', + messageId: 'unboundWithoutThisAnnotation', }, ], }, @@ -720,7 +736,50 @@ const { log } = console; errors: [ { line: 1, - messageId: 'unbound', + messageId: 'unboundWithoutThisAnnotation', + }, + ], + }, + // https://github.com/typescript-eslint/typescript-eslint/issues/1866 + { + code: ` +class BaseClass { + logThis() {} +} +class OtherClass extends BaseClass { + constructor() { + super(); + const x = super.logThis; + } +} + `, + errors: [ + { + line: 8, + column: 15, + messageId: 'unboundWithoutThisAnnotation', + }, + ], + }, + // https://github.com/typescript-eslint/typescript-eslint/issues/1866 + { + code: ` +class BaseClass { + logThis() {} +} +class OtherClass extends BaseClass { + constructor() { + super(); + let x; + x = super.logThis; + } +} + `, + errors: [ + { + line: 9, + column: 9, + messageId: 'unboundWithoutThisAnnotation', }, ], }, diff --git a/src/rules/__tests__/utils.test.ts b/src/rules/__tests__/utils.test.ts new file mode 100644 index 000000000..ead3ebfea --- /dev/null +++ b/src/rules/__tests__/utils.test.ts @@ -0,0 +1,268 @@ +import { TSESLint } from '@typescript-eslint/experimental-utils'; +import resolveFrom from 'resolve-from'; +import { createRule, isDescribeCall, isTestCaseCall } from '../utils'; + +const ruleTester = new TSESLint.RuleTester({ + parser: resolveFrom(require.resolve('eslint'), 'espree'), + parserOptions: { + ecmaVersion: 2015, + }, +}); + +const rule = createRule({ + name: __filename, + meta: { + docs: { + category: 'Possible Errors', + description: 'Fake rule for testing AST guards', + recommended: false, + }, + messages: { + details: [ + 'callType', // + ] + .map(data => `${data}: {{ ${data} }}`) + .join('\n'), + }, + schema: [], + type: 'problem', + }, + defaultOptions: [], + create: context => ({ + CallExpression(node) { + const callType = + (isDescribeCall(node) && ('describe' as const)) || + (isTestCaseCall(node) && ('test' as const)); + + if (callType) { + context.report({ + messageId: 'details', + node, + data: { callType }, + }); + } + }, + }), +}); + +ruleTester.run('nonexistent methods', rule, { + valid: [ + 'describe.something()', + 'describe.me()', + 'test.me()', + 'it.fails()', + 'context()', + 'context.each``()', + 'context.each()', + 'describe.context()', + 'describe.concurrent()()', + 'describe.concurrent``()', + 'describe.every``()', + ], + invalid: [], +}); + +/** + * Tests the AST utils against the given member expressions both + * as is and as call expressions. + * + * @param {string[]} memberExpressions + * @param {"describe" | "test"} callType + * @param {boolean} skip + */ +const testUtilsAgainst = ( + memberExpressions: string[], + callType: 'describe' | 'test', + skip = false, +) => { + if (skip) { + return; + } + + ruleTester.run('it', rule, { + valid: memberExpressions, + invalid: memberExpressions.map(code => ({ + code: `${code}("works", () => {})`, + errors: [ + { + messageId: 'details' as const, + data: { callType }, + column: 1, + line: 1, + }, + ], + })), + }); +}; + +testUtilsAgainst( + [ + 'it["concurrent"]["skip"]', + 'it["concurrent"].skip', + 'it.concurrent["skip"]', + 'it.concurrent.skip', + + 'it["concurrent"]["only"]', + 'it["concurrent"].only', + 'it.concurrent["only"]', + 'it.concurrent.only', + + 'it["skip"]["each"]()', + 'it["skip"].each()', + 'it.skip["each"]()', + 'it.skip.each()', + + 'it["skip"]["each"]``', + 'it["skip"].each``', + 'it.skip["each"]``', + 'it.skip.each``', + + 'it["only"]["each"]()', + 'it["only"].each()', + 'it.only["each"]()', + 'it.only.each()', + + 'it["only"]["each"]``', + 'it["only"].each``', + 'it.only["each"]``', + 'it.only.each``', + + 'xit["each"]()', + 'xit.each()', + + 'xit["each"]``', + 'xit.each``', + + 'fit["each"]()', + 'fit.each()', + + 'fit["each"]``', + 'fit.each``', + + 'it["skip"]', + 'it.skip', + + 'it["only"]', + 'it.only', + + 'it["each"]()', + 'it.each()', + + 'it["each"]``', + 'it.each``', + + 'fit', + 'xit', + 'it', + ], + 'test', +); + +testUtilsAgainst( + [ + 'test["concurrent"]["skip"]', + 'test["concurrent"].skip', + 'test.concurrent["skip"]', + 'test.concurrent.skip', + + 'test["concurrent"]["only"]', + 'test["concurrent"].only', + 'test.concurrent["only"]', + 'test.concurrent.only', + + 'test["skip"]["each"]()', + 'test["skip"].each()', + 'test.skip["each"]()', + 'test.skip.each()', + + 'test["skip"]["each"]``', + 'test["skip"].each``', + 'test.skip["each"]``', + 'test.skip.each``', + + 'test["only"]["each"]()', + 'test["only"].each()', + 'test.only["each"]()', + 'test.only.each()', + + 'test["only"]["each"]``', + 'test["only"].each``', + 'test.only["each"]``', + 'test.only.each``', + + 'xtest["each"]()', + 'xtest.each()', + + 'xtest["each"]``', + 'xtest.each``', + + 'test["skip"]', + 'test.skip', + + 'test["only"]', + 'test.only', + + 'test["each"]()', + 'test.each()', + + 'test["each"]``', + 'test.each``', + + 'xtest', + 'test', + ], + 'test', +); + +testUtilsAgainst( + [ + 'describe["skip"]["each"]()', + 'describe["skip"].each()', + 'describe.skip["each"]()', + 'describe.skip.each()', + + 'describe["skip"]["each"]``', + 'describe["skip"].each``', + 'describe.skip["each"]``', + 'describe.skip.each``', + + 'describe["only"]["each"]()', + 'describe["only"].each()', + 'describe.only["each"]()', + 'describe.only.each()', + + 'describe["only"]["each"]``', + 'describe["only"].each``', + 'describe.only["each"]``', + 'describe.only.each``', + + 'xdescribe["each"]()', + 'xdescribe.each()', + + 'xdescribe["each"]``', + 'xdescribe.each``', + + 'fdescribe["each"]()', + 'fdescribe.each()', + + 'fdescribe["each"]``', + 'fdescribe.each``', + + 'describe["skip"]', + 'describe.skip', + + 'describe["only"]', + 'describe.only', + + 'describe["each"]()', + 'describe.each()', + + 'describe["each"]``', + 'describe.each``', + + 'fdescribe', + 'xdescribe', + 'describe', + ], + 'describe', +); diff --git a/src/rules/__tests__/valid-title.test.ts b/src/rules/__tests__/valid-title.test.ts index 5d703bb9d..c0e30d2b7 100644 --- a/src/rules/__tests__/valid-title.test.ts +++ b/src/rules/__tests__/valid-title.test.ts @@ -353,6 +353,26 @@ ruleTester.run('title-must-be-string', rule, { }, ], }, + { + code: 'it.skip.each([])(1, () => {});', + errors: [ + { + messageId: 'titleMustBeString', + column: 18, + line: 1, + }, + ], + }, + { + code: 'it.skip.each``(1, () => {});', + errors: [ + { + messageId: 'titleMustBeString', + column: 16, + line: 1, + }, + ], + }, { code: 'it(123, () => {});', errors: [ @@ -658,6 +678,16 @@ ruleTester.run('no-accidental-space', rule, { output: 'describe("foo", function () {})', errors: [{ messageId: 'accidentalSpace', column: 10, line: 1 }], }, + { + code: 'describe.each()(" foo", function () {})', + output: 'describe.each()("foo", function () {})', + errors: [{ messageId: 'accidentalSpace', column: 17, line: 1 }], + }, + { + code: 'describe.only.each()(" foo", function () {})', + output: 'describe.only.each()("foo", function () {})', + errors: [{ messageId: 'accidentalSpace', column: 22, line: 1 }], + }, { code: 'describe(" foo foe fum", function () {})', output: 'describe("foo foe fum", function () {})', diff --git a/src/rules/consistent-test-it.ts b/src/rules/consistent-test-it.ts index dc6c8c12b..6675df48e 100644 --- a/src/rules/consistent-test-it.ts +++ b/src/rules/consistent-test-it.ts @@ -7,9 +7,9 @@ import { TestCaseName, createRule, getNodeName, - isDescribe, + isDescribeCall, isEachCall, - isTestCase, + isTestCaseCall, } from './utils'; const buildFixer = ( @@ -79,7 +79,7 @@ export default createRule< return; } - if (isDescribe(node)) { + if (isDescribeCall(node)) { describeNestingLevel++; } @@ -89,7 +89,7 @@ export default createRule< : node.callee; if ( - isTestCase(node) && + isTestCaseCall(node) && describeNestingLevel === 0 && !nodeName.includes(testKeyword) ) { @@ -104,7 +104,7 @@ export default createRule< } if ( - isTestCase(node) && + isTestCaseCall(node) && describeNestingLevel > 0 && !nodeName.includes(testKeywordWithinDescribe) ) { @@ -121,7 +121,7 @@ export default createRule< } }, 'CallExpression:exit'(node) { - if (isDescribe(node) && !isEachCall(node)) { + if (isDescribeCall(node) && !isEachCall(node)) { describeNestingLevel--; } }, diff --git a/src/rules/lowercase-name.ts b/src/rules/lowercase-name.ts index a083c29b4..ce2c78644 100644 --- a/src/rules/lowercase-name.ts +++ b/src/rules/lowercase-name.ts @@ -10,10 +10,10 @@ import { TestCaseName, createRule, getStringValue, - isDescribe, + isDescribeCall, isEachCall, isStringNode, - isTestCase, + isTestCaseCall, } from './utils'; type IgnorableFunctionExpressions = @@ -29,7 +29,7 @@ const hasStringAsFirstArgument = ( const findNodeNameAndArgument = ( node: TSESTree.CallExpression, ): [name: string, firstArg: StringNode] | null => { - if (!(isTestCase(node) || isDescribe(node))) { + if (!(isTestCaseCall(node) || isDescribeCall(node))) { return null; } @@ -116,7 +116,7 @@ export default createRule< return { CallExpression(node: TSESTree.CallExpression) { - if (isDescribe(node)) { + if (isDescribeCall(node)) { numberOfDescribeBlocks++; if (ignoreTopLevelDescribe && numberOfDescribeBlocks === 1) { @@ -170,7 +170,7 @@ export default createRule< }); }, 'CallExpression:exit'(node: TSESTree.CallExpression) { - if (isDescribe(node)) { + if (isDescribeCall(node)) { numberOfDescribeBlocks--; } }, diff --git a/src/rules/no-conditional-expect.ts b/src/rules/no-conditional-expect.ts index 2b9d91774..189ea0812 100644 --- a/src/rules/no-conditional-expect.ts +++ b/src/rules/no-conditional-expect.ts @@ -3,7 +3,7 @@ import { createRule, getTestCallExpressionsFromDeclaredVariables, isExpectCall, - isTestCase, + isTestCaseCall, } from './utils'; export default createRule({ @@ -40,7 +40,7 @@ export default createRule({ } }, CallExpression(node: TSESTree.CallExpression) { - if (isTestCase(node)) { + if (isTestCaseCall(node)) { inTestCase = true; } @@ -52,7 +52,7 @@ export default createRule({ } }, 'CallExpression:exit'(node) { - if (isTestCase(node)) { + if (isTestCaseCall(node)) { inTestCase = false; } }, diff --git a/src/rules/no-done-callback.ts b/src/rules/no-done-callback.ts index 3e1ebecfc..cae56123c 100644 --- a/src/rules/no-done-callback.ts +++ b/src/rules/no-done-callback.ts @@ -7,7 +7,7 @@ import { getNodeName, isFunction, isHook, - isTestCase, + isTestCaseCall, } from './utils'; const findCallbackArg = ( @@ -22,7 +22,7 @@ const findCallbackArg = ( return node.arguments[0]; } - if (isTestCase(node) && node.arguments.length >= 2) { + if (isTestCaseCall(node) && node.arguments.length >= 2) { return node.arguments[1]; } diff --git a/src/rules/no-duplicate-hooks.ts b/src/rules/no-duplicate-hooks.ts index 3a699d010..d1aaecaf2 100644 --- a/src/rules/no-duplicate-hooks.ts +++ b/src/rules/no-duplicate-hooks.ts @@ -1,4 +1,4 @@ -import { createRule, isDescribe, isEachCall, isHook } from './utils'; +import { createRule, isDescribeCall, isEachCall, isHook } from './utils'; const newHookContext = () => ({ beforeAll: 0, @@ -27,7 +27,7 @@ export default createRule({ return { CallExpression(node) { - if (isDescribe(node)) { + if (isDescribeCall(node)) { hookContexts.push(newHookContext()); } @@ -45,7 +45,7 @@ export default createRule({ } }, 'CallExpression:exit'(node) { - if (isDescribe(node) && !isEachCall(node)) { + if (isDescribeCall(node) && !isEachCall(node)) { hookContexts.pop(); } }, diff --git a/src/rules/no-export.ts b/src/rules/no-export.ts index 7547c4bc3..e3c92d9cc 100644 --- a/src/rules/no-export.ts +++ b/src/rules/no-export.ts @@ -2,7 +2,7 @@ import { AST_NODE_TYPES, TSESTree, } from '@typescript-eslint/experimental-utils'; -import { createRule, isTestCase } from './utils'; +import { createRule, isTestCaseCall } from './utils'; export default createRule({ name: __filename, @@ -37,7 +37,7 @@ export default createRule({ }, CallExpression(node) { - if (isTestCase(node)) { + if (isTestCaseCall(node)) { hasTestCase = true; } }, diff --git a/src/rules/no-identical-title.ts b/src/rules/no-identical-title.ts index 1c5f59efc..f83afb5f2 100644 --- a/src/rules/no-identical-title.ts +++ b/src/rules/no-identical-title.ts @@ -2,9 +2,9 @@ import { AST_NODE_TYPES } from '@typescript-eslint/experimental-utils'; import { createRule, getStringValue, - isDescribe, + isDescribeCall, isStringNode, - isTestCase, + isTestCaseCall, } from './utils'; interface DescribeContext { @@ -42,7 +42,7 @@ export default createRule({ CallExpression(node) { const currentLayer = contexts[contexts.length - 1]; - if (isDescribe(node)) { + if (isDescribeCall(node)) { contexts.push(newDescribeContext()); } @@ -58,7 +58,7 @@ export default createRule({ const title = getStringValue(argument); - if (isTestCase(node)) { + if (isTestCaseCall(node)) { if (currentLayer.testTitles.includes(title)) { context.report({ messageId: 'multipleTestTitle', @@ -68,7 +68,7 @@ export default createRule({ currentLayer.testTitles.push(title); } - if (!isDescribe(node)) { + if (!isDescribeCall(node)) { return; } if (currentLayer.describeTitles.includes(title)) { @@ -80,7 +80,7 @@ export default createRule({ currentLayer.describeTitles.push(title); }, 'CallExpression:exit'(node) { - if (isDescribe(node)) { + if (isDescribeCall(node)) { contexts.pop(); } }, diff --git a/src/rules/no-if.ts b/src/rules/no-if.ts index 664a27955..f8ba2f236 100644 --- a/src/rules/no-if.ts +++ b/src/rules/no-if.ts @@ -7,7 +7,7 @@ import { createRule, getNodeName, getTestCallExpressionsFromDeclaredVariables, - isTestCase, + isTestCaseCall, } from './utils'; const testCaseNames = new Set([ @@ -75,7 +75,7 @@ export default createRule({ return { CallExpression(node) { - if (isTestCase(node)) { + if (isTestCaseCall(node)) { stack.push(true); } }, diff --git a/src/rules/no-standalone-expect.ts b/src/rules/no-standalone-expect.ts index 4daa3c847..247775673 100644 --- a/src/rules/no-standalone-expect.ts +++ b/src/rules/no-standalone-expect.ts @@ -7,10 +7,10 @@ import { TestCaseName, createRule, getNodeName, - isDescribe, + isDescribeCall, isExpectCall, isFunction, - isTestCase, + isTestCaseCall, } from './utils'; const getBlockType = ( @@ -39,7 +39,7 @@ const getBlockType = ( } // if it's not a variable, it will be callExpr, we only care about describe - if (expr.type === AST_NODE_TYPES.CallExpression && isDescribe(expr)) { + if (expr.type === AST_NODE_TYPES.CallExpression && isDescribeCall(expr)) { return 'describe'; } } @@ -94,7 +94,7 @@ export default createRule< additionalTestBlockFunctions.includes(getNodeName(node) || ''); const isTestBlock = (node: TSESTree.CallExpression): boolean => - isTestCase(node) || isCustomTestBlockFunction(node); + isTestCaseCall(node) || isCustomTestBlockFunction(node); return { CallExpression(node) { diff --git a/src/rules/no-test-prefixes.ts b/src/rules/no-test-prefixes.ts index 0c61dedfe..f708aa4c0 100644 --- a/src/rules/no-test-prefixes.ts +++ b/src/rules/no-test-prefixes.ts @@ -1,5 +1,10 @@ import { AST_NODE_TYPES } from '@typescript-eslint/experimental-utils'; -import { createRule, getNodeName, isDescribe, isTestCase } from './utils'; +import { + createRule, + getNodeName, + isDescribeCall, + isTestCaseCall, +} from './utils'; export default createRule({ name: __filename, @@ -22,7 +27,8 @@ export default createRule({ CallExpression(node) { const nodeName = getNodeName(node.callee); - if (!nodeName || (!isDescribe(node) && !isTestCase(node))) return; + if (!nodeName || (!isDescribeCall(node) && !isTestCaseCall(node))) + return; const preferredNodeName = getPreferredNodeName(nodeName); diff --git a/src/rules/no-test-return-statement.ts b/src/rules/no-test-return-statement.ts index 0f26398e3..26fa36e61 100644 --- a/src/rules/no-test-return-statement.ts +++ b/src/rules/no-test-return-statement.ts @@ -6,7 +6,7 @@ import { createRule, getTestCallExpressionsFromDeclaredVariables, isFunction, - isTestCase, + isTestCaseCall, } from './utils'; const getBody = (args: TSESTree.Expression[]) => { @@ -41,7 +41,7 @@ export default createRule({ create(context) { return { CallExpression(node) { - if (!isTestCase(node)) return; + if (!isTestCaseCall(node)) return; const body = getBody(node.arguments); const returnStmt = body.find( t => t.type === AST_NODE_TYPES.ReturnStatement, diff --git a/src/rules/no-try-expect.ts b/src/rules/no-try-expect.ts index ff209a80f..57647bf2a 100644 --- a/src/rules/no-try-expect.ts +++ b/src/rules/no-try-expect.ts @@ -3,7 +3,7 @@ import { createRule, getTestCallExpressionsFromDeclaredVariables, isExpectCall, - isTestCase, + isTestCaseCall, } from './utils'; export default createRule({ @@ -37,7 +37,7 @@ export default createRule({ return { CallExpression(node) { - if (isTestCase(node)) { + if (isTestCaseCall(node)) { isTest = true; } else if (isTest && isThrowExpectCall(node)) { context.report({ @@ -67,7 +67,7 @@ export default createRule({ } }, 'CallExpression:exit'(node) { - if (isTestCase(node)) { + if (isTestCaseCall(node)) { isTest = false; } }, diff --git a/src/rules/prefer-expect-assertions.ts b/src/rules/prefer-expect-assertions.ts index d62d76dfd..0a3ce8342 100644 --- a/src/rules/prefer-expect-assertions.ts +++ b/src/rules/prefer-expect-assertions.ts @@ -11,7 +11,7 @@ import { isEachCall, isFunction, isSupportedAccessor, - isTestCase, + isTestCaseCall, } from './utils'; const isExpectAssertionsOrHasAssertionsCall = ( @@ -101,7 +101,7 @@ export default createRule<[RuleOptions], MessageIds>({ create(context, [options]) { return { CallExpression(node: TSESTree.CallExpression) { - if (!isTestCase(node)) { + if (!isTestCaseCall(node)) { return; } diff --git a/src/rules/prefer-hooks-on-top.ts b/src/rules/prefer-hooks-on-top.ts index 5d1e0ae61..1a393a319 100644 --- a/src/rules/prefer-hooks-on-top.ts +++ b/src/rules/prefer-hooks-on-top.ts @@ -1,4 +1,4 @@ -import { createRule, isHook, isTestCase } from './utils'; +import { createRule, isHook, isTestCaseCall } from './utils'; export default createRule({ name: __filename, @@ -20,7 +20,7 @@ export default createRule({ return { CallExpression(node) { - if (!isHook(node) && isTestCase(node)) { + if (!isHook(node) && isTestCaseCall(node)) { hooksContext[hooksContext.length - 1] = true; } if (hooksContext[hooksContext.length - 1] && isHook(node)) { diff --git a/src/rules/prefer-todo.ts b/src/rules/prefer-todo.ts index 6ba4f2d02..8bdd8dff5 100644 --- a/src/rules/prefer-todo.ts +++ b/src/rules/prefer-todo.ts @@ -11,7 +11,7 @@ import { hasOnlyOneArgument, isFunction, isStringNode, - isTestCase, + isTestCaseCall, } from './utils'; function isEmptyFunction(node: TSESTree.Expression) { @@ -36,7 +36,7 @@ function createTodoFixer( const isTargetedTestCase = ( node: TSESTree.CallExpression, ): node is JestFunctionCallExpression => - isTestCase(node) && + isTestCaseCall(node) && [TestCaseName.it, TestCaseName.test, 'it.skip', 'test.skip'].includes( getNodeName(node.callee), ); diff --git a/src/rules/require-top-level-describe.ts b/src/rules/require-top-level-describe.ts index f9c95ffea..12cb047aa 100644 --- a/src/rules/require-top-level-describe.ts +++ b/src/rules/require-top-level-describe.ts @@ -1,10 +1,10 @@ import { TSESTree } from '@typescript-eslint/experimental-utils'; import { createRule, - isDescribe, + isDescribeCall, isEachCall, isHook, - isTestCase, + isTestCaseCall, } from './utils'; export default createRule({ @@ -29,14 +29,14 @@ export default createRule({ return { CallExpression(node) { - if (isDescribe(node)) { + if (isDescribeCall(node)) { numberOfDescribeBlocks++; return; } if (numberOfDescribeBlocks === 0) { - if (isTestCase(node)) { + if (isTestCaseCall(node)) { context.report({ node, messageId: 'unexpectedTestCase' }); return; @@ -50,7 +50,7 @@ export default createRule({ } }, 'CallExpression:exit'(node: TSESTree.CallExpression) { - if (isDescribe(node) && !isEachCall(node)) { + if (isDescribeCall(node) && !isEachCall(node)) { numberOfDescribeBlocks--; } }, diff --git a/src/rules/unbound-method.ts b/src/rules/unbound-method.ts index 33bf27522..77e8fd0d6 100644 --- a/src/rules/unbound-method.ts +++ b/src/rules/unbound-method.ts @@ -58,7 +58,9 @@ interface Config { export type Options = [Config]; -export type MessageIds = 'unbound'; +export type MessageIds = 'unbound' | 'unboundWithoutThisAnnotation'; + +const DEFAULT_MESSAGE = 'This rule requires `@typescript-eslint/eslint-plugin`'; export default createRule({ defaultOptions: [{ ignoreStatic: false }], @@ -66,7 +68,8 @@ export default createRule({ name: __filename, meta: { messages: { - unbound: 'This rule requires `@typescript-eslint/eslint-plugin`', + unbound: DEFAULT_MESSAGE, + unboundWithoutThisAnnotation: DEFAULT_MESSAGE, }, schema: [], type: 'problem', diff --git a/src/rules/utils.ts b/src/rules/utils.ts index 1e701da7b..b2c904cdf 100644 --- a/src/rules/utils.ts +++ b/src/rules/utils.ts @@ -648,33 +648,120 @@ export const getTestCallExpressionsFromDeclaredVariables = ( (node): node is JestFunctionCallExpression => !!node && node.type === AST_NODE_TYPES.CallExpression && - isTestCase(node), + isTestCaseCall(node), ), ), [], ); }; -export const isTestCase = ( +const isTestCaseName = (node: TSESTree.LeftHandSideExpression) => + node.type === AST_NODE_TYPES.Identifier && + TestCaseName.hasOwnProperty(node.name); + +const isTestCaseProperty = ( + node: TSESTree.Expression, +): node is AccessorNode => + isSupportedAccessor(node) && + TestCaseProperty.hasOwnProperty(getAccessorValue(node)); + +/** + * Checks if the given `node` is a *call* to a test case function that would + * result in tests being run by `jest`. + * + * Note that `.each()` does not count as a call in this context, as it will not + * result in `jest` running any tests. + * + * @param {TSESTree.CallExpression} node + * + * @return {node is JestFunctionCallExpression} + */ +export const isTestCaseCall = ( node: TSESTree.CallExpression, -): node is JestFunctionCallExpression => - (node.callee.type === AST_NODE_TYPES.Identifier && - TestCaseName.hasOwnProperty(node.callee.name)) || - // e.g. it.each``() - (node.callee.type === AST_NODE_TYPES.TaggedTemplateExpression && - node.callee.tag.type === AST_NODE_TYPES.MemberExpression && - node.callee.tag.object.type === AST_NODE_TYPES.Identifier && - TestCaseName.hasOwnProperty(node.callee.tag.object.name) && - isSupportedAccessor(node.callee.tag.property, TestCaseProperty.each)) || - // e.g. it.concurrent.{skip,only} - (node.callee.type === AST_NODE_TYPES.MemberExpression && - node.callee.property.type === AST_NODE_TYPES.Identifier && - TestCaseProperty.hasOwnProperty(node.callee.property.name) && - ((node.callee.object.type === AST_NODE_TYPES.Identifier && - TestCaseName.hasOwnProperty(node.callee.object.name)) || - (node.callee.object.type === AST_NODE_TYPES.MemberExpression && - node.callee.object.object.type === AST_NODE_TYPES.Identifier && - TestCaseName.hasOwnProperty(node.callee.object.object.name)))); +): node is JestFunctionCallExpression => { + if (isTestCaseName(node.callee)) { + return true; + } + + const callee = + node.callee.type === AST_NODE_TYPES.TaggedTemplateExpression + ? node.callee.tag + : node.callee; + + if ( + callee.type === AST_NODE_TYPES.MemberExpression && + isTestCaseProperty(callee.property) + ) { + // if we're an `each()`, ensure we're being called (i.e `.each()()`) + if ( + node.callee.type !== AST_NODE_TYPES.TaggedTemplateExpression && + node.parent?.type !== AST_NODE_TYPES.CallExpression && + getAccessorValue(callee.property) === 'each' + ) { + return false; + } + + return callee.object.type === AST_NODE_TYPES.MemberExpression + ? isTestCaseName(callee.object.object) + : isTestCaseName(callee.object); + } + + return false; +}; + +const isDescribeAlias = (node: TSESTree.LeftHandSideExpression) => + node.type === AST_NODE_TYPES.Identifier && + DescribeAlias.hasOwnProperty(node.name); + +const isDescribeProperty = ( + node: TSESTree.Expression, +): node is AccessorNode => + isSupportedAccessor(node) && + DescribeProperty.hasOwnProperty(getAccessorValue(node)); + +/** + * Checks if the given `node` is a *call* to a `describe` function that would + * result in a `describe` block being created by `jest`. + * + * Note that `.each()` does not count as a call in this context, as it will not + * result in `jest` creating any `describe` blocks. + * + * @param {TSESTree.CallExpression} node + * + * @return {node is JestFunctionCallExpression} + */ +export const isDescribeCall = ( + node: TSESTree.CallExpression, +): node is JestFunctionCallExpression => { + if (isDescribeAlias(node.callee)) { + return true; + } + + const callee = + node.callee.type === AST_NODE_TYPES.TaggedTemplateExpression + ? node.callee.tag + : node.callee; + + if ( + callee.type === AST_NODE_TYPES.MemberExpression && + isDescribeProperty(callee.property) + ) { + // if we're an `each()`, ensure we're being called (i.e `.each()()`) + if ( + node.callee.type !== AST_NODE_TYPES.TaggedTemplateExpression && + node.parent?.type !== AST_NODE_TYPES.CallExpression && + getAccessorValue(callee.property) === 'each' + ) { + return false; + } + + return callee.object.type === AST_NODE_TYPES.MemberExpression + ? isDescribeAlias(callee.object.object) + : isDescribeAlias(callee.object); + } + + return false; +}; export const isDescribe = ( node: TSESTree.CallExpression, diff --git a/src/rules/valid-title.ts b/src/rules/valid-title.ts index c970d0fbf..f92c5e3a1 100644 --- a/src/rules/valid-title.ts +++ b/src/rules/valid-title.ts @@ -10,9 +10,9 @@ import { getJestFunctionArguments, getNodeName, getStringValue, - isDescribe, + isDescribeCall, isStringNode, - isTestCase, + isTestCaseCall, } from './utils'; const trimFXprefix = (word: string) => @@ -161,7 +161,7 @@ export default createRule<[Options], MessageIds>({ return { CallExpression(node: TSESTree.CallExpression) { - if (!isDescribe(node) && !isTestCase(node)) { + if (!isDescribeCall(node) && !isTestCaseCall(node)) { return; } @@ -181,7 +181,7 @@ export default createRule<[Options], MessageIds>({ if ( argument.type !== AST_NODE_TYPES.TemplateLiteral && - !(ignoreTypeOfDescribeName && isDescribe(node)) + !(ignoreTypeOfDescribeName && isDescribeCall(node)) ) { context.report({ messageId: 'titleMustBeString', @@ -198,7 +198,7 @@ export default createRule<[Options], MessageIds>({ context.report({ messageId: 'emptyTitle', data: { - jestFunctionName: isDescribe(node) + jestFunctionName: isDescribeCall(node) ? DescribeAlias.describe : TestCaseName.test, }, diff --git a/yarn.lock b/yarn.lock index bd215209a..00e63829b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -51,26 +51,26 @@ __metadata: languageName: node linkType: hard -"@babel/compat-data@npm:^7.13.0, @babel/compat-data@npm:^7.13.8": - version: 7.13.11 - resolution: "@babel/compat-data@npm:7.13.11" - checksum: cb491342012dbec6482d27e302688e1d13db932f631a55279c98a9ce22b94f5a24731f93e29a4fac8a0c2f2533f23a4ad9699d930044b562778dd6e0f4d5e369 +"@babel/compat-data@npm:^7.13.0, @babel/compat-data@npm:^7.13.12, @babel/compat-data@npm:^7.13.8": + version: 7.13.12 + resolution: "@babel/compat-data@npm:7.13.12" + checksum: a7165243d68ee4d3f22cddd431175678df9c01dc12c11621ba8a76af9907d922d68afaa9f32a05ce2b85e55895dd8ca5c9407a8ec72ffcda12400ca24714d15a languageName: node linkType: hard -"@babel/core@npm:7.13.10, @babel/core@npm:^7.1.0, @babel/core@npm:^7.4.4, @babel/core@npm:^7.7.5": - version: 7.13.10 - resolution: "@babel/core@npm:7.13.10" +"@babel/core@npm:7.13.13, @babel/core@npm:^7.1.0, @babel/core@npm:^7.4.4, @babel/core@npm:^7.7.5": + version: 7.13.13 + resolution: "@babel/core@npm:7.13.13" dependencies: "@babel/code-frame": ^7.12.13 "@babel/generator": ^7.13.9 - "@babel/helper-compilation-targets": ^7.13.10 - "@babel/helper-module-transforms": ^7.13.0 + "@babel/helper-compilation-targets": ^7.13.13 + "@babel/helper-module-transforms": ^7.13.12 "@babel/helpers": ^7.13.10 - "@babel/parser": ^7.13.10 + "@babel/parser": ^7.13.13 "@babel/template": ^7.12.13 - "@babel/traverse": ^7.13.0 - "@babel/types": ^7.13.0 + "@babel/traverse": ^7.13.13 + "@babel/types": ^7.13.13 convert-source-map: ^1.7.0 debug: ^4.1.0 gensync: ^1.0.0-beta.2 @@ -78,11 +78,11 @@ __metadata: lodash: ^4.17.19 semver: ^6.3.0 source-map: ^0.5.0 - checksum: 728249a0bae293547d987e4d9886a14dda663d8cb629eb59c9d9ad3ee455048c2ccc3858c82305229ad4a415c2f39579abaa3982b653d40de348c39a3beb5e4d + checksum: 94436aaafa9536de056528513bcd585e1a862ccf9c94fd0d52bdbb5507cb9b6927ecbd3b9cefed98b74b70d07db1e5b3796926a0d333ba3e10caee3180a06f32 languageName: node linkType: hard -"@babel/generator@npm:^7.13.0, @babel/generator@npm:^7.13.9": +"@babel/generator@npm:^7.13.9": version: 7.13.9 resolution: "@babel/generator@npm:7.13.9" dependencies: @@ -112,17 +112,17 @@ __metadata: languageName: node linkType: hard -"@babel/helper-compilation-targets@npm:^7.13.0, @babel/helper-compilation-targets@npm:^7.13.10, @babel/helper-compilation-targets@npm:^7.13.8": - version: 7.13.10 - resolution: "@babel/helper-compilation-targets@npm:7.13.10" +"@babel/helper-compilation-targets@npm:^7.13.0, @babel/helper-compilation-targets@npm:^7.13.10, @babel/helper-compilation-targets@npm:^7.13.13, @babel/helper-compilation-targets@npm:^7.13.8": + version: 7.13.13 + resolution: "@babel/helper-compilation-targets@npm:7.13.13" dependencies: - "@babel/compat-data": ^7.13.8 + "@babel/compat-data": ^7.13.12 "@babel/helper-validator-option": ^7.12.17 browserslist: ^4.14.5 semver: ^6.3.0 peerDependencies: "@babel/core": ^7.0.0 - checksum: 80eb7a380d01d785de42006370e13bbda63b76745a8da1c68dcbf3dc4bff630bd9db8a76cf3053628c61d91c1452328a4ad9a8d9fc24ed65c02f635327234678 + checksum: 2d77381d5fa0e488e86b2abbf5c299a6c1b0e490c95d3ca9a63fac8d45713a182a32fedabceb207588681ae09fc1c19c5418c26e686ae752d46102c9537f9ec7 languageName: node linkType: hard @@ -210,38 +210,37 @@ __metadata: languageName: node linkType: hard -"@babel/helper-member-expression-to-functions@npm:^7.13.0": - version: 7.13.0 - resolution: "@babel/helper-member-expression-to-functions@npm:7.13.0" +"@babel/helper-member-expression-to-functions@npm:^7.13.0, @babel/helper-member-expression-to-functions@npm:^7.13.12": + version: 7.13.12 + resolution: "@babel/helper-member-expression-to-functions@npm:7.13.12" dependencies: - "@babel/types": ^7.13.0 - checksum: 9baaab9910a96c0f201b71c6cc39037dce5d32a321f61347ac489ddbef2bcbd232adcadeaa8e44d8c9a7216226c009b57f9d65697d90d7a8ed2c27682932d959 + "@babel/types": ^7.13.12 + checksum: 2c075f72e5bda1432c74484548272577485d45c4d6c7cc9e84c5d053eaa6e0890e93c9b018bab97f65cbb81ac04dd9cdca73d5ae0e94b03cfc00d10972b99185 languageName: node linkType: hard -"@babel/helper-module-imports@npm:^7.12.13": - version: 7.12.13 - resolution: "@babel/helper-module-imports@npm:7.12.13" +"@babel/helper-module-imports@npm:^7.12.13, @babel/helper-module-imports@npm:^7.13.12": + version: 7.13.12 + resolution: "@babel/helper-module-imports@npm:7.13.12" dependencies: - "@babel/types": ^7.12.13 - checksum: 9832436fb44361b2d7a0b7d99f18b7c0529afb94202ab92b578147aba062447e9a1cff33bc95db33189686fa922c62f23da296870958eee2f862b3aa89809159 + "@babel/types": ^7.13.12 + checksum: 4d1d3364bec0820e50c782b5a5c81e7987c260c14772bc594ca8dbfdb3b6e43bd9b4e5071fd2a5f777c822dc7440781fa904f643e2069755db9ba5033cb2beac languageName: node linkType: hard -"@babel/helper-module-transforms@npm:^7.13.0": - version: 7.13.0 - resolution: "@babel/helper-module-transforms@npm:7.13.0" +"@babel/helper-module-transforms@npm:^7.13.0, @babel/helper-module-transforms@npm:^7.13.12": + version: 7.13.12 + resolution: "@babel/helper-module-transforms@npm:7.13.12" dependencies: - "@babel/helper-module-imports": ^7.12.13 - "@babel/helper-replace-supers": ^7.13.0 - "@babel/helper-simple-access": ^7.12.13 + "@babel/helper-module-imports": ^7.13.12 + "@babel/helper-replace-supers": ^7.13.12 + "@babel/helper-simple-access": ^7.13.12 "@babel/helper-split-export-declaration": ^7.12.13 "@babel/helper-validator-identifier": ^7.12.11 "@babel/template": ^7.12.13 "@babel/traverse": ^7.13.0 - "@babel/types": ^7.13.0 - lodash: ^4.17.19 - checksum: b7e45c67eeaca488fa7a7bb0afebaec25b91f94cb04d32229ef799bd3a31ef5b566737fefd139b20c6525817528816e43bf492372c77e352e2a0e4d03b1fe21b + "@babel/types": ^7.13.12 + checksum: d2f9bb7a62685c54570b5e78a567d2a75748e55eca70bd11924b3a15c50017864dbe37697952889e17e1c1764e99fe28e9ca1959e014e57e56f73cc09f0a2e19 languageName: node linkType: hard @@ -272,24 +271,24 @@ __metadata: languageName: node linkType: hard -"@babel/helper-replace-supers@npm:^7.12.13, @babel/helper-replace-supers@npm:^7.13.0": - version: 7.13.0 - resolution: "@babel/helper-replace-supers@npm:7.13.0" +"@babel/helper-replace-supers@npm:^7.12.13, @babel/helper-replace-supers@npm:^7.13.0, @babel/helper-replace-supers@npm:^7.13.12": + version: 7.13.12 + resolution: "@babel/helper-replace-supers@npm:7.13.12" dependencies: - "@babel/helper-member-expression-to-functions": ^7.13.0 + "@babel/helper-member-expression-to-functions": ^7.13.12 "@babel/helper-optimise-call-expression": ^7.12.13 "@babel/traverse": ^7.13.0 - "@babel/types": ^7.13.0 - checksum: b32ab3f4d6a4e7f80c361eb9c0a001c2ae498f885248cb567c8de2475fb3dcbdf7ddd32a9e9a926abf55cf4f46faad7ceebfd3d035dea5508c3d9ba55d4083cc + "@babel/types": ^7.13.12 + checksum: 38b79cb56a9a5324e32567660fcafbac4efae6f2c2c2ef048deb2d022476fc1c7acfda5ab841f7135d07b4f39e62142f9d253cfe824232030432c86f94d226f1 languageName: node linkType: hard -"@babel/helper-simple-access@npm:^7.12.13": - version: 7.12.13 - resolution: "@babel/helper-simple-access@npm:7.12.13" +"@babel/helper-simple-access@npm:^7.12.13, @babel/helper-simple-access@npm:^7.13.12": + version: 7.13.12 + resolution: "@babel/helper-simple-access@npm:7.13.12" dependencies: - "@babel/types": ^7.12.13 - checksum: 34f19da4b8129006d660ff6d704d493a447852268a1360727a7de32087c7cead4c2548a3bb73c8fee7afa2dcad85087d53f9b0cabe071f3bf5cc27f35de9e7c8 + "@babel/types": ^7.13.12 + checksum: eff532a1572a4ac562c5918a409871ddf9baee9ece197b98a54622184d3b9e01bdd465597f27ca3d452e71638c913a14819cf261dc095a466032dfd92a88bc73 languageName: node linkType: hard @@ -359,12 +358,25 @@ __metadata: languageName: node linkType: hard -"@babel/parser@npm:^7.1.0, @babel/parser@npm:^7.12.13, @babel/parser@npm:^7.13.0, @babel/parser@npm:^7.13.10": - version: 7.13.11 - resolution: "@babel/parser@npm:7.13.11" +"@babel/parser@npm:^7.1.0, @babel/parser@npm:^7.12.13, @babel/parser@npm:^7.13.13": + version: 7.13.13 + resolution: "@babel/parser@npm:7.13.13" bin: parser: ./bin/babel-parser.js - checksum: 3ab6f6097efc72ac9212831f8f1c17fbcf9f0a6d1b12fa2486a51db4674cf3e86674d0ff62ba789933703119e69ac5daf8d1bb9e400eb4a613df8b0103104ab6 + checksum: ae20be2d964cec7c6e8f1c8154b0b6457852a6269f957964b5cc7f39baa5b71dc733b9e88cc3f5b91de171f4c023d272040bf31065bef1573aa0e88dd0f3ee75 + languageName: node + linkType: hard + +"@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@npm:^7.13.12": + version: 7.13.12 + resolution: "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@npm:7.13.12" + dependencies: + "@babel/helper-plugin-utils": ^7.13.0 + "@babel/helper-skip-transparent-expression-wrappers": ^7.12.1 + "@babel/plugin-proposal-optional-chaining": ^7.13.12 + peerDependencies: + "@babel/core": ^7.13.0 + checksum: ad0b508a5c3f3436ff0ff598b7aad63686bfe7f846b19c862c09397bc987ab9244b866204440496cf6d1b7ec07ea01a6fe95fd3067dbdf58ec48d9d4d4d9a440 languageName: node linkType: hard @@ -492,16 +504,16 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-proposal-optional-chaining@npm:^7.13.8": - version: 7.13.8 - resolution: "@babel/plugin-proposal-optional-chaining@npm:7.13.8" +"@babel/plugin-proposal-optional-chaining@npm:^7.13.12": + version: 7.13.12 + resolution: "@babel/plugin-proposal-optional-chaining@npm:7.13.12" dependencies: "@babel/helper-plugin-utils": ^7.13.0 "@babel/helper-skip-transparent-expression-wrappers": ^7.12.1 "@babel/plugin-syntax-optional-chaining": ^7.8.3 peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 8295f1ceda1bc40eb281b611eeebc087db843de318bbffeecd245b0a0ffe7df723ec99c39579d2e1089af2694abde938f30defb16c5f909423fa6d57a7155598 + checksum: 8663cfbf5cdfe41f8765976b94de9525c223085d53bb48bd481a03539a7680f2aa3b3fd525d80144e1c1c646cbad817fea7ef8da573bbf0600ddde32fab7420b languageName: node linkType: hard @@ -1084,13 +1096,14 @@ __metadata: linkType: hard "@babel/preset-env@npm:^7.4.4": - version: 7.13.10 - resolution: "@babel/preset-env@npm:7.13.10" + version: 7.13.12 + resolution: "@babel/preset-env@npm:7.13.12" dependencies: - "@babel/compat-data": ^7.13.8 + "@babel/compat-data": ^7.13.12 "@babel/helper-compilation-targets": ^7.13.10 "@babel/helper-plugin-utils": ^7.13.0 "@babel/helper-validator-option": ^7.12.17 + "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": ^7.13.12 "@babel/plugin-proposal-async-generator-functions": ^7.13.8 "@babel/plugin-proposal-class-properties": ^7.13.0 "@babel/plugin-proposal-dynamic-import": ^7.13.8 @@ -1101,7 +1114,7 @@ __metadata: "@babel/plugin-proposal-numeric-separator": ^7.12.13 "@babel/plugin-proposal-object-rest-spread": ^7.13.8 "@babel/plugin-proposal-optional-catch-binding": ^7.13.8 - "@babel/plugin-proposal-optional-chaining": ^7.13.8 + "@babel/plugin-proposal-optional-chaining": ^7.13.12 "@babel/plugin-proposal-private-methods": ^7.13.0 "@babel/plugin-proposal-unicode-property-regex": ^7.12.13 "@babel/plugin-syntax-async-generators": ^7.8.4 @@ -1149,7 +1162,7 @@ __metadata: "@babel/plugin-transform-unicode-escapes": ^7.12.13 "@babel/plugin-transform-unicode-regex": ^7.12.13 "@babel/preset-modules": ^0.1.4 - "@babel/types": ^7.13.0 + "@babel/types": ^7.13.12 babel-plugin-polyfill-corejs2: ^0.1.4 babel-plugin-polyfill-corejs3: ^0.1.3 babel-plugin-polyfill-regenerator: ^0.1.2 @@ -1157,7 +1170,7 @@ __metadata: semver: ^6.3.0 peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 1f23eb25dea448fd75a3e525f71181d535d2884fe50c7fbb9aa29918b997a7d92ba27cfb55f8b4070bc1b0507ab3d2d7ba9ee612a972e0f0b7447d4455d2b447 + checksum: e86ef0d986e388b5c4efd0b426975cc1e41d0aecea9b94ba54904ad06f2ba92d5ee82c3a073edb21cd7ca15b2a22970478cbdd63a69fb2f01d65161904aa998c languageName: node linkType: hard @@ -1209,31 +1222,30 @@ __metadata: languageName: node linkType: hard -"@babel/traverse@npm:^7.1.0, @babel/traverse@npm:^7.13.0": - version: 7.13.0 - resolution: "@babel/traverse@npm:7.13.0" +"@babel/traverse@npm:^7.1.0, @babel/traverse@npm:^7.13.0, @babel/traverse@npm:^7.13.13": + version: 7.13.13 + resolution: "@babel/traverse@npm:7.13.13" dependencies: "@babel/code-frame": ^7.12.13 - "@babel/generator": ^7.13.0 + "@babel/generator": ^7.13.9 "@babel/helper-function-name": ^7.12.13 "@babel/helper-split-export-declaration": ^7.12.13 - "@babel/parser": ^7.13.0 - "@babel/types": ^7.13.0 + "@babel/parser": ^7.13.13 + "@babel/types": ^7.13.13 debug: ^4.1.0 globals: ^11.1.0 - lodash: ^4.17.19 - checksum: e5d1b690157da325b5bea98e472f4df0fff16048242a70880e2da7939b005ccd5b63d2b4527e203cfc71a422da0fa513c0ad84114bff002d583ebd7dbd2c8576 + checksum: 2669b654730a308747c38c0f89a873fa2452c7e2e23532988e529a4dec6c09a6b862f50a6ea139afc496bd0f85a86c4ff922b262d6c41ab43c1df3886b3bbb1e languageName: node linkType: hard -"@babel/types@npm:^7.0.0, @babel/types@npm:^7.12.1, @babel/types@npm:^7.12.13, @babel/types@npm:^7.13.0, @babel/types@npm:^7.3.0, @babel/types@npm:^7.3.3, @babel/types@npm:^7.4.4, @babel/types@npm:^7.8.3": - version: 7.13.0 - resolution: "@babel/types@npm:7.13.0" +"@babel/types@npm:^7.0.0, @babel/types@npm:^7.12.1, @babel/types@npm:^7.12.13, @babel/types@npm:^7.13.0, @babel/types@npm:^7.13.12, @babel/types@npm:^7.13.13, @babel/types@npm:^7.3.0, @babel/types@npm:^7.3.3, @babel/types@npm:^7.4.4, @babel/types@npm:^7.8.3": + version: 7.13.13 + resolution: "@babel/types@npm:7.13.13" dependencies: "@babel/helper-validator-identifier": ^7.12.11 lodash: ^4.17.19 to-fast-properties: ^2.0.0 - checksum: a47357647a92c08ee2f5059210d37fd7fe190e8d4ef71dd97ba61c6ca7b7e979660bc8ba00fdc51249c037199b634dd984fde8d7a622fdd5e3e2161fe65e94c3 + checksum: 7c55948f2fc45979f0a7c1a1c9f281a74fc47b0eef0d781d67aeaef8b501eca7ddaf8d29361b147b3bd9cf62985168a4ecc6ff841cd77fcda1f1afd999f3dd3f languageName: node linkType: hard @@ -1763,10 +1775,10 @@ __metadata: languageName: node linkType: hard -"@octokit/openapi-types@npm:^5.3.2": - version: 5.3.2 - resolution: "@octokit/openapi-types@npm:5.3.2" - checksum: 5c5f2f2f6ea26192072b408b3e5ce8087d4eb256addda5ebcd2e58a0a94af49e135482c0e15768ee2998c329ed178d8f491b5d229bb2f283dede2389b0bb20c9 +"@octokit/openapi-types@npm:^6.0.0": + version: 6.0.0 + resolution: "@octokit/openapi-types@npm:6.0.0" + checksum: a748ee26656a1b2a5a5d616b1a3749ef5a9f858ad0eac21dbe8c51fef84560d5171b8d4969f86edf7339ebdd58726948b8d2354b6e40fc31c8289a5d8a3f4d50 languageName: node linkType: hard @@ -1790,15 +1802,15 @@ __metadata: languageName: node linkType: hard -"@octokit/plugin-rest-endpoint-methods@npm:4.13.5": - version: 4.13.5 - resolution: "@octokit/plugin-rest-endpoint-methods@npm:4.13.5" +"@octokit/plugin-rest-endpoint-methods@npm:5.0.0": + version: 5.0.0 + resolution: "@octokit/plugin-rest-endpoint-methods@npm:5.0.0" dependencies: - "@octokit/types": ^6.12.2 + "@octokit/types": ^6.13.0 deprecation: ^2.3.1 peerDependencies: "@octokit/core": ">=3" - checksum: 0c758acd10bb11da239a4f16c8d51b17623a170627064649e5a0a70e982549e0ef1268a2db0cf7d98c2122046648c9eff93296859301deaf82d198b0ab07ea3f + checksum: bd9a3ebd8164d8a1ecc1d10d41f00852763afef19acce816a05b4ab1e3200ae3738e87d6c2e6a8123940421bfcf43d371a4d734ce12021bf7ba675fd72617f92 languageName: node linkType: hard @@ -1830,23 +1842,23 @@ __metadata: linkType: hard "@octokit/rest@npm:^18.0.0": - version: 18.3.5 - resolution: "@octokit/rest@npm:18.3.5" + version: 18.5.2 + resolution: "@octokit/rest@npm:18.5.2" dependencies: "@octokit/core": ^3.2.3 "@octokit/plugin-paginate-rest": ^2.6.2 "@octokit/plugin-request-log": ^1.0.2 - "@octokit/plugin-rest-endpoint-methods": 4.13.5 - checksum: 833b054c222524cd144b999d4c631f8a4457f5835c2e8aae7da663717d76e46265211ceaec73deb50149a07dd5deb25fadd148a04f830d91491268f2288b69c3 + "@octokit/plugin-rest-endpoint-methods": 5.0.0 + checksum: b6c8ee91fb5d59a3a6d9a107bacb93c5b2578c15bf6af6b3900f2045653870c57ed3a4e9318069cd1b21261f75193d48a10bb9276477be8a614e73e7fe2cede7 languageName: node linkType: hard -"@octokit/types@npm:^6.0.3, @octokit/types@npm:^6.11.0, @octokit/types@npm:^6.12.2, @octokit/types@npm:^6.7.1": - version: 6.12.2 - resolution: "@octokit/types@npm:6.12.2" +"@octokit/types@npm:^6.0.3, @octokit/types@npm:^6.11.0, @octokit/types@npm:^6.13.0, @octokit/types@npm:^6.7.1": + version: 6.13.0 + resolution: "@octokit/types@npm:6.13.0" dependencies: - "@octokit/openapi-types": ^5.3.2 - checksum: d96bb9fae7f71c849f952432ffbcecc5ce2d00c18044bfb8d993625b9c9852ad6a672f2c144ab198f4e6a3618c744bdc833158b7c02e810659b006736ab73ed5 + "@octokit/openapi-types": ^6.0.0 + checksum: 20e7f159be0ebd386291b8e37521f191ca1adc922e2096b6f1434e980336f3a5ee4073bc0e99a8bb91e1657c4a8a1671ce458fbe299d918d773bd4bcf7cb8f5c languageName: node linkType: hard @@ -2090,12 +2102,12 @@ __metadata: linkType: hard "@types/jest@npm:^26.0.0": - version: 26.0.21 - resolution: "@types/jest@npm:26.0.21" + version: 26.0.22 + resolution: "@types/jest@npm:26.0.22" dependencies: jest-diff: ^26.0.0 pretty-format: ^26.0.0 - checksum: c219599d663527302a261aaa7cc038b79c428d7af39b0a20c2167cb698ae280f3a238b2ca3594bcabbe7ee441a6370d4b3afd19c4a616aaa5556d5b9e875c081 + checksum: 4c98ed058522f6cc74bcb47b8b7b104b77b2d4e42e087171f3d2d3ae5338c21f43ec26f2a186bc229c1bd72c3f776ad07faba837f0ec27f22cf94e154516c0b3 languageName: node linkType: hard @@ -2130,9 +2142,9 @@ __metadata: linkType: hard "@types/node@npm:*, @types/node@npm:^14.0.0": - version: 14.14.35 - resolution: "@types/node@npm:14.14.35" - checksum: 0f6320bf5370d1ff82105fb7f26aa0658499c97d3ec78561e65b65724280244f281602541182b63470d2c8a98db22fbb4f91409c5c7c97da8c3bb8f97fbc5dbc + version: 14.14.37 + resolution: "@types/node@npm:14.14.37" + checksum: 5e2d9baf7594ebacaf016716515f30de0765169412787f981481c2fb8b468923149bb9e2e3219ee672399811672ceddc339a7372a61cf15bc656836a5494d991 languageName: node linkType: hard @@ -2197,11 +2209,11 @@ __metadata: linkType: hard "@typescript-eslint/eslint-plugin@npm:^4.0.1": - version: 4.18.0 - resolution: "@typescript-eslint/eslint-plugin@npm:4.18.0" + version: 4.19.0 + resolution: "@typescript-eslint/eslint-plugin@npm:4.19.0" dependencies: - "@typescript-eslint/experimental-utils": 4.18.0 - "@typescript-eslint/scope-manager": 4.18.0 + "@typescript-eslint/experimental-utils": 4.19.0 + "@typescript-eslint/scope-manager": 4.19.0 debug: ^4.1.1 functional-red-black-tree: ^1.0.1 lodash: ^4.17.15 @@ -2214,66 +2226,66 @@ __metadata: peerDependenciesMeta: typescript: optional: true - checksum: f137baf23f42345986a3570016ef0bacfff9f1e973f87962e09b826dde26b2f3d4c383a2b22839d2cd46baeb54753ac52c8837d41aa6caaf2ce122efdefea689 + checksum: 49280836614c8143f8a7a873fe7f41c022e4b4c680b2c23bc98cd106a4ec8ae58c856f034c0eb172f38d8ae6e858a3d0f0ea4c384f9859e7a745056c5f20de8a languageName: node linkType: hard -"@typescript-eslint/experimental-utils@npm:4.18.0, @typescript-eslint/experimental-utils@npm:^4.0.1, @typescript-eslint/experimental-utils@npm:^4.11.1": - version: 4.18.0 - resolution: "@typescript-eslint/experimental-utils@npm:4.18.0" +"@typescript-eslint/experimental-utils@npm:4.19.0, @typescript-eslint/experimental-utils@npm:^4.0.1, @typescript-eslint/experimental-utils@npm:^4.11.1": + version: 4.19.0 + resolution: "@typescript-eslint/experimental-utils@npm:4.19.0" dependencies: "@types/json-schema": ^7.0.3 - "@typescript-eslint/scope-manager": 4.18.0 - "@typescript-eslint/types": 4.18.0 - "@typescript-eslint/typescript-estree": 4.18.0 + "@typescript-eslint/scope-manager": 4.19.0 + "@typescript-eslint/types": 4.19.0 + "@typescript-eslint/typescript-estree": 4.19.0 eslint-scope: ^5.0.0 eslint-utils: ^2.0.0 peerDependencies: eslint: "*" - checksum: 1f1357b38aa6e1dc9088abec1c259372ff124be215644283df1725421c3faeeb90ca463c5e549247f10918d18031cd56b58b366d22a5c90e23f601826d1d7f3a + checksum: aac92241f5a73e6fb77270a106b8509ff6124873b16faeb1e2f48d492beb9f03cddd069d44c0e184a0621d315751224c957b40e52e25cf9d8bf0b358400316fc languageName: node linkType: hard "@typescript-eslint/parser@npm:^4.0.1": - version: 4.18.0 - resolution: "@typescript-eslint/parser@npm:4.18.0" + version: 4.19.0 + resolution: "@typescript-eslint/parser@npm:4.19.0" dependencies: - "@typescript-eslint/scope-manager": 4.18.0 - "@typescript-eslint/types": 4.18.0 - "@typescript-eslint/typescript-estree": 4.18.0 + "@typescript-eslint/scope-manager": 4.19.0 + "@typescript-eslint/types": 4.19.0 + "@typescript-eslint/typescript-estree": 4.19.0 debug: ^4.1.1 peerDependencies: eslint: ^5.0.0 || ^6.0.0 || ^7.0.0 peerDependenciesMeta: typescript: optional: true - checksum: d2f907dc2888078fa6aaca329e39209cc0ceff0dfe43657835b9fbd73678d848077572fdf451dd0cae4ea199b8bfa0f3791037bd9174049668914c7a8ac55157 + checksum: eb9033469250ca0db08442c0a504cb57db5541fd31d2036d6822bca9966f638fba199eb32b31d9574534c302ffc0ebba65c4dba62dddbe56a2c85df0a5c6597a languageName: node linkType: hard -"@typescript-eslint/scope-manager@npm:4.18.0": - version: 4.18.0 - resolution: "@typescript-eslint/scope-manager@npm:4.18.0" +"@typescript-eslint/scope-manager@npm:4.19.0": + version: 4.19.0 + resolution: "@typescript-eslint/scope-manager@npm:4.19.0" dependencies: - "@typescript-eslint/types": 4.18.0 - "@typescript-eslint/visitor-keys": 4.18.0 - checksum: c543d4bf73ad0193cca7303c376f15b099ee861be492a210cfc19909d2ec828b7dc898a59e17c89cc91e4cc2ea450731a83671d136cd995fb9b77f8a7db4d440 + "@typescript-eslint/types": 4.19.0 + "@typescript-eslint/visitor-keys": 4.19.0 + checksum: 746c74e40428e7a291832cb87fd96534a6cd081dbb9b4d83bbffa3486ab5e8ac59bacdef82d349e903c77c07f0ff784e3b2abc69022efc0f8f0cb445b91251a5 languageName: node linkType: hard -"@typescript-eslint/types@npm:4.18.0": - version: 4.18.0 - resolution: "@typescript-eslint/types@npm:4.18.0" - checksum: 45d3df0c4993ceab017df2a4502bb2e3d9b21e6554997a539b88dfa5899c83bf6156a823d15eeb679e65dec15ab07ff371c6e5c09f98c166ed94f79a8223ffab +"@typescript-eslint/types@npm:4.19.0": + version: 4.19.0 + resolution: "@typescript-eslint/types@npm:4.19.0" + checksum: 86378fece710a598683dc172ede1a871290b15329dc60c13674a1d18d9c41a51c4194b8a35f1a253d2ee2b7fc222b4d449329fc68d512e425f36e9b7fd3626bb languageName: node linkType: hard -"@typescript-eslint/typescript-estree@npm:4.18.0": - version: 4.18.0 - resolution: "@typescript-eslint/typescript-estree@npm:4.18.0" +"@typescript-eslint/typescript-estree@npm:4.19.0": + version: 4.19.0 + resolution: "@typescript-eslint/typescript-estree@npm:4.19.0" dependencies: - "@typescript-eslint/types": 4.18.0 - "@typescript-eslint/visitor-keys": 4.18.0 + "@typescript-eslint/types": 4.19.0 + "@typescript-eslint/visitor-keys": 4.19.0 debug: ^4.1.1 globby: ^11.0.1 is-glob: ^4.0.1 @@ -2282,17 +2294,17 @@ __metadata: peerDependenciesMeta: typescript: optional: true - checksum: b77e150d281d50aad89f915c05310b5f94fa2b1fc64eada20460d8a7f10c42d4c2a5ccffe185f128c965fc9bd209f77a0df8e1779af18b0a3a383241564ecc4b + checksum: 446457f2532f24c12740ffe24453a4ad32c3fc2a4e35c6dd8b8d8cb114c925d37084c4541a7723cd22ccdd83f205bc513134a2db0b6304900609f5acf2f69665 languageName: node linkType: hard -"@typescript-eslint/visitor-keys@npm:4.18.0": - version: 4.18.0 - resolution: "@typescript-eslint/visitor-keys@npm:4.18.0" +"@typescript-eslint/visitor-keys@npm:4.19.0": + version: 4.19.0 + resolution: "@typescript-eslint/visitor-keys@npm:4.19.0" dependencies: - "@typescript-eslint/types": 4.18.0 + "@typescript-eslint/types": 4.19.0 eslint-visitor-keys: ^2.0.0 - checksum: 654576d330531386773facffc715e213602721de8ca2f6268d71186a732975031954119fba414a4d502b4827b3941fae068ebb4368b4b7f94e937597b3f57d82 + checksum: d9cf3501ae69796850dcdadde7fdaa1f3fc27d54a380396cc6b67706f7d6329b0c35db9b23d96c83a4196a915681129fa6b324383fcee88f413e06f7d05edf16 languageName: node linkType: hard @@ -2357,7 +2369,7 @@ __metadata: languageName: node linkType: hard -"acorn@npm:^8.0.5": +"acorn@npm:^8.1.0": version: 8.1.0 resolution: "acorn@npm:8.1.0" bin: @@ -2424,15 +2436,15 @@ __metadata: languageName: node linkType: hard -"ajv@npm:^7.0.2": - version: 7.2.3 - resolution: "ajv@npm:7.2.3" +"ajv@npm:^8.0.1": + version: 8.0.1 + resolution: "ajv@npm:8.0.1" dependencies: fast-deep-equal: ^3.1.1 json-schema-traverse: ^1.0.0 require-from-string: ^2.0.2 uri-js: ^4.2.2 - checksum: 899b5879497c7df1f6ead6dffab789854b3371f33797e210b51a398cf325a54fd6855a20a757f7eb7b0f8fbf370d819aa5ec1cd335e7d31b421fb343a26a0fcc + checksum: 6ec271f8a4e2d938d5a28f21e927b31bec16c72e05cac68d21c53d71ec2c9360d504db529e5e891c11cc2939c9fdf922bece8a4500b0cfb0877bdd6acfef3949 languageName: node linkType: hard @@ -2453,11 +2465,11 @@ __metadata: linkType: hard "ansi-escapes@npm:^4.2.1, ansi-escapes@npm:^4.3.0, ansi-escapes@npm:^4.3.1": - version: 4.3.1 - resolution: "ansi-escapes@npm:4.3.1" + version: 4.3.2 + resolution: "ansi-escapes@npm:4.3.2" dependencies: - type-fest: ^0.11.0 - checksum: bcb39e57bd32af0236c4ded96aaf8ef5d86c5a4683762b0be998c68cd11d5afd93296f4b5e087a3557da82a899b7c4d081483d603a4d4647e6a6613bf1aded8a + type-fest: ^0.21.3 + checksum: eca4d4e15b214376b04c8ce16d75adcfdcf706c38d682474d84d007f792d2f0f2f217b613ed3e7545fa0ad9f1d815ccd2a942c6b1d3156fff01b00652090fcb8 languageName: node linkType: hard @@ -4269,9 +4281,9 @@ __metadata: linkType: hard "electron-to-chromium@npm:^1.3.649": - version: 1.3.693 - resolution: "electron-to-chromium@npm:1.3.693" - checksum: 3874c434f35fb9fd3cce149cc7086acbd176538dcb128d648ac24f2b7206d6aaf401a45e88cfaccb87c3a4d578fc114de6ca8ebf5be486e7d3f4e8c968c4236f + version: 1.3.701 + resolution: "electron-to-chromium@npm:1.3.701" + checksum: d80bdedc8935d16fdaaaea28a0860bf085c47b4990d1b986c7b0a6de41a1e0dd0cf0cb79d6a65b99560a144b11e81007a4d5e9ebc755f8e3b9ce69c7fe97ce52 languageName: node linkType: hard @@ -4676,8 +4688,8 @@ __metadata: linkType: hard "eslint@npm:^5.1.0 || ^6.0.0 || ^7.0.0": - version: 7.22.0 - resolution: "eslint@npm:7.22.0" + version: 7.23.0 + resolution: "eslint@npm:7.23.0" dependencies: "@babel/code-frame": 7.12.11 "@eslint/eslintrc": ^0.4.0 @@ -4718,7 +4730,7 @@ __metadata: v8-compile-cache: ^2.0.3 bin: eslint: bin/eslint.js - checksum: 9be0a215b6b1e2941318b3e0c11ada8ba9a4adacf5960ab916d07f1d619828af40cba00e8ed7d151b8c715ba8ea81f4c2a56e46a2558d9795788b4f410a95ec4 + checksum: f444869506eb0b53fdc6f6f6508b9f5daed51034af0289e6b201f996e7f2d06134f765ef598568269d2a0575dc9da5d3308bd2716f795b789d92e7febb654aab languageName: node linkType: hard @@ -4783,9 +4795,9 @@ __metadata: linkType: hard "exec-sh@npm:^0.3.2": - version: 0.3.4 - resolution: "exec-sh@npm:0.3.4" - checksum: cfdd8cbfde80cced18a9b6a361f531c9e99b9e5c0b010338dd1f20cb01aa480af21dc94932530bf07d51341807a79af897b5c31b86f8c2c8f42932e276c8089d + version: 0.3.6 + resolution: "exec-sh@npm:0.3.6" + checksum: 0205697efea87a52309a1ef8cf5339817c1ade8963aa92435f1754317aa242e03b7f3dbfa367c2c5313d239554f86a7ed9df10b459a674f24150b7577d64033c languageName: node linkType: hard @@ -5555,8 +5567,8 @@ __metadata: linkType: hard "globby@npm:^11.0.0, globby@npm:^11.0.1": - version: 11.0.2 - resolution: "globby@npm:11.0.2" + version: 11.0.3 + resolution: "globby@npm:11.0.3" dependencies: array-union: ^2.1.0 dir-glob: ^3.0.1 @@ -5564,7 +5576,7 @@ __metadata: ignore: ^5.1.4 merge2: ^1.3.0 slash: ^3.0.0 - checksum: d23f2a6b8897b97fb27422cde243e0fd406ebbaa821929293b27c977d169884f8112494cda4f456a51d0ec1e133e3ac703ec24bfed484e327305ea34a665eb06 + checksum: f17da0f869918656ec8c16c15ad100f025fbd13e4c157286cf340811eb1355a7d06dde77be1685a7a051970ec6abeff96a9b2a1a97525f84bc94fbd518c1d1db languageName: node linkType: hard @@ -5643,7 +5655,7 @@ __metadata: languageName: node linkType: hard -"has-bigints@npm:^1.0.0": +"has-bigints@npm:^1.0.1": version: 1.0.1 resolution: "has-bigints@npm:1.0.1" checksum: 1074b644f5f2c319fc31af00fe2f81b6e21e204bb46da70ff7b970fe65c56f504e697fe6b41823ba679bd4111840482a83327d3432b8d670a684da4087ed074b @@ -5664,7 +5676,7 @@ __metadata: languageName: node linkType: hard -"has-symbols@npm:^1.0.0, has-symbols@npm:^1.0.1, has-symbols@npm:^1.0.2": +"has-symbols@npm:^1.0.1, has-symbols@npm:^1.0.2": version: 1.0.2 resolution: "has-symbols@npm:1.0.2" checksum: 1b73928752fa9ca993fa48f7b3832c95ea408c0ec635b2d6cbaf011b94a7e6a704a9254ae6d8ecc913d4dd92f2ff760dc43aad7c7e790ddb3f627005614d8e28 @@ -5741,11 +5753,11 @@ __metadata: linkType: hard "hosted-git-info@npm:^4.0.0, hosted-git-info@npm:^4.0.1": - version: 4.0.1 - resolution: "hosted-git-info@npm:4.0.1" + version: 4.0.2 + resolution: "hosted-git-info@npm:4.0.2" dependencies: lru-cache: ^6.0.0 - checksum: d32f706c34d3efbdf8532ecdd1d43775ff8a0a667a22ed816e3ba2046e7713527038c4225e72981257bb989fb66f8937a3d6355c4eb096897db58a68981373c1 + checksum: 838315facefdb2d0beb99c68d5a419e5f4f6151385fac4aff021d5817349b77f7780f18e04f48b11ad0fbeaf6ac5594351bc3eecdb353b8db41a4e080abdde67 languageName: node linkType: hard @@ -7119,11 +7131,11 @@ __metadata: linkType: hard "jsdom@npm:^16.4.0": - version: 16.5.1 - resolution: "jsdom@npm:16.5.1" + version: 16.5.2 + resolution: "jsdom@npm:16.5.2" dependencies: abab: ^2.0.5 - acorn: ^8.0.5 + acorn: ^8.1.0 acorn-globals: ^6.0.0 cssom: ^0.4.4 cssstyle: ^2.3.0 @@ -7145,7 +7157,7 @@ __metadata: webidl-conversions: ^6.1.0 whatwg-encoding: ^1.0.5 whatwg-mimetype: ^2.3.0 - whatwg-url: ^8.0.0 + whatwg-url: ^8.5.0 ws: ^7.4.4 xml-name-validator: ^3.0.0 peerDependencies: @@ -7153,7 +7165,7 @@ __metadata: peerDependenciesMeta: canvas: optional: true - checksum: 383d9aafff2a481b9668fcdd64ee6bb59977cce21844a588e2de07befaf897552d4141db6c2bed739dbbb714b2bcc2dd1a2fdb5196bff0676c2d43f18d1b0139 + checksum: a0be91b456596db988e1c5c6a146fcceb4fb6d401b947498c5b4cd7ff3202ce8ca3816be77a60d112bc45916fc7959fb7aeb98e81729c36bf4fef566c91c02db languageName: node linkType: hard @@ -7747,6 +7759,13 @@ __metadata: languageName: node linkType: hard +"lodash.flatten@npm:^4.4.0": + version: 4.4.0 + resolution: "lodash.flatten@npm:4.4.0" + checksum: f22a7f6f163256d87345b07c76122e03d03abbf943b6c3aa5e5fafb7d5bce765013aedfc2aae7e649af0907287a2cf85de24237dbdd3ecd485a77d56e070b54c + languageName: node + linkType: hard + "lodash.ismatch@npm:^4.4.0": version: 4.4.0 resolution: "lodash.ismatch@npm:4.4.0" @@ -7775,13 +7794,6 @@ __metadata: languageName: node linkType: hard -"lodash.sortby@npm:^4.7.0": - version: 4.7.0 - resolution: "lodash.sortby@npm:4.7.0" - checksum: 43cde11276c66da7b3eda5e9f00dc6edc276d2bcf0a5969ffc62b612cd1c4baf2eff5e84cee11383005722c460a9ca0f521fad4fa1cd2dc1ef013ee4da2dfe63 - languageName: node - linkType: hard - "lodash.toarray@npm:^4.4.0": version: 4.4.0 resolution: "lodash.toarray@npm:4.4.0" @@ -7789,6 +7801,13 @@ __metadata: languageName: node linkType: hard +"lodash.truncate@npm:^4.4.2": + version: 4.4.2 + resolution: "lodash.truncate@npm:4.4.2" + checksum: b1b0d7d993bb73d0032fe909d4523a836b6aa91566fa88ff78c3eac008bd3d3b2ba0f2e8381d7f906b1d6913a64982f34bea95dd556355c0d418bfddf3ab7b06 + languageName: node + linkType: hard + "lodash.union@npm:~4.6.0": version: 4.6.0 resolution: "lodash.union@npm:4.6.0" @@ -7817,7 +7836,7 @@ __metadata: languageName: node linkType: hard -"lodash@npm:^4.17.15, lodash@npm:^4.17.19, lodash@npm:^4.17.20, lodash@npm:^4.17.21, lodash@npm:^4.17.4": +"lodash@npm:^4.17.15, lodash@npm:^4.17.19, lodash@npm:^4.17.21, lodash@npm:^4.17.4, lodash@npm:^4.7.0": version: 4.17.21 resolution: "lodash@npm:4.17.21" checksum: 4983720b9abca930a4a46f18db163d7dad8dd00dbed6db0cc7b499b33b717cce69f80928b27bbb1ff2cbd3b19d251ee90669a8b5ea466072ca81c2ebe91e7468 @@ -8658,8 +8677,8 @@ __metadata: linkType: hard "npm@npm:^6.14.9": - version: 6.14.11 - resolution: "npm@npm:6.14.11" + version: 6.14.12 + resolution: "npm@npm:6.14.12" dependencies: JSONStream: ^1.3.5 abbrev: ~1.1.1 @@ -8787,7 +8806,7 @@ __metadata: bin: npm: bin/npm-cli.js npx: bin/npx-cli.js - checksum: e59ef76cbb4ce38e8dddf38fbc5cd2f4cdc129265596ef7852271e4a7226b1c0174c1ceca1a2312ae4e7169bb1c345d964cf2d4ff0d438711538bce2185c3114 + checksum: 4595da50a43a02045911a364e4a84e5f69872aa10468869198ee95627b3ae8a39ba2382999bcb7d5f639936f9ed409a8f0c81f8c7a7d27743cdaf8ca159193fc languageName: node linkType: hard @@ -9637,9 +9656,9 @@ __metadata: linkType: hard "queue-microtask@npm:^1.2.2": - version: 1.2.2 - resolution: "queue-microtask@npm:1.2.2" - checksum: 563abf1b1d0916842c017a4c0784fffebd0dd7d5685ffd65356dfee8f084e34e2a9b449aa788dddb2767f7dc79d1834545bb75f8f643b8aa85aea20a9efabbec + version: 1.2.3 + resolution: "queue-microtask@npm:1.2.3" + checksum: 0f88d794d4d825d39cdc2cda2fa701722858fc8de9567ad612776fce0d113376a3fc67f6a0091f31c9142b28f0c14fef08e9f92422b49f2372d5537e250fbfad languageName: node linkType: hard @@ -9672,9 +9691,9 @@ __metadata: linkType: hard "react-is@npm:^17.0.1": - version: 17.0.1 - resolution: "react-is@npm:17.0.1" - checksum: 5a83dfc78e7adcb93d632bf367b0733db650e3abd2e9c57c33b87e50d201212c1884b0d7bcf13e692f1556189fa1b87f9f3e0ba10fe858fd6aebe83ed4fcd1ea + version: 17.0.2 + resolution: "react-is@npm:17.0.2" + checksum: 3eff23f410d40ab9bc5177f147a92c7f42c356a21ecea340e0554566956d67e5e1ba56f26cc7fa22339ac3c7151744177bd6305eaa26d3cbf15f354358c9d9b6 languageName: node linkType: hard @@ -9887,9 +9906,9 @@ __metadata: linkType: hard "regenerator-runtime@npm:^0.13.4": - version: 0.13.7 - resolution: "regenerator-runtime@npm:0.13.7" - checksum: 6ef567c662088b1b292214920cbd72443059298d477f72e1a37e0a113bafbfac9057cbfe35ae617284effc4b423493326a78561bbff7b04162c7949bdb9624e8 + version: 0.13.8 + resolution: "regenerator-runtime@npm:0.13.8" + checksum: 20178f5753f181d59691e5c3b4c59a2769987f75c7ccf325777673b5478acca61a553b10e895585086c222f72f5ee428090acf50320264de4b79f630f7388653 languageName: node linkType: hard @@ -9969,13 +9988,13 @@ __metadata: linkType: hard "regjsparser@npm:^0.6.4": - version: 0.6.7 - resolution: "regjsparser@npm:0.6.7" + version: 0.6.9 + resolution: "regjsparser@npm:0.6.9" dependencies: jsesc: ~0.5.0 bin: regjsparser: bin/parser - checksum: 9f8f0f68f340a9d92fb3de5f5377c2dff326577b91f21ac965830b091760f709f01d69b636f6433fb0c152f3b341052b00d629926db5d67d4d275855ca11ce1e + checksum: ad533fe6ce6d156efb2a144a61166747317598069530205f9d9e3414e2642ff63eb59dbd7d01fcbc0daf18115b510d6494fa49ce30491f76c323695f3a16f2db languageName: node linkType: hard @@ -10232,11 +10251,11 @@ __metadata: linkType: hard "rxjs@npm:^6.6.6": - version: 6.6.6 - resolution: "rxjs@npm:6.6.6" + version: 6.6.7 + resolution: "rxjs@npm:6.6.7" dependencies: tslib: ^1.9.0 - checksum: c97b410e791b3259439be48cd37119b63eedc3809a5895d884a7ac27a6934ae4ec246be3d76f1b2f3b47c72a96500ad30977545dc8b0f4a0f98c52f5f773a8ea + checksum: 1146975cbd5388ee5e61450235dc5670931e43cce71813f567977d334acc4d75c6e8d9d293df67e1fb31510b99fc8957943d4a9b550d109e4dc69967a8471543 languageName: node linkType: hard @@ -10386,7 +10405,7 @@ __metadata: languageName: node linkType: hard -"semver@npm:7.3.4, semver@npm:^7.1.2, semver@npm:^7.2.1, semver@npm:^7.3.2, semver@npm:^7.3.4": +"semver@npm:7.3.4": version: 7.3.4 resolution: "semver@npm:7.3.4" dependencies: @@ -10406,6 +10425,17 @@ __metadata: languageName: node linkType: hard +"semver@npm:^7.1.2, semver@npm:^7.2.1, semver@npm:^7.3.2, semver@npm:^7.3.4": + version: 7.3.5 + resolution: "semver@npm:7.3.5" + dependencies: + lru-cache: ^6.0.0 + bin: + semver: bin/semver.js + checksum: c53624ddf4b9779bcbf55a1eb8b37074cc44bfeca416f3cc263429408202a8a3c59b00eef8c647d697303bc39b95c022a5c61959221d3814bfb1270ff7c14986 + languageName: node + linkType: hard + "set-blocking@npm:^2.0.0, set-blocking@npm:~2.0.0": version: 2.0.0 resolution: "set-blocking@npm:2.0.0" @@ -11109,14 +11139,19 @@ __metadata: linkType: hard "table@npm:^6.0.4": - version: 6.0.7 - resolution: "table@npm:6.0.7" + version: 6.0.8 + resolution: "table@npm:6.0.8" dependencies: - ajv: ^7.0.2 - lodash: ^4.17.20 + ajv: ^8.0.1 + is-boolean-object: ^1.1.0 + is-number-object: ^1.0.4 + is-string: ^1.0.5 + lodash.clonedeep: ^4.5.0 + lodash.flatten: ^4.4.0 + lodash.truncate: ^4.4.2 slice-ansi: ^4.0.0 string-width: ^4.2.0 - checksum: b28d81d6063110a8e94264ff17d3b7505fd344947f2c5cdf0fa71f7a622897fb15068686652d3aed8ed1c5817ca783be8a9c3419edf27808350ad29cc7d87fdf + checksum: 411ddc99521bd1f64eb87bae13c7127128525c2be3c9e64dea2318aa90cb7780670a0247a8c1338f239fd4f1e8b9a7ef9931ce800e508aa554546c92b6c6ba91 languageName: node linkType: hard @@ -11457,13 +11492,6 @@ __metadata: languageName: node linkType: hard -"type-fest@npm:^0.11.0": - version: 0.11.0 - resolution: "type-fest@npm:0.11.0" - checksum: 02e5cadf13590a5724cacf8d9133320efd173f6fb1b695fcb29e56551a315bf0f07ca988a780a1999b7b55bb3eaaa7f37223615207236d393af17bba6749dc95 - languageName: node - linkType: hard - "type-fest@npm:^0.16.0": version: 0.16.0 resolution: "type-fest@npm:0.16.0" @@ -11485,6 +11513,13 @@ __metadata: languageName: node linkType: hard +"type-fest@npm:^0.21.3": + version: 0.21.3 + resolution: "type-fest@npm:0.21.3" + checksum: bbe5f5c60e8da4e0b0fe290c31821b10c2fd935768802cd659784cb5e792c7a31bb25a89174d3b42dde3bf8eb9d301ede7456a274c1068280b7698438e250f49 + languageName: node + linkType: hard + "type-fest@npm:^0.6.0": version: 0.6.0 resolution: "type-fest@npm:0.6.0" @@ -11536,11 +11571,11 @@ typescript@^4.0.0: linkType: hard "uglify-js@npm:^3.1.4": - version: 3.13.2 - resolution: "uglify-js@npm:3.13.2" + version: 3.13.3 + resolution: "uglify-js@npm:3.13.3" bin: uglifyjs: bin/uglifyjs - checksum: 792068049181fab39e61791230f0116888a80f09f9e3b70e01172c238b23a580e23155f18b73a39e26ee04a51ad5d43883b33d4d0b01311470da4c65322a3729 + checksum: ff326348c2f06ae20336f7b390790a346906e316dd93c37c6d36c2a0112c220785a4974440ecefe676a2c0195a1e25265a9fed420009a530826f7567fa527f9c languageName: node linkType: hard @@ -11559,14 +11594,14 @@ typescript@^4.0.0: linkType: hard "unbox-primitive@npm:^1.0.0": - version: 1.0.0 - resolution: "unbox-primitive@npm:1.0.0" + version: 1.0.1 + resolution: "unbox-primitive@npm:1.0.1" dependencies: function-bind: ^1.1.1 - has-bigints: ^1.0.0 - has-symbols: ^1.0.0 - which-boxed-primitive: ^1.0.1 - checksum: 25e82f99bb40981f30615644305c757ecefff43d2ef2ac1b80e24f304f3002cd637eecb672bdd07f5fb858a265d96a4b2e983c714cba65498715acf7af23e86b + has-bigints: ^1.0.1 + has-symbols: ^1.0.2 + which-boxed-primitive: ^1.0.2 + checksum: aa944f1ecfec638b841b331383d0b80edc40855271ecc213c1aa736096d8d0b39ba25b64d102f56c597521db9cd3f0ddbcb97a0f760c240ab584e94e457518c1 languageName: node linkType: hard @@ -11913,18 +11948,18 @@ typescript@^4.0.0: languageName: node linkType: hard -"whatwg-url@npm:^8.0.0": - version: 8.4.0 - resolution: "whatwg-url@npm:8.4.0" +"whatwg-url@npm:^8.0.0, whatwg-url@npm:^8.5.0": + version: 8.5.0 + resolution: "whatwg-url@npm:8.5.0" dependencies: - lodash.sortby: ^4.7.0 + lodash: ^4.7.0 tr46: ^2.0.2 webidl-conversions: ^6.1.0 - checksum: c85dfbedd2554e76d05eba467509db3a0ed5740e3bf1069a10ca302da531d64399693e4952c61be67d119a6b7f634f3ff65fbe59555b30474f849a7e0ce2a4c6 + checksum: a070c4be45bd09e9f1593d678e798fb66cd2cbccd2a604a7453063c68ab4bb80b4a9e2a0a80562264e5963eb589311c6467599fdac9fb6a4112cd786397920e4 languageName: node linkType: hard -"which-boxed-primitive@npm:^1.0.1": +"which-boxed-primitive@npm:^1.0.2": version: 1.0.2 resolution: "which-boxed-primitive@npm:1.0.2" dependencies: