Update checked-in dependencies
This commit is contained in:
parent
1afca056e3
commit
6989ba7bd2
3942 changed files with 55190 additions and 132206 deletions
18
node_modules/eslint-module-utils/CHANGELOG.md
generated
vendored
18
node_modules/eslint-module-utils/CHANGELOG.md
generated
vendored
|
|
@ -5,6 +5,21 @@ This change log adheres to standards from [Keep a CHANGELOG](https://keepachange
|
|||
|
||||
## Unreleased
|
||||
|
||||
## v2.11.0 - 2024-09-05
|
||||
|
||||
### New
|
||||
- `declaredScope`: take a `node` for modern eslint versions (thanks [@michaelfaith])
|
||||
|
||||
## v2.10.0 - 2024-09-05
|
||||
|
||||
### New
|
||||
- add context compatibility helpers ([#3049], thanks [@michaelfaith])
|
||||
|
||||
## v2.9.0 - 2024-09-02
|
||||
|
||||
### New
|
||||
- add support for Flat Config ([#3018], thanks [@michaelfaith])
|
||||
|
||||
## v2.8.2 - 2024-08-25
|
||||
|
||||
### Fixed
|
||||
|
|
@ -150,7 +165,9 @@ Yanked due to critical issue with cache key resulting from #839.
|
|||
### Fixed
|
||||
- `unambiguous.test()` regex is now properly in multiline mode
|
||||
|
||||
[#3049]: https://github.com/import-js/eslint-plugin-import/pull/3049
|
||||
[#3039]: https://github.com/import-js/eslint-plugin-import/pull/3039
|
||||
[#3018]: https://github.com/import-js/eslint-plugin-import/pull/3018
|
||||
[#2963]: https://github.com/import-js/eslint-plugin-import/pull/2963
|
||||
[#2755]: https://github.com/import-js/eslint-plugin-import/pull/2755
|
||||
[#2714]: https://github.com/import-js/eslint-plugin-import/pull/2714
|
||||
|
|
@ -197,6 +214,7 @@ Yanked due to critical issue with cache key resulting from #839.
|
|||
[@manuth]: https://github.com/manuth
|
||||
[@maxkomarychev]: https://github.com/maxkomarychev
|
||||
[@mgwalker]: https://github.com/mgwalker
|
||||
[@michaelfaith]: https://github.com/michaelfaith
|
||||
[@Mysak0CZ]: https://github.com/Mysak0CZ
|
||||
[@nicolo-ribaudo]: https://github.com/nicolo-ribaudo
|
||||
[@pmcelhaney]: https://github.com/pmcelhaney
|
||||
|
|
|
|||
38
node_modules/eslint-module-utils/contextCompat.d.ts
generated
vendored
Normal file
38
node_modules/eslint-module-utils/contextCompat.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
import { Scope, SourceCode, Rule } from 'eslint';
|
||||
import * as ESTree from 'estree';
|
||||
|
||||
type LegacyContext = {
|
||||
getFilename: () => string,
|
||||
getPhysicalFilename: () => string,
|
||||
getSourceCode: () => SourceCode,
|
||||
getScope: never,
|
||||
getAncestors: never,
|
||||
getDeclaredVariables: never,
|
||||
};
|
||||
|
||||
type NewContext = {
|
||||
filename: string,
|
||||
sourceCode: SourceCode,
|
||||
getPhysicalFilename?: () => string,
|
||||
getScope: () => Scope.Scope,
|
||||
getAncestors: () => ESTree.Node[],
|
||||
getDeclaredVariables: (node: ESTree.Node) => Scope.Variable[],
|
||||
};
|
||||
|
||||
export type Context = LegacyContext | NewContext | Rule.RuleContext;
|
||||
|
||||
declare function getAncestors(context: Context, node: ESTree.Node): ESTree.Node[];
|
||||
declare function getDeclaredVariables(context: Context, node: ESTree.Node): Scope.Variable[];
|
||||
declare function getFilename(context: Context): string;
|
||||
declare function getPhysicalFilename(context: Context): string;
|
||||
declare function getScope(context: Context, node: ESTree.Node): Scope.Scope;
|
||||
declare function getSourceCode(context: Context): SourceCode;
|
||||
|
||||
export {
|
||||
getAncestors,
|
||||
getDeclaredVariables,
|
||||
getFilename,
|
||||
getPhysicalFilename,
|
||||
getScope,
|
||||
getSourceCode,
|
||||
};
|
||||
72
node_modules/eslint-module-utils/contextCompat.js
generated
vendored
Normal file
72
node_modules/eslint-module-utils/contextCompat.js
generated
vendored
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
'use strict';
|
||||
|
||||
exports.__esModule = true;
|
||||
|
||||
/** @type {import('./contextCompat').getAncestors} */
|
||||
function getAncestors(context, node) {
|
||||
const sourceCode = getSourceCode(context);
|
||||
|
||||
if (sourceCode && sourceCode.getAncestors) {
|
||||
return sourceCode.getAncestors(node);
|
||||
}
|
||||
|
||||
return context.getAncestors();
|
||||
}
|
||||
|
||||
/** @type {import('./contextCompat').getDeclaredVariables} */
|
||||
function getDeclaredVariables(context, node) {
|
||||
const sourceCode = getSourceCode(context);
|
||||
|
||||
if (sourceCode && sourceCode.getDeclaredVariables) {
|
||||
return sourceCode.getDeclaredVariables(node);
|
||||
}
|
||||
|
||||
return context.getDeclaredVariables(node);
|
||||
}
|
||||
|
||||
/** @type {import('./contextCompat').getFilename} */
|
||||
function getFilename(context) {
|
||||
if ('filename' in context) {
|
||||
return context.filename;
|
||||
}
|
||||
|
||||
return context.getFilename();
|
||||
}
|
||||
|
||||
/** @type {import('./contextCompat').getPhysicalFilename} */
|
||||
function getPhysicalFilename(context) {
|
||||
if (context.getPhysicalFilename) {
|
||||
return context.getPhysicalFilename();
|
||||
}
|
||||
|
||||
return getFilename(context);
|
||||
}
|
||||
|
||||
/** @type {import('./contextCompat').getScope} */
|
||||
function getScope(context, node) {
|
||||
const sourceCode = getSourceCode(context);
|
||||
|
||||
if (sourceCode && sourceCode.getScope) {
|
||||
return sourceCode.getScope(node);
|
||||
}
|
||||
|
||||
return context.getScope();
|
||||
}
|
||||
|
||||
/** @type {import('./contextCompat').getSourceCode} */
|
||||
function getSourceCode(context) {
|
||||
if ('sourceCode' in context) {
|
||||
return context.sourceCode;
|
||||
}
|
||||
|
||||
return context.getSourceCode();
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
getAncestors,
|
||||
getDeclaredVariables,
|
||||
getFilename,
|
||||
getPhysicalFilename,
|
||||
getScope,
|
||||
getSourceCode,
|
||||
};
|
||||
4
node_modules/eslint-module-utils/declaredScope.d.ts
generated
vendored
4
node_modules/eslint-module-utils/declaredScope.d.ts
generated
vendored
|
|
@ -1,8 +1,10 @@
|
|||
import { Rule, Scope } from 'eslint';
|
||||
import * as ESTree from 'estree';
|
||||
|
||||
declare function declaredScope(
|
||||
context: Rule.RuleContext,
|
||||
name: string
|
||||
name: string,
|
||||
node?: ESTree.Node,
|
||||
): Scope.Scope['type'] | undefined;
|
||||
|
||||
export default declaredScope;
|
||||
|
|
|
|||
6
node_modules/eslint-module-utils/declaredScope.js
generated
vendored
6
node_modules/eslint-module-utils/declaredScope.js
generated
vendored
|
|
@ -2,9 +2,11 @@
|
|||
|
||||
exports.__esModule = true;
|
||||
|
||||
const { getScope } = require('./contextCompat');
|
||||
|
||||
/** @type {import('./declaredScope').default} */
|
||||
exports.default = function declaredScope(context, name) {
|
||||
const references = context.getScope().references;
|
||||
exports.default = function declaredScope(context, name, node) {
|
||||
const references = (node ? getScope(context, node) : context.getScope()).references;
|
||||
const reference = references.find((x) => x.identifier.name === name);
|
||||
if (!reference || !reference.resolved) { return undefined; }
|
||||
return reference.resolved.scope.type;
|
||||
|
|
|
|||
10
node_modules/eslint-module-utils/ignore.js
generated
vendored
10
node_modules/eslint-module-utils/ignore.js
generated
vendored
|
|
@ -14,7 +14,7 @@ const log = require('debug')('eslint-plugin-import:utils:ignore');
|
|||
function makeValidExtensionSet(settings) {
|
||||
// start with explicit JS-parsed extensions
|
||||
/** @type {Set<import('./types').Extension>} */
|
||||
const exts = new Set(settings['import/extensions'] || ['.js']);
|
||||
const exts = new Set(settings['import/extensions'] || ['.js', '.mjs', '.cjs']);
|
||||
|
||||
// all alternate parser extensions are also valid
|
||||
if ('import/parsers' in settings) {
|
||||
|
|
@ -52,9 +52,13 @@ exports.hasValidExtension = hasValidExtension;
|
|||
/** @type {import('./ignore').default} */
|
||||
exports.default = function ignore(path, context) {
|
||||
// check extension whitelist first (cheap)
|
||||
if (!hasValidExtension(path, context)) { return true; }
|
||||
if (!hasValidExtension(path, context)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!('import/ignore' in context.settings)) { return false; }
|
||||
if (!('import/ignore' in context.settings)) {
|
||||
return false;
|
||||
}
|
||||
const ignoreStrings = context.settings['import/ignore'];
|
||||
|
||||
for (let i = 0; i < ignoreStrings.length; i++) {
|
||||
|
|
|
|||
3
node_modules/eslint-module-utils/package.json
generated
vendored
3
node_modules/eslint-module-utils/package.json
generated
vendored
|
|
@ -1,12 +1,13 @@
|
|||
{
|
||||
"name": "eslint-module-utils",
|
||||
"version": "2.8.2",
|
||||
"version": "2.11.0",
|
||||
"description": "Core utilities to support eslint-plugin-import and other module-related plugins.",
|
||||
"engines": {
|
||||
"node": ">=4"
|
||||
},
|
||||
"main": false,
|
||||
"exports": {
|
||||
"./contextCompat": "./contextCompat.js",
|
||||
"./ModuleCache": "./ModuleCache.js",
|
||||
"./ModuleCache.js": "./ModuleCache.js",
|
||||
"./declaredScope": "./declaredScope.js",
|
||||
|
|
|
|||
3
node_modules/eslint-module-utils/resolve.js
generated
vendored
3
node_modules/eslint-module-utils/resolve.js
generated
vendored
|
|
@ -5,6 +5,7 @@ exports.__esModule = true;
|
|||
const fs = require('fs');
|
||||
const Module = require('module');
|
||||
const path = require('path');
|
||||
const { getPhysicalFilename } = require('./contextCompat');
|
||||
|
||||
const hashObject = require('./hash').hashObject;
|
||||
const ModuleCache = require('./ModuleCache').default;
|
||||
|
|
@ -229,7 +230,7 @@ const erroredContexts = new Set();
|
|||
*/
|
||||
function resolve(p, context) {
|
||||
try {
|
||||
return relative(p, context.getPhysicalFilename ? context.getPhysicalFilename() : context.getFilename(), context.settings);
|
||||
return relative(p, getPhysicalFilename(context), context.settings);
|
||||
} catch (err) {
|
||||
if (!erroredContexts.has(context)) {
|
||||
// The `err.stack` string starts with `err.name` followed by colon and `err.message`.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue