diff --git a/packages/cli/package.json b/packages/cli/package.json index 4b63d419a..c7f048c6e 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -55,11 +55,9 @@ "yargs": "~17.7.2" }, "devDependencies": { - "@types/es-aggregate-error": "^1.0.2", "@types/xml2js": "^0.4.9", "@types/yargs": "^17.0.8", "@yao-pkg/pkg": "5.11.0", - "es-aggregate-error": "^1.0.7", "nock": "^13.5.4", "xml2js": "^0.5.0" }, diff --git a/packages/cli/src/commands/__tests__/lint.test.ts b/packages/cli/src/commands/__tests__/lint.test.ts index 2390d1b0d..fec06b06d 100644 --- a/packages/cli/src/commands/__tests__/lint.test.ts +++ b/packages/cli/src/commands/__tests__/lint.test.ts @@ -3,7 +3,6 @@ import { DiagnosticSeverity } from '@stoplight/types'; import { IRuleResult } from '@stoplight/spectral-core'; import * as process from 'process'; import { ErrorWithCause } from 'pony-cause'; -import AggregateError from 'es-aggregate-error'; import { lint } from '../../services/linter'; import { formatOutput, writeOutput } from '../../services/output'; diff --git a/packages/cli/src/services/__tests__/linter.test.ts b/packages/cli/src/services/__tests__/linter.test.ts index cb6f8e760..2d275816c 100644 --- a/packages/cli/src/services/__tests__/linter.test.ts +++ b/packages/cli/src/services/__tests__/linter.test.ts @@ -6,7 +6,6 @@ import * as yargs from 'yargs'; import { DiagnosticSeverity } from '@stoplight/types'; import { RulesetValidationError } from '@stoplight/spectral-core'; import '@stoplight/spectral-test-utils/matchers'; -import AggregateError = require('es-aggregate-error'); import * as process from 'process'; import lintCommand from '../../commands/lint'; diff --git a/packages/core/package.json b/packages/core/package.json index cd9881faa..3b7161dac 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -41,12 +41,10 @@ "@stoplight/spectral-ref-resolver": "^1.0.4", "@stoplight/spectral-runtime": "^1.1.2", "@stoplight/types": "~13.6.0", - "@types/es-aggregate-error": "^1.0.2", "@types/json-schema": "^7.0.11", "ajv": "^8.18.0", "ajv-errors": "~3.0.0", "ajv-formats": "~2.1.1", - "es-aggregate-error": "^1.0.7", "expr-eval-fork": "^3.0.1", "jsonpath-plus": "^10.3.0", "lodash": "~4.17.23", diff --git a/packages/core/src/ruleset/__tests__/ruleset.test.ts b/packages/core/src/ruleset/__tests__/ruleset.test.ts index 990a98cb7..7bf963532 100644 --- a/packages/core/src/ruleset/__tests__/ruleset.test.ts +++ b/packages/core/src/ruleset/__tests__/ruleset.test.ts @@ -4,7 +4,6 @@ import { oas2 } from '@stoplight/spectral-formats'; import { pattern, truthy } from '@stoplight/spectral-functions'; import * as path from '@stoplight/path'; import { DiagnosticSeverity } from '@stoplight/types'; -import AggregateError = require('es-aggregate-error'); import { Ruleset } from '../ruleset'; import { RulesetDefinition } from '../types'; diff --git a/packages/core/src/ruleset/function.ts b/packages/core/src/ruleset/function.ts index 8360ba90c..c90e2bbb5 100644 --- a/packages/core/src/ruleset/function.ts +++ b/packages/core/src/ruleset/function.ts @@ -11,7 +11,6 @@ import { printPath, PrintStyle, printValue } from '@stoplight/spectral-runtime'; import { RulesetValidationError } from './validation/index'; import { IFunctionResult, JSONSchema, RulesetFunction, RulesetFunctionWithValidator } from '../types'; import { isObject } from 'lodash'; -import AggregateError = require('es-aggregate-error'); const ajv = new Ajv({ allErrors: true, allowUnionTypes: true, strict: true, keywords: ['x-internal'] }); ajvErrors(ajv); diff --git a/packages/core/src/ruleset/validation/__tests__/validation.test.ts b/packages/core/src/ruleset/validation/__tests__/validation.test.ts index 3bd4b7350..f53a6cce0 100644 --- a/packages/core/src/ruleset/validation/__tests__/validation.test.ts +++ b/packages/core/src/ruleset/validation/__tests__/validation.test.ts @@ -1,7 +1,6 @@ import '@stoplight/spectral-test-utils/matchers'; import { assertValidRuleset, RulesetValidationError } from '../index'; -import AggregateError = require('es-aggregate-error'); import invalidRuleset from './__fixtures__/invalid-ruleset'; import validRuleset from './__fixtures__/valid-flat-ruleset'; import extendedRuleset from './__fixtures__/aliases/extended-definition'; diff --git a/packages/core/src/ruleset/validation/assertions.ts b/packages/core/src/ruleset/validation/assertions.ts index 812f3b09e..53f85c491 100644 --- a/packages/core/src/ruleset/validation/assertions.ts +++ b/packages/core/src/ruleset/validation/assertions.ts @@ -2,7 +2,6 @@ import { isPlainObject } from '@stoplight/json'; import { createValidator } from './ajv'; import { convertAjvErrors, RulesetValidationError } from './errors'; import type { FileRuleDefinition, RuleDefinition, RulesetDefinition } from '../types'; -import AggregateError from 'es-aggregate-error'; export function assertValidRuleset( ruleset: unknown, diff --git a/packages/core/src/ruleset/validation/validators/common/error.ts b/packages/core/src/ruleset/validation/validators/common/error.ts index 278eb2cce..046e5fc14 100644 --- a/packages/core/src/ruleset/validation/validators/common/error.ts +++ b/packages/core/src/ruleset/validation/validators/common/error.ts @@ -1,5 +1,4 @@ import { isError } from 'lodash'; -import AggregateError from 'es-aggregate-error'; import { RulesetValidationError } from '../../errors'; import { isAggregateError } from '../../../../guards/isAggregateError'; diff --git a/packages/functions/src/__tests__/alphabetical.test.ts b/packages/functions/src/__tests__/alphabetical.test.ts index d8ba91d86..4d1493b54 100644 --- a/packages/functions/src/__tests__/alphabetical.test.ts +++ b/packages/functions/src/__tests__/alphabetical.test.ts @@ -2,7 +2,6 @@ import * as Parsers from '@stoplight/spectral-parsers'; import { Document, RulesetValidationError } from '@stoplight/spectral-core'; import testFunction from './__helpers__/tester'; import alphabetical from '../alphabetical'; -import AggregateError = require('es-aggregate-error'); const runAlphabetical = testFunction.bind(null, alphabetical); diff --git a/packages/functions/src/__tests__/casing.test.ts b/packages/functions/src/__tests__/casing.test.ts index b0c2e03a5..6a08cb7e1 100644 --- a/packages/functions/src/__tests__/casing.test.ts +++ b/packages/functions/src/__tests__/casing.test.ts @@ -2,7 +2,6 @@ import '@stoplight/spectral-test-utils/matchers'; import { RulesetValidationError } from '@stoplight/spectral-core'; import casing, { CasingType } from '../casing'; import testFunction from './__helpers__/tester'; -import AggregateError = require('es-aggregate-error'); const runCasing = testFunction.bind(null, casing); diff --git a/packages/functions/src/__tests__/defined.test.ts b/packages/functions/src/__tests__/defined.test.ts index 56ebc51a5..8121a573b 100644 --- a/packages/functions/src/__tests__/defined.test.ts +++ b/packages/functions/src/__tests__/defined.test.ts @@ -3,7 +3,6 @@ import '@stoplight/spectral-test-utils/matchers'; import defined from '../defined'; import testFunction from './__helpers__/tester'; import { RulesetValidationError } from '@stoplight/spectral-core'; -import AggregateError = require('es-aggregate-error'); const runDefined = testFunction.bind(null, defined); diff --git a/packages/functions/src/__tests__/enumeration.test.ts b/packages/functions/src/__tests__/enumeration.test.ts index 019cd6610..db8a18e09 100644 --- a/packages/functions/src/__tests__/enumeration.test.ts +++ b/packages/functions/src/__tests__/enumeration.test.ts @@ -3,7 +3,6 @@ import '@stoplight/spectral-test-utils/matchers'; import { RulesetValidationError } from '@stoplight/spectral-core'; import enumeration from '../enumeration'; import testFunction from './__helpers__/tester'; -import AggregateError = require('es-aggregate-error'); const runEnumeration = testFunction.bind(null, enumeration); diff --git a/packages/functions/src/__tests__/falsy.test.ts b/packages/functions/src/__tests__/falsy.test.ts index a63c9878a..6d0c582f8 100644 --- a/packages/functions/src/__tests__/falsy.test.ts +++ b/packages/functions/src/__tests__/falsy.test.ts @@ -3,7 +3,6 @@ import '@stoplight/spectral-test-utils/matchers'; import { RulesetValidationError } from '@stoplight/spectral-core'; import falsy from '../falsy'; import testFunction from './__helpers__/tester'; -import AggregateError = require('es-aggregate-error'); const runFalsy = testFunction.bind(null, falsy); diff --git a/packages/functions/src/__tests__/length.test.ts b/packages/functions/src/__tests__/length.test.ts index 4ab9cb38f..4835ae5d1 100644 --- a/packages/functions/src/__tests__/length.test.ts +++ b/packages/functions/src/__tests__/length.test.ts @@ -2,7 +2,6 @@ import { RulesetValidationError } from '@stoplight/spectral-core'; import testFunction from './__helpers__/tester'; import length from '../length'; import '@stoplight/spectral-test-utils/matchers'; -import AggregateError = require('es-aggregate-error'); const runLength = testFunction.bind(null, length); diff --git a/packages/functions/src/__tests__/or.test.ts b/packages/functions/src/__tests__/or.test.ts index ccb54675f..ea376b372 100644 --- a/packages/functions/src/__tests__/or.test.ts +++ b/packages/functions/src/__tests__/or.test.ts @@ -3,7 +3,6 @@ import '@stoplight/spectral-test-utils/matchers'; import { RulesetValidationError } from '@stoplight/spectral-core'; import testFunction from './__helpers__/tester'; import or from '../or'; -import AggregateError = require('es-aggregate-error'); const runOr = testFunction.bind(null, or); diff --git a/packages/functions/src/__tests__/pattern.test.ts b/packages/functions/src/__tests__/pattern.test.ts index 9cc030cc7..12e62da2e 100644 --- a/packages/functions/src/__tests__/pattern.test.ts +++ b/packages/functions/src/__tests__/pattern.test.ts @@ -3,7 +3,6 @@ import '@stoplight/spectral-test-utils/matchers'; import { RulesetValidationError } from '@stoplight/spectral-core'; import testFunction from './__helpers__/tester'; import pattern from '../pattern'; -import AggregateError = require('es-aggregate-error'); const runPattern = testFunction.bind(null, pattern); diff --git a/packages/functions/src/__tests__/schema.test.ts b/packages/functions/src/__tests__/schema.test.ts index ec45b5fd0..0c35de9e9 100644 --- a/packages/functions/src/__tests__/schema.test.ts +++ b/packages/functions/src/__tests__/schema.test.ts @@ -3,7 +3,6 @@ import schema from '../schema'; import { RulesetValidationError } from '@stoplight/spectral-core'; import testFunction from './__helpers__/tester'; import '@stoplight/spectral-test-utils/matchers'; -import AggregateError = require('es-aggregate-error'); const runSchema = testFunction.bind(null, schema); diff --git a/packages/functions/src/__tests__/truthy.test.ts b/packages/functions/src/__tests__/truthy.test.ts index 32da4fb4a..944697ba7 100644 --- a/packages/functions/src/__tests__/truthy.test.ts +++ b/packages/functions/src/__tests__/truthy.test.ts @@ -3,7 +3,6 @@ import '@stoplight/spectral-test-utils/matchers'; import { RulesetValidationError } from '@stoplight/spectral-core'; import truthy from '../truthy'; import testFunction from './__helpers__/tester'; -import AggregateError = require('es-aggregate-error'); const runTruthy = testFunction.bind(null, truthy); diff --git a/packages/functions/src/__tests__/unreferencedReusableObject.test.ts b/packages/functions/src/__tests__/unreferencedReusableObject.test.ts index 3f1deb95c..61f996338 100644 --- a/packages/functions/src/__tests__/unreferencedReusableObject.test.ts +++ b/packages/functions/src/__tests__/unreferencedReusableObject.test.ts @@ -3,7 +3,6 @@ import '@stoplight/spectral-test-utils/matchers'; import { RulesetValidationError } from '@stoplight/spectral-core'; import testFunction from './__helpers__/tester'; import unreferencedReusableObject from '../unreferencedReusableObject'; -import AggregateError = require('es-aggregate-error'); const runUnreferencedReusableObject = testFunction.bind(null, unreferencedReusableObject); diff --git a/packages/functions/src/__tests__/xor.test.ts b/packages/functions/src/__tests__/xor.test.ts index 18a8afec2..7ab77bfb5 100644 --- a/packages/functions/src/__tests__/xor.test.ts +++ b/packages/functions/src/__tests__/xor.test.ts @@ -3,7 +3,6 @@ import '@stoplight/spectral-test-utils/matchers'; import { RulesetValidationError } from '@stoplight/spectral-core'; import testFunction from './__helpers__/tester'; import xor from '../xor'; -import AggregateError = require('es-aggregate-error'); const runXor = testFunction.bind(null, xor); diff --git a/test-utils/matchers.ts b/test-utils/matchers.ts index b51cd3869..6f3b997e0 100644 --- a/test-utils/matchers.ts +++ b/test-utils/matchers.ts @@ -1,5 +1,3 @@ -import AggregateError = require('es-aggregate-error'); - declare global { // eslint-disable-next-line @typescript-eslint/no-namespace namespace jest { diff --git a/yarn.lock b/yarn.lock index fbce698e9..460e0a091 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3107,12 +3107,10 @@ __metadata: "@stoplight/spectral-rulesets": ">=1" "@stoplight/spectral-runtime": ^1.1.2 "@stoplight/types": ^13.6.0 - "@types/es-aggregate-error": ^1.0.2 "@types/xml2js": ^0.4.9 "@types/yargs": ^17.0.8 "@yao-pkg/pkg": 5.11.0 chalk: 4.1.2 - es-aggregate-error: ^1.0.7 fast-glob: ~3.2.12 hpagent: ~1.2.0 lodash: ~4.17.23 @@ -3141,14 +3139,12 @@ __metadata: "@stoplight/spectral-runtime": ^1.1.2 "@stoplight/types": ~13.6.0 "@stoplight/yaml": ^4.2.2 - "@types/es-aggregate-error": ^1.0.2 "@types/json-schema": ^7.0.11 "@types/minimatch": ^3.0.5 "@types/treeify": ^1.0.0 ajv: ^8.18.0 ajv-errors: ~3.0.0 ajv-formats: ~2.1.1 - es-aggregate-error: ^1.0.7 expr-eval-fork: ^3.0.1 jsonpath-plus: ^10.3.0 lodash: ~4.17.23 @@ -3655,15 +3651,6 @@ __metadata: languageName: node linkType: hard -"@types/es-aggregate-error@npm:^1.0.2": - version: 1.0.2 - resolution: "@types/es-aggregate-error@npm:1.0.2" - dependencies: - "@types/node": "*" - checksum: 076fd59b595f33c8c7e7eb68ec55bd43cf8b2cf7bbc6778e25d7ae1a5fa0538a0a56f149015f403d7bbcefe59f1d8182351685b59c1fe719fd46d0dd8a9737fa - languageName: node - linkType: hard - "@types/estree@npm:*": version: 0.0.50 resolution: "@types/estree@npm:0.0.50" @@ -6615,20 +6602,6 @@ __metadata: languageName: node linkType: hard -"es-aggregate-error@npm:^1.0.7": - version: 1.0.7 - resolution: "es-aggregate-error@npm:1.0.7" - dependencies: - define-properties: ^1.1.3 - es-abstract: ^1.19.0 - function-bind: ^1.1.1 - functions-have-names: ^1.2.2 - get-intrinsic: ^1.1.1 - globalthis: ^1.0.2 - checksum: 16b89fefdf56c0478cd21577249156cf83e44c2220c057cbfddd99c01e15e03d6d90a85ce73dece4728a5bfcb022dc160e04a66b1f83a620f140842c6f8325f9 - languageName: node - linkType: hard - "es-define-property@npm:^1.0.0": version: 1.0.0 resolution: "es-define-property@npm:1.0.0" @@ -7685,13 +7658,6 @@ __metadata: languageName: node linkType: hard -"functions-have-names@npm:^1.2.2": - version: 1.2.2 - resolution: "functions-have-names@npm:1.2.2" - checksum: 25f44b6d1c41ac86ffdf41f25d1de81c0a5b4a3fcf4307a33cdfb23b9d4bd5d0d8bf312eaef5ad368c6500c8a9e19f692b8ce9f96aaab99db9dd936554165558 - languageName: node - linkType: hard - "generator-function@npm:^2.0.0": version: 2.0.1 resolution: "generator-function@npm:2.0.1" @@ -8019,15 +7985,6 @@ __metadata: languageName: node linkType: hard -"globalthis@npm:^1.0.2": - version: 1.0.2 - resolution: "globalthis@npm:1.0.2" - dependencies: - define-properties: ^1.1.3 - checksum: 5a5f3c7ab94708260a98106b35946b74bb57f6b2013e39668dc9e8770b80a3418103b63a2b4aa01c31af15fdf6a2940398ffc0a408573c34c2304f928895adff - languageName: node - linkType: hard - "globby@npm:11.0.4": version: 11.0.4 resolution: "globby@npm:11.0.4"