diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 25961957..00000000 --- a/.eslintrc.js +++ /dev/null @@ -1,24 +0,0 @@ -module.exports = { - root: true, - parser: '@typescript-eslint/parser', - parserOptions: { - tsconfigRootDir: __dirname, // this is the reason this is a .js file - project: ['./tsconfig.eslint.json'], - }, - extends: [ - '@rubensworks' - ], - rules: { - 'no-implicit-coercion': 'off', - 'no-sync': 'off', - }, - overrides: [ - { - // Specific rules for test files - files: ['**/test/**/*.ts'], - rules: { - '@typescript-eslint/require-array-sort-compare': 'off', - }, - }, - ] -}; diff --git a/bin/compile-config.ts b/bin/compile-config.ts index 85d4e7f2..43de48cc 100644 --- a/bin/compile-config.ts +++ b/bin/compile-config.ts @@ -2,9 +2,9 @@ // Compiles a configuration to a module (single file) that exports the instantiated instance, // where all dependencies are injected. -import * as Path from 'path'; +import * as Path from 'node:path'; import type { ParsedArgs } from 'minimist'; -import minimist = require('minimist'); +import minimist from 'minimist'; import { compileConfig } from '..'; const args: ParsedArgs = minimist(process.argv.slice(2)); @@ -41,7 +41,7 @@ compileConfig( asFunction, ) .then((output: string) => process.stdout.write(`${output}\n`)) - .catch(error => { + .catch((error) => { process.stderr.write(`${error.stack}\n`); process.exit(1); }); diff --git a/eslint.config.js b/eslint.config.js new file mode 100644 index 00000000..f090912a --- /dev/null +++ b/eslint.config.js @@ -0,0 +1,56 @@ +const config = require('@rubensworks/eslint-config'); + +module.exports = config([ + { + ignores: [ + 'node_modules', + 'coverage', + '**/*.js', + '**/*.d.ts', + '**/*.js.map', + '**/*.md', + '**/*.yml', + '**/*.yaml', + '**/*.json', + ], + }, + { + files: [ '**/*.ts' ], + languageOptions: { + parserOptions: { + tsconfigRootDir: __dirname, + project: [ './tsconfig.eslint.json' ], + }, + }, + }, + { + rules: { + 'no-implicit-coercion': 'off', + 'no-sync': 'off', + // This is a Node.js library, it must import Node.js builtins + 'import/no-nodejs-modules': 'off', + // The DI framework necessarily works with unknown types at runtime + 'ts/no-unsafe-assignment': 'off', + 'ts/no-unsafe-argument': 'off', + 'ts/no-unsafe-return': 'off', + // Don't flag unused function parameters (common in interface implementations) + 'unused-imports/no-unused-vars': [ 'error', { args: 'none' }], + }, + }, + { + // PrefetchedDocumentLoader imports JSON files which need import/extensions disabled; + // the disable comments between imports break the newline-after-import chain detection + files: [ 'lib/rdf/PrefetchedDocumentLoader.ts' ], + rules: { + 'import/extensions': 'off', + 'import/newline-after-import': 'off', + }, + }, + { + // Specific rules for test files + files: [ '**/test/**/*.ts' ], + rules: { + 'ts/require-array-sort-compare': 'off', + }, + }, +]); diff --git a/lib/ComponentsManager.ts b/lib/ComponentsManager.ts index 83b94f59..d3bbf4fa 100644 --- a/lib/ComponentsManager.ts +++ b/lib/ComponentsManager.ts @@ -1,4 +1,4 @@ -import * as fs from 'fs'; +import * as fs from 'node:fs'; import type { Resource, RdfObjectLoader } from 'rdf-object'; import { stringToTerm } from 'rdf-string'; import type { Logger } from 'winston'; @@ -14,16 +14,16 @@ import { ErrorResourcesContext } from './util/ErrorResourcesContext'; * A components manager can instantiate components. * This manager should be created using {@link ComponentsManager.build}. */ -export class ComponentsManager { +export class ComponentsManager { public readonly moduleState: IModuleState; public readonly objectLoader: RdfObjectLoader; public readonly componentResources: Record; public readonly configRegistry: ConfigRegistry; public readonly dumpErrorState: boolean; - public readonly configConstructorPool: IConfigConstructorPool; + public readonly configConstructorPool: IConfigConstructorPool; public readonly logger: Logger; - public constructor(options: IComponentsManagerOptions) { + public constructor(options: IComponentsManagerOptions) { this.moduleState = options.moduleState; this.objectLoader = options.objectLoader; this.componentResources = options.componentResources; @@ -38,7 +38,7 @@ export class ComponentsManager { * @see IComponentsManagerBuilderOptions * @param options Settings of the new manager. */ - public static build(options: IComponentsManagerBuilderOptions): Promise> { + public static build(options: IComponentsManagerBuilderOptions): Promise> { return new ComponentsManagerBuilder(options).build(); } @@ -50,7 +50,7 @@ export class ComponentsManager { * @param instanceIri The IRI of an instance inside a config. * @param settings Optional settings that may influence instantiation. */ - public async instantiate(instanceIri: string, settings: IConstructionSettings = {}): Promise { + public async instantiate(instanceIri: string, settings: IConstructionSettings = {}): Promise { try { const instanceResource: Resource = this.objectLoader.resources[instanceIri]; if (!instanceResource) { @@ -97,12 +97,12 @@ export class ComponentsManager { } } -export interface IComponentsManagerOptions { +export interface IComponentsManagerOptions { moduleState: IModuleState; objectLoader: RdfObjectLoader; componentResources: Record; configRegistry: ConfigRegistry; dumpErrorState: boolean; - configConstructorPool: IConfigConstructorPool; + configConstructorPool: IConfigConstructorPool; logger: Logger; } diff --git a/lib/construction/ConfigConstructor.ts b/lib/construction/ConfigConstructor.ts index 3703f4ab..ba4eae17 100644 --- a/lib/construction/ConfigConstructor.ts +++ b/lib/construction/ConfigConstructor.ts @@ -28,8 +28,8 @@ import type { IConstructionStrategy } from './strategy/IConstructionStrategy'; * If you want to make sure that instances are reused, * be sure to call {@link ConfigConstructorPool} instead. */ -export class ConfigConstructor implements IArgumentsConstructor { - private static readonly ARGS_HANDLERS: IArgumentConstructorHandler[] = [ +export class ConfigConstructor implements IArgumentsConstructor { + private static readonly argsHandlers: IArgumentConstructorHandler[] = [ new ArgumentConstructorHandlerUndefined(), new ArgumentConstructorHandlerHash(), new ArgumentConstructorHandlerArray(), @@ -40,11 +40,11 @@ export class ConfigConstructor implements IArgumentsConstructor; - public readonly constructionStrategy: IConstructionStrategy; + public readonly configConstructorPool: IConfigConstructorPool; + public readonly constructionStrategy: IConstructionStrategy; private readonly moduleState: IModuleState; - public constructor(options: IConfigConstructorOptions) { + public constructor(options: IConfigConstructorOptions) { this.objectLoader = options.objectLoader; this.configConstructorPool = options.configConstructorPool; this.constructionStrategy = options.constructionStrategy; @@ -54,7 +54,7 @@ export class ConfigConstructor implements IArgumentsConstructor { + ): Promise { if (values.length === 0) { return this.constructionStrategy.createUndefined(); } @@ -69,9 +69,9 @@ export class ConfigConstructor implements IArgumentsConstructor { + ): Promise { // Check if this args resource can be handled by one of the built-in handlers. - for (const handler of ConfigConstructor.ARGS_HANDLERS) { + for (const handler of ConfigConstructor.argsHandlers) { if (handler.canHandle(value, settings, this)) { return handler.handle(value, settings, this); } @@ -90,7 +90,7 @@ export class ConfigConstructor implements IArgumentsConstructor { + ): Promise { if (config.property.arguments) { if (!config.property.arguments.list) { throw new ErrorResourcesContext('Detected non-RDF-list as value for config arguments', { config }); @@ -110,8 +110,8 @@ export class ConfigConstructor implements IArgumentsConstructor { - const args: Instance[] = await this.createArguments(config, settings); + ): Promise { + const args: TInstance[] = await this.createArguments(config, settings); return this.constructionStrategy.createInstance({ settings, moduleState: this.moduleState, @@ -128,7 +128,7 @@ export class ConfigConstructor implements IArgumentsConstructor { +export interface IConfigConstructorOptions { /** * The RDF object loader. */ @@ -136,11 +136,11 @@ export interface IConfigConstructorOptions { /** * The instance pool. */ - configConstructorPool: IConfigConstructorPool; + configConstructorPool: IConfigConstructorPool; /** * The strategy for construction. */ - constructionStrategy: IConstructionStrategy; + constructionStrategy: IConstructionStrategy; /** * The module state. */ diff --git a/lib/construction/ConfigConstructorPool.ts b/lib/construction/ConfigConstructorPool.ts index 81be9b03..2277257b 100644 --- a/lib/construction/ConfigConstructorPool.ts +++ b/lib/construction/ConfigConstructorPool.ts @@ -16,14 +16,14 @@ import type { IConstructionStrategy } from './strategy/IConstructionStrategy'; * This will make sure that configs with the same id will only be instantiated once, * and multiple references to configs will always reuse the same instance. */ -export class ConfigConstructorPool implements IConfigConstructorPool { +export class ConfigConstructorPool implements IConfigConstructorPool { private readonly configPreprocessors: IConfigPreprocessor[]; - private readonly configConstructor: ConfigConstructor; - private readonly constructionStrategy: IConstructionStrategy; + private readonly configConstructor: ConfigConstructor; + private readonly constructionStrategy: IConstructionStrategy; private instances: Record> = {}; - public constructor(options: IInstancePoolOptions) { + public constructor(options: IInstancePoolOptions) { this.configPreprocessors = options.configPreprocessors; this.configConstructor = new ConfigConstructor({ objectLoader: options.objectLoader, @@ -37,10 +37,10 @@ export class ConfigConstructorPool implements IConfigConstructorPool { + ): Promise { // Check if this resource is required as argument in its own chain, // if so, return a dummy value, to avoid infinite recursion. - const resourceBlacklist = settings.resourceBlacklist || {}; + const resourceBlacklist = settings.resourceBlacklist ?? {}; const configResourceId = termToString(configResource.term); if (resourceBlacklist[configResourceId]) { return Promise.reject(new ErrorResourcesContext(`Circular dependency was detected on ${configResource.value}`, { config: configResource })); @@ -123,11 +123,10 @@ export class ConfigConstructorPool implements IConfigConstructorPool implements IConfigConstructorPool { +export interface IInstancePoolOptions { /** * The RDF object loader. */ @@ -164,7 +163,7 @@ export interface IInstancePoolOptions { /** * The strategy for construction. */ - constructionStrategy: IConstructionStrategy; + constructionStrategy: IConstructionStrategy; /** * The module state. */ diff --git a/lib/construction/IConfigConstructorPool.ts b/lib/construction/IConfigConstructorPool.ts index fd57ba6f..23f5daff 100644 --- a/lib/construction/IConfigConstructorPool.ts +++ b/lib/construction/IConfigConstructorPool.ts @@ -4,7 +4,7 @@ import type { IConstructionSettings } from './IConstructionSettings'; /** * Manages and creates instances of components. */ -export interface IConfigConstructorPool { +export interface IConfigConstructorPool { /** * Instantiate a component based on a Resource. * @param configResource A config resource. @@ -14,13 +14,13 @@ export interface IConfigConstructorPool { instantiate: ( configResource: Resource, settings: IConstructionSettings, - ) => Promise; + ) => Promise; /** * Return the instance regsitry. * This is a hash from registered id to a Promise of the Instance. */ - getInstanceRegistry: () => Record>; + getInstanceRegistry: () => Record>; /** * Resets any internal state to what it originally was. diff --git a/lib/construction/argument/ArgumentConstructorHandlerArray.ts b/lib/construction/argument/ArgumentConstructorHandlerArray.ts index b8397ee0..4ef4e4fa 100644 --- a/lib/construction/argument/ArgumentConstructorHandlerArray.ts +++ b/lib/construction/argument/ArgumentConstructorHandlerArray.ts @@ -8,19 +8,19 @@ import type { IArgumentsConstructor } from './IArgumentsConstructor'; * Handles arguments with elements as array. */ export class ArgumentConstructorHandlerArray implements IArgumentConstructorHandler { - public canHandle( + public canHandle( value: Resource, settings: IConstructionSettings, - argsCreator: IArgumentsConstructor, + argsCreator: IArgumentsConstructor, ): boolean { return Boolean(value.property.elements); } - public async handle( + public async handle( argument: Resource, settings: IConstructionSettings, - argsCreator: IArgumentsConstructor, - ): Promise { + argsCreator: IArgumentsConstructor, + ): Promise { // Recursively handle all sub-args in the array const elements = await Promise.all(argument.properties.elements.map(async(entry: Resource) => { if (!entry.property.value) { diff --git a/lib/construction/argument/ArgumentConstructorHandlerHash.ts b/lib/construction/argument/ArgumentConstructorHandlerHash.ts index 084ffa97..821232d7 100644 --- a/lib/construction/argument/ArgumentConstructorHandlerHash.ts +++ b/lib/construction/argument/ArgumentConstructorHandlerHash.ts @@ -8,20 +8,20 @@ import type { IArgumentsConstructor } from './IArgumentsConstructor'; * Handles arguments with fields as hashes. */ export class ArgumentConstructorHandlerHash implements IArgumentConstructorHandler { - public canHandle( + public canHandle( value: Resource, settings: IConstructionSettings, - argsCreator: IArgumentsConstructor, + argsCreator: IArgumentsConstructor, ): boolean { return Boolean(value.property.fields); } - public async handle( + public async handle( argument: Resource, settings: IConstructionSettings, - argsCreator: IArgumentsConstructor, - ): Promise { - const fields = argument.property.fields.list || []; + argsCreator: IArgumentsConstructor, + ): Promise { + const fields = argument.property.fields.list ?? []; // Determine all key-value pairs const entries = await Promise.all(fields.map(async(entry: Resource) => { diff --git a/lib/construction/argument/ArgumentConstructorHandlerList.ts b/lib/construction/argument/ArgumentConstructorHandlerList.ts index 6b6d4216..62b160d8 100644 --- a/lib/construction/argument/ArgumentConstructorHandlerList.ts +++ b/lib/construction/argument/ArgumentConstructorHandlerList.ts @@ -7,19 +7,19 @@ import type { IArgumentsConstructor } from './IArgumentsConstructor'; * Handles arguments with RDF list values. */ export class ArgumentConstructorHandlerList implements IArgumentConstructorHandler { - public canHandle( + public canHandle( value: Resource, settings: IConstructionSettings, - argsCreator: IArgumentsConstructor, + argsCreator: IArgumentsConstructor, ): boolean { return Boolean(value.list); } - public async handle( + public async handle( argument: Resource, settings: IConstructionSettings, - argsCreator: IArgumentsConstructor, - ): Promise { + argsCreator: IArgumentsConstructor, + ): Promise { // Recursively handle all sub-args in the list const elements = await Promise.all(argument.list! .map((entry: Resource) => argsCreator.getArgumentValue(entry, settings))); diff --git a/lib/construction/argument/ArgumentConstructorHandlerPrimitive.ts b/lib/construction/argument/ArgumentConstructorHandlerPrimitive.ts index 9cece097..3d138846 100644 --- a/lib/construction/argument/ArgumentConstructorHandlerPrimitive.ts +++ b/lib/construction/argument/ArgumentConstructorHandlerPrimitive.ts @@ -7,26 +7,26 @@ import type { IArgumentsConstructor } from './IArgumentsConstructor'; * Handles primitive argument values. */ export class ArgumentConstructorHandlerPrimitive implements IArgumentConstructorHandler { - public canHandle( + public canHandle( value: Resource, settings: IConstructionSettings, - argsCreator: IArgumentsConstructor, + argsCreator: IArgumentsConstructor, ): boolean { return Boolean(value.type === 'Literal'); } - public async handle( + public async handle( value: Resource, settings: IConstructionSettings, - argsCreator: IArgumentsConstructor, - ): Promise { + argsCreator: IArgumentsConstructor, + ): Promise { // ValueRaw can be set in Util.captureType // TODO: improve this, so that the hacked valueRaw is not needed const rawValue: any = 'valueRaw' in value.term ? ( value.term).valueRaw : value.value; // Apply lazy construction if needed if (value.property.lazy && value.property.lazy.value === 'true') { - const supplier = (): Promise => Promise.resolve(argsCreator.constructionStrategy + const supplier = (): Promise => Promise.resolve(argsCreator.constructionStrategy .createPrimitive({ settings, value: rawValue })); return await argsCreator.constructionStrategy.createLazySupplier({ settings, supplier }); } diff --git a/lib/construction/argument/ArgumentConstructorHandlerReference.ts b/lib/construction/argument/ArgumentConstructorHandlerReference.ts index 212586cb..90b134c8 100644 --- a/lib/construction/argument/ArgumentConstructorHandlerReference.ts +++ b/lib/construction/argument/ArgumentConstructorHandlerReference.ts @@ -7,19 +7,19 @@ import type { IArgumentsConstructor } from './IArgumentsConstructor'; * Handles IRI and blank node arguments as reference to another argument or instance. */ export class ArgumentConstructorHandlerReference implements IArgumentConstructorHandler { - public canHandle( + public canHandle( value: Resource, settings: IConstructionSettings, - argsCreator: IArgumentsConstructor, + argsCreator: IArgumentsConstructor, ): boolean { return Boolean(value.type === 'NamedNode' || value.type === 'BlankNode'); } - public async handle( + public async handle( value: Resource, settings: IConstructionSettings, - argsCreator: IArgumentsConstructor, - ): Promise { + argsCreator: IArgumentsConstructor, + ): Promise { // Don't instantiate if we ask for shallow construction if (settings.shallow) { return argsCreator.constructionStrategy.createHash({ settings, entries: []}); @@ -27,7 +27,7 @@ export class ArgumentConstructorHandlerReference implements IArgumentConstructor // Apply lazy construction if needed if (value.property.lazy && value.property.lazy.value === 'true') { - const supplier = (): Promise => argsCreator.configConstructorPool.instantiate(value, settings); + const supplier = (): Promise => argsCreator.configConstructorPool.instantiate(value, settings); return await argsCreator.constructionStrategy.createLazySupplier({ settings, supplier }); } diff --git a/lib/construction/argument/ArgumentConstructorHandlerUndefined.ts b/lib/construction/argument/ArgumentConstructorHandlerUndefined.ts index 58550be8..57a31fd7 100644 --- a/lib/construction/argument/ArgumentConstructorHandlerUndefined.ts +++ b/lib/construction/argument/ArgumentConstructorHandlerUndefined.ts @@ -7,19 +7,19 @@ import type { IArgumentsConstructor } from './IArgumentsConstructor'; * Handles undefined values. */ export class ArgumentConstructorHandlerUndefined implements IArgumentConstructorHandler { - public canHandle( + public canHandle( value: Resource, settings: IConstructionSettings, - argsCreator: IArgumentsConstructor, + argsCreator: IArgumentsConstructor, ): boolean { return Boolean(value.property.undefined); } - public async handle( + public async handle( value: Resource, settings: IConstructionSettings, - argsCreator: IArgumentsConstructor, - ): Promise { + argsCreator: IArgumentsConstructor, + ): Promise { return argsCreator.constructionStrategy.createUndefined(); } } diff --git a/lib/construction/argument/ArgumentConstructorHandlerValue.ts b/lib/construction/argument/ArgumentConstructorHandlerValue.ts index a29967fc..09954fcf 100644 --- a/lib/construction/argument/ArgumentConstructorHandlerValue.ts +++ b/lib/construction/argument/ArgumentConstructorHandlerValue.ts @@ -7,19 +7,19 @@ import type { IArgumentsConstructor } from './IArgumentsConstructor'; * Handles value references, by recursively calling the args creator with the referred value. */ export class ArgumentConstructorHandlerValue implements IArgumentConstructorHandler { - public canHandle( + public canHandle( value: Resource, settings: IConstructionSettings, - argsCreator: IArgumentsConstructor, + argsCreator: IArgumentsConstructor, ): boolean { return Boolean(value.property.value); } - public async handle( + public async handle( value: Resource, settings: IConstructionSettings, - argsCreator: IArgumentsConstructor, - ): Promise { + argsCreator: IArgumentsConstructor, + ): Promise { return await argsCreator.getArgumentValues(value.properties.value, settings); } } diff --git a/lib/construction/argument/IArgumentConstructorHandler.ts b/lib/construction/argument/IArgumentConstructorHandler.ts index 2292cb93..3a3f9821 100644 --- a/lib/construction/argument/IArgumentConstructorHandler.ts +++ b/lib/construction/argument/IArgumentConstructorHandler.ts @@ -12,10 +12,10 @@ export interface IArgumentConstructorHandler { * @param settings Creation settings. * @param argsCreator Instance of the arguments creator that can be used to handle recursive args. */ - canHandle: ( + canHandle: ( value: Resource, settings: IConstructionSettings, - argsCreator: IArgumentsConstructor, + argsCreator: IArgumentsConstructor, ) => boolean; /** @@ -24,9 +24,9 @@ export interface IArgumentConstructorHandler { * @param settings Creation settings. * @param argsCreator Instance of the arguments creator that can be used to handle recursive args. */ - handle: ( + handle: ( value: Resource, settings: IConstructionSettings, - argsCreator: IArgumentsConstructor, - ) => Promise; + argsCreator: IArgumentsConstructor, + ) => Promise; } diff --git a/lib/construction/argument/IArgumentsConstructor.ts b/lib/construction/argument/IArgumentsConstructor.ts index dc863e35..3ba23a14 100644 --- a/lib/construction/argument/IArgumentsConstructor.ts +++ b/lib/construction/argument/IArgumentsConstructor.ts @@ -7,10 +7,10 @@ import type { IConstructionStrategy } from '../strategy/IConstructionStrategy'; * Instances of this interfaces can instantiate argument values. * This is mainly used by {@link IArgumentConstructorHandler}. */ -export interface IArgumentsConstructor { +export interface IArgumentsConstructor { readonly objectLoader: RdfObjectLoader; - readonly configConstructorPool: IConfigConstructorPool; - readonly constructionStrategy: IConstructionStrategy; + readonly configConstructorPool: IConfigConstructorPool; + readonly constructionStrategy: IConstructionStrategy; /** * Convert the given argument values resource into a JavaScript object or primitive. @@ -20,7 +20,7 @@ export interface IArgumentsConstructor { getArgumentValues: ( values: Resource[], settings: IConstructionSettings, - ) => Promise; + ) => Promise; /** * Convert the given argument value resource into a JavaScript object or primitive. @@ -30,5 +30,5 @@ export interface IArgumentsConstructor { getArgumentValue: ( value: Resource, settings: IConstructionSettings, - ) => Promise; + ) => Promise; } diff --git a/lib/construction/strategy/ConstructionStrategyCommonJs.ts b/lib/construction/strategy/ConstructionStrategyCommonJs.ts index 51557596..02c8cd96 100644 --- a/lib/construction/strategy/ConstructionStrategyCommonJs.ts +++ b/lib/construction/strategy/ConstructionStrategyCommonJs.ts @@ -1,4 +1,4 @@ -import * as Path from 'path'; +import * as Path from 'node:path'; import type { IModuleState } from '../../loading/ModuleStateBuilder'; import type { ICreationStrategyInstanceOptions, @@ -6,7 +6,8 @@ import type { ICreationStrategyHashOptions, ICreationStrategyArrayOptions, ICreationStrategySupplierOptions, - ICreationStrategyPrimitiveOptions, ICreationStrategyVariableOptions, + ICreationStrategyPrimitiveOptions, + ICreationStrategyVariableOptions, } from './IConstructionStrategy'; /** @@ -18,7 +19,7 @@ export class ConstructionStrategyCommonJs implements IConstructionStrategy // eslint-disable-next-line unicorn/no-object-as-default-parameter public constructor(options: ICreationStrategyCommonJsOptions = { req: require }) { - this.overrideRequireNames = options.overrideRequireNames || {}; + this.overrideRequireNames = options.overrideRequireNames ?? {}; this.req = options.req; } @@ -29,11 +30,11 @@ export class ConstructionStrategyCommonJs implements IConstructionStrategy // First try requiring current module, and fallback to a plain require let object: any; const currentResult = this.requireCurrentRunningModuleIfCurrent(options.moduleState, options.requireName); - object = currentResult !== false ? - currentResult.value : + object = currentResult === false ? this.req(options.requireName.startsWith('.') ? Path.join(process.cwd(), options.requireName) : - this.req.resolve(options.requireName, { paths: [ options.moduleState.mainModulePath ]})); + this.req.resolve(options.requireName, { paths: [ options.moduleState.mainModulePath ]})) : + currentResult.value; // Determine the child of the require'd element let subObject; @@ -55,7 +56,7 @@ export class ConstructionStrategyCommonJs implements IConstructionStrategy object = subObject; if (options.callConstructor) { if (typeof object !== 'function') { - throw new Error(`Attempted to construct ${options.requireElement} from module ${options.requireName} that does not have a constructor`); + throw new TypeError(`Attempted to construct ${options.requireElement} from module ${options.requireName} that does not have a constructor`); } object = new (Function.prototype.bind.apply(object, <[any, ...any]>[{}, ...options.args ]))(); } diff --git a/lib/construction/strategy/ConstructionStrategyCommonJsString.ts b/lib/construction/strategy/ConstructionStrategyCommonJsString.ts index 725e3487..2e526d6e 100644 --- a/lib/construction/strategy/ConstructionStrategyCommonJsString.ts +++ b/lib/construction/strategy/ConstructionStrategyCommonJsString.ts @@ -1,4 +1,4 @@ -import * as Path from 'path'; +import * as Path from 'node:path'; import type { IModuleState } from '../../loading/ModuleStateBuilder'; import type { ICreationStrategyCommonJsOptions } from './ConstructionStrategyCommonJs'; import { ConstructionStrategyCommonJs } from './ConstructionStrategyCommonJs'; @@ -36,7 +36,7 @@ export class ConstructionStrategyCommonJsString implements IConstructionStrategy // eslint-disable-next-line unicorn/no-object-as-default-parameter public constructor(options: ICreationStrategyCommonJsStringOptions = { req: require }) { - this.overrideRequireNames = options.overrideRequireNames || {}; + this.overrideRequireNames = options.overrideRequireNames ?? {}; this.asFunction = Boolean(options.asFunction); this.strategyCommonJs = new ConstructionStrategyCommonJs(options); } @@ -48,12 +48,12 @@ export class ConstructionStrategyCommonJsString implements IConstructionStrategy // First try requiring current module, and fallback to a plain require const currentResult = this.strategyCommonJs .requireCurrentRunningModuleIfCurrent(options.moduleState, options.requireName); - const resultingRequirePath = currentResult !== false ? + const resultingRequirePath = currentResult === false ? + options.requireName : `.${Path.sep}${Path.relative( options.moduleState.mainModulePath, this.getCurrentRunningModuleMain(options.moduleState), - )}` : - options.requireName; + )}`; let serialization = `require('${resultingRequirePath.replaceAll('\\', '/')}')`; // Determine the child of the require'd element @@ -151,7 +151,7 @@ export class ConstructionStrategyCommonJsString implements IConstructionStrategy * @return {string} A variable name. */ public static uriToVariableName(uri: string): string { - return uri.replace(/[#./:@\\^-]/gu, '_'); + return uri.replaceAll(/[#./:@\\^-]/gu, '_'); } /** @@ -167,7 +167,7 @@ export class ConstructionStrategyCommonJsString implements IConstructionStrategy // Override main variable name if needed exportVariableName = (exportVariableName ? ConstructionStrategyCommonJsString.uriToVariableName(exportVariableName) : - exportVariableName) || serializationVariableName; + exportVariableName) ?? serializationVariableName; // Export as variable-based function if (this.asFunction) { diff --git a/lib/construction/strategy/IConstructionStrategy.ts b/lib/construction/strategy/IConstructionStrategy.ts index 72150652..8f0367a1 100644 --- a/lib/construction/strategy/IConstructionStrategy.ts +++ b/lib/construction/strategy/IConstructionStrategy.ts @@ -4,44 +4,44 @@ import type { IConstructionSettings } from '../IConstructionSettings'; /** * Implementations of this interface represent a certain strategy for creating instances. */ -export interface IConstructionStrategy { +export interface IConstructionStrategy { /** * Create a new instance of the given referenced element. * @param options Options */ - createInstance: (options: ICreationStrategyInstanceOptions) => Instance; + createInstance: (options: ICreationStrategyInstanceOptions) => TInstance; /** * Create a hash object. * @param options Options */ - createHash: (options: ICreationStrategyHashOptions) => Instance; + createHash: (options: ICreationStrategyHashOptions) => TInstance; /** * Create an array. * @param options Options */ - createArray: (options: ICreationStrategyArrayOptions) => Instance; + createArray: (options: ICreationStrategyArrayOptions) => TInstance; /** * Create a lazy supplier, i.e., a zero-args lambda that returns a promise. * @param options Options */ - createLazySupplier: (options: ICreationStrategySupplierOptions) => Promise; + createLazySupplier: (options: ICreationStrategySupplierOptions) => Promise; /** * Create a primitive string or number value. * @param options Options */ - createPrimitive: (options: ICreationStrategyPrimitiveOptions) => Instance; + createPrimitive: (options: ICreationStrategyPrimitiveOptions) => TInstance; /** * Create a representation for something undefined. */ - createUndefined: () => Instance; + createUndefined: () => TInstance; /** * Get the value of a variable. * @param options Options */ - getVariableValue: (options: ICreationStrategyVariableOptions) => Instance; + getVariableValue: (options: ICreationStrategyVariableOptions) => TInstance; } -export interface ICreationStrategyInstanceOptions { +export interface ICreationStrategyInstanceOptions { /** * Creation settings. */ @@ -67,7 +67,7 @@ export interface ICreationStrategyInstanceOptions { /** * The arguments to pass to the constructor. */ - args: Instance[]; + args: TInstance[]; /** * An identifier for the instance. * This may for example be used for determining variable names. @@ -75,7 +75,7 @@ export interface ICreationStrategyInstanceOptions { instanceId: string; } -export interface ICreationStrategyHashOptions { +export interface ICreationStrategyHashOptions { /** * Creation settings. */ @@ -83,10 +83,10 @@ export interface ICreationStrategyHashOptions { /** * An array of key-value entries for the hash. */ - entries: ({ key: string; value: Instance } | undefined)[]; + entries: ({ key: string; value: TInstance } | undefined)[]; } -export interface ICreationStrategyArrayOptions { +export interface ICreationStrategyArrayOptions { /** * Creation settings. */ @@ -94,10 +94,10 @@ export interface ICreationStrategyArrayOptions { /** * An array of elements. */ - elements: Instance[]; + elements: TInstance[]; } -export interface ICreationStrategySupplierOptions { +export interface ICreationStrategySupplierOptions { /** * Creation settings. */ @@ -105,10 +105,11 @@ export interface ICreationStrategySupplierOptions { /** * A lazy instance supplier. */ - supplier: () => Promise; + supplier: () => Promise; } -export interface ICreationStrategyPrimitiveOptions { +// eslint-disable-next-line unused-imports/no-unused-vars +export interface ICreationStrategyPrimitiveOptions { /** * Creation settings. */ @@ -119,7 +120,8 @@ export interface ICreationStrategyPrimitiveOptions { value: string | number | any; } -export interface ICreationStrategyVariableOptions { +// eslint-disable-next-line unused-imports/no-unused-vars +export interface ICreationStrategyVariableOptions { /** * Creation settings. */ diff --git a/lib/loading/ComponentRegistry.ts b/lib/loading/ComponentRegistry.ts index ffbfedca..4975c738 100644 --- a/lib/loading/ComponentRegistry.ts +++ b/lib/loading/ComponentRegistry.ts @@ -1,4 +1,4 @@ -import type { Readable } from 'stream'; +import type { Readable } from 'node:stream'; import type * as RDF from '@rdfjs/types'; import type { Resource, RdfObjectLoader } from 'rdf-object'; import type { Logger } from 'winston'; diff --git a/lib/loading/ComponentRegistryFinalizer.ts b/lib/loading/ComponentRegistryFinalizer.ts index a2fff304..2b338545 100644 --- a/lib/loading/ComponentRegistryFinalizer.ts +++ b/lib/loading/ComponentRegistryFinalizer.ts @@ -108,7 +108,7 @@ export class ComponentRegistryFinalizer { for (const extendingConstructorArg of extendingConstructorArgs) { if (extendingConstructorArg.property.fields) { // Inherit fields - for (const field of extendingConstructorArg.property.fields.list || extendingConstructorArg.properties.fields) { + for (const field of extendingConstructorArg.property.fields.list ?? extendingConstructorArg.properties.fields) { if (!constructorArg.property.fields) { constructorArg.property.fields = this.objectLoader.createCompactedResource({ list: []}); } diff --git a/lib/loading/ComponentsManagerBuilder.ts b/lib/loading/ComponentsManagerBuilder.ts index ed3407f0..6d848139 100644 --- a/lib/loading/ComponentsManagerBuilder.ts +++ b/lib/loading/ComponentsManagerBuilder.ts @@ -2,6 +2,9 @@ import type { Resource } from 'rdf-object'; import { RdfObjectLoader } from 'rdf-object'; import type { Logger } from 'winston'; import { createLogger, format, transports } from 'winston'; + +// eslint-disable-next-line import/extensions +import contextJson from '../../components/context.json'; import { ComponentsManager } from '../ComponentsManager'; import { ConfigConstructorPool } from '../construction/ConfigConstructorPool'; import type { IConfigConstructorPool } from '../construction/IConfigConstructorPool'; @@ -21,11 +24,11 @@ import type { IModuleState } from './ModuleStateBuilder'; /** * Builds {@link ComponentsManager}'s based on given options. */ -export class ComponentsManagerBuilder { +export class ComponentsManagerBuilder { private readonly mainModulePath: string; private readonly componentLoader: (registry: ComponentRegistry) => Promise; private readonly configLoader: (registry: ConfigRegistry) => Promise; - private readonly constructionStrategy: IConstructionStrategy; + private readonly constructionStrategy: IConstructionStrategy; private readonly dumpErrorState: boolean; private readonly logger: Logger; private readonly moduleState?: IModuleState; @@ -33,13 +36,13 @@ export class ComponentsManagerBuilder { private readonly typeChecking: boolean; private readonly remoteContextLookups: boolean; - public constructor(options: IComponentsManagerBuilderOptions) { + public constructor(options: IComponentsManagerBuilderOptions) { this.mainModulePath = options.mainModulePath; - this.componentLoader = options.moduleLoader || (async registry => registry.registerAvailableModules()); - this.configLoader = options.configLoader || (async() => { + this.componentLoader = options.moduleLoader ?? (async registry => registry.registerAvailableModules()); + this.configLoader = options.configLoader ?? (async() => { // Do nothing }); - this.constructionStrategy = options.constructionStrategy || new ConstructionStrategyCommonJs({ req: require }); + this.constructionStrategy = options.constructionStrategy ?? new ConstructionStrategyCommonJs({ req: require }); this.dumpErrorState = options.dumpErrorState === undefined ? true : Boolean(options.dumpErrorState); this.logger = ComponentsManagerBuilder.createLogger(options.logLevel); this.moduleState = options.moduleState; @@ -73,14 +76,14 @@ export class ComponentsManagerBuilder { public static createObjectLoader(): RdfObjectLoader { return new RdfObjectLoader({ uniqueLiterals: true, - context: require('../../components/context.json'), + context: contextJson, }); } /** * @return A new instance of {@link ComponentsManager}. */ - public async build(): Promise> { + public async build(): Promise> { // Initialize module state let moduleState: IModuleState; if (this.moduleState) { @@ -129,7 +132,7 @@ export class ComponentsManagerBuilder { // Build constructor pool const runTypeConfigs = {}; const parameterHandler = new ParameterHandler({ objectLoader, typeChecking: this.typeChecking }); - const configConstructorPool: IConfigConstructorPool = new ConfigConstructorPool({ + const configConstructorPool: IConfigConstructorPool = new ConfigConstructorPool({ objectLoader, configPreprocessors: [ new ConfigPreprocessorOverride({ @@ -156,7 +159,7 @@ export class ComponentsManagerBuilder { moduleState, }); - return new ComponentsManager({ + return new ComponentsManager({ moduleState, objectLoader, componentResources, @@ -168,7 +171,7 @@ export class ComponentsManagerBuilder { } } -export interface IComponentsManagerBuilderOptions { +export interface IComponentsManagerBuilderOptions { /* ----- REQUIRED FIELDS ----- */ /** * Absolute path to the package root from which module resolution should start. @@ -192,7 +195,7 @@ export interface IComponentsManagerBuilderOptions { * A strategy for constructing instances. * Defaults to {@link ConstructionStrategyCommonJs}. */ - constructionStrategy?: IConstructionStrategy; + constructionStrategy?: IConstructionStrategy; /** * If the error state should be dumped into `componentsjs-error-state.json` * after failed instantiations. diff --git a/lib/loading/ConfigRegistry.ts b/lib/loading/ConfigRegistry.ts index 27cef6f0..60a8690d 100644 --- a/lib/loading/ConfigRegistry.ts +++ b/lib/loading/ConfigRegistry.ts @@ -1,4 +1,4 @@ -import type { Readable } from 'stream'; +import type { Readable } from 'node:stream'; import type * as RDF from '@rdfjs/types'; import type { RdfObjectLoader, Resource } from 'rdf-object'; import { termToString } from 'rdf-string'; @@ -62,6 +62,7 @@ export class ConfigRegistry { ): Promise { // Create ad-hoc resource const configResource = this.objectLoader.createCompactedResource({ + // eslint-disable-next-line ts/naming-convention '@id': configId, types: componentTypeIri, }); diff --git a/lib/loading/ModuleStateBuilder.ts b/lib/loading/ModuleStateBuilder.ts index 5c81f3b0..30db2317 100644 --- a/lib/loading/ModuleStateBuilder.ts +++ b/lib/loading/ModuleStateBuilder.ts @@ -1,10 +1,9 @@ -import * as Path from 'path'; -import semverGt = require('semver/functions/gt'); -import semverMajor = require('semver/functions/major'); -import semverValid = require('semver/functions/valid'); +import { promises as fs } from 'node:fs'; +import * as Path from 'node:path'; +import semverGt from 'semver/functions/gt'; +import semverMajor from 'semver/functions/major'; +import semverValid from 'semver/functions/valid'; import type { Logger } from 'winston'; -// Import syntax only works in Node > 12 -const fs = require('fs').promises; /** * Collects the paths to all available modules and components. @@ -22,7 +21,7 @@ export class ModuleStateBuilder { * @param mainModulePathIn An optional path to the main module from which the search should start. */ public async buildModuleState(req: NodeJS.Require, mainModulePathIn?: string): Promise { - const mainModulePath = await fs.realpath(mainModulePathIn || this.buildDefaultMainModulePath(req)); + const mainModulePath = await fs.realpath(mainModulePathIn ?? this.buildDefaultMainModulePath(req)); const nodeModuleImportPaths = this.buildNodeModuleImportPaths(mainModulePath); const nodeModulePaths = await this.buildNodeModulePaths(nodeModuleImportPaths); const packageJsons = await this.buildPackageJsons(nodeModulePaths); @@ -154,7 +153,7 @@ export class ModuleStateBuilder { */ public async buildPackageJsons(nodeModulePaths: string[]): Promise> { const packageJsons: Record = {}; - await Promise.all(nodeModulePaths.map(async modulePath => { + await Promise.all(nodeModulePaths.map(async(modulePath) => { const path = Path.posix.join(modulePath, 'package.json'); if (await this.fileExists(path)) { packageJsons[modulePath] = JSON.parse(await fs.readFile(path, 'utf8')); diff --git a/lib/preprocess/ConfigPreprocessorComponent.ts b/lib/preprocess/ConfigPreprocessorComponent.ts index bac5816b..5e8e8ef9 100644 --- a/lib/preprocess/ConfigPreprocessorComponent.ts +++ b/lib/preprocess/ConfigPreprocessorComponent.ts @@ -34,13 +34,13 @@ export class ConfigPreprocessorComponent implements IConfigPreprocessor 1) { throw new ErrorResourcesContext(`Detected more than one component types for config "${config.value}"`, { - componentTypes: `[${componentTypes.map(resource => resource.value)}]`, + componentTypes: `[${componentTypes.map(resource => resource.value).join(', ')}]`, config, }); } if (componentTypes.length === 0) { throw new ErrorResourcesContext(`Could not find (valid) component types for config "${config.value}" among its types, or a requireName`, { - configTypes: `${config.properties.types.map(resource => resource.value)}`, + configTypes: `${config.properties.types.map(resource => resource.value).join(', ')}`, config, }); } diff --git a/lib/preprocess/ConfigPreprocessorOverride.ts b/lib/preprocess/ConfigPreprocessorOverride.ts index 8ca593cd..b03553d1 100644 --- a/lib/preprocess/ConfigPreprocessorOverride.ts +++ b/lib/preprocess/ConfigPreprocessorOverride.ts @@ -109,7 +109,7 @@ export class ConfigPreprocessorOverride implements IConfigPreprocessor { + protected* findOverrideTargets(): Iterable<{ override: Resource; target: Resource }> { for (const [ id, resource ] of Object.entries(this.objectLoader.resources)) { if (resource.isA(IRIS_OO.Override) && resource.value !== IRIS_OO.Override) { const targets = resource.properties[IRIS_OO.overrideInstance]; @@ -179,12 +179,12 @@ export class ConfigPreprocessorOverride implements IConfigPreprocessor idx > i && target === targets[i]); if (duplicateIdx > 0) { - const target = chains[i][chains[i].length - 1]; - const duplicate1 = chains[i][chains[i].length - 2]; - const duplicate2 = chains[duplicateIdx][chains[duplicateIdx].length - 2]; + const target = chains[i].at(-1); + const duplicate1 = chains[i].at(-2); + const duplicate2 = chains[duplicateIdx].at(-2); throw new ErrorResourcesContext(`Found multiple Overrides targeting ${targets[i]}`, { target, - overrides: [ duplicate1, duplicate2 ], + overrides: [ duplicate1, duplicate2 ].filter((r): r is Resource => r !== undefined), }); } } diff --git a/lib/preprocess/GenericsContext.ts b/lib/preprocess/GenericsContext.ts index 777240f5..c48965e7 100644 --- a/lib/preprocess/GenericsContext.ts +++ b/lib/preprocess/GenericsContext.ts @@ -7,7 +7,8 @@ import { ParameterPropertyHandlerRange } from './parameterproperty/ParameterProp * Context for binding generic types to a concrete range value. */ export class GenericsContext { - private static readonly XSD_INHERITANCE_TABLE: Record> = { + private static readonly xsdInheritanceTable: Record> = { + // eslint-disable-next-line ts/naming-convention 'http://www.w3.org/2001/XMLSchema#number': new Set([ 'http://www.w3.org/2001/XMLSchema#integer', 'http://www.w3.org/2001/XMLSchema#long', @@ -26,6 +27,7 @@ export class GenericsContext { 'http://www.w3.org/2001/XMLSchema#decimal', 'http://www.w3.org/2001/XMLSchema#float', ]), + // eslint-disable-next-line ts/naming-convention 'http://www.w3.org/2001/XMLSchema#string': new Set([ 'http://www.w3.org/2001/XMLSchema#normalizedString', 'http://www.w3.org/2001/XMLSchema#anyURI', @@ -156,7 +158,10 @@ export class GenericsContext { public inferValueRange(value: Resource | undefined): Resource | undefined { // Value is undefined if (!value) { - return this.objectLoader.createCompactedResource({ '@type': 'ParameterRangeUndefined' }); + return this.objectLoader.createCompactedResource({ + // eslint-disable-next-line ts/naming-convention + '@type': 'ParameterRangeUndefined', + }); } // Value is a literal @@ -168,6 +173,7 @@ export class GenericsContext { const types = value.properties.type; if (types.length > 1) { return this.objectLoader.createCompactedResource({ + // eslint-disable-next-line ts/naming-convention '@type': 'ParameterRangeUnion', parameterRangeElements: types, }); @@ -235,6 +241,7 @@ export class GenericsContext { return; } return this.objectLoader.createCompactedResource({ + // eslint-disable-next-line ts/naming-convention '@type': rangeA.property.type, parameterRangeValue: merged, }); @@ -254,6 +261,7 @@ export class GenericsContext { return; } return this.objectLoader.createCompactedResource({ + // eslint-disable-next-line ts/naming-convention '@type': rangeA.property.type, parameterRangeElements: merged, }); @@ -279,6 +287,7 @@ export class GenericsContext { return; } return this.objectLoader.createCompactedResource({ + // eslint-disable-next-line ts/naming-convention '@type': 'ParameterRangeGenericComponent', component: mergedComponent, genericTypeInstances: merged, @@ -322,6 +331,7 @@ export class GenericsContext { return mergedValues[0]; } return this.objectLoader.createCompactedResource({ + // eslint-disable-next-line ts/naming-convention '@type': 'ParameterRangeUnion', parameterRangeElements: mergedValues, }); @@ -333,7 +343,7 @@ export class GenericsContext { * @param potentialSuperType A potential super type node. */ public isXsdSubType(type: RDF.Term, potentialSuperType: RDF.Term): boolean { - const values = GenericsContext.XSD_INHERITANCE_TABLE[potentialSuperType.value]; + const values = GenericsContext.xsdInheritanceTable[potentialSuperType.value]; return values && values.has(type.value); } diff --git a/lib/preprocess/IConfigPreprocessor.ts b/lib/preprocess/IConfigPreprocessor.ts index d79d2f79..a6b06874 100644 --- a/lib/preprocess/IConfigPreprocessor.ts +++ b/lib/preprocess/IConfigPreprocessor.ts @@ -15,18 +15,18 @@ export interface IConfigPreprocessorTransform { * Transforms an enhanced config of a certain form into a raw config * so that it can be instantiated by {@link ConfigConstructor}. */ -export interface IConfigPreprocessor
{ +export interface IConfigPreprocessor { /** * Check if this transformer can handle the given resource shape. * @param config Config to transform. */ - canHandle: (config: Resource) => HR | undefined; + canHandle: (config: Resource) => THR | undefined; /** * Transform the given config into a raw config resource. * @param config Config to transform. * @param handleResponse Return value of the {#canHandle}. */ - transform: (config: Resource, handleResponse: HR) => IConfigPreprocessorTransform; + transform: (config: Resource, handleResponse: THR) => IConfigPreprocessorTransform; /** * Resets any internal state to what it originally was. * Used when new components are added inbetween 2 instantiations. diff --git a/lib/preprocess/constructorargumentsmapping/ConstructorArgumentsElementMappingHandlerCollectEntries.ts b/lib/preprocess/constructorargumentsmapping/ConstructorArgumentsElementMappingHandlerCollectEntries.ts index a027123c..4121dcb2 100644 --- a/lib/preprocess/constructorargumentsmapping/ConstructorArgumentsElementMappingHandlerCollectEntries.ts +++ b/lib/preprocess/constructorargumentsmapping/ConstructorArgumentsElementMappingHandlerCollectEntries.ts @@ -44,7 +44,7 @@ implements IConstructorArgumentsElementMappingHandler { // Obtain all entry values const entryResources: Resource[] = []; - for (const entry of collectEntries.list || [ collectEntries ]) { + for (const entry of collectEntries.list ?? [ collectEntries ]) { if (entry.type !== 'NamedNode') { throw new ErrorResourcesContext(`Detected illegal collectEntries value "${entry.type}", must be an IRI`, { constructorArgs, @@ -53,7 +53,7 @@ implements IConstructorArgumentsElementMappingHandler { } const value = this.parameterHandler.applyParameterValues(configRoot, entry, configElement, genericsContext); if (value) { - for (const subValue of value.list || [ value ]) { + for (const subValue of value.list ?? [ value ]) { entryResources.push(subValue); } } @@ -90,7 +90,10 @@ implements IConstructorArgumentsElementMappingHandler { constructorArgs.property.key.value === IRIS_RDF.subject) { // Key is the entry id as string key = mapper.objectLoader.createCompactedResource(`"${entryResource.value}"`); - } else if (entryResource.properties[constructorArgs.property.key.value].length !== 1) { + } else if (entryResource.properties[constructorArgs.property.key.value].length === 1) { + // Key is the first entry key value + key = entryResource.properties[constructorArgs.property.key.value][0]; + } else { // Error if we find more than one entry key value throw new ErrorResourcesContext(`Detected more than one key value in collectEntries`, { key: constructorArgs.property.key.value, @@ -99,9 +102,6 @@ implements IConstructorArgumentsElementMappingHandler { constructorArgs, config: configRoot, }); - } else { - // Key is the first entry key value - key = entryResource.properties[constructorArgs.property.key.value][0]; } } @@ -131,7 +131,9 @@ implements IConstructorArgumentsElementMappingHandler { // ! at the end of the line, because will always be truthy value = mapper .getParameterValue(configRoot, constructorArgs.property.value, entryResource, false, genericsContext)!; - } else if (entryResource.properties[constructorArgs.property.value.value].length !== 1) { + } else if (entryResource.properties[constructorArgs.property.value.value].length === 1) { + value = entryResource.properties[constructorArgs.property.value.value][0]; + } else { throw new ErrorResourcesContext(`Detected more than one value value in collectEntries`, { value: constructorArgs.property.value, valueValues: entryResource.properties[constructorArgs.property.value.value] @@ -140,8 +142,6 @@ implements IConstructorArgumentsElementMappingHandler { constructorArgs, config: configRoot, }); - } else { - value = entryResource.properties[constructorArgs.property.value.value][0]; } // If we have a key, create a key-value mapping diff --git a/lib/preprocess/constructorargumentsmapping/ConstructorArgumentsElementMappingHandlerElements.ts b/lib/preprocess/constructorargumentsmapping/ConstructorArgumentsElementMappingHandlerElements.ts index 440900d1..c670a24b 100644 --- a/lib/preprocess/constructorargumentsmapping/ConstructorArgumentsElementMappingHandlerElements.ts +++ b/lib/preprocess/constructorargumentsmapping/ConstructorArgumentsElementMappingHandlerElements.ts @@ -52,7 +52,7 @@ export class ConstructorArgumentsElementMappingHandlerElements implements IConst genericsContext, ); if (value) { - for (const entry of value.list || [ value ]) { + for (const entry of value.list ?? [ value ]) { entries.push(entry); } } diff --git a/lib/preprocess/constructorargumentsmapping/ConstructorArgumentsElementMappingHandlerFields.ts b/lib/preprocess/constructorargumentsmapping/ConstructorArgumentsElementMappingHandlerFields.ts index cc631ab3..069d11fe 100644 --- a/lib/preprocess/constructorargumentsmapping/ConstructorArgumentsElementMappingHandlerFields.ts +++ b/lib/preprocess/constructorargumentsmapping/ConstructorArgumentsElementMappingHandlerFields.ts @@ -34,10 +34,10 @@ export class ConstructorArgumentsElementMappingHandlerFields implements IConstru // Recursively handle all field values. const entries: Resource[] = []; - for (const field of fields.list || [ fields ]) { + for (const field of fields.list ?? [ fields ]) { const mapped = mapper .applyConstructorArgumentsParameters(configRoot, field, configElement, genericsContext); - for (const entry of mapped.list || [ mapped ]) { + for (const entry of mapped.list ?? [ mapped ]) { entries.push(entry); } } diff --git a/lib/preprocess/overridesteps/OverrideListRemove.ts b/lib/preprocess/overridesteps/OverrideListRemove.ts index ab4a94f3..76f6ca45 100644 --- a/lib/preprocess/overridesteps/OverrideListRemove.ts +++ b/lib/preprocess/overridesteps/OverrideListRemove.ts @@ -16,7 +16,7 @@ export class OverrideListRemove implements IOverrideStep { } public handle(config: Resource, step: Resource): Resource { - const { parameters, targets, values } = extractOverrideStepFields(step, { parameters: 1, values: 0 }); + const { parameters, targets } = extractOverrideStepFields(step, { parameters: 1, values: 0 }); const list = getPropertyResourceList(config, parameters[0]); diff --git a/lib/preprocess/overridesteps/OverrideMapEntry.ts b/lib/preprocess/overridesteps/OverrideMapEntry.ts index d5efbe2d..b91ad466 100644 --- a/lib/preprocess/overridesteps/OverrideMapEntry.ts +++ b/lib/preprocess/overridesteps/OverrideMapEntry.ts @@ -71,6 +71,8 @@ export class OverrideMapEntry implements IOverrideStep { * @param entries - List of key/value map entries. * @param key - Key of the entry to find. * @param properties - URIs used to link the key and value of a map entry. + * @param properties.key - URI used to link the key of a map entry. + * @param properties.value - URI used to link the value of a map entry. */ protected findEntryIndex(entries: Resource[], key: Resource, properties: { key: Resource; value: Resource }): number { for (const [ i, entry ] of entries.entries()) { diff --git a/lib/preprocess/overridesteps/OverrideUtil.ts b/lib/preprocess/overridesteps/OverrideUtil.ts index 2b1c3760..783fda93 100644 --- a/lib/preprocess/overridesteps/OverrideUtil.ts +++ b/lib/preprocess/overridesteps/OverrideUtil.ts @@ -57,7 +57,7 @@ export function getPropertyResourceList(config: Resource, parameter: Resource): // Having multiple lists can happen if multiple config files add elements to the same list const list = properties.flatMap(prop => prop.list); - // eslint-disable-next-line unicorn/no-useless-undefined + if (list.includes(undefined)) { throw new ErrorResourcesContext(`Invalid target in Override step targeting ${config.value}: ${parameter.value} does not reference a list`, { config, diff --git a/lib/preprocess/parameterproperty/ParameterPropertyHandlerDefaultScoped.ts b/lib/preprocess/parameterproperty/ParameterPropertyHandlerDefaultScoped.ts index 87ea6f0a..f1dc5e9e 100644 --- a/lib/preprocess/parameterproperty/ParameterPropertyHandlerDefaultScoped.ts +++ b/lib/preprocess/parameterproperty/ParameterPropertyHandlerDefaultScoped.ts @@ -43,14 +43,14 @@ export class ParameterPropertyHandlerDefaultScoped implements IParameterProperty // Apply the scope if the config is of the required type (also considering sub-types) if (configRoot.isA(scopeType.term)) { - applyingValue = !applyingValue ? - scoped.property.defaultScopedValue : + applyingValue = applyingValue ? this.objectLoader.createCompactedResource({ list: [ - ...applyingValue.list || [ applyingValue ], - ...scoped.property.defaultScopedValue.list || [ scoped.property.defaultScopedValue ], + ...applyingValue.list ?? [ applyingValue ], + ...scoped.property.defaultScopedValue.list ?? [ scoped.property.defaultScopedValue ], ], - }); + }) : + scoped.property.defaultScopedValue; } } } diff --git a/lib/preprocess/parameterproperty/ParameterPropertyHandlerFixed.ts b/lib/preprocess/parameterproperty/ParameterPropertyHandlerFixed.ts index 05fbdaa8..c5655996 100644 --- a/lib/preprocess/parameterproperty/ParameterPropertyHandlerFixed.ts +++ b/lib/preprocess/parameterproperty/ParameterPropertyHandlerFixed.ts @@ -27,7 +27,7 @@ export class ParameterPropertyHandlerFixed implements IParameterPropertyHandler } if (value) { - const fixedValues: Resource[] = parameter.property.fixed.list || [ parameter.property.fixed ]; + const fixedValues: Resource[] = parameter.property.fixed.list ?? [ parameter.property.fixed ]; if (value.list) { value.list.unshift(...fixedValues); } else { diff --git a/lib/preprocess/parameterproperty/ParameterPropertyHandlerRange.ts b/lib/preprocess/parameterproperty/ParameterPropertyHandlerRange.ts index a777abf1..ddf2bc15 100644 --- a/lib/preprocess/parameterproperty/ParameterPropertyHandlerRange.ts +++ b/lib/preprocess/parameterproperty/ParameterPropertyHandlerRange.ts @@ -62,8 +62,8 @@ export class ParameterPropertyHandlerRange implements IParameterPropertyHandler * * @param value The value. * @param type The parameter's range. - * @param genericsContext Context for generic types. * @param errorContext The context for error reporting. + * @param genericsContext Context for generic types. * @return IParamValueConflict A conflict value if there was an error, or undefined if there was no error */ public hasValueType( @@ -160,11 +160,11 @@ export class ParameterPropertyHandlerRange implements IParameterPropertyHandler .filter(subConflict => subConflict !== undefined); return subConflicts.length === 0 ? undefined : - { - description: `one or more array values are invalid`, - context: errorContext, - causes: subConflicts, - }; + { + description: `one or more array values are invalid`, + context: errorContext, + causes: subConflicts, + }; } // Check if the param type is a composed type @@ -272,8 +272,10 @@ export class ParameterPropertyHandlerRange implements IParameterPropertyHandler const component = type.property.parameterRangeValue; // Simulate a union of the member keys as literal parameter ranges const simulatedUnionRange = this.objectLoader.createCompactedResource({ + // eslint-disable-next-line ts/naming-convention '@type': 'ParameterRangeUnion', parameterRangeElements: component.properties.memberFields.map(memberField => ({ + // eslint-disable-next-line ts/naming-convention '@type': 'ParameterRangeLiteral', parameterRangeValue: memberField.property.memberFieldName, })), @@ -297,7 +299,10 @@ export class ParameterPropertyHandlerRange implements IParameterPropertyHandler // Collect field ranges const fieldRanges: Record = Object.fromEntries(object.properties.memberFields .map(memberField => [ memberField.property.memberFieldName.value, memberField.property.range || - this.objectLoader.createCompactedResource({ '@type': 'ParameterRangeWildcard' }) ])); + this.objectLoader.createCompactedResource({ + // eslint-disable-next-line ts/naming-convention + '@type': 'ParameterRangeWildcard', + }) ])); // Handle literal indexes if (index.isA('ParameterRangeLiteral')) { @@ -346,12 +351,15 @@ export class ParameterPropertyHandlerRange implements IParameterPropertyHandler // Check if the range refers to a component with a generic type if (type.isA('ParameterRangeGenericComponent')) { if (value) { - if (!value.property.genericTypeInstances) { + if (value.property.genericTypeInstances) { + // TODO: Once we support manual generics setting, we'll need to check here if we can merge with it. + // (sometimes, it can also be identical) + } else { // For the defined generic type instances, apply them into the instance so they can be checked later during a // call to GenericsContext#bindComponentGenericTypes. value.property.genericTypeInstancesComponentScope = type.property.component; value.properties.genericTypeInstances = type.properties.genericTypeInstances - .map(genericTypeInstance => { + .map((genericTypeInstance) => { // If we have a generic param type reference, instantiate them based on the current generics context if (genericTypeInstance.isA('ParameterRangeGenericTypeReference')) { if (!genericTypeInstance.property.parameterRangeGenericType) { @@ -362,6 +370,7 @@ export class ParameterPropertyHandlerRange implements IParameterPropertyHandler } return this.objectLoader.createCompactedResource({ + // eslint-disable-next-line ts/naming-convention '@type': 'ParameterRangeGenericTypeReference', parameterRangeGenericType: genericTypeInstance.property.parameterRangeGenericType.value, parameterRangeGenericBindings: genericsContext @@ -372,9 +381,6 @@ export class ParameterPropertyHandlerRange implements IParameterPropertyHandler // For all other param types, return the as-is return genericTypeInstance; }); - } else { - // TODO: Once we support manual generics setting, we'll need to check here if we can merge with it. - // (sometimes, it can also be identical) } } @@ -395,14 +401,14 @@ export class ParameterPropertyHandlerRange implements IParameterPropertyHandler return; } - return hasTypeConflict || { description: 'unknown parameter type', context: errorContext }; + return hasTypeConflict ?? { description: 'unknown parameter type', context: errorContext }; } /** * Utility function for handling Literals. * If the provided value represents a valid Literal, the `valueRaw` field will be set. */ - private interpretValueAsType( + public interpretValueAsType( value: Resource, type: Resource | NamedNode, errorContext: IErrorContext, @@ -494,18 +500,17 @@ export class ParameterPropertyHandlerRange implements IParameterPropertyHandler genericsContext: GenericsContext, conflict: IParamValueConflict, ): never { - const withTypes = value && value.properties.types.length > 0 ? ` with types "${value.properties.types.map(resource => resource.value)}"` : ''; - // eslint-disable-next-line @typescript-eslint/no-extra-parens + const withTypes = value && value.properties.types.length > 0 ? ` with types "${value.properties.types.map(resource => resource.value).join(', ')}"` : ''; const valueString = value ? (value.list ? `[${value.list.map(subValue => subValue.value).join(', ')}]` : value.value) : 'undefined'; const undefinedComponent = value && value.term.termType === 'NamedNode' && value.properties.types.length === 0 ? `. "${valueString}" seems to refer to a component instance that is not defined yet. Did you forget an import?` : ''; throw new ErrorResourcesContext(`The value "${valueString}"${withTypes} for parameter "${parameter.value}" is not of required range type "${ParameterPropertyHandlerRange.rangeToDisplayString(parameter.property.range, genericsContext)}"${undefinedComponent}`, { cause: conflict, - value: value || 'undefined', + value: value ?? 'undefined', ...Object.keys(genericsContext.bindings).length > 0 ? - { generics: `[\n ${Object.entries(genericsContext.bindings) + { generics: `[\n ${Object.entries(genericsContext.bindings) .map(([ id, subValue ]) => `<${id}> => ${ParameterPropertyHandlerRange.rangeToDisplayString(subValue, genericsContext)}`) .join(',\n ')}\n]` } : - {}, + {}, parameter, }); } diff --git a/lib/rdf/Iris.ts b/lib/rdf/Iris.ts index f070c6f6..f2ede5df 100644 --- a/lib/rdf/Iris.ts +++ b/lib/rdf/Iris.ts @@ -2,12 +2,17 @@ const definePrefix = (prefix: string) => (suffix: string) => `${prefix}${suffix} export const PREFIX_OO = definePrefix('https://linkedsoftwaredependencies.org/vocabularies/object-oriented#'); export const IRIS_OO = { + // eslint-disable-next-line ts/naming-convention Module: PREFIX_OO('Module'), + // eslint-disable-next-line ts/naming-convention Class: PREFIX_OO('Class'), + // eslint-disable-next-line ts/naming-convention AbstractClass: PREFIX_OO('AbstractClass'), + // eslint-disable-next-line ts/naming-convention ComponentInstance: PREFIX_OO('ComponentInstance'), component: PREFIX_OO('component'), componentPath: PREFIX_OO('componentPath'), + // eslint-disable-next-line ts/naming-convention Override: PREFIX_OO('Override'), overrideInstance: PREFIX_OO('overrideInstance'), overrideParameters: PREFIX_OO('overrideParameters'), @@ -22,6 +27,7 @@ export const IRIS_RDF = { subject: PREFIX_RDF('subject'), object: PREFIX_RDF('object'), type: PREFIX_RDF('type'), + // eslint-disable-next-line ts/naming-convention JSON: PREFIX_RDF('JSON'), }; @@ -51,5 +57,6 @@ export const IRIS_DOAP = { export const PREFIX_OWL = definePrefix('http://www.w3.org/2002/07/owl#'); export const IRIS_OWL = { + // eslint-disable-next-line ts/naming-convention Restriction: PREFIX_OWL('Restriction'), }; diff --git a/lib/rdf/PrefetchedDocumentLoader.ts b/lib/rdf/PrefetchedDocumentLoader.ts index 187cf180..65fb04b0 100644 --- a/lib/rdf/PrefetchedDocumentLoader.ts +++ b/lib/rdf/PrefetchedDocumentLoader.ts @@ -1,33 +1,35 @@ import type { IJsonLdContext } from 'jsonld-context-parser'; import { FetchDocumentLoader } from 'jsonld-context-parser'; -import semverMajor = require('semver/functions/major'); +import semverMajor from 'semver/functions/major'; import type { Logger } from 'winston'; +import contextJson from '../../components/context.json'; +import packageJson from '../../package.json'; /** * A document loader that first loads from a precomputed set of contexts, * and only then does an HTTP(S) lookup for the context. */ export class PrefetchedDocumentLoader extends FetchDocumentLoader { - public static readonly CJS_MAJOR_VERSION: number = semverMajor(require('../../package.json').version); - public static readonly CONTEXT_URL: string = - `https://linkedsoftwaredependencies.org/bundles/npm/componentsjs/^${PrefetchedDocumentLoader.CJS_MAJOR_VERSION}.0.0/components/context.jsonld`; + public static readonly cjsMajorVersion: number = semverMajor(packageJson.version); + public static readonly contextUrl: string = + `https://linkedsoftwaredependencies.org/bundles/npm/componentsjs/^${PrefetchedDocumentLoader.cjsMajorVersion}.0.0/components/context.jsonld`; - public static readonly CONTEXT_PATTERN: RegExp = - /https:\/\/linkedsoftwaredependencies.org\/bundles\/npm\/componentsjs\/\^([0-9]+).0.0\/components\/context.jsonld/u; + public static readonly contextPattern: RegExp = + /https:\/\/linkedsoftwaredependencies.org\/bundles\/npm\/componentsjs\/\^([0-9]+).0.0\/components\/context.jsonld/u; - private static readonly DEFAULT_CONTEXT: any = require('../../components/context.json'); + private static readonly defaultContext: any = contextJson; - private static readonly DEFAULT_CONTEXTS: Record = { - [PrefetchedDocumentLoader.CONTEXT_URL]: - PrefetchedDocumentLoader.DEFAULT_CONTEXT, + private static readonly defaultContexts: Record = { + [PrefetchedDocumentLoader.contextUrl]: + PrefetchedDocumentLoader.defaultContext, }; static { // TODO: temporarily also set old context versions for backwards-compatible. - for (let i = 3; i < PrefetchedDocumentLoader.CJS_MAJOR_VERSION; i++) { - PrefetchedDocumentLoader.DEFAULT_CONTEXTS[ + for (let i = 3; i < PrefetchedDocumentLoader.cjsMajorVersion; i++) { + PrefetchedDocumentLoader.defaultContexts[ `https://linkedsoftwaredependencies.org/bundles/npm/componentsjs/^${i}.0.0/components/context.jsonld` - ] = PrefetchedDocumentLoader.DEFAULT_CONTEXT; + ] = PrefetchedDocumentLoader.defaultContext; } } @@ -38,7 +40,7 @@ export class PrefetchedDocumentLoader extends FetchDocumentLoader { public constructor(options: IPrefetchedDocumentLoaderOptions) { super(); - this.contexts = { ...options.contexts, ...PrefetchedDocumentLoader.DEFAULT_CONTEXTS }; + this.contexts = { ...options.contexts, ...PrefetchedDocumentLoader.defaultContexts }; this.logger = options.logger; this.path = options.path; this.remoteContextLookups = options.remoteContextLookups; diff --git a/lib/rdf/RdfParser.ts b/lib/rdf/RdfParser.ts index c2068775..0ff9f929 100644 --- a/lib/rdf/RdfParser.ts +++ b/lib/rdf/RdfParser.ts @@ -1,13 +1,11 @@ -import { createReadStream } from 'fs'; -import type { Readable } from 'stream'; +import { createReadStream, promises as fs } from 'node:fs'; +import type { Readable } from 'node:stream'; import type * as RDF from '@rdfjs/types'; import type { ParseOptions } from 'rdf-parse'; import { rdfParser } from 'rdf-parse'; import type { Logger } from 'winston'; import { PrefetchedDocumentLoader } from './PrefetchedDocumentLoader'; import { RdfStreamIncluder } from './RdfStreamIncluder'; -// Import syntax only works in Node > 12 -const fs = require('fs').promises; /** * Parses a data stream to a triple stream. @@ -20,7 +18,7 @@ export class RdfParser { */ public parse(textStream: NodeJS.ReadableStream, options: RdfParserOptions): RDF.Stream & Readable { // Parsing libraries don't work as expected if path contains backslashes - options.path = options.path.replace(/\\+/gu, '/'); + options.path = options.path.replaceAll(/\\+/gu, '/'); if (!options.baseIRI) { // Try converting path to URL using defined import paths @@ -47,7 +45,7 @@ export class RdfParser { ( options)['@comunica/actor-rdf-parse-jsonld:parserOptions'] = { // Override the JSON-LD document loader documentLoader: new PrefetchedDocumentLoader({ - contexts: options.contexts || {}, + contexts: options.contexts ?? {}, logger: options.logger, path: options.path, remoteContextLookups: options.remoteContextLookups, diff --git a/lib/rdf/RdfStreamIncluder.ts b/lib/rdf/RdfStreamIncluder.ts index 87e10b27..85894d19 100644 --- a/lib/rdf/RdfStreamIncluder.ts +++ b/lib/rdf/RdfStreamIncluder.ts @@ -1,6 +1,6 @@ -import Path = require('path'); -import type { Readable, TransformCallback } from 'stream'; -import { Transform } from 'stream'; +import * as Path from 'node:path'; +import type { Readable, TransformCallback } from 'node:stream'; +import { Transform } from 'node:stream'; import type * as RDF from '@rdfjs/types'; import { getNamedNodes, getTerms } from 'rdf-terms'; import { IRIS_RDFS } from './Iris'; @@ -21,6 +21,7 @@ export class RdfStreamIncluder extends Transform { this.parserOptions = parserOptions; } + // eslint-disable-next-line ts/naming-convention public _transform(quad: RDF.Quad, encoding: string, callback: TransformCallback): boolean { this.handleImports(quad); this.validateIris(quad); @@ -28,9 +29,9 @@ export class RdfStreamIncluder extends Transform { return true; } + // eslint-disable-next-line ts/naming-convention public _flush(callback: TransformCallback): void { if (--this.runningImporters === 0) { - // eslint-disable-next-line callback-return callback(); } else { this.flushCallback = callback; diff --git a/package.json b/package.json index 4394e937..eaf66557 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,7 @@ "test-watch": "jest --watch", "build": "scopy ./components/context.jsonld ./components/context.json && tsc && chmod +x ./bin/compile-config.js", "build-watch": "tsc --watch", - "lint": "eslint . --ext .ts --cache", + "lint": "ESLINT_USE_FLAT_CONFIG=true eslint . --cache", "validate": "yarn info", "prepare": "yarn build", "version": "manual-git-changelog onversion" @@ -51,19 +51,11 @@ "winston": "^3.3.3" }, "devDependencies": { - "@rubensworks/eslint-config": "1.2.0", + "@rubensworks/eslint-config": "3.1.0", "@types/jest": "^30.0.0", "@types/stream-to-array": "^2.3.0", "@types/streamify-string": "^1.0.0", - "@typescript-eslint/eslint-plugin": "^5.0.0", - "@typescript-eslint/parser": "^5.0.0", - "eslint": "^7.12.1", - "eslint-config-es": "3.25.3", - "eslint-import-resolver-typescript": "^2.3.0", - "eslint-plugin-import": "^2.22.1", - "eslint-plugin-jest": "^26.0.0", - "eslint-plugin-tsdoc": "^0.2.7", - "eslint-plugin-unused-imports": "^2.0.0", + "eslint": "^8.57.0", "jest": "^30.0.0", "jest-mock": "^30.0.0", "jest-rdf": "^2.0.0", diff --git a/test/integration/instantiateFile-test.ts b/test/integration/instantiateFile-test.ts index 3feac4e1..aaf83ce2 100644 --- a/test/integration/instantiateFile-test.ts +++ b/test/integration/instantiateFile-test.ts @@ -1,14 +1,16 @@ -import * as fs from 'fs'; -import * as Path from 'path'; -import { Readable } from 'stream'; +import * as fs from 'node:fs'; +import * as Path from 'node:path'; +import { Readable } from 'node:stream'; import { ComponentsManager } from '../../lib/ComponentsManager'; import type { IModuleState } from '../../lib/loading/ModuleStateBuilder'; import { IRIS_DOAP, IRIS_OO, IRIS_RDF } from '../../lib/rdf/Iris'; const quad = require('rdf-quad'); +// eslint-disable-next-line jest/no-mocks-import const Hello = require('../../__mocks__/helloworld').Hello; +// eslint-disable-next-line jest/no-untyped-mock-factory jest.mock('winston', () => ({ format: { colorize: jest.fn(), @@ -20,6 +22,7 @@ jest.mock('winston', () => ({ createLogger: jest.fn().mockReturnValue({ warn: jest.fn(), info: jest.fn(), + error: jest.fn(), }), transports: { Console: jest.fn(), @@ -31,10 +34,10 @@ describe('construction with component configs as files', () => { let manager: ComponentsManager; beforeEach(async() => { moduleState = { - mainModulePath: `${__dirname}/../../__mocks__`, + mainModulePath: Path.join(__dirname, '../../__mocks__'), importPaths: { - 'http://example.org/': `${__dirname}/../`, - 'https://linkedsoftwaredependencies.org/bundles/npm/example/^1.0.0/config/': `${__dirname}/../assets/`, + 'http://example.org/': `${Path.join(__dirname, '..')}/`, + 'https://linkedsoftwaredependencies.org/bundles/npm/example/^1.0.0/config/': `${Path.join(__dirname, '../assets')}/`, }, packageJsons: {}, }; @@ -72,7 +75,7 @@ describe('construction with component configs as files', () => { await registry.registerModuleStream(moduleStream); }, }); - manager.logger.error = jest.fn(); + jest.spyOn(manager.logger, 'error').mockImplementation(); }); it('instantiated with a resource-based config', async() => { @@ -403,8 +406,9 @@ describe('construction with component configs as files', () => { mainModulePath: __dirname, moduleState, async moduleLoader(registry) { - await registry.registerModule(Path.join(__dirname, - '../assets/module-inheritableparams-subclassmapping.jsonld')); + await registry.registerModule( + Path.join(__dirname, '../assets/module-inheritableparams-subclassmapping.jsonld'), + ); }, }); }); @@ -469,8 +473,7 @@ describe('construction with component configs as files', () => { mainModulePath: __dirname, moduleState, async moduleLoader(registry) { - await registry.registerModule(Path.join(__dirname, - '../assets/module-subclassmapping-dynamicentries.jsonld')); + await registry.registerModule(Path.join(__dirname, '../assets/module-subclassmapping-dynamicentries.jsonld')); }, }); }); @@ -512,8 +515,9 @@ describe('construction with component configs as files', () => { mainModulePath: __dirname, moduleState, async moduleLoader(registry) { - await registry.registerModule(Path.join(__dirname, - '../assets/module-inheritableparams-subclassmapping-dynamicentries.jsonld')); + await registry.registerModule( + Path.join(__dirname, '../assets/module-inheritableparams-subclassmapping-dynamicentries.jsonld'), + ); }, }); }); @@ -570,8 +574,9 @@ describe('construction with component configs as files', () => { mainModulePath: __dirname, moduleState, async moduleLoader(registry) { - await registry.registerModule(Path.join(__dirname, - '../assets/module-inheritableparams-dynamicentries.jsonld')); + await registry.registerModule( + Path.join(__dirname, '../assets/module-inheritableparams-dynamicentries.jsonld'), + ); }, }); }); @@ -610,7 +615,7 @@ describe('construction with component configs as files', () => { it('should throw on invalid param values', async() => { await manager.configRegistry .register(Path.join(__dirname, '../assets/config.jsonld')); - manager.logger.error = jest.fn(); + jest.spyOn(manager.logger, 'error').mockImplementation(); await expect(manager.instantiate('http://example.org/myconfig')).rejects .toThrow(`The value "HI" for parameter "http://example.org/hello/say" is not of required range type "http://www.w3.org/2001/XMLSchema#boolean"`); @@ -645,7 +650,7 @@ describe('construction with component configs as files', () => { it('should throw on invalid param values', async() => { await manager.configRegistry .register(Path.join(__dirname, '../assets/config-paramranges.jsonld')); - manager.logger.error = jest.fn(); + jest.spyOn(manager.logger, 'error').mockImplementation(); await expect(manager.instantiate('http://example.org/myconfig2')).rejects .toThrow(`The value "true" for parameter "http://example.org/hello/say" is not of required range type "GENERIC: http://example.org/HelloWorldModule#SayHelloComponent__generic_T"`); @@ -680,7 +685,7 @@ describe('construction with component configs as files', () => { it('should throw on invalid param values', async() => { await manager.configRegistry .register(Path.join(__dirname, '../assets/config-paramranges-generics-nested-invalid.jsonld')); - manager.logger.error = jest.fn(); + jest.spyOn(manager.logger, 'error').mockImplementation(); await expect(manager.instantiate('http://example.org/myconfig1')).rejects .toThrow(`The value "abc" for parameter "http://example.org/hello/inner2" is not of required range type "GENERIC: http://example.org/HelloWorldModule#SayHelloComponentInner__generic_T"`); @@ -726,7 +731,7 @@ describe('construction with component configs as files', () => { it('should throw on invalid param values', async() => { await manager.configRegistry .register(Path.join(__dirname, '../assets/config-paramranges-generics-nested-extends-invalid.jsonld')); - manager.logger.error = jest.fn(); + jest.spyOn(manager.logger, 'error').mockImplementation(); await expect(manager.instantiate('http://example.org/myconfig1')).rejects .toThrow(`The value "http://example.org/myconfig1-innervalue" with types "http://example.org/HelloWorldModule#SayHelloComponentInner" for parameter "http://example.org/hello/inner" is not of required range type "(http://example.org/HelloWorldModule#SayHelloComponentInnerAbstract)"`); @@ -759,8 +764,7 @@ describe('construction with component configs as files', () => { mainModulePath: __dirname, moduleState, async moduleLoader(registry) { - await registry.registerModule(Path.join(__dirname, - '../assets/module-dynamicentries-nested.jsonld')); + await registry.registerModule(Path.join(__dirname, '../assets/module-dynamicentries-nested.jsonld')); }, }); }); @@ -845,7 +849,7 @@ describe('construction with component configs as files', () => { expect(run1).toBeInstanceOf(Hello); const val1 = await run1._params[0].somethingLazy(); const val2 = await val1._params[0].somethingLazy(); - expect(val2).toEqual('bla'); + expect(val2).toBe('bla'); }); }); @@ -863,7 +867,7 @@ describe('construction with component configs as files', () => { it('should parse numerical instantations of the unknown parameter as number.', async() => { await manager.configRegistry .register(Path.join(__dirname, '../assets/config-paramranges-unknown-number.jsonld')); - manager.logger.error = jest.fn(); + jest.spyOn(manager.logger, 'error').mockImplementation(); const run1 = await manager.instantiate('http://example.org/myconfig4'); expect(run1).toBeInstanceOf(Hello); @@ -875,7 +879,7 @@ describe('construction with component configs as files', () => { it('should parse boolean instantations of the unknown parameter as boolean.', async() => { await manager.configRegistry .register(Path.join(__dirname, '../assets/config-paramranges-unknown-boolean.jsonld')); - manager.logger.error = jest.fn(); + jest.spyOn(manager.logger, 'error').mockImplementation(); const run1 = await manager.instantiate('http://example.org/myconfig4'); expect(run1).toBeInstanceOf(Hello); @@ -887,7 +891,7 @@ describe('construction with component configs as files', () => { it('should parse string instantations of the unknown parameter, containing a number, as string.', async() => { await manager.configRegistry .register(Path.join(__dirname, '../assets/config-paramranges-unknown-string.jsonld')); - manager.logger.error = jest.fn(); + jest.spyOn(manager.logger, 'error').mockImplementation(); const run1 = await manager.instantiate('http://example.org/myconfig4'); expect(run1).toBeInstanceOf(Hello); diff --git a/test/integration/instantiateResourceConfigComponent-test.ts b/test/integration/instantiateResourceConfigComponent-test.ts index a9401205..4c06f577 100644 --- a/test/integration/instantiateResourceConfigComponent-test.ts +++ b/test/integration/instantiateResourceConfigComponent-test.ts @@ -1,3 +1,4 @@ +import * as Path from 'node:path'; import { mocked } from 'jest-mock'; import type { Resource, RdfObjectLoader } from 'rdf-object'; import { ComponentsManager } from '../../lib/ComponentsManager'; @@ -6,6 +7,8 @@ import type { IConstructionSettings } from '../../lib/construction/IConstruction import { IRIS_OO } from '../../lib/rdf/Iris'; const N3 = require('n3'); + +// eslint-disable-next-line jest/no-untyped-mock-factory jest.mock('n3', () => ({ Lexer: jest.fn((args: any) => ({ type: 'LEXER', args })), Parser: jest.fn((args: any) => ({ type: 'PARSER', args })), @@ -19,9 +22,9 @@ describe('construction with component configs as Resource', () => { let settings: IConstructionSettings; beforeEach(async() => { manager = await ComponentsManager.build({ - mainModulePath: `${__dirname}/../../__mocks__`, + mainModulePath: Path.join(__dirname, '../../__mocks__'), moduleState: { - mainModulePath: `${__dirname}/../../__mocks__`, + mainModulePath: Path.join(__dirname, '../../__mocks__'), packageJsons: {}, }, async moduleLoader() { @@ -52,7 +55,7 @@ describe('construction with component configs as Resource', () => { types: 'http://example.org/n3#Util', }); const instance = await configConstructorPool.instantiate(config, settings); - expect(instance.type).toEqual('UTIL'); + expect(instance.type).toBe('UTIL'); expect(instance).toBe(N3.Util); }); }); @@ -74,7 +77,7 @@ describe('construction with component configs as Resource', () => { types: 'http://example.org/n3#Lexer', }); const instance = await configConstructorPool.instantiate(config, settings); - expect(instance.type).toEqual('LEXER'); + expect(instance.type).toBe('LEXER'); expect(N3.Lexer).toHaveBeenCalledWith({}); }); }); @@ -101,7 +104,7 @@ describe('construction with component configs as Resource', () => { types: 'http://example.org/n3#Lexer', }); const instance = await configConstructorPool.instantiate(config, settings); - expect(instance.type).toEqual('LEXER'); + expect(instance.type).toBe('LEXER'); expect(N3.Lexer).toHaveBeenCalledWith({ 'http://example.org/n3#lineMode': undefined, 'http://example.org/n3#n3': undefined, @@ -117,7 +120,7 @@ describe('construction with component configs as Resource', () => { 'http://example.org/n3#comments': '"true"', }); const instance = await configConstructorPool.instantiate(config, settings); - expect(instance.type).toEqual('LEXER'); + expect(instance.type).toBe('LEXER'); expect(N3.Lexer).toHaveBeenCalledWith({ 'http://example.org/n3#lineMode': 'true', 'http://example.org/n3#n3': 'true', @@ -145,7 +148,7 @@ describe('construction with component configs as Resource', () => { 'http://example.org/n3#comments': { list: [ '"C1"', '"C2"' ]}, }); const instance = await configConstructorPool.instantiate(config, settings); - expect(instance.type).toEqual('LEXER'); + expect(instance.type).toBe('LEXER'); expect(N3.Lexer).toHaveBeenCalledWith({ 'http://example.org/n3#lineMode': [ 'A1', 'A2' ], 'http://example.org/n3#n3': [ 'B1', 'B2' ], @@ -171,7 +174,7 @@ describe('construction with component configs as Resource', () => { 'ex:var3': 'C', }; const instance = await configConstructorPool.instantiate(config, settings); - expect(instance.type).toEqual('LEXER'); + expect(instance.type).toBe('LEXER'); expect(N3.Lexer).toHaveBeenCalledWith({ 'http://example.org/n3#lineMode': 'A', 'http://example.org/n3#n3': 'B', @@ -261,7 +264,7 @@ describe('construction with component configs as Resource', () => { 'http://example.org/n3#comments': { list: [ '"true"' ]}, }); const instance = await configConstructorPool.instantiate(config, settings); - expect(instance.type).toEqual('LEXER'); + expect(instance.type).toBe('LEXER'); expect(N3.Lexer).toHaveBeenCalledWith({ 'http://example.org/n3#lineMode': [ 'true' ], 'http://example.org/n3#n3': [ 'true' ], @@ -277,7 +280,7 @@ describe('construction with component configs as Resource', () => { 'http://example.org/n3#comments': { list: [ '"C1"', '"C2"' ]}, }); const instance = await configConstructorPool.instantiate(config, settings); - expect(instance.type).toEqual('LEXER'); + expect(instance.type).toBe('LEXER'); expect(N3.Lexer).toHaveBeenCalledWith({ 'http://example.org/n3#lineMode': [ 'A1', 'A2' ], 'http://example.org/n3#n3': [ 'B1', 'B2' ], @@ -311,7 +314,7 @@ describe('construction with component configs as Resource', () => { 'http://example.org/n3#comments': '"true"', }); const instance = await configConstructorPool.instantiate(config, settings); - expect(instance.type).toEqual('LEXER'); + expect(instance.type).toBe('LEXER'); expect(N3.Lexer).toHaveBeenCalledWith({ 'http://example.org/n3#lineMode': 'true', 'http://example.org/n3#n3': 'true', @@ -360,7 +363,7 @@ describe('construction with component configs as Resource', () => { 'ex:var3': 'C', }; const instance = await configConstructorPool.instantiate(config, settings); - expect(instance.type).toEqual('LEXER'); + expect(instance.type).toBe('LEXER'); expect(N3.Lexer).toHaveBeenCalledWith({ 'http://example.org/n3#lineMode': 'A', 'http://example.org/n3#n3': 'B', @@ -409,7 +412,7 @@ describe('construction with component configs as Resource', () => { 'http://example.org/n3#comments': '"true"', }); const instance = await configConstructorPool.instantiate(config, settings); - expect(instance.type).toEqual('LEXER'); + expect(instance.type).toBe('LEXER'); expect(N3.Lexer).toHaveBeenCalledWith({ 'http://example.org/n3#lineMode': 'true', 'http://example.org/n3#n3': 'true', @@ -478,7 +481,7 @@ describe('construction with component configs as Resource', () => { 'http://example.org/n3#comments': '"true"', }); const instance = await configConstructorPool.instantiate(config, settings); - expect(instance.type).toEqual('LEXER'); + expect(instance.type).toBe('LEXER'); expect(N3.Lexer).toHaveBeenCalledWith({ 'http://example.org/n3#lineMode': 'true', 'http://example.org/n3#n3': 'true', @@ -491,7 +494,7 @@ describe('construction with component configs as Resource', () => { types: 'http://example.org/n3#Lexer', }); const instance = await configConstructorPool.instantiate(config, settings); - expect(instance.type).toEqual('LEXER'); + expect(instance.type).toBe('LEXER'); expect(N3.Lexer).toHaveBeenCalledWith({ 'http://example.org/n3#lineMode': undefined, 'http://example.org/n3#n3': undefined, @@ -543,7 +546,7 @@ describe('construction with component configs as Resource', () => { }, }); const instance = await configConstructorPool.instantiate(config, settings); - expect(instance.type).toEqual('PARSER'); + expect(instance.type).toBe('PARSER'); expect(N3.Parser).toHaveBeenCalledWith({ 'http://example.org/n3#format': 'application/trig', 'http://example.org/n3#lexer': { @@ -583,7 +586,7 @@ describe('construction with component configs as Resource', () => { 'http://example.org/n3#comments': '"true"', }); const instance = await configConstructorPool.instantiate(config, settings); - expect(instance.type).toEqual('LEXER'); + expect(instance.type).toBe('LEXER'); expect(N3.Lexer).toHaveBeenCalledWith({ 'http://example.org/n3#lineMode': 'true', 'http://example.org/n3#n3': 'true', @@ -596,7 +599,7 @@ describe('construction with component configs as Resource', () => { types: 'http://example.org/n3#Lexer', }); const instance = await configConstructorPool.instantiate(config, settings); - expect(instance.type).toEqual('LEXER'); + expect(instance.type).toBe('LEXER'); expect(N3.Lexer).toHaveBeenCalledWith({ 'http://example.org/n3#lineMode': 'A', 'http://example.org/n3#n3': [ 'B', 'C' ], @@ -654,7 +657,7 @@ describe('construction with component configs as Resource', () => { 'http://example.org/n3#comments': '"true"', }); const instance = await configConstructorPool.instantiate(config, settings); - expect(instance.type).toEqual('LEXER'); + expect(instance.type).toBe('LEXER'); expect(N3.Lexer).toHaveBeenCalledWith({ 'http://example.org/n3#lineMode': 'true', 'http://example.org/n3#n3': 'true', @@ -667,7 +670,7 @@ describe('construction with component configs as Resource', () => { types: 'http://example.org/n3#Lexer', }); const instance = await configConstructorPool.instantiate(config, settings); - expect(instance.type).toEqual('LEXER'); + expect(instance.type).toBe('LEXER'); expect(N3.Lexer).toHaveBeenCalledWith({ 'http://example.org/n3#lineMode': 'A', 'http://example.org/n3#n3': [ 'B', 'C' ], @@ -700,7 +703,7 @@ describe('construction with component configs as Resource', () => { 'http://example.org/n3#comments': '"true"', }); const instance = await configConstructorPool.instantiate(config, settings); - expect(instance.type).toEqual('LEXER'); + expect(instance.type).toBe('LEXER'); expect(N3.Lexer).toHaveBeenCalledWith({ 'http://example.org/n3#lineMode': [ 'A', 'true' ], 'http://example.org/n3#n3': [ 'B', 'C', 'true' ], @@ -713,7 +716,7 @@ describe('construction with component configs as Resource', () => { types: 'http://example.org/n3#Lexer', }); const instance = await configConstructorPool.instantiate(config, settings); - expect(instance.type).toEqual('LEXER'); + expect(instance.type).toBe('LEXER'); expect(N3.Lexer).toHaveBeenCalledWith({ 'http://example.org/n3#lineMode': 'A', 'http://example.org/n3#n3': [ 'B', 'C' ], @@ -796,7 +799,7 @@ describe('construction with component configs as Resource', () => { 'http://example.org/n3#comments': { list: [ '"true"' ]}, }); const instance = await configConstructorPool.instantiate(config, settings); - expect(instance.type).toEqual('LEXER'); + expect(instance.type).toBe('LEXER'); expect(N3.Lexer).toHaveBeenCalledWith({ 'http://example.org/n3#lineMode': [ 'A', 'true' ], 'http://example.org/n3#n3': [ 'B', 'C', 'true' ], @@ -809,7 +812,7 @@ describe('construction with component configs as Resource', () => { types: 'http://example.org/n3#Lexer', }); const instance = await configConstructorPool.instantiate(config, settings); - expect(instance.type).toEqual('LEXER'); + expect(instance.type).toBe('LEXER'); expect(N3.Lexer).toHaveBeenCalledWith({ 'http://example.org/n3#lineMode': [ 'A' ], 'http://example.org/n3#n3': [ 'B', 'C' ], @@ -887,7 +890,7 @@ describe('construction with component configs as Resource', () => { types: 'http://example.org/n3#Lexer', }); const instance = await configConstructorPool.instantiate(config, settings); - expect(instance.type).toEqual('LEXER'); + expect(instance.type).toBe('LEXER'); expect(N3.Lexer).toHaveBeenCalledWith({ 'http://example.org/n3#lineMode': 'A', 'http://example.org/n3#n3': 'B', @@ -919,9 +922,9 @@ describe('construction with component configs as Resource', () => { 'http://example.org/n3#n3': { list: [ '"true"' ]}, }); const instance = await configConstructorPool.instantiate(config, settings); - expect(instance.type).toEqual('LEXER'); - expect(await mocked(N3.Lexer).mock.calls[0][0]['http://example.org/n3#lineMode']()).toEqual('true'); - expect(await mocked(N3.Lexer).mock.calls[0][0]['http://example.org/n3#n3'][0]()).toEqual('true'); + expect(instance.type).toBe('LEXER'); + await expect(mocked(N3.Lexer).mock.calls[0][0]['http://example.org/n3#lineMode']()).resolves.toBe('true'); + await expect(mocked(N3.Lexer).mock.calls[0][0]['http://example.org/n3#n3'][0]()).resolves.toBe('true'); }); it('instantiated with a config with all parameters with multiple values', async() => { @@ -931,11 +934,11 @@ describe('construction with component configs as Resource', () => { 'http://example.org/n3#n3': { list: [ '"B1"', '"B2"' ]}, }); const instance = await configConstructorPool.instantiate(config, settings); - expect(instance.type).toEqual('LEXER'); - expect(await mocked(N3.Lexer).mock.calls[0][0]['http://example.org/n3#lineMode'][0]()).toEqual('A1'); - expect(await mocked(N3.Lexer).mock.calls[0][0]['http://example.org/n3#lineMode'][1]()).toEqual('A2'); - expect(await mocked(N3.Lexer).mock.calls[0][0]['http://example.org/n3#n3'][0]()).toEqual('B1'); - expect(await mocked(N3.Lexer).mock.calls[0][0]['http://example.org/n3#n3'][1]()).toEqual('B2'); + expect(instance.type).toBe('LEXER'); + await expect(mocked(N3.Lexer).mock.calls[0][0]['http://example.org/n3#lineMode'][0]()).resolves.toBe('A1'); + await expect(mocked(N3.Lexer).mock.calls[0][0]['http://example.org/n3#lineMode'][1]()).resolves.toBe('A2'); + await expect(mocked(N3.Lexer).mock.calls[0][0]['http://example.org/n3#n3'][0]()).resolves.toBe('B1'); + await expect(mocked(N3.Lexer).mock.calls[0][0]['http://example.org/n3#n3'][1]()).resolves.toBe('B2'); }); }); }); diff --git a/test/integration/instantiateResourceConfigComponentMapped-test.ts b/test/integration/instantiateResourceConfigComponentMapped-test.ts index f90cb6f5..45aaae29 100644 --- a/test/integration/instantiateResourceConfigComponentMapped-test.ts +++ b/test/integration/instantiateResourceConfigComponentMapped-test.ts @@ -1,3 +1,4 @@ +import * as Path from 'node:path'; import { mocked } from 'jest-mock'; import type { Resource, RdfObjectLoader } from 'rdf-object'; import { ComponentsManager } from '../../lib/ComponentsManager'; @@ -6,12 +7,15 @@ import type { IConstructionSettings } from '../../lib/construction/IConstruction import { IRIS_OO } from '../../lib/rdf/Iris'; const N3 = require('n3'); + +// eslint-disable-next-line jest/no-untyped-mock-factory jest.mock('n3', () => ({ Lexer: jest.fn((args: any) => ({ type: 'LEXER', args })), Parser: jest.fn((args: any) => ({ type: 'PARSER', args })), Util: { type: 'UTIL' }, })); +// eslint-disable-next-line jest/no-mocks-import const Hello = require('../../__mocks__/helloworld').Hello; describe('construction with mapped component configs as Resource', () => { @@ -21,9 +25,9 @@ describe('construction with mapped component configs as Resource', () => { let settings: IConstructionSettings; beforeEach(async() => { manager = await ComponentsManager.build({ - mainModulePath: `${__dirname}/../../__mocks__`, + mainModulePath: Path.join(__dirname, '../../__mocks__'), moduleState: { - mainModulePath: `${__dirname}/../../__mocks__`, + mainModulePath: Path.join(__dirname, '../../__mocks__'), packageJsons: {}, }, async moduleLoader() { @@ -57,7 +61,7 @@ describe('construction with mapped component configs as Resource', () => { types: 'http://example.org/n3#Util', }); const instance = await configConstructorPool.instantiate(config, settings); - expect(instance.type).toEqual('UTIL'); + expect(instance.type).toBe('UTIL'); expect(instance).toBe(N3.Util); }); }); @@ -82,7 +86,7 @@ describe('construction with mapped component configs as Resource', () => { types: 'http://example.org/n3#Lexer', }); const instance = await configConstructorPool.instantiate(config, settings); - expect(instance.type).toEqual('LEXER'); + expect(instance.type).toBe('LEXER'); expect(N3.Lexer).toHaveBeenCalledWith(); }); }); @@ -137,7 +141,7 @@ describe('construction with mapped component configs as Resource', () => { types: 'http://example.org/n3#Lexer', }); const instance = await configConstructorPool.instantiate(config, settings); - expect(instance.type).toEqual('LEXER'); + expect(instance.type).toBe('LEXER'); expect(N3.Lexer).toHaveBeenCalledWith({ lineMode: undefined, n3: undefined, @@ -153,7 +157,7 @@ describe('construction with mapped component configs as Resource', () => { 'http://example.org/n3#comments': '"true"', }); const instance = await configConstructorPool.instantiate(config, settings); - expect(instance.type).toEqual('LEXER'); + expect(instance.type).toBe('LEXER'); expect(N3.Lexer).toHaveBeenCalledWith({ lineMode: 'true', n3: 'true', @@ -169,7 +173,7 @@ describe('construction with mapped component configs as Resource', () => { 'http://example.org/n3#comments': { list: [ '"true"' ]}, }); const instance = await configConstructorPool.instantiate(config, settings); - expect(instance.type).toEqual('LEXER'); + expect(instance.type).toBe('LEXER'); expect(N3.Lexer).toHaveBeenCalledWith({ lineMode: [ 'true' ], n3: [ 'true' ], @@ -197,7 +201,7 @@ describe('construction with mapped component configs as Resource', () => { 'http://example.org/n3#comments': { list: [ '"C1"', '"C2"' ]}, }); const instance = await configConstructorPool.instantiate(config, settings); - expect(instance.type).toEqual('LEXER'); + expect(instance.type).toBe('LEXER'); expect(N3.Lexer).toHaveBeenCalledWith({ lineMode: [ 'A1', 'A2' ], n3: [ 'B1', 'B2' ], @@ -282,7 +286,7 @@ describe('construction with mapped component configs as Resource', () => { 'http://example.org/n3#comments': { list: [ '"true"' ]}, }); const instance = await configConstructorPool.instantiate(config, settings); - expect(instance.type).toEqual('LEXER'); + expect(instance.type).toBe('LEXER'); expect(N3.Lexer).toHaveBeenCalledWith({ lineMode: [ 'true' ], n3: [ 'true' ], @@ -310,7 +314,7 @@ describe('construction with mapped component configs as Resource', () => { 'http://example.org/n3#comments': { list: [ '"C1"', '"C2"' ]}, }); const instance = await configConstructorPool.instantiate(config, settings); - expect(instance.type).toEqual('LEXER'); + expect(instance.type).toBe('LEXER'); expect(N3.Lexer).toHaveBeenCalledWith({ lineMode: [ 'A1', 'A2' ], n3: [ 'B1', 'B2' ], @@ -381,7 +385,7 @@ describe('construction with mapped component configs as Resource', () => { 'http://example.org/n3#lineMode': { list: [{ list: [ '"true"' ]}]}, }); const instance = await configConstructorPool.instantiate(config, settings); - expect(instance.type).toEqual('LEXER'); + expect(instance.type).toBe('LEXER'); expect(N3.Lexer).toHaveBeenCalledWith({ lineMode: [[ 'true' ]], }); @@ -435,7 +439,7 @@ describe('construction with mapped component configs as Resource', () => { 'http://example.org/n3#comments': '"true"', }); const instance = await configConstructorPool.instantiate(config, settings); - expect(instance.type).toEqual('LEXER'); + expect(instance.type).toBe('LEXER'); expect(N3.Lexer).toHaveBeenCalledWith({ lineMode: 'true', n3: 'true', @@ -484,7 +488,7 @@ describe('construction with mapped component configs as Resource', () => { 'ex:var3': 'C', }; const instance = await configConstructorPool.instantiate(config, settings); - expect(instance.type).toEqual('LEXER'); + expect(instance.type).toBe('LEXER'); expect(N3.Lexer).toHaveBeenCalledWith({ lineMode: 'A', n3: 'B', @@ -555,7 +559,7 @@ describe('construction with mapped component configs as Resource', () => { 'http://example.org/n3#comments': '"true"', }); const instance = await configConstructorPool.instantiate(config, settings); - expect(instance.type).toEqual('LEXER'); + expect(instance.type).toBe('LEXER'); expect(N3.Lexer).toHaveBeenCalledWith({ lineMode: 'true', n3: 'true', @@ -646,7 +650,7 @@ describe('construction with mapped component configs as Resource', () => { 'http://example.org/n3#comments': '"true"', }); const instance = await configConstructorPool.instantiate(config, settings); - expect(instance.type).toEqual('LEXER'); + expect(instance.type).toBe('LEXER'); expect(N3.Lexer).toHaveBeenCalledWith({ lineMode: 'true', n3: 'true', @@ -659,7 +663,7 @@ describe('construction with mapped component configs as Resource', () => { types: 'http://example.org/n3#Lexer', }); const instance = await configConstructorPool.instantiate(config, settings); - expect(instance.type).toEqual('LEXER'); + expect(instance.type).toBe('LEXER'); expect(N3.Lexer).toHaveBeenCalledWith({}); }); }); @@ -755,7 +759,7 @@ describe('construction with mapped component configs as Resource', () => { }, }); const instance = await configConstructorPool.instantiate(config, settings); - expect(instance.type).toEqual('PARSER'); + expect(instance.type).toBe('PARSER'); expect(N3.Parser).toHaveBeenCalledWith({ format: 'application/trig', lexer: { @@ -817,7 +821,7 @@ describe('construction with mapped component configs as Resource', () => { 'http://example.org/n3#comments': '"true"', }); const instance = await configConstructorPool.instantiate(config, settings); - expect(instance.type).toEqual('LEXER'); + expect(instance.type).toBe('LEXER'); expect(N3.Lexer).toHaveBeenCalledWith({ lineMode: 'true', n3: 'true', @@ -830,7 +834,7 @@ describe('construction with mapped component configs as Resource', () => { types: 'http://example.org/n3#Lexer', }); const instance = await configConstructorPool.instantiate(config, settings); - expect(instance.type).toEqual('LEXER'); + expect(instance.type).toBe('LEXER'); expect(N3.Lexer).toHaveBeenCalledWith({ lineMode: 'A', n3: [ 'B', 'C' ], @@ -910,7 +914,7 @@ describe('construction with mapped component configs as Resource', () => { 'http://example.org/n3#comments': '"true"', }); const instance = await configConstructorPool.instantiate(config, settings); - expect(instance.type).toEqual('LEXER'); + expect(instance.type).toBe('LEXER'); expect(N3.Lexer).toHaveBeenCalledWith({ lineMode: 'true', n3: 'true', @@ -923,7 +927,7 @@ describe('construction with mapped component configs as Resource', () => { types: 'http://example.org/n3#Lexer', }); const instance = await configConstructorPool.instantiate(config, settings); - expect(instance.type).toEqual('LEXER'); + expect(instance.type).toBe('LEXER'); expect(N3.Lexer).toHaveBeenCalledWith({ lineMode: 'A', n3: [ 'B', 'C' ], @@ -978,7 +982,7 @@ describe('construction with mapped component configs as Resource', () => { 'http://example.org/n3#comments': '"true"', }); const instance = await configConstructorPool.instantiate(config, settings); - expect(instance.type).toEqual('LEXER'); + expect(instance.type).toBe('LEXER'); expect(N3.Lexer).toHaveBeenCalledWith({ lineMode: [ 'A', 'true' ], n3: [ 'B', 'C', 'true' ], @@ -991,7 +995,7 @@ describe('construction with mapped component configs as Resource', () => { types: 'http://example.org/n3#Lexer', }); const instance = await configConstructorPool.instantiate(config, settings); - expect(instance.type).toEqual('LEXER'); + expect(instance.type).toBe('LEXER'); expect(N3.Lexer).toHaveBeenCalledWith({ lineMode: 'A', n3: [ 'B', 'C' ], @@ -1096,7 +1100,7 @@ describe('construction with mapped component configs as Resource', () => { 'http://example.org/n3#comments': { list: [ '"true"' ]}, }); const instance = await configConstructorPool.instantiate(config, settings); - expect(instance.type).toEqual('LEXER'); + expect(instance.type).toBe('LEXER'); expect(N3.Lexer).toHaveBeenCalledWith({ lineMode: [ 'A', 'true' ], n3: [ 'B', 'C', 'true' ], @@ -1109,7 +1113,7 @@ describe('construction with mapped component configs as Resource', () => { types: 'http://example.org/n3#Lexer', }); const instance = await configConstructorPool.instantiate(config, settings); - expect(instance.type).toEqual('LEXER'); + expect(instance.type).toBe('LEXER'); expect(N3.Lexer).toHaveBeenCalledWith({ lineMode: [ 'A' ], n3: [ 'B', 'C' ], @@ -1231,7 +1235,7 @@ describe('construction with mapped component configs as Resource', () => { types: 'http://example.org/n3#Lexer', }); const instance = await configConstructorPool.instantiate(config, settings); - expect(instance.type).toEqual('LEXER'); + expect(instance.type).toBe('LEXER'); expect(N3.Lexer).toHaveBeenCalledWith({ lineMode: 'A', n3: 'B', @@ -1285,9 +1289,9 @@ describe('construction with mapped component configs as Resource', () => { 'http://example.org/n3#n3': { list: [ '"true"' ]}, }); const instance = await configConstructorPool.instantiate(config, settings); - expect(instance.type).toEqual('LEXER'); - expect(await mocked(N3.Lexer).mock.calls[0][0].lineMode()).toEqual('true'); - expect(await mocked(N3.Lexer).mock.calls[0][0].n3[0]()).toEqual('true'); + expect(instance.type).toBe('LEXER'); + await expect(mocked(N3.Lexer).mock.calls[0][0].lineMode()).resolves.toBe('true'); + await expect(mocked(N3.Lexer).mock.calls[0][0].n3[0]()).resolves.toBe('true'); }); it('instantiated with a config with all parameters with multiple values', async() => { @@ -1297,11 +1301,11 @@ describe('construction with mapped component configs as Resource', () => { 'http://example.org/n3#n3': { list: [ '"B1"', '"B2"' ]}, }); const instance = await configConstructorPool.instantiate(config, settings); - expect(instance.type).toEqual('LEXER'); - expect(await mocked(N3.Lexer).mock.calls[0][0].lineMode[0]()).toEqual('A1'); - expect(await mocked(N3.Lexer).mock.calls[0][0].lineMode[1]()).toEqual('A2'); - expect(await mocked(N3.Lexer).mock.calls[0][0].n3[0]()).toEqual('B1'); - expect(await mocked(N3.Lexer).mock.calls[0][0].n3[1]()).toEqual('B2'); + expect(instance.type).toBe('LEXER'); + await expect(mocked(N3.Lexer).mock.calls[0][0].lineMode[0]()).resolves.toBe('A1'); + await expect(mocked(N3.Lexer).mock.calls[0][0].lineMode[1]()).resolves.toBe('A2'); + await expect(mocked(N3.Lexer).mock.calls[0][0].n3[0]()).resolves.toBe('B1'); + await expect(mocked(N3.Lexer).mock.calls[0][0].n3[1]()).resolves.toBe('B2'); }); }); diff --git a/test/integration/instantiateResourceConfigRaw-test.ts b/test/integration/instantiateResourceConfigRaw-test.ts index 8e964e54..9f057d6b 100644 --- a/test/integration/instantiateResourceConfigRaw-test.ts +++ b/test/integration/instantiateResourceConfigRaw-test.ts @@ -1,15 +1,19 @@ +import * as Path from 'node:path'; import type { RdfObjectLoader } from 'rdf-object'; import { ComponentsManager } from '../../lib/ComponentsManager'; import type { IConfigConstructorPool } from '../../lib/construction/IConfigConstructorPool'; import type { IConstructionSettings } from '../../lib/construction/IConstructionSettings'; const N3 = require('n3'); + +// eslint-disable-next-line jest/no-untyped-mock-factory jest.mock('n3', () => ({ Lexer: jest.fn((args: any) => ({ type: 'LEXER', args })), Parser: jest.fn((args: any) => ({ type: 'PARSER', args })), Util: { type: 'UTIL' }, })); +// eslint-disable-next-line jest/no-mocks-import const Hello = require('../../__mocks__/helloworld').Hello; describe('construction with component configs as Resource', () => { @@ -19,9 +23,9 @@ describe('construction with component configs as Resource', () => { let settings: IConstructionSettings; beforeEach(async() => { manager = await ComponentsManager.build({ - mainModulePath: `${__dirname}/../../__mocks__`, + mainModulePath: Path.join(__dirname, '../../__mocks__'), moduleState: { - mainModulePath: `${__dirname}/../../__mocks__`, + mainModulePath: Path.join(__dirname, '../../__mocks__'), packageJsons: {}, }, async moduleLoader() { @@ -49,7 +53,7 @@ describe('construction with component configs as Resource', () => { }, }); const instance = await configConstructorPool.instantiate(config, settings); - expect(instance.type).toEqual('LEXER'); + expect(instance.type).toBe('LEXER'); expect(N3.Lexer).toHaveBeenCalledWith({ comments: 'true' }); }); @@ -68,7 +72,7 @@ describe('construction with component configs as Resource', () => { }, }); const instance = await configConstructorPool.instantiate(config, settings); - expect(instance.type).toEqual('LEXER'); + expect(instance.type).toBe('LEXER'); expect(N3.Lexer).toHaveBeenCalledWith({ comments: [ 'true' ]}); }); @@ -85,7 +89,7 @@ describe('construction with component configs as Resource', () => { }, }); const instance = await configConstructorPool.instantiate(config, settings); - expect(instance.type).toEqual('LEXER'); + expect(instance.type).toBe('LEXER'); expect(N3.Lexer).toHaveBeenCalledWith([ 'A', 'B', 'C' ]); }); @@ -121,7 +125,7 @@ describe('construction with component configs as Resource', () => { }, }); const instance = await configConstructorPool.instantiate(config, settings); - expect(instance.type).toEqual('PARSER'); + expect(instance.type).toBe('PARSER'); expect(N3.Parser).toHaveBeenCalledWith({ format: 'application/trig', lexer: { @@ -150,7 +154,7 @@ describe('construction with component configs as Resource', () => { requireNoConstructor: '"true"', }); const instance = await configConstructorPool.instantiate(config, settings); - expect(instance.type).toEqual('UTIL'); + expect(instance.type).toBe('UTIL'); expect(instance).toBe(N3.Util); }); }); diff --git a/test/unit/construction/ConfigConstructor-test.ts b/test/unit/construction/ConfigConstructor-test.ts index 3358bac9..028e1b49 100644 --- a/test/unit/construction/ConfigConstructor-test.ts +++ b/test/unit/construction/ConfigConstructor-test.ts @@ -1,4 +1,5 @@ -import * as fs from 'fs'; +import * as fs from 'node:fs'; +import * as Path from 'node:path'; import { DataFactory } from 'rdf-data-factory'; import { Resource, RdfObjectLoader } from 'rdf-object'; import { ConfigConstructor } from '../../../lib/construction/ConfigConstructor'; @@ -11,7 +12,6 @@ const DF = new DataFactory(); describe('ConfigConstructor', () => { let objectLoader: RdfObjectLoader; - let componentResources: Record; let configConstructorPool: jest.Mocked>; let constructor: ConfigConstructor; let constructionStrategy: IConstructionStrategy; @@ -21,12 +21,11 @@ describe('ConfigConstructor', () => { beforeEach(async() => { objectLoader = new RdfObjectLoader({ uniqueLiterals: true, - context: JSON.parse(fs.readFileSync(`${__dirname}/../../../components/context.jsonld`, 'utf8')), + context: JSON.parse(fs.readFileSync(Path.join(__dirname, '../../../components/context.jsonld'), 'utf8')), }); await objectLoader.context; - componentResources = {}; configConstructorPool = { - instantiate: jest.fn(() => 'INSTANCE'), + instantiate: jest.fn(async() => 'INSTANCE'), }; constructionStrategy = { createArray: jest.fn(options => options.elements), @@ -40,7 +39,7 @@ describe('ConfigConstructor', () => { moduleState = { mainModulePath: __dirname, importPaths: { - 'http://example.org/': `${__dirname}/`, + 'http://example.org/': `${Path.resolve(__dirname)}/`, }, }; constructor = new ConfigConstructor({ @@ -55,7 +54,7 @@ describe('ConfigConstructor', () => { describe('getArgumentValues', () => { it('should handle an empty array', async() => { - expect(await constructor.getArgumentValues([], settings)).toEqual(undefined); + await expect(constructor.getArgumentValues([], settings)).resolves.toBeUndefined(); expect(constructionStrategy.createArray).not.toHaveBeenCalled(); expect(constructionStrategy.createUndefined).toHaveBeenCalledWith(); }); @@ -64,7 +63,7 @@ describe('ConfigConstructor', () => { const values = [ objectLoader.createCompactedResource('"ABC"'), ]; - expect(await constructor.getArgumentValues(values, settings)).toEqual('ABC'); + await expect(constructor.getArgumentValues(values, settings)).resolves.toBe('ABC'); expect(constructionStrategy.createArray).not.toHaveBeenCalled(); expect(constructionStrategy.createPrimitive).toHaveBeenCalledWith({ settings, value: 'ABC' }); }); @@ -89,7 +88,7 @@ describe('ConfigConstructor', () => { ], }), ]; - expect(await constructor.getArgumentValues(values, settings)).toEqual([ + await expect(constructor.getArgumentValues(values, settings)).resolves.toEqual([ 'ABC', 'DEF', 'GHI', @@ -104,8 +103,8 @@ describe('ConfigConstructor', () => { const resource = objectLoader.createCompactedResource({ undefined: '"true"', }); - expect(await constructor.getArgumentValue(resource, settings)).toEqual(undefined); - expect(constructionStrategy.createUndefined).toHaveBeenCalled(); + await expect(constructor.getArgumentValue(resource, settings)).resolves.toBeUndefined(); + expect(constructionStrategy.createUndefined).toHaveBeenCalledWith(); }); }); @@ -114,7 +113,7 @@ describe('ConfigConstructor', () => { const resource = objectLoader.createCompactedResource({ fields: { bla: true }, }); - expect(await constructor.getArgumentValue(resource, settings)).toEqual({ entries: []}); + await expect(constructor.getArgumentValue(resource, settings)).resolves.toEqual({ entries: []}); expect(constructionStrategy.createHash).toHaveBeenCalledWith({ settings, entries: []}); }); @@ -122,7 +121,7 @@ describe('ConfigConstructor', () => { const resource = objectLoader.createCompactedResource({ fields: { list: []}, }); - expect(await constructor.getArgumentValue(resource, settings)).toEqual({ entries: []}); + await expect(constructor.getArgumentValue(resource, settings)).resolves.toEqual({ entries: []}); expect(constructionStrategy.createHash).toHaveBeenCalledWith({ settings, entries: []}); }); @@ -137,7 +136,7 @@ describe('ConfigConstructor', () => { ], }, }); - expect(await constructor.getArgumentValue(resource, settings)).toEqual({ + await expect(constructor.getArgumentValue(resource, settings)).resolves.toEqual({ entries: [ { key: 'KEY', @@ -175,7 +174,7 @@ describe('ConfigConstructor', () => { ], }, }); - expect(await constructor.getArgumentValue(resource, settings)).toEqual({ + await expect(constructor.getArgumentValue(resource, settings)).resolves.toEqual({ entries: [ { key: 'KEY1', @@ -235,7 +234,7 @@ describe('ConfigConstructor', () => { ], }, }); - expect(await constructor.getArgumentValue(resource, settings)).toEqual({ + await expect(constructor.getArgumentValue(resource, settings)).resolves.toEqual({ entries: [ { key: 'INSTANCE', @@ -280,7 +279,7 @@ describe('ConfigConstructor', () => { ], }, }); - expect(await constructor.getArgumentValue(resource, settings)).toEqual({ + await expect(constructor.getArgumentValue(resource, settings)).resolves.toEqual({ entries: [ undefined ], }); expect(constructionStrategy.createHash).toHaveBeenCalledWith({ @@ -299,7 +298,7 @@ describe('ConfigConstructor', () => { }, ], }); - expect(await constructor.getArgumentValue(resource, settings)).toEqual([ + await expect(constructor.getArgumentValue(resource, settings)).resolves.toEqual([ 'ABC', ]); expect(constructionStrategy.createArray).toHaveBeenCalledWith({ @@ -324,7 +323,7 @@ describe('ConfigConstructor', () => { }, ], }); - expect(await constructor.getArgumentValue(resource, settings)).toEqual([ + await expect(constructor.getArgumentValue(resource, settings)).resolves.toEqual([ 'ABC', 'DEF', 'GHI', @@ -359,7 +358,7 @@ describe('ConfigConstructor', () => { '"ABC"', ], }); - expect(await constructor.getArgumentValue(resource, settings)).toEqual([ + await expect(constructor.getArgumentValue(resource, settings)).resolves.toEqual([ 'ABC', ]); expect(constructionStrategy.createArray).toHaveBeenCalledWith({ @@ -378,7 +377,7 @@ describe('ConfigConstructor', () => { '"GHI"', ], }); - expect(await constructor.getArgumentValue(resource, settings)).toEqual([ + await expect(constructor.getArgumentValue(resource, settings)).resolves.toEqual([ 'ABC', 'DEF', 'GHI', @@ -400,7 +399,7 @@ describe('ConfigConstructor', () => { '@id': 'ex:abc', value: '"ABC"', }); - expect(await constructor.getArgumentValue(resource, settings)).toEqual('ABC'); + await expect(constructor.getArgumentValue(resource, settings)).resolves.toBe('ABC'); expect(constructionStrategy.createPrimitive).toHaveBeenCalledWith({ settings, value: 'ABC', @@ -411,7 +410,7 @@ describe('ConfigConstructor', () => { const resource = objectLoader.createCompactedResource({ value: '"ABC"', }); - expect(await constructor.getArgumentValue(resource, settings)).toEqual('ABC'); + await expect(constructor.getArgumentValue(resource, settings)).resolves.toBe('ABC'); expect(constructionStrategy.createPrimitive).toHaveBeenCalledWith({ settings, value: 'ABC', @@ -422,13 +421,13 @@ describe('ConfigConstructor', () => { const resource = objectLoader.createCompactedResource({ '@id': 'ex:abc', }); - expect(await constructor.getArgumentValue(resource, settings)).toEqual('INSTANCE'); + await expect(constructor.getArgumentValue(resource, settings)).resolves.toBe('INSTANCE'); expect(configConstructorPool.instantiate).toHaveBeenCalledWith(resource, settings); }); it('should handle a bnode as construction', async() => { const resource = objectLoader.createCompactedResource({}); - expect(await constructor.getArgumentValue(resource, settings)).toEqual('INSTANCE'); + await expect(constructor.getArgumentValue(resource, settings)).resolves.toBe('INSTANCE'); expect(configConstructorPool.instantiate).toHaveBeenCalledWith(resource, settings); }); @@ -437,7 +436,7 @@ describe('ConfigConstructor', () => { const resource = objectLoader.createCompactedResource({ '@id': 'ex:abc', }); - expect(await constructor.getArgumentValue(resource, settings)).toEqual({ + await expect(constructor.getArgumentValue(resource, settings)).resolves.toEqual({ entries: [], }); expect(constructionStrategy.createHash).toHaveBeenCalledWith({ @@ -449,7 +448,7 @@ describe('ConfigConstructor', () => { it('should not handle a bnode with shallow construction', async() => { settings.shallow = true; const resource = objectLoader.createCompactedResource({}); - expect(await constructor.getArgumentValue(resource, settings)).toEqual({ + await expect(constructor.getArgumentValue(resource, settings)).resolves.toEqual({ entries: [], }); expect(constructionStrategy.createHash).toHaveBeenCalledWith({ @@ -463,7 +462,7 @@ describe('ConfigConstructor', () => { '@id': 'ex:abc', lazy: '"true"', }); - expect(await (await constructor.getArgumentValue(resource, settings))()).toEqual('INSTANCE'); + await expect((await constructor.getArgumentValue(resource, settings))()).resolves.toBe('INSTANCE'); expect(configConstructorPool.instantiate).toHaveBeenCalledWith(resource, settings); expect(constructionStrategy.createLazySupplier).toHaveBeenCalledWith({ settings, @@ -475,7 +474,7 @@ describe('ConfigConstructor', () => { const resource = objectLoader.createCompactedResource({ lazy: '"true"', }); - expect(await (await constructor.getArgumentValue(resource, settings))()).toEqual('INSTANCE'); + await expect((await constructor.getArgumentValue(resource, settings))()).resolves.toBe('INSTANCE'); expect(configConstructorPool.instantiate).toHaveBeenCalledWith(resource, settings); expect(constructionStrategy.createLazySupplier).toHaveBeenCalledWith({ settings, @@ -487,7 +486,7 @@ describe('ConfigConstructor', () => { describe('for literals', () => { it('should handle a string value', async() => { const resource = objectLoader.createCompactedResource('"ABC"'); - expect(await constructor.getArgumentValue(resource, settings)).toEqual('ABC'); + await expect(constructor.getArgumentValue(resource, settings)).resolves.toBe('ABC'); expect(constructionStrategy.createPrimitive).toHaveBeenCalledWith({ settings, value: 'ABC', @@ -497,7 +496,7 @@ describe('ConfigConstructor', () => { it('should handle a string value with lazy flag', async() => { const resource = objectLoader.createCompactedResource('"ABC"'); resource.property.lazy = objectLoader.createCompactedResource('"true"'); - expect(await (await constructor.getArgumentValue(resource, settings))()).toEqual('ABC'); + await expect((await constructor.getArgumentValue(resource, settings))()).resolves.toBe('ABC'); expect(constructionStrategy.createPrimitive).toHaveBeenCalledWith({ settings, value: 'ABC' }); expect(constructionStrategy.createLazySupplier).toHaveBeenCalledWith({ settings, @@ -508,7 +507,7 @@ describe('ConfigConstructor', () => { it('should handle a raw value', async() => { const resource = objectLoader.createCompactedResource('"123"'); ( resource.term).valueRaw = 123; - expect(await constructor.getArgumentValue(resource, settings)).toEqual(123); + await expect(constructor.getArgumentValue(resource, settings)).resolves.toBe(123); expect(constructionStrategy.createPrimitive).toHaveBeenCalledWith({ settings, value: 123, @@ -526,7 +525,7 @@ describe('ConfigConstructor', () => { describe('createArguments', () => { it('should handle configs without arguments', async() => { const config = objectLoader.createCompactedResource({}); - expect(await constructor.createArguments(config, settings)).toEqual([]); + await expect(constructor.createArguments(config, settings)).resolves.toEqual([]); }); it('should handle configs with arguments', async() => { @@ -547,7 +546,7 @@ describe('ConfigConstructor', () => { ], }, }); - expect(await constructor.createArguments(config, settings)).toEqual([ + await expect(constructor.createArguments(config, settings)).resolves.toEqual([ 'ABC', { entries: [ @@ -575,7 +574,7 @@ describe('ConfigConstructor', () => { '@id': 'ex:myConfig', requireName: '"REQUIRENAME"', }); - expect(await constructor.createInstance(config, settings)).toEqual('INSTANCESTRAT'); + await expect(constructor.createInstance(config, settings)).resolves.toBe('INSTANCESTRAT'); expect(constructionStrategy.createInstance).toHaveBeenCalledWith({ settings, moduleState, @@ -599,7 +598,7 @@ describe('ConfigConstructor', () => { requireElement: '"REQUIREELEMENT"', types: 'oo:ComponentInstance', }); - expect(await constructor.createInstance(config, settings)).toEqual('INSTANCESTRAT'); + await expect(constructor.createInstance(config, settings)).resolves.toBe('INSTANCESTRAT'); expect(constructionStrategy.createInstance).toHaveBeenCalledWith({ settings, moduleState, @@ -617,7 +616,7 @@ describe('ConfigConstructor', () => { requireName: '"REQUIRENAME"', originalInstance: 'ex:myOriginalConfig', }); - expect(await constructor.createInstance(config, settings)).toEqual('INSTANCESTRAT'); + await expect(constructor.createInstance(config, settings)).resolves.toBe('INSTANCESTRAT'); expect(constructionStrategy.createInstance).toHaveBeenCalledWith({ settings, moduleState, @@ -635,7 +634,7 @@ describe('ConfigConstructor', () => { requireName: '"REQUIRENAME"', requireNoConstructor: '"true"', }); - expect(await constructor.createInstance(config, settings)).toEqual('INSTANCESTRAT'); + await expect(constructor.createInstance(config, settings)).resolves.toBe('INSTANCESTRAT'); expect(constructionStrategy.createInstance).toHaveBeenCalledWith({ settings, moduleState, @@ -653,7 +652,7 @@ describe('ConfigConstructor', () => { requireName: '"REQUIRENAME"', requireNoConstructor: '"false"', }); - expect(await constructor.createInstance(config, settings)).toEqual('INSTANCESTRAT'); + await expect(constructor.createInstance(config, settings)).resolves.toBe('INSTANCESTRAT'); expect(constructionStrategy.createInstance).toHaveBeenCalledWith({ settings, moduleState, diff --git a/test/unit/construction/ConfigConstructorPool-test.ts b/test/unit/construction/ConfigConstructorPool-test.ts index cc949e79..b49f8648 100644 --- a/test/unit/construction/ConfigConstructorPool-test.ts +++ b/test/unit/construction/ConfigConstructorPool-test.ts @@ -1,4 +1,5 @@ -import * as fs from 'fs'; +import * as fs from 'node:fs'; +import * as Path from 'node:path'; import type { Resource } from 'rdf-object'; import { RdfObjectLoader } from 'rdf-object'; import { ConfigConstructorPool } from '../../../lib/construction/ConfigConstructorPool'; @@ -23,7 +24,7 @@ describe('ConfigConstructorPool', () => { beforeEach(async() => { objectLoader = new RdfObjectLoader({ uniqueLiterals: true, - context: JSON.parse(fs.readFileSync(`${__dirname}/../../../components/context.jsonld`, 'utf8')), + context: JSON.parse(fs.readFileSync(Path.join(__dirname, '../../../components/context.jsonld'), 'utf8')), }); await objectLoader.context; componentResources = {}; @@ -35,7 +36,7 @@ describe('ConfigConstructorPool', () => { moduleState = { mainModulePath: __dirname, importPaths: { - 'http://example.org/': `${__dirname}/`, + 'http://example.org/': `${Path.resolve(__dirname)}/`, }, }; pool = new ConfigConstructorPool({ @@ -255,7 +256,7 @@ describe('ConfigConstructorPool', () => { creationSettings.variables = { 'ex:myComponentInstance': 'abc', }; - expect(await pool.instantiate(config, creationSettings)).toEqual('abc'); + await expect(pool.instantiate(config, creationSettings)).resolves.toBe('abc'); }); it('should create an instance', async() => { @@ -264,7 +265,7 @@ describe('ConfigConstructorPool', () => { '@id': 'ex:myComponentInstance', types: 'ex:Component', }); - expect(await pool.instantiate(configIn, creationSettings)).toEqual('INSTANCE0'); + await expect(pool.instantiate(configIn, creationSettings)).resolves.toBe('INSTANCE0'); expect(pool.getRawConfig).toHaveBeenCalledTimes(1); expect(pool.getRawConfig).toHaveBeenNthCalledWith(1, configIn); expect(createInstance).toHaveBeenCalledTimes(1); diff --git a/test/unit/construction/strategy/ConstructionStrategyCommonJs-test.ts b/test/unit/construction/strategy/ConstructionStrategyCommonJs-test.ts index 0ef9ac1c..e1c34bb9 100644 --- a/test/unit/construction/strategy/ConstructionStrategyCommonJs-test.ts +++ b/test/unit/construction/strategy/ConstructionStrategyCommonJs-test.ts @@ -1,4 +1,4 @@ -import * as Path from 'path'; +import * as Path from 'node:path'; import type { IConstructionSettings } from '../../../../lib/construction/IConstructionSettings'; import { ConstructionStrategyCommonJs } from '../../../../lib/construction/strategy/ConstructionStrategyCommonJs'; import type { IModuleState } from '../../../../lib/loading/ModuleStateBuilder'; @@ -222,9 +222,9 @@ describe('ConstructionStrategyCommonJs', () => { instanceId: 'myinstance', }); expect(instance).toBeInstanceOf(MyClass); - expect(instance.arg1).toEqual('a'); - expect(instance.arg2).toEqual('b'); - expect(instance.arg3).toEqual('c'); + expect(instance.arg1).toBe('a'); + expect(instance.arg2).toBe('b'); + expect(instance.arg3).toBe('c'); }); it('without requireElement and without constructor in another module', () => { @@ -409,10 +409,10 @@ describe('ConstructionStrategyCommonJs', () => { describe('createLazySupplier', () => { it('for a lazy supplier', async() => { const supplier = () => Promise.resolve('a'); - expect(await constructionStrategy.createLazySupplier({ + await expect(constructionStrategy.createLazySupplier({ settings, supplier, - })).toBe(supplier); + })).resolves.toBe(supplier); }); }); @@ -421,14 +421,14 @@ describe('ConstructionStrategyCommonJs', () => { expect(constructionStrategy.createPrimitive({ settings, value: 'abc', - })).toEqual('abc'); + })).toBe('abc'); }); it('for a number', () => { expect(constructionStrategy.createPrimitive({ settings, value: 123, - })).toEqual(123); + })).toBe(123); }); }); @@ -457,7 +457,7 @@ describe('ConstructionStrategyCommonJs', () => { expect(constructionStrategy.getVariableValue({ settings, variableName: 'varA', - })).toEqual(123); + })).toBe(123); }); }); diff --git a/test/unit/construction/strategy/ConstructionStrategyCommonJsString-test.ts b/test/unit/construction/strategy/ConstructionStrategyCommonJsString-test.ts index b81baa9b..3e61e8aa 100644 --- a/test/unit/construction/strategy/ConstructionStrategyCommonJsString-test.ts +++ b/test/unit/construction/strategy/ConstructionStrategyCommonJsString-test.ts @@ -65,8 +65,8 @@ describe('ConstructionStrategyCommonJsString', () => { args: [], instanceId: 'myinstance', }); - expect(instance).toEqual(`myinstance`); - expect(constructionStrategy.serializeDocument(instance)).toEqual(`const myinstance = require('./main.js'); + expect(instance).toBe(`myinstance`); + expect(constructionStrategy.serializeDocument(instance)).toBe(`const myinstance = require('./main.js'); module.exports = myinstance; `); }); @@ -82,8 +82,8 @@ module.exports = myinstance; args: [], instanceId: 'myinstance', }); - expect(instance).toEqual(`myinstance`); - expect(constructionStrategy.serializeDocument(instance)).toEqual(`const myinstance = require('./main.js'); + expect(instance).toBe(`myinstance`); + expect(constructionStrategy.serializeDocument(instance)).toBe(`const myinstance = require('./main.js'); module.exports = myinstance; `); }); @@ -102,8 +102,8 @@ module.exports = myinstance; args: [], instanceId: 'myinstance', }); - expect(instance).toEqual(`myinstance`); - expect(constructionStrategy.serializeDocument(instance)).toEqual(`const myinstance = require('./main.js'); + expect(instance).toBe(`myinstance`); + expect(constructionStrategy.serializeDocument(instance)).toBe(`const myinstance = require('./main.js'); module.exports = myinstance; `); }); @@ -118,8 +118,8 @@ module.exports = myinstance; args: [], instanceId: 'myinstance', }); - expect(instance).toEqual(`myinstance`); - expect(constructionStrategy.serializeDocument(instance)).toEqual(`const myinstance = require('./main.js').a; + expect(instance).toBe(`myinstance`); + expect(constructionStrategy.serializeDocument(instance)).toBe(`const myinstance = require('./main.js').a; module.exports = myinstance; `); }); @@ -134,8 +134,8 @@ module.exports = myinstance; args: [], instanceId: 'myinstance', }); - expect(instance).toEqual(`myinstance`); - expect(constructionStrategy.serializeDocument(instance)).toEqual(`const myinstance = require('./main.js').a.b; + expect(instance).toBe(`myinstance`); + expect(constructionStrategy.serializeDocument(instance)).toBe(`const myinstance = require('./main.js').a.b; module.exports = myinstance; `); }); @@ -150,8 +150,8 @@ module.exports = myinstance; args: [], instanceId: 'myinstance', }); - expect(instance).toEqual(`myinstance`); - expect(constructionStrategy.serializeDocument(instance)).toEqual(`const myinstance = require('./main.js').MyClass; + expect(instance).toBe(`myinstance`); + expect(constructionStrategy.serializeDocument(instance)).toBe(`const myinstance = require('./main.js').MyClass; module.exports = myinstance; `); }); @@ -166,8 +166,8 @@ module.exports = myinstance; args: [], instanceId: 'myinstance', }); - expect(instance).toEqual(`myinstance`); - expect(constructionStrategy.serializeDocument(instance)).toEqual(`const myinstance = new (require('./main.js').MyClass)(); + expect(instance).toBe(`myinstance`); + expect(constructionStrategy.serializeDocument(instance)).toBe(`const myinstance = new (require('./main.js').MyClass)(); module.exports = myinstance; `); }); @@ -182,8 +182,8 @@ module.exports = myinstance; args: [ 'a', 'b', 'c' ], instanceId: 'myinstance', }); - expect(instance).toEqual(`myinstance`); - expect(constructionStrategy.serializeDocument(instance)).toEqual(`const myinstance = new (require('./main.js').MyClass)(a, b, c); + expect(instance).toBe(`myinstance`); + expect(constructionStrategy.serializeDocument(instance)).toBe(`const myinstance = new (require('./main.js').MyClass)(a, b, c); module.exports = myinstance; `); }); @@ -198,8 +198,8 @@ module.exports = myinstance; args: [], instanceId: 'myinstance', }); - expect(instance).toEqual(`myinstance`); - expect(constructionStrategy.serializeDocument(instance)).toEqual(`const myinstance = require('othermodule'); + expect(instance).toBe(`myinstance`); + expect(constructionStrategy.serializeDocument(instance)).toBe(`const myinstance = require('othermodule'); module.exports = myinstance; `); }); @@ -214,8 +214,8 @@ module.exports = myinstance; args: [], instanceId: 'myinstance', }); - expect(instance).toEqual(`myinstance`); - expect(constructionStrategy.serializeDocument(instance)).toEqual(`const myinstance = require('othermodule').c.d; + expect(instance).toBe(`myinstance`); + expect(constructionStrategy.serializeDocument(instance)).toBe(`const myinstance = require('othermodule').c.d; module.exports = myinstance; `); }); @@ -230,8 +230,8 @@ module.exports = myinstance; args: [], instanceId: 'myinstance', }); - expect(instance).toEqual(`myinstance`); - expect(constructionStrategy.serializeDocument(instance)).toEqual(`const myinstance = require('./myfile.js'); + expect(instance).toBe(`myinstance`); + expect(constructionStrategy.serializeDocument(instance)).toBe(`const myinstance = require('./myfile.js'); module.exports = myinstance; `); }); @@ -247,8 +247,8 @@ module.exports = myinstance; args: [], instanceId: 'myinstance', }); - expect(instance).toEqual(`myinstance`); - expect(constructionStrategy.serializeDocument(instance)).toEqual(`module.exports = function(variables) { + expect(instance).toBe(`myinstance`); + expect(constructionStrategy.serializeDocument(instance)).toBe(`module.exports = function(variables) { function getVariableValue(name) { if (!variables || !(name in variables)) { throw new Error('Undefined variable: ' + name); @@ -271,8 +271,8 @@ return myinstance; args: [], instanceId: 'myinstance', }); - expect(instance).toEqual(`myinstance`); - expect(constructionStrategy.serializeDocument(instance, 'urn:comunica:sparqlinit')).toEqual(`const myinstance = require('./main.js'); + expect(instance).toBe(`myinstance`); + expect(constructionStrategy.serializeDocument(instance, 'urn:comunica:sparqlinit')).toBe(`const myinstance = require('./main.js'); module.exports = urn_comunica_sparqlinit; `); }); @@ -283,7 +283,7 @@ module.exports = urn_comunica_sparqlinit; expect(constructionStrategy.createHash({ settings, entries: [], - })).toEqual(`{}`); + })).toBe(`{}`); }); it('for defined entries', () => { @@ -294,7 +294,7 @@ module.exports = urn_comunica_sparqlinit; { key: '"b"', value: '2' }, { key: '"c"', value: '3' }, ], - })).toEqual(`{ + })).toBe(`{ "a": 1, "b": 2, "c": 3 @@ -309,7 +309,7 @@ module.exports = urn_comunica_sparqlinit; undefined, { key: '"c"', value: '3' }, ], - })).toEqual(`{ + })).toBe(`{ "a": 1, "c": 3 }`); @@ -321,7 +321,7 @@ module.exports = urn_comunica_sparqlinit; entries: [ { key: '"a"', value: '[\n a,\n b\n]' }, ], - })).toEqual(`{ + })).toBe(`{ "a": [ a, b @@ -335,14 +335,14 @@ module.exports = urn_comunica_sparqlinit; expect(constructionStrategy.createArray({ settings, elements: [], - })).toEqual(`[]`); + })).toBe(`[]`); }); it('for elements', () => { expect(constructionStrategy.createArray({ settings, elements: [ 'a', 'b' ], - })).toEqual(`[ + })).toBe(`[ a, b ]`); @@ -352,7 +352,7 @@ module.exports = urn_comunica_sparqlinit; expect(constructionStrategy.createArray({ settings, elements: [ '"a"', '"b"' ], - })).toEqual(`[ + })).toBe(`[ "a", "b" ]`); @@ -362,10 +362,10 @@ module.exports = urn_comunica_sparqlinit; describe('createLazySupplier', () => { it('for a lazy supplier', async() => { const supplier = () => Promise.resolve('a'); - expect(await constructionStrategy.createLazySupplier({ + await expect(constructionStrategy.createLazySupplier({ settings, supplier, - })).toEqual('new function() { return Promise.resolve(a); }'); + })).resolves.toBe('new function() { return Promise.resolve(a); }'); }); }); @@ -374,21 +374,21 @@ module.exports = urn_comunica_sparqlinit; expect(constructionStrategy.createPrimitive({ settings, value: 'abc', - })).toEqual(`'abc'`); + })).toBe(`'abc'`); }); it('for a number', () => { expect(constructionStrategy.createPrimitive({ settings, value: 123, - })).toEqual(`123`); + })).toBe(`123`); }); it('for an object', () => { expect(constructionStrategy.createPrimitive({ settings, value: { a: 'true' }, - })).toEqual(`{"a":"true"}`); + })).toBe(`{"a":"true"}`); }); }); @@ -405,52 +405,52 @@ module.exports = urn_comunica_sparqlinit; expect(constructionStrategy.getVariableValue({ settings, variableName: 'varA', - })).toEqual(`getVariableValue('varA')`); + })).toBe(`getVariableValue('varA')`); }); }); describe('createUndefined', () => { it('returns undefined', () => { - expect(constructionStrategy.createUndefined()).toEqual('undefined'); + expect(constructionStrategy.createUndefined()).toBe('undefined'); }); }); describe('uriToVariableName', () => { it('should replace #', () => { - expect(ConstructionStrategyCommonJsString.uriToVariableName('abc#xyz')).toEqual('abc_xyz'); + expect(ConstructionStrategyCommonJsString.uriToVariableName('abc#xyz')).toBe('abc_xyz'); }); it('should replace .', () => { - expect(ConstructionStrategyCommonJsString.uriToVariableName('abc.xyz')).toEqual('abc_xyz'); + expect(ConstructionStrategyCommonJsString.uriToVariableName('abc.xyz')).toBe('abc_xyz'); }); it('should replace /', () => { - expect(ConstructionStrategyCommonJsString.uriToVariableName('abc/xyz')).toEqual('abc_xyz'); + expect(ConstructionStrategyCommonJsString.uriToVariableName('abc/xyz')).toBe('abc_xyz'); }); it('should replace :', () => { - expect(ConstructionStrategyCommonJsString.uriToVariableName('abc:xyz')).toEqual('abc_xyz'); + expect(ConstructionStrategyCommonJsString.uriToVariableName('abc:xyz')).toBe('abc_xyz'); }); it('should replace @', () => { - expect(ConstructionStrategyCommonJsString.uriToVariableName('abc@xyz')).toEqual('abc_xyz'); + expect(ConstructionStrategyCommonJsString.uriToVariableName('abc@xyz')).toBe('abc_xyz'); }); it('should replace \\', () => { - expect(ConstructionStrategyCommonJsString.uriToVariableName('abc\\xyz')).toEqual('abc_xyz'); + expect(ConstructionStrategyCommonJsString.uriToVariableName('abc\\xyz')).toBe('abc_xyz'); }); it('should replace ^', () => { - expect(ConstructionStrategyCommonJsString.uriToVariableName('abc^xyz')).toEqual('abc_xyz'); + expect(ConstructionStrategyCommonJsString.uriToVariableName('abc^xyz')).toBe('abc_xyz'); }); it('should replace -', () => { - expect(ConstructionStrategyCommonJsString.uriToVariableName('abc-xyz')).toEqual('abc_xyz'); + expect(ConstructionStrategyCommonJsString.uriToVariableName('abc-xyz')).toBe('abc_xyz'); }); it('should handle a complex IRI', () => { expect(ConstructionStrategyCommonJsString.uriToVariableName(`https://linkedsoftwaredependencies.org/bundles/npm/%40comunica%2Factor-init-sparql/%5E1.0.0/config/config-default.json#thing`)) - .toEqual(`https___linkedsoftwaredependencies_org_bundles_npm_%40comunica%2Factor_init_sparql_%5E1_0_0_config_config_default_json_thing`); + .toBe(`https___linkedsoftwaredependencies_org_bundles_npm_%40comunica%2Factor_init_sparql_%5E1_0_0_config_config_default_json_thing`); }); }); }); diff --git a/test/unit/loading/ComponentRegistry-test.ts b/test/unit/loading/ComponentRegistry-test.ts index 421a4ccf..1a45ae84 100644 --- a/test/unit/loading/ComponentRegistry-test.ts +++ b/test/unit/loading/ComponentRegistry-test.ts @@ -1,4 +1,5 @@ -import * as fs from 'fs'; +import * as fs from 'node:fs'; +import * as Path from 'node:path'; import type { Resource } from 'rdf-object'; import { RdfObjectLoader } from 'rdf-object'; import type { Logger } from 'winston'; @@ -18,7 +19,7 @@ describe('ComponentRegistry', () => { }; objectLoader = new RdfObjectLoader({ uniqueLiterals: true, - context: JSON.parse(fs.readFileSync(`${__dirname}/../../../components/context.jsonld`, 'utf8')), + context: JSON.parse(fs.readFileSync(Path.join(__dirname, '../../../components/context.jsonld'), 'utf8')), }); logger = { warn: jest.fn(), @@ -38,13 +39,13 @@ describe('ComponentRegistry', () => { describe('registerAvailableModules', () => { it('should handle no discovered modules', async() => { await componentRegistry.registerAvailableModules(); - expect(Object.keys(objectLoader.resources).length).toBe(0); + expect(Object.keys(objectLoader.resources)).toHaveLength(0); }); it('should handle discovered modules', async() => { moduleState.componentModules = { A: { - 1: `${__dirname}/../../assets/module.jsonld`, + 1: Path.join(__dirname, '../../assets/module.jsonld'), }, }; await componentRegistry.registerAvailableModules(); @@ -57,7 +58,7 @@ describe('ComponentRegistry', () => { describe('registerModule', () => { it('should handle a valid module file', async() => { - await componentRegistry.registerModule(`${__dirname}/../../assets/module.jsonld`); + await componentRegistry.registerModule(Path.join(__dirname, '../../assets/module.jsonld')); expect(Object.keys(objectLoader.resources) .includes('http://example.org/HelloWorldModule#SayHelloComponent')).toBeTruthy(); expect(Object.keys(objectLoader.resources) @@ -65,7 +66,7 @@ describe('ComponentRegistry', () => { }); it('should throw on an invalid module file', async() => { - await expect(componentRegistry.registerModule(`not-exists.jsonld`)).rejects.toThrow(); + await expect(componentRegistry.registerModule(`not-exists.jsonld`)).rejects.toThrow(/ENOENT/u); }); }); diff --git a/test/unit/loading/ComponentRegistryFinalizer-test.ts b/test/unit/loading/ComponentRegistryFinalizer-test.ts index 31d51d2c..44e3ee14 100644 --- a/test/unit/loading/ComponentRegistryFinalizer-test.ts +++ b/test/unit/loading/ComponentRegistryFinalizer-test.ts @@ -1,4 +1,5 @@ -import * as fs from 'fs'; +import * as fs from 'node:fs'; +import * as Path from 'node:path'; import type { Resource } from 'rdf-object'; import { RdfObjectLoader } from 'rdf-object'; import type { Logger } from 'winston'; @@ -20,7 +21,7 @@ describe('ComponentRegistryFinalizer', () => { }; objectLoader = new RdfObjectLoader({ uniqueLiterals: true, - context: JSON.parse(fs.readFileSync(`${__dirname}/../../../components/context.jsonld`, 'utf8')), + context: JSON.parse(fs.readFileSync(Path.join(__dirname, '../../../components/context.jsonld'), 'utf8')), }); logger = { warn: jest.fn(), @@ -51,7 +52,7 @@ describe('ComponentRegistryFinalizer', () => { }); it('should handle registered modules', async() => { - await componentRegistry.registerModule(`${__dirname}/../../assets/module.jsonld`); + await componentRegistry.registerModule(Path.join(__dirname, '../../assets/module.jsonld')); finalizer.finalize(); expect(Object.keys(componentResources) .includes('http://example.org/HelloWorldModule#SayHelloComponent')).toBeTruthy(); @@ -108,8 +109,8 @@ describe('ComponentRegistryFinalizer', () => { componentRegistry.registerComponent(component1); componentRegistry.registerComponent(component2); finalizer.finalize(); - expect(component1.properties.parameters.length).toBe(2); - expect(component1.properties.constructorArguments[0].list![0].property.fields.list!.length).toBe(2); + expect(component1.properties.parameters).toHaveLength(2); + expect(component1.properties.constructorArguments[0].list![0].property.fields.list!).toHaveLength(2); }); }); @@ -125,7 +126,7 @@ describe('ComponentRegistryFinalizer', () => { ], }); finalizer.inheritParameters(component1, []); - expect(component1.properties.parameters.length).toBe(1); + expect(component1.properties.parameters).toHaveLength(1); expect(component1.properties.parameters[0]).toBe(component1.properties.parameters[0]); }); @@ -149,7 +150,7 @@ describe('ComponentRegistryFinalizer', () => { ], }); finalizer.inheritParameters(component1, [ component2 ]); - expect(component1.properties.parameters.length).toBe(2); + expect(component1.properties.parameters).toHaveLength(2); expect(component1.properties.parameters[0]).toBe(component1.properties.parameters[0]); expect(component1.properties.parameters[1]).toBe(component2.properties.parameters[0]); }); @@ -183,7 +184,7 @@ describe('ComponentRegistryFinalizer', () => { ], }); finalizer.inheritParameters(component1, [ component2, component3 ]); - expect(component1.properties.parameters.length).toBe(3); + expect(component1.properties.parameters).toHaveLength(3); expect(component1.properties.parameters[0]).toBe(component1.properties.parameters[0]); expect(component1.properties.parameters[1]).toBe(component2.properties.parameters[0]); expect(component1.properties.parameters[2]).toBe(component3.properties.parameters[0]); @@ -212,7 +213,7 @@ describe('ComponentRegistryFinalizer', () => { ], }); finalizer.inheritParameters(component1, [ component2 ]); - expect(component1.properties.parameters.length).toBe(3); + expect(component1.properties.parameters).toHaveLength(3); expect(component1.properties.parameters[0]).toBe(component1.properties.parameters[0]); expect(component1.properties.parameters[1]).toBe(component2.properties.parameters[0]); expect(component1.properties.parameters[2]).toBe(component2.properties.parameters[1]); @@ -248,7 +249,7 @@ describe('ComponentRegistryFinalizer', () => { ], }); finalizer.inheritParameters(component1, [ component2 ]); - expect(component1.properties.parameters.length).toBe(3); + expect(component1.properties.parameters).toHaveLength(3); expect(component1.properties.parameters[0]).toBe(component1.properties.parameters[0]); expect(component1.properties.parameters[1]).toBe(component2.properties.parameters[0]); expect(component1.properties.parameters[2]).toBe(component3.properties.parameters[0]); @@ -277,7 +278,7 @@ describe('ComponentRegistryFinalizer', () => { ], }); finalizer.inheritParameters(component1, [ component2 ]); - expect(component1.properties.parameters.length).toBe(2); + expect(component1.properties.parameters).toHaveLength(2); expect(component1.properties.parameters[0]).toBe(component2.properties.parameters[0]); expect(component1.properties.parameters[1]).toBe(component2.properties.parameters[1]); }); @@ -305,7 +306,7 @@ describe('ComponentRegistryFinalizer', () => { }, }); finalizer.inheritParameters(component1, [ component2 ]); - expect(component1.properties.parameters.length).toBe(2); + expect(component1.properties.parameters).toHaveLength(2); expect(component1.properties.parameters[0]).toBe(component1.properties.parameters[0]); expect(component1.properties.parameters[1]).toBe(component2.property.component.properties.parameters[0]); }); @@ -366,7 +367,7 @@ describe('ComponentRegistryFinalizer', () => { }, }); finalizer.inheritConstructorArguments(component1); - expect(component1.property.constructorArguments.list!.length).toBe(0); + expect(component1.property.constructorArguments.list!).toHaveLength(0); }); it('should handle a constructorArgs without extends', async() => { @@ -385,7 +386,7 @@ describe('ComponentRegistryFinalizer', () => { }, }); finalizer.inheritConstructorArguments(component1); - expect(component1.property.constructorArguments.list!.length).toBe(2); + expect(component1.property.constructorArguments.list!).toHaveLength(2); }); it('should handle a constructorArgs with extends', async() => { @@ -448,13 +449,13 @@ describe('ComponentRegistryFinalizer', () => { }, }); finalizer.inheritConstructorArguments(component1); - expect(component1.property.constructorArguments.list!.length).toBe(2); - expect(component1.property.constructorArguments.list![0].property.fields.list!.length).toBe(2); + expect(component1.property.constructorArguments.list!).toHaveLength(2); + expect(component1.property.constructorArguments.list![0].property.fields.list!).toHaveLength(2); expect(component1.property.constructorArguments.list![0].property.fields.list![0]) .toBe(component2.property.constructorArguments.list![0].property.fields.list![0]); expect(component1.property.constructorArguments.list![0].property.fields.list![1]) .toBe(component2.property.constructorArguments.list![0].property.fields.list![1]); - expect(component1.property.constructorArguments.list![1].property.fields.list!.length).toBe(2); + expect(component1.property.constructorArguments.list![1].property.fields.list!).toHaveLength(2); expect(component1.property.constructorArguments.list![1].property.fields.list![0]) .toBe(component3.property.constructorArguments.list![0].property.fields.list![0]); expect(component1.property.constructorArguments.list![1].property.fields.list![1]) @@ -533,8 +534,8 @@ describe('ComponentRegistryFinalizer', () => { }, }); finalizer.inheritConstructorArgumentsEntry(cargs, [ cargsSuper ]); - expect(cargs.property.fields.list!.length).toBe(1); - expect(cargs.property.fields.list![0].value).toEqual('ex:field1'); + expect(cargs.property.fields.list!).toHaveLength(1); + expect(cargs.property.fields.list![0].value).toBe('ex:field1'); }); it('should handle extending args with multiple fields', async() => { @@ -553,10 +554,10 @@ describe('ComponentRegistryFinalizer', () => { ], }); finalizer.inheritConstructorArgumentsEntry(cargs, [ cargsSuper ]); - expect(cargs.property.fields.list!.length).toBe(3); - expect(cargs.property.fields.list![0].value).toEqual('ex:field1'); - expect(cargs.property.fields.list![1].value).toEqual('ex:field2'); - expect(cargs.property.fields.list![2].value).toEqual('ex:field3'); + expect(cargs.property.fields.list!).toHaveLength(3); + expect(cargs.property.fields.list![0].value).toBe('ex:field1'); + expect(cargs.property.fields.list![1].value).toBe('ex:field2'); + expect(cargs.property.fields.list![2].value).toBe('ex:field3'); }); it('should handle nested extending args with one field', async() => { @@ -576,9 +577,9 @@ describe('ComponentRegistryFinalizer', () => { ], }); finalizer.inheritConstructorArgumentsEntry(cargs, [ cargsSuper ]); - expect(cargs.property.fields.list!.length).toBe(2); - expect(cargs.property.fields.list![0].value).toEqual('ex:field1'); - expect(cargs.property.fields.list![1].value).toEqual('ex:field1.1'); + expect(cargs.property.fields.list!).toHaveLength(2); + expect(cargs.property.fields.list![0].value).toBe('ex:field1'); + expect(cargs.property.fields.list![1].value).toBe('ex:field1.1'); }); it('should not add already present fields', async() => { @@ -600,9 +601,9 @@ describe('ComponentRegistryFinalizer', () => { ], }); finalizer.inheritConstructorArgumentsEntry(cargs, [ cargsSuper ]); - expect(cargs.property.fields.list!.length).toBe(2); - expect(cargs.property.fields.list![0].value).toEqual('ex:field1'); - expect(cargs.property.fields.list![1].value).toEqual('ex:field2'); + expect(cargs.property.fields.list!).toHaveLength(2); + expect(cargs.property.fields.list![0].value).toBe('ex:field1'); + expect(cargs.property.fields.list![1].value).toBe('ex:field2'); }); }); }); diff --git a/test/unit/loading/ComponentsManager-test.ts b/test/unit/loading/ComponentsManager-test.ts index 2a3b512c..a459d85a 100644 --- a/test/unit/loading/ComponentsManager-test.ts +++ b/test/unit/loading/ComponentsManager-test.ts @@ -1,4 +1,5 @@ -import * as fs from 'fs'; +import * as fs from 'node:fs'; +import * as Path from 'node:path'; import type { Resource } from 'rdf-object'; import { RdfObjectLoader } from 'rdf-object'; import type { Logger } from 'winston'; @@ -8,15 +9,16 @@ import { ConfigRegistry } from '../../../lib/loading/ConfigRegistry'; import type { IModuleState } from '../../../lib/loading/ModuleStateBuilder'; import { ErrorResourcesContext } from '../../../lib/util/ErrorResourcesContext'; -jest.mock('fs', () => ({ +jest.mock('fs', () => ({ ...jest.requireActual('fs'), writeFileSync: jest.fn(), })); +// eslint-disable-next-line jest/no-untyped-mock-factory jest.mock('../../../lib/loading/ComponentsManagerBuilder', () => ({ // eslint-disable-next-line object-shorthand ComponentsManagerBuilder: function(args: any) { return { - build: jest.fn(() => ({ + build: jest.fn(async() => ({ type: 'INSTANCE', args, })), @@ -39,13 +41,13 @@ describe('ComponentsManager', () => { moduleState = { mainModulePath, componentModules: { - A: `${__dirname}/../../assets/module.jsonld`, + A: Path.join(__dirname, '../../assets/module.jsonld'), }, nodeModulePaths: [], }; objectLoader = new RdfObjectLoader({ uniqueLiterals: true, - context: JSON.parse(fs.readFileSync(`${__dirname}/../../../components/context.jsonld`, 'utf8')), + context: JSON.parse(fs.readFileSync(Path.join(__dirname, '../../../components/context.jsonld'), 'utf8')), }); componentResources = {}; logger = { @@ -79,7 +81,7 @@ describe('ComponentsManager', () => { describe('build', () => { it('should pass options to the builder', async() => { - expect(await ComponentsManager.build({ mainModulePath: 'MMP' })) + await expect(ComponentsManager.build({ mainModulePath: 'MMP' })).resolves .toEqual({ type: 'INSTANCE', args: { mainModulePath: 'MMP' }, @@ -111,7 +113,7 @@ describe('ComponentsManager', () => { moduleState: { mainModulePath, componentModules: { - A: `${mainModulePath}/../../assets/module.jsonld`, + A: Path.join(mainModulePath, '../../assets/module.jsonld'), }, nodeModulePaths: [], }, @@ -120,8 +122,8 @@ describe('ComponentsManager', () => { }); it('should instantiate an existing config without options', async() => { - await componentsManager.configRegistry.register(`${__dirname}/../../assets/config.jsonld`); - expect(await componentsManager.instantiate('http://example.org/myconfig')).toEqual('INSTANCE'); + await componentsManager.configRegistry.register(Path.join(__dirname, '../../assets/config.jsonld')); + await expect(componentsManager.instantiate('http://example.org/myconfig')).resolves.toBe('INSTANCE'); expect(configConstructorPool.instantiate).toHaveBeenCalledWith( componentsManager.objectLoader.resources['http://example.org/myconfig'], {}, @@ -129,9 +131,9 @@ describe('ComponentsManager', () => { }); it('should instantiate an existing config with options', async() => { - await componentsManager.configRegistry.register(`${__dirname}/../../assets/config.jsonld`); - expect(await componentsManager.instantiate('http://example.org/myconfig', { variables: { a: 1 }})) - .toEqual('INSTANCE'); + await componentsManager.configRegistry.register(Path.join(__dirname, '../../assets/config.jsonld')); + await expect(componentsManager.instantiate('http://example.org/myconfig', { variables: { a: 1 }})).resolves + .toBe('INSTANCE'); expect(configConstructorPool.instantiate).toHaveBeenCalledWith( componentsManager.objectLoader.resources['http://example.org/myconfig'], { variables: { a: 1 }}, @@ -141,7 +143,7 @@ describe('ComponentsManager', () => { describe('getInstantiatedResources', () => { it('should return an array of instantiated Resources', async() => { - await componentsManager.configRegistry.register(`${__dirname}/../../assets/config.jsonld`); + await componentsManager.configRegistry.register(Path.join(__dirname, '../../assets/config.jsonld')); expect(componentsManager.getInstantiatedResources()).toHaveLength(1); }); }); @@ -164,7 +166,7 @@ describe('ComponentsManager', () => { moduleState: { mainModulePath, componentModules: { - A: `${mainModulePath}/../../assets/module.jsonld`, + A: Path.join(mainModulePath, '../../assets/module.jsonld'), }, nodeModulePaths: [], }, diff --git a/test/unit/loading/ComponentsManagerBuilder-test.ts b/test/unit/loading/ComponentsManagerBuilder-test.ts index 38c5affb..55e147f9 100644 --- a/test/unit/loading/ComponentsManagerBuilder-test.ts +++ b/test/unit/loading/ComponentsManagerBuilder-test.ts @@ -1,3 +1,4 @@ +import * as Path from 'node:path'; import { RdfObjectLoader } from 'rdf-object'; import { createLogger } from 'winston'; import { ConfigConstructorPool } from '../../../lib/construction/ConfigConstructorPool'; @@ -12,6 +13,7 @@ import { ConfigPreprocessorComponentMapped } from '../../../lib/preprocess/Confi import { ConfigPreprocessorOverride } from '../../../lib/preprocess/ConfigPreprocessorOverride'; const mainModulePath = __dirname; +// eslint-disable-next-line jest/no-untyped-mock-factory jest.mock('winston', () => ({ createLogger: jest.fn(() => ({ info: jest.fn(), @@ -22,7 +24,7 @@ jest.mock('winston', () => ({ label: jest.fn(), colorize: jest.fn(), timestamp: jest.fn(), - printf: jest.fn(cb => { + printf: jest.fn((cb) => { cb({ level: 'L', message: 'M', label: 'L', timestamp: 'T' }); }), combine: jest.fn(), @@ -35,11 +37,12 @@ const dummyModuleState = { mainModulePath, componentModules: { A: { - 1: `${__dirname}/../../assets/module.jsonld`, + 1: Path.join(__dirname, '../../assets/module.jsonld'), }, }, nodeModulePaths: [], }; +// eslint-disable-next-line jest/no-untyped-mock-factory jest.mock('../../../lib/loading/ModuleStateBuilder', () => ({ // eslint-disable-next-line object-shorthand ModuleStateBuilder: function() { @@ -63,7 +66,7 @@ describe('ComponentsManagerBuilder', () => { expect(mgr).toBeTruthy(); expect(mgr.moduleState).toBe(dummyModuleState); expect(mgr.objectLoader).toBeInstanceOf(RdfObjectLoader); - expect(Object.keys(mgr.componentResources).length).toBe(2); + expect(Object.keys(mgr.componentResources)).toHaveLength(2); expect(Object.keys(mgr.componentResources) .includes('http://example.org/HelloWorldModule#SayHelloComponent')).toBeTruthy(); expect(Object.keys(mgr.componentResources) @@ -72,7 +75,7 @@ describe('ComponentsManagerBuilder', () => { expect(mgr.dumpErrorState).toBe(true); expect(mgr.configConstructorPool).toBeInstanceOf(ConfigConstructorPool); expect(( mgr.configConstructorPool).constructionStrategy).toBeInstanceOf(ConstructionStrategyCommonJs); - expect(( mgr.configConstructorPool).configPreprocessors.length).toBe(3); + expect(( mgr.configConstructorPool).configPreprocessors).toHaveLength(3); expect(( mgr.configConstructorPool).configPreprocessors[0]).toBeInstanceOf(ConfigPreprocessorOverride); expect(( mgr.configConstructorPool).configPreprocessors[1]).toBeInstanceOf(ConfigPreprocessorComponentMapped); expect(( mgr.configConstructorPool).configPreprocessors[2]).toBeInstanceOf(ConfigPreprocessorComponent); @@ -94,12 +97,12 @@ describe('ComponentsManagerBuilder', () => { expect(mgr).toBeTruthy(); expect(mgr.moduleState).toBe(dummyModuleState); expect(mgr.objectLoader).toBeInstanceOf(RdfObjectLoader); - expect(Object.keys(mgr.componentResources).length).toBe(0); + expect(Object.keys(mgr.componentResources)).toHaveLength(0); expect(mgr.configRegistry).toBeInstanceOf(ConfigRegistry); expect(mgr.dumpErrorState).toBe(true); expect(mgr.configConstructorPool).toBeInstanceOf(ConfigConstructorPool); expect(( mgr.configConstructorPool).constructionStrategy).toBeInstanceOf(ConstructionStrategyCommonJs); - expect(( mgr.configConstructorPool).configPreprocessors.length).toBe(3); + expect(( mgr.configConstructorPool).configPreprocessors).toHaveLength(3); expect(( mgr.configConstructorPool).configPreprocessors[0]).toBeInstanceOf(ConfigPreprocessorOverride); expect(( mgr.configConstructorPool).configPreprocessors[1]).toBeInstanceOf(ConfigPreprocessorComponentMapped); expect(( mgr.configConstructorPool).configPreprocessors[2]).toBeInstanceOf(ConfigPreprocessorComponent); @@ -111,8 +114,8 @@ describe('ComponentsManagerBuilder', () => { }); it('should build with custom non-empty moduleLoader', async() => { - const moduleLoader = jest.fn(async registry => { - await registry.registerModule(`${__dirname}/../../assets/module.jsonld`); + const moduleLoader = jest.fn(async(registry) => { + await registry.registerModule(Path.join(__dirname, '../../assets/module.jsonld')); }); const componentsManagerBuilder = new ComponentsManagerBuilder({ mainModulePath, @@ -123,7 +126,7 @@ describe('ComponentsManagerBuilder', () => { expect(mgr).toBeTruthy(); expect(mgr.moduleState).toBe(dummyModuleState); expect(mgr.objectLoader).toBeInstanceOf(RdfObjectLoader); - expect(Object.keys(mgr.componentResources).length).toBe(2); + expect(Object.keys(mgr.componentResources)).toHaveLength(2); expect(Object.keys(mgr.componentResources) .includes('http://example.org/HelloWorldModule#SayHelloComponent')).toBeTruthy(); expect(Object.keys(mgr.componentResources) @@ -132,7 +135,7 @@ describe('ComponentsManagerBuilder', () => { expect(mgr.dumpErrorState).toBe(true); expect(mgr.configConstructorPool).toBeInstanceOf(ConfigConstructorPool); expect(( mgr.configConstructorPool).constructionStrategy).toBeInstanceOf(ConstructionStrategyCommonJs); - expect(( mgr.configConstructorPool).configPreprocessors.length).toBe(3); + expect(( mgr.configConstructorPool).configPreprocessors).toHaveLength(3); expect(( mgr.configConstructorPool).configPreprocessors[0]).toBeInstanceOf(ConfigPreprocessorOverride); expect(( mgr.configConstructorPool).configPreprocessors[1]).toBeInstanceOf(ConfigPreprocessorComponentMapped); expect(( mgr.configConstructorPool).configPreprocessors[2]).toBeInstanceOf(ConfigPreprocessorComponent); @@ -144,8 +147,8 @@ describe('ComponentsManagerBuilder', () => { }); it('should build with custom configLoader', async() => { - const configLoader = jest.fn(async configRegistry => { - await configRegistry.register(`${__dirname}/../../assets/config.jsonld`); + const configLoader = jest.fn(async(configRegistry) => { + await configRegistry.register(Path.join(__dirname, '../../assets/config.jsonld')); }); const componentsManagerBuilder = new ComponentsManagerBuilder({ mainModulePath, @@ -156,14 +159,14 @@ describe('ComponentsManagerBuilder', () => { expect(mgr).toBeTruthy(); expect(mgr.moduleState).toBe(dummyModuleState); expect(mgr.objectLoader).toBeInstanceOf(RdfObjectLoader); - expect(Object.keys(mgr.componentResources).length).toBe(2); + expect(Object.keys(mgr.componentResources)).toHaveLength(2); expect(mgr.configRegistry).toBeInstanceOf(ConfigRegistry); expect(Object.keys(mgr.objectLoader.resources) .includes('http://example.org/myconfig')).toBeTruthy(); expect(mgr.dumpErrorState).toBe(true); expect(mgr.configConstructorPool).toBeInstanceOf(ConfigConstructorPool); expect(( mgr.configConstructorPool).constructionStrategy).toBeInstanceOf(ConstructionStrategyCommonJs); - expect(( mgr.configConstructorPool).configPreprocessors.length).toBe(3); + expect(( mgr.configConstructorPool).configPreprocessors).toHaveLength(3); expect(( mgr.configConstructorPool).configPreprocessors[0]).toBeInstanceOf(ConfigPreprocessorOverride); expect(( mgr.configConstructorPool).configPreprocessors[1]).toBeInstanceOf(ConfigPreprocessorComponentMapped); expect(( mgr.configConstructorPool).configPreprocessors[2]).toBeInstanceOf(ConfigPreprocessorComponent); @@ -185,12 +188,12 @@ describe('ComponentsManagerBuilder', () => { expect(mgr).toBeTruthy(); expect(mgr.moduleState).toBe(dummyModuleState); expect(mgr.objectLoader).toBeInstanceOf(RdfObjectLoader); - expect(Object.keys(mgr.componentResources).length).toBe(2); + expect(Object.keys(mgr.componentResources)).toHaveLength(2); expect(mgr.configRegistry).toBeInstanceOf(ConfigRegistry); expect(mgr.dumpErrorState).toBe(true); expect(mgr.configConstructorPool).toBeInstanceOf(ConfigConstructorPool); expect(( mgr.configConstructorPool).constructionStrategy).toBe(constructionStrategy); - expect(( mgr.configConstructorPool).configPreprocessors.length).toBe(3); + expect(( mgr.configConstructorPool).configPreprocessors).toHaveLength(3); expect(( mgr.configConstructorPool).configPreprocessors[0]).toBeInstanceOf(ConfigPreprocessorOverride); expect(( mgr.configConstructorPool).configPreprocessors[1]).toBeInstanceOf(ConfigPreprocessorComponentMapped); expect(( mgr.configConstructorPool).configPreprocessors[2]).toBeInstanceOf(ConfigPreprocessorComponent); @@ -211,12 +214,12 @@ describe('ComponentsManagerBuilder', () => { expect(mgr).toBeTruthy(); expect(mgr.moduleState).toBe(dummyModuleState); expect(mgr.objectLoader).toBeInstanceOf(RdfObjectLoader); - expect(Object.keys(mgr.componentResources).length).toBe(2); + expect(Object.keys(mgr.componentResources)).toHaveLength(2); expect(mgr.configRegistry).toBeInstanceOf(ConfigRegistry); expect(mgr.dumpErrorState).toBe(true); expect(mgr.configConstructorPool).toBeInstanceOf(ConfigConstructorPool); expect(( mgr.configConstructorPool).constructionStrategy).toBeInstanceOf(ConstructionStrategyCommonJs); - expect(( mgr.configConstructorPool).configPreprocessors.length).toBe(3); + expect(( mgr.configConstructorPool).configPreprocessors).toHaveLength(3); expect(( mgr.configConstructorPool).configPreprocessors[0]).toBeInstanceOf(ConfigPreprocessorOverride); expect(( mgr.configConstructorPool).configPreprocessors[1]).toBeInstanceOf(ConfigPreprocessorComponentMapped); expect(( mgr.configConstructorPool).configPreprocessors[2]).toBeInstanceOf(ConfigPreprocessorComponent); @@ -237,12 +240,12 @@ describe('ComponentsManagerBuilder', () => { expect(mgr).toBeTruthy(); expect(mgr.moduleState).toBe(dummyModuleState); expect(mgr.objectLoader).toBeInstanceOf(RdfObjectLoader); - expect(Object.keys(mgr.componentResources).length).toBe(2); + expect(Object.keys(mgr.componentResources)).toHaveLength(2); expect(mgr.configRegistry).toBeInstanceOf(ConfigRegistry); expect(mgr.dumpErrorState).toBe(false); expect(mgr.configConstructorPool).toBeInstanceOf(ConfigConstructorPool); expect(( mgr.configConstructorPool).constructionStrategy).toBeInstanceOf(ConstructionStrategyCommonJs); - expect(( mgr.configConstructorPool).configPreprocessors.length).toBe(3); + expect(( mgr.configConstructorPool).configPreprocessors).toHaveLength(3); expect(( mgr.configConstructorPool).configPreprocessors[0]).toBeInstanceOf(ConfigPreprocessorOverride); expect(( mgr.configConstructorPool).configPreprocessors[1]).toBeInstanceOf(ConfigPreprocessorComponentMapped); expect(( mgr.configConstructorPool).configPreprocessors[2]).toBeInstanceOf(ConfigPreprocessorComponent); @@ -263,12 +266,12 @@ describe('ComponentsManagerBuilder', () => { expect(mgr).toBeTruthy(); expect(mgr.moduleState).toBe(dummyModuleState); expect(mgr.objectLoader).toBeInstanceOf(RdfObjectLoader); - expect(Object.keys(mgr.componentResources).length).toBe(2); + expect(Object.keys(mgr.componentResources)).toHaveLength(2); expect(mgr.configRegistry).toBeInstanceOf(ConfigRegistry); expect(mgr.dumpErrorState).toBe(true); expect(mgr.configConstructorPool).toBeInstanceOf(ConfigConstructorPool); expect(( mgr.configConstructorPool).constructionStrategy).toBeInstanceOf(ConstructionStrategyCommonJs); - expect(( mgr.configConstructorPool).configPreprocessors.length).toBe(3); + expect(( mgr.configConstructorPool).configPreprocessors).toHaveLength(3); expect(( mgr.configConstructorPool).configPreprocessors[0]).toBeInstanceOf(ConfigPreprocessorOverride); expect(( mgr.configConstructorPool).configPreprocessors[1]).toBeInstanceOf(ConfigPreprocessorComponentMapped); expect(( mgr.configConstructorPool).configPreprocessors[2]).toBeInstanceOf(ConfigPreprocessorComponent); @@ -285,7 +288,7 @@ describe('ComponentsManagerBuilder', () => { mainModulePath, componentModules: { B: { - 1: `${__dirname}/../../assets/module.jsonld`, + 1: Path.join(__dirname, '../../assets/module.jsonld'), }, }, nodeModulePaths: [], @@ -299,12 +302,12 @@ describe('ComponentsManagerBuilder', () => { expect(mgr).toBeTruthy(); expect(mgr.moduleState).toBe(customModuleState); expect(mgr.objectLoader).toBeInstanceOf(RdfObjectLoader); - expect(Object.keys(mgr.componentResources).length).toBe(2); + expect(Object.keys(mgr.componentResources)).toHaveLength(2); expect(mgr.configRegistry).toBeInstanceOf(ConfigRegistry); expect(mgr.dumpErrorState).toBe(true); expect(mgr.configConstructorPool).toBeInstanceOf(ConfigConstructorPool); expect(( mgr.configConstructorPool).constructionStrategy).toBeInstanceOf(ConstructionStrategyCommonJs); - expect(( mgr.configConstructorPool).configPreprocessors.length).toBe(3); + expect(( mgr.configConstructorPool).configPreprocessors).toHaveLength(3); expect(( mgr.configConstructorPool).configPreprocessors[0]).toBeInstanceOf(ConfigPreprocessorOverride); expect(( mgr.configConstructorPool).configPreprocessors[1]).toBeInstanceOf(ConfigPreprocessorComponentMapped); expect(( mgr.configConstructorPool).configPreprocessors[2]).toBeInstanceOf(ConfigPreprocessorComponent); @@ -326,12 +329,12 @@ describe('ComponentsManagerBuilder', () => { expect(mgr).toBeTruthy(); expect(mgr.moduleState).toBe(dummyModuleState); expect(mgr.objectLoader).toBeInstanceOf(RdfObjectLoader); - expect(Object.keys(mgr.componentResources).length).toBe(2); + expect(Object.keys(mgr.componentResources)).toHaveLength(2); expect(mgr.configRegistry).toBeInstanceOf(ConfigRegistry); expect(mgr.dumpErrorState).toBe(true); expect(mgr.configConstructorPool).toBeInstanceOf(ConfigConstructorPool); expect(( mgr.configConstructorPool).constructionStrategy).toBeInstanceOf(ConstructionStrategyCommonJs); - expect(( mgr.configConstructorPool).configPreprocessors.length).toBe(3); + expect(( mgr.configConstructorPool).configPreprocessors).toHaveLength(3); expect(( mgr.configConstructorPool).configPreprocessors[0]).toBeInstanceOf(ConfigPreprocessorOverride); expect(( mgr.configConstructorPool).configPreprocessors[1]).toBeInstanceOf(ConfigPreprocessorComponentMapped); expect(( mgr.configConstructorPool).configPreprocessors[2]).toBeInstanceOf(ConfigPreprocessorComponent); @@ -353,12 +356,12 @@ describe('ComponentsManagerBuilder', () => { expect(mgr).toBeTruthy(); expect(mgr.moduleState).toBe(dummyModuleState); expect(mgr.objectLoader).toBeInstanceOf(RdfObjectLoader); - expect(Object.keys(mgr.componentResources).length).toBe(2); + expect(Object.keys(mgr.componentResources)).toHaveLength(2); expect(mgr.configRegistry).toBeInstanceOf(ConfigRegistry); expect(mgr.dumpErrorState).toBe(true); expect(mgr.configConstructorPool).toBeInstanceOf(ConfigConstructorPool); expect(( mgr.configConstructorPool).constructionStrategy).toBeInstanceOf(ConstructionStrategyCommonJs); - expect(( mgr.configConstructorPool).configPreprocessors.length).toBe(3); + expect(( mgr.configConstructorPool).configPreprocessors).toHaveLength(3); expect(( mgr.configConstructorPool).configPreprocessors[0]).toBeInstanceOf(ConfigPreprocessorOverride); expect(( mgr.configConstructorPool).configPreprocessors[1]).toBeInstanceOf(ConfigPreprocessorComponentMapped); expect(( mgr.configConstructorPool).configPreprocessors[2]).toBeInstanceOf(ConfigPreprocessorComponent); diff --git a/test/unit/loading/ConfigRegistry-test.ts b/test/unit/loading/ConfigRegistry-test.ts index b1449cb5..b5f79ab4 100644 --- a/test/unit/loading/ConfigRegistry-test.ts +++ b/test/unit/loading/ConfigRegistry-test.ts @@ -1,4 +1,5 @@ -import * as fs from 'fs'; +import * as fs from 'node:fs'; +import * as Path from 'node:path'; import { RdfObjectLoader } from 'rdf-object'; import { stringToTerm } from 'rdf-string'; import type { Logger } from 'winston'; @@ -17,7 +18,7 @@ describe('ConfigRegistry', () => { }; objectLoader = new RdfObjectLoader({ uniqueLiterals: true, - context: JSON.parse(fs.readFileSync(`${__dirname}/../../../components/context.jsonld`, 'utf8')), + context: JSON.parse(fs.readFileSync(Path.join(__dirname, '../../../components/context.jsonld'), 'utf8')), }); logger = { warn: jest.fn(), @@ -33,13 +34,13 @@ describe('ConfigRegistry', () => { describe('register', () => { it('should handle a valid module file', async() => { - await configRegistry.register(`${__dirname}/../../assets/config.jsonld`); + await configRegistry.register(Path.join(__dirname, '../../assets/config.jsonld')); expect(Object.keys(objectLoader.resources) .includes('http://example.org/myconfig')).toBeTruthy(); }); it('should throw on an invalid module file', async() => { - await expect(configRegistry.register(`not-exists.jsonld`)).rejects.toThrow(); + await expect(configRegistry.register(`not-exists.jsonld`)).rejects.toThrow(/ENOENT/u); }); }); @@ -68,7 +69,7 @@ describe('ConfigRegistry', () => { describe('getInstantiatedResource', () => { it('can return an instantiated Resource', async() => { - await configRegistry.register(`${__dirname}/../../assets/config.jsonld`); + await configRegistry.register(Path.join(__dirname, '../../assets/config.jsonld')); expect(configRegistry.getInstantiatedResource(stringToTerm('http://example.org/myconfig')).property.type.value) .toBe('http://example.org/HelloWorldModule#SayHelloComponent'); }); diff --git a/test/unit/loading/ModuleStateBuilder-test.ts b/test/unit/loading/ModuleStateBuilder-test.ts index a6cf3f80..2251a4a6 100644 --- a/test/unit/loading/ModuleStateBuilder-test.ts +++ b/test/unit/loading/ModuleStateBuilder-test.ts @@ -2,8 +2,9 @@ import { mocked } from 'jest-mock'; import { ModuleStateBuilder } from '../../../lib/loading/ModuleStateBuilder'; // Import syntax only works in Node > 12 -const fs = require('fs').promises; +const fs = require('node:fs').promises; +// eslint-disable-next-line jest/no-untyped-mock-factory jest.mock('fs', () => ({ promises: { realpath: jest.fn(), @@ -70,7 +71,7 @@ describe('ModuleStateBuilder', () => { describe('buildModuleState', () => { it('should handle an undefined mainModulePathIn', async() => { - expect(await builder.buildModuleState(req)).toEqual({ + await expect(builder.buildModuleState(req)).resolves.toEqual({ componentModules: {}, contexts: {}, importPaths: {}, @@ -87,7 +88,7 @@ describe('ModuleStateBuilder', () => { }); it('should handle an defined mainModulePathIn', async() => { - expect(await builder.buildModuleState(req, '/a/b')).toEqual({ + await expect(builder.buildModuleState(req, '/a/b')).resolves.toEqual({ componentModules: {}, contexts: {}, importPaths: {}, @@ -151,7 +152,7 @@ describe('ModuleStateBuilder', () => { "version": "1.0.0" }`, }; - expect(await builder.buildModuleState(req, '/a/b')).toEqual({ + await expect(builder.buildModuleState(req, '/a/b')).resolves.toEqual({ componentModules: { 'https://linkedsoftwaredependencies.org/bundles/npm/a': { 1: '/a/components/components.jsonld', @@ -236,7 +237,7 @@ describe('ModuleStateBuilder', () => { }); it('should return the first valid main path', () => { - expect(builder.buildDefaultMainModulePath(req)).toEqual('/a/b/c/'); + expect(builder.buildDefaultMainModulePath(req)).toBe('/a/b/c/'); }); it('should return the second valid main path', () => { @@ -248,7 +249,7 @@ describe('ModuleStateBuilder', () => { '/node_modules', ], }; - expect(builder.buildDefaultMainModulePath(req)).toEqual('/a/b/'); + expect(builder.buildDefaultMainModulePath(req)).toBe('/a/b/'); }); it('should error on all invalid paths', () => { @@ -278,14 +279,14 @@ describe('ModuleStateBuilder', () => { describe('buildNodeModulePaths', () => { it('should handle empty import paths', async() => { - expect(await builder.buildNodeModulePaths([])).toEqual([]); + await expect(builder.buildNodeModulePaths([])).resolves.toEqual([]); }); it('should handle import paths without package.json\'s', async() => { - expect(await builder.buildNodeModulePaths([ + await expect(builder.buildNodeModulePaths([ '/a', '/', - ])).toEqual([]); + ])).resolves.toEqual([]); }); it('should handle import paths with direct package.json\'s', async() => { @@ -293,10 +294,10 @@ describe('ModuleStateBuilder', () => { '/a/package.json', '/package.json', ]; - expect(await builder.buildNodeModulePaths([ + await expect(builder.buildNodeModulePaths([ '/a', '/', - ])).toEqual([ + ])).resolves.toEqual([ '/a', '/', ]); @@ -460,11 +461,11 @@ describe('ModuleStateBuilder', () => { isFile: () => path !== '/dir/package.json', }; })); - expect(await builder.buildNodeModulePaths([ + await expect(builder.buildNodeModulePaths([ '/a', '/dir', '/', - ])).toEqual([ + ])).resolves.toEqual([ '/a', '/', ]); @@ -510,7 +511,7 @@ describe('ModuleStateBuilder', () => { describe('buildPackageJsons', () => { it('should handle an empty array', async() => { - expect(await builder.buildPackageJsons([])).toEqual({}); + await expect(builder.buildPackageJsons([])).resolves.toEqual({}); }); it('should handle a non-empty array', async() => { @@ -522,10 +523,10 @@ describe('ModuleStateBuilder', () => { '/a/package.json': `{ "name": "a" }`, '/package.json': `{ "name": "" }`, }; - expect(await builder.buildPackageJsons([ + await expect(builder.buildPackageJsons([ '/a', '/', - ])).toEqual({ + ])).resolves.toEqual({ '/a': { name: 'a' }, '/': { name: '' }, }); @@ -538,10 +539,10 @@ describe('ModuleStateBuilder', () => { fileContents = { '/a/package.json': `{ "name": "a" }`, }; - expect(await builder.buildPackageJsons([ + await expect(builder.buildPackageJsons([ '/a', '/', - ])).toEqual({ + ])).resolves.toEqual({ '/a': { name: 'a' }, }); }); @@ -742,42 +743,42 @@ describe('ModuleStateBuilder', () => { describe('buildComponentModules', () => { it('should handle an empty hash', async() => { - expect(await builder.buildComponentModules({})).toEqual({}); + await expect(builder.buildComponentModules({})).resolves.toEqual({}); }); it('should handle packages without expected entries', async() => { - expect(await builder.buildComponentModules({ + await expect(builder.buildComponentModules({ a: {}, b: {}, - })).toEqual({}); + })).resolves.toEqual({}); }); it('should not handle a package with only lsd:module', async() => { - expect(await builder.buildComponentModules({ + await expect(builder.buildComponentModules({ a: { version: '1.0.0', 'lsd:module': 'ex:module', }, - })).toEqual({}); + })).resolves.toEqual({}); }); it('should not handle a package with only lsd:components', async() => { - expect(await builder.buildComponentModules({ + await expect(builder.buildComponentModules({ a: { version: '1.0.0', 'lsd:components': 'components/components.jsonld', }, - })).toEqual({}); + })).resolves.toEqual({}); }); it('should handle a package with lsd:module and lsd:components', async() => { - expect(await builder.buildComponentModules({ + await expect(builder.buildComponentModules({ a: { version: '1.0.0', 'lsd:module': 'ex:module', 'lsd:components': 'components/components.jsonld', }, - })).toEqual({ + })).resolves.toEqual({ 'ex:module': { 1: 'a/components/components.jsonld', }, @@ -785,7 +786,7 @@ describe('ModuleStateBuilder', () => { }); it('should handle packages with lsd:module and lsd:components', async() => { - expect(await builder.buildComponentModules({ + await expect(builder.buildComponentModules({ a: { version: '1.0.0', 'lsd:module': 'ex:module1', @@ -796,7 +797,7 @@ describe('ModuleStateBuilder', () => { 'lsd:module': 'ex:module2', 'lsd:components': 'components/components2.jsonld', }, - })).toEqual({ + })).resolves.toEqual({ 'ex:module1': { 1: 'a/components/components1.jsonld', }, @@ -807,7 +808,7 @@ describe('ModuleStateBuilder', () => { }); it('should resolve packages with the same lsd:module to the max version', async() => { - expect(await builder.buildComponentModules({ + await expect(builder.buildComponentModules({ a: { version: '1.1.0', 'lsd:module': 'ex:module', @@ -818,12 +819,12 @@ describe('ModuleStateBuilder', () => { 'lsd:module': 'ex:module', 'lsd:components': 'components/components.jsonld', }, - })).toEqual({ + })).resolves.toEqual({ 'ex:module': { 1: 'a/components/components.jsonld', }, }); - expect(await builder.buildComponentModules({ + await expect(builder.buildComponentModules({ a: { version: '1.0.0', 'lsd:module': 'ex:module', @@ -834,7 +835,7 @@ describe('ModuleStateBuilder', () => { 'lsd:module': 'ex:module', 'lsd:components': 'components/components.jsonld', }, - })).toEqual({ + })).resolves.toEqual({ 'ex:module': { 1: 'b/components/components.jsonld', }, @@ -842,7 +843,7 @@ describe('ModuleStateBuilder', () => { }); it('should resolve packages with the same lsd:module to the max prerelease version', async() => { - expect(await builder.buildComponentModules({ + await expect(builder.buildComponentModules({ a: { version: '1.1.0-alpha.1', 'lsd:module': 'ex:module', @@ -853,12 +854,12 @@ describe('ModuleStateBuilder', () => { 'lsd:module': 'ex:module', 'lsd:components': 'components/components.jsonld', }, - })).toEqual({ + })).resolves.toEqual({ 'ex:module': { 1: 'a/components/components.jsonld', }, }); - expect(await builder.buildComponentModules({ + await expect(builder.buildComponentModules({ a: { version: '1.0.0-alpha.1', 'lsd:module': 'ex:module', @@ -869,7 +870,7 @@ describe('ModuleStateBuilder', () => { 'lsd:module': 'ex:module', 'lsd:components': 'components/components.jsonld', }, - })).toEqual({ + })).resolves.toEqual({ 'ex:module': { 1: 'b/components/components.jsonld', }, @@ -877,7 +878,7 @@ describe('ModuleStateBuilder', () => { }); it('should resolve packages with the same lsd:module and one invalid version to the valid version', async() => { - expect(await builder.buildComponentModules({ + await expect(builder.buildComponentModules({ a: { version: '1.1.0', 'lsd:module': 'ex:module', @@ -888,12 +889,12 @@ describe('ModuleStateBuilder', () => { 'lsd:module': 'ex:module', 'lsd:components': 'components/components.jsonld', }, - })).toEqual({ + })).resolves.toEqual({ 'ex:module': { 1: 'a/components/components.jsonld', }, }); - expect(await builder.buildComponentModules({ + await expect(builder.buildComponentModules({ a: { version: 'invalid', 'lsd:module': 'ex:module', @@ -904,7 +905,7 @@ describe('ModuleStateBuilder', () => { 'lsd:module': 'ex:module', 'lsd:components': 'components/components.jsonld', }, - })).toEqual({ + })).resolves.toEqual({ 'ex:module': { 1: 'b/components/components.jsonld', }, @@ -913,7 +914,7 @@ describe('ModuleStateBuilder', () => { it('should not warn on packages with the same lsd:module ' + 'with different major versions without a logger', async() => { - expect(await builder.buildComponentModules({ + await expect(builder.buildComponentModules({ a: { version: '2.0.0', 'lsd:module': 'ex:module', @@ -924,7 +925,7 @@ describe('ModuleStateBuilder', () => { 'lsd:module': 'ex:module', 'lsd:components': 'components/components.jsonld', }, - })).toEqual({ + })).resolves.toEqual({ 'ex:module': { 1: 'b/components/components.jsonld', 2: 'a/components/components.jsonld', @@ -938,7 +939,7 @@ describe('ModuleStateBuilder', () => { warn: jest.fn(), }; builder = new ModuleStateBuilder(logger); - expect(await builder.buildComponentModules({ + await expect(builder.buildComponentModules({ a: { version: '2.0.0', 'lsd:module': 'ex:module', @@ -949,7 +950,7 @@ describe('ModuleStateBuilder', () => { 'lsd:module': 'ex:module', 'lsd:components': 'components/components.jsonld', }, - })).toEqual({ + })).resolves.toEqual({ 'ex:module': { 1: 'b/components/components.jsonld', 2: 'a/components/components.jsonld', @@ -961,21 +962,21 @@ describe('ModuleStateBuilder', () => { describe('buildComponentContexts', () => { it('should handle an empty hash', async() => { - expect(await builder.buildComponentContexts({})).toEqual({}); + await expect(builder.buildComponentContexts({})).resolves.toEqual({}); }); it('should handle one package with one context', async() => { fileContents = { 'a/components/context.jsonld': `{ "name": "a" }`, }; - expect(await builder.buildComponentContexts({ + await expect(builder.buildComponentContexts({ a: { version: '1.0.0', 'lsd:contexts': { 'http://example.org/context.jsonld': 'components/context.jsonld', }, }, - })).toEqual({ + })).resolves.toEqual({ 'http://example.org/context.jsonld': { name: 'a', }, @@ -989,7 +990,7 @@ describe('ModuleStateBuilder', () => { 'b/components/context1.jsonld': `{ "name1": "b" }`, 'b/components/context2.jsonld': `{ "name2": "b" }`, }; - expect(await builder.buildComponentContexts({ + await expect(builder.buildComponentContexts({ a: { version: '1.0.0', 'lsd:contexts': { @@ -1004,7 +1005,7 @@ describe('ModuleStateBuilder', () => { 'http://example2.org/context2.jsonld': 'components/context2.jsonld', }, }, - })).toEqual({ + })).resolves.toEqual({ 'http://example.org/context1.jsonld': { name1: 'a', }, @@ -1025,7 +1026,7 @@ describe('ModuleStateBuilder', () => { 'a/components/context.jsonld': `{ "name1": "a" }`, 'b/components/context.jsonld': `{ "name2": "a" }`, }; - expect(await builder.buildComponentContexts({ + await expect(builder.buildComponentContexts({ a: { version: '1.0.1', 'lsd:contexts': { @@ -1038,12 +1039,12 @@ describe('ModuleStateBuilder', () => { 'http://example.org/context.jsonld': 'components/context.jsonld', }, }, - })).toEqual({ + })).resolves.toEqual({ 'http://example.org/context.jsonld': { name1: 'a', }, }); - expect(await builder.buildComponentContexts({ + await expect(builder.buildComponentContexts({ a: { version: '1.0.0', 'lsd:contexts': { @@ -1056,7 +1057,7 @@ describe('ModuleStateBuilder', () => { 'http://example.org/context.jsonld': 'components/context.jsonld', }, }, - })).toEqual({ + })).resolves.toEqual({ 'http://example.org/context.jsonld': { name2: 'a', }, @@ -1069,7 +1070,7 @@ describe('ModuleStateBuilder', () => { 'a/components/context.jsonld': `{ "name1": "a" }`, 'b/components/context.jsonld': `{ "name2": "a" }`, }; - expect(await builder.buildComponentContexts({ + await expect(builder.buildComponentContexts({ a: { version: '1.0.0', 'lsd:contexts': { @@ -1082,7 +1083,7 @@ describe('ModuleStateBuilder', () => { 'http://example.org/context.jsonld': 'components/context.jsonld', }, }, - })).toEqual({ + })).resolves.toEqual({ 'http://example.org/context.jsonld': { name2: 'a', }, @@ -1099,7 +1100,7 @@ describe('ModuleStateBuilder', () => { 'a/components/context.jsonld': `{ "name1": "a" }`, 'b/components/context.jsonld': `{ "name2": "a" }`, }; - expect(await builder.buildComponentContexts({ + await expect(builder.buildComponentContexts({ a: { version: '1.0.0', 'lsd:contexts': { @@ -1112,7 +1113,7 @@ describe('ModuleStateBuilder', () => { 'http://example.org/context.jsonld': 'components/context.jsonld', }, }, - })).toEqual({ + })).resolves.toEqual({ 'http://example.org/context.jsonld': { name2: 'a', }, @@ -1123,19 +1124,19 @@ describe('ModuleStateBuilder', () => { describe('buildComponentImportPaths', () => { it('should handle an empty hash', async() => { - expect(await builder.buildComponentImportPaths({})).toEqual({}); + await expect(builder.buildComponentImportPaths({})).resolves.toEqual({}); }); it('should handle one package with one import path', async() => { files = [ 'a/components/' ]; - expect(await builder.buildComponentImportPaths({ + await expect(builder.buildComponentImportPaths({ a: { version: '1.0.0', 'lsd:importPaths': { 'http://example.org/components/': 'components/', }, }, - })).toEqual({ + })).resolves.toEqual({ 'http://example.org/components/': 'a/components/', }); }); @@ -1147,7 +1148,7 @@ describe('ModuleStateBuilder', () => { 'b/components/', 'b/config/', ]; - expect(await builder.buildComponentImportPaths({ + await expect(builder.buildComponentImportPaths({ a: { version: '1.0.0', 'lsd:importPaths': { @@ -1162,7 +1163,7 @@ describe('ModuleStateBuilder', () => { 'http://example2.org/config/': 'config/', }, }, - })).toEqual({ + })).resolves.toEqual({ 'http://example.org/components/': 'a/components/', 'http://example.org/config/': 'a/config/', 'http://example2.org/components/': 'b/components/', @@ -1200,7 +1201,7 @@ describe('ModuleStateBuilder', () => { 'a/components/', 'b/components/', ]; - expect(await builder.buildComponentImportPaths({ + await expect(builder.buildComponentImportPaths({ a: { version: '1.0.1', 'lsd:importPaths': { @@ -1213,10 +1214,10 @@ describe('ModuleStateBuilder', () => { 'http://example.org/components/': 'components/', }, }, - })).toEqual({ + })).resolves.toEqual({ 'http://example.org/components/': 'a/components/', }); - expect(await builder.buildComponentImportPaths({ + await expect(builder.buildComponentImportPaths({ a: { version: '1.0.0', 'lsd:importPaths': { @@ -1229,7 +1230,7 @@ describe('ModuleStateBuilder', () => { 'http://example.org/components/': 'components/', }, }, - })).toEqual({ + })).resolves.toEqual({ 'http://example.org/components/': 'b/components/', }); }); @@ -1244,7 +1245,7 @@ describe('ModuleStateBuilder', () => { 'a/components/', 'b/components/', ]; - expect(await builder.buildComponentImportPaths({ + await expect(builder.buildComponentImportPaths({ a: { version: '1.0.0', 'lsd:importPaths': { @@ -1257,7 +1258,7 @@ describe('ModuleStateBuilder', () => { 'http://example.org/components/': 'components/', }, }, - })).toEqual({ + })).resolves.toEqual({ 'http://example.org/components/': 'b/components/', }); expect(logger.warn).toHaveBeenNthCalledWith(1, `Detected multiple incompatible occurrences of 'http://example.org/components/' for version 1.0.0 and 'b/components/'@2.0.0`); diff --git a/test/unit/preprocess/ConfigPreprocessorComponent-test.ts b/test/unit/preprocess/ConfigPreprocessorComponent-test.ts index edd463b4..123f098b 100644 --- a/test/unit/preprocess/ConfigPreprocessorComponent-test.ts +++ b/test/unit/preprocess/ConfigPreprocessorComponent-test.ts @@ -1,5 +1,6 @@ import 'jest-rdf'; -import * as fs from 'fs'; +import * as fs from 'node:fs'; +import * as Path from 'node:path'; import type { Resource } from 'rdf-object'; import { RdfObjectLoader } from 'rdf-object'; import type { Logger } from 'winston'; @@ -18,7 +19,7 @@ describe('ConfigPreprocessorComponent', () => { beforeEach(async() => { objectLoader = new RdfObjectLoader({ uniqueLiterals: true, - context: JSON.parse(fs.readFileSync(`${__dirname}/../../../components/context.jsonld`, 'utf8')), + context: JSON.parse(fs.readFileSync(Path.join(__dirname, '../../../components/context.jsonld'), 'utf8')), }); await objectLoader.context; componentResources = { @@ -73,7 +74,7 @@ describe('ConfigPreprocessorComponent', () => { }); preprocessor.canHandle(config1); preprocessor.canHandle(config2); - expect(( preprocessor).runTypeConfigs['ex:Component'].length).toEqual(2); + expect(( preprocessor).runTypeConfigs['ex:Component']).toHaveLength(2); expect(( preprocessor).runTypeConfigs['ex:Component'][0]).toBe(config1); expect(( preprocessor).runTypeConfigs['ex:Component'][1]).toBe(config2); }); @@ -85,7 +86,7 @@ describe('ConfigPreprocessorComponent', () => { }); preprocessor.canHandle(config); preprocessor.canHandle(config); - expect(( preprocessor).runTypeConfigs['ex:Component'].length).toEqual(1); + expect(( preprocessor).runTypeConfigs['ex:Component']).toHaveLength(1); expect(( preprocessor).runTypeConfigs['ex:Component'][0]).toBe(config); }); @@ -748,7 +749,7 @@ describe('ConfigPreprocessorComponent', () => { }); preprocessor.inheritParameterValues(configIn, componentIn); expect(configIn.toQuads()).toBeRdfIsomorphic(configOut.toQuads()); - expect(configIn.toQuads().length).toBe(configOut.toQuads().length); + expect(configIn.toQuads()).toHaveLength(configOut.toQuads().length); expect(componentIn.toQuads()).toBeRdfIsomorphic(componentOut.toQuads()); }); @@ -768,8 +769,7 @@ describe('ConfigPreprocessorComponent', () => { }), ]; - const configIn = objectLoader.createCompactedResource({ - }); + const configIn = objectLoader.createCompactedResource({}); const configOut = objectLoader.createCompactedResource({ 'ex:OtherComponent#param1': [ '"ABC"', @@ -825,7 +825,7 @@ describe('ConfigPreprocessorComponent', () => { preprocessor.inheritParameterValues(configIn, componentIn); preprocessor.inheritParameterValues(configIn, componentIn); expect(configIn.toQuads()).toBeRdfIsomorphic(configOut.toQuads()); - expect(configIn.toQuads().length).toBe(configOut.toQuads().length); + expect(configIn.toQuads()).toHaveLength(configOut.toQuads().length); expect(componentIn.toQuads()).toBeRdfIsomorphic(componentOut.toQuads()); }); diff --git a/test/unit/preprocess/ConfigPreprocessorComponentMapped-test.ts b/test/unit/preprocess/ConfigPreprocessorComponentMapped-test.ts index ab015ebe..3b65eb9f 100644 --- a/test/unit/preprocess/ConfigPreprocessorComponentMapped-test.ts +++ b/test/unit/preprocess/ConfigPreprocessorComponentMapped-test.ts @@ -1,4 +1,5 @@ -import * as fs from 'fs'; +import * as fs from 'node:fs'; +import * as Path from 'node:path'; import { RdfObjectLoader } from 'rdf-object/lib/RdfObjectLoader'; import type { Resource } from 'rdf-object/lib/Resource'; import { ConfigPreprocessorComponentMapped } from '../../../lib/preprocess/ConfigPreprocessorComponentMapped'; @@ -15,7 +16,7 @@ describe('ConfigPreprocessorComponentMapped', () => { beforeEach(async() => { objectLoader = new RdfObjectLoader({ uniqueLiterals: true, - context: JSON.parse(fs.readFileSync(`${__dirname}/../../../components/context.jsonld`, 'utf8')), + context: JSON.parse(fs.readFileSync(Path.join(__dirname, '../../../components/context.jsonld'), 'utf8')), }); await objectLoader.context; componentResources = { diff --git a/test/unit/preprocess/ConfigPreprocessorOverride-test.ts b/test/unit/preprocess/ConfigPreprocessorOverride-test.ts index d18371f9..a7b46b6d 100644 --- a/test/unit/preprocess/ConfigPreprocessorOverride-test.ts +++ b/test/unit/preprocess/ConfigPreprocessorOverride-test.ts @@ -222,7 +222,7 @@ describe('ConfigPreprocessorOverride', () => { }); const override1Properties = overrideInstance1.property[IRIS_OO.overrideParameters].property; let override = preprocessor.canHandle(config); - expect(override).not.toBeUndefined(); + expect(override).toBeDefined(); expect(override).toHaveLength(1); objectLoader.createCompactedResource({ @@ -235,7 +235,7 @@ describe('ConfigPreprocessorOverride', () => { }); // `ex:myOverride2` will not be applied due to cache override = preprocessor.canHandle(config); - expect(override).not.toBeUndefined(); + expect(override).toBeDefined(); expect(override).toHaveLength(1); preprocessor.transform(config, override!); expect(config.property['ex:param1']).toBe(override1Properties['ex:param1']); @@ -247,7 +247,7 @@ describe('ConfigPreprocessorOverride', () => { '@id': 'ex:myComponentInstance', types: 'ex:Component', }); - const overrideInstance1 = objectLoader.createCompactedResource({ + objectLoader.createCompactedResource({ '@id': 'ex:myOverride1', types: 'oo:Override', overrideInstance: 'ex:myComponentInstance', @@ -257,7 +257,7 @@ describe('ConfigPreprocessorOverride', () => { }); let override = preprocessor.canHandle(config); - expect(override).not.toBeUndefined(); + expect(override).toBeDefined(); expect(override).toHaveLength(1); const overrideInstance2 = objectLoader.createCompactedResource({ @@ -272,7 +272,7 @@ describe('ConfigPreprocessorOverride', () => { // `ex:myOverride2` is applied if we reset preprocessor.reset(); override = preprocessor.canHandle(config); - expect(override).not.toBeUndefined(); + expect(override).toBeDefined(); expect(override).toHaveLength(2); preprocessor.transform(config, override!); expect(config.property['ex:param1']).toBe(override2Properties['ex:param1']); @@ -412,7 +412,7 @@ describe('ConfigPreprocessorOverride', () => { }); const overrideProperties = overrideInstance.property[IRIS_OO.overrideParameters].property; const override = preprocessor.canHandle(config); - expect(override).not.toBeUndefined(); + expect(override).toBeDefined(); expect(override).toHaveLength(1); expect(() => preprocessor.transform(config, override!)).not.toThrow(); expect(config.property['ex:param1']).toBe(overrideProperties['ex:param1']); diff --git a/test/unit/preprocess/GenericsContexts-test.ts b/test/unit/preprocess/GenericsContexts-test.ts index d2cd85ed..8f31d0ae 100644 --- a/test/unit/preprocess/GenericsContexts-test.ts +++ b/test/unit/preprocess/GenericsContexts-test.ts @@ -1,4 +1,5 @@ -import * as fs from 'fs'; +import * as fs from 'node:fs'; +import * as Path from 'node:path'; import 'jest-rdf'; import { DataFactory } from 'rdf-data-factory'; import type { Resource } from 'rdf-object'; @@ -25,7 +26,7 @@ describe('GenericsContext', () => { beforeEach(async() => { objectLoader = new RdfObjectLoader({ uniqueLiterals: true, - context: JSON.parse(fs.readFileSync(`${__dirname}/../../../components/context.jsonld`, 'utf8')), + context: JSON.parse(fs.readFileSync(Path.join(__dirname, '../../../components/context.jsonld'), 'utf8')), }); await objectLoader.context; typeTypeValidatorAlwaysFalse = jest.fn(() => ( {})); @@ -997,7 +998,7 @@ describe('GenericsContext', () => { objectLoader.createCompactedResource('xsd:integer'), typeTypeValidatorOnlyIdentical, )!.term, - ).toEqualRdfTerm(objectLoader.createCompactedResource('xsd:integer')!.term); + ).toEqualRdfTerm(objectLoader.createCompactedResource('xsd:integer').term); }); it('should not merge if union of matches of left does not match right', () => { @@ -1053,7 +1054,7 @@ describe('GenericsContext', () => { }), typeTypeValidatorOnlyIdentical, )!.term, - ).toEqualRdfTerm(objectLoader.createCompactedResource('xsd:integer')!.term); + ).toEqualRdfTerm(objectLoader.createCompactedResource('xsd:integer').term); }); it('should not merge if union of matches of right does not match left', () => { @@ -1081,7 +1082,7 @@ describe('GenericsContext', () => { objectLoader.createCompactedResource('ex:TYPE1'), typeTypeValidatorOnlyIdentical, )!.term, - ).toEqualRdfTerm(objectLoader.createCompactedResource('ex:TYPE1')!.term); + ).toEqualRdfTerm(objectLoader.createCompactedResource('ex:TYPE1').term); }); it('should not merge with left a non-matching generic component', () => { @@ -1107,7 +1108,7 @@ describe('GenericsContext', () => { }), typeTypeValidatorOnlyIdentical, )!.term, - ).toEqualRdfTerm(objectLoader.createCompactedResource('ex:TYPE1')!.term); + ).toEqualRdfTerm(objectLoader.createCompactedResource('ex:TYPE1').term); }); it('should not merge with right a non-matching generic component', () => { diff --git a/test/unit/preprocess/ParameterHandler-test.ts b/test/unit/preprocess/ParameterHandler-test.ts index 3e4d50c0..590655d0 100644 --- a/test/unit/preprocess/ParameterHandler-test.ts +++ b/test/unit/preprocess/ParameterHandler-test.ts @@ -1,4 +1,5 @@ -import * as fs from 'fs'; +import * as fs from 'node:fs'; +import * as Path from 'node:path'; import type { Resource } from 'rdf-object'; import { RdfObjectLoader } from 'rdf-object/lib/RdfObjectLoader'; import { GenericsContext } from '../../../lib/preprocess/GenericsContext'; @@ -15,7 +16,7 @@ describe('ParameterHandler', () => { beforeEach(async() => { objectLoader = new RdfObjectLoader({ uniqueLiterals: true, - context: JSON.parse(fs.readFileSync(`${__dirname}/../../../components/context.jsonld`, 'utf8')), + context: JSON.parse(fs.readFileSync(Path.join(__dirname, '../../../components/context.jsonld'), 'utf8')), }); await objectLoader.context; genericsContext = new GenericsContext(objectLoader, []); @@ -668,6 +669,85 @@ describe('ParameterHandler', () => { }); }); + describe('with three applicable default scopes', () => { + beforeEach(() => { + param = objectLoader.createCompactedResource({ + '@id': 'ex:myParam', + defaultScoped: [ + { + defaultScope: [ + 'ex:Component1', + ], + defaultScopedValue: '"DEFAULT1"', + }, + { + defaultScope: [ + 'ex:Component1', + ], + defaultScopedValue: '"DEFAULT2"', + }, + { + defaultScope: [ + 'ex:Component1', + ], + defaultScopedValue: '"DEFAULT3"', + }, + ], + }); + }); + + it('should set all default values', () => { + const expected: Resource = objectLoader.createCompactedResource({ + list: [ + '"DEFAULT1"', + '"DEFAULT2"', + '"DEFAULT3"', + ], + }); + expectOutputProperties(handler + .applyParameterValues(configRoot, param, configElement, genericsContext), expected); + }); + }); + + describe('with multiple applicable default scopes where the second value is a list', () => { + beforeEach(() => { + param = objectLoader.createCompactedResource({ + '@id': 'ex:myParam', + defaultScoped: [ + { + defaultScope: [ + 'ex:Component1', + ], + defaultScopedValue: '"DEFAULT1"', + }, + { + defaultScope: [ + 'ex:Component1', + ], + defaultScopedValue: { + list: [ + '"DEFAULT2"', + '"DEFAULT3"', + ], + }, + }, + ], + }); + }); + + it('should set all default values', () => { + const expected: Resource = objectLoader.createCompactedResource({ + list: [ + '"DEFAULT1"', + '"DEFAULT2"', + '"DEFAULT3"', + ], + }); + expectOutputProperties(handler + .applyParameterValues(configRoot, param, configElement, genericsContext), expected); + }); + }); + describe('with invalid default scopes', () => { it('should throw for a missing defaultScope', () => { param = objectLoader.createCompactedResource({ diff --git a/test/unit/preprocess/overrideSteps/OverrideTestUtil.ts b/test/unit/preprocess/overrideSteps/OverrideTestUtil.ts index 3d100734..6949d562 100644 --- a/test/unit/preprocess/overrideSteps/OverrideTestUtil.ts +++ b/test/unit/preprocess/overrideSteps/OverrideTestUtil.ts @@ -1,4 +1,5 @@ -import * as fs from 'fs'; +import * as fs from 'node:fs'; +import * as Path from 'node:path'; import { RdfObjectLoader } from 'rdf-object'; /** @@ -7,7 +8,7 @@ import { RdfObjectLoader } from 'rdf-object'; export async function setupObjectLoader(): Promise { const objectLoader = new RdfObjectLoader({ uniqueLiterals: true, - context: JSON.parse(fs.readFileSync(`${__dirname}/../../../../components/context.jsonld`, 'utf8')), + context: JSON.parse(fs.readFileSync(Path.join(__dirname, '../../../../components/context.jsonld'), 'utf8')), }); await objectLoader.context; diff --git a/test/unit/preprocess/overrideSteps/OverrideUtil-test.ts b/test/unit/preprocess/overrideSteps/OverrideUtil-test.ts index fdca8a6c..95b3b8e9 100644 --- a/test/unit/preprocess/overrideSteps/OverrideUtil-test.ts +++ b/test/unit/preprocess/overrideSteps/OverrideUtil-test.ts @@ -2,7 +2,8 @@ import 'jest-rdf'; import { DataFactory } from 'rdf-data-factory'; import type { RdfObjectLoader, Resource } from 'rdf-object'; import { - extractOverrideStepFields, findResourceIndex, + extractOverrideStepFields, + findResourceIndex, getPropertyResourceList, } from '../../../../lib/preprocess/overridesteps/OverrideUtil'; import { setupObjectLoader } from './OverrideTestUtil'; @@ -72,7 +73,9 @@ describe('OverrideUtil', (): void => { const list = getPropertyResourceList(config, parameter); expect(list).toHaveLength(3); expect(list.map(entry => entry.term)).toEqualRdfTermArray([ - DF.literal('value1'), DF.literal('value2'), DF.literal('value3'), + DF.literal('value1'), + DF.literal('value2'), + DF.literal('value3'), ]); }); @@ -108,13 +111,16 @@ describe('OverrideUtil', (): void => { expect(list).toBeDefined(); expect(list).toHaveLength(3); expect(list!.map(entry => entry.term)).toEqualRdfTermArray([ - DF.literal('value1'), DF.literal('value2'), DF.literal('value3'), + DF.literal('value1'), + DF.literal('value2'), + DF.literal('value3'), ]); list!.splice(1, 1); expect(list).toHaveLength(2); expect(list!.map(entry => entry.term)).toEqualRdfTermArray([ - DF.literal('value1'), DF.literal('value3'), + DF.literal('value1'), + DF.literal('value3'), ]); }); }); diff --git a/test/unit/preprocess/parameterproperty/ParameterPropertyHandlerRange-test.ts b/test/unit/preprocess/parameterproperty/ParameterPropertyHandlerRange-test.ts index 90dbdaec..bc5e2277 100644 --- a/test/unit/preprocess/parameterproperty/ParameterPropertyHandlerRange-test.ts +++ b/test/unit/preprocess/parameterproperty/ParameterPropertyHandlerRange-test.ts @@ -1,4 +1,5 @@ -import * as fs from 'fs'; +import * as fs from 'node:fs'; +import * as Path from 'node:path'; import type { NamedNode } from '@rdfjs/types'; import { DataFactory } from 'rdf-data-factory'; import { RdfObjectLoader } from 'rdf-object/lib/RdfObjectLoader'; @@ -38,13 +39,12 @@ describe('ParameterPropertyHandlerRange', () => { beforeEach(async() => { objectLoader = new RdfObjectLoader({ uniqueLiterals: true, - context: JSON.parse(fs.readFileSync(`${__dirname}/../../../../components/context.jsonld`, 'utf8')), + context: JSON.parse(fs.readFileSync(Path.join(__dirname, '../../../../components/context.jsonld'), 'utf8')), }); await objectLoader.context; genericsContext = new GenericsContext(objectLoader, []); handler = new ParameterPropertyHandlerRange(objectLoader, true); - // eslint-disable-next-line @typescript-eslint/dot-notation - interpretValueAsType = handler['interpretValueAsType']; + interpretValueAsType = handler.interpretValueAsType; }); describe('canHandle', () => { @@ -2553,41 +2553,51 @@ describe('ParameterPropertyHandlerRange', () => { it('should capture strings', () => { const value1 = objectLoader.createCompactedResource('"aaa"'); - expect(interpretValueAsType(value1, + expect(interpretValueAsType( + value1, objectLoader.createCompactedResource(IRIS_XSD.string), errorContext, - genericsContext)).toEqual(successResult); + genericsContext, + )).toEqual(successResult); expect(( value1.term).valueRaw).toBeUndefined(); const value2 = objectLoader.createCompactedResource('"qqseqfqefefù$^"'); - expect(interpretValueAsType(value2, + expect(interpretValueAsType( + value2, objectLoader.createCompactedResource(IRIS_XSD.string), errorContext, - genericsContext)).toEqual(successResult); + genericsContext, + )).toEqual(successResult); expect(( value2.term).valueRaw).toBeUndefined(); }); it('should capture booleans', () => { const value1 = objectLoader.createCompactedResource('"true"'); - expect(interpretValueAsType(value1, + expect(interpretValueAsType( + value1, objectLoader.createCompactedResource(IRIS_XSD.boolean), errorContext, - genericsContext)).toEqual(successResult); - expect(( value1.term).valueRaw).toEqual(true); + genericsContext, + )).toEqual(successResult); + expect(( value1.term).valueRaw).toBe(true); const value2 = objectLoader.createCompactedResource('"false"'); - expect(interpretValueAsType(value2, + expect(interpretValueAsType( + value2, objectLoader.createCompactedResource(IRIS_XSD.boolean), errorContext, - genericsContext)).toEqual(successResult); - expect(( value2.term).valueRaw).toEqual(false); + genericsContext, + )).toEqual(successResult); + expect(( value2.term).valueRaw).toBe(false); }); it('should error on invalid booleans', () => { - expect(interpretValueAsType(objectLoader.createCompactedResource('"1"'), + expect(interpretValueAsType( + objectLoader.createCompactedResource('"1"'), objectLoader.createCompactedResource(IRIS_XSD.boolean), errorContext, - genericsContext)) + genericsContext, + )) .toEqual({ match: true, value: { @@ -2599,25 +2609,31 @@ describe('ParameterPropertyHandlerRange', () => { it('should capture integers', () => { const value1 = objectLoader.createCompactedResource('"1"'); - expect(interpretValueAsType(value1, + expect(interpretValueAsType( + value1, objectLoader.createCompactedResource(IRIS_XSD.integer), errorContext, - genericsContext)).toEqual(successResult); - expect(( value1.term).valueRaw).toEqual(1); + genericsContext, + )).toEqual(successResult); + expect(( value1.term).valueRaw).toBe(1); const value2 = objectLoader.createCompactedResource('"1456789876"'); - expect(interpretValueAsType(value2, + expect(interpretValueAsType( + value2, objectLoader.createCompactedResource(IRIS_XSD.integer), errorContext, - genericsContext)).toEqual(successResult); - expect(( value2.term).valueRaw).toEqual(1_456_789_876); + genericsContext, + )).toEqual(successResult); + expect(( value2.term).valueRaw).toBe(1_456_789_876); }); it('should error on invalid integers', () => { - expect(interpretValueAsType(objectLoader.createCompactedResource('"a"'), + expect(interpretValueAsType( + objectLoader.createCompactedResource('"a"'), objectLoader.createCompactedResource(IRIS_XSD.integer), errorContext, - genericsContext)) + genericsContext, + )) .toEqual({ match: true, value: { @@ -2628,10 +2644,12 @@ describe('ParameterPropertyHandlerRange', () => { }); it('should error on invalid integers that are numbers', () => { - expect(interpretValueAsType(objectLoader.createCompactedResource('"1.12"'), + expect(interpretValueAsType( + objectLoader.createCompactedResource('"1.12"'), objectLoader.createCompactedResource(IRIS_XSD.integer), errorContext, - genericsContext)) + genericsContext, + )) .toEqual({ match: true, value: { @@ -2642,86 +2660,108 @@ describe('ParameterPropertyHandlerRange', () => { }); it('should capture numbers', () => { const value1 = objectLoader.createCompactedResource('"1"'); - expect(interpretValueAsType(value1, + expect(interpretValueAsType( + value1, objectLoader.createCompactedResource(IRIS_XSD.number), errorContext, - genericsContext)).toEqual(successResult); - expect(( value1.term).valueRaw).toEqual(1); + genericsContext, + )).toEqual(successResult); + expect(( value1.term).valueRaw).toBe(1); const value2 = objectLoader.createCompactedResource('"1456789876"'); - expect(interpretValueAsType(value2, + expect(interpretValueAsType( + value2, objectLoader.createCompactedResource(IRIS_XSD.number), errorContext, - genericsContext)).toEqual(successResult); - expect(( value2.term).valueRaw).toEqual(1_456_789_876); + genericsContext, + )).toEqual(successResult); + expect(( value2.term).valueRaw).toBe(1_456_789_876); }); it('should capture ints', () => { const value1 = objectLoader.createCompactedResource('"1"'); - expect(interpretValueAsType(value1, + expect(interpretValueAsType( + value1, objectLoader.createCompactedResource(IRIS_XSD.int), errorContext, - genericsContext)).toEqual(successResult); - expect(( value1.term).valueRaw).toEqual(1); + genericsContext, + )).toEqual(successResult); + expect(( value1.term).valueRaw).toBe(1); const value2 = objectLoader.createCompactedResource('"1456789876"'); - expect(interpretValueAsType(value2, + expect(interpretValueAsType( + value2, objectLoader.createCompactedResource(IRIS_XSD.int), errorContext, - genericsContext)).toEqual(successResult); - expect(( value2.term).valueRaw).toEqual(1_456_789_876); + genericsContext, + )).toEqual(successResult); + expect(( value2.term).valueRaw).toBe(1_456_789_876); }); it('should capture bytes', () => { const value1 = objectLoader.createCompactedResource('"1"'); - expect(interpretValueAsType(value1, + expect(interpretValueAsType( + value1, objectLoader.createCompactedResource(IRIS_XSD.byte), errorContext, - genericsContext)).toEqual(successResult); - expect(( value1.term).valueRaw).toEqual(1); + genericsContext, + )).toEqual(successResult); + expect(( value1.term).valueRaw).toBe(1); const value2 = objectLoader.createCompactedResource('"1456789876"'); - expect(interpretValueAsType(value2, + expect(interpretValueAsType( + value2, objectLoader.createCompactedResource(IRIS_XSD.byte), errorContext, - genericsContext)).toEqual(successResult); - expect(( value2.term).valueRaw).toEqual(1_456_789_876); + genericsContext, + )).toEqual(successResult); + expect(( value2.term).valueRaw).toBe(1_456_789_876); }); it('should capture longs', () => { const value1 = objectLoader.createCompactedResource('"1"'); - expect(interpretValueAsType(value1, + expect(interpretValueAsType( + value1, objectLoader.createCompactedResource(IRIS_XSD.long), errorContext, - genericsContext)).toEqual(successResult); - expect(( value1.term).valueRaw).toEqual(1); + genericsContext, + )).toEqual(successResult); + expect(( value1.term).valueRaw).toBe(1); const value2 = objectLoader.createCompactedResource('"1456789876"'); - expect(interpretValueAsType(value2, + expect(interpretValueAsType( + value2, objectLoader.createCompactedResource(IRIS_XSD.long), errorContext, - genericsContext)).toEqual(successResult); - expect(( value2.term).valueRaw).toEqual(1_456_789_876); + genericsContext, + )).toEqual(successResult); + expect(( value2.term).valueRaw).toBe(1_456_789_876); }); it('should capture floats', () => { const value1 = objectLoader.createCompactedResource('"1"'); - expect(interpretValueAsType(value1, + expect(interpretValueAsType( + value1, objectLoader.createCompactedResource(IRIS_XSD.float), errorContext, - genericsContext)).toEqual(successResult); - expect(( value1.term).valueRaw).toEqual(1); + genericsContext, + )).toEqual(successResult); + expect(( value1.term).valueRaw).toBe(1); const value2 = objectLoader.createCompactedResource('"256.36"'); - expect(interpretValueAsType(value2, + expect(interpretValueAsType( + value2, objectLoader.createCompactedResource(IRIS_XSD.float), errorContext, - genericsContext)).toEqual(successResult); - expect(( value2.term).valueRaw).toEqual(256.36); + genericsContext, + )).toEqual(successResult); + expect(( value2.term).valueRaw).toBe(256.36); }); it('should error on invalid floats', () => { - expect(interpretValueAsType(objectLoader.createCompactedResource('"a"'), + expect(interpretValueAsType( + objectLoader.createCompactedResource('"a"'), objectLoader.createCompactedResource(IRIS_XSD.float), errorContext, - genericsContext)) + genericsContext, + )) .toEqual({ match: true, value: { @@ -2732,56 +2772,70 @@ describe('ParameterPropertyHandlerRange', () => { }); it('should capture decimals', () => { const value1 = objectLoader.createCompactedResource('"1"'); - expect(interpretValueAsType(value1, + expect(interpretValueAsType( + value1, objectLoader.createCompactedResource(IRIS_XSD.decimal), errorContext, - genericsContext)).toEqual(successResult); - expect(( value1.term).valueRaw).toEqual(1); + genericsContext, + )).toEqual(successResult); + expect(( value1.term).valueRaw).toBe(1); const value2 = objectLoader.createCompactedResource('"256.36"'); - expect(interpretValueAsType(value2, + expect(interpretValueAsType( + value2, objectLoader.createCompactedResource(IRIS_XSD.decimal), errorContext, - genericsContext)).toEqual(successResult); - expect(( value2.term).valueRaw).toEqual(256.36); + genericsContext, + )).toEqual(successResult); + expect(( value2.term).valueRaw).toBe(256.36); }); it('should capture doubles', () => { const value1 = objectLoader.createCompactedResource('"1"'); - expect(interpretValueAsType(value1, + expect(interpretValueAsType( + value1, objectLoader.createCompactedResource(IRIS_XSD.double), errorContext, - genericsContext)).toEqual(successResult); - expect(( value1.term).valueRaw).toEqual(1); + genericsContext, + )).toEqual(successResult); + expect(( value1.term).valueRaw).toBe(1); const value2 = objectLoader.createCompactedResource('"256.36"'); - expect(interpretValueAsType(value2, + expect(interpretValueAsType( + value2, objectLoader.createCompactedResource(IRIS_XSD.double), errorContext, - genericsContext)).toEqual(successResult); - expect(( value2.term).valueRaw).toEqual(256.36); + genericsContext, + )).toEqual(successResult); + expect(( value2.term).valueRaw).toBe(256.36); }); it('should capture JSON', () => { const value1 = objectLoader.createCompactedResource('"1"'); - expect(interpretValueAsType(value1, + expect(interpretValueAsType( + value1, objectLoader.createCompactedResource(IRIS_RDF.JSON), errorContext, - genericsContext)).toEqual(successResult); - expect(( value1.term).valueRaw).toEqual(1); + genericsContext, + )).toEqual(successResult); + expect(( value1.term).valueRaw).toBe(1); const value2 = objectLoader.createCompactedResource('"{"a":"b"}"'); - expect(interpretValueAsType(value2, + expect(interpretValueAsType( + value2, objectLoader.createCompactedResource(IRIS_RDF.JSON), errorContext, - genericsContext)).toEqual(successResult); + genericsContext, + )).toEqual(successResult); expect(( value2.term).valueRaw).toEqual({ a: 'b' }); }); it('should error on invalid JSON', () => { - expect(interpretValueAsType(objectLoader.createCompactedResource('"{a:\\"b\\"}"'), + expect(interpretValueAsType( + objectLoader.createCompactedResource('"{a:\\"b\\"}"'), objectLoader.createCompactedResource(IRIS_RDF.JSON), errorContext, - genericsContext)) + genericsContext, + )) .toEqual({ match: true, value: { @@ -2857,7 +2911,7 @@ describe('ParameterPropertyHandlerRange', () => { objectLoader.createCompactedResource('ex:param'), genericsContext, conflict, - )).toThrow(`The value "ex:value" with types "ex:Type1,ex:Type2" for parameter "ex:param" is not of required range type "any"`); + )).toThrow(`The value "ex:value" with types "ex:Type1, ex:Type2" for parameter "ex:param" is not of required range type "any"`); }); it('handles a defined list value', () => { @@ -2877,6 +2931,7 @@ describe('ParameterPropertyHandlerRange', () => { it('handles generics', () => { genericsContext.bindings['ex:T'] = objectLoader.createCompactedResource('ex:A'); genericsContext.bindings['ex:U'] = objectLoader.createCompactedResource('ex:B'); + let caughtError: unknown; try { ParameterPropertyHandlerRange.throwIncorrectTypeError( objectLoader.createCompactedResource('ex:value'), @@ -2884,53 +2939,53 @@ describe('ParameterPropertyHandlerRange', () => { genericsContext, conflict, ); - expect(false).toBeTruthy(); // This can't occur } catch (error: unknown) { - const context = ( error).exportContext(); - expect(context.generics).toEqual(`[ + caughtError = error; + } + const context = ( caughtError).exportContext(); + expect(context.generics).toBe(`[ => ex:A, => ex:B ]`); - } }); }); describe('rangeToDisplayString', () => { it('handles undefined range', () => { - expect(ParameterPropertyHandlerRange.rangeToDisplayString(undefined, genericsContext)).toEqual('any'); + expect(ParameterPropertyHandlerRange.rangeToDisplayString(undefined, genericsContext)).toBe('any'); }); it('handles wildcard range', () => { expect(ParameterPropertyHandlerRange.rangeToDisplayString(objectLoader.createCompactedResource({ '@type': 'ParameterRangeWildcard', - }), genericsContext)).toEqual('any'); + }), genericsContext)).toBe('any'); }); it('handles ParameterRangeUndefined range', () => { expect(ParameterPropertyHandlerRange.rangeToDisplayString(objectLoader.createCompactedResource({ '@type': 'ParameterRangeUndefined', - }), genericsContext)).toEqual('undefined'); + }), genericsContext)).toBe('undefined'); }); it('handles ParameterRangeArray range', () => { expect(ParameterPropertyHandlerRange.rangeToDisplayString(objectLoader.createCompactedResource({ '@type': 'ParameterRangeArray', parameterRangeValue: 'ex:Type', - }), genericsContext)).toEqual('ex:Type[]'); + }), genericsContext)).toBe('ex:Type[]'); }); it('handles ParameterRangeRest range', () => { expect(ParameterPropertyHandlerRange.rangeToDisplayString(objectLoader.createCompactedResource({ '@type': 'ParameterRangeRest', parameterRangeValue: 'ex:Type', - }), genericsContext)).toEqual('...ex:Type'); + }), genericsContext)).toBe('...ex:Type'); }); it('handles ParameterRangeKeyof range', () => { expect(ParameterPropertyHandlerRange.rangeToDisplayString(objectLoader.createCompactedResource({ '@type': 'ParameterRangeKeyof', parameterRangeValue: 'ex:Type', - }), genericsContext)).toEqual('keyof ex:Type'); + }), genericsContext)).toBe('keyof ex:Type'); }); it('handles ParameterRangeUnion range', () => { @@ -2940,7 +2995,7 @@ describe('ParameterPropertyHandlerRange', () => { 'ex:Type1', 'ex:Type2', ], - }), genericsContext)).toEqual('ex:Type1 | ex:Type2'); + }), genericsContext)).toBe('ex:Type1 | ex:Type2'); }); it('handles ParameterRangeIntersection range', () => { @@ -2950,7 +3005,7 @@ describe('ParameterPropertyHandlerRange', () => { 'ex:Type1', 'ex:Type2', ], - }), genericsContext)).toEqual('ex:Type1 & ex:Type2'); + }), genericsContext)).toBe('ex:Type1 & ex:Type2'); }); it('handles ParameterRangeTuple range', () => { @@ -2960,21 +3015,21 @@ describe('ParameterPropertyHandlerRange', () => { 'ex:Type1', 'ex:Type2', ], - }), genericsContext)).toEqual('[ex:Type1, ex:Type2]'); + }), genericsContext)).toBe('[ex:Type1, ex:Type2]'); }); it('handles ParameterRangeLiteral range', () => { expect(ParameterPropertyHandlerRange.rangeToDisplayString(objectLoader.createCompactedResource({ '@type': 'ParameterRangeLiteral', parameterRangeValue: '"abc"', - }), genericsContext)).toEqual('abc'); + }), genericsContext)).toBe('abc'); }); it('handles ParameterRangeGenericTypeReference range with an unknown generic', () => { expect(ParameterPropertyHandlerRange.rangeToDisplayString(objectLoader.createCompactedResource({ '@type': 'ParameterRangeGenericTypeReference', parameterRangeGenericType: 'ex:GEN_T', - }), genericsContext)).toEqual('UNKNOWN GENERIC: ex:GEN_T'); + }), genericsContext)).toBe('UNKNOWN GENERIC: ex:GEN_T'); }); it('handles ParameterRangeGenericTypeReference range with a known generic', () => { @@ -2982,7 +3037,7 @@ describe('ParameterPropertyHandlerRange', () => { expect(ParameterPropertyHandlerRange.rangeToDisplayString(objectLoader.createCompactedResource({ '@type': 'ParameterRangeGenericTypeReference', parameterRangeGenericType: 'ex:GEN_T', - }), genericsContext)).toEqual('GENERIC: ex:GEN_T'); + }), genericsContext)).toBe('GENERIC: ex:GEN_T'); }); it('handles ParameterRangeGenericComponent range', () => { @@ -2993,7 +3048,7 @@ describe('ParameterPropertyHandlerRange', () => { '"A"', '"B"', ], - }), genericsContext)).toEqual('(ex:Component)'); + }), genericsContext)).toBe('(ex:Component)'); }); it('handles ParameterRangeIndexed range', () => { @@ -3004,7 +3059,7 @@ describe('ParameterPropertyHandlerRange', () => { '@type': 'ParameterRangeLiteral', parameterRangeValue: '"abc"', }, - }), genericsContext)).toEqual('ex:Component[abc]'); + }), genericsContext)).toBe('ex:Component[abc]'); }); }); }); diff --git a/test/unit/rdf/PrefetchedDocumentLoader-test.ts b/test/unit/rdf/PrefetchedDocumentLoader-test.ts index 9990cab0..5ae816f9 100644 --- a/test/unit/rdf/PrefetchedDocumentLoader-test.ts +++ b/test/unit/rdf/PrefetchedDocumentLoader-test.ts @@ -1,4 +1,5 @@ -import * as fs from 'fs'; +import * as fs from 'node:fs'; +import * as Path from 'node:path'; import { PrefetchedDocumentLoader } from '../../../lib/rdf/PrefetchedDocumentLoader'; globalThis.fetch = jest.fn(async() => ({ @@ -21,18 +22,18 @@ describe('PrefetchedDocumentLoader', () => { describe('load', () => { it('for a prefetched context', async() => { - expect(await loader.load('http://example.org/context')) + await expect(loader.load('http://example.org/context')).resolves .toEqual({ a: 'b' }); }); it('for the built-in prefetched context', async() => { - expect(await loader.load(`https://linkedsoftwaredependencies.org/bundles/npm/componentsjs/^4.0.0/components/context.jsonld`)) - .toEqual(JSON.parse(fs.readFileSync(`${__dirname}/../../../components/context.jsonld`, 'utf8'))); + await expect(loader.load(`https://linkedsoftwaredependencies.org/bundles/npm/componentsjs/^4.0.0/components/context.jsonld`)).resolves + .toEqual(JSON.parse(fs.readFileSync(Path.join(__dirname, '../../../components/context.jsonld'), 'utf8'))); }); it('for the built-in prefetched context that is deprecated', async() => { - expect(await loader.load(`https://linkedsoftwaredependencies.org/bundles/npm/componentsjs/^3.0.0/components/context.jsonld`)) - .toEqual(JSON.parse(fs.readFileSync(`${__dirname}/../../../components/context.jsonld`, 'utf8'))); + await expect(loader.load(`https://linkedsoftwaredependencies.org/bundles/npm/componentsjs/^3.0.0/components/context.jsonld`)).resolves + .toEqual(JSON.parse(fs.readFileSync(Path.join(__dirname, '../../../components/context.jsonld'), 'utf8'))); }); it('for the built-in prefetched 3.0.0 context that is deprecated with a logger', async() => { @@ -44,8 +45,8 @@ describe('PrefetchedDocumentLoader', () => { logger, path: 'PATH', }); - expect(await loader.load(`https://linkedsoftwaredependencies.org/bundles/npm/componentsjs/^3.0.0/components/context.jsonld`)) - .toEqual(JSON.parse(fs.readFileSync(`${__dirname}/../../../components/context.jsonld`, 'utf8'))); + await expect(loader.load(`https://linkedsoftwaredependencies.org/bundles/npm/componentsjs/^3.0.0/components/context.jsonld`)).resolves + .toEqual(JSON.parse(fs.readFileSync(Path.join(__dirname, '../../../components/context.jsonld'), 'utf8'))); expect(logger.warn).not.toHaveBeenCalled(); }); @@ -58,8 +59,8 @@ describe('PrefetchedDocumentLoader', () => { logger, path: 'PATH', }); - expect(await loader.load(`https://linkedsoftwaredependencies.org/bundles/npm/componentsjs/^4.0.0/components/context.jsonld`)) - .toEqual(JSON.parse(fs.readFileSync(`${__dirname}/../../../components/context.jsonld`, 'utf8'))); + await expect(loader.load(`https://linkedsoftwaredependencies.org/bundles/npm/componentsjs/^4.0.0/components/context.jsonld`)).resolves + .toEqual(JSON.parse(fs.readFileSync(Path.join(__dirname, '../../../components/context.jsonld'), 'utf8'))); expect(logger.warn).not.toHaveBeenCalled(); }); @@ -72,8 +73,8 @@ describe('PrefetchedDocumentLoader', () => { logger, path: 'PATH', }); - expect(await loader.load(`https://linkedsoftwaredependencies.org/bundles/npm/componentsjs/^${PrefetchedDocumentLoader.CJS_MAJOR_VERSION}.0.0/components/context.jsonld`)) - .toEqual(JSON.parse(fs.readFileSync(`${__dirname}/../../../components/context.jsonld`, 'utf8'))); + await expect(loader.load(`https://linkedsoftwaredependencies.org/bundles/npm/componentsjs/^${PrefetchedDocumentLoader.cjsMajorVersion}.0.0/components/context.jsonld`)).resolves + .toEqual(JSON.parse(fs.readFileSync(Path.join(__dirname, '../../../components/context.jsonld'), 'utf8'))); expect(logger.warn).not.toHaveBeenCalled(); }); @@ -85,8 +86,8 @@ describe('PrefetchedDocumentLoader', () => { contexts: {}, logger, }); - expect(await loader.load(`https://linkedsoftwaredependencies.org/bundles/npm/componentsjs/^3.0.0/components/context.jsonld`)) - .toEqual(JSON.parse(fs.readFileSync(`${__dirname}/../../../components/context.jsonld`, 'utf8'))); + await expect(loader.load(`https://linkedsoftwaredependencies.org/bundles/npm/componentsjs/^3.0.0/components/context.jsonld`)).resolves + .toEqual(JSON.parse(fs.readFileSync(Path.join(__dirname, '../../../components/context.jsonld'), 'utf8'))); expect(logger.warn).not.toHaveBeenCalled(); }); @@ -128,7 +129,7 @@ describe('PrefetchedDocumentLoader', () => { path: 'PATH', remoteContextLookups: true, }); - expect(await loader.load('http://remote.org/context')) + await expect(loader.load('http://remote.org/context')).resolves .toEqual({ x: 'y' }); }); @@ -142,7 +143,7 @@ describe('PrefetchedDocumentLoader', () => { path: 'PATH', remoteContextLookups: true, }); - expect(await loader.load('http://remote.org/context')) + await expect(loader.load('http://remote.org/context')).resolves .toEqual({ x: 'y' }); expect(logger.warn).toHaveBeenCalledWith(`Detected remote context lookup for 'http://remote.org/context' in PATH. This may indicate a missing or invalid dependency, incorrect version number, or an invalid context URL.`); }); @@ -156,7 +157,7 @@ describe('PrefetchedDocumentLoader', () => { logger, remoteContextLookups: true, }); - expect(await loader.load('http://remote.org/context')) + await expect(loader.load('http://remote.org/context')).resolves .toEqual({ x: 'y' }); expect(logger.warn).toHaveBeenCalledWith(`Detected remote context lookup for 'http://remote.org/context'. This may indicate a missing or invalid dependency, incorrect version number, or an invalid context URL.`); }); diff --git a/test/unit/rdf/RdfParser-test.ts b/test/unit/rdf/RdfParser-test.ts index 3c258086..d7e19aff 100644 --- a/test/unit/rdf/RdfParser-test.ts +++ b/test/unit/rdf/RdfParser-test.ts @@ -1,7 +1,8 @@ -import * as Path from 'path'; +import * as Path from 'node:path'; import type { RdfParserOptions } from '../../../lib/rdf/RdfParser'; import { RdfParser } from '../../../lib/rdf/RdfParser'; import 'jest-rdf'; + // Import syntax only works in Node > 12 const arrayifyStream = require('arrayify-stream'); const quad = require('rdf-quad'); @@ -71,7 +72,7 @@ describe('RdfParser', () => { const options: RdfParserOptions = { path: 'path/to/file.ttl', }; - expect(await arrayifyStream(parser.parse(streamifyString(``), options))) + await expect(arrayifyStream(parser.parse(streamifyString(``), options))).resolves .toEqual([]); }); @@ -79,7 +80,7 @@ describe('RdfParser', () => { const options: RdfParserOptions = { path: 'path/to/file.ttl', }; - expect(await arrayifyStream(parser.parse(streamifyString(` .`), options))) + await expect(arrayifyStream(parser.parse(streamifyString(` .`), options))).resolves .toBeRdfIsomorphic([ quad('ex:s', 'ex:p', 'ex:o'), ]); @@ -89,7 +90,7 @@ describe('RdfParser', () => { const options: RdfParserOptions = { path: 'path/to/file.ttl', }; - expect(await arrayifyStream(parser.parse(streamifyString(` .`), options))) + await expect(arrayifyStream(parser.parse(streamifyString(` .`), options))).resolves .toBeRdfIsomorphic([ quad('file://path/to/s', 'ex:p', 'ex:o'), ]); @@ -99,7 +100,7 @@ describe('RdfParser', () => { const options: RdfParserOptions = { path: 'path/./to/file.ttl', }; - expect(await arrayifyStream(parser.parse(streamifyString(` .`), options))) + await expect(arrayifyStream(parser.parse(streamifyString(` .`), options))).resolves .toBeRdfIsomorphic([ quad('file://path/to/s', 'ex:p', 'ex:o'), ]); @@ -109,7 +110,7 @@ describe('RdfParser', () => { const options: RdfParserOptions = { path: '/path/to/file.ttl', }; - expect(await arrayifyStream(parser.parse(streamifyString(` .`), options))) + await expect(arrayifyStream(parser.parse(streamifyString(` .`), options))).resolves .toBeRdfIsomorphic([ quad('file:///path/to/s', 'ex:p', 'ex:o'), ]); @@ -119,7 +120,7 @@ describe('RdfParser', () => { const options: RdfParserOptions = { path: 'C:/path/to/file.ttl', }; - expect(await arrayifyStream(parser.parse(streamifyString(` .`), options))) + await expect(arrayifyStream(parser.parse(streamifyString(` .`), options))).resolves .toBeRdfIsomorphic([ quad('file://C:/path/to/s', 'ex:p', 'ex:o'), ]); @@ -129,7 +130,7 @@ describe('RdfParser', () => { const options: RdfParserOptions = { path: 'http://example.org/file.ttl', }; - expect(await arrayifyStream(parser.parse(streamifyString(` .`), options))) + await expect(arrayifyStream(parser.parse(streamifyString(` .`), options))).resolves .toBeRdfIsomorphic([ quad('http://example.org/s', 'ex:p', 'ex:o'), ]); @@ -140,7 +141,7 @@ describe('RdfParser', () => { path: 'path/to/file.ttl', baseIRI: 'http://base.org/', }; - expect(await arrayifyStream(parser.parse(streamifyString(` .`), options))) + await expect(arrayifyStream(parser.parse(streamifyString(` .`), options))).resolves .toBeRdfIsomorphic([ quad('http://base.org/s', 'ex:p', 'ex:o'), ]); @@ -154,7 +155,7 @@ describe('RdfParser', () => { "@id": "ex:s", "ex:p": { "@id": "ex:o" } }`; - expect(await arrayifyStream(parser.parse(streamifyString(doc), options))) + await expect(arrayifyStream(parser.parse(streamifyString(doc), options))).resolves .toBeRdfIsomorphic([ quad('ex:s', 'ex:p', 'ex:o'), ]); @@ -176,7 +177,7 @@ describe('RdfParser', () => { "@id": "ex:s", "p": { "@id": "ex:o" } }`; - expect(await arrayifyStream(parser.parse(streamifyString(doc), options))) + await expect(arrayifyStream(parser.parse(streamifyString(doc), options))).resolves .toBeRdfIsomorphic([ quad('ex:s', 'http://vocab.org/p', 'ex:o'), ]); @@ -202,7 +203,7 @@ describe('RdfParser', () => { . , . `; - expect(await arrayifyStream(parser.parse(streamifyString(doc), options))) + await expect(arrayifyStream(parser.parse(streamifyString(doc), options))).resolves .toBeRdfIsomorphic([ quad('ex:s', 'ex:p', 'ex:o'), quad('ex:s', 'http://www.w3.org/2000/01/rdf-schema#seeAlso', 'http://example.org/myfile1.ttl'), @@ -220,7 +221,7 @@ describe('RdfParser', () => { . , . `; - expect(await arrayifyStream(parser.parse(streamifyString(doc), options))) + await expect(arrayifyStream(parser.parse(streamifyString(doc), options))).resolves .toBeRdfIsomorphic([ quad('ex:s', 'ex:p', 'ex:o'), quad('ex:s', 'http://www.w3.org/2000/01/rdf-schema#seeAlso', 'http://example.org/myfile1%2Ettl'), @@ -286,7 +287,7 @@ describe('RdfParser', () => { . . `; - expect(await arrayifyStream(parser.parse(streamifyString(doc), options))) + await expect(arrayifyStream(parser.parse(streamifyString(doc), options))).resolves .toBeRdfIsomorphic([ quad('ex:s', 'ex:p', 'ex:o'), quad('ex:s', 'http://www.w3.org/2000/01/rdf-schema#seeAlso', 'http://example.org/myfilenest.ttl'), @@ -304,7 +305,7 @@ describe('RdfParser', () => { . , . `; - expect(await arrayifyStream(parser.parse(streamifyString(doc), options))) + await expect(arrayifyStream(parser.parse(streamifyString(doc), options))).resolves .toBeRdfIsomorphic([ quad('ex:s', 'ex:p', 'ex:o'), quad('ex:s', 'http://www.w3.org/2000/01/rdf-schema#seeAlso', 'http://example.org/myfile1.ttl'), @@ -323,7 +324,7 @@ describe('RdfParser', () => { . , . `; - expect(await arrayifyStream(parser.parse(streamifyString(doc), options))) + await expect(arrayifyStream(parser.parse(streamifyString(doc), options))).resolves .toBeRdfIsomorphic([ quad('ex:s', 'ex:p', 'ex:o'), quad('ex:s', 'http://www.w3.org/2000/01/rdf-schema#seeAlso', 'http://example.org/myfile1.ttl'), @@ -344,7 +345,7 @@ describe('RdfParser', () => { . , . `; - expect(await arrayifyStream(parser.parse(streamifyString(doc), options))) + await expect(arrayifyStream(parser.parse(streamifyString(doc), options))).resolves .toBeRdfIsomorphic([ quad('ex:s', 'ex:p', 'ex:o'), quad('ex:s', 'http://www.w3.org/2000/01/rdf-schema#seeAlso', 'http://example.org/a/myfile1.ttl'), @@ -392,7 +393,7 @@ describe('RdfParser', () => { path: 'path/to/file.ttl', logger, }; - expect(await arrayifyStream(parser.parse(streamifyString(` .`), options))) + await expect(arrayifyStream(parser.parse(streamifyString(` .`), options))).resolves .toBeRdfIsomorphic([ quad('ex:s', 'ex:p', 'ex:o'), ]); @@ -410,7 +411,7 @@ describe('RdfParser', () => { path: 'path/to/file.ttl', logger, }; - expect(await arrayifyStream(parser.parse(streamifyString(`

.`), options))) + await expect(arrayifyStream(parser.parse(streamifyString(`

.`), options))).resolves .toBeRdfIsomorphic([ quad('file://path/to/s', 'file://path/to/p', 'file://path/to/o'), ]); @@ -428,7 +429,7 @@ describe('RdfParser', () => { }, logger, }; - expect(await arrayifyStream(parser.parse(streamifyString(`

.`), options))) + await expect(arrayifyStream(parser.parse(streamifyString(`

.`), options))).resolves .toBeRdfIsomorphic([ quad('http://example.org/s', 'http://example.org/p', 'http://example.org/o'), ]); @@ -438,19 +439,20 @@ describe('RdfParser', () => { describe('fetchFileOrUrl', () => { it('for a URL', async() => { - expect(await stringifyStream(await RdfParser.fetchFileOrUrl('http://example.org/myfile1.ttl'))) - .toEqual(` .`); + await expect(stringifyStream(await RdfParser.fetchFileOrUrl('http://example.org/myfile1.ttl'))).resolves + .toBe(` .`); }); it('for a file without protocol', async() => { - expect(await stringifyStream(await RdfParser.fetchFileOrUrl(Path.join(__dirname, '../assets/rdf/a/myfile1.ttl')))) - .toEqual(` . + const filePath = Path.join(__dirname, '../assets/rdf/a/myfile1.ttl'); + await expect(stringifyStream(await RdfParser.fetchFileOrUrl(filePath))).resolves + .toBe(` . `); }); it('for a file with protocol', async() => { - expect(await stringifyStream(await RdfParser.fetchFileOrUrl(`file://${Path.join(__dirname, '../assets/rdf/a/myfile1.ttl')}`))) - .toEqual(` . + await expect(stringifyStream(await RdfParser.fetchFileOrUrl(`file://${Path.join(__dirname, '../assets/rdf/a/myfile1.ttl')}`))).resolves + .toBe(` . `); }); diff --git a/test/unit/rdf/ResourceUtil-test.ts b/test/unit/rdf/ResourceUtil-test.ts index 5f6669af..263d298c 100644 --- a/test/unit/rdf/ResourceUtil-test.ts +++ b/test/unit/rdf/ResourceUtil-test.ts @@ -1,4 +1,5 @@ -import * as fs from 'fs'; +import * as fs from 'node:fs'; +import * as Path from 'node:path'; import type { Resource } from 'rdf-object'; import { RdfObjectLoader } from 'rdf-object'; import { uniqueTypes } from '../../../lib/rdf/ResourceUtil'; @@ -11,7 +12,7 @@ describe('ResourceUtil', () => { beforeEach(async() => { objectLoader = new RdfObjectLoader({ uniqueLiterals: true, - context: JSON.parse(fs.readFileSync(`${__dirname}/../../../components/context.jsonld`, 'utf8')), + context: JSON.parse(fs.readFileSync(Path.join(__dirname, '../../../components/context.jsonld'), 'utf8')), }); await objectLoader.context; diff --git a/test/unit/util/CompileUtil-test.ts b/test/unit/util/CompileUtil-test.ts index ab03585d..4d4324a8 100644 --- a/test/unit/util/CompileUtil-test.ts +++ b/test/unit/util/CompileUtil-test.ts @@ -4,9 +4,8 @@ import { compileConfig } from '../../../lib/util/CompileUtil'; describe('CompileUtil', () => { beforeEach(() => { // Mock manager - ( ComponentsManagerBuilder).prototype.build = jest.fn(function() { - // eslint-disable-next-line @typescript-eslint/prefer-ts-expect-error - // @ts-ignore + jest.spyOn(( ComponentsManagerBuilder).prototype, 'build').mockImplementation(function() { + // @ts-expect-error this.configLoader({ register: jest.fn() }); return { instantiate: async() => 'INSTANCE', @@ -19,22 +18,22 @@ describe('CompileUtil', () => { describe('compileConfig', () => { it('for direct compilation', async() => { - expect(await compileConfig('MAINMODULEPATH', 'CONFIGPATH', 'CONFIGIRI')) - .toEqual(` + await expect(compileConfig('MAINMODULEPATH', 'CONFIGPATH', 'CONFIGIRI')).resolves + .toBe(` module.exports = INSTANCE; `); }); it('for compilation with exportVariableName', async() => { - expect(await compileConfig('MAINMODULEPATH', 'CONFIGPATH', 'CONFIGIRI', 'a:b')) - .toEqual(` + await expect(compileConfig('MAINMODULEPATH', 'CONFIGPATH', 'CONFIGIRI', 'a:b')).resolves + .toBe(` module.exports = a_b; `); }); it('for compilation as function', async() => { - expect(await compileConfig('MAINMODULEPATH', 'CONFIGPATH', 'CONFIGIRI', undefined, true)) - .toEqual(`module.exports = function(variables) { + await expect(compileConfig('MAINMODULEPATH', 'CONFIGPATH', 'CONFIGIRI', undefined, true)).resolves + .toBe(`module.exports = function(variables) { function getVariableValue(name) { if (!variables || !(name in variables)) { throw new Error('Undefined variable: ' + name); diff --git a/test/unit/util/ErrorResourcesContext-test.ts b/test/unit/util/ErrorResourcesContext-test.ts index 4e8346a4..a8bb5603 100644 --- a/test/unit/util/ErrorResourcesContext-test.ts +++ b/test/unit/util/ErrorResourcesContext-test.ts @@ -1,4 +1,5 @@ -import * as fs from 'fs'; +import * as fs from 'node:fs'; +import * as Path from 'node:path'; import { RdfObjectLoader } from 'rdf-object/lib/RdfObjectLoader'; import { ErrorResourcesContext } from '../../../lib/util/ErrorResourcesContext'; @@ -8,15 +9,15 @@ describe('ErrorResourcesContext', () => { beforeEach(async() => { objectLoader = new RdfObjectLoader({ uniqueLiterals: true, - context: JSON.parse(fs.readFileSync(`${__dirname}/../../../components/context.jsonld`, 'utf8')), + context: JSON.parse(fs.readFileSync(Path.join(__dirname, '../../../components/context.jsonld'), 'utf8')), }); await objectLoader.context; }); it('with empty context', async() => { const error = new ErrorResourcesContext('message', {}); - expect(error.name).toEqual('ErrorResourcesContext'); - expect(error.message).toEqual(`message`); + expect(error.name).toBe('ErrorResourcesContext'); + expect(error.message).toBe(`message`); expect(error.exportContext()).toEqual({}); }); @@ -40,7 +41,7 @@ describe('ErrorResourcesContext', () => { f: undefined, }; const error = new ErrorResourcesContext('message', ctx); - expect(error.name).toEqual('ErrorResourcesContext'); + expect(error.name).toBe('ErrorResourcesContext'); expect(error.message).toBeTruthy(); expect(error.context).toBe(ctx); }); @@ -67,8 +68,7 @@ describe('ErrorResourcesContext', () => { describe('resourceToJson', () => { it('for an undefined resource', () => { - // eslint-disable-next-line unicorn/no-useless-undefined - expect(ErrorResourcesContext.resourceToJson(undefined)).toEqual(undefined); + expect(ErrorResourcesContext.resourceToJson(undefined)).toBeUndefined(); }); it('for a defined resource', () => { diff --git a/test/webpack/test-web.ts b/test/webpack/test-web.ts index 6748c175..a3f2fefe 100644 --- a/test/webpack/test-web.ts +++ b/test/webpack/test-web.ts @@ -1,17 +1,17 @@ -/* eslint-disable no-console, unicorn/no-process-exit, @typescript-eslint/no-implicit-any-catch */ +/* eslint-disable no-console, unicorn/no-process-exit */ + +import { RdfObjectLoader } from 'rdf-object'; +import { RdfParser, ComponentsManagerBuilder } from '../..'; // Monkey patch in the window object so we can test the script in Node // @ts-expect-error globalThis.window = globalThis; - -import { RdfObjectLoader } from 'rdf-object'; -import { RdfParser, ComponentsManagerBuilder } from '../..'; const arrayifyStream = require('stream-to-array'); const streamifyString = require('streamify-string'); try { if (!(ComponentsManagerBuilder.createObjectLoader() instanceof RdfObjectLoader)) { - throw new Error('Object Loader is not an instance of RdfObjectLoader'); + throw new TypeError('Object Loader is not an instance of RdfObjectLoader'); } const parse = new RdfParser(); @@ -31,4 +31,4 @@ try { console.error(error); process.exit(1); } -/* eslint-enable no-console, unicorn/no-process-exit, @typescript-eslint/no-implicit-any-catch */ +/* eslint-enable no-console, unicorn/no-process-exit */ diff --git a/test/webpack/test.ts b/test/webpack/test.ts index 7bcd5370..b9890542 100644 --- a/test/webpack/test.ts +++ b/test/webpack/test.ts @@ -1,12 +1,13 @@ -/* eslint-disable no-console, unicorn/no-process-exit, @typescript-eslint/no-implicit-any-catch */ +/* eslint-disable no-console, unicorn/no-process-exit */ import { RdfObjectLoader } from 'rdf-object'; import { RdfParser, ComponentsManagerBuilder } from '../..'; + const arrayifyStream = require('stream-to-array'); const streamifyString = require('streamify-string'); try { if (!(ComponentsManagerBuilder.createObjectLoader() instanceof RdfObjectLoader)) { - throw new Error('Object Loader is not an instance of RdfObjectLoader'); + throw new TypeError('Object Loader is not an instance of RdfObjectLoader'); } const parse = new RdfParser(); @@ -26,4 +27,4 @@ try { console.error(error); process.exit(1); } -/* eslint-enable no-console, unicorn/no-process-exit, @typescript-eslint/no-implicit-any-catch */ +/* eslint-enable no-console, unicorn/no-process-exit */ diff --git a/test/webpack/webpack.config-web.js b/test/webpack/webpack.config-web.js index 262e60b2..5db42557 100644 --- a/test/webpack/webpack.config-web.js +++ b/test/webpack/webpack.config-web.js @@ -29,6 +29,9 @@ module.exports = [ new webpack.DefinePlugin({ 'process.platform': JSON.stringify('browser'), }), + new webpack.NormalModuleReplacementPlugin(/^node:/, (resource) => { + resource.request = resource.request.replace(/^node:/, ''); + }), ], resolve: { fallback: { diff --git a/yarn.lock b/yarn.lock index 71fbe330..4a795431 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,12 +2,64 @@ # yarn lockfile v1 -"@babel/code-frame@7.12.11": - version "7.12.11" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.12.11.tgz#f4ad435aa263db935b8f10f2c552d23fb716a63f" - integrity sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw== +"@antfu/eslint-config@2.6.4": + version "2.6.4" + resolved "https://registry.yarnpkg.com/@antfu/eslint-config/-/eslint-config-2.6.4.tgz#45e79c01111fdc37b20bef028e8d34c5f5e679f9" + integrity sha512-dMD/QC5KWS1OltdpKLhfZM7W7y7zils85opk8d4lyNr7yn0OFjZs7eMYtcC6DrrN2kQ1JrFvBM7uB0QdWn5PUQ== + dependencies: + "@antfu/eslint-define-config" "^1.23.0-2" + "@antfu/install-pkg" "^0.3.1" + "@eslint-types/jsdoc" "46.8.2-1" + "@eslint-types/typescript-eslint" "^6.19.1" + "@eslint-types/unicorn" "^50.0.1" + "@stylistic/eslint-plugin" "^1.5.4" + "@typescript-eslint/eslint-plugin" "^6.20.0" + "@typescript-eslint/parser" "^6.20.0" + eslint-config-flat-gitignore "^0.1.2" + eslint-merge-processors "^0.1.0" + eslint-plugin-antfu "^2.1.2" + eslint-plugin-eslint-comments "^3.2.0" + eslint-plugin-i "^2.29.1" + eslint-plugin-jsdoc "^48.0.4" + eslint-plugin-jsonc "^2.13.0" + eslint-plugin-markdown "^3.0.1" + eslint-plugin-n "^16.6.2" + eslint-plugin-no-only-tests "^3.1.0" + eslint-plugin-perfectionist "^2.5.0" + eslint-plugin-toml "^0.9.2" + eslint-plugin-unicorn "^50.0.1" + eslint-plugin-unused-imports "^3.0.0" + eslint-plugin-vitest "^0.3.21" + eslint-plugin-vue "^9.21.1" + eslint-plugin-yml "^1.12.2" + eslint-processor-vue-blocks "^0.1.1" + globals "^13.24.0" + jsonc-eslint-parser "^2.4.0" + local-pkg "^0.5.0" + parse-gitignore "^2.0.0" + picocolors "^1.0.0" + prompts "^2.4.2" + toml-eslint-parser "^0.9.3" + vue-eslint-parser "^9.4.2" + yaml-eslint-parser "^1.2.2" + yargs "^17.7.2" + +"@antfu/eslint-define-config@^1.23.0-2": + version "1.23.0-2" + resolved "https://registry.yarnpkg.com/@antfu/eslint-define-config/-/eslint-define-config-1.23.0-2.tgz#05681d45b7fd24e4666750b6fd8da2bd8bf30a1f" + integrity sha512-LvxY21+ZhpuBf/aHeBUtGQhSEfad4PkNKXKvDOSvukaM3XVTfBhwmHX2EKwAsdq5DlfjbT3qqYyMiueBIO5iDQ== + +"@antfu/install-pkg@^0.3.1": + version "0.3.5" + resolved "https://registry.yarnpkg.com/@antfu/install-pkg/-/install-pkg-0.3.5.tgz#f26e94520f877e6d508a5304fa8d740b49d0ef31" + integrity sha512-HwIACY0IzrM7FGafMbWZOqEDBSfCwPcylu+GacaRcxJm4Yvvuh3Dy2vZwqdJAzXponc6aLO9FaH4l75pq8/ZSA== dependencies: - "@babel/highlight" "^7.10.4" + "@jsdevtools/ez-spawn" "^3.0.4" + +"@antfu/utils@^0.7.10": + version "0.7.10" + resolved "https://registry.yarnpkg.com/@antfu/utils/-/utils-0.7.10.tgz#ae829f170158e297a9b6a28f161a8e487d00814d" + integrity sha512-+562v9k4aI80m1+VuMHehNJWLOFjBnXn3tdOitzD0il5b7smkSBal4+a3oKiQTbrwMmN/TBUMDvbdoWDehgOww== "@babel/code-frame@^7.0.0", "@babel/code-frame@^7.27.1": version "7.27.1" @@ -37,27 +89,6 @@ resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.29.0.tgz#00d03e8c0ac24dd9be942c5370990cbe1f17d88d" integrity sha512-T1NCJqT/j9+cn8fvkt7jtwbLBfLC/1y1c7NtCeXFRgzGTsafi68MRv8yzkYSapBnFA6L3U2VSc02ciDzoAJhJg== -"@babel/core@^7.12.16", "@babel/core@^7.27.4": - version "7.29.0" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.29.0.tgz#5286ad785df7f79d656e88ce86e650d16ca5f322" - integrity sha512-CGOfOJqWjg2qW/Mb6zNsDm+u5vFQ8DxXfbM09z69p5Z6+mE1ikP2jUXw+j42Pf1XTYED2Rni5f95npYeuwMDQA== - dependencies: - "@babel/code-frame" "^7.29.0" - "@babel/generator" "^7.29.0" - "@babel/helper-compilation-targets" "^7.28.6" - "@babel/helper-module-transforms" "^7.28.6" - "@babel/helpers" "^7.28.6" - "@babel/parser" "^7.29.0" - "@babel/template" "^7.28.6" - "@babel/traverse" "^7.29.0" - "@babel/types" "^7.29.0" - "@jridgewell/remapping" "^2.3.5" - convert-source-map "^2.0.0" - debug "^4.1.0" - gensync "^1.0.0-beta.2" - json5 "^2.2.3" - semver "^6.3.1" - "@babel/core@^7.23.9": version "7.28.5" resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.28.5.tgz#4c81b35e51e1b734f510c99b07dfbc7bbbb48f7e" @@ -79,13 +110,25 @@ json5 "^2.2.3" semver "^6.3.1" -"@babel/eslint-parser@^7.12.16": - version "7.28.6" - resolved "https://registry.yarnpkg.com/@babel/eslint-parser/-/eslint-parser-7.28.6.tgz#6a294a4add732ebe7ded8a8d2792dd03dd81dc3f" - integrity sha512-QGmsKi2PBO/MHSQk+AAgA9R6OHQr+VqnniFE0eMWZcVcfBZoA2dKn2hUsl3Csg/Plt9opRUWdY7//VXsrIlEiA== +"@babel/core@^7.27.4": + version "7.29.0" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.29.0.tgz#5286ad785df7f79d656e88ce86e650d16ca5f322" + integrity sha512-CGOfOJqWjg2qW/Mb6zNsDm+u5vFQ8DxXfbM09z69p5Z6+mE1ikP2jUXw+j42Pf1XTYED2Rni5f95npYeuwMDQA== dependencies: - "@nicolo-ribaudo/eslint-scope-5-internals" "5.1.1-v1" - eslint-visitor-keys "^2.1.0" + "@babel/code-frame" "^7.29.0" + "@babel/generator" "^7.29.0" + "@babel/helper-compilation-targets" "^7.28.6" + "@babel/helper-module-transforms" "^7.28.6" + "@babel/helpers" "^7.28.6" + "@babel/parser" "^7.29.0" + "@babel/template" "^7.28.6" + "@babel/traverse" "^7.29.0" + "@babel/types" "^7.29.0" + "@jridgewell/remapping" "^2.3.5" + convert-source-map "^2.0.0" + debug "^4.1.0" + gensync "^1.0.0-beta.2" + json5 "^2.2.3" semver "^6.3.1" "@babel/generator@^7.27.5", "@babel/generator@^7.29.0": @@ -186,7 +229,7 @@ resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz#54da796097ab19ce67ed9f88b47bb2ec49367687" integrity sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA== -"@babel/helper-validator-identifier@^7.14.9", "@babel/helper-validator-identifier@^7.25.9", "@babel/helper-validator-identifier@^7.27.1", "@babel/helper-validator-identifier@^7.28.5": +"@babel/helper-validator-identifier@^7.22.20", "@babel/helper-validator-identifier@^7.27.1", "@babel/helper-validator-identifier@^7.28.5": version "7.28.5" resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.28.5.tgz#010b6938fab7cb7df74aa2bbc06aa503b8fe5fb4" integrity sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q== @@ -212,16 +255,6 @@ "@babel/template" "^7.28.6" "@babel/types" "^7.29.0" -"@babel/highlight@^7.10.4": - version "7.25.9" - resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.25.9.tgz#8141ce68fc73757946f983b343f1231f4691acc6" - integrity sha512-llL88JShoCsth8fF8R4SJnIn+WLvR6ccFxu1H3FlMhDontdcmZWf2HgIZ7AIqV3Xcck1idlohrN4EUBQz6klbw== - dependencies: - "@babel/helper-validator-identifier" "^7.25.9" - chalk "^2.4.2" - js-tokens "^4.0.0" - picocolors "^1.0.0" - "@babel/parser@^7.1.0", "@babel/parser@^7.20.7", "@babel/parser@^7.23.9", "@babel/parser@^7.27.2", "@babel/parser@^7.28.5": version "7.28.5" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.28.5.tgz#0b0225ee90362f030efd644e8034c99468893b08" @@ -773,6 +806,22 @@ dependencies: tslib "^2.4.0" +"@es-joy/jsdoccomment@~0.46.0": + version "0.46.0" + resolved "https://registry.yarnpkg.com/@es-joy/jsdoccomment/-/jsdoccomment-0.46.0.tgz#47a2ee4bfc0081f252e058272dfab680aaed464d" + integrity sha512-C3Axuq1xd/9VqFZpW4YAzOx5O9q/LP46uIQy/iNDpHG3fmPa6TBtvfglMCs3RBiBxAIi0Go97r8+jvTt55XMyQ== + dependencies: + comment-parser "1.4.1" + esquery "^1.6.0" + jsdoc-type-pratt-parser "~4.0.0" + +"@eslint-community/eslint-utils@^4.1.2", "@eslint-community/eslint-utils@^4.4.0", "@eslint-community/eslint-utils@^4.5.1": + version "4.9.1" + resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.9.1.tgz#4e90af67bc51ddee6cdef5284edf572ec376b595" + integrity sha512-phrYmNiYppR7znFEdqgfWHXR6NCkZEK7hwWDHZUjit/2/U0r6XvkDl0SYnoM51Hq7FhCGdLDT6zxCCOY1hexsQ== + dependencies: + eslint-visitor-keys "^3.4.3" + "@eslint-community/eslint-utils@^4.2.0": version "4.9.0" resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.9.0.tgz#7308df158e064f0dd8b8fdb58aa14fa2a7f913b3" @@ -780,39 +829,64 @@ dependencies: eslint-visitor-keys "^3.4.3" -"@eslint-community/regexpp@^4.4.0": +"@eslint-community/regexpp@^4.11.0", "@eslint-community/regexpp@^4.5.1", "@eslint-community/regexpp@^4.6.1": version "4.12.2" resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.12.2.tgz#bccdf615bcf7b6e8db830ec0b8d21c9a25de597b" integrity sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew== -"@eslint/eslintrc@^0.4.3": - version "0.4.3" - resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-0.4.3.tgz#9e42981ef035beb3dd49add17acb96e8ff6f394c" - integrity sha512-J6KFFz5QCYUJq3pf0mjEcCJVERbzv71PUIDczuh9JkwGEzced6CO5ADLHB1rbf/+oPBtoPfMYNOpGDzCANlbXw== +"@eslint-types/jsdoc@46.8.2-1": + version "46.8.2-1" + resolved "https://registry.yarnpkg.com/@eslint-types/jsdoc/-/jsdoc-46.8.2-1.tgz#c1d9ec9ce032f0ad3a943613c346a648bcad9063" + integrity sha512-FwD7V0xX0jyaqj8Ul5ZY+TAAPohDfVqtbuXJNHb+OIv1aTIqZi5+Zn3F2UwQ5O3BnQd2mTduyK0+HjGx3/AMFg== + +"@eslint-types/typescript-eslint@^6.19.1": + version "6.21.0" + resolved "https://registry.yarnpkg.com/@eslint-types/typescript-eslint/-/typescript-eslint-6.21.0.tgz#38f2d5da961c2b98504f63f06b0f403e74b753b2" + integrity sha512-ao4TdMLw+zFdAJ9q6iBBxC5GSrJ14Hpv0VKaergr++jRTDaGgoYiAq84tx1FYqUJzQgzJC7dm6s52IAQP7EiHA== + +"@eslint-types/unicorn@^50.0.1": + version "50.0.1" + resolved "https://registry.yarnpkg.com/@eslint-types/unicorn/-/unicorn-50.0.1.tgz#f11633d6355e61cb249c74a0d88818153314b7c3" + integrity sha512-nuJuipTNcg9f+oxZ+3QZw4tuDLmir4RJOPfM/oujgToiy1s+tePDZhwg5jUGc3q8OzTtPbVpsFSYX7QApjO3EA== + +"@eslint/eslintrc@^2.1.4": + version "2.1.4" + resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-2.1.4.tgz#388a269f0f25c1b6adc317b5a2c55714894c70ad" + integrity sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ== dependencies: ajv "^6.12.4" - debug "^4.1.1" - espree "^7.3.0" - globals "^13.9.0" - ignore "^4.0.6" + debug "^4.3.2" + espree "^9.6.0" + globals "^13.19.0" + ignore "^5.2.0" import-fresh "^3.2.1" - js-yaml "^3.13.1" - minimatch "^3.0.4" + js-yaml "^4.1.0" + minimatch "^3.1.2" strip-json-comments "^3.1.1" -"@humanwhocodes/config-array@^0.5.0": - version "0.5.0" - resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.5.0.tgz#1407967d4c6eecd7388f83acf1eaf4d0c6e58ef9" - integrity sha512-FagtKFz74XrTl7y6HCzQpwDfXP0yhxe9lHLD1UZxjvZIcbyRz8zTFF/yYNfSfzU414eDwZ1SrO0Qvtyf+wFMQg== +"@eslint/js@8.57.1": + version "8.57.1" + resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.57.1.tgz#de633db3ec2ef6a3c89e2f19038063e8a122e2c2" + integrity sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q== + +"@humanwhocodes/config-array@^0.13.0": + version "0.13.0" + resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.13.0.tgz#fb907624df3256d04b9aa2df50d7aa97ec648748" + integrity sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw== dependencies: - "@humanwhocodes/object-schema" "^1.2.0" - debug "^4.1.1" - minimatch "^3.0.4" + "@humanwhocodes/object-schema" "^2.0.3" + debug "^4.3.1" + minimatch "^3.0.5" -"@humanwhocodes/object-schema@^1.2.0": - version "1.2.1" - resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz#b520529ec21d8e5945a1851dfd1c32e94e39ff45" - integrity sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA== +"@humanwhocodes/module-importer@^1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz#af5b2691a22b44be847b0ca81641c5fb6ad0172c" + integrity sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA== + +"@humanwhocodes/object-schema@^2.0.3": + version "2.0.3" + resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz#4a2868d75d6d6963e423bcf90b7fd1be343409d3" + integrity sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA== "@hutson/parse-repository-url@^3.0.0": version "3.0.2" @@ -1114,6 +1188,16 @@ "@jridgewell/resolve-uri" "^3.1.0" "@jridgewell/sourcemap-codec" "^1.4.14" +"@jsdevtools/ez-spawn@^3.0.4": + version "3.0.4" + resolved "https://registry.yarnpkg.com/@jsdevtools/ez-spawn/-/ez-spawn-3.0.4.tgz#5641eb26fee6d31ec29f6788eba849470c52c7ff" + integrity sha512-f5DRIOZf7wxogefH03RjMPMdBF7ADTWUMoOs9kaJo06EfwF+aFhMZMDZxHg/Xe12hptN9xoZjGso2fdjapBRIA== + dependencies: + call-me-maybe "^1.0.1" + cross-spawn "^7.0.3" + string-argv "^0.3.1" + type-detect "^4.0.8" + "@microsoft/tsdoc-config@0.16.2": version "0.16.2" resolved "https://registry.yarnpkg.com/@microsoft/tsdoc-config/-/tsdoc-config-0.16.2.tgz#b786bb4ead00d54f53839a458ce626c8548d3adf" @@ -1138,13 +1222,6 @@ "@emnapi/runtime" "^1.4.3" "@tybys/wasm-util" "^0.10.0" -"@nicolo-ribaudo/eslint-scope-5-internals@5.1.1-v1": - version "5.1.1-v1" - resolved "https://registry.yarnpkg.com/@nicolo-ribaudo/eslint-scope-5-internals/-/eslint-scope-5-internals-5.1.1-v1.tgz#dbf733a965ca47b1973177dc0bb6c889edcfb129" - integrity sha512-54/JRvkLIzzDWshCWfuhadfrfZVPiElY8Fcgmg1HroEly/EDSszzhBAsarCux+D/kOslTRquNzuyGSmUSTTHGg== - dependencies: - eslint-scope "5.1.1" - "@nodelib/fs.scandir@2.1.5": version "2.1.5" resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5" @@ -1158,7 +1235,7 @@ resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz#5bd262af94e9d25bd1e71b05deed44876a222e8b" integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A== -"@nodelib/fs.walk@^1.2.3": +"@nodelib/fs.walk@^1.2.3", "@nodelib/fs.walk@^1.2.8": version "1.2.8" resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz#e95737e8bb6746ddedf69c556953494f196fe69a" integrity sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg== @@ -1166,11 +1243,21 @@ "@nodelib/fs.scandir" "2.1.5" fastq "^1.6.0" +"@nolyfill/is-core-module@1.0.39": + version "1.0.39" + resolved "https://registry.yarnpkg.com/@nolyfill/is-core-module/-/is-core-module-1.0.39.tgz#3dc35ba0f1e66b403c00b39344f870298ebb1c8e" + integrity sha512-nn5ozdjYQpUCZlWGuxcJY/KpxkWQs4DcbMCmKojjyrYDEAGy4Ce19NN4v5MduafTwJlbKc99UA8YhSVqq9yPZA== + "@pkgjs/parseargs@^0.11.0": version "0.11.0" resolved "https://registry.yarnpkg.com/@pkgjs/parseargs/-/parseargs-0.11.0.tgz#a77ea742fab25775145434eb1d2328cf5013ac33" integrity sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg== +"@pkgr/core@^0.1.0": + version "0.1.2" + resolved "https://registry.yarnpkg.com/@pkgr/core/-/core-0.1.2.tgz#1cf95080bb7072fafaa3cb13b442fab4695c3893" + integrity sha512-fdDH1LSGfZdTH2sxdpVMw31BanV28K/Gry0cVFxaNP77neJSkd82mM8ErPNYs9e+0O7SdHBLTDzDgwUuy18RnQ== + "@pkgr/core@^0.2.9": version "0.2.9" resolved "https://registry.yarnpkg.com/@pkgr/core/-/core-0.2.9.tgz#d229a7b7f9dac167a156992ef23c7f023653f53b" @@ -1183,31 +1270,21 @@ dependencies: "@types/node" "*" -"@rtsao/scc@^1.1.0": - version "1.1.0" - resolved "https://registry.yarnpkg.com/@rtsao/scc/-/scc-1.1.0.tgz#927dd2fae9bc3361403ac2c7a00c32ddce9ad7e8" - integrity sha512-zt6OdqaDoOnJ1ZYsCYGt9YmWzDXl4vQdKTyJev62gFhRGKdx7mcT54V9KIjg+d2wi9EXsPvAPKe7i7WjfVWB8g== - -"@rubensworks/eslint-config@1.2.0": - version "1.2.0" - resolved "https://registry.yarnpkg.com/@rubensworks/eslint-config/-/eslint-config-1.2.0.tgz#c921a2d0fa5e03d7e3b9909781806ceaa8417ff7" - integrity sha512-zbrrtTOEE4Mgz2TV+ZllrtVnd8CPhp72mIIRXmdFg0dqPWZ7PqYMitAJRmpvnHBENJTpUupxVHX0BaXfcRhkPQ== - dependencies: - "@rushstack/eslint-patch" "^1.2.0" - "@typescript-eslint/eslint-plugin" "^5.11.0" - "@typescript-eslint/parser" "^5.11.0" - eslint-config-es "4.1.0" - eslint-import-resolver-typescript "^2.5.0" - eslint-plugin-eslint-comments "3.2.0" +"@rubensworks/eslint-config@3.1.0": + version "3.1.0" + resolved "https://registry.yarnpkg.com/@rubensworks/eslint-config/-/eslint-config-3.1.0.tgz#d17cea6b8f51d01eb8ffb90e38ff942a13eb690c" + integrity sha512-G/+2HcZ4Mjc1EZwHrPmIjQSRvzDFWnhihK0bukNw3Sc8uqmHuZ2/Uqy1gwdfTduNYdS1NXTvooyepELvcX6RBA== + dependencies: + "@antfu/eslint-config" "2.6.4" + "@rushstack/eslint-patch" "^1.7.2" + eslint-import-resolver-typescript "^3.6.1" eslint-plugin-extended "0.2.0" - eslint-plugin-import "2.25.4" - eslint-plugin-jest "^26.0.0" - eslint-plugin-mocha "9.0.0" - eslint-plugin-react "7.29.3" - eslint-plugin-react-hooks "4.3.0" - eslint-plugin-tsdoc "^0.2.14" - eslint-plugin-unicorn "37.0.1" - eslint-plugin-unused-imports "^2.0.0" + eslint-plugin-import "2.29.1" + eslint-plugin-jest "^27.9.0" + eslint-plugin-react "7.33.2" + eslint-plugin-react-hooks "4.6.0" + eslint-plugin-style "^0.2.0" + eslint-plugin-tsdoc "^0.2.17" "@rubensworks/saxes@^6.0.1": version "6.0.1" @@ -1216,7 +1293,7 @@ dependencies: xmlchars "^2.2.0" -"@rushstack/eslint-patch@^1.2.0": +"@rushstack/eslint-patch@^1.7.2": version "1.16.1" resolved "https://registry.yarnpkg.com/@rushstack/eslint-patch/-/eslint-patch-1.16.1.tgz#4f97581e114fc79f246cee3723a5c4edd3b62415" integrity sha512-TvZbIpeKqGQQ7X0zSCvPH9riMSFQFSggnfBjFZ1mEoILW+UuXCKwOoPcgjMwiUtRqFZ8jWhPJc4um14vC6I4ag== @@ -1248,6 +1325,55 @@ color "^5.0.2" text-hex "1.0.x" +"@stylistic/eslint-plugin-js@1.8.1", "@stylistic/eslint-plugin-js@^1.8.1": + version "1.8.1" + resolved "https://registry.yarnpkg.com/@stylistic/eslint-plugin-js/-/eslint-plugin-js-1.8.1.tgz#e99ebee73558932e57eb135698153c2e4c0f44a2" + integrity sha512-c5c2C8Mos5tTQd+NWpqwEu7VT6SSRooAguFPMj1cp2RkTYl1ynKoXo8MWy3k4rkbzoeYHrqC2UlUzsroAN7wtQ== + dependencies: + "@types/eslint" "^8.56.10" + acorn "^8.11.3" + escape-string-regexp "^4.0.0" + eslint-visitor-keys "^3.4.3" + espree "^9.6.1" + +"@stylistic/eslint-plugin-jsx@1.8.1": + version "1.8.1" + resolved "https://registry.yarnpkg.com/@stylistic/eslint-plugin-jsx/-/eslint-plugin-jsx-1.8.1.tgz#853acc3fb41b88db12c6f1dd4c0219c87f987e5c" + integrity sha512-k1Eb6rcjMP+mmjvj+vd9y5KUdWn1OBkkPLHXhsrHt5lCDFZxJEs0aVQzE5lpYrtVZVkpc5esTtss/cPJux0lfA== + dependencies: + "@stylistic/eslint-plugin-js" "^1.8.1" + "@types/eslint" "^8.56.10" + estraverse "^5.3.0" + picomatch "^4.0.2" + +"@stylistic/eslint-plugin-plus@1.8.1": + version "1.8.1" + resolved "https://registry.yarnpkg.com/@stylistic/eslint-plugin-plus/-/eslint-plugin-plus-1.8.1.tgz#b502f0029de048964e9b561d002c7cd043fa7861" + integrity sha512-4+40H3lHYTN8OWz+US8CamVkO+2hxNLp9+CAjorI7top/lHqemhpJvKA1LD9Uh+WMY9DYWiWpL2+SZ2wAXY9fQ== + dependencies: + "@types/eslint" "^8.56.10" + "@typescript-eslint/utils" "^6.21.0" + +"@stylistic/eslint-plugin-ts@1.8.1": + version "1.8.1" + resolved "https://registry.yarnpkg.com/@stylistic/eslint-plugin-ts/-/eslint-plugin-ts-1.8.1.tgz#9e6cce06530d3e579bafde0cf3bbb89453b3233f" + integrity sha512-/q1m+ZuO1JHfiSF16EATFzv7XSJkc5W6DocfvH5o9oB6WWYFMF77fVoBWnKT3wGptPOc2hkRupRKhmeFROdfWA== + dependencies: + "@stylistic/eslint-plugin-js" "1.8.1" + "@types/eslint" "^8.56.10" + "@typescript-eslint/utils" "^6.21.0" + +"@stylistic/eslint-plugin@^1.5.4": + version "1.8.1" + resolved "https://registry.yarnpkg.com/@stylistic/eslint-plugin/-/eslint-plugin-1.8.1.tgz#bcf97052b87bcfb3de003b7f0fae50e9d6f21403" + integrity sha512-64My6I7uCcmSQ//427Pfg2vjSf9SDzfsGIWohNFgISMLYdC5BzJqDo647iDDJzSxINh3WTC0Ql46ifiKuOoTyA== + dependencies: + "@stylistic/eslint-plugin-js" "1.8.1" + "@stylistic/eslint-plugin-jsx" "1.8.1" + "@stylistic/eslint-plugin-plus" "1.8.1" + "@stylistic/eslint-plugin-ts" "1.8.1" + "@types/eslint" "^8.56.10" + "@traqula/algebra-transformations-1-1@^1.0.4": version "1.0.4" resolved "https://registry.yarnpkg.com/@traqula/algebra-transformations-1-1/-/algebra-transformations-1-1-1.0.4.tgz#7c70d32b9fa0dfa514d2cf22ada88d0dd5e2130b" @@ -1355,6 +1481,14 @@ "@types/estree" "*" "@types/json-schema" "*" +"@types/eslint@^8.56.10": + version "8.56.12" + resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-8.56.12.tgz#1657c814ffeba4d2f84c0d4ba0f44ca7ea1ca53a" + integrity sha512-03ruubjWyOHlmljCVoxSuNDdmfZDzsrrz0P2LeJsOXr+ZwFQ+0yQIwNCwt/GYhV7Z31fgtXJTAEs+FYlEL851g== + dependencies: + "@types/estree" "*" + "@types/json-schema" "*" + "@types/estree@*", "@types/estree@^1.0.8": version "1.0.8" resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.8.tgz#958b91c991b1867ced318bedea0e215ee050726e" @@ -1399,7 +1533,7 @@ expect "^30.0.0" pretty-format "^30.0.0" -"@types/json-schema@*", "@types/json-schema@^7.0.15", "@types/json-schema@^7.0.3", "@types/json-schema@^7.0.9": +"@types/json-schema@*", "@types/json-schema@^7.0.12", "@types/json-schema@^7.0.15", "@types/json-schema@^7.0.9": version "7.0.15" resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.15.tgz#596a1747233694d50f6ad8a7869fcb6f56cf5841" integrity sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA== @@ -1409,6 +1543,13 @@ resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee" integrity sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ== +"@types/mdast@^3.0.0": + version "3.0.15" + resolved "https://registry.yarnpkg.com/@types/mdast/-/mdast-3.0.15.tgz#49c524a263f30ffa28b71ae282f813ed000ab9f5" + integrity sha512-LnwD+mUEfxWMa1QpDraczIn6k0Ee3SMicuYSSzS6ZYl2gKS09EClnJYGd8Du6rfc5r/GZEk5o1mRb8TaTj03sQ== + dependencies: + "@types/unist" "^2" + "@types/minimist@^1.2.0": version "1.2.5" resolved "https://registry.yarnpkg.com/@types/minimist/-/minimist-1.2.5.tgz#ec10755e871497bcd83efe927e43ec46e8c0747e" @@ -1440,7 +1581,7 @@ dependencies: "@types/node" "*" -"@types/semver@^7.3.12", "@types/semver@^7.3.4": +"@types/semver@^7.3.12", "@types/semver@^7.3.4", "@types/semver@^7.5.0": version "7.7.1" resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.7.1.tgz#3ce3af1a5524ef327d2da9e4fd8b6d95c8d70528" integrity sha512-FmgJfu+MOcQ370SD0ev7EI8TlCAfKYU+B4m5T3yXc1CiRN94g/SZPtsCkk506aUDtlMnFZvasDwHHUcZUEaYuA== @@ -1469,6 +1610,11 @@ resolved "https://registry.yarnpkg.com/@types/triple-beam/-/triple-beam-1.3.5.tgz#74fef9ffbaa198eb8b588be029f38b00299caa2c" integrity sha512-6WaYesThRMCl19iryMYP7/x2OVgCtbIVflDGFpWnb9irXI3UjYE4AzmYuiUKY1AJstGijoY+MgUszMgRxIYTYw== +"@types/unist@^2", "@types/unist@^2.0.2": + version "2.0.11" + resolved "https://registry.yarnpkg.com/@types/unist/-/unist-2.0.11.tgz#11af57b127e32487774841f7a4e54eab166d03c4" + integrity sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA== + "@types/yargs-parser@*": version "21.0.3" resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-21.0.3.tgz#815e30b786d2e8f0dcd85fd5bcf5e1a04d008f15" @@ -1481,75 +1627,34 @@ dependencies: "@types/yargs-parser" "*" -"@typescript-eslint/eslint-plugin@4.6.1": - version "4.6.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.6.1.tgz#99d77eb7a016fd5a5e749d2c44a7e4c317eb7da3" - integrity sha512-SNZyflefTMK2JyrPfFFzzoy2asLmZvZJ6+/L5cIqg4HfKGiW2Gr1Go1OyEVqne/U4QwmoasuMwppoBHWBWF2nA== +"@typescript-eslint/eslint-plugin@^6.20.0": + version "6.21.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.21.0.tgz#30830c1ca81fd5f3c2714e524c4303e0194f9cd3" + integrity sha512-oy9+hTPCUFpngkEZUSzbf9MxI65wbKFoQYsgPdILTfbUldp5ovUuphZVe4i30emU9M/kP+T64Di0mxl7dSw3MA== dependencies: - "@typescript-eslint/experimental-utils" "4.6.1" - "@typescript-eslint/scope-manager" "4.6.1" - debug "^4.1.1" - functional-red-black-tree "^1.0.1" - regexpp "^3.0.0" - semver "^7.3.2" - tsutils "^3.17.1" - -"@typescript-eslint/eslint-plugin@^5.0.0", "@typescript-eslint/eslint-plugin@^5.11.0": - version "5.62.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.62.0.tgz#aeef0328d172b9e37d9bab6dbc13b87ed88977db" - integrity sha512-TiZzBSJja/LbhNPvk6yc0JrX9XqhQ0hdh6M2svYfsHGejaKFIAGd9MQ+ERIMzLGlN/kZoYIgdxFV0PuljTKXag== - dependencies: - "@eslint-community/regexpp" "^4.4.0" - "@typescript-eslint/scope-manager" "5.62.0" - "@typescript-eslint/type-utils" "5.62.0" - "@typescript-eslint/utils" "5.62.0" + "@eslint-community/regexpp" "^4.5.1" + "@typescript-eslint/scope-manager" "6.21.0" + "@typescript-eslint/type-utils" "6.21.0" + "@typescript-eslint/utils" "6.21.0" + "@typescript-eslint/visitor-keys" "6.21.0" debug "^4.3.4" graphemer "^1.4.0" - ignore "^5.2.0" - natural-compare-lite "^1.4.0" - semver "^7.3.7" - tsutils "^3.21.0" - -"@typescript-eslint/experimental-utils@4.6.1": - version "4.6.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-4.6.1.tgz#a9c691dfd530a9570274fe68907c24c07a06c4aa" - integrity sha512-qyPqCFWlHZXkEBoV56UxHSoXW2qnTr4JrWVXOh3soBP3q0o7p4pUEMfInDwIa0dB/ypdtm7gLOS0hg0a73ijfg== - dependencies: - "@types/json-schema" "^7.0.3" - "@typescript-eslint/scope-manager" "4.6.1" - "@typescript-eslint/types" "4.6.1" - "@typescript-eslint/typescript-estree" "4.6.1" - eslint-scope "^5.0.0" - eslint-utils "^2.0.0" - -"@typescript-eslint/parser@4.6.1": - version "4.6.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.6.1.tgz#b801bff67b536ecc4a840ac9289ba2be57e02428" - integrity sha512-lScKRPt1wM9UwyKkGKyQDqf0bh6jm8DQ5iN37urRIXDm16GEv+HGEmum2Fc423xlk5NUOkOpfTnKZc/tqKZkDQ== - dependencies: - "@typescript-eslint/scope-manager" "4.6.1" - "@typescript-eslint/types" "4.6.1" - "@typescript-eslint/typescript-estree" "4.6.1" - debug "^4.1.1" + ignore "^5.2.4" + natural-compare "^1.4.0" + semver "^7.5.4" + ts-api-utils "^1.0.1" -"@typescript-eslint/parser@^5.0.0", "@typescript-eslint/parser@^5.11.0": - version "5.62.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.62.0.tgz#1b63d082d849a2fcae8a569248fbe2ee1b8a56c7" - integrity sha512-VlJEV0fOQ7BExOsHYAGrgbEiZoi8D+Bl2+f6V2RrXerRSylnp+ZBHmPvaIa8cz0Ajx7WO7Z5RqfgYg7ED1nRhA== +"@typescript-eslint/parser@^6.20.0": + version "6.21.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-6.21.0.tgz#af8fcf66feee2edc86bc5d1cf45e33b0630bf35b" + integrity sha512-tbsV1jPne5CkFQCgPBcDOt30ItF7aJoZL997JSF7MhGQqOeT3svWRYxiqlfA5RUdlHN6Fi+EI9bxqbdyAUZjYQ== dependencies: - "@typescript-eslint/scope-manager" "5.62.0" - "@typescript-eslint/types" "5.62.0" - "@typescript-eslint/typescript-estree" "5.62.0" + "@typescript-eslint/scope-manager" "6.21.0" + "@typescript-eslint/types" "6.21.0" + "@typescript-eslint/typescript-estree" "6.21.0" + "@typescript-eslint/visitor-keys" "6.21.0" debug "^4.3.4" -"@typescript-eslint/scope-manager@4.6.1": - version "4.6.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.6.1.tgz#21872b91cbf7adfc7083f17b8041149148baf992" - integrity sha512-f95+80r6VdINYscJY1KDUEDcxZ3prAWHulL4qRDfNVD0I5QAVSGqFkwHERDoLYJJWmEAkUMdQVvx7/c2Hp+Bjg== - dependencies: - "@typescript-eslint/types" "4.6.1" - "@typescript-eslint/visitor-keys" "4.6.1" - "@typescript-eslint/scope-manager@5.62.0": version "5.62.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.62.0.tgz#d9457ccc6a0b8d6b37d0eb252a23022478c5460c" @@ -1558,39 +1663,46 @@ "@typescript-eslint/types" "5.62.0" "@typescript-eslint/visitor-keys" "5.62.0" -"@typescript-eslint/type-utils@5.62.0": - version "5.62.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.62.0.tgz#286f0389c41681376cdad96b309cedd17d70346a" - integrity sha512-xsSQreu+VnfbqQpW5vnCJdq1Z3Q0U31qiWmRhr98ONQmcp/yhiPJFPq8MXiJVLiksmOKSjIldZzkebzHuCGzew== +"@typescript-eslint/scope-manager@6.21.0": + version "6.21.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-6.21.0.tgz#ea8a9bfc8f1504a6ac5d59a6df308d3a0630a2b1" + integrity sha512-OwLUIWZJry80O99zvqXVEioyniJMa+d2GrqpUTqi5/v5D5rOrppJVBPa0yKCblcigC0/aYAzxxqQ1B+DS2RYsg== dependencies: - "@typescript-eslint/typescript-estree" "5.62.0" - "@typescript-eslint/utils" "5.62.0" - debug "^4.3.4" - tsutils "^3.21.0" + "@typescript-eslint/types" "6.21.0" + "@typescript-eslint/visitor-keys" "6.21.0" + +"@typescript-eslint/scope-manager@7.18.0": + version "7.18.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-7.18.0.tgz#c928e7a9fc2c0b3ed92ab3112c614d6bd9951c83" + integrity sha512-jjhdIE/FPF2B7Z1uzc6i3oWKbGcHb87Qw7AWj6jmEqNOfDFbJWtjt/XfwCpvNkpGWlcJaog5vTR+VV8+w9JflA== + dependencies: + "@typescript-eslint/types" "7.18.0" + "@typescript-eslint/visitor-keys" "7.18.0" -"@typescript-eslint/types@4.6.1": - version "4.6.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.6.1.tgz#d3ad7478f53f22e7339dc006ab61aac131231552" - integrity sha512-k2ZCHhJ96YZyPIsykickez+OMHkz06xppVLfJ+DY90i532/Cx2Z+HiRMH8YZQo7a4zVd/TwNBuRCdXlGK4yo8w== +"@typescript-eslint/type-utils@6.21.0": + version "6.21.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-6.21.0.tgz#6473281cfed4dacabe8004e8521cee0bd9d4c01e" + integrity sha512-rZQI7wHfao8qMX3Rd3xqeYSMCL3SoiSQLBATSiVKARdFGCYSRvmViieZjqc58jKgs8Y8i9YvVVhRbHSTA4VBag== + dependencies: + "@typescript-eslint/typescript-estree" "6.21.0" + "@typescript-eslint/utils" "6.21.0" + debug "^4.3.4" + ts-api-utils "^1.0.1" "@typescript-eslint/types@5.62.0": version "5.62.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.62.0.tgz#258607e60effa309f067608931c3df6fed41fd2f" integrity sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ== -"@typescript-eslint/typescript-estree@4.6.1": - version "4.6.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.6.1.tgz#6025cce724329413f57e4959b2d676fceeca246f" - integrity sha512-/J/kxiyjQQKqEr5kuKLNQ1Finpfb8gf/NpbwqFFYEBjxOsZ621r9AqwS9UDRA1Rrr/eneX/YsbPAIhU2rFLjXQ== - dependencies: - "@typescript-eslint/types" "4.6.1" - "@typescript-eslint/visitor-keys" "4.6.1" - debug "^4.1.1" - globby "^11.0.1" - is-glob "^4.0.1" - lodash "^4.17.15" - semver "^7.3.2" - tsutils "^3.17.1" +"@typescript-eslint/types@6.21.0": + version "6.21.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-6.21.0.tgz#205724c5123a8fef7ecd195075fa6e85bac3436d" + integrity sha512-1kFmZ1rOm5epu9NZEZm1kckCDGj5UJEf7P1kliH4LKu/RkwpsfqqGmY2OOcUs18lSlQBKLDYBOGxRVtrMN5lpg== + +"@typescript-eslint/types@7.18.0": + version "7.18.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-7.18.0.tgz#b90a57ccdea71797ffffa0321e744f379ec838c9" + integrity sha512-iZqi+Ds1y4EDYUtlOOC+aUmxnE9xS/yCigkjA7XpTKV6nCBd3Hp/PRGGmdwnfkV2ThMyYldP1wRpm/id99spTQ== "@typescript-eslint/typescript-estree@5.62.0": version "5.62.0" @@ -1605,7 +1717,48 @@ semver "^7.3.7" tsutils "^3.21.0" -"@typescript-eslint/utils@5.62.0", "@typescript-eslint/utils@^5.10.0": +"@typescript-eslint/typescript-estree@6.21.0": + version "6.21.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-6.21.0.tgz#c47ae7901db3b8bddc3ecd73daff2d0895688c46" + integrity sha512-6npJTkZcO+y2/kr+z0hc4HwNfrrP4kNYh57ek7yCNlrBjWQ1Y0OS7jiZTkgumrvkX5HkEKXFZkkdFNkaW2wmUQ== + dependencies: + "@typescript-eslint/types" "6.21.0" + "@typescript-eslint/visitor-keys" "6.21.0" + debug "^4.3.4" + globby "^11.1.0" + is-glob "^4.0.3" + minimatch "9.0.3" + semver "^7.5.4" + ts-api-utils "^1.0.1" + +"@typescript-eslint/typescript-estree@7.18.0": + version "7.18.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-7.18.0.tgz#b5868d486c51ce8f312309ba79bdb9f331b37931" + integrity sha512-aP1v/BSPnnyhMHts8cf1qQ6Q1IFwwRvAQGRvBFkWlo3/lH29OXA3Pts+c10nxRxIBrDnoMqzhgdwVe5f2D6OzA== + dependencies: + "@typescript-eslint/types" "7.18.0" + "@typescript-eslint/visitor-keys" "7.18.0" + debug "^4.3.4" + globby "^11.1.0" + is-glob "^4.0.3" + minimatch "^9.0.4" + semver "^7.6.0" + ts-api-utils "^1.3.0" + +"@typescript-eslint/utils@6.21.0", "@typescript-eslint/utils@^6.21.0": + version "6.21.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-6.21.0.tgz#4714e7a6b39e773c1c8e97ec587f520840cd8134" + integrity sha512-NfWVaC8HP9T8cbKQxHcsJBY5YE1O33+jpMwN45qzWWaPDZgLIbo12toGMWnmhvCpd3sIxkpDw3Wv1B3dYrbDQQ== + dependencies: + "@eslint-community/eslint-utils" "^4.4.0" + "@types/json-schema" "^7.0.12" + "@types/semver" "^7.5.0" + "@typescript-eslint/scope-manager" "6.21.0" + "@typescript-eslint/types" "6.21.0" + "@typescript-eslint/typescript-estree" "6.21.0" + semver "^7.5.4" + +"@typescript-eslint/utils@^5.10.0": version "5.62.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.62.0.tgz#141e809c71636e4a75daa39faed2fb5f4b10df86" integrity sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ== @@ -1619,13 +1772,15 @@ eslint-scope "^5.1.1" semver "^7.3.7" -"@typescript-eslint/visitor-keys@4.6.1": - version "4.6.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.6.1.tgz#6b125883402d8939df7b54528d879e88f7ba3614" - integrity sha512-owABze4toX7QXwOLT3/D5a8NecZEjEWU1srqxENTfqsY3bwVnl3YYbOh6s1rp2wQKO9RTHFGjKes08FgE7SVMw== +"@typescript-eslint/utils@^6.13.0 || ^7.0.0", "@typescript-eslint/utils@^7.1.1": + version "7.18.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-7.18.0.tgz#bca01cde77f95fc6a8d5b0dbcbfb3d6ca4be451f" + integrity sha512-kK0/rNa2j74XuHVcoCZxdFBMF+aq/vH83CXAOHieC+2Gis4mF8jJXT5eAfyD3K0sAxtPuwxaIOIOvhwzVDt/kw== dependencies: - "@typescript-eslint/types" "4.6.1" - eslint-visitor-keys "^2.0.0" + "@eslint-community/eslint-utils" "^4.4.0" + "@typescript-eslint/scope-manager" "7.18.0" + "@typescript-eslint/types" "7.18.0" + "@typescript-eslint/typescript-estree" "7.18.0" "@typescript-eslint/visitor-keys@5.62.0": version "5.62.0" @@ -1635,7 +1790,23 @@ "@typescript-eslint/types" "5.62.0" eslint-visitor-keys "^3.3.0" -"@ungap/structured-clone@^1.3.0": +"@typescript-eslint/visitor-keys@6.21.0": + version "6.21.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-6.21.0.tgz#87a99d077aa507e20e238b11d56cc26ade45fe47" + integrity sha512-JJtkDduxLi9bivAB+cYOVMtbkqdPOhZ+ZI5LC47MIRrDV4Yn2o+ZnW10Nkmr28xRpSpdJ6Sm42Hjf2+REYXm0A== + dependencies: + "@typescript-eslint/types" "6.21.0" + eslint-visitor-keys "^3.4.1" + +"@typescript-eslint/visitor-keys@7.18.0": + version "7.18.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-7.18.0.tgz#0564629b6124d67607378d0f0332a0495b25e7d7" + integrity sha512-cDF0/Gf81QpY3xYyJKDV14Zwdmid5+uuENhjH2EqFaF0ni+yAyq/LzMaIJdhNJXZI7uLzwIlA+V7oWoyn6Curg== + dependencies: + "@typescript-eslint/types" "7.18.0" + eslint-visitor-keys "^3.4.3" + +"@ungap/structured-clone@^1.2.0", "@ungap/structured-clone@^1.3.0": version "1.3.0" resolved "https://registry.yarnpkg.com/@ungap/structured-clone/-/structured-clone-1.3.0.tgz#d06bbb384ebcf6c505fde1c3d0ed4ddffe0aaff8" integrity sha512-WmoN8qaIAo7WTYWbAZuG8PYEhn5fkz7dZrqTBZ7dtt//lL2Gwms1IcnQ5yHqjDfX8Ft5j4YzDM23f87zBfDe9g== @@ -1880,15 +2051,15 @@ acorn-import-phases@^1.0.3: resolved "https://registry.yarnpkg.com/acorn-import-phases/-/acorn-import-phases-1.0.4.tgz#16eb850ba99a056cb7cbfe872ffb8972e18c8bd7" integrity sha512-wKmbr/DDiIXzEOiWrTTUcDm24kQ2vGfZQvM2fwg2vXqR5uW6aapr7ObPtj1th32b9u90/Pf4AItvdTh42fBmVQ== -acorn-jsx@^5.3.1: +acorn-jsx@^5.3.2: version "5.3.2" resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937" integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== -acorn@^7.4.0: - version "7.4.1" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.4.1.tgz#feaed255973d2e77555b83dbc08851a6c63520fa" - integrity sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A== +acorn@^8.11.3, acorn@^8.16.0, acorn@^8.5.0, acorn@^8.9.0: + version "8.16.0" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.16.0.tgz#4ce79c89be40afe7afe8f3adb902a1f1ce9ac08a" + integrity sha512-UVJyE9MttOsBQIDKw1skb9nAwQuR5wuGD3+82K6JgJlm/Y+KI92oNsMNGZCYdDsVtRHSak0pcV5Dno5+4jh9sw== acorn@^8.15.0: version "8.15.0" @@ -1909,16 +2080,6 @@ ajv-keywords@^5.1.0: dependencies: fast-deep-equal "^3.1.3" -ajv@^6.10.0: - version "6.14.0" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.14.0.tgz#fd067713e228210636ebb08c60bd3765d6dbe73a" - integrity sha512-IWrosm/yrn43eiKqkfkHis7QioDleaXQHdDVPKg0FSwwd/DuvyX79TZnFOnYpB7dcsFAMmtFztZuXPDvSePkFw== - dependencies: - fast-deep-equal "^3.1.1" - fast-json-stable-stringify "^2.0.0" - json-schema-traverse "^0.4.1" - uri-js "^4.2.2" - ajv@^6.12.4, ajv@~6.12.6: version "6.12.6" resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" @@ -1939,21 +2100,6 @@ ajv@^8.0.0, ajv@^8.9.0: json-schema-traverse "^1.0.0" require-from-string "^2.0.2" -ajv@^8.0.1: - version "8.18.0" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.18.0.tgz#8864186b6738d003eb3a933172bb3833e10cefbc" - integrity sha512-PlXPeEWMXMZ7sPYOHqmDyCJzcfNrUr3fGNKtezX14ykXOEIvyK81d+qydx89KY5O71FKMPaQ2vBfBFI5NHR63A== - dependencies: - fast-deep-equal "^3.1.3" - fast-uri "^3.0.1" - json-schema-traverse "^1.0.0" - require-from-string "^2.0.2" - -ansi-colors@^4.1.1: - version "4.1.3" - resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.3.tgz#37611340eb2243e70cc604cad35d63270d48781b" - integrity sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw== - ansi-escapes@^4.3.2: version "4.3.2" resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.2.tgz#6b2291d1db7d98b6521d5f1efa42d0f3a9feb65e" @@ -2008,6 +2154,11 @@ anymatch@^3.1.3: normalize-path "^3.0.0" picomatch "^2.0.4" +are-docs-informative@^0.0.2: + version "0.0.2" + resolved "https://registry.yarnpkg.com/are-docs-informative/-/are-docs-informative-0.0.2.tgz#387f0e93f5d45280373d387a59d34c96db321963" + integrity sha512-ixiS0nLNNG5jNQzgZJNoUpBKdo9yTYZMGJ+QgT2jmjR7G7+QHRCc4v6LQ3NgE7EBJq+o0ams3waJwkrlBom8Ig== + argparse@^1.0.7: version "1.0.10" resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" @@ -2015,6 +2166,11 @@ argparse@^1.0.7: dependencies: sprintf-js "~1.0.2" +argparse@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" + integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== + array-buffer-byte-length@^1.0.1, array-buffer-byte-length@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/array-buffer-byte-length/-/array-buffer-byte-length-1.0.2.tgz#384d12a37295aec3769ab022ad323a18a51ccf8b" @@ -2023,7 +2179,7 @@ array-buffer-byte-length@^1.0.1, array-buffer-byte-length@^1.0.2: call-bound "^1.0.3" is-array-buffer "^3.0.5" -array-includes@^3.1.1, array-includes@^3.1.4, array-includes@^3.1.6, array-includes@^3.1.9: +array-includes@^3.1.6, array-includes@^3.1.7: version "3.1.9" resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.1.9.tgz#1f0ccaa08e90cdbc3eb433210f903ad0f17c3f3a" integrity sha512-FmeCCAenzH0KH381SPT5FZmiA/TmpndpcaShhfgEN9eCVjnFBqq3l1xrI42y8+PPLI6hypzou4GXw00WHmPBLQ== @@ -2042,7 +2198,7 @@ array-union@^2.1.0: resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d" integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw== -array.prototype.findlastindex@^1.2.6: +array.prototype.findlastindex@^1.2.3: version "1.2.6" resolved "https://registry.yarnpkg.com/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.6.tgz#cfa1065c81dcb64e34557c9b81d012f6a421c564" integrity sha512-F/TKATkzseUExPlfvmwQKGITM3DGTK+vkAsCZoDc5daVygbJBnjEUCbgkAvVFsgfXfX4YIqZ/27G3k3tdXrTxQ== @@ -2055,7 +2211,7 @@ array.prototype.findlastindex@^1.2.6: es-object-atoms "^1.1.1" es-shim-unscopables "^1.1.0" -array.prototype.flat@^1.2.5, array.prototype.flat@^1.3.1, array.prototype.flat@^1.3.3: +array.prototype.flat@^1.3.1, array.prototype.flat@^1.3.2: version "1.3.3" resolved "https://registry.yarnpkg.com/array.prototype.flat/-/array.prototype.flat-1.3.3.tgz#534aaf9e6e8dd79fb6b9a9917f839ef1ec63afe5" integrity sha512-rwG/ja1neyLqCuGZ5YYrznA62D4mZXg0i1cIskIUKSiqF3Cje9/wXAls9B9s1Wa2fomMsIv8czB8jZcPmxCXFg== @@ -2065,7 +2221,7 @@ array.prototype.flat@^1.2.5, array.prototype.flat@^1.3.1, array.prototype.flat@^ es-abstract "^1.23.5" es-shim-unscopables "^1.0.2" -array.prototype.flatmap@^1.2.3, array.prototype.flatmap@^1.2.5, array.prototype.flatmap@^1.3.3: +array.prototype.flatmap@^1.3.1, array.prototype.flatmap@^1.3.2, array.prototype.flatmap@^1.3.3: version "1.3.3" resolved "https://registry.yarnpkg.com/array.prototype.flatmap/-/array.prototype.flatmap-1.3.3.tgz#712cc792ae70370ae40586264629e33aab5dd38b" integrity sha512-Y7Wt51eKJSyi80hFrJCePGGNo5ktJCslFuboqJsbf57CCPcm5zztluPlc4/aD8sWsKvlwatezpV4U1efk8kpjg== @@ -2075,6 +2231,17 @@ array.prototype.flatmap@^1.2.3, array.prototype.flatmap@^1.2.5, array.prototype. es-abstract "^1.23.5" es-shim-unscopables "^1.0.2" +array.prototype.tosorted@^1.1.1: + version "1.1.4" + resolved "https://registry.yarnpkg.com/array.prototype.tosorted/-/array.prototype.tosorted-1.1.4.tgz#fe954678ff53034e717ea3352a03f0b0b86f7ffc" + integrity sha512-p6Fx8B7b7ZhL/gmUsAy0D15WhvDccw3mnGNbZpi3pmeJdxtWsj2jEaI4Y6oo3XiHfzuSgPwKc04MYt6KgvC/wA== + dependencies: + call-bind "^1.0.7" + define-properties "^1.2.1" + es-abstract "^1.23.3" + es-errors "^1.3.0" + es-shim-unscopables "^1.0.2" + arraybuffer.prototype.slice@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.4.tgz#9d760d84dbdd06d0cbf92c8849615a1a7ab3183c" @@ -2118,11 +2285,6 @@ assert@^2.0.0: object.assign "^4.1.4" util "^0.12.5" -astral-regex@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-2.0.0.tgz#483143c567aeed4785759c0865786dc77d7d2e31" - integrity sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ== - async-function@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/async-function/-/async-function-1.0.0.tgz#509c9fca60eaf85034c6829838188e4e4c8ffb2b" @@ -2217,6 +2379,11 @@ base64-js@^1.3.1: resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== +baseline-browser-mapping@^2.10.12: + version "2.10.13" + resolved "https://registry.yarnpkg.com/baseline-browser-mapping/-/baseline-browser-mapping-2.10.13.tgz#5a154cc4589193015a274e3d18319b0d76b9224e" + integrity sha512-BL2sTuHOdy0YT1lYieUxTw/QMtPBC3pmlJC6xk8BBYVv6vcw3SGdKemQ+Xsx9ik2F/lYDO9tqsFQH1r9PFuHKw== + baseline-browser-mapping@^2.8.25: version "2.8.32" resolved "https://registry.yarnpkg.com/baseline-browser-mapping/-/baseline-browser-mapping-2.8.32.tgz#5de72358cf363ac41e7d642af239f6ac5ed1270a" @@ -2232,6 +2399,11 @@ bn.js@^5.2.1, bn.js@^5.2.2: resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.2.2.tgz#82c09f9ebbb17107cd72cb7fd39bd1f9d0aaa566" integrity sha512-v2YAxEmKaBLahNwE1mjp4WON6huMNeuDvagFZW+ASCuA/ku0bXR9hSMw0XpiqMoA3+rmnyck/tPRSFQkoC9Cuw== +boolbase@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e" + integrity sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww== + brace-expansion@^1.1.7: version "1.1.12" resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.12.tgz#ab9b454466e5a8cc3a187beaad580412a9c5b843" @@ -2240,7 +2412,7 @@ brace-expansion@^1.1.7: balanced-match "^1.0.0" concat-map "0.0.1" -brace-expansion@^2.0.2: +brace-expansion@^2.0.1, brace-expansion@^2.0.2: version "2.0.3" resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.0.3.tgz#0493338bdd58e319b1039c67cf7ee439892c01d9" integrity sha512-MCV/fYJEbqx68aE58kv2cA/kiky1G8vux3OR6/jbS+jIMe/6fJWa0DTzJU7dqijOWYwHi1t29FlfYI9uytqlpA== @@ -2339,6 +2511,17 @@ browserslist@^4.24.0, browserslist@^4.26.3: node-releases "^2.0.27" update-browserslist-db "^1.1.4" +browserslist@^4.28.1: + version "4.28.2" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.28.2.tgz#f50b65362ef48974ca9f50b3680566d786b811d2" + integrity sha512-48xSriZYYg+8qXna9kwqjIVzuQxi+KYWp2+5nCYnYKPTr0LvD89Jqk2Or5ogxz0NUMfIjhh2lIUX/LyX9B4oIg== + dependencies: + baseline-browser-mapping "^2.10.12" + caniuse-lite "^1.0.30001782" + electron-to-chromium "^1.5.328" + node-releases "^2.0.36" + update-browserslist-db "^1.2.3" + bs-logger@^0.2.6: version "0.2.6" resolved "https://registry.yarnpkg.com/bs-logger/-/bs-logger-0.2.6.tgz#eb7d365307a72cf974cc6cda76b68354ad336bd8" @@ -2379,6 +2562,11 @@ buffer@^6.0.3: base64-js "^1.3.1" ieee754 "^1.2.1" +builtin-modules@3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-3.2.0.tgz#45d5db99e7ee5e6bc4f362e008bf917ab5049887" + integrity sha512-lGzLKcioL90C7wMczpkY0n/oART3MbBa8R9OFGE1rJxoVI86u4WAGfEk8Wjv10eKSyTHVGkSo3bvBylCEtk7LA== + builtin-modules@^3.3.0: version "3.3.0" resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-3.3.0.tgz#cae62812b89801e9656336e46223e030386be7b6" @@ -2389,6 +2577,13 @@ builtin-status-codes@^3.0.0: resolved "https://registry.yarnpkg.com/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz#85982878e21b98e1c66425e03d0174788f569ee8" integrity sha512-HpGFw18DgFWlncDfjTa2rcQ4W88O1mC8e8yZ2AvQY5KDaktSTwo+KRf6nHK6FRI5FyRyb/5T6+TSxfP7QyGsmQ== +builtins@^5.0.1: + version "5.1.0" + resolved "https://registry.yarnpkg.com/builtins/-/builtins-5.1.0.tgz#6d85eeb360c4ebc166c3fdef922a15aa7316a5e8" + integrity sha512-SW9lzGTLvWTP1AY8xeAMZimqDrIaSdLQUcVr9DMef51niJ022Ri87SwRRKYm4A6iHfkPaiVUu/Duw2Wc4J7kKg== + dependencies: + semver "^7.0.0" + call-bind-apply-helpers@^1.0.0, call-bind-apply-helpers@^1.0.1, call-bind-apply-helpers@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz#4b5428c222be985d79c3d82657479dbe0b59b2d6" @@ -2415,6 +2610,11 @@ call-bound@^1.0.2, call-bound@^1.0.3, call-bound@^1.0.4: call-bind-apply-helpers "^1.0.2" get-intrinsic "^1.3.0" +call-me-maybe@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/call-me-maybe/-/call-me-maybe-1.0.2.tgz#03f964f19522ba643b1b0693acb9152fe2074baa" + integrity sha512-HpX65o1Hnr9HH25ojC1YGs7HCQLq0GCOibSaWER0eNpgJ/Z1MZv2mTc7+xh6WOPxbRVcmgbv4hGU+uSQ/2xFZQ== + callsites@^3.0.0, callsites@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" @@ -2444,12 +2644,17 @@ caniuse-lite@^1.0.30001754: resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001757.tgz#a46ff91449c69522a462996c6aac4ef95d7ccc5e" integrity sha512-r0nnL/I28Zi/yjk1el6ilj27tKcdjLsNqAOZr0yVjWPrSQyHgKI2INaEWw21bAQSv2LXRt1XuCS/GomNpWOxsQ== +caniuse-lite@^1.0.30001782: + version "1.0.30001784" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001784.tgz#bdf9733a0813ccfb5ab4d02f2127e62ee4c6b718" + integrity sha512-WU346nBTklUV9YfUl60fqRbU5ZqyXlqvo1SgigE1OAXK5bFL8LL9q1K7aap3N739l4BvNqnkm3YrGHiY9sfUQw== + canonicalize@^1.0.1: version "1.0.8" resolved "https://registry.yarnpkg.com/canonicalize/-/canonicalize-1.0.8.tgz#24d1f1a00ed202faafd9bf8e63352cd4450c6df1" integrity sha512-0CNTVCLZggSh7bc5VkX5WWPWO+cyZbNd07IHIsSXLia/eAq+r836hgk+8BKoEh7949Mda87VUOitx5OddVj64A== -chalk@^2.4.1, chalk@^2.4.2: +chalk@^2.4.1: version "2.4.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== @@ -2471,6 +2676,21 @@ char-regex@^1.0.2: resolved "https://registry.yarnpkg.com/char-regex/-/char-regex-1.0.2.tgz#d744358226217f981ed58f479b1d6bcc29545dcf" integrity sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw== +character-entities-legacy@^1.0.0: + version "1.1.4" + resolved "https://registry.yarnpkg.com/character-entities-legacy/-/character-entities-legacy-1.1.4.tgz#94bc1845dce70a5bb9d2ecc748725661293d8fc1" + integrity sha512-3Xnr+7ZFS1uxeiUDvV02wQ+QDbc55o97tIV5zHScSPJpcLm/r0DFPcoY3tYRp+VZukxuMeKgXYmsXQHO05zQeA== + +character-entities@^1.0.0: + version "1.2.4" + resolved "https://registry.yarnpkg.com/character-entities/-/character-entities-1.2.4.tgz#e12c3939b7eaf4e5b15e7ad4c5e28e1d48c5b16b" + integrity sha512-iBMyeEHxfVnIakwOuDXpVkc54HijNgCyQB2w0VfGQThle6NXn50zU6V/u+LDhxHcDUPojn6Kpga3PTAD8W1bQw== + +character-reference-invalid@^1.0.0: + version "1.1.4" + resolved "https://registry.yarnpkg.com/character-reference-invalid/-/character-reference-invalid-1.1.4.tgz#083329cda0eae272ab3dbbf37e9a382c13af1560" + integrity sha512-mKKUkUbhPpQlCOfIuZkvSEgktjPFIsZKRRbC6KWVEMvlzblj3i3asQv5ODsrwt0N3pHAEvjP8KTQPHkp0+6jOg== + chevrotain@^11.0.3: version "11.2.0" resolved "https://registry.yarnpkg.com/chevrotain/-/chevrotain-11.2.0.tgz#4cf01bb93b4e41deceda966179c2447182131bc2" @@ -2488,17 +2708,7 @@ chrome-trace-event@^1.0.2: resolved "https://registry.yarnpkg.com/chrome-trace-event/-/chrome-trace-event-1.0.4.tgz#05bffd7ff928465093314708c93bdfa9bd1f0f5b" integrity sha512-rNjApaLzuwaOTjCiT8lSDdGN1APCiqkChLMJxJPWLunPAt5fy8xgU9/jNOchV84wfIxrA0lRQB7oCT8jrn/wrQ== -ci-info@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-2.0.0.tgz#67a9e964be31a51e15e5010d58e6f12834002f46" - integrity sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ== - -ci-info@^3.2.0: - version "3.9.0" - resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.9.0.tgz#4279a62028a7b1f262f3473fc9605f5e218c59b4" - integrity sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ== - -ci-info@^4.2.0: +ci-info@^4.0.0, ci-info@^4.2.0: version "4.4.0" resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-4.4.0.tgz#7d54eff9f54b45b62401c26032696eb59c8bd18c" integrity sha512-77PSwercCZU2Fc4sX94eF8k8Pxte6JAwL4/ICZLFjJLqegs7kCuAsqqj/70NQF6TvDpgFjkubQB2FW2ZZddvQg== @@ -2630,6 +2840,11 @@ commander@^2.19.0, commander@^2.20.0: resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== +comment-parser@1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/comment-parser/-/comment-parser-1.4.1.tgz#bdafead37961ac079be11eb7ec65c4d021eaf9cc" + integrity sha512-buhp5kePrmda3vhc5B9t7pUQXAb2Tnd0qgpkIhPhkHXxJpiPJ11H0ZEU0oBpJ2QztSbzG/ZxMj/CHsYJqRHmyg== + concat-map@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" @@ -2645,6 +2860,11 @@ concat-stream@^1.4.7: readable-stream "^2.2.2" typedarray "^0.0.6" +confbox@^0.1.8: + version "0.1.8" + resolved "https://registry.yarnpkg.com/confbox/-/confbox-0.1.8.tgz#820d73d3b3c82d9bd910652c5d4d599ef8ff8b06" + integrity sha512-RMtmw0iFkeR4YV+fUOSucriAQNb9g8zFR52MWCtl+cCZOFRNL6zeB395vPzFhEjjn4fMxXudmELnl/KF/WrK6w== + console-browserify@1.1.x: version "1.1.0" resolved "https://registry.yarnpkg.com/console-browserify/-/console-browserify-1.1.0.tgz#f0241c45730a9fc6323b206dbf38edc741d0bb10" @@ -2667,6 +2887,13 @@ convert-source-map@^2.0.0: resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-2.0.0.tgz#4b560f649fc4e918dd0ab75cf4961e8bc882d82a" integrity sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg== +core-js-compat@^3.34.0: + version "3.49.0" + resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.49.0.tgz#06145447d92f4aaf258a0c44f24b47afaeaffef6" + integrity sha512-VQXt1jr9cBz03b331DFDCCP90b3fanciLkgiOoy8SBHy06gNf+vQ1A3WFLqG7I8TipYIKeYK9wxd0tUrvHcOZA== + dependencies: + browserslist "^4.28.1" + core-util-is@~1.0.0: version "1.0.3" resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.3.tgz#a6042d3634c2b27e9328f837b965fac83808db85" @@ -2751,6 +2978,11 @@ crypto-browserify@^3.12.1: randombytes "^2.1.0" randomfill "^1.0.4" +cssesc@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/cssesc/-/cssesc-3.0.0.tgz#37741919903b868565e1c09ea747445cd18983ee" + integrity sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg== + dargs@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/dargs/-/dargs-7.0.0.tgz#04015c41de0bcb69ec84050f3d9be0caf8d6d5cc" @@ -2788,13 +3020,6 @@ date-now@^0.1.4: resolved "https://registry.yarnpkg.com/date-now/-/date-now-0.1.4.tgz#eaf439fd4d4848ad74e5cc7dbef200672b9e345b" integrity sha512-AsElvov3LoNB7tf5k37H2jYSB+ZZPMT5sG2QjJCcdlV5chIv6htBUBUui2IKRjgtKAKtCBN7Zbwa+MtwLjSeNw== -debug@^2.6.9: - version "2.6.9" - resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" - integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== - dependencies: - ms "2.0.0" - debug@^3.2.7: version "3.2.7" resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.7.tgz#72580b7e9145fb39b6676f9c5e5fb100b934179a" @@ -2802,7 +3027,7 @@ debug@^3.2.7: dependencies: ms "^2.1.1" -debug@^4.0.1, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.4: +debug@^4.0.0, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.4, debug@^4.3.5, debug@^4.4.0: version "4.4.3" resolved "https://registry.yarnpkg.com/debug/-/debug-4.4.3.tgz#c6ae432d9bd9662582fce08709b038c58e9e3d6a" integrity sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA== @@ -2868,6 +3093,11 @@ detect-newline@^3.1.0: resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-3.1.0.tgz#576f5dfc63ae1a192ff192d8ad3af6308991b651" integrity sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA== +diff-sequences@^27.5.1: + version "27.5.1" + resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-27.5.1.tgz#eaecc0d327fd68c8d9672a1e64ab8dccb2ef5327" + integrity sha512-k1gCAXAsNgLwEL+Y8Wvl+M6oEFj5bgazfZULpS5CneoPPXRaCCW7dm+q21Ky2VEE5X+VeRDBVg1Pcvvsr4TtNQ== + diffie-hellman@^5.0.3: version "5.0.3" resolved "https://registry.yarnpkg.com/diffie-hellman/-/diffie-hellman-5.0.3.tgz#40e8ee98f55a2149607146921c63e1ae5f3d2875" @@ -2988,6 +3218,11 @@ electron-to-chromium@^1.5.249: resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.262.tgz#c31eed591c6628908451c9ca0f0758ed514aa003" integrity sha512-NlAsMteRHek05jRUxUR0a5jpjYq9ykk6+kO0yRaMi5moe7u0fVIOeQ3Y30A8dIiWFBNUoQGi1ljb1i5VtS9WQQ== +electron-to-chromium@^1.5.328: + version "1.5.331" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.331.tgz#3e4e845042d517c68b3c00be5fc33204f13b2058" + integrity sha512-IbxXrsTlD3hRodkLnbxAPP4OuJYdWCeM3IOdT+CpcMoIwIoDfCmRpEtSPfwBXxVkg9xmBeY7Lz2Eo2TDn/HC3Q== + elliptic@^6.5.3, elliptic@^6.6.1: version "6.6.1" resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.6.1.tgz#3b8ffb02670bf69e382c7f65bf524c97c5405c06" @@ -3029,14 +3264,6 @@ enhanced-resolve@^5.0.0, enhanced-resolve@^5.17.3: graceful-fs "^4.2.4" tapable "^2.2.0" -enquirer@^2.3.5: - version "2.4.1" - resolved "https://registry.yarnpkg.com/enquirer/-/enquirer-2.4.1.tgz#93334b3fbd74fc7097b224ab4a8fb7e40bf4ae56" - integrity sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ== - dependencies: - ansi-colors "^4.1.1" - strip-ansi "^6.0.1" - entities@1.0: version "1.0.0" resolved "https://registry.yarnpkg.com/entities/-/entities-1.0.0.tgz#b2987aa3821347fcde642b24fdfc9e4fb712bf26" @@ -3129,6 +3356,66 @@ es-abstract@^1.23.2, es-abstract@^1.23.5, es-abstract@^1.23.6, es-abstract@^1.23 unbox-primitive "^1.1.0" which-typed-array "^1.1.19" +es-abstract@^1.23.3, es-abstract@^1.24.1: + version "1.24.1" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.24.1.tgz#f0c131ed5ea1bb2411134a8dd94def09c46c7899" + integrity sha512-zHXBLhP+QehSSbsS9Pt23Gg964240DPd6QCf8WpkqEXxQ7fhdZzYsocOr5u7apWonsS5EjZDmTF+/slGMyasvw== + dependencies: + array-buffer-byte-length "^1.0.2" + arraybuffer.prototype.slice "^1.0.4" + available-typed-arrays "^1.0.7" + call-bind "^1.0.8" + call-bound "^1.0.4" + data-view-buffer "^1.0.2" + data-view-byte-length "^1.0.2" + data-view-byte-offset "^1.0.1" + es-define-property "^1.0.1" + es-errors "^1.3.0" + es-object-atoms "^1.1.1" + es-set-tostringtag "^2.1.0" + es-to-primitive "^1.3.0" + function.prototype.name "^1.1.8" + get-intrinsic "^1.3.0" + get-proto "^1.0.1" + get-symbol-description "^1.1.0" + globalthis "^1.0.4" + gopd "^1.2.0" + has-property-descriptors "^1.0.2" + has-proto "^1.2.0" + has-symbols "^1.1.0" + hasown "^2.0.2" + internal-slot "^1.1.0" + is-array-buffer "^3.0.5" + is-callable "^1.2.7" + is-data-view "^1.0.2" + is-negative-zero "^2.0.3" + is-regex "^1.2.1" + is-set "^2.0.3" + is-shared-array-buffer "^1.0.4" + is-string "^1.1.1" + is-typed-array "^1.1.15" + is-weakref "^1.1.1" + math-intrinsics "^1.1.0" + object-inspect "^1.13.4" + object-keys "^1.1.1" + object.assign "^4.1.7" + own-keys "^1.0.1" + regexp.prototype.flags "^1.5.4" + safe-array-concat "^1.1.3" + safe-push-apply "^1.0.0" + safe-regex-test "^1.1.0" + set-proto "^1.0.0" + stop-iteration-iterator "^1.1.0" + string.prototype.trim "^1.2.10" + string.prototype.trimend "^1.0.9" + string.prototype.trimstart "^1.0.8" + typed-array-buffer "^1.0.3" + typed-array-byte-length "^1.0.3" + typed-array-byte-offset "^1.0.4" + typed-array-length "^1.0.7" + unbox-primitive "^1.1.0" + which-typed-array "^1.1.19" + es-define-property@^1.0.0, es-define-property@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/es-define-property/-/es-define-property-1.0.1.tgz#983eb2f9a6724e9303f61addf011c72e09e0b0fa" @@ -3139,7 +3426,30 @@ es-errors@^1.3.0: resolved "https://registry.yarnpkg.com/es-errors/-/es-errors-1.3.0.tgz#05f75a25dab98e4fb1dcd5e1472c0546d5057c8f" integrity sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw== -es-module-lexer@^1.2.1: +es-iterator-helpers@^1.0.12: + version "1.3.1" + resolved "https://registry.yarnpkg.com/es-iterator-helpers/-/es-iterator-helpers-1.3.1.tgz#3be0f4e63438d6c5a1fb5f33b891aaad3f7dae06" + integrity sha512-zWwRvqWiuBPr0muUG/78cW3aHROFCNIQ3zpmYDpwdbnt2m+xlNyRWpHBpa2lJjSBit7BQ+RXA1iwbSmu5yJ/EQ== + dependencies: + call-bind "^1.0.8" + call-bound "^1.0.4" + define-properties "^1.2.1" + es-abstract "^1.24.1" + es-errors "^1.3.0" + es-set-tostringtag "^2.1.0" + function-bind "^1.1.2" + get-intrinsic "^1.3.0" + globalthis "^1.0.4" + gopd "^1.2.0" + has-property-descriptors "^1.0.2" + has-proto "^1.2.0" + has-symbols "^1.1.0" + internal-slot "^1.1.0" + iterator.prototype "^1.1.5" + math-intrinsics "^1.1.0" + safe-array-concat "^1.1.3" + +es-module-lexer@^1.2.1, es-module-lexer@^1.5.3: version "1.7.0" resolved "https://registry.yarnpkg.com/es-module-lexer/-/es-module-lexer-1.7.0.tgz#9159601561880a85f2734560a9099b2c31e5372a" integrity sha512-jEQoCwk8hyb2AZziIOLhDqpm5+2ww5uIE6lkO/6jcOCusfk6LhMHpXXfBLXTZ7Ydyt0j4VoUQv6uGNYbdW+kBA== @@ -3182,6 +3492,11 @@ escalade@^3.1.1, escalade@^3.2.0: resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.2.0.tgz#011a3f69856ba189dffa7dc8fcce99d2a87903e5" integrity sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA== +escape-string-regexp@4.0.0, escape-string-regexp@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" + integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== + escape-string-regexp@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" @@ -3192,46 +3507,34 @@ escape-string-regexp@^2.0.0: resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz#a30304e99daa32e23b2fd20f51babd07cffca344" integrity sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w== -escape-string-regexp@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" - integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== - -eslint-ast-utils@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/eslint-ast-utils/-/eslint-ast-utils-1.1.0.tgz#3d58ba557801cfb1c941d68131ee9f8c34bd1586" - integrity sha512-otzzTim2/1+lVrlH19EfQQJEhVJSu0zOb9ygb3iapN6UlyaDtyRq4b5U1FuW0v1lRa9Fp/GJyHkSwm6NqABgCA== +eslint-compat-utils@^0.4.0: + version "0.4.1" + resolved "https://registry.yarnpkg.com/eslint-compat-utils/-/eslint-compat-utils-0.4.1.tgz#498d9dad03961174a283f7741838a3fbe4a34e89" + integrity sha512-5N7ZaJG5pZxUeNNJfUchurLVrunD1xJvyg5kYOIVF8kg1f3ajTikmAu/5fZ9w100omNPOoMjngRszh/Q/uFGMg== dependencies: - lodash.get "^4.4.2" - lodash.zip "^4.2.0" + semver "^7.5.4" -eslint-config-es@3.25.3: - version "3.25.3" - resolved "https://registry.yarnpkg.com/eslint-config-es/-/eslint-config-es-3.25.3.tgz#e99f2c9b7fa889050af05dc7fceefa5f18d35ddb" - integrity sha512-GPpZUYddFeAeEuAJkdT9+pPlxfq2xQ44mvAvAYnC2dFUETr76qYt80s54BTogbEBBKpFo8btp5RMPF94A9Hm1w== +eslint-compat-utils@^0.5.1: + version "0.5.1" + resolved "https://registry.yarnpkg.com/eslint-compat-utils/-/eslint-compat-utils-0.5.1.tgz#7fc92b776d185a70c4070d03fd26fde3d59652e4" + integrity sha512-3z3vFexKIEnjHE3zCMRo6fn/e44U7T1khUjg+Hp0ZQMCigh28rALD0nPFBcGZuiLC5rLZa2ubQHDRln09JfU2Q== dependencies: - "@typescript-eslint/eslint-plugin" "4.6.1" - "@typescript-eslint/parser" "4.6.1" - eslint-plugin-extended "0.2.0" - eslint-plugin-mocha "8.0.0" - eslint-plugin-react "7.21.5" - eslint-plugin-unicorn "23.0.0" + semver "^7.5.4" -eslint-config-es@4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/eslint-config-es/-/eslint-config-es-4.1.0.tgz#bef594038abc5b0ca79a3adbb04222d9e201748a" - integrity sha512-o7sRistJAqsiVB437ptIodjcBTz+JwUj2youjU9P2zIJMHZOY2eRpEnIMhqOusbWDVqPKefp+3hPSI/qFotECQ== +eslint-compat-utils@^0.6.0, eslint-compat-utils@^0.6.4: + version "0.6.5" + resolved "https://registry.yarnpkg.com/eslint-compat-utils/-/eslint-compat-utils-0.6.5.tgz#6b06350a1c947c4514cfa64a170a6bfdbadc7ec2" + integrity sha512-vAUHYzue4YAa2hNACjB8HvUQj5yehAZgiClyFVVom9cP8z5NSFq3PwB/TtJslN2zAMgRX6FCFCjYBbQh71g5RQ== dependencies: - lodash "4.17.21" + semver "^7.5.4" -eslint-import-resolver-node@^0.3.6: - version "0.3.10" - resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.10.tgz#84ce3005abfc300588cf23bbac1aabec1fc6e8c1" - integrity sha512-tRrKqFyCaKict5hOd244sL6EQFNycnMQnBe+j8uqGNXYzsImGbGUU4ibtoaBmv5FLwJwcFJNeg1GeVjQfbMrDQ== +eslint-config-flat-gitignore@^0.1.2: + version "0.1.8" + resolved "https://registry.yarnpkg.com/eslint-config-flat-gitignore/-/eslint-config-flat-gitignore-0.1.8.tgz#3a5c0ac6ed7a5d925603263b529d217088ebb005" + integrity sha512-OEUbS2wzzYtUfshjOqzFo4Bl4lHykXUdM08TCnYNl7ki+niW4Q1R0j0FDFDr0vjVsI5ZFOz5LvluxOP+Ew+dYw== dependencies: - debug "^3.2.7" - is-core-module "^2.16.1" - resolve "^2.0.0-next.6" + find-up-simple "^1.0.0" + parse-gitignore "^2.0.0" eslint-import-resolver-node@^0.3.9: version "0.3.9" @@ -3242,25 +3545,55 @@ eslint-import-resolver-node@^0.3.9: is-core-module "^2.13.0" resolve "^1.22.4" -eslint-import-resolver-typescript@^2.3.0, eslint-import-resolver-typescript@^2.5.0: - version "2.7.1" - resolved "https://registry.yarnpkg.com/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-2.7.1.tgz#a90a4a1c80da8d632df25994c4c5fdcdd02b8751" - integrity sha512-00UbgGwV8bSgUv34igBDbTOtKhqoRMy9bFjNehT40bXg6585PNIct8HhXZ0SybqB9rWtXj9crcku8ndDn/gIqQ== +eslint-import-resolver-typescript@^3.6.1: + version "3.10.1" + resolved "https://registry.yarnpkg.com/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-3.10.1.tgz#23dac32efa86a88e2b8232eb244ac499ad636db2" + integrity sha512-A1rHYb06zjMGAxdLSkN2fXPBwuSaQ0iO5M/hdyS0Ajj1VBaRp0sPD3dn1FhME3c/JluGFbwSxyCfqdSbtQLAHQ== dependencies: - debug "^4.3.4" - glob "^7.2.0" - is-glob "^4.0.3" - resolve "^1.22.0" - tsconfig-paths "^3.14.1" + "@nolyfill/is-core-module" "1.0.39" + debug "^4.4.0" + get-tsconfig "^4.10.0" + is-bun-module "^2.0.0" + stable-hash "^0.0.5" + tinyglobby "^0.2.13" + unrs-resolver "^1.6.2" -eslint-module-utils@^2.12.1, eslint-module-utils@^2.7.2: +eslint-json-compat-utils@^0.2.1: + version "0.2.3" + resolved "https://registry.yarnpkg.com/eslint-json-compat-utils/-/eslint-json-compat-utils-0.2.3.tgz#f6ef27e80c750b56cbedb4de67a10b1d47f0a8a7" + integrity sha512-RbBmDFyu7FqnjE8F0ZxPNzx5UaptdeS9Uu50r7A+D7s/+FCX+ybiyViYEgFUaFIFqSWJgZRTpL5d8Kanxxl2lQ== + dependencies: + esquery "^1.6.0" + +eslint-merge-processors@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/eslint-merge-processors/-/eslint-merge-processors-0.1.0.tgz#30ac4c59725a63d12a9677de7d2b2ec2a09fb779" + integrity sha512-IvRXXtEajLeyssvW4wJcZ2etxkR9mUf4zpNwgI+m/Uac9RfXHskuJefkHUcawVzePnd6xp24enp5jfgdHzjRdQ== + +eslint-module-utils@^2.8.0: version "2.12.1" resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.12.1.tgz#f76d3220bfb83c057651359295ab5854eaad75ff" integrity sha512-L8jSWTze7K2mTg0vos/RuLRS5soomksDPoJLXIslC7c8Wmut3bx7CPpJijDcBZtxQ5lrbUdM+s0OlNbz0DCDNw== dependencies: debug "^3.2.7" -eslint-plugin-eslint-comments@3.2.0: +eslint-plugin-antfu@^2.1.2: + version "2.7.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-antfu/-/eslint-plugin-antfu-2.7.0.tgz#63e6da511da21fabcd1774c10f7d8b5681b2e560" + integrity sha512-gZM3jq3ouqaoHmUNszb1Zo2Ux7RckSvkGksjLWz9ipBYGSv1EwwBETN6AdiUXn+RpVHXTbEMPAPlXJazcA6+iA== + dependencies: + "@antfu/utils" "^0.7.10" + +eslint-plugin-es-x@^7.5.0: + version "7.8.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-es-x/-/eslint-plugin-es-x-7.8.0.tgz#a207aa08da37a7923f2a9599e6d3eb73f3f92b74" + integrity sha512-7Ds8+wAAoV3T+LAKeu39Y5BzXCrGKrcISfgKEqTS4BDN8SFEDQd0S43jiQ8vIa3wUKD07qitZdfzlenSi8/0qQ== + dependencies: + "@eslint-community/eslint-utils" "^4.1.2" + "@eslint-community/regexpp" "^4.11.0" + eslint-compat-utils "^0.5.1" + +eslint-plugin-eslint-comments@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/eslint-plugin-eslint-comments/-/eslint-plugin-eslint-comments-3.2.0.tgz#9e1cd7b4413526abb313933071d7aba05ca12ffa" integrity sha512-0jkOl0hfojIHHmEHgmNdqv4fmh7300NdpA9FFpF7zaoLvB/QeXOGNLIo86oAveJFrfB1p05kC8hpEMHM8DwWVQ== @@ -3275,116 +3608,166 @@ eslint-plugin-extended@0.2.0: dependencies: varname "2.0.2" -eslint-plugin-import@2.25.4: - version "2.25.4" - resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.25.4.tgz#322f3f916a4e9e991ac7af32032c25ce313209f1" - integrity sha512-/KJBASVFxpu0xg1kIBn9AUa8hQVnszpwgE7Ld0lKAlx7Ie87yzEzCgSkekt+le/YVhiaosO4Y14GDAOc41nfxA== +eslint-plugin-i@^2.29.1: + version "2.29.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-i/-/eslint-plugin-i-2.29.1.tgz#97e4a055b6b2040cec0842700dd1d2066773b5a4" + integrity sha512-ORizX37MelIWLbMyqI7hi8VJMf7A0CskMmYkB+lkCX3aF4pkGV7kwx5bSEb4qx7Yce2rAf9s34HqDRPjGRZPNQ== dependencies: - array-includes "^3.1.4" - array.prototype.flat "^1.2.5" - debug "^2.6.9" - doctrine "^2.1.0" - eslint-import-resolver-node "^0.3.6" - eslint-module-utils "^2.7.2" - has "^1.0.3" - is-core-module "^2.8.0" + debug "^4.3.4" + doctrine "^3.0.0" + eslint-import-resolver-node "^0.3.9" + eslint-module-utils "^2.8.0" + get-tsconfig "^4.7.2" is-glob "^4.0.3" - minimatch "^3.0.4" - object.values "^1.1.5" - resolve "^1.20.0" - tsconfig-paths "^3.12.0" + minimatch "^3.1.2" + semver "^7.5.4" -eslint-plugin-import@^2.22.1: - version "2.32.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.32.0.tgz#602b55faa6e4caeaa5e970c198b5c00a37708980" - integrity sha512-whOE1HFo/qJDyX4SnXzP4N6zOWn79WhnCUY/iDR0mPfQZO8wcYE4JClzI2oZrhBnnMUCBCHZhO6VQyoBU95mZA== +eslint-plugin-import@2.29.1: + version "2.29.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.29.1.tgz#d45b37b5ef5901d639c15270d74d46d161150643" + integrity sha512-BbPC0cuExzhiMo4Ff1BTVwHpjjv28C5R+btTOGaCRC7UEz801up0JadwkeSk5Ued6TG34uaczuVuH6qyy5YUxw== dependencies: - "@rtsao/scc" "^1.1.0" - array-includes "^3.1.9" - array.prototype.findlastindex "^1.2.6" - array.prototype.flat "^1.3.3" - array.prototype.flatmap "^1.3.3" + array-includes "^3.1.7" + array.prototype.findlastindex "^1.2.3" + array.prototype.flat "^1.3.2" + array.prototype.flatmap "^1.3.2" debug "^3.2.7" doctrine "^2.1.0" eslint-import-resolver-node "^0.3.9" - eslint-module-utils "^2.12.1" - hasown "^2.0.2" - is-core-module "^2.16.1" + eslint-module-utils "^2.8.0" + hasown "^2.0.0" + is-core-module "^2.13.1" is-glob "^4.0.3" minimatch "^3.1.2" - object.fromentries "^2.0.8" - object.groupby "^1.0.3" - object.values "^1.2.1" + object.fromentries "^2.0.7" + object.groupby "^1.0.1" + object.values "^1.1.7" semver "^6.3.1" - string.prototype.trimend "^1.0.9" tsconfig-paths "^3.15.0" -eslint-plugin-jest@^26.0.0: - version "26.9.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-26.9.0.tgz#7931c31000b1c19e57dbfb71bbf71b817d1bf949" - integrity sha512-TWJxWGp1J628gxh2KhaH1H1paEdgE2J61BBF1I59c6xWeL5+D1BzMxGDN/nXAfX+aSkR5u80K+XhskK6Gwq9ng== +eslint-plugin-jest@^27.9.0: + version "27.9.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-27.9.0.tgz#7c98a33605e1d8b8442ace092b60e9919730000b" + integrity sha512-QIT7FH7fNmd9n4se7FFKHbsLKGQiw885Ds6Y/sxKgCZ6natwCsXdgPOADnYVxN2QrRweF0FZWbJ6S7Rsn7llug== dependencies: "@typescript-eslint/utils" "^5.10.0" -eslint-plugin-mocha@8.0.0: - version "8.0.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-mocha/-/eslint-plugin-mocha-8.0.0.tgz#7ec5d228bcb3735301701dfbc3376320a1ca3791" - integrity sha512-n67etbWDz6NQM+HnTwZHyBwz/bLlYPOxUbw7bPuCyFujv7ZpaT/Vn6KTAbT02gf7nRljtYIjWcTxK/n8a57rQQ== +eslint-plugin-jsdoc@^48.0.4: + version "48.11.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-48.11.0.tgz#7c8dae6ce0d814aff54b87fdb808f02635691ade" + integrity sha512-d12JHJDPNo7IFwTOAItCeJY1hcqoIxE0lHA8infQByLilQ9xkqrRa6laWCnsuCrf+8rUnvxXY1XuTbibRBNylA== dependencies: - eslint-utils "^2.1.0" - ramda "^0.27.1" + "@es-joy/jsdoccomment" "~0.46.0" + are-docs-informative "^0.0.2" + comment-parser "1.4.1" + debug "^4.3.5" + escape-string-regexp "^4.0.0" + espree "^10.1.0" + esquery "^1.6.0" + parse-imports "^2.1.1" + semver "^7.6.3" + spdx-expression-parse "^4.0.0" + synckit "^0.9.1" + +eslint-plugin-jsonc@^2.13.0: + version "2.21.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-jsonc/-/eslint-plugin-jsonc-2.21.1.tgz#ca1381a36baaa2227b73a2a103477cf69fb4168c" + integrity sha512-dbNR5iEnQeORwsK2WZzr3QaMtFCY3kKJVMRHPzUpKzMhmVy2zIpVgFDpX8MNoIdoqz6KCpCfOJavhfiSbZbN+w== + dependencies: + "@eslint-community/eslint-utils" "^4.5.1" + diff-sequences "^27.5.1" + eslint-compat-utils "^0.6.4" + eslint-json-compat-utils "^0.2.1" + espree "^9.6.1 || ^10.3.0" + graphemer "^1.4.0" + jsonc-eslint-parser "^2.4.0" + natural-compare "^1.4.0" + synckit "^0.6.2 || ^0.7.3 || ^0.11.5" -eslint-plugin-mocha@9.0.0: - version "9.0.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-mocha/-/eslint-plugin-mocha-9.0.0.tgz#b4457d066941eecb070dc06ed301c527d9c61b60" - integrity sha512-d7knAcQj1jPCzZf3caeBIn3BnW6ikcvfz0kSqQpwPYcVGLoJV5sz0l0OJB2LR8I7dvTDbqq1oV6ylhSgzA10zg== +eslint-plugin-markdown@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-markdown/-/eslint-plugin-markdown-3.0.1.tgz#fc6765bdb5f82a75e2438d7fac619602f2abc38c" + integrity sha512-8rqoc148DWdGdmYF6WSQFT3uQ6PO7zXYgeBpHAOAakX/zpq+NvFYbDA/H7PYzHajwtmaOzAwfxyl++x0g1/N9A== + dependencies: + mdast-util-from-markdown "^0.8.5" + +eslint-plugin-n@^16.6.2: + version "16.6.2" + resolved "https://registry.yarnpkg.com/eslint-plugin-n/-/eslint-plugin-n-16.6.2.tgz#6a60a1a376870064c906742272074d5d0b412b0b" + integrity sha512-6TyDmZ1HXoFQXnhCTUjVFULReoBPOAjpuiKELMkeP40yffI/1ZRO+d9ug/VC6fqISo2WkuIBk3cvuRPALaWlOQ== + dependencies: + "@eslint-community/eslint-utils" "^4.4.0" + builtins "^5.0.1" + eslint-plugin-es-x "^7.5.0" + get-tsconfig "^4.7.0" + globals "^13.24.0" + ignore "^5.2.4" + is-builtin-module "^3.2.1" + is-core-module "^2.12.1" + minimatch "^3.1.2" + resolve "^1.22.2" + semver "^7.5.3" + +eslint-plugin-no-only-tests@^3.1.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-no-only-tests/-/eslint-plugin-no-only-tests-3.3.0.tgz#d9d42ccd4b5d099b4872fb5046cf95441188cfb5" + integrity sha512-brcKcxGnISN2CcVhXJ/kEQlNa0MEfGRtwKtWA16SkqXHKitaKIMrfemJKLKX1YqDU5C/5JY3PvZXd5jEW04e0Q== + +eslint-plugin-perfectionist@^2.5.0: + version "2.11.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-perfectionist/-/eslint-plugin-perfectionist-2.11.0.tgz#d5cc32e0d12b649357ca5b104a105793956759ba" + integrity sha512-XrtBtiu5rbQv88gl+1e2RQud9te9luYNvKIgM9emttQ2zutHPzY/AQUucwxscDKV4qlTkvLTxjOFvxqeDpPorw== dependencies: - eslint-utils "^3.0.0" - ramda "^0.27.1" + "@typescript-eslint/utils" "^6.13.0 || ^7.0.0" + minimatch "^9.0.3" + natural-compare-lite "^1.4.0" -eslint-plugin-react-hooks@4.3.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.3.0.tgz#318dbf312e06fab1c835a4abef00121751ac1172" - integrity sha512-XslZy0LnMn+84NEG9jSGR6eGqaZB3133L8xewQo3fQagbQuGt7a63gf+P1NGKZavEYEC3UXaWEAA/AqDkuN6xA== +eslint-plugin-react-hooks@4.6.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.6.0.tgz#4c3e697ad95b77e93f8646aaa1630c1ba607edd3" + integrity sha512-oFc7Itz9Qxh2x4gNHStv3BqJq54ExXmfC+a1NjAta66IAN87Wu0R/QArgIS9qKzX3dXKPI9H5crl9QchNMY9+g== -eslint-plugin-react@7.21.5: - version "7.21.5" - resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.21.5.tgz#50b21a412b9574bfe05b21db176e8b7b3b15bff3" - integrity sha512-8MaEggC2et0wSF6bUeywF7qQ46ER81irOdWS4QWxnnlAEsnzeBevk1sWh7fhpCghPpXb+8Ks7hvaft6L/xsR6g== +eslint-plugin-react@7.33.2: + version "7.33.2" + resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.33.2.tgz#69ee09443ffc583927eafe86ffebb470ee737608" + integrity sha512-73QQMKALArI8/7xGLNI/3LylrEYrlKZSb5C9+q3OtOewTnMQi5cT+aE9E41sLCmli3I9PGGmD1yiZydyo4FEPw== dependencies: - array-includes "^3.1.1" - array.prototype.flatmap "^1.2.3" - doctrine "^2.1.0" - has "^1.0.3" - jsx-ast-utils "^2.4.1 || ^3.0.0" - object.entries "^1.1.2" - object.fromentries "^2.0.2" - object.values "^1.1.1" - prop-types "^15.7.2" - resolve "^1.18.1" - string.prototype.matchall "^4.0.2" - -eslint-plugin-react@7.29.3: - version "7.29.3" - resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.29.3.tgz#f4eab757f2756d25d6d4c2a58a9e20b004791f05" - integrity sha512-MzW6TuCnDOcta67CkpDyRfRsEVx9FNMDV8wZsDqe1luHPdGTrQIUaUXD27Ja3gHsdOIs/cXzNchWGlqm+qRVRg== - dependencies: - array-includes "^3.1.4" - array.prototype.flatmap "^1.2.5" + array-includes "^3.1.6" + array.prototype.flatmap "^1.3.1" + array.prototype.tosorted "^1.1.1" doctrine "^2.1.0" + es-iterator-helpers "^1.0.12" estraverse "^5.3.0" jsx-ast-utils "^2.4.1 || ^3.0.0" minimatch "^3.1.2" - object.entries "^1.1.5" - object.fromentries "^2.0.5" - object.hasown "^1.1.0" - object.values "^1.1.5" + object.entries "^1.1.6" + object.fromentries "^2.0.6" + object.hasown "^1.1.2" + object.values "^1.1.6" prop-types "^15.8.1" - resolve "^2.0.0-next.3" - semver "^6.3.0" - string.prototype.matchall "^4.0.6" + resolve "^2.0.0-next.4" + semver "^6.3.1" + string.prototype.matchall "^4.0.8" + +eslint-plugin-style@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-style/-/eslint-plugin-style-0.2.0.tgz#3184f16accba0b471319d90d32a75f602405ed5f" + integrity sha512-jzNVY7r/f+Q6cogzHCoiO3PQVfj+7X5uNOWC/knVq2HCSTgVEYnhjsmWVwc/vidMysj+WE+j4VjAdLsnWFBmIQ== + dependencies: + builtin-modules "3.2.0" + tslib "2.3.1" + +eslint-plugin-toml@^0.9.2: + version "0.9.2" + resolved "https://registry.yarnpkg.com/eslint-plugin-toml/-/eslint-plugin-toml-0.9.2.tgz#f9489500bb6070115b75098caa08316cc53a97c4" + integrity sha512-ri0xf63PYf3pIq/WY9BIwrqxZmGTIwSkAO0bHddI0ajUwN4KGz6W8vOvdXFHOpRdRfzxlmXze/vfsY/aTEXESg== + dependencies: + debug "^4.1.1" + eslint-compat-utils "^0.4.0" + lodash "^4.17.19" + toml-eslint-parser "^0.9.0" -eslint-plugin-tsdoc@^0.2.14, eslint-plugin-tsdoc@^0.2.7: +eslint-plugin-tsdoc@^0.2.17: version "0.2.17" resolved "https://registry.yarnpkg.com/eslint-plugin-tsdoc/-/eslint-plugin-tsdoc-0.2.17.tgz#27789495bbd8778abbf92db1707fec2ed3dfe281" integrity sha512-xRmVi7Zx44lOBuYqG8vzTXuL6IdGOeF9nHX17bjJ8+VE6fsxpdGem0/SBTmAwgYMKYB1WBkqRJVQ+n8GK041pA== @@ -3392,59 +3775,79 @@ eslint-plugin-tsdoc@^0.2.14, eslint-plugin-tsdoc@^0.2.7: "@microsoft/tsdoc" "0.14.2" "@microsoft/tsdoc-config" "0.16.2" -eslint-plugin-unicorn@23.0.0: - version "23.0.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-unicorn/-/eslint-plugin-unicorn-23.0.0.tgz#b2820212874735f9d91ecc8678b263ecfa6cf5f6" - integrity sha512-Vabo3cjl6cjyhcf+76CdQEY6suOFzK0Xh3xo0uL9VDYrDJP5+B6PjV0tHTYm82WZmFWniugFJM3ywHSNYTi/ZQ== +eslint-plugin-unicorn@^50.0.1: + version "50.0.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-unicorn/-/eslint-plugin-unicorn-50.0.1.tgz#e539cdb02dfd893c603536264c4ed9505b70e3bf" + integrity sha512-KxenCZxqSYW0GWHH18okDlOQcpezcitm5aOSz6EnobyJ6BIByiPDviQRjJIUAjG/tMN11958MxaQ+qCoU6lfDA== dependencies: - ci-info "^2.0.0" + "@babel/helper-validator-identifier" "^7.22.20" + "@eslint-community/eslint-utils" "^4.4.0" + "@eslint/eslintrc" "^2.1.4" + ci-info "^4.0.0" clean-regexp "^1.0.0" - eslint-ast-utils "^1.1.0" - eslint-template-visitor "^2.2.1" - eslint-utils "^2.1.0" - import-modules "^2.0.0" - lodash "^4.17.20" - pluralize "^8.0.0" - read-pkg-up "^7.0.1" - regexp-tree "^0.1.21" - reserved-words "^0.1.2" - safe-regex "^2.1.1" - semver "^7.3.2" - -eslint-plugin-unicorn@37.0.1: - version "37.0.1" - resolved "https://registry.yarnpkg.com/eslint-plugin-unicorn/-/eslint-plugin-unicorn-37.0.1.tgz#a2292dc302ffc0be1791e6ebbb4ae93242833f11" - integrity sha512-E1jq5u9ojnadisJcPi+hMXTGSiIzkIUMDvWsBudsCGXvKUB2aNSU2TcfyW2/jAS5A4ryBXfzxLykMxX1EdluSQ== - dependencies: - "@babel/helper-validator-identifier" "^7.14.9" - ci-info "^3.2.0" - clean-regexp "^1.0.0" - eslint-template-visitor "^2.3.2" - eslint-utils "^3.0.0" - esquery "^1.4.0" - indent-string "4" - is-builtin-module "^3.1.0" - lodash "^4.17.21" + core-js-compat "^3.34.0" + esquery "^1.5.0" + indent-string "^4.0.0" + is-builtin-module "^3.2.1" + jsesc "^3.0.2" pluralize "^8.0.0" read-pkg-up "^7.0.1" - regexp-tree "^0.1.23" - safe-regex "^2.1.1" - semver "^7.3.5" + regexp-tree "^0.1.27" + regjsparser "^0.10.0" + semver "^7.5.4" strip-indent "^3.0.0" -eslint-plugin-unused-imports@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-unused-imports/-/eslint-plugin-unused-imports-2.0.0.tgz#d8db8c4d0cfa0637a8b51ce3fd7d1b6bc3f08520" - integrity sha512-3APeS/tQlTrFa167ThtP0Zm0vctjr4M44HMpeg1P4bK6wItarumq0Ma82xorMKdFsWpphQBlRPzw/pxiVELX1A== +eslint-plugin-unused-imports@^3.0.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-unused-imports/-/eslint-plugin-unused-imports-3.2.0.tgz#63a98c9ad5f622cd9f830f70bc77739f25ccfe0d" + integrity sha512-6uXyn6xdINEpxE1MtDjxQsyXB37lfyO2yKGVVgtD7WEWQGORSOZjgrD6hBhvGv4/SO+TOlS+UnC6JppRqbuwGQ== dependencies: eslint-rule-composer "^0.3.0" +eslint-plugin-vitest@^0.3.21: + version "0.3.26" + resolved "https://registry.yarnpkg.com/eslint-plugin-vitest/-/eslint-plugin-vitest-0.3.26.tgz#0906893c1f8f7094614fc6ff255c0a369cfbf427" + integrity sha512-oxe5JSPgRjco8caVLTh7Ti8PxpwJdhSV0hTQAmkFcNcmy/9DnqLB/oNVRA11RmVRP//2+jIIT6JuBEcpW3obYg== + dependencies: + "@typescript-eslint/utils" "^7.1.1" + +eslint-plugin-vue@^9.21.1: + version "9.33.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-vue/-/eslint-plugin-vue-9.33.0.tgz#de33eba8f78e1d172c59c8ec7fbfd60c6ca35c39" + integrity sha512-174lJKuNsuDIlLpjeXc5E2Tss8P44uIimAfGD0b90k0NoirJqpG7stLuU9Vp/9ioTOrQdWVREc4mRd1BD+CvGw== + dependencies: + "@eslint-community/eslint-utils" "^4.4.0" + globals "^13.24.0" + natural-compare "^1.4.0" + nth-check "^2.1.1" + postcss-selector-parser "^6.0.15" + semver "^7.6.3" + vue-eslint-parser "^9.4.3" + xml-name-validator "^4.0.0" + +eslint-plugin-yml@^1.12.2: + version "1.19.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-yml/-/eslint-plugin-yml-1.19.1.tgz#38e26aab9693657fc33625198db08ea383615e04" + integrity sha512-bYkOxyEiXh9WxUhVYPELdSHxGG5pOjCSeJOVkfdIyj6tuiHDxrES2WAW1dBxn3iaZQey57XflwLtCYRcNPOiOg== + dependencies: + debug "^4.3.2" + diff-sequences "^27.5.1" + escape-string-regexp "4.0.0" + eslint-compat-utils "^0.6.0" + natural-compare "^1.4.0" + yaml-eslint-parser "^1.2.1" + +eslint-processor-vue-blocks@^0.1.1: + version "0.1.2" + resolved "https://registry.yarnpkg.com/eslint-processor-vue-blocks/-/eslint-processor-vue-blocks-0.1.2.tgz#d472e0a5efe15e9eab5c3f2e2518c9a121097805" + integrity sha512-PfpJ4uKHnqeL/fXUnzYkOax3aIenlwewXRX8jFinA1a2yCFnLgMuiH3xvCgvHHUlV2xJWQHbCTdiJWGwb3NqpQ== + eslint-rule-composer@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/eslint-rule-composer/-/eslint-rule-composer-0.3.0.tgz#79320c927b0c5c0d3d3d2b76c8b4a488f25bbaf9" integrity sha512-bt+Sh8CtDmn2OajxvNO+BX7Wn4CIWMpTRm3MaiKPCQcnnlm0CS2mhui6QaoeQugs+3Kj2ESKEEGJUdVafwhiCg== -eslint-scope@5.1.1, eslint-scope@^5.0.0, eslint-scope@^5.1.1: +eslint-scope@5.1.1, eslint-scope@^5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c" integrity sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw== @@ -3452,113 +3855,91 @@ eslint-scope@5.1.1, eslint-scope@^5.0.0, eslint-scope@^5.1.1: esrecurse "^4.3.0" estraverse "^4.1.1" -eslint-template-visitor@^2.2.1, eslint-template-visitor@^2.3.2: - version "2.3.2" - resolved "https://registry.yarnpkg.com/eslint-template-visitor/-/eslint-template-visitor-2.3.2.tgz#b52f96ff311e773a345d79053ccc78275bbc463d" - integrity sha512-3ydhqFpuV7x1M9EK52BPNj6V0Kwu0KKkcIAfpUhwHbR8ocRln/oUHgfxQupY8O1h4Qv/POHDumb/BwwNfxbtnA== - dependencies: - "@babel/core" "^7.12.16" - "@babel/eslint-parser" "^7.12.16" - eslint-visitor-keys "^2.0.0" - esquery "^1.3.1" - multimap "^1.1.0" - -eslint-utils@^2.0.0, eslint-utils@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-2.1.0.tgz#d2de5e03424e707dc10c74068ddedae708741b27" - integrity sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg== - dependencies: - eslint-visitor-keys "^1.1.0" - -eslint-utils@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-3.0.0.tgz#8aebaface7345bb33559db0a1f13a1d2d48c3672" - integrity sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA== +eslint-scope@^7.1.1, eslint-scope@^7.2.2: + version "7.2.2" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-7.2.2.tgz#deb4f92563390f32006894af62a22dba1c46423f" + integrity sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg== dependencies: - eslint-visitor-keys "^2.0.0" - -eslint-visitor-keys@^1.1.0, eslint-visitor-keys@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz#30ebd1ef7c2fdff01c3a4f151044af25fab0523e" - integrity sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ== - -eslint-visitor-keys@^2.0.0, eslint-visitor-keys@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz#f65328259305927392c938ed44eb0a5c9b2bd303" - integrity sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw== + esrecurse "^4.3.0" + estraverse "^5.2.0" -eslint-visitor-keys@^3.3.0, eslint-visitor-keys@^3.4.3: +eslint-visitor-keys@^3.0.0, eslint-visitor-keys@^3.3.0, eslint-visitor-keys@^3.4.1, eslint-visitor-keys@^3.4.3: version "3.4.3" resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz#0cd72fe8550e3c2eae156a96a4dddcd1c8ac5800" integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag== -eslint@^7.12.1: - version "7.32.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.32.0.tgz#c6d328a14be3fb08c8d1d21e12c02fdb7a2a812d" - integrity sha512-VHZ8gX+EDfz+97jGcgyGCyRia/dPOd6Xh9yPv8Bl1+SoaIwD+a/vlrOmGRUyOYu7MwUhc7CxqeaDZU13S4+EpA== +eslint-visitor-keys@^4.2.1: + version "4.2.1" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz#4cfea60fe7dd0ad8e816e1ed026c1d5251b512c1" + integrity sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ== + +eslint@^8.57.0: + version "8.57.1" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.57.1.tgz#7df109654aba7e3bbe5c8eae533c5e461d3c6ca9" + integrity sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA== dependencies: - "@babel/code-frame" "7.12.11" - "@eslint/eslintrc" "^0.4.3" - "@humanwhocodes/config-array" "^0.5.0" - ajv "^6.10.0" + "@eslint-community/eslint-utils" "^4.2.0" + "@eslint-community/regexpp" "^4.6.1" + "@eslint/eslintrc" "^2.1.4" + "@eslint/js" "8.57.1" + "@humanwhocodes/config-array" "^0.13.0" + "@humanwhocodes/module-importer" "^1.0.1" + "@nodelib/fs.walk" "^1.2.8" + "@ungap/structured-clone" "^1.2.0" + ajv "^6.12.4" chalk "^4.0.0" cross-spawn "^7.0.2" - debug "^4.0.1" + debug "^4.3.2" doctrine "^3.0.0" - enquirer "^2.3.5" escape-string-regexp "^4.0.0" - eslint-scope "^5.1.1" - eslint-utils "^2.1.0" - eslint-visitor-keys "^2.0.0" - espree "^7.3.1" - esquery "^1.4.0" + eslint-scope "^7.2.2" + eslint-visitor-keys "^3.4.3" + espree "^9.6.1" + esquery "^1.4.2" esutils "^2.0.2" fast-deep-equal "^3.1.3" file-entry-cache "^6.0.1" - functional-red-black-tree "^1.0.1" - glob-parent "^5.1.2" - globals "^13.6.0" - ignore "^4.0.6" - import-fresh "^3.0.0" + find-up "^5.0.0" + glob-parent "^6.0.2" + globals "^13.19.0" + graphemer "^1.4.0" + ignore "^5.2.0" imurmurhash "^0.1.4" is-glob "^4.0.0" - js-yaml "^3.13.1" + is-path-inside "^3.0.3" + js-yaml "^4.1.0" json-stable-stringify-without-jsonify "^1.0.1" levn "^0.4.1" lodash.merge "^4.6.2" - minimatch "^3.0.4" + minimatch "^3.1.2" natural-compare "^1.4.0" - optionator "^0.9.1" - progress "^2.0.0" - regexpp "^3.1.0" - semver "^7.2.1" - strip-ansi "^6.0.0" - strip-json-comments "^3.1.0" - table "^6.0.9" + optionator "^0.9.3" + strip-ansi "^6.0.1" text-table "^0.2.0" - v8-compile-cache "^2.0.3" -espree@^7.3.0, espree@^7.3.1: - version "7.3.1" - resolved "https://registry.yarnpkg.com/espree/-/espree-7.3.1.tgz#f2df330b752c6f55019f8bd89b7660039c1bbbb6" - integrity sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g== +espree@^10.1.0, "espree@^9.6.1 || ^10.3.0": + version "10.4.0" + resolved "https://registry.yarnpkg.com/espree/-/espree-10.4.0.tgz#d54f4949d4629005a1fa168d937c3ff1f7e2a837" + integrity sha512-j6PAQ2uUr79PZhBjP5C5fhl8e39FmRnOjsD5lGnWrFU8i2G776tBK7+nP8KuQUTTyAZUwfQqXAgrVH5MbH9CYQ== + dependencies: + acorn "^8.15.0" + acorn-jsx "^5.3.2" + eslint-visitor-keys "^4.2.1" + +espree@^9.0.0, espree@^9.3.1, espree@^9.6.0, espree@^9.6.1: + version "9.6.1" + resolved "https://registry.yarnpkg.com/espree/-/espree-9.6.1.tgz#a2a17b8e434690a5432f2f8018ce71d331a48c6f" + integrity sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ== dependencies: - acorn "^7.4.0" - acorn-jsx "^5.3.1" - eslint-visitor-keys "^1.3.0" + acorn "^8.9.0" + acorn-jsx "^5.3.2" + eslint-visitor-keys "^3.4.1" esprima@^4.0.0: version "4.0.1" resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== -esquery@^1.3.1: - version "1.7.0" - resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.7.0.tgz#08d048f261f0ddedb5bae95f46809463d9c9496d" - integrity sha512-Ap6G0WQwcU/LHsvLwON1fAQX9Zp0A2Y6Y/cJBl9r/JbW90Zyg4/zbG6zzKa2OTALELarYHmKu0GhpM5EO+7T0g== - dependencies: - estraverse "^5.1.0" - esquery@^1.4.0: version "1.6.0" resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.6.0.tgz#91419234f804d852a82dceec3e16cdc22cf9dae7" @@ -3566,6 +3947,13 @@ esquery@^1.4.0: dependencies: estraverse "^5.1.0" +esquery@^1.4.2, esquery@^1.5.0, esquery@^1.6.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.7.0.tgz#08d048f261f0ddedb5bae95f46809463d9c9496d" + integrity sha512-Ap6G0WQwcU/LHsvLwON1fAQX9Zp0A2Y6Y/cJBl9r/JbW90Zyg4/zbG6zzKa2OTALELarYHmKu0GhpM5EO+7T0g== + dependencies: + estraverse "^5.1.0" + esrecurse@^4.3.0: version "4.3.0" resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.3.0.tgz#7ad7964d679abb28bee72cec63758b1c5d2c9921" @@ -3698,6 +4086,11 @@ fb-watchman@^2.0.2: dependencies: bser "2.1.1" +fdir@^6.5.0: + version "6.5.0" + resolved "https://registry.yarnpkg.com/fdir/-/fdir-6.5.0.tgz#ed2ab967a331ade62f18d077dae192684d50d350" + integrity sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg== + fecha@^4.2.0: version "4.2.3" resolved "https://registry.yarnpkg.com/fecha/-/fecha-4.2.3.tgz#4d9ccdbc61e8629b259fdca67e65891448d569fd" @@ -3717,6 +4110,11 @@ fill-range@^7.1.1: dependencies: to-regex-range "^5.0.1" +find-up-simple@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/find-up-simple/-/find-up-simple-1.0.1.tgz#18fb90ad49e45252c4d7fca56baade04fa3fca1e" + integrity sha512-afd4O7zpqHeRyg4PfDQsXmlDe2PfdHtJt6Akt8jOWaApLOZk5JXs6VMR29lz03pRe9mpykrRCYIYxaJYcfpncQ== + find-up@^4.0.0, find-up@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" @@ -3799,11 +4197,6 @@ function.prototype.name@^1.1.6, function.prototype.name@^1.1.8: hasown "^2.0.2" is-callable "^1.2.7" -functional-red-black-tree@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327" - integrity sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g== - functions-have-names@^1.2.3: version "1.2.3" resolved "https://registry.yarnpkg.com/functions-have-names/-/functions-have-names-1.2.3.tgz#0404fe4ee2ba2f607f0e0ec3c80bae994133b834" @@ -3855,7 +4248,7 @@ get-pkg-repo@^4.0.0: through2 "^2.0.0" yargs "^16.2.0" -get-proto@^1.0.1: +get-proto@^1.0.0, get-proto@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/get-proto/-/get-proto-1.0.1.tgz#150b3f2743869ef3e851ec0c49d15b1d14d00ee1" integrity sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g== @@ -3877,6 +4270,13 @@ get-symbol-description@^1.1.0: es-errors "^1.3.0" get-intrinsic "^1.2.6" +get-tsconfig@^4.10.0, get-tsconfig@^4.7.0, get-tsconfig@^4.7.2: + version "4.13.7" + resolved "https://registry.yarnpkg.com/get-tsconfig/-/get-tsconfig-4.13.7.tgz#b9d8b199b06033ceeea1a93df7ea5765415089bc" + integrity sha512-7tN6rFgBlMgpBML5j8typ92BKFi2sFQvIdpAqLA2beia5avZDrMs0FLZiM5etShWq5irVyGcGMEA1jcDaK7A/Q== + dependencies: + resolve-pkg-maps "^1.0.0" + git-raw-commits@^2.0.0: version "2.0.11" resolved "https://registry.yarnpkg.com/git-raw-commits/-/git-raw-commits-2.0.11.tgz#bc3576638071d18655e1cc60d7f524920008d723" @@ -3903,6 +4303,13 @@ glob-parent@^5.1.2: dependencies: is-glob "^4.0.1" +glob-parent@^6.0.2: + version "6.0.2" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-6.0.2.tgz#6d237d99083950c79290f24c7642a3de9a28f9e3" + integrity sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A== + dependencies: + is-glob "^4.0.3" + glob-to-regexp@^0.4.1: version "0.4.1" resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz#c75297087c851b9a578bd217dd59a92f59fe546e" @@ -3920,7 +4327,7 @@ glob@^10.5.0: package-json-from-dist "^1.0.0" path-scurry "^1.11.1" -glob@^7.1.1, glob@^7.1.3, glob@^7.1.4, glob@^7.2.0: +glob@^7.1.1, glob@^7.1.3, glob@^7.1.4: version "7.2.3" resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== @@ -3932,7 +4339,7 @@ glob@^7.1.1, glob@^7.1.3, glob@^7.1.4, glob@^7.2.0: once "^1.3.0" path-is-absolute "^1.0.0" -globals@^13.6.0, globals@^13.9.0: +globals@^13.19.0, globals@^13.24.0: version "13.24.0" resolved "https://registry.yarnpkg.com/globals/-/globals-13.24.0.tgz#8432a19d78ce0c1e833949c36adb345400bb1171" integrity sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ== @@ -3947,7 +4354,7 @@ globalthis@^1.0.4: define-properties "^1.2.1" gopd "^1.0.1" -globby@^11.0.1, globby@^11.1.0: +globby@^11.1.0: version "11.1.0" resolved "https://registry.yarnpkg.com/globby/-/globby-11.1.0.tgz#bd4be98bb042f83d796f7e3811991fbe82a0d34b" integrity sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g== @@ -4032,11 +4439,6 @@ has-tostringtag@^1.0.2: dependencies: has-symbols "^1.0.3" -has@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/has/-/has-1.0.4.tgz#2eb2860e000011dae4f1406a86fe80e530fb2ec6" - integrity sha512-qdSAmqLF6209RFj4VVItywPMbm3vWylknmB3nvNiUIs72xAimcM8nVYxYr7ncvZq5qzk9MKIZR8ijqD/1QuYjQ== - hash-base@^3.0.0, hash-base@^3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-3.1.2.tgz#79d72def7611c3f6e3c3b5730652638001b10a74" @@ -4063,7 +4465,7 @@ hash.js@^1.0.0, hash.js@^1.0.3: inherits "^2.0.3" minimalistic-assert "^1.0.1" -hasown@^2.0.2: +hasown@^2.0.0, hasown@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/hasown/-/hasown-2.0.2.tgz#003eaf91be7adc372e84ec59dc37252cedb80003" integrity sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ== @@ -4152,12 +4554,7 @@ ieee754@^1.1.13, ieee754@^1.2.1: resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== -ignore@^4.0.6: - version "4.0.6" - resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc" - integrity sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg== - -ignore@^5.0.5, ignore@^5.2.0: +ignore@^5.0.5, ignore@^5.2.0, ignore@^5.2.4: version "5.3.2" resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.2.tgz#3cd40e729f3643fd87cb04e50bf0eb722bc596f5" integrity sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g== @@ -4167,7 +4564,7 @@ immutable@^5.1.3: resolved "https://registry.yarnpkg.com/immutable/-/immutable-5.1.4.tgz#e3f8c1fe7b567d56cf26698f31918c241dae8c1f" integrity sha512-p6u1bG3YSnINT5RQmx/yRZBpenIl30kVxkTLDyHLIMk0gict704Q9n+thfDI7lTRm9vXdDYutVzXhzcThxTnXA== -import-fresh@^3.0.0, import-fresh@^3.2.1: +import-fresh@^3.2.1: version "3.3.1" resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.1.tgz#9cecb56503c0ada1f2741dbbd6546e4b13b57ccf" integrity sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ== @@ -4183,17 +4580,12 @@ import-local@^3.0.2, import-local@^3.2.0: pkg-dir "^4.2.0" resolve-cwd "^3.0.0" -import-modules@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/import-modules/-/import-modules-2.1.0.tgz#abe7df297cb6c1f19b57246eb8b8bd9664b6d8c2" - integrity sha512-8HEWcnkbGpovH9yInoisxaSoIg9Brbul+Ju3Kqe2UsYDUBJD/iQjSgEj0zPcTDPKfPp2fs5xlv1i+JSye/m1/A== - imurmurhash@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" integrity sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA== -indent-string@4, indent-string@^4.0.0: +indent-string@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-4.0.0.tgz#624f8f4497d619b2d9768531d58f4122854d7251" integrity sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg== @@ -4225,6 +4617,19 @@ interpret@^3.1.1: resolved "https://registry.yarnpkg.com/interpret/-/interpret-3.1.1.tgz#5be0ceed67ca79c6c4bc5cf0d7ee843dcea110c4" integrity sha512-6xwYfHbajpoF0xLW+iwLkhwgvLoZDfjYfoFNu8ftMoXINzwuymNLd9u/KmwtdT2GbR+/Cz66otEGEVVUHX9QLQ== +is-alphabetical@^1.0.0: + version "1.0.4" + resolved "https://registry.yarnpkg.com/is-alphabetical/-/is-alphabetical-1.0.4.tgz#9e7d6b94916be22153745d184c298cbf986a686d" + integrity sha512-DwzsA04LQ10FHTZuL0/grVDk4rFoVH1pjAToYwBrHSxcrBIGQuXrQMtD5U1b0U2XVgKZCTLLP8u2Qxqhy3l2Vg== + +is-alphanumerical@^1.0.0: + version "1.0.4" + resolved "https://registry.yarnpkg.com/is-alphanumerical/-/is-alphanumerical-1.0.4.tgz#7eb9a2431f855f6b1ef1a78e326df515696c4dbf" + integrity sha512-UzoZUr+XfVz3t3v4KyGEniVL9BDRoQtY7tOyrRybkVNjDFWyo1yhXNGrrBTQxp3ib9BLAWs7k2YKBQsFRkZG9A== + dependencies: + is-alphabetical "^1.0.0" + is-decimal "^1.0.0" + is-arguments@^1.0.4: version "1.2.0" resolved "https://registry.yarnpkg.com/is-arguments/-/is-arguments-1.2.0.tgz#ad58c6aecf563b78ef2bf04df540da8f5d7d8e1b" @@ -4273,19 +4678,26 @@ is-boolean-object@^1.2.1: call-bound "^1.0.3" has-tostringtag "^1.0.2" -is-builtin-module@^3.1.0: +is-builtin-module@^3.2.1: version "3.2.1" resolved "https://registry.yarnpkg.com/is-builtin-module/-/is-builtin-module-3.2.1.tgz#f03271717d8654cfcaf07ab0463faa3571581169" integrity sha512-BSLE3HnV2syZ0FK0iMA/yUGplUeMmNz4AW5fnTunbCIqZi4vG3WjJT9FHMy5D69xmAYBHXQhJdALdpwVxV501A== dependencies: builtin-modules "^3.3.0" +is-bun-module@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-bun-module/-/is-bun-module-2.0.0.tgz#4d7859a87c0fcac950c95e666730e745eae8bddd" + integrity sha512-gNCGbnnnnFAUGKeZ9PdbyeGYJqewpmc2aKHUEMO5nQPWU9lOmv7jcmQIv+qHD8fXW6W7qfuCwX4rY9LNRjXrkQ== + dependencies: + semver "^7.7.1" + is-callable@^1.2.7: version "1.2.7" resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.7.tgz#3bc2a85ea742d9e36205dcacdd72ca1fdc51b055" integrity sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA== -is-core-module@^2.1.0, is-core-module@^2.13.0, is-core-module@^2.16.1, is-core-module@^2.5.0, is-core-module@^2.8.0: +is-core-module@^2.1.0, is-core-module@^2.12.1, is-core-module@^2.13.0, is-core-module@^2.13.1, is-core-module@^2.16.1, is-core-module@^2.5.0: version "2.16.1" resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.16.1.tgz#2a98801a849f43e2add644fbb6bc6229b19a4ef4" integrity sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w== @@ -4309,6 +4721,11 @@ is-date-object@^1.0.5, is-date-object@^1.1.0: call-bound "^1.0.2" has-tostringtag "^1.0.2" +is-decimal@^1.0.0: + version "1.0.4" + resolved "https://registry.yarnpkg.com/is-decimal/-/is-decimal-1.0.4.tgz#65a3a5958a1c5b63a706e1b333d7cd9f630d3fa5" + integrity sha512-RGdriMmQQvZ2aqaQq3awNA6dCGtKpiDFcOzrTWrDAT2MiWrKQVPmxLGHl7Y2nNu6led0kEyoX0enY0qXYsv9zw== + is-extglob@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" @@ -4349,6 +4766,11 @@ is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3: dependencies: is-extglob "^2.1.1" +is-hexadecimal@^1.0.0: + version "1.0.4" + resolved "https://registry.yarnpkg.com/is-hexadecimal/-/is-hexadecimal-1.0.4.tgz#cc35c97588da4bd49a8eedd6bc4082d44dcb23a7" + integrity sha512-gyPJuv83bHMpocVYoqof5VDiZveEoGoFL8m3BXNb2VW8Xs+rz9kqO8LOQ5DH6EsuvilT1ApazU0pyl+ytbPtlw== + is-map@^2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/is-map/-/is-map-2.0.3.tgz#ede96b7fe1e270b3c4465e3a465658764926d62e" @@ -4380,6 +4802,11 @@ is-number@^7.0.0: resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== +is-path-inside@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-3.0.3.tgz#d231362e53a07ff2b0e0ea7fed049161ffd16283" + integrity sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ== + is-plain-obj@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e" @@ -4535,6 +4962,18 @@ istanbul-reports@^3.1.3: html-escaper "^2.0.0" istanbul-lib-report "^3.0.0" +iterator.prototype@^1.1.5: + version "1.1.5" + resolved "https://registry.yarnpkg.com/iterator.prototype/-/iterator.prototype-1.1.5.tgz#12c959a29de32de0aa3bbbb801f4d777066dae39" + integrity sha512-H0dkQoCa3b2VEeKQBOxFph+JAbcrQdE7KC0UkqwpLmv2EC4P41QXP+rqo9wYodACiG5/WM5s9oDApTU8utwj9g== + dependencies: + define-data-property "^1.1.4" + es-object-atoms "^1.0.0" + get-intrinsic "^1.2.6" + get-proto "^1.0.0" + has-symbols "^1.1.0" + set-function-name "^2.0.2" + jackspeak@^3.1.2: version "3.4.3" resolved "https://registry.yarnpkg.com/jackspeak/-/jackspeak-3.4.3.tgz#8833a9d89ab4acde6188942bd1c53b6390ed5a8a" @@ -4935,11 +5374,28 @@ js-yaml@^3.13.1: argparse "^1.0.7" esprima "^4.0.0" +js-yaml@^4.1.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.1.tgz#854c292467705b699476e1a2decc0c8a3458806b" + integrity sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA== + dependencies: + argparse "^2.0.1" + +jsdoc-type-pratt-parser@~4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/jsdoc-type-pratt-parser/-/jsdoc-type-pratt-parser-4.0.0.tgz#136f0571a99c184d84ec84662c45c29ceff71114" + integrity sha512-YtOli5Cmzy3q4dP26GraSOeAhqecewG04hoO8DY56CH4KJ9Fvv5qKWUCCo3HZob7esJQHCv6/+bnTy72xZZaVQ== + jsesc@^3.0.2: version "3.1.0" resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-3.1.0.tgz#74d335a234f67ed19907fdadfac7ccf9d409825d" integrity sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA== +jsesc@~0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d" + integrity sha512-uZz5UnB7u4T9LvwmFqXii7pZSouaRPorGs5who1Ip7VO0wxanFvBL7GkM6dTHlgX+jhBApRetaWpnDabOeTcnA== + jshint@^2.1.10: version "2.13.6" resolved "https://registry.yarnpkg.com/jshint/-/jshint-2.13.6.tgz#3679a2687a3066fa9034ef85d8c305613a31eec6" @@ -4990,6 +5446,16 @@ json5@^2.2.3: resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283" integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg== +jsonc-eslint-parser@^2.4.0: + version "2.4.2" + resolved "https://registry.yarnpkg.com/jsonc-eslint-parser/-/jsonc-eslint-parser-2.4.2.tgz#f135454fd35784ecc1b848908f0d3e98a5be9433" + integrity sha512-1e4qoRgnn448pRuMvKGsFFymUCquZV0mpGgOyIKNgD3JVDTsVJyRBGH/Fm0tBb8WsWGgmB1mDe6/yJMQM37DUA== + dependencies: + acorn "^8.5.0" + eslint-visitor-keys "^3.0.0" + espree "^9.0.0" + semver "^7.3.5" + jsonld-context-parser@^2.2.2: version "2.4.0" resolved "https://registry.yarnpkg.com/jsonld-context-parser/-/jsonld-context-parser-2.4.0.tgz#fae15a56c5ceabd1c4520ab1a9cc12c9a0a8b67d" @@ -5058,6 +5524,11 @@ kind-of@^6.0.2, kind-of@^6.0.3: resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw== +kleur@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/kleur/-/kleur-3.0.3.tgz#a79c9ecc86ee1ce3fa6206d1216c501f147fc07e" + integrity sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w== + kuler@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/kuler/-/kuler-2.0.0.tgz#e2c570a3800388fb44407e851531c1d670b061b3" @@ -5086,6 +5557,14 @@ loader-runner@^4.3.1: resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-4.3.1.tgz#6c76ed29b0ccce9af379208299f07f876de737e3" integrity sha512-IWqP2SCPhyVFTBtRcgMHdzlf9ul25NwaFx4wCEH/KjAXuuHY4yNjvPXsBokp8jCB936PyWRaPKUNh8NvylLp2Q== +local-pkg@^0.5.0: + version "0.5.1" + resolved "https://registry.yarnpkg.com/local-pkg/-/local-pkg-0.5.1.tgz#69658638d2a95287534d4c2fff757980100dbb6d" + integrity sha512-9rrA30MRRP3gBD3HTGnC6cDFpaE1kVDWxWgqWJUN0RvDNAo+Nz/9GxB+nHOH0ifbVFy0hSA1V6vFDvnx54lTEQ== + dependencies: + mlly "^1.7.3" + pkg-types "^1.2.1" + locate-path@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-5.0.0.tgz#1afba396afd676a6d42504d0a67a3a7eb9f62aa0" @@ -5105,11 +5584,6 @@ lodash-es@4.17.23: resolved "https://registry.yarnpkg.com/lodash-es/-/lodash-es-4.17.23.tgz#58c4360fd1b5d33afc6c0bbd3d1149349b1138e0" integrity sha512-kVI48u3PZr38HdYz98UmfPnXl2DXrpdctLrFLCd3kOx1xUkOmpFPx7gCWWM5MPkL/fD8zb+Ph0QzjGFs4+hHWg== -lodash.get@^4.4.2: - version "4.4.2" - resolved "https://registry.yarnpkg.com/lodash.get/-/lodash.get-4.4.2.tgz#2d177f652fa31e939b4438d5341499dfa3825e99" - integrity sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ== - lodash.memoize@^4.1.2: version "4.1.2" resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe" @@ -5120,22 +5594,12 @@ lodash.merge@^4.6.2: resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== -lodash.truncate@^4.4.2: - version "4.4.2" - resolved "https://registry.yarnpkg.com/lodash.truncate/-/lodash.truncate-4.4.2.tgz#5a350da0b1113b837ecfffd5812cbe58d6eae193" - integrity sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw== - -lodash.zip@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/lodash.zip/-/lodash.zip-4.2.0.tgz#ec6662e4896408ed4ab6c542a3990b72cc080020" - integrity sha512-C7IOaBBK/0gMORRBd8OETNx3kmOkgIWIPvyDpZSCTwUrpYmgZwJkjZeOD8ww4xbOUOs4/attY+pciKvadNfFbg== - -lodash@4.17.21, lodash@^4.17.15, lodash@~4.17.21: +lodash@^4.17.15, lodash@~4.17.21: version "4.17.21" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== -lodash@^4.17.20, lodash@^4.17.21: +lodash@^4.17.19, lodash@^4.17.21: version "4.18.1" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.18.1.tgz#ff2b66c1f6326d59513de2407bf881439812771c" integrity sha512-dMInicTPVE8d1e5otfwmmjlxkZoUpiVLwyeTdUsi/Caj/gfzzblBcCE5sRHV/AsjuCmxWrte2TNGSYuCeCq+0Q== @@ -5245,6 +5709,22 @@ md5.js@^1.3.4: inherits "^2.0.1" safe-buffer "^5.1.2" +mdast-util-from-markdown@^0.8.5: + version "0.8.5" + resolved "https://registry.yarnpkg.com/mdast-util-from-markdown/-/mdast-util-from-markdown-0.8.5.tgz#d1ef2ca42bc377ecb0463a987910dae89bd9a28c" + integrity sha512-2hkTXtYYnr+NubD/g6KGBS/0mFmBcifAsI0yIWRiRo0PjVs6SSOSOdtzbp6kSGnShDN6G5aWZpKQ2lWRy27mWQ== + dependencies: + "@types/mdast" "^3.0.0" + mdast-util-to-string "^2.0.0" + micromark "~2.11.0" + parse-entities "^2.0.0" + unist-util-stringify-position "^2.0.0" + +mdast-util-to-string@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/mdast-util-to-string/-/mdast-util-to-string-2.0.0.tgz#b8cfe6a713e1091cb5b728fc48885a4767f8b97b" + integrity sha512-AW4DRS3QbBayY/jJmD8437V1Gombjf8RSOUCMFBuo5iHi58AGEgVCKQ+ezHkZZDpAQS75hcBMpLqjpJTjtUL7w== + meow@^8.0.0: version "8.1.2" resolved "https://registry.yarnpkg.com/meow/-/meow-8.1.2.tgz#bcbe45bda0ee1729d350c03cffc8395a36c4e897" @@ -5282,6 +5762,14 @@ microdata-rdf-streaming-parser@^3.0.0: readable-stream "^4.1.0" relative-to-absolute-iri "^1.0.2" +micromark@~2.11.0: + version "2.11.4" + resolved "https://registry.yarnpkg.com/micromark/-/micromark-2.11.4.tgz#d13436138eea826383e822449c9a5c50ee44665a" + integrity sha512-+WoovN/ppKolQOFIAajxi7Lu9kInbPxFuTBVEavFcL8eAfVstoc5MocPmqBeAdBOJV00uaVjegzH4+MA0DN/uA== + dependencies: + debug "^4.0.0" + parse-entities "^2.0.0" + micromatch@^4.0.0, micromatch@^4.0.8: version "4.0.8" resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.8.tgz#d66fa18f3a47076789320b9b1af32bd86d9fa202" @@ -5330,6 +5818,13 @@ minimalistic-crypto-utils@^1.0.1: resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" integrity sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg== +minimatch@9.0.3: + version "9.0.3" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.3.tgz#a6e00c3de44c3a542bfaae70abfc22420a6da825" + integrity sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg== + dependencies: + brace-expansion "^2.0.1" + minimatch@^3.0.4, minimatch@^3.1.1, minimatch@^3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" @@ -5337,7 +5832,14 @@ minimatch@^3.0.4, minimatch@^3.1.1, minimatch@^3.1.2: dependencies: brace-expansion "^1.1.7" -minimatch@^9.0.4: +minimatch@^3.0.5: + version "3.1.5" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.5.tgz#580c88f8d5445f2bd6aa8f3cadefa0de79fbd69e" + integrity sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w== + dependencies: + brace-expansion "^1.1.7" + +minimatch@^9.0.3, minimatch@^9.0.4: version "9.0.9" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.9.tgz#9b0cb9fcb78087f6fd7eababe2511c4d3d60574e" integrity sha512-OBwBN9AL4dqmETlpS2zasx+vTeWclWzkblfZk7KTA5j3jeOONz/tRCnZomUyvNg83wL5Zv9Ss6HMJXAgL8R2Yg== @@ -5370,21 +5872,21 @@ minimist@^1.2.0, minimist@^1.2.5, minimist@^1.2.6: resolved "https://registry.yarnpkg.com/minipass/-/minipass-7.1.3.tgz#79389b4eb1bb2d003a9bba87d492f2bd37bdc65b" integrity sha512-tEBHqDnIoM/1rXME1zgka9g6Q2lcoCkxHLuc7ODJ5BxbP5d4c2Z5cGgtXAku59200Cx7diuHTOYfSBD8n6mm8A== -ms@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" - integrity sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A== +mlly@^1.7.3, mlly@^1.7.4: + version "1.8.2" + resolved "https://registry.yarnpkg.com/mlly/-/mlly-1.8.2.tgz#e7f7919a82d13b174405613117249a3f449d78bb" + integrity sha512-d+ObxMQFmbt10sretNDytwt85VrbkhhUA/JBGm1MPaWJ65Cl4wOgLaB1NYvJSZ0Ef03MMEU/0xpPMXUIQ29UfA== + dependencies: + acorn "^8.16.0" + pathe "^2.0.3" + pkg-types "^1.3.1" + ufo "^1.6.3" ms@^2.1.1, ms@^2.1.3: version "2.1.3" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== -multimap@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/multimap/-/multimap-1.1.0.tgz#5263febc085a1791c33b59bb3afc6a76a2a10ca8" - integrity sha512-0ZIR9PasPxGXmRsEF8jsDzndzHDj7tIav+JUmvIFB/WHswliFnquxECT/De7GR4yg99ky/NlRKJT82G1y271bw== - n3@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/n3/-/n3-2.0.0.tgz#990ff360886a101608145b83efeebe29eed11a80" @@ -5448,6 +5950,11 @@ node-releases@^2.0.27: resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.27.tgz#eedca519205cf20f650f61d56b070db111231e4e" integrity sha512-nmh3lCkYZ3grZvqcCH+fjmQ7X+H0OeZgP40OierEaAptX4XofMh5kwNbWh7lBduUzCcV/8kZ+NDLCwm2iorIlA== +node-releases@^2.0.36: + version "2.0.37" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.37.tgz#9bd4f10b77ba39c2b9402d4e8399c482a797f671" + integrity sha512-1h5gKZCF+pO/o3Iqt5Jp7wc9rH3eJJ0+nh/CIoiRwjRxde/hAHyLPXYN4V3CqKAbiZPSeJFSWHmJsbkicta0Eg== + node-stdlib-browser@^1.3.0: version "1.3.1" resolved "https://registry.yarnpkg.com/node-stdlib-browser/-/node-stdlib-browser-1.3.1.tgz#f41fa554f720a3df951e40339f4d92ac512222ac" @@ -5513,6 +6020,13 @@ npm-run-path@^4.0.1: dependencies: path-key "^3.0.0" +nth-check@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/nth-check/-/nth-check-2.1.1.tgz#c9eab428effce36cd6b92c924bdb000ef1f1ed1d" + integrity sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w== + dependencies: + boolbase "^1.0.0" + object-assign@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" @@ -5548,7 +6062,7 @@ object.assign@^4.1.4, object.assign@^4.1.7: has-symbols "^1.1.0" object-keys "^1.1.1" -object.entries@^1.1.2, object.entries@^1.1.5, object.entries@^1.1.9: +object.entries@^1.1.6, object.entries@^1.1.9: version "1.1.9" resolved "https://registry.yarnpkg.com/object.entries/-/object.entries-1.1.9.tgz#e4770a6a1444afb61bd39f984018b5bede25f8b3" integrity sha512-8u/hfXFRBD1O0hPUjioLhoWFHRmt6tKA4/vZPyckBr18l1KE9uHrFaFaUi8MDRTpi4uak2goyPTSNJLXX2k2Hw== @@ -5558,7 +6072,7 @@ object.entries@^1.1.2, object.entries@^1.1.5, object.entries@^1.1.9: define-properties "^1.2.1" es-object-atoms "^1.1.1" -object.fromentries@^2.0.2, object.fromentries@^2.0.5, object.fromentries@^2.0.8: +object.fromentries@^2.0.6, object.fromentries@^2.0.7: version "2.0.8" resolved "https://registry.yarnpkg.com/object.fromentries/-/object.fromentries-2.0.8.tgz#f7195d8a9b97bd95cbc1999ea939ecd1a2b00c65" integrity sha512-k6E21FzySsSK5a21KRADBd/NGneRegFO5pLHfdQLpRDETUNJueLXs3WCzyQ3tFRDYgbq3KHGXfTbi2bs8WQ6rQ== @@ -5568,7 +6082,7 @@ object.fromentries@^2.0.2, object.fromentries@^2.0.5, object.fromentries@^2.0.8: es-abstract "^1.23.2" es-object-atoms "^1.0.0" -object.groupby@^1.0.3: +object.groupby@^1.0.1: version "1.0.3" resolved "https://registry.yarnpkg.com/object.groupby/-/object.groupby-1.0.3.tgz#9b125c36238129f6f7b61954a1e7176148d5002e" integrity sha512-+Lhy3TQTuzXI5hevh8sBGqbmurHbbIjAi0Z4S63nthVLmLxfbj4T54a4CfZrXIrt9iP4mVAPYMo/v99taj3wjQ== @@ -5577,7 +6091,7 @@ object.groupby@^1.0.3: define-properties "^1.2.1" es-abstract "^1.23.2" -object.hasown@^1.1.0: +object.hasown@^1.1.2: version "1.1.4" resolved "https://registry.yarnpkg.com/object.hasown/-/object.hasown-1.1.4.tgz#e270ae377e4c120cdcb7656ce66884a6218283dc" integrity sha512-FZ9LZt9/RHzGySlBARE3VF+gE26TxR38SdmqOqliuTnl9wrKulaQs+4dee1V+Io8VfxqzAfHu6YuRgUy8OHoTg== @@ -5586,7 +6100,7 @@ object.hasown@^1.1.0: es-abstract "^1.23.2" es-object-atoms "^1.0.0" -object.values@^1.1.1, object.values@^1.1.5, object.values@^1.1.6, object.values@^1.2.1: +object.values@^1.1.6, object.values@^1.1.7: version "1.2.1" resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.2.1.tgz#deed520a50809ff7f75a7cfd4bc64c7a038c6216" integrity sha512-gXah6aZrcUxjWg2zR2MwouP2eHlCBzdV4pygudehaKXSGW4v2AsRQUK+lwwXhii6KFZcunEnmSUoYp5CXibxtA== @@ -5617,7 +6131,7 @@ onetime@^5.1.2: dependencies: mimic-fn "^2.1.0" -optionator@^0.9.1: +optionator@^0.9.3: version "0.9.4" resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.4.tgz#7ea1c1a5d91d764fb282139c88fe11e182a3a734" integrity sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g== @@ -5709,6 +6223,31 @@ parse-asn1@^5.0.0, parse-asn1@^5.1.9: pbkdf2 "^3.1.5" safe-buffer "^5.2.1" +parse-entities@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/parse-entities/-/parse-entities-2.0.0.tgz#53c6eb5b9314a1f4ec99fa0fdf7ce01ecda0cbe8" + integrity sha512-kkywGpCcRYhqQIchaWqZ875wzpS/bMKhz5HnN3p7wveJTkTtyAB/AlnS0f8DFSqYW1T82t6yEAkEcB+A1I3MbQ== + dependencies: + character-entities "^1.0.0" + character-entities-legacy "^1.0.0" + character-reference-invalid "^1.0.0" + is-alphanumerical "^1.0.0" + is-decimal "^1.0.0" + is-hexadecimal "^1.0.0" + +parse-gitignore@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/parse-gitignore/-/parse-gitignore-2.0.0.tgz#81156b265115c507129f3faea067b8476da3b642" + integrity sha512-RmVuCHWsfu0QPNW+mraxh/xjQVw/lhUCUru8Zni3Ctq3AoMhpDTq0OVdKS6iesd6Kqb7viCV3isAL43dciOSog== + +parse-imports@^2.1.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/parse-imports/-/parse-imports-2.2.1.tgz#0a6e8b5316beb5c9905f50eb2bbb8c64a4805642" + integrity sha512-OL/zLggRp8mFhKL0rNORUTR4yBYujK/uU+xZL+/0Rgm2QE4nLO9v8PzEweSJEbMGKmDRjJE4R3IMJlL2di4JeQ== + dependencies: + es-module-lexer "^1.5.3" + slashes "^3.0.12" + parse-json@^5.0.0, parse-json@^5.2.0: version "5.2.0" resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-5.2.0.tgz#c76fc66dee54231c962b22bcc8a72cf2f99753cd" @@ -5757,6 +6296,11 @@ path-type@^4.0.0: resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== +pathe@^2.0.1, pathe@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/pathe/-/pathe-2.0.3.tgz#3ecbec55421685b70a9da872b2cff3e1cbed1716" + integrity sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w== + pbkdf2@^3.1.2, pbkdf2@^3.1.5: version "3.1.5" resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.1.5.tgz#444a59d7a259a95536c56e80c89de31cc01ed366" @@ -5779,7 +6323,7 @@ picomatch@^2.0.4, picomatch@^2.3.1: resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== -picomatch@^4.0.3: +picomatch@^4.0.2, picomatch@^4.0.3: version "4.0.4" resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-4.0.4.tgz#fd6f5e00a143086e074dffe4c924b8fb293b0589" integrity sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A== @@ -5803,6 +6347,15 @@ pkg-dir@^5.0.0: dependencies: find-up "^5.0.0" +pkg-types@^1.2.1, pkg-types@^1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/pkg-types/-/pkg-types-1.3.1.tgz#bd7cc70881192777eef5326c19deb46e890917df" + integrity sha512-/Jm5M4RvtBFVkKWRu2BLUTNP8/M2a+UwuAX+ae4770q1qVGtfjG+WTCupoZixokjmHiry8uI+dlY8KXYV5HVVQ== + dependencies: + confbox "^0.1.8" + mlly "^1.7.4" + pathe "^2.0.1" + pluralize@^8.0.0: version "8.0.0" resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-8.0.0.tgz#1a6fa16a38d12a1901e0320fa017051c539ce3b1" @@ -5813,6 +6366,14 @@ possible-typed-array-names@^1.0.0: resolved "https://registry.yarnpkg.com/possible-typed-array-names/-/possible-typed-array-names-1.1.0.tgz#93e3582bc0e5426586d9d07b79ee40fc841de4ae" integrity sha512-/+5VFTchJDoVj3bhoqi6UeymcD00DAwb1nJwamzPvHEszJ4FpF6SNNbUbOS8yI56qHzdV8eK0qEfOSiodkTdxg== +postcss-selector-parser@^6.0.15: + version "6.1.2" + resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-6.1.2.tgz#27ecb41fb0e3b6ba7a1ec84fff347f734c7929de" + integrity sha512-Q8qQfPiZ+THO/3ZrOrO0cJJKfpYCagtMUkXbnEfmgUjwXg6z/WBeOyS9APBBPCTSiDV+s4SwQGu8yFsiMRIudg== + dependencies: + cssesc "^3.0.0" + util-deprecate "^1.0.2" + pre-commit@^1.2.2: version "1.2.2" resolved "https://registry.yarnpkg.com/pre-commit/-/pre-commit-1.2.2.tgz#dbcee0ee9de7235e57f79c56d7ce94641a69eec6" @@ -5846,17 +6407,20 @@ process@^0.11.10: resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" integrity sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A== -progress@^2.0.0: - version "2.0.3" - resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8" - integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA== - promise-polyfill@^1.1.6: version "1.1.6" resolved "https://registry.yarnpkg.com/promise-polyfill/-/promise-polyfill-1.1.6.tgz#cd04eff46f5c95c3a7d045591d79b5e3e01f12d7" integrity sha512-7rrONfyLkDEc7OJ5QBkqa4KI4EBhCd340xRuIUPGCfu13znS+vx+VDdrT9ODAJHlXm7w4lbxN3DRjyv58EuzDg== -prop-types@^15.7.2, prop-types@^15.8.1: +prompts@^2.4.2: + version "2.4.2" + resolved "https://registry.yarnpkg.com/prompts/-/prompts-2.4.2.tgz#7b57e73b3a48029ad10ebd44f74b01722a4cb069" + integrity sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q== + dependencies: + kleur "^3.0.3" + sisteransi "^1.0.5" + +prop-types@^15.8.1: version "15.8.1" resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.8.1.tgz#67d87bf1a694f48435cf332c24af10214a3140b5" integrity sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg== @@ -5919,11 +6483,6 @@ quick-lru@^4.0.1: resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-4.0.1.tgz#5b8878f113a58217848c6482026c73e1ba57727f" integrity sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g== -ramda@^0.27.1: - version "0.27.2" - resolved "https://registry.yarnpkg.com/ramda/-/ramda-0.27.2.tgz#84463226f7f36dc33592f6f4ed6374c48306c3f1" - integrity sha512-SbiLPU40JuJniHexQSAgad32hfwd+DRUdwF2PlVuI5RZD0/vahUco7R8vD86J/tcEKKF9vZrUVwgtmGCqlCKyA== - randombytes@^2.0.0, randombytes@^2.0.1, randombytes@^2.0.5, randombytes@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" @@ -6165,7 +6724,7 @@ reflect.getprototypeof@^1.0.6, reflect.getprototypeof@^1.0.9: get-proto "^1.0.1" which-builtin-type "^1.2.1" -regexp-tree@^0.1.21, regexp-tree@^0.1.23, regexp-tree@~0.1.1: +regexp-tree@^0.1.27: version "0.1.27" resolved "https://registry.yarnpkg.com/regexp-tree/-/regexp-tree-0.1.27.tgz#2198f0ef54518ffa743fe74d983b56ffd631b6cd" integrity sha512-iETxpjK6YoRWJG5o6hXLwvjYAoW+FEZn9os0PD/b6AP6xQwsa/Y7lCVgIixBbUPMfhu+i2LtdeAqVTgGlQarfA== @@ -6182,10 +6741,12 @@ regexp.prototype.flags@^1.5.3, regexp.prototype.flags@^1.5.4: gopd "^1.2.0" set-function-name "^2.0.2" -regexpp@^3.0.0, regexpp@^3.1.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.2.0.tgz#0425a2768d8f23bad70ca4b90461fa2f1213e1b2" - integrity sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg== +regjsparser@^0.10.0: + version "0.10.0" + resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.10.0.tgz#b1ed26051736b436f22fdec1c8f72635f9f44892" + integrity sha512-qx+xQGZVsy55CH0a1hiVwHmqjLryfh7wQyF5HO07XJ9f7dQMY/gPQHhlyDkIzJKC+x2fUCpCcUODUUUFrm7SHA== + dependencies: + jsesc "~0.5.0" relative-to-absolute-iri@^1.0.0, relative-to-absolute-iri@^1.0.2, relative-to-absolute-iri@^1.0.5, relative-to-absolute-iri@^1.0.7: version "1.0.7" @@ -6202,11 +6763,6 @@ require-from-string@^2.0.2: resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-2.0.2.tgz#89a7fdd938261267318eafe14f9c32e598c36909" integrity sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw== -reserved-words@^0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/reserved-words/-/reserved-words-0.1.2.tgz#00a0940f98cd501aeaaac316411d9adc52b31ab1" - integrity sha512-0S5SrIUJ9LfpbVl4Yzij6VipUdafHrOTzvmfazSw/jeZrZtQK303OPZW+obtkaw7jQlTQppy0UvZWm9872PbRw== - resolve-cwd@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/resolve-cwd/-/resolve-cwd-3.0.0.tgz#0f0075f1bb2544766cf73ba6a6e2adfebcb13f2d" @@ -6224,7 +6780,12 @@ resolve-from@^5.0.0: resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-5.0.0.tgz#c35225843df8f776df21c57557bc087e9dfdfc69" integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw== -resolve@^1.10.0, resolve@^1.17.0, resolve@^1.18.1, resolve@^1.20.0, resolve@^1.22.0, resolve@^1.22.4: +resolve-pkg-maps@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz#616b3dc2c57056b5588c31cdf4b3d64db133720f" + integrity sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw== + +resolve@^1.10.0, resolve@^1.17.0, resolve@^1.20.0, resolve@^1.22.2, resolve@^1.22.4: version "1.22.11" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.11.tgz#aad857ce1ffb8bfa9b0b1ac29f1156383f68c262" integrity sha512-RfqAvLnMl313r7c9oclB1HhUEAezcpLjz95wFH4LVuhk9JF/r22qmVP9AMmOU4vMX7Q8pN8jwNg/CSpdFnMjTQ== @@ -6233,7 +6794,7 @@ resolve@^1.10.0, resolve@^1.17.0, resolve@^1.18.1, resolve@^1.20.0, resolve@^1.2 path-parse "^1.0.7" supports-preserve-symlinks-flag "^1.0.0" -resolve@^2.0.0-next.3, resolve@^2.0.0-next.6: +resolve@^2.0.0-next.4: version "2.0.0-next.6" resolved "https://registry.yarnpkg.com/resolve/-/resolve-2.0.0-next.6.tgz#b3961812be69ace7b3bc35d5bf259434681294af" integrity sha512-3JmVl5hMGtJ3kMmB3zi3DL25KfkCEyy3Tw7Gmw7z5w8M9WlwoPFnIvwChzu1+cF3iaK3sp18hhPz8ANeimdJfA== @@ -6318,13 +6879,6 @@ safe-regex-test@^1.1.0: es-errors "^1.3.0" is-regex "^1.2.1" -safe-regex@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/safe-regex/-/safe-regex-2.1.1.tgz#f7128f00d056e2fe5c11e81a1324dd974aadced2" - integrity sha512-rx+x8AMzKb5Q5lQ95Zoi6ZbJqwCLkqi3XuJXp5P3rT8OEc6sZCJG5AE5dU3lsgRr/F4Bs31jSlVN+j5KrsGu9A== - dependencies: - regexp-tree "~0.1.1" - safe-stable-stringify@^2.3.1: version "2.5.0" resolved "https://registry.yarnpkg.com/safe-stable-stringify/-/safe-stable-stringify-2.5.0.tgz#4ca2f8e385f2831c432a719b108a3bf7af42a1dd" @@ -6345,12 +6899,12 @@ schema-utils@^4.3.0, schema-utils@^4.3.3: resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.2.tgz#48d55db737c3287cd4835e17fa13feace1c41ef8" integrity sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g== -semver@^6.0.0, semver@^6.3.0, semver@^6.3.1: +semver@^6.0.0, semver@^6.3.1: version "6.3.1" resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== -semver@^7.2.1, semver@^7.3.5, semver@^7.7.2: +semver@^7.0.0, semver@^7.3.5, semver@^7.3.6, semver@^7.6.0, semver@^7.6.3, semver@^7.7.1, semver@^7.7.2: version "7.7.4" resolved "https://registry.yarnpkg.com/semver/-/semver-7.7.4.tgz#28464e36060e991fa7a11d0279d2d3f3b57a7e8a" integrity sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA== @@ -6511,19 +7065,20 @@ simple-copy@^2.2.1: diy-log "^1.0.0" glob "^7.1.3" +sisteransi@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/sisteransi/-/sisteransi-1.0.5.tgz#134d681297756437cc05ca01370d3a7a571075ed" + integrity sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg== + slash@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== -slice-ansi@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-4.0.0.tgz#500e8dd0fd55b05815086255b3195adf2a45fe6b" - integrity sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ== - dependencies: - ansi-styles "^4.0.0" - astral-regex "^2.0.0" - is-fullwidth-code-point "^3.0.0" +slashes@^3.0.12: + version "3.0.12" + resolved "https://registry.yarnpkg.com/slashes/-/slashes-3.0.12.tgz#3d664c877ad542dc1509eaf2c50f38d483a6435a" + integrity sha512-Q9VME8WyGkc7pJf6QEkj3wE+2CnvZMI+XJhwdTPR8Z/kWQRXi7boAWLDibRPyHRTUTPx5FaU7MsyrjI3yLB4HA== source-map-support@0.5.13: version "0.5.13" @@ -6580,6 +7135,14 @@ spdx-expression-parse@^3.0.0: spdx-exceptions "^2.1.0" spdx-license-ids "^3.0.0" +spdx-expression-parse@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-4.0.0.tgz#a23af9f3132115465dac215c099303e4ceac5794" + integrity sha512-Clya5JIij/7C6bRR22+tnGXbc4VKlibKSVj2iHvVeX5iMW7s1SIQlqu699JkODJJIhh/pUu8L0/VLh8xflD+LQ== + dependencies: + spdx-exceptions "^2.1.0" + spdx-license-ids "^3.0.0" + spdx-license-ids@^3.0.0: version "3.0.22" resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.22.tgz#abf5a08a6f5d7279559b669f47f0a43e8f3464ef" @@ -6597,6 +7160,11 @@ sprintf-js@~1.0.2: resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" integrity sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g== +stable-hash@^0.0.5: + version "0.0.5" + resolved "https://registry.yarnpkg.com/stable-hash/-/stable-hash-0.0.5.tgz#94e8837aaeac5b4d0f631d2972adef2924b40269" + integrity sha512-+L3ccpzibovGXFK+Ap/f8LOS0ahMrHTf3xu7mMLSpEGU0EO9ucaysSylKo9eRDFNhWve/y275iPmIZ4z39a9iA== + stack-trace@0.0.x: version "0.0.10" resolved "https://registry.yarnpkg.com/stack-trace/-/stack-trace-0.0.10.tgz#547c70b347e8d32b4e108ea1a2a159e5fdde19c0" @@ -6659,6 +7227,11 @@ streamify-string@^1.0.1: resolved "https://registry.yarnpkg.com/streamify-string/-/streamify-string-1.0.1.tgz#9e220de33e1c475dd30e0206f5b1815cc6c9525b" integrity sha512-RXvBglotrvSIuQQ7oC55pdV40wZ/17gTb68ipMC4LA0SqMN4Sqfsf31Dpei7qXpYqZQ8ueVnPglUvtep3tlhqw== +string-argv@^0.3.1: + version "0.3.2" + resolved "https://registry.yarnpkg.com/string-argv/-/string-argv-0.3.2.tgz#2b6d0ef24b656274d957d54e0a4bbf6153dc02b6" + integrity sha512-aqD2Q0144Z+/RqG52NeHEkZauTAUWJO8c6yTftGJKO3Tja5tUgIfmIl6kExvhtxSDP7fXB6DvzkfMpCd/F3G+Q== + string-length@^4.0.2: version "4.0.2" resolved "https://registry.yarnpkg.com/string-length/-/string-length-4.0.2.tgz#a8a8dc7bd5c1a82b9b3c8b87e125f66871b6e57a" @@ -6694,7 +7267,7 @@ string-width@^5.0.1, string-width@^5.1.2: emoji-regex "^9.2.2" strip-ansi "^7.0.1" -string.prototype.matchall@^4.0.2, string.prototype.matchall@^4.0.6: +string.prototype.matchall@^4.0.8: version "4.0.12" resolved "https://registry.yarnpkg.com/string.prototype.matchall/-/string.prototype.matchall-4.0.12.tgz#6c88740e49ad4956b1332a911e949583a275d4c0" integrity sha512-6CC9uyBL+/48dYizRf7H7VAYCMCNTBeM78x/VTUe9bFEaxBepPJDa1Ow99LqI/1yF7kuy7Q3cQsYMrcjGUcskA== @@ -6812,7 +7385,7 @@ strip-json-comments@1.0.x: resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-1.0.4.tgz#1e15fbcac97d3ee99bf2d73b4c656b082bbafb91" integrity sha512-AOPG8EBc5wAikaG1/7uFCNFJwnKOuQwFTpYBdTW6OvWHeZBQBrAA/amefHGrEiOnCPcLFZK6FUPtWVKpQVIRgg== -strip-json-comments@^3.1.0, strip-json-comments@^3.1.1: +strip-json-comments@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== @@ -6843,23 +7416,20 @@ supports-preserve-symlinks-flag@^1.0.0: resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== -synckit@^0.11.8: +synckit@^0.11.8, "synckit@^0.6.2 || ^0.7.3 || ^0.11.5": version "0.11.12" resolved "https://registry.yarnpkg.com/synckit/-/synckit-0.11.12.tgz#abe74124264fbc00a48011b0d98bdc1cffb64a7b" integrity sha512-Bh7QjT8/SuKUIfObSXNHNSK6WHo6J1tHCqJsuaFDP7gP0fkzSfTxI8y85JrppZ0h8l0maIgc2tfuZQ6/t3GtnQ== dependencies: "@pkgr/core" "^0.2.9" -table@^6.0.9: - version "6.9.0" - resolved "https://registry.yarnpkg.com/table/-/table-6.9.0.tgz#50040afa6264141c7566b3b81d4d82c47a8668f5" - integrity sha512-9kY+CygyYM6j02t5YFHbNz2FN5QmYGv9zAjVp4lCDjlCw7amdckXlEt/bjMhUIfj4ThGRE4gCUH5+yGnNuPo5A== +synckit@^0.9.1: + version "0.9.3" + resolved "https://registry.yarnpkg.com/synckit/-/synckit-0.9.3.tgz#1cfd60d9e61f931e07fb7f56f474b5eb31b826a7" + integrity sha512-JJoOEKTfL1urb1mDoEblhD9NhEbWmq9jHEMEnxoC4ujUaZ4itA8vKgwkFAyNClgxplLi9tsUKX+EduK0p/l7sg== dependencies: - ajv "^8.0.1" - lodash.truncate "^4.4.2" - slice-ansi "^4.0.0" - string-width "^4.2.3" - strip-ansi "^6.0.1" + "@pkgr/core" "^0.1.0" + tslib "^2.6.2" tapable@^2.2.0, tapable@^2.3.0: version "2.3.0" @@ -6938,6 +7508,14 @@ tiny-set-immediate@^1.0.2: resolved "https://registry.yarnpkg.com/tiny-set-immediate/-/tiny-set-immediate-1.0.2.tgz#4abcc1cd597e9cdcd6515c3c0a18c8ef4d98f292" integrity sha512-EVbaM4zXFWS4CIqVoPzY7XIioQ5LU1p49AHizwPO1KyFyp/gxy5SA8mDmfDVl/2WLQiHgUL+esO6Ig+KhpUxUw== +tinyglobby@^0.2.13: + version "0.2.15" + resolved "https://registry.yarnpkg.com/tinyglobby/-/tinyglobby-0.2.15.tgz#e228dd1e638cea993d2fdb4fcd2d4602a79951c2" + integrity sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ== + dependencies: + fdir "^6.5.0" + picomatch "^4.0.3" + tmpl@1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.5.tgz#8683e0b902bb9c20c4f726e3c0b69f36518c07cc" @@ -6959,6 +7537,13 @@ to-regex-range@^5.0.1: dependencies: is-number "^7.0.0" +toml-eslint-parser@^0.9.0, toml-eslint-parser@^0.9.3: + version "0.9.3" + resolved "https://registry.yarnpkg.com/toml-eslint-parser/-/toml-eslint-parser-0.9.3.tgz#fc02498ba76e935f888c4b68b00e75b59789d272" + integrity sha512-moYoCvkNUAPCxSW9jmHmRElhm4tVJpHL8ItC/+uYD0EpPSFXbck7yREz9tNdJVTSpHVod8+HoipcpbQ0oE6gsw== + dependencies: + eslint-visitor-keys "^3.0.0" + tr46@~0.0.3: version "0.0.3" resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" @@ -6974,6 +7559,11 @@ triple-beam@^1.3.0: resolved "https://registry.yarnpkg.com/triple-beam/-/triple-beam-1.4.1.tgz#6fde70271dc6e5d73ca0c3b24e2d92afb7441984" integrity sha512-aZbgViZrg1QNcG+LULa7nhZpJTZSLm/mXnHXnbAbjmN5aSa0y7V+wvv6+4WaBtpISJzThKy+PIPxc1Nq1EJ9mg== +ts-api-utils@^1.0.1, ts-api-utils@^1.3.0: + version "1.4.3" + resolved "https://registry.yarnpkg.com/ts-api-utils/-/ts-api-utils-1.4.3.tgz#bfc2215fe6528fecab2b0fba570a2e8a4263b064" + integrity sha512-i3eMG77UTMD0hZhgRS562pv83RC6ukSAC2GMNWc+9dieh/+jDM5u5YG+NHX6VNDRHQcHwmsTHctP9LhbC3WxVw== + ts-jest@^29.1.0: version "29.4.5" resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-29.4.5.tgz#a6b0dc401e521515d5342234be87f1ca96390a6f" @@ -7000,7 +7590,7 @@ ts-loader@^9.4.1: semver "^7.3.4" source-map "^0.7.4" -tsconfig-paths@^3.12.0, tsconfig-paths@^3.14.1, tsconfig-paths@^3.15.0: +tsconfig-paths@^3.15.0: version "3.15.0" resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz#5299ec605e55b1abb23ec939ef15edaf483070d4" integrity sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg== @@ -7010,17 +7600,22 @@ tsconfig-paths@^3.12.0, tsconfig-paths@^3.14.1, tsconfig-paths@^3.15.0: minimist "^1.2.6" strip-bom "^3.0.0" +tslib@2.3.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.3.1.tgz#e8a335add5ceae51aa261d32a490158ef042ef01" + integrity sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw== + tslib@^1.8.1: version "1.14.1" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== -tslib@^2.4.0: +tslib@^2.4.0, tslib@^2.6.2: version "2.8.1" resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.8.1.tgz#612efe4ed235d567e8aba5f2a5fab70280ade83f" integrity sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w== -tsutils@^3.17.1, tsutils@^3.21.0: +tsutils@^3.21.0: version "3.21.0" resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.21.0.tgz#b48717d394cea6c1e096983eed58e9d61715b623" integrity sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA== @@ -7044,6 +7639,11 @@ type-detect@4.0.8: resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c" integrity sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g== +type-detect@^4.0.8: + version "4.1.0" + resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.1.0.tgz#deb2453e8f08dcae7ae98c626b13dddb0155906c" + integrity sha512-Acylog8/luQ8L7il+geoSxhEkazvkslg7PSNKOX59mbB9cOveP5aq9h74Y7YU8yDpJwetzQQrfIwtf4Wp4LKcw== + type-fest@^0.18.0: version "0.18.1" resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.18.1.tgz#db4bc151a4a2cf4eebf9add5db75508db6cc841f" @@ -7129,6 +7729,11 @@ typescript@~6.0.0: resolved "https://registry.yarnpkg.com/typescript/-/typescript-6.0.2.tgz#0b1bfb15f68c64b97032f3d78abbf98bdbba501f" integrity sha512-bGdAIrZ0wiGDo5l8c++HWtbaNCWTS4UTv7RaTH/ThVIgjkveJt83m74bBHMJkuCbslY8ixgLBVZJIOiQlQTjfQ== +ufo@^1.6.3: + version "1.6.3" + resolved "https://registry.yarnpkg.com/ufo/-/ufo-1.6.3.tgz#799666e4e88c122a9659805e30b9dc071c3aed4f" + integrity sha512-yDJTmhydvl5lJzBmy/hyOAA0d+aqCBuwl818haVdYCRrWV84o7YyeVm4QlVHStqNrrJSTb6jKuFAVqAFsr+K3Q== + uglify-js@^3.1.4: version "3.19.3" resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.19.3.tgz#82315e9bbc6f2b25888858acd1fff8441035b77f" @@ -7159,7 +7764,14 @@ undici@^7.16.0: resolved "https://registry.yarnpkg.com/undici/-/undici-7.24.7.tgz#af9535341bbe80625ca403a02418477a5c6a8760" integrity sha512-H/nlJ/h0ggGC+uRL3ovD+G0i4bqhvsDOpbDv7At5eFLlj2b41L8QliGbnl2H7SnDiYhENphh1tQFJZf+MyfLsQ== -unrs-resolver@^1.7.11: +unist-util-stringify-position@^2.0.0: + version "2.0.3" + resolved "https://registry.yarnpkg.com/unist-util-stringify-position/-/unist-util-stringify-position-2.0.3.tgz#cce3bfa1cdf85ba7375d1d5b17bdc4cada9bd9da" + integrity sha512-3faScn5I+hy9VleOq/qNbAd6pAx7iH5jYBMS9I1HgQVijz/4mv5Bvw5iw1sC/90CODiKo81G/ps8AJrISn687g== + dependencies: + "@types/unist" "^2.0.2" + +unrs-resolver@^1.6.2, unrs-resolver@^1.7.11: version "1.11.1" resolved "https://registry.yarnpkg.com/unrs-resolver/-/unrs-resolver-1.11.1.tgz#be9cd8686c99ef53ecb96df2a473c64d304048a9" integrity sha512-bSjt9pjaEBnNiGgc9rUiHGKv5l4/TGzDmYw3RhnkJGtLhbnnA/5qJj7x3dNDCRx/PJxu774LlH8lCOlB4hEfKg== @@ -7194,6 +7806,14 @@ update-browserslist-db@^1.1.4: escalade "^3.2.0" picocolors "^1.1.1" +update-browserslist-db@^1.2.3: + version "1.2.3" + resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.2.3.tgz#64d76db58713136acbeb4c49114366cc6cc2e80d" + integrity sha512-Js0m9cx+qOgDxo0eMiFGEueWztz+d4+M3rGlmKPT+T4IS/jP4ylw3Nwpu6cpTTP8R1MAC1kF4VbdLt3ARf209w== + dependencies: + escalade "^3.2.0" + picocolors "^1.1.1" + uri-js@^4.2.2: version "4.4.1" resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" @@ -7209,7 +7829,7 @@ url@^0.11.4: punycode "^1.4.1" qs "^6.12.3" -util-deprecate@^1.0.1, util-deprecate@~1.0.1: +util-deprecate@^1.0.1, util-deprecate@^1.0.2, util-deprecate@~1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw== @@ -7225,11 +7845,6 @@ util@^0.12.4, util@^0.12.5: is-typed-array "^1.1.3" which-typed-array "^1.1.2" -v8-compile-cache@^2.0.3: - version "2.4.0" - resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.4.0.tgz#cdada8bec61e15865f05d097c5f4fd30e94dc128" - integrity sha512-ocyWc3bAHBB/guyqJQVI5o4BZkPhznPYUG2ea80Gond/BgNWpap8TOmLSeeQG7bnh2KMISxskdADG59j7zruhw== - v8-to-istanbul@^9.0.1: version "9.3.0" resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-9.3.0.tgz#b9572abfa62bd556c16d75fdebc1a411d5ff3175" @@ -7262,6 +7877,19 @@ vm-browserify@^1.0.1: resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-1.1.2.tgz#78641c488b8e6ca91a75f511e7a3b32a86e5dda0" integrity sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ== +vue-eslint-parser@^9.4.2, vue-eslint-parser@^9.4.3: + version "9.4.3" + resolved "https://registry.yarnpkg.com/vue-eslint-parser/-/vue-eslint-parser-9.4.3.tgz#9b04b22c71401f1e8bca9be7c3e3416a4bde76a8" + integrity sha512-2rYRLWlIpaiN8xbPiDyXZXRgLGOtWxERV7ND5fFAv5qo1D2N9Fu9MNajBNc6o13lZ+24DAWCkQCvj4klgmcITg== + dependencies: + debug "^4.3.4" + eslint-scope "^7.1.1" + eslint-visitor-keys "^3.3.0" + espree "^9.3.1" + esquery "^1.4.0" + lodash "^4.17.21" + semver "^7.3.6" + walker@^1.0.8: version "1.0.8" resolved "https://registry.yarnpkg.com/walker/-/walker-1.0.8.tgz#bd498db477afe573dc04185f011d3ab8a8d7653f" @@ -7505,6 +8133,11 @@ write-file-atomic@^5.0.1: imurmurhash "^0.1.4" signal-exit "^4.0.1" +xml-name-validator@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-4.0.0.tgz#79a006e2e63149a8600f15430f0a4725d1524835" + integrity sha512-ICP2e+jsHvAj2E2lIHxa5tjXRlKDJo4IdvPvCXbXQGdzSfmSpNVyIKMvoZHjDY9DP0zV17iI85o90vRFXNccRw== + xmlchars@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/xmlchars/-/xmlchars-2.2.0.tgz#060fe1bcb7f9c76fe2a17db86a9bc3ab894210cb" @@ -7535,6 +8168,19 @@ yallist@^4.0.0: resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== +yaml-eslint-parser@^1.2.1, yaml-eslint-parser@^1.2.2: + version "1.3.2" + resolved "https://registry.yarnpkg.com/yaml-eslint-parser/-/yaml-eslint-parser-1.3.2.tgz#f62010fe8293d39930422d70e46f23b075bd13b5" + integrity sha512-odxVsHAkZYYglR30aPYRY4nUGJnoJ2y1ww2HDvZALo0BDETv9kWbi16J52eHs+PWRNmF4ub6nZqfVOeesOvntg== + dependencies: + eslint-visitor-keys "^3.0.0" + yaml "^2.0.0" + +yaml@^2.0.0: + version "2.8.3" + resolved "https://registry.yarnpkg.com/yaml/-/yaml-2.8.3.tgz#a0d6bd2efb3dd03c59370223701834e60409bd7d" + integrity sha512-AvbaCLOO2Otw/lW5bmh9d/WEdcDFdQp2Z2ZUH3pX9U2ihyUY0nvLv7J6TrWowklRGPYbB/IuIMfYgxaCPg5Bpg== + yargs-parser@^20.2.2, yargs-parser@^20.2.3: version "20.2.9" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee"