diff --git a/src/rules/__tests__/prefer-importing-jest-globals.test.ts b/src/rules/__tests__/prefer-importing-jest-globals.test.ts index b4cde3642..862bda007 100644 --- a/src/rules/__tests__/prefer-importing-jest-globals.test.ts +++ b/src/rules/__tests__/prefer-importing-jest-globals.test.ts @@ -67,7 +67,7 @@ ruleTester.run('prefer-importing-jest-globals', rule, { `, parserOptions: { sourceType: 'module' }, errors: [ - { endColumn: 3, column: 1, messageId: 'preferImportingJestGlobal' }, + { endColumn: 9, column: 1, messageId: 'preferImportingJestGlobal' }, ], }, { @@ -88,7 +88,7 @@ ruleTester.run('prefer-importing-jest-globals', rule, { `, parserOptions: { sourceType: 'module' }, errors: [ - { endColumn: 3, column: 1, messageId: 'preferImportingJestGlobal' }, + { endColumn: 9, column: 1, messageId: 'preferImportingJestGlobal' }, ], }, { @@ -109,7 +109,7 @@ ruleTester.run('prefer-importing-jest-globals', rule, { `, parserOptions: { sourceType: 'module' }, errors: [ - { endColumn: 3, column: 1, messageId: 'preferImportingJestGlobal' }, + { endColumn: 9, column: 1, messageId: 'preferImportingJestGlobal' }, ], }, { @@ -129,27 +129,27 @@ ruleTester.run('prefer-importing-jest-globals', rule, { `, parserOptions: { sourceType: 'module' }, errors: [ - { endColumn: 3, column: 1, messageId: 'preferImportingJestGlobal' }, + { endColumn: 9, column: 1, messageId: 'preferImportingJestGlobal' }, ], }, { code: dedent` const { test } = require('@jest/globals'); - describe("suite", () => { - test("foo"); + describe("suite", () => { + test("foo"); expect(true).toBeDefined(); }) `, output: dedent` const { test, describe, expect } = require('@jest/globals'); - describe("suite", () => { - test("foo"); + describe("suite", () => { + test("foo"); expect(true).toBeDefined(); }) `, parserOptions: { sourceType: 'module' }, errors: [ - { endColumn: 3, column: 1, messageId: 'preferImportingJestGlobal' }, + { endColumn: 9, column: 1, messageId: 'preferImportingJestGlobal' }, ], }, { @@ -160,15 +160,15 @@ ruleTester.run('prefer-importing-jest-globals', rule, { }); `, output: dedent` - const { describe, test } = require('@jest/globals'); const { pending } = require('actions'); + const { describe, test } = require('@jest/globals'); describe('foo', () => { test.each(['hello', 'world'])("%s", (a) => {}); }); `, parserOptions: { sourceType: 'module' }, errors: [ - { endColumn: 4, column: 1, messageId: 'preferImportingJestGlobal' }, + { endColumn: 9, column: 1, messageId: 'preferImportingJestGlobal' }, ], }, ], diff --git a/src/rules/prefer-importing-jest-globals.ts b/src/rules/prefer-importing-jest-globals.ts index cd6ca1b4e..68bd3d789 100644 --- a/src/rules/prefer-importing-jest-globals.ts +++ b/src/rules/prefer-importing-jest-globals.ts @@ -1,5 +1,5 @@ import type { Literal } from 'estree'; -import { createRule, parseJestFnCall } from './utils'; +import { type ParsedJestFnCall, createRule, parseJestFnCall } from './utils'; const createFixerImports = ( usesImport: boolean, @@ -30,7 +30,7 @@ export default createRule({ defaultOptions: [], create(context) { const importedJestFunctions: string[] = []; - const usedJestFunctions = new Set(); + const usedJestFunctions: ParsedJestFnCall[] = []; return { CallExpression(node) { @@ -44,138 +44,142 @@ export default createRule({ importedJestFunctions.push(jestFnCall.name); } - usedJestFunctions.add(jestFnCall.name); + usedJestFunctions.push(jestFnCall); }, 'Program:exit'() { - const jestFunctionsToImport = Array.from(usedJestFunctions).filter( - jestFunction => !importedJestFunctions.includes(jestFunction), + const jestFunctionsToReport = usedJestFunctions.filter( + jestFunction => !importedJestFunctions.includes(jestFunction.name), ); - if (jestFunctionsToImport.length > 0) { - const node = context.getSourceCode().ast; - const jestFunctionsToImportFormatted = - jestFunctionsToImport.join(', '); - - context.report({ - node, - messageId: 'preferImportingJestGlobal', - data: { jestFunctions: jestFunctionsToImportFormatted }, - fix(fixer) { - const sourceCode = context.getSourceCode(); - const usesImport = sourceCode.ast.body.some( - node => node.type === 'ImportDeclaration', - ); - const [firstNode] = sourceCode.ast.body; - - let firstNodeValue; - - if (firstNode.type === 'ExpressionStatement') { - const firstExpression = firstNode.expression as Literal; - const { value } = firstExpression; - - firstNodeValue = value; - } - - const useStrictDirectiveExists = - firstNode.type === 'ExpressionStatement' && - firstNodeValue === 'use strict'; - - if (useStrictDirectiveExists) { - return fixer.insertTextAfter( - firstNode, - `\n${createFixerImports(usesImport, jestFunctionsToImport)}`, - ); - } - - const importNode = sourceCode.ast.body.find( - node => - node.type === 'ImportDeclaration' && - node.source.value === '@jest/globals', + if (!jestFunctionsToReport.length) { + return; + } + const jestFunctionsToImport = jestFunctionsToReport.map( + jestFunction => jestFunction.name, + ); + const reportingNode = jestFunctionsToReport[0].head.node; + + const jestFunctionsToImportFormatted = jestFunctionsToImport.join(', '); + + context.report({ + node: reportingNode, + messageId: 'preferImportingJestGlobal', + data: { jestFunctions: jestFunctionsToImportFormatted }, + fix(fixer) { + const sourceCode = context.getSourceCode(); + const usesImport = sourceCode.ast.body.some( + node => node.type === 'ImportDeclaration', + ); + const [firstNode] = sourceCode.ast.body; + + let firstNodeValue; + + if (firstNode.type === 'ExpressionStatement') { + const firstExpression = firstNode.expression as Literal; + const { value } = firstExpression; + + firstNodeValue = value; + } + + const useStrictDirectiveExists = + firstNode.type === 'ExpressionStatement' && + firstNodeValue === 'use strict'; + + if (useStrictDirectiveExists) { + return fixer.insertTextAfter( + firstNode, + `\n${createFixerImports(usesImport, jestFunctionsToImport)}`, ); - - if (importNode && importNode.type === 'ImportDeclaration') { - const existingImports = importNode.specifiers.map(specifier => { - /* istanbul ignore else */ - if (specifier.type === 'ImportSpecifier') { - return specifier.imported?.name; - } - - // istanbul ignore next - return null; - }); - const allImports = [ - ...new Set([ - ...existingImports.filter( - (imp): imp is string => imp !== null, - ), - ...jestFunctionsToImport, - ]), - ]; - - return fixer.replaceText( - importNode, - createFixerImports(usesImport, allImports), - ); - } - - const requireNode = sourceCode.ast.body.find( - node => - node.type === 'VariableDeclaration' && - node.declarations.some( - declaration => - declaration.init && - (declaration.init as any).callee && - (declaration.init as any).callee.name === 'require' && - (declaration.init as any).arguments?.[0]?.type === - 'Literal' && - (declaration.init as any).arguments?.[0]?.value === - '@jest/globals', + } + + const importNode = sourceCode.ast.body.find( + node => + node.type === 'ImportDeclaration' && + node.source.value === '@jest/globals', + ); + + if (importNode && importNode.type === 'ImportDeclaration') { + const existingImports = importNode.specifiers.map(specifier => { + /* istanbul ignore else */ + if (specifier.type === 'ImportSpecifier') { + return specifier.imported?.name; + } + + // istanbul ignore next + return null; + }); + const allImports = [ + ...new Set([ + ...existingImports.filter( + (imp): imp is string => imp !== null, ), - ); + ...jestFunctionsToImport, + ]), + ]; - if (requireNode && requireNode.type === 'VariableDeclaration') { - const existingImports = - requireNode.declarations[0]?.id.type === 'ObjectPattern' - ? requireNode.declarations[0]?.id.properties?.map( - property => { + return fixer.replaceText( + importNode, + createFixerImports(usesImport, allImports), + ); + } + + const requireNode = sourceCode.ast.body.find( + node => + node.type === 'VariableDeclaration' && + node.declarations.some( + declaration => + declaration.init && + (declaration.init as any).callee && + (declaration.init as any).callee.name === 'require' && + (declaration.init as any).arguments?.[0]?.type === + 'Literal' && + (declaration.init as any).arguments?.[0]?.value === + '@jest/globals', + ), + ); + + if (requireNode && requireNode.type === 'VariableDeclaration') { + const existingImports = + requireNode.declarations[0]?.id.type === 'ObjectPattern' + ? requireNode.declarations[0]?.id.properties?.map( + property => { + /* istanbul ignore else */ + if (property.type === 'Property') { /* istanbul ignore else */ - if (property.type === 'Property') { - /* istanbul ignore else */ - if (property.key.type === 'Identifier') { - return property.key.name; - } + if (property.key.type === 'Identifier') { + return property.key.name; } + } + + // istanbul ignore next + return null; + }, + ) || + // istanbul ignore next + [] + : // istanbul ignore next + []; + const allImports = [ + ...new Set([ + ...existingImports.filter( + (imp): imp is string => imp !== null, + ), + ...jestFunctionsToImport, + ]), + ]; - // istanbul ignore next - return null; - }, - ) || - // istanbul ignore next - [] - : // istanbul ignore next - []; - const allImports = [ - ...new Set([ - ...existingImports.filter( - (imp): imp is string => imp !== null, - ), - ...jestFunctionsToImport, - ]), - ]; - - return fixer.replaceText( - requireNode, - `${createFixerImports(usesImport, allImports)}`, - ); - } - - return fixer.insertTextBefore( - node, - `${createFixerImports(usesImport, jestFunctionsToImport)}\n`, + return fixer.replaceText( + requireNode, + `${createFixerImports(usesImport, allImports)}`, ); - }, - }); - } + } + + return fixer.insertTextBefore( + reportingNode, + `${createFixerImports(usesImport, jestFunctionsToImport)}\n`, + ); + }, + }); }, }; }, diff --git a/yarn.lock b/yarn.lock index 174a9ad21..d2fd5c3a5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -23,8 +23,8 @@ __metadata: linkType: hard "@babel/cli@npm:^7.4.4": - version: 7.23.4 - resolution: "@babel/cli@npm:7.23.4" + version: 7.23.9 + resolution: "@babel/cli@npm:7.23.9" dependencies: "@jridgewell/trace-mapping": ^0.3.17 "@nicolo-ribaudo/chokidar-2": 2.1.8-no-fsevents.3 @@ -45,7 +45,7 @@ __metadata: bin: babel: ./bin/babel.js babel-external-helpers: ./bin/babel-external-helpers.js - checksum: 5a4f296cdf0b15a8578a860ad42675a358d888e11088c91ee5e510b48598d1dd88d83686d6fe6744c0a9cbcddfd34e79bc75ea425ced8ec9a2531e08c2655279 + checksum: 2952312b73f9a0a2566e556f821ca04502aa747118530af5186a1943f338aec5d6abbe4e14b3916d27428b77c5ebc223e83a9c6cea8868342c51368613acb51c languageName: node linkType: hard @@ -67,25 +67,25 @@ __metadata: linkType: hard "@babel/core@npm:^7.11.6, @babel/core@npm:^7.12.3, @babel/core@npm:^7.4.4": - version: 7.23.7 - resolution: "@babel/core@npm:7.23.7" + version: 7.23.9 + resolution: "@babel/core@npm:7.23.9" dependencies: "@ampproject/remapping": ^2.2.0 "@babel/code-frame": ^7.23.5 "@babel/generator": ^7.23.6 "@babel/helper-compilation-targets": ^7.23.6 "@babel/helper-module-transforms": ^7.23.3 - "@babel/helpers": ^7.23.7 - "@babel/parser": ^7.23.6 - "@babel/template": ^7.22.15 - "@babel/traverse": ^7.23.7 - "@babel/types": ^7.23.6 + "@babel/helpers": ^7.23.9 + "@babel/parser": ^7.23.9 + "@babel/template": ^7.23.9 + "@babel/traverse": ^7.23.9 + "@babel/types": ^7.23.9 convert-source-map: ^2.0.0 debug: ^4.1.0 gensync: ^1.0.0-beta.2 json5: ^2.2.3 semver: ^6.3.1 - checksum: 32d5bf73372a47429afaae9adb0af39e47bcea6a831c4b5dcbb4791380cda6949cb8cb1a2fea8b60bb1ebe189209c80e333903df1fa8e9dcb04798c0ce5bf59e + checksum: 634a511f74db52a5f5a283c1121f25e2227b006c095b84a02a40a9213842489cd82dc7d61cdc74e10b5bcd9bb0a4e28bab47635b54c7e2256d47ab57356e2a76 languageName: node linkType: hard @@ -133,8 +133,8 @@ __metadata: linkType: hard "@babel/helper-create-class-features-plugin@npm:^7.22.15, @babel/helper-create-class-features-plugin@npm:^7.23.6": - version: 7.23.7 - resolution: "@babel/helper-create-class-features-plugin@npm:7.23.7" + version: 7.23.9 + resolution: "@babel/helper-create-class-features-plugin@npm:7.23.9" dependencies: "@babel/helper-annotate-as-pure": ^7.22.5 "@babel/helper-environment-visitor": ^7.22.20 @@ -147,7 +147,7 @@ __metadata: semver: ^6.3.1 peerDependencies: "@babel/core": ^7.0.0 - checksum: 33e60714b856c3816a7965d4c76278cc8f430644a2dfc4eeafad2f7167c4fbd2becdb74cbfeb04b02efd6bbd07176ef53c6683262b588e65d378438e9c55c26b + checksum: 0f0c8592ec8833c0fd1d131655de929af07942fd626049d1e8fae5d85c1fe33fad97f7e9457a14b10258bc926a0cb39debc54a553abe8b4f7575c446d1c16d80 languageName: node linkType: hard @@ -164,21 +164,6 @@ __metadata: languageName: node linkType: hard -"@babel/helper-define-polyfill-provider@npm:^0.4.4": - version: 0.4.4 - resolution: "@babel/helper-define-polyfill-provider@npm:0.4.4" - dependencies: - "@babel/helper-compilation-targets": ^7.22.6 - "@babel/helper-plugin-utils": ^7.22.5 - debug: ^4.1.1 - lodash.debounce: ^4.0.8 - resolve: ^1.14.2 - peerDependencies: - "@babel/core": ^7.4.0 || ^8.0.0-0 <8.0.0 - checksum: 2453cdd79f18a4cb8653d8a7e06b2eb0d8e31bae0d35070fc5abadbddca246a36d82b758064b421cca49b48d0e696d331d54520ba8582c1d61fb706d6d831817 - languageName: node - linkType: hard - "@babel/helper-define-polyfill-provider@npm:^0.5.0": version: 0.5.0 resolution: "@babel/helper-define-polyfill-provider@npm:0.5.0" @@ -354,14 +339,14 @@ __metadata: languageName: node linkType: hard -"@babel/helpers@npm:^7.23.7": - version: 7.23.8 - resolution: "@babel/helpers@npm:7.23.8" +"@babel/helpers@npm:^7.23.9": + version: 7.23.9 + resolution: "@babel/helpers@npm:7.23.9" dependencies: - "@babel/template": ^7.22.15 - "@babel/traverse": ^7.23.7 - "@babel/types": ^7.23.6 - checksum: 8b522d527921f8df45a983dc7b8e790c021250addf81ba7900ba016e165442a527348f6f877aa55e1debb3eef9e860a334b4e8d834e6c9b438ed61a63d9a7ad4 + "@babel/template": ^7.23.9 + "@babel/traverse": ^7.23.9 + "@babel/types": ^7.23.9 + checksum: 2678231192c0471dbc2fc403fb19456cc46b1afefcfebf6bc0f48b2e938fdb0fef2e0fe90c8c8ae1f021dae5012b700372e4b5d15867f1d7764616532e4a6324 languageName: node linkType: hard @@ -376,12 +361,12 @@ __metadata: languageName: node linkType: hard -"@babel/parser@npm:^7.1.0, @babel/parser@npm:^7.14.7, @babel/parser@npm:^7.20.7, @babel/parser@npm:^7.22.15, @babel/parser@npm:^7.23.6": - version: 7.23.6 - resolution: "@babel/parser@npm:7.23.6" +"@babel/parser@npm:^7.1.0, @babel/parser@npm:^7.14.7, @babel/parser@npm:^7.20.7, @babel/parser@npm:^7.23.9": + version: 7.23.9 + resolution: "@babel/parser@npm:7.23.9" bin: parser: ./bin/babel-parser.js - checksum: 140801c43731a6c41fd193f5c02bc71fd647a0360ca616b23d2db8be4b9739b9f951a03fc7c2db4f9b9214f4b27c1074db0f18bc3fa653783082d5af7c8860d5 + checksum: e7cd4960ac8671774e13803349da88d512f9292d7baa952173260d3e8f15620a28a3701f14f709d769209022f9e7b79965256b8be204fc550cfe783cdcabe7c7 languageName: node linkType: hard @@ -673,9 +658,9 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-async-generator-functions@npm:^7.23.7": - version: 7.23.7 - resolution: "@babel/plugin-transform-async-generator-functions@npm:7.23.7" +"@babel/plugin-transform-async-generator-functions@npm:^7.23.9": + version: 7.23.9 + resolution: "@babel/plugin-transform-async-generator-functions@npm:7.23.9" dependencies: "@babel/helper-environment-visitor": ^7.22.20 "@babel/helper-plugin-utils": ^7.22.5 @@ -683,7 +668,7 @@ __metadata: "@babel/plugin-syntax-async-generators": ^7.8.4 peerDependencies: "@babel/core": ^7.0.0-0 - checksum: b1f66b23423933c27336b1161ac92efef46683321caea97e2255a666f992979376f47a5559f64188d3831fa66a4b24c2a7a40838cc0e9737e90eebe20e8e6372 + checksum: d402494087a6b803803eb5ab46b837aab100a04c4c5148e38bfa943ea1bbfc1ecfb340f1ced68972564312d3580f550c125f452372e77607a558fbbaf98c31c0 languageName: node linkType: hard @@ -943,9 +928,9 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-modules-systemjs@npm:^7.23.3": - version: 7.23.3 - resolution: "@babel/plugin-transform-modules-systemjs@npm:7.23.3" +"@babel/plugin-transform-modules-systemjs@npm:^7.23.9": + version: 7.23.9 + resolution: "@babel/plugin-transform-modules-systemjs@npm:7.23.9" dependencies: "@babel/helper-hoist-variables": ^7.22.5 "@babel/helper-module-transforms": ^7.23.3 @@ -953,7 +938,7 @@ __metadata: "@babel/helper-validator-identifier": ^7.22.20 peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 0d2fdd993c785aecac9e0850cd5ed7f7d448f0fbb42992a950cc0590167144df25d82af5aac9a5c99ef913d2286782afa44e577af30c10901c5ee8984910fa1f + checksum: cec6abeae6be66fd1a5940c482fe9ff94b689c71fcf4147e179119e4accd09d17d476e36528bc9cb4ab0ec6728fedf48b1c49d0551ea707fb192575d8eac9167 languageName: node linkType: hard @@ -1257,8 +1242,8 @@ __metadata: linkType: hard "@babel/preset-env@npm:^7.4.4": - version: 7.23.8 - resolution: "@babel/preset-env@npm:7.23.8" + version: 7.23.9 + resolution: "@babel/preset-env@npm:7.23.9" dependencies: "@babel/compat-data": ^7.23.5 "@babel/helper-compilation-targets": ^7.23.6 @@ -1287,7 +1272,7 @@ __metadata: "@babel/plugin-syntax-top-level-await": ^7.14.5 "@babel/plugin-syntax-unicode-sets-regex": ^7.18.6 "@babel/plugin-transform-arrow-functions": ^7.23.3 - "@babel/plugin-transform-async-generator-functions": ^7.23.7 + "@babel/plugin-transform-async-generator-functions": ^7.23.9 "@babel/plugin-transform-async-to-generator": ^7.23.3 "@babel/plugin-transform-block-scoped-functions": ^7.23.3 "@babel/plugin-transform-block-scoping": ^7.23.4 @@ -1309,7 +1294,7 @@ __metadata: "@babel/plugin-transform-member-expression-literals": ^7.23.3 "@babel/plugin-transform-modules-amd": ^7.23.3 "@babel/plugin-transform-modules-commonjs": ^7.23.3 - "@babel/plugin-transform-modules-systemjs": ^7.23.3 + "@babel/plugin-transform-modules-systemjs": ^7.23.9 "@babel/plugin-transform-modules-umd": ^7.23.3 "@babel/plugin-transform-named-capturing-groups-regex": ^7.22.5 "@babel/plugin-transform-new-target": ^7.23.3 @@ -1335,14 +1320,14 @@ __metadata: "@babel/plugin-transform-unicode-regex": ^7.23.3 "@babel/plugin-transform-unicode-sets-regex": ^7.23.3 "@babel/preset-modules": 0.1.6-no-external-plugins - babel-plugin-polyfill-corejs2: ^0.4.7 - babel-plugin-polyfill-corejs3: ^0.8.7 - babel-plugin-polyfill-regenerator: ^0.5.4 + babel-plugin-polyfill-corejs2: ^0.4.8 + babel-plugin-polyfill-corejs3: ^0.9.0 + babel-plugin-polyfill-regenerator: ^0.5.5 core-js-compat: ^3.31.0 semver: ^6.3.1 peerDependencies: "@babel/core": ^7.0.0-0 - checksum: b850f99fc4aed4ba22c7d9207bd2bbc7a729b49ea6f2c2c36e819fe209e309b96fba336096e555b46f791b39f7cdd5ac41246b556283d435a99106eb825a209f + checksum: 23a48468ba820c68ba34ea2c1dbc62fd2ff9cf858cfb69e159cabb0c85c72dc4c2266ce20ca84318d8742de050cb061e7c66902fbfddbcb09246afd248847933 languageName: node linkType: hard @@ -1382,28 +1367,28 @@ __metadata: linkType: hard "@babel/runtime@npm:^7.8.4": - version: 7.23.8 - resolution: "@babel/runtime@npm:7.23.8" + version: 7.23.9 + resolution: "@babel/runtime@npm:7.23.9" dependencies: regenerator-runtime: ^0.14.0 - checksum: 0bd5543c26811153822a9f382fd39886f66825ff2a397a19008011376533747cd05c33a91f6248c0b8b0edf0448d7c167ebfba34786088f1b7eb11c65be7dfc3 + checksum: 6bbebe8d27c0c2dd275d1ac197fc1a6c00e18dab68cc7aaff0adc3195b45862bae9c4cc58975629004b0213955b2ed91e99eccb3d9b39cabea246c657323d667 languageName: node linkType: hard -"@babel/template@npm:^7.22.15, @babel/template@npm:^7.3.3": - version: 7.22.15 - resolution: "@babel/template@npm:7.22.15" +"@babel/template@npm:^7.22.15, @babel/template@npm:^7.23.9, @babel/template@npm:^7.3.3": + version: 7.23.9 + resolution: "@babel/template@npm:7.23.9" dependencies: - "@babel/code-frame": ^7.22.13 - "@babel/parser": ^7.22.15 - "@babel/types": ^7.22.15 - checksum: 1f3e7dcd6c44f5904c184b3f7fe280394b191f2fed819919ffa1e529c259d5b197da8981b6ca491c235aee8dbad4a50b7e31304aa531271cb823a4a24a0dd8fd + "@babel/code-frame": ^7.23.5 + "@babel/parser": ^7.23.9 + "@babel/types": ^7.23.9 + checksum: 6e67414c0f7125d7ecaf20c11fab88085fa98a96c3ef10da0a61e962e04fdf3a18a496a66047005ddd1bb682a7cc7842d556d1db2f3f3f6ccfca97d5e445d342 languageName: node linkType: hard -"@babel/traverse@npm:^7.23.7": - version: 7.23.7 - resolution: "@babel/traverse@npm:7.23.7" +"@babel/traverse@npm:^7.23.9": + version: 7.23.9 + resolution: "@babel/traverse@npm:7.23.9" dependencies: "@babel/code-frame": ^7.23.5 "@babel/generator": ^7.23.6 @@ -1411,22 +1396,22 @@ __metadata: "@babel/helper-function-name": ^7.23.0 "@babel/helper-hoist-variables": ^7.22.5 "@babel/helper-split-export-declaration": ^7.22.6 - "@babel/parser": ^7.23.6 - "@babel/types": ^7.23.6 + "@babel/parser": ^7.23.9 + "@babel/types": ^7.23.9 debug: ^4.3.1 globals: ^11.1.0 - checksum: d4a7afb922361f710efc97b1e25ec343fab8b2a4ddc81ca84f9a153f22d4482112cba8f263774be8d297918b6c4767c7a98988ab4e53ac73686c986711dd002e + checksum: a932f7aa850e158c00c97aad22f639d48c72805c687290f6a73e30c5c4957c07f5d28310c9bf59648e2980fe6c9d16adeb2ff92a9ca0f97fa75739c1328fc6c3 languageName: node linkType: hard -"@babel/types@npm:^7.0.0, @babel/types@npm:^7.20.7, @babel/types@npm:^7.22.15, @babel/types@npm:^7.22.19, @babel/types@npm:^7.22.5, @babel/types@npm:^7.23.0, @babel/types@npm:^7.23.6, @babel/types@npm:^7.3.3, @babel/types@npm:^7.4.4, @babel/types@npm:^7.8.3": - version: 7.23.6 - resolution: "@babel/types@npm:7.23.6" +"@babel/types@npm:^7.0.0, @babel/types@npm:^7.20.7, @babel/types@npm:^7.22.15, @babel/types@npm:^7.22.19, @babel/types@npm:^7.22.5, @babel/types@npm:^7.23.0, @babel/types@npm:^7.23.6, @babel/types@npm:^7.23.9, @babel/types@npm:^7.3.3, @babel/types@npm:^7.4.4, @babel/types@npm:^7.8.3": + version: 7.23.9 + resolution: "@babel/types@npm:7.23.9" dependencies: "@babel/helper-string-parser": ^7.23.4 "@babel/helper-validator-identifier": ^7.22.20 to-fast-properties: ^2.0.0 - checksum: 68187dbec0d637f79bc96263ac95ec8b06d424396678e7e225492be866414ce28ebc918a75354d4c28659be6efe30020b4f0f6df81cc418a2d30645b690a8de0 + checksum: 0a9b008e9bfc89beb8c185e620fa0f8ed6c771f1e1b2e01e1596870969096fec7793898a1d64a035176abf1dd13e2668ee30bf699f2d92c210a8128f4b151e65 languageName: node linkType: hard @@ -2104,8 +2089,8 @@ __metadata: linkType: hard "@npmcli/arborist@npm:^7.2.1": - version: 7.3.0 - resolution: "@npmcli/arborist@npm:7.3.0" + version: 7.3.1 + resolution: "@npmcli/arborist@npm:7.3.1" dependencies: "@isaacs/string-locale-compare": ^1.1.0 "@npmcli/fs": ^3.1.0 @@ -2134,7 +2119,7 @@ __metadata: parse-conflict-json: ^3.0.0 proc-log: ^3.0.0 promise-all-reject-late: ^1.0.0 - promise-call-limit: ^1.0.2 + promise-call-limit: ^3.0.1 read-package-json-fast: ^3.0.2 semver: ^7.3.7 ssri: ^10.0.5 @@ -2142,7 +2127,7 @@ __metadata: walk-up-path: ^3.0.1 bin: arborist: bin/index.js - checksum: a407fc48db726abada3053dc422a86decf08da7200d72333dd6218d2e80b7c3cd6b3bd51e123bbc64d227ff0efd488ec09409763d73147b78ad71f75576a9e4a + checksum: 3fa39e73893be4fc7ec88259c8e8540f374cf1fe8b38715433e295f957812076c00b297ccda49565c030529e0f2fa6c90de401c922983c54a211c695f6c67694 languageName: node linkType: hard @@ -2279,16 +2264,16 @@ __metadata: languageName: node linkType: hard -"@npmcli/run-script@npm:^7.0.0, @npmcli/run-script@npm:^7.0.2, @npmcli/run-script@npm:^7.0.3": - version: 7.0.3 - resolution: "@npmcli/run-script@npm:7.0.3" +"@npmcli/run-script@npm:^7.0.0, @npmcli/run-script@npm:^7.0.2, @npmcli/run-script@npm:^7.0.4": + version: 7.0.4 + resolution: "@npmcli/run-script@npm:7.0.4" dependencies: "@npmcli/node-gyp": ^3.0.0 + "@npmcli/package-json": ^5.0.0 "@npmcli/promise-spawn": ^7.0.0 node-gyp: ^10.0.0 - read-package-json-fast: ^3.0.0 which: ^4.0.0 - checksum: 1e2d18d8d4166e76d94f115c33c305e57b9d7c6c32840e7de72f50a1e6be7d78930d1b83ac6a0ea2e8cb86cc1a838a83c714c7ebf268466983ec856827233c6e + checksum: c44d6874cffb0a2f6d947e230083b605b6f253450e24aa185ef28391dc366b10807cd4ca113fe367057b8b5310add36391894f9d782af15424830658ee386dfb languageName: node linkType: hard @@ -2625,7 +2610,7 @@ __metadata: languageName: node linkType: hard -"@sigstore/tuf@npm:^2.2.0, @sigstore/tuf@npm:^2.3.0": +"@sigstore/tuf@npm:^2.3.0": version: 2.3.0 resolution: "@sigstore/tuf@npm:2.3.0" dependencies: @@ -2861,11 +2846,11 @@ __metadata: linkType: hard "@types/node@npm:*": - version: 20.11.5 - resolution: "@types/node@npm:20.11.5" + version: 20.11.10 + resolution: "@types/node@npm:20.11.10" dependencies: undici-types: ~5.26.4 - checksum: a542727de1334ae20a3ca034b0ecf4b464a57ca01efc4f9cf43bd9ab93896125ab3c2de060ecd8f6ae23b86c6bf3463f681b643e69c032c6a662d376c98a6092 + checksum: 58544f52c14d839cc5fca7a9f001303016aefa85fea684de9aa3c24a1340a55a03a6744fa20f601ca032a9f9d08b32c1ff074ccb75dcd57d61a1a65c50a949b1 languageName: node linkType: hard @@ -3466,7 +3451,7 @@ __metadata: languageName: node linkType: hard -"babel-plugin-polyfill-corejs2@npm:^0.4.7": +"babel-plugin-polyfill-corejs2@npm:^0.4.8": version: 0.4.8 resolution: "babel-plugin-polyfill-corejs2@npm:0.4.8" dependencies: @@ -3479,19 +3464,19 @@ __metadata: languageName: node linkType: hard -"babel-plugin-polyfill-corejs3@npm:^0.8.7": - version: 0.8.7 - resolution: "babel-plugin-polyfill-corejs3@npm:0.8.7" +"babel-plugin-polyfill-corejs3@npm:^0.9.0": + version: 0.9.0 + resolution: "babel-plugin-polyfill-corejs3@npm:0.9.0" dependencies: - "@babel/helper-define-polyfill-provider": ^0.4.4 - core-js-compat: ^3.33.1 + "@babel/helper-define-polyfill-provider": ^0.5.0 + core-js-compat: ^3.34.0 peerDependencies: "@babel/core": ^7.4.0 || ^8.0.0-0 <8.0.0 - checksum: 51bc215ab0c062bbb2225d912f69f8a6705d1837c8e01f9651307b5b937804287c1d73ebd8015689efcc02c3c21f37688b9ee6f5997635619b7a9cc4b7d9908d + checksum: 65bbf59fc0145c7a264822777403632008dce00015b4b5c7ec359125ef4faf9e8f494ae5123d2992104feb6f19a3cff85631992862e48b6d7bd64eb7e755ee1f languageName: node linkType: hard -"babel-plugin-polyfill-regenerator@npm:^0.5.4": +"babel-plugin-polyfill-regenerator@npm:^0.5.5": version: 0.5.5 resolution: "babel-plugin-polyfill-regenerator@npm:0.5.5" dependencies: @@ -3626,16 +3611,16 @@ __metadata: linkType: hard "browserslist@npm:^4.22.2": - version: 4.22.2 - resolution: "browserslist@npm:4.22.2" + version: 4.22.3 + resolution: "browserslist@npm:4.22.3" dependencies: - caniuse-lite: ^1.0.30001565 - electron-to-chromium: ^1.4.601 + caniuse-lite: ^1.0.30001580 + electron-to-chromium: ^1.4.648 node-releases: ^2.0.14 update-browserslist-db: ^1.0.13 bin: browserslist: cli.js - checksum: 33ddfcd9145220099a7a1ac533cecfe5b7548ffeb29b313e1b57be6459000a1f8fa67e781cf4abee97268ac594d44134fcc4a6b2b4750ceddc9796e3a22076d9 + checksum: e62b17348e92143fe58181b02a6a97c4a98bd812d1dc9274673a54f73eec53dbed1c855ebf73e318ee00ee039f23c9a6d0e7629d24f3baef08c7a5b469742d57 languageName: node linkType: hard @@ -3727,10 +3712,10 @@ __metadata: languageName: node linkType: hard -"caniuse-lite@npm:^1.0.30001565": - version: 1.0.30001579 - resolution: "caniuse-lite@npm:1.0.30001579" - checksum: 7539dcff74d2243a30c428393dc690c87fa34d7da36434731853e9bcfe783757763b2971f5cc878e25242a93e184e53f167d11bd74955af956579f7af71cc764 +"caniuse-lite@npm:^1.0.30001580": + version: 1.0.30001581 + resolution: "caniuse-lite@npm:1.0.30001581" + checksum: ca4e2cd9d0acf5e3c71fa2e7cd65561e4532d32b640145f634c333792074bb63de1239b35abfb6b6d372f97caf26f8d97faac7ba51ef190717ad2d3ae9c0d7a2 languageName: node linkType: hard @@ -4217,7 +4202,7 @@ __metadata: languageName: node linkType: hard -"core-js-compat@npm:^3.31.0, core-js-compat@npm:^3.33.1": +"core-js-compat@npm:^3.31.0, core-js-compat@npm:^3.34.0": version: 3.35.1 resolution: "core-js-compat@npm:3.35.1" dependencies: @@ -4621,10 +4606,10 @@ __metadata: languageName: node linkType: hard -"electron-to-chromium@npm:^1.4.601": - version: 1.4.640 - resolution: "electron-to-chromium@npm:1.4.640" - checksum: 021b8da324b2e574ffd9cd6943a74f8116d1947dbd4a43c89025594c469e18f2437b2b354363528dbc822538f510137c6ae315bce9b94b1d1f6e5d1c9cd302ef +"electron-to-chromium@npm:^1.4.648": + version: 1.4.648 + resolution: "electron-to-chromium@npm:1.4.648" + checksum: 54f840e032b5e67c0b0023584455c9f0b1143601eb0959f96b97ea3a477c8847995890dd90eb7f0567a0eb1f99c8acd1128c3ef5bc7be6c7d0e7567398824495 languageName: node linkType: hard @@ -5369,11 +5354,11 @@ __metadata: linkType: hard "fastq@npm:^1.6.0": - version: 1.16.0 - resolution: "fastq@npm:1.16.0" + version: 1.17.0 + resolution: "fastq@npm:1.17.0" dependencies: reusify: ^1.0.4 - checksum: 1d40ed1f100ae625e5720484e8602b7ad07649370f1cbc3e34a6b9630a0bfed6946bab0322d8a368a1e3cde87bb9bbb8d3bc2ae01a0c1f022fac1d07c04e4feb + checksum: a1c88c357a220bdc666c2df5ec6071d49bdf79ea827d92f9a9559da3ff1b4288eecca3ecbb7b6ddf0ba016eb0a4bf756bf17c411a6d10c814aecd26e939cbd06 languageName: node linkType: hard @@ -7387,8 +7372,8 @@ __metadata: linkType: hard "libnpmdiff@npm:^6.0.3": - version: 6.0.5 - resolution: "libnpmdiff@npm:6.0.5" + version: 6.0.6 + resolution: "libnpmdiff@npm:6.0.6" dependencies: "@npmcli/arborist": ^7.2.1 "@npmcli/disparity-colors": ^3.0.0 @@ -7399,13 +7384,13 @@ __metadata: npm-package-arg: ^11.0.1 pacote: ^17.0.4 tar: ^6.2.0 - checksum: 313018a7f0085933acc43f1aa29785cdc9c2b8c496ae855e947781a473286a6f10a36046089d2df4ba2dba535428b8f6146c1aedee8cfd26bf2f47a83abc29b2 + checksum: b35434b46ecddd11ed6dce50262914b77eb7e2e386847ea0ffd9ad0564a5b084a840ca9f4d89759619bbb4b1b6bb0aa87804f0974385a1b502226f45dd2cb830 languageName: node linkType: hard "libnpmexec@npm:^7.0.4": - version: 7.0.6 - resolution: "libnpmexec@npm:7.0.6" + version: 7.0.7 + resolution: "libnpmexec@npm:7.0.7" dependencies: "@npmcli/arborist": ^7.2.1 "@npmcli/run-script": ^7.0.2 @@ -7418,16 +7403,16 @@ __metadata: read-package-json-fast: ^3.0.2 semver: ^7.3.7 walk-up-path: ^3.0.1 - checksum: e26fff5a1ff3745473260f7ff8c78f21d53c9ed76588b50b0ec93c11d98b9b98a4b115549e9069577a1b73f83c32c44ca2941c463360fc895ac8ded9ccd9d414 + checksum: 008c262e969250107fcc0253e56305a3a96d6dff9a3bebfb0da633831dde9bdeb771cf67f02e89212e34db65874795e82964043c586d121426dd09232b7382f8 languageName: node linkType: hard "libnpmfund@npm:^5.0.1": - version: 5.0.3 - resolution: "libnpmfund@npm:5.0.3" + version: 5.0.4 + resolution: "libnpmfund@npm:5.0.4" dependencies: "@npmcli/arborist": ^7.2.1 - checksum: 03e9100013523c1b3307c6f07a208fdeeeaa2efd05cf326868035c7efd64bf82fa1bd5dc35762abcf56d071bfb9f531d8a83102788051fecc35266ac8ff95439 + checksum: 89f62899757742fb1c948549d0e42d21a9170b724a356b48ef02597bd402ff89a99961f3acd87eadf72058002ce753233558c3752a398019eeac1367821ef378 languageName: node linkType: hard @@ -7452,20 +7437,20 @@ __metadata: linkType: hard "libnpmpack@npm:^6.0.3": - version: 6.0.5 - resolution: "libnpmpack@npm:6.0.5" + version: 6.0.6 + resolution: "libnpmpack@npm:6.0.6" dependencies: "@npmcli/arborist": ^7.2.1 "@npmcli/run-script": ^7.0.2 npm-package-arg: ^11.0.1 pacote: ^17.0.4 - checksum: 6d1149cc60350cad8b54641522dd811b852cb65f2da195cf4ff2d72be71f07b8c416a8f5e8000ed80338cfe0a9a50e037fe77d1dc6f47dbdd07fbe15b4fa006c + checksum: f27278b3b9a4791cc1192bc70781c5f827c49916d2045a80f76bb1b68e2d776bac94ec50fdf0fa6086c1583a89e3285ce0f26ce7915b94f7dfb287de2db8abc0 languageName: node linkType: hard "libnpmpublish@npm:^9.0.2": - version: 9.0.3 - resolution: "libnpmpublish@npm:9.0.3" + version: 9.0.4 + resolution: "libnpmpublish@npm:9.0.4" dependencies: ci-info: ^4.0.0 normalize-package-data: ^6.0.0 @@ -7473,9 +7458,9 @@ __metadata: npm-registry-fetch: ^16.0.0 proc-log: ^3.0.0 semver: ^7.3.7 - sigstore: ^2.1.0 + sigstore: ^2.2.0 ssri: ^10.0.5 - checksum: fec520a6be4165b430a446ca66ee9392b3b0f48bb331768f669244cfc0f940b3b52ebfaf9fcd7ef455d83fa1a608fa1bc5091e13f5967c28f51748122fd881dd + checksum: 0f7341b222cfd7d60721804cf2e1468fe4315e7ce77389ecc475d5b3b380dc8fdf13de40a8116e3da6a1d8544cbd467545227d4f62e5a2bc1637e110c80bbf6e languageName: node linkType: hard @@ -7769,9 +7754,9 @@ __metadata: linkType: hard "lru-cache@npm:^10.0.1, lru-cache@npm:^9.1.1 || ^10.0.0": - version: 10.1.0 - resolution: "lru-cache@npm:10.1.0" - checksum: 58056d33e2500fbedce92f8c542e7c11b50d7d086578f14b7074d8c241422004af0718e08a6eaae8705cee09c77e39a61c1c79e9370ba689b7010c152e6a76ab + version: 10.2.0 + resolution: "lru-cache@npm:10.2.0" + checksum: eee7ddda4a7475deac51ac81d7dd78709095c6fa46e8350dc2d22462559a1faa3b81ed931d5464b13d48cbd7e08b46100b6f768c76833912bc444b99c37e25db languageName: node linkType: hard @@ -8450,8 +8435,8 @@ __metadata: linkType: hard "npm@npm:^10.0.0": - version: 10.3.0 - resolution: "npm@npm:10.3.0" + version: 10.4.0 + resolution: "npm@npm:10.4.0" dependencies: "@isaacs/string-locale-compare": ^1.1.0 "@npmcli/arborist": ^7.2.1 @@ -8460,8 +8445,8 @@ __metadata: "@npmcli/map-workspaces": ^3.0.4 "@npmcli/package-json": ^5.0.0 "@npmcli/promise-spawn": ^7.0.1 - "@npmcli/run-script": ^7.0.3 - "@sigstore/tuf": ^2.2.0 + "@npmcli/run-script": ^7.0.4 + "@sigstore/tuf": ^2.3.0 abbrev: ^2.0.0 archy: ~1.0.0 cacache: ^18.0.2 @@ -8507,7 +8492,7 @@ __metadata: npm-user-validate: ^2.0.0 npmlog: ^7.0.1 p-map: ^4.0.0 - pacote: ^17.0.5 + pacote: ^17.0.6 parse-conflict-json: ^3.0.1 proc-log: ^3.0.0 qrcode-terminal: ^0.12.0 @@ -8515,7 +8500,6 @@ __metadata: semver: ^7.5.4 spdx-expression-parse: ^3.0.1 ssri: ^10.0.5 - strip-ansi: ^7.1.0 supports-color: ^9.4.0 tar: ^6.2.0 text-table: ~0.2.0 @@ -8527,7 +8511,7 @@ __metadata: bin: npm: bin/npm-cli.js npx: bin/npx-cli.js - checksum: 029d263a175e181c68d5fcc51d67192b7edb09bd973ae57fb9788d971e51dda17487b6ca77f6aa508f39c3fe47d142e0e7386c6abbdda2a6c1d2757c20a73bd6 + checksum: 81285b77f86b9d7cb6b6893a9792efe6cb11367d87180fe27304ff82d4eb24f84c9c08399648501779bc5d7c728278e35e387de2908c47903997a32ec8da90a3 languageName: node linkType: hard @@ -8788,7 +8772,7 @@ __metadata: languageName: node linkType: hard -"pacote@npm:^17.0.0, pacote@npm:^17.0.4, pacote@npm:^17.0.5": +"pacote@npm:^17.0.0, pacote@npm:^17.0.4, pacote@npm:^17.0.6": version: 17.0.6 resolution: "pacote@npm:17.0.6" dependencies: @@ -9107,10 +9091,10 @@ __metadata: languageName: node linkType: hard -"promise-call-limit@npm:^1.0.2": - version: 1.0.2 - resolution: "promise-call-limit@npm:1.0.2" - checksum: d0664dd2954c063115c58a4d0f929ff8dcfca634146dfdd4ec86f4993cfe14db229fb990457901ad04c923b3fb872067f3b47e692e0c645c01536b92fc4460bd +"promise-call-limit@npm:^3.0.1": + version: 3.0.1 + resolution: "promise-call-limit@npm:3.0.1" + checksum: f1b3c4d3a9c5482ce27ec5f40311e1389adb9bb10c16166e61c96d29ab22c701691d5225bf6745a162858f45dfb46cc82275fd09e7aa57846fc446c7855c2f06 languageName: node linkType: hard @@ -9857,7 +9841,7 @@ __metadata: languageName: node linkType: hard -"sigstore@npm:^2.1.0, sigstore@npm:^2.2.0": +"sigstore@npm:^2.2.0": version: 2.2.0 resolution: "sigstore@npm:2.2.0" dependencies: @@ -10003,9 +9987,9 @@ __metadata: linkType: hard "spdx-exceptions@npm:^2.1.0": - version: 2.3.0 - resolution: "spdx-exceptions@npm:2.3.0" - checksum: cb69a26fa3b46305637123cd37c85f75610e8c477b6476fa7354eb67c08128d159f1d36715f19be6f9daf4b680337deb8c65acdcae7f2608ba51931540687ac0 + version: 2.4.0 + resolution: "spdx-exceptions@npm:2.4.0" + checksum: b1b650a8d94424473bf9629cf972c86a91c03cccc260f5c901bce0e4b92d831627fec28c9e0a1e9c34c5ebad0a12cf2eab887bec088e0a862abb9d720c2fd0a1 languageName: node linkType: hard @@ -10185,7 +10169,7 @@ __metadata: languageName: node linkType: hard -"strip-ansi@npm:^7.0.1, strip-ansi@npm:^7.1.0": +"strip-ansi@npm:^7.0.1": version: 7.1.0 resolution: "strip-ansi@npm:7.1.0" dependencies: @@ -10621,9 +10605,9 @@ __metadata: linkType: hard "type-fest@npm:^4.6.0, type-fest@npm:^4.7.1": - version: 4.9.0 - resolution: "type-fest@npm:4.9.0" - checksum: 73383de23237b399a70397a53101152548846d919aebcc7d8733000c6c354dc2632fe37c4a70b8571b79fdbfa099e2d8304c5ac56b3254780acff93e4c7a797f + version: 4.10.1 + resolution: "type-fest@npm:4.10.1" + checksum: 93fa506a81c963d4a4efcf72daa730d7720366fd26cde38c2be816122d46dddebaf4faa91ab89f8b19482d1bbdf8c497858e11d451602eafc9ea9ab08aee7327 languageName: node linkType: hard