diff --git a/.browserslistrc b/.browserslistrc index bffe367fd..b7a1042ed 100644 --- a/.browserslistrc +++ b/.browserslistrc @@ -1,4 +1,4 @@ >=0.1% and supports es6-module Chrome 120 -Firefox ESR +Firefox 115 Safari 15.6 diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 06364874f..926531fe8 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -27,7 +27,7 @@ jobs: - name: Setup Deno uses: denoland/setup-deno@v1 with: - deno-version: 1.40.5 + deno-version: 2.0.3 - name: Install required stuff run: | sudo apt-get update @@ -41,7 +41,7 @@ jobs: - name: Run Black run: black . - name: Install dprint - run: curl -sSf https://dprint.dev/install.sh | sh -s 0.47.2 + run: curl -sSf https://dprint.dev/install.sh | sh -s 0.47.5 - name: Run dprint run: ~/.dprint/bin/dprint fmt --diff - name: Install dart-sass @@ -188,6 +188,8 @@ jobs: with: node-version: "18.20" cache: pnpm + - name: Enable corepack + run: corepack enable - name: Cache uses: pat-s/always-upload-cache@v3 with: @@ -214,6 +216,8 @@ jobs: with: node-version: "18.20" cache: pnpm + - name: Enable corepack + run: corepack enable - name: Install tsc run: pnpm install - name: Run tsc diff --git a/.npmrc b/.npmrc index 82dae1bb9..260992fb8 100644 --- a/.npmrc +++ b/.npmrc @@ -1,5 +1,4 @@ -hoist-pattern[] = -public-hoist-pattern[] = +hoist = false use-node-version = 18.20.4 auto-install-peers = false diff --git a/Pipfile b/Pipfile index 710c77ca7..86c83b4f3 100644 --- a/Pipfile +++ b/Pipfile @@ -8,14 +8,14 @@ ansi2html = "==1.*" beautifulsoup4 = "==4.*" # big = {version = "<2", extras = ["time"]} blake3 = "<2" -certifi = "==2023.11.17" +certifi = "==2024.8.30" # cryptography = "==42.*" defity = "<2" defusedxml = "<2" dill = "<2" ecs-logging = "==2.*" elastic-apm = "==6.*" -elastic-enterprise-search = "<8.13" +elastic-enterprise-search = "<8.16" elasticsearch = {version = "==8.15.*", extras = ["async"]} emoji = "<3" # frozendict = "==2.*" @@ -85,7 +85,7 @@ pytest-tornasync = "<2" # ruff = "<2" setuptools = "==69.*" time-machine = "==2.*" -trove-classifiers = "==2024.7.1" +trove-classifiers = "==2024.10.16" twine = "==5.*" types-beautifulsoup4 = "==4.*" types-emoji = "==2.*" diff --git a/Pipfile.lock b/Pipfile.lock index cc030ab97..153067686 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -1,7 +1,7 @@ { "_meta": { "hash": { - "sha256": "f275eb6f7c7979b22a50ae8217a653a120cc9805d5f38bb476350926d74ac46f" + "sha256": "85ca71ba0e16ed6aecdb87f66b0bb4e0deda4d5fb842da3c5f7e07ef7545302b" }, "pipfile-spec": 6, "requires": { @@ -341,12 +341,12 @@ }, "certifi": { "hashes": [ - "sha256:9b469f3a900bf28dc19b8cfbf8019bf47f7fdd1a65a1d4ffb98fc14166beb4d1", - "sha256:e036ab49d5b79556f99cfc2d9320b34cfbe5be05c5871b51de9329f0603b0474" + "sha256:922820b53db7a7257ffbda3f597266d435245903d80737e34f8a45ff3e3230d8", + "sha256:bec941d2aa8195e248a60b31ff9f0558284cf01a52591ceda73ea9afffd69fd9" ], "index": "pypi", "markers": "python_version >= '3.6'", - "version": "==2023.11.17" + "version": "==2024.8.30" }, "cffi": { "hashes": [ @@ -2251,12 +2251,12 @@ }, "certifi": { "hashes": [ - "sha256:9b469f3a900bf28dc19b8cfbf8019bf47f7fdd1a65a1d4ffb98fc14166beb4d1", - "sha256:e036ab49d5b79556f99cfc2d9320b34cfbe5be05c5871b51de9329f0603b0474" + "sha256:922820b53db7a7257ffbda3f597266d435245903d80737e34f8a45ff3e3230d8", + "sha256:bec941d2aa8195e248a60b31ff9f0558284cf01a52591ceda73ea9afffd69fd9" ], "index": "pypi", "markers": "python_version >= '3.6'", - "version": "==2023.11.17" + "version": "==2024.8.30" }, "cffi": { "hashes": [ @@ -3403,11 +3403,11 @@ }, "trove-classifiers": { "hashes": [ - "sha256:3529595c443758741a8e34af06704d7468fd92ad77d17f9159a6f3a6815a64c2", - "sha256:380dcc30d5df74933223108c58a035e8bacab1de39977692f8fe7b37f0531d54" + "sha256:8a3570c880f7ca2ffebbc91806aee3e8f5cd221422dfc8cd2cad4b48789ac69b", + "sha256:9b02a4cb49bd2e85c13e728ee461f4f332d6334736b18d61254c964643687144" ], "index": "pypi", - "version": "==2024.7.1" + "version": "==2024.10.16" }, "twine": { "hashes": [ diff --git a/an_website/backdoor_client.py b/an_website/backdoor_client.py index 810df8d61..69b52e55c 100755 --- a/an_website/backdoor_client.py +++ b/an_website/backdoor_client.py @@ -676,8 +676,6 @@ def _run_and_print( # type: ignore[no-any-unimported] ) traceback.print_exc() - # pylint: disable=redefined-variable-type - # patch the reader console to use our function rc_execute = ReaderConsole.execute ReaderConsole.execute = _run_and_print diff --git a/an_website/utils/base_request_handler.py b/an_website/utils/base_request_handler.py index a15db903e..9bfbaa2e7 100644 --- a/an_website/utils/base_request_handler.py +++ b/an_website/utils/base_request_handler.py @@ -1052,7 +1052,12 @@ def set_default_headers(self) -> None: self.set_header("Cross-Origin-Resource-Policy", "cross-origin") self.set_header( "Permissions-Policy", - "browsing-topics=(),identity-credentials-get=(),join-ad-interest-group=(),private-state-token-issuance=(),private-state-token-redemption=(),run-ad-auction=()", + "browsing-topics=()," + "identity-credentials-get=()," + "join-ad-interest-group=()," + "private-state-token-issuance=()," + "private-state-token-redemption=()," + "run-ad-auction=()", ) self.set_header("Referrer-Policy", "same-origin") self.set_header( diff --git a/deno.json b/deno.json index fee66496c..e41994229 100644 --- a/deno.json +++ b/deno.json @@ -30,7 +30,7 @@ "esbuild": "https://deno.land/x/esbuild@v0.20.2/wasm.js", "std/": "https://deno.land/std@0.224.0/" }, - "nodeModulesDir": false, + "nodeModulesDir": "none", "lint": { "include": [ "scripts/deno" diff --git a/dprint.json b/dprint.json index bcfbc73c3..4ddc88ded 100644 --- a/dprint.json +++ b/dprint.json @@ -25,11 +25,10 @@ "style/snow.css" ], "plugins": [ - "https://plugins.dprint.dev/typescript-0.91.6.wasm", - "https://plugins.dprint.dev/json-0.19.3.wasm", - "https://plugins.dprint.dev/markdown-0.17.2.wasm", - "https://plugins.dprint.dev/toml-0.6.2.wasm", + "https://plugins.dprint.dev/typescript-0.93.1.wasm", + "https://plugins.dprint.dev/json-0.19.4.wasm", + "https://plugins.dprint.dev/markdown-0.17.8.wasm", + "https://plugins.dprint.dev/toml-0.6.3.wasm", "https://plugins.dprint.dev/dockerfile-0.3.2.wasm" - // "https://plugins.dprint.dev/disrupted/css-0.2.2.wasm" (currently broken) ] } diff --git a/package.json b/package.json index 1cbf57594..c3c9bc3f3 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "typescript-eslint": "^8.12.2", "typescript-eslint-language-service": "^5.0.5" }, - "packageManager": "pnpm@9.12.3+sha512.cce0f9de9c5a7c95bef944169cc5dfe8741abfb145078c0d508b868056848a87c81e626246cb60967cbd7fd29a6c062ef73ff840d96b3c86c40ac92cf4a813ee", + "packageManager": "pnpm@10.0.0-alpha.0+sha512.856941ef22665d2f3e41c04e8d86ed757ef057fb2bc35011698bfa988ef5817cc1cdd28bb883e7f23f0568c75de5544d4750211d4276b9ba6d55369eb207a549", "engines": { "npm": "0", "yarn": "0" diff --git a/patches/ts-node@10.9.1.patch b/patches/ts-node@10.9.1.patch new file mode 100644 index 000000000..da09bd1ff --- /dev/null +++ b/patches/ts-node@10.9.1.patch @@ -0,0 +1,36 @@ +diff --git a/dist/ts-compiler-types.js.map b/dist/ts-compiler-types.js.map +index eda53f3093c2e3308ba73e8a2aeafed4c3522b98..69bad924884e52acffa2bed86c820631684a13a7 100644 +--- a/dist/ts-compiler-types.js.map ++++ b/dist/ts-compiler-types.js.map +@@ -1 +1 @@ +-{"version":3,"file":"ts-compiler-types.js","sourceRoot":"","sources":["../src/ts-compiler-types.ts"],"names":[],"mappings":"","sourcesContent":["import type * as _ts from 'typescript';\n\n/**\n * Common TypeScript interfaces between versions. We endeavour to write ts-node's own code against these types instead\n * of against `import \"typescript\"`, though we are not yet doing this consistently.\n *\n * Sometimes typescript@next adds an API we need to use. But we build ts-node against typescript@latest.\n * In these cases, we must declare that API explicitly here. Our declarations include the newer typescript@next APIs.\n * Importantly, these re-declarations are *not* TypeScript internals. They are public APIs that only exist in\n * pre-release versions of typescript.\n */\nexport interface TSCommon {\n version: typeof _ts.version;\n sys: typeof _ts.sys;\n ScriptSnapshot: typeof _ts.ScriptSnapshot;\n displayPartsToString: typeof _ts.displayPartsToString;\n createLanguageService: typeof _ts.createLanguageService;\n getDefaultLibFilePath: typeof _ts.getDefaultLibFilePath;\n getPreEmitDiagnostics: typeof _ts.getPreEmitDiagnostics;\n flattenDiagnosticMessageText: typeof _ts.flattenDiagnosticMessageText;\n transpileModule: typeof _ts.transpileModule;\n ModuleKind: TSCommon.ModuleKindEnum;\n ScriptTarget: typeof _ts.ScriptTarget;\n findConfigFile: typeof _ts.findConfigFile;\n readConfigFile: typeof _ts.readConfigFile;\n parseJsonConfigFileContent: typeof _ts.parseJsonConfigFileContent;\n formatDiagnostics: typeof _ts.formatDiagnostics;\n formatDiagnosticsWithColorAndContext: typeof _ts.formatDiagnosticsWithColorAndContext;\n\n createDocumentRegistry: typeof _ts.createDocumentRegistry;\n JsxEmit: typeof _ts.JsxEmit;\n createModuleResolutionCache: typeof _ts.createModuleResolutionCache;\n resolveModuleName: typeof _ts.resolveModuleName;\n resolveModuleNameFromCache: typeof _ts.resolveModuleNameFromCache;\n resolveTypeReferenceDirective: typeof _ts.resolveTypeReferenceDirective;\n createIncrementalCompilerHost: typeof _ts.createIncrementalCompilerHost;\n createSourceFile: typeof _ts.createSourceFile;\n getDefaultLibFileName: typeof _ts.getDefaultLibFileName;\n createIncrementalProgram: typeof _ts.createIncrementalProgram;\n createEmitAndSemanticDiagnosticsBuilderProgram: typeof _ts.createEmitAndSemanticDiagnosticsBuilderProgram;\n\n Extension: typeof _ts.Extension;\n ModuleResolutionKind: typeof _ts.ModuleResolutionKind;\n}\nexport namespace TSCommon {\n export interface LanguageServiceHost extends _ts.LanguageServiceHost {}\n export type ModuleResolutionHost = _ts.ModuleResolutionHost;\n export type ParsedCommandLine = _ts.ParsedCommandLine;\n export type ResolvedModule = _ts.ResolvedModule;\n export type ResolvedTypeReferenceDirective = _ts.ResolvedTypeReferenceDirective;\n export type CompilerOptions = _ts.CompilerOptions;\n export type ResolvedProjectReference = _ts.ResolvedProjectReference;\n export type ResolvedModuleWithFailedLookupLocations = _ts.ResolvedModuleWithFailedLookupLocations;\n export type FileReference = _ts.FileReference;\n export type SourceFile = _ts.SourceFile;\n // Hack until we start building against TS >= 4.7.0\n export type ModuleKindEnum = typeof _ts.ModuleKind & {\n Node16: typeof _ts.ModuleKind extends { Node16: any } ? typeof _ts.ModuleKind['Node16'] : 100;\n };\n // Can't figure out how to re-export an enum\n // `export import ... =` complains that _ts is type-only import\n export namespace ModuleKind {\n export type CommonJS = _ts.ModuleKind.CommonJS;\n export type ESNext = _ts.ModuleKind.ESNext;\n }\n}\n\n/**\n * Compiler APIs we use that are marked internal and not included in TypeScript's public API declarations\n * @internal\n */\nexport interface TSInternal {\n // https://github.com/microsoft/TypeScript/blob/4a34294908bed6701dcba2456ca7ac5eafe0ddff/src/compiler/core.ts#L1906-L1909\n createGetCanonicalFileName(useCaseSensitiveFileNames: boolean): TSInternal.GetCanonicalFileName;\n // https://github.com/microsoft/TypeScript/blob/c117c266e09c80e8a06b24a6e94b9d018f5fae6b/src/compiler/commandLineParser.ts#L2054\n convertToTSConfig(\n configParseResult: _ts.ParsedCommandLine,\n configFileName: string,\n host: TSInternal.ConvertToTSConfigHost\n ): any;\n libs?: string[];\n Diagnostics: {\n File_0_not_found: _ts.DiagnosticMessage;\n };\n createCompilerDiagnostic(message: _ts.DiagnosticMessage, ...args: (string | number | undefined)[]): _ts.Diagnostic;\n nodeModuleNameResolver(\n moduleName: string,\n containingFile: string,\n compilerOptions: _ts.CompilerOptions,\n host: _ts.ModuleResolutionHost,\n cache?: _ts.ModuleResolutionCache,\n redirectedReference?: _ts.ResolvedProjectReference,\n lookupConfig?: boolean\n ): _ts.ResolvedModuleWithFailedLookupLocations;\n // Added in TS 4.7\n getModeForFileReference?: (\n ref: _ts.FileReference | string,\n containingFileMode: _ts.SourceFile['impliedNodeFormat']\n ) => _ts.SourceFile['impliedNodeFormat'];\n // TODO do we need these? Which TS version adds them?\n getPatternFromSpec(spec: string, basePath: string, usage: 'files' | 'directories' | 'exclude'): string | undefined;\n getRegularExpressionForWildcard(\n specs: readonly string[] | undefined,\n basePath: string,\n usage: 'files' | 'directories' | 'exclude'\n ): string | undefined;\n // Added in TS 4.7\n getModeForResolutionAtIndex?(\n file: TSInternal.SourceFileImportsList,\n index: number\n ): _ts.SourceFile['impliedNodeFormat'];\n}\n/** @internal */\nexport namespace TSInternal {\n // https://github.com/microsoft/TypeScript/blob/4a34294908bed6701dcba2456ca7ac5eafe0ddff/src/compiler/core.ts#L1906\n export type GetCanonicalFileName = (fileName: string) => string;\n // https://github.com/microsoft/TypeScript/blob/c117c266e09c80e8a06b24a6e94b9d018f5fae6b/src/compiler/commandLineParser.ts#L2041\n export interface ConvertToTSConfigHost {\n getCurrentDirectory(): string;\n useCaseSensitiveFileNames: boolean;\n }\n // Note: is only a partial declaration, TS sources declare other fields\n export interface SourceFileImportsList {\n impliedNodeFormat?: TSCommon.SourceFile['impliedNodeFormat'];\n }\n}\n"]} +\ No newline at end of file ++{"version":3,"file":"ts-compiler-types.js","sourceRoot":"","sources":["../src/ts-compiler-types.ts"],"names":[],"mappings":"","sourcesContent":["import type * as _ts from 'typescript';\n\n/**\n * Common TypeScript interfaces between versions. We endeavour to write ts-node's own code against these types instead\n * of against `import \"typescript\"`, though we are not yet doing this consistently.\n *\n * Sometimes typescript@next adds an API we need to use. But we build ts-node against typescript@latest.\n * In these cases, we must declare that API explicitly here. Our declarations include the newer typescript@next APIs.\n * Importantly, these re-declarations are *not* TypeScript internals. They are public APIs that only exist in\n * pre-release versions of typescript.\n */\nexport interface TSCommon {\n version: typeof _ts.version;\n sys: typeof _ts.sys;\n ScriptSnapshot: typeof _ts.ScriptSnapshot;\n displayPartsToString: typeof _ts.displayPartsToString;\n createLanguageService: typeof _ts.createLanguageService;\n getDefaultLibFilePath: typeof _ts.getDefaultLibFilePath;\n getPreEmitDiagnostics: typeof _ts.getPreEmitDiagnostics;\n flattenDiagnosticMessageText: typeof _ts.flattenDiagnosticMessageText;\n transpileModule: typeof _ts.transpileModule;\n ModuleKind: TSCommon.ModuleKindEnum;\n ScriptTarget: typeof _ts.ScriptTarget;\n findConfigFile: typeof _ts.findConfigFile;\n readConfigFile: typeof _ts.readConfigFile;\n parseJsonConfigFileContent: typeof _ts.parseJsonConfigFileContent;\n formatDiagnostics: typeof _ts.formatDiagnostics;\n formatDiagnosticsWithColorAndContext: typeof _ts.formatDiagnosticsWithColorAndContext;\n\n createDocumentRegistry: typeof _ts.createDocumentRegistry;\n JsxEmit: typeof _ts.JsxEmit;\n createModuleResolutionCache: typeof _ts.createModuleResolutionCache;\n resolveModuleName: typeof _ts.resolveModuleName;\n resolveModuleNameFromCache: typeof _ts.resolveModuleNameFromCache;\n resolveTypeReferenceDirective: typeof _ts.resolveTypeReferenceDirective;\n createIncrementalCompilerHost: typeof _ts.createIncrementalCompilerHost;\n createSourceFile: typeof _ts.createSourceFile;\n getDefaultLibFileName: typeof _ts.getDefaultLibFileName;\n createIncrementalProgram: typeof _ts.createIncrementalProgram;\n createEmitAndSemanticDiagnosticsBuilderProgram: typeof _ts.createEmitAndSemanticDiagnosticsBuilderProgram;\n\n Extension: typeof _ts.Extension;\n ModuleResolutionKind: typeof _ts.ModuleResolutionKind;\n}\nexport namespace TSCommon {\n export interface LanguageServiceHost extends _ts.LanguageServiceHost {}\n export type ModuleResolutionHost = _ts.ModuleResolutionHost;\n export type ParsedCommandLine = _ts.ParsedCommandLine;\n export type ResolvedModule = _ts.ResolvedModule;\n export type ResolvedTypeReferenceDirective = _ts.ResolvedTypeReferenceDirective;\n export type CompilerOptions = _ts.CompilerOptions;\n export type ResolvedProjectReference = _ts.ResolvedProjectReference;\n export type ResolvedModuleWithFailedLookupLocations = _ts.ResolvedModuleWithFailedLookupLocations;\n export type FileReference = _ts.FileReference;\n export type SourceFile = _ts.SourceFile;\n // Hack until we start building against TS >= 4.7.0\n export type ModuleKindEnum = typeof _ts.ModuleKind & {\n Node16: typeof _ts.ModuleKind extends { Node16: any } ? typeof _ts.ModuleKind['Node16'] : 100;\n };\n // Can't figure out how to re-export an enum\n // `export import ... =` complains that _ts is type-only import\n export namespace ModuleKind {\n export type CommonJS = _ts.ModuleKind.CommonJS;\n export type ESNext = _ts.ModuleKind.ESNext;\n }\n}\n\n/**\n * Compiler APIs we use that are marked internal and not included in TypeScript's public API declarations\n * @internal\n */\nexport interface TSInternal {\n // https://github.com/microsoft/TypeScript/blob/4a34294908bed6701dcba2456ca7ac5eafe0ddff/src/compiler/core.ts#L1906-L1909\n createGetCanonicalFileName(useCaseSensitiveFileNames: boolean): TSInternal.GetCanonicalFileName;\n // https://github.com/microsoft/TypeScript/blob/c117c266e09c80e8a06b24a6e94b9d018f5fae6b/src/compiler/commandLineParser.ts#L2054\n convertToTSConfig(\n configParseResult: _ts.ParsedCommandLine,\n configFileName: string,\n host: TSInternal.ConvertToTSConfigHost\n ): any;\n libs?: string[];\n Diagnostics: {\n File_0_not_found: _ts.DiagnosticMessage;\n };\n createCompilerDiagnostic(message: _ts.DiagnosticMessage, ...args: (string | number | undefined)[]): _ts.Diagnostic;\n nodeModuleNameResolver(\n moduleName: string,\n containingFile: string,\n compilerOptions: _ts.CompilerOptions,\n host: _ts.ModuleResolutionHost,\n cache?: _ts.ModuleResolutionCache,\n redirectedReference?: _ts.ResolvedProjectReference,\n conditionsOrIsConfigLookup?: string[] | boolean, // `conditions` parameter added in TS 5.3\n isConfigLookup?: boolean\n ): _ts.ResolvedModuleWithFailedLookupLocations;\n // Added in TS 4.7\n getModeForFileReference?: (\n ref: _ts.FileReference | string,\n containingFileMode: _ts.SourceFile['impliedNodeFormat']\n ) => _ts.SourceFile['impliedNodeFormat'];\n // TODO do we need these? Which TS version adds them?\n getPatternFromSpec(spec: string, basePath: string, usage: 'files' | 'directories' | 'exclude'): string | undefined;\n getRegularExpressionForWildcard(\n specs: readonly string[] | undefined,\n basePath: string,\n usage: 'files' | 'directories' | 'exclude'\n ): string | undefined;\n // Added in TS 4.7\n getModeForResolutionAtIndex?(\n file: TSInternal.SourceFileImportsList,\n index: number\n ): _ts.SourceFile['impliedNodeFormat'];\n}\n/** @internal */\nexport namespace TSInternal {\n // https://github.com/microsoft/TypeScript/blob/4a34294908bed6701dcba2456ca7ac5eafe0ddff/src/compiler/core.ts#L1906\n export type GetCanonicalFileName = (fileName: string) => string;\n // https://github.com/microsoft/TypeScript/blob/c117c266e09c80e8a06b24a6e94b9d018f5fae6b/src/compiler/commandLineParser.ts#L2041\n export interface ConvertToTSConfigHost {\n getCurrentDirectory(): string;\n useCaseSensitiveFileNames: boolean;\n }\n // Note: is only a partial declaration, TS sources declare other fields\n export interface SourceFileImportsList {\n impliedNodeFormat?: TSCommon.SourceFile['impliedNodeFormat'];\n }\n}\n"]} +\ No newline at end of file +diff --git a/dist/ts-internals.js b/dist/ts-internals.js +index 6c111ff9773879a1a34f87b48240bba3affc3e9a..34fd7a0e077cbe8599ea10220a7fbfa3b0e6497e 100644 +--- a/dist/ts-internals.js ++++ b/dist/ts-internals.js +@@ -34,10 +34,12 @@ function createTsInternalsUncached(_ts) { + return extendedConfigPath; + } + // If the path isn't a rooted or relative path, resolve like a module ++ const tsGte5_3_0 = (0, util_1.versionGteLt)(ts.version, '5.3.0'); + const resolved = ts.nodeModuleNameResolver(extendedConfig, combinePaths(basePath, 'tsconfig.json'), { moduleResolution: ts.ModuleResolutionKind.NodeJs }, host, + /*cache*/ undefined, + /*projectRefs*/ undefined, +- /*lookupConfig*/ true); ++ /*conditionsOrIsConfigLookup*/ tsGte5_3_0 ? undefined : true, ++ /*isConfigLookup*/ tsGte5_3_0 ? true : undefined); + if (resolved.resolvedModule) { + return resolved.resolvedModule.resolvedFileName; + } +diff --git a/dist/ts-internals.js.map b/dist/ts-internals.js.map +index 4ec7c40267f687e6e4eee5578d58e228f24a9bbd..45da0c5f0612d202a650098497d24ec214cf6620 100644 +--- a/dist/ts-internals.js.map ++++ b/dist/ts-internals.js.map +@@ -1 +1 @@ +-{"version":3,"file":"ts-internals.js","sourceRoot":"","sources":["../src/ts-internals.ts"],"names":[],"mappings":";;;AAAA,+BAA2C;AAC3C,iCAAwD;AAIxD,gBAAgB;AACH,QAAA,iBAAiB,GAAG,IAAA,mBAAY,EAAC,yBAAyB,CAAC,CAAC;AACzE;;;;;;;;GAQG;AACH,SAAS,yBAAyB,CAAC,GAAa;IAC9C,MAAM,EAAE,GAAG,GAA4B,CAAC;IACxC;;;OAGG;IACH,SAAS,oBAAoB,CAC3B,cAAsB,EACtB,IAAyB,EACzB,QAAgB,EAChB,MAAgC,EAChC,gBAAmF;QAEnF,cAAc,GAAG,IAAA,uBAAgB,EAAC,cAAc,CAAC,CAAC;QAClD,IAAI,gBAAgB,CAAC,cAAc,CAAC,IAAI,UAAU,CAAC,cAAc,EAAE,IAAI,CAAC,IAAI,UAAU,CAAC,cAAc,EAAE,KAAK,CAAC,EAAE;YAC7G,IAAI,kBAAkB,GAAG,yBAAyB,CAAC,cAAc,EAAE,QAAQ,CAAC,CAAC;YAC7E,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,kBAAkB,CAAC,IAAI,CAAC,QAAQ,CAAC,kBAAkB,EAAE,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE;gBAC5F,kBAAkB,GAAG,GAAG,kBAAkB,OAAO,CAAC;gBAClD,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,kBAAkB,CAAC,EAAE;oBACxC,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,EAAE,CAAC,WAAW,CAAC,gBAAgB,EAAE,cAAc,CAAC,CAAC,CAAC;oBAC/E,OAAO,SAAS,CAAC;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EAAE,UAAU,CAAC,CAAC;IAC3C,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAC;IAClE,IAAI,IAAI,CAAC,MAAM,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC;QAAE,IAAI,CAAC,GAAG,EAAE,CAAC;IACtD,OAAO,CAAC,IAAI,EAAE,GAAG,IAAI,CAAC,CAAC;AACzB,CAAC;AACD,SAAS,eAAe,CAAI,KAAmB;IAC7C,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;AAClE,CAAC;AACD,SAAS,IAAI,CAAI,KAAmB;IAClC,oCAAoC;IACpC,OAAO,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;AACjC,CAAC;AACD,SAAS,wBAAwB,CAAC,KAAa,EAAE,2BAAmC;IAClF,OAAO,KAAK,KAAK,GAAG,CAAC,CAAC,CAAC,2BAA2B,CAAC,CAAC,CAAC,KAAK,KAAK,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,GAAG,KAAK,CAAC;AAC7F,CAAC;AACD;;;GAGG;AACH,SAAS,cAAc,CAAC,iBAAyB;IAC/C,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC;AAC1C,CAAC","sourcesContent":["import { isAbsolute, resolve } from 'path';\nimport { cachedLookup, normalizeSlashes } from './util';\nimport type * as _ts from 'typescript';\nimport type { TSCommon, TSInternal } from './ts-compiler-types';\n\n/** @internal */\nexport const createTsInternals = cachedLookup(createTsInternalsUncached);\n/**\n * Given a reference to the TS compiler, return some TS internal functions that we\n * could not or did not want to grab off the `ts` object.\n * These have been copy-pasted from TS's source and tweaked as necessary.\n *\n * NOTE: This factory returns *only* functions which need a reference to the TS\n * compiler. Other functions do not need a reference to the TS compiler so are\n * exported directly from this file.\n */\nfunction createTsInternalsUncached(_ts: TSCommon) {\n const ts = _ts as TSCommon & TSInternal;\n /**\n * Copied from:\n * https://github.com/microsoft/TypeScript/blob/v4.3.2/src/compiler/commandLineParser.ts#L2821-L2846\n */\n function getExtendsConfigPath(\n extendedConfig: string,\n host: _ts.ParseConfigHost,\n basePath: string,\n errors: _ts.Push<_ts.Diagnostic>,\n createDiagnostic: (message: _ts.DiagnosticMessage, arg1?: string) => _ts.Diagnostic\n ) {\n extendedConfig = normalizeSlashes(extendedConfig);\n if (isRootedDiskPath(extendedConfig) || startsWith(extendedConfig, './') || startsWith(extendedConfig, '../')) {\n let extendedConfigPath = getNormalizedAbsolutePath(extendedConfig, basePath);\n if (!host.fileExists(extendedConfigPath) && !endsWith(extendedConfigPath, ts.Extension.Json)) {\n extendedConfigPath = `${extendedConfigPath}.json`;\n if (!host.fileExists(extendedConfigPath)) {\n errors.push(createDiagnostic(ts.Diagnostics.File_0_not_found, extendedConfig));\n return undefined;\n }\n }\n return extendedConfigPath;\n }\n // If the path isn't a rooted or relative path, resolve like a module\n const resolved = ts.nodeModuleNameResolver(\n extendedConfig,\n combinePaths(basePath, 'tsconfig.json'),\n { moduleResolution: ts.ModuleResolutionKind.NodeJs },\n host,\n /*cache*/ undefined,\n /*projectRefs*/ undefined,\n /*lookupConfig*/ true\n );\n if (resolved.resolvedModule) {\n return resolved.resolvedModule.resolvedFileName;\n }\n errors.push(createDiagnostic(ts.Diagnostics.File_0_not_found, extendedConfig));\n return undefined;\n }\n\n return { getExtendsConfigPath };\n}\n\n// These functions have alternative implementation to avoid copying too much from TS\nfunction isRootedDiskPath(path: string) {\n return isAbsolute(path);\n}\nfunction combinePaths(path: string, ...paths: (string | undefined)[]): string {\n return normalizeSlashes(resolve(path, ...(paths.filter((path) => path) as string[])));\n}\nfunction getNormalizedAbsolutePath(fileName: string, currentDirectory: string | undefined) {\n return normalizeSlashes(currentDirectory != null ? resolve(currentDirectory!, fileName) : resolve(fileName));\n}\n\nfunction startsWith(str: string, prefix: string): boolean {\n return str.lastIndexOf(prefix, 0) === 0;\n}\n\nfunction endsWith(str: string, suffix: string): boolean {\n const expectedPos = str.length - suffix.length;\n return expectedPos >= 0 && str.indexOf(suffix, expectedPos) === expectedPos;\n}\n// Reserved characters, forces escaping of any non-word (or digit), non-whitespace character.\n// It may be inefficient (we could just match (/[-[\\]{}()*+?.,\\\\^$|#\\s]/g), but this is future\n// proof.\nconst reservedCharacterPattern = /[^\\w\\s\\/]/g;\n\n/**\n * @internal\n * See also: getRegularExpressionForWildcard, which seems to do almost the same thing\n */\nexport function getPatternFromSpec(spec: string, basePath: string) {\n const pattern = spec && getSubPatternFromSpec(spec, basePath, excludeMatcher);\n return pattern && `^(${pattern})${'($|/)'}`;\n}\nfunction getSubPatternFromSpec(\n spec: string,\n basePath: string,\n { singleAsteriskRegexFragment, doubleAsteriskRegexFragment, replaceWildcardCharacter }: WildcardMatcher\n): string {\n let subpattern = '';\n let hasWrittenComponent = false;\n const components = getNormalizedPathComponents(spec, basePath);\n const lastComponent = last(components);\n\n // getNormalizedPathComponents includes the separator for the root component.\n // We need to remove to create our regex correctly.\n components[0] = removeTrailingDirectorySeparator(components[0]);\n\n if (isImplicitGlob(lastComponent)) {\n components.push('**', '*');\n }\n\n let optionalCount = 0;\n for (let component of components) {\n if (component === '**') {\n subpattern += doubleAsteriskRegexFragment;\n } else {\n if (hasWrittenComponent) {\n subpattern += directorySeparator;\n }\n subpattern += component.replace(reservedCharacterPattern, replaceWildcardCharacter);\n }\n\n hasWrittenComponent = true;\n }\n\n while (optionalCount > 0) {\n subpattern += ')?';\n optionalCount--;\n }\n\n return subpattern;\n}\ninterface WildcardMatcher {\n singleAsteriskRegexFragment: string;\n doubleAsteriskRegexFragment: string;\n replaceWildcardCharacter: (match: string) => string;\n}\nconst directoriesMatcher: WildcardMatcher = {\n singleAsteriskRegexFragment: '[^/]*',\n /**\n * Regex for the ** wildcard. Matches any num of subdirectories. When used for including\n * files or directories, does not match subdirectories that start with a . character\n */\n doubleAsteriskRegexFragment: `(/[^/.][^/]*)*?`,\n replaceWildcardCharacter: (match) => replaceWildcardCharacter(match, directoriesMatcher.singleAsteriskRegexFragment),\n};\nconst excludeMatcher: WildcardMatcher = {\n singleAsteriskRegexFragment: '[^/]*',\n doubleAsteriskRegexFragment: '(/.+?)?',\n replaceWildcardCharacter: (match) => replaceWildcardCharacter(match, excludeMatcher.singleAsteriskRegexFragment),\n};\nfunction getNormalizedPathComponents(path: string, currentDirectory: string | undefined) {\n return reducePathComponents(getPathComponents(path, currentDirectory));\n}\nfunction getPathComponents(path: string, currentDirectory = '') {\n path = combinePaths(currentDirectory, path);\n return pathComponents(path, getRootLength(path));\n}\nfunction reducePathComponents(components: readonly string[]) {\n if (!some(components)) return [];\n const reduced = [components[0]];\n for (let i = 1; i < components.length; i++) {\n const component = components[i];\n if (!component) continue;\n if (component === '.') continue;\n if (component === '..') {\n if (reduced.length > 1) {\n if (reduced[reduced.length - 1] !== '..') {\n reduced.pop();\n continue;\n }\n } else if (reduced[0]) continue;\n }\n reduced.push(component);\n }\n return reduced;\n}\nfunction getRootLength(path: string) {\n const rootLength = getEncodedRootLength(path);\n return rootLength < 0 ? ~rootLength : rootLength;\n}\nfunction getEncodedRootLength(path: string): number {\n if (!path) return 0;\n const ch0 = path.charCodeAt(0);\n\n // POSIX or UNC\n if (ch0 === CharacterCodes.slash || ch0 === CharacterCodes.backslash) {\n if (path.charCodeAt(1) !== ch0) return 1; // POSIX: \"/\" (or non-normalized \"\\\")\n\n const p1 = path.indexOf(ch0 === CharacterCodes.slash ? directorySeparator : altDirectorySeparator, 2);\n if (p1 < 0) return path.length; // UNC: \"//server\" or \"\\\\server\"\n\n return p1 + 1; // UNC: \"//server/\" or \"\\\\server\\\"\n }\n\n // DOS\n if (isVolumeCharacter(ch0) && path.charCodeAt(1) === CharacterCodes.colon) {\n const ch2 = path.charCodeAt(2);\n if (ch2 === CharacterCodes.slash || ch2 === CharacterCodes.backslash) return 3; // DOS: \"c:/\" or \"c:\\\"\n if (path.length === 2) return 2; // DOS: \"c:\" (but not \"c:d\")\n }\n\n // URL\n const schemeEnd = path.indexOf(urlSchemeSeparator);\n if (schemeEnd !== -1) {\n const authorityStart = schemeEnd + urlSchemeSeparator.length;\n const authorityEnd = path.indexOf(directorySeparator, authorityStart);\n if (authorityEnd !== -1) {\n // URL: \"file:///\", \"file://server/\", \"file://server/path\"\n // For local \"file\" URLs, include the leading DOS volume (if present).\n // Per https://www.ietf.org/rfc/rfc1738.txt, a host of \"\" or \"localhost\" is a\n // special case interpreted as \"the machine from which the URL is being interpreted\".\n const scheme = path.slice(0, schemeEnd);\n const authority = path.slice(authorityStart, authorityEnd);\n if (\n scheme === 'file' &&\n (authority === '' || authority === 'localhost') &&\n isVolumeCharacter(path.charCodeAt(authorityEnd + 1))\n ) {\n const volumeSeparatorEnd = getFileUrlVolumeSeparatorEnd(path, authorityEnd + 2);\n if (volumeSeparatorEnd !== -1) {\n if (path.charCodeAt(volumeSeparatorEnd) === CharacterCodes.slash) {\n // URL: \"file:///c:/\", \"file://localhost/c:/\", \"file:///c%3a/\", \"file://localhost/c%3a/\"\n return ~(volumeSeparatorEnd + 1);\n }\n if (volumeSeparatorEnd === path.length) {\n // URL: \"file:///c:\", \"file://localhost/c:\", \"file:///c$3a\", \"file://localhost/c%3a\"\n // but not \"file:///c:d\" or \"file:///c%3ad\"\n return ~volumeSeparatorEnd;\n }\n }\n }\n return ~(authorityEnd + 1); // URL: \"file://server/\", \"http://server/\"\n }\n return ~path.length; // URL: \"file://server\", \"http://server\"\n }\n\n // relative\n return 0;\n}\nfunction ensureTrailingDirectorySeparator(path: string) {\n if (!hasTrailingDirectorySeparator(path)) {\n return path + directorySeparator;\n }\n\n return path;\n}\nfunction hasTrailingDirectorySeparator(path: string) {\n return path.length > 0 && isAnyDirectorySeparator(path.charCodeAt(path.length - 1));\n}\nfunction isAnyDirectorySeparator(charCode: number): boolean {\n return charCode === CharacterCodes.slash || charCode === CharacterCodes.backslash;\n}\nfunction removeTrailingDirectorySeparator(path: string) {\n if (hasTrailingDirectorySeparator(path)) {\n return path.substr(0, path.length - 1);\n }\n\n return path;\n}\nconst directorySeparator = '/';\nconst altDirectorySeparator = '\\\\';\nconst urlSchemeSeparator = '://';\nfunction isVolumeCharacter(charCode: number) {\n return (\n (charCode >= CharacterCodes.a && charCode <= CharacterCodes.z) ||\n (charCode >= CharacterCodes.A && charCode <= CharacterCodes.Z)\n );\n}\nfunction getFileUrlVolumeSeparatorEnd(url: string, start: number) {\n const ch0 = url.charCodeAt(start);\n if (ch0 === CharacterCodes.colon) return start + 1;\n if (ch0 === CharacterCodes.percent && url.charCodeAt(start + 1) === CharacterCodes._3) {\n const ch2 = url.charCodeAt(start + 2);\n if (ch2 === CharacterCodes.a || ch2 === CharacterCodes.A) return start + 3;\n }\n return -1;\n}\nfunction some(array: readonly T[] | undefined): array is readonly T[];\nfunction some(array: readonly T[] | undefined, predicate: (value: T) => boolean): boolean;\nfunction some(array: readonly T[] | undefined, predicate?: (value: T) => boolean): boolean {\n if (array) {\n if (predicate) {\n for (const v of array) {\n if (predicate(v)) {\n return true;\n }\n }\n } else {\n return array.length > 0;\n }\n }\n return false;\n}\n/* @internal */\nconst enum CharacterCodes {\n _3 = 0x33,\n a = 0x61,\n z = 0x7a,\n A = 0x41,\n Z = 0x5a,\n asterisk = 0x2a, // *\n backslash = 0x5c, // \\\n colon = 0x3a, // :\n percent = 0x25, // %\n question = 0x3f, // ?\n slash = 0x2f, // /\n}\nfunction pathComponents(path: string, rootLength: number) {\n const root = path.substring(0, rootLength);\n const rest = path.substring(rootLength).split(directorySeparator);\n if (rest.length && !lastOrUndefined(rest)) rest.pop();\n return [root, ...rest];\n}\nfunction lastOrUndefined(array: readonly T[]): T | undefined {\n return array.length === 0 ? undefined : array[array.length - 1];\n}\nfunction last(array: readonly T[]): T {\n // Debug.assert(array.length !== 0);\n return array[array.length - 1];\n}\nfunction replaceWildcardCharacter(match: string, singleAsteriskRegexFragment: string) {\n return match === '*' ? singleAsteriskRegexFragment : match === '?' ? '[^/]' : '\\\\' + match;\n}\n/**\n * An \"includes\" path \"foo\" is implicitly a glob \"foo/** /*\" (without the space) if its last component has no extension,\n * and does not contain any glob characters itself.\n */\nfunction isImplicitGlob(lastPathComponent: string): boolean {\n return !/[.*?]/.test(lastPathComponent);\n}\n"]} +\ No newline at end of file ++{"version":3,"file":"ts-internals.js","sourceRoot":"","sources":["../src/ts-internals.ts"],"names":[],"mappings":";;;AAAA,+BAA2C;AAC3C,iCAAsE;AAItE,gBAAgB;AACH,QAAA,iBAAiB,GAAG,IAAA,mBAAY,EAAC,yBAAyB,CAAC,CAAC;AACzE;;;;;;;;GAQG;AACH,SAAS,yBAAyB,CAAC,GAAa;IAC9C,MAAM,EAAE,GAAG,GAA4B,CAAC;IACxC;;;OAGG;IACH,SAAS,oBAAoB,CAC3B,cAAsB,EACtB,IAAyB,EACzB,QAAgB,EAChB,MAAgC,EAChC,gBAAmF;QAEnF,cAAc,GAAG,IAAA,uBAAgB,EAAC,cAAc,CAAC,CAAC;QAClD,IAAI,gBAAgB,CAAC,cAAc,CAAC,IAAI,UAAU,CAAC,cAAc,EAAE,IAAI,CAAC,IAAI,UAAU,CAAC,cAAc,EAAE,KAAK,CAAC,EAAE;YAC7G,IAAI,kBAAkB,GAAG,yBAAyB,CAAC,cAAc,EAAE,QAAQ,CAAC,CAAC;YAC7E,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,kBAAkB,CAAC,IAAI,CAAC,QAAQ,CAAC,kBAAkB,EAAE,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE;gBAC5F,kBAAkB,GAAG,GAAG,kBAAkB,OAAO,CAAC;gBAClD,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,kBAAkB,CAAC,EAAE;oBACxC,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,EAAE,CAAC,WAAW,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solute, resolve } from 'path';\nimport { cachedLookup, normalizeSlashes, versionGteLt } from './util';\nimport type * as _ts from 'typescript';\nimport type { TSCommon, TSInternal } from './ts-compiler-types';\n\n/** @internal */\nexport const createTsInternals = cachedLookup(createTsInternalsUncached);\n/**\n * Given a reference to the TS compiler, return some TS internal functions that we\n * could not or did not want to grab off the `ts` object.\n * These have been copy-pasted from TS's source and tweaked as necessary.\n *\n * NOTE: This factory returns *only* functions which need a reference to the TS\n * compiler. Other functions do not need a reference to the TS compiler so are\n * exported directly from this file.\n */\nfunction createTsInternalsUncached(_ts: TSCommon) {\n const ts = _ts as TSCommon & TSInternal;\n /**\n * Copied from:\n * https://github.com/microsoft/TypeScript/blob/v4.3.2/src/compiler/commandLineParser.ts#L2821-L2846\n */\n function getExtendsConfigPath(\n extendedConfig: string,\n host: _ts.ParseConfigHost,\n basePath: string,\n errors: _ts.Push<_ts.Diagnostic>,\n createDiagnostic: (message: _ts.DiagnosticMessage, arg1?: string) => _ts.Diagnostic\n ) {\n extendedConfig = normalizeSlashes(extendedConfig);\n if (isRootedDiskPath(extendedConfig) || startsWith(extendedConfig, './') || startsWith(extendedConfig, '../')) {\n let extendedConfigPath = getNormalizedAbsolutePath(extendedConfig, basePath);\n if (!host.fileExists(extendedConfigPath) && !endsWith(extendedConfigPath, ts.Extension.Json)) {\n extendedConfigPath = `${extendedConfigPath}.json`;\n if (!host.fileExists(extendedConfigPath)) {\n errors.push(createDiagnostic(ts.Diagnostics.File_0_not_found, extendedConfig));\n return undefined;\n }\n }\n return extendedConfigPath;\n }\n // If the path isn't a rooted or relative path, resolve like a module\n const tsGte5_3_0 = versionGteLt(ts.version, '5.3.0');\n const resolved = ts.nodeModuleNameResolver(\n extendedConfig,\n combinePaths(basePath, 'tsconfig.json'),\n { moduleResolution: ts.ModuleResolutionKind.NodeJs },\n host,\n /*cache*/ undefined,\n /*projectRefs*/ undefined,\n /*conditionsOrIsConfigLookup*/ tsGte5_3_0 ? undefined : true,\n /*isConfigLookup*/ tsGte5_3_0 ? true : undefined\n );\n if (resolved.resolvedModule) {\n return resolved.resolvedModule.resolvedFileName;\n }\n errors.push(createDiagnostic(ts.Diagnostics.File_0_not_found, extendedConfig));\n return undefined;\n }\n\n return { getExtendsConfigPath };\n}\n\n// These functions have alternative implementation to avoid copying too much from TS\nfunction isRootedDiskPath(path: string) {\n return isAbsolute(path);\n}\nfunction combinePaths(path: string, ...paths: (string | undefined)[]): string {\n return normalizeSlashes(resolve(path, ...(paths.filter((path) => path) as string[])));\n}\nfunction getNormalizedAbsolutePath(fileName: string, currentDirectory: string | undefined) {\n return normalizeSlashes(currentDirectory != null ? resolve(currentDirectory!, fileName) : resolve(fileName));\n}\n\nfunction startsWith(str: string, prefix: string): boolean {\n return str.lastIndexOf(prefix, 0) === 0;\n}\n\nfunction endsWith(str: string, suffix: string): boolean {\n const expectedPos = str.length - suffix.length;\n return expectedPos >= 0 && str.indexOf(suffix, expectedPos) === expectedPos;\n}\n// Reserved characters, forces escaping of any non-word (or digit), non-whitespace character.\n// It may be inefficient (we could just match (/[-[\\]{}()*+?.,\\\\^$|#\\s]/g), but this is future\n// proof.\nconst reservedCharacterPattern = /[^\\w\\s\\/]/g;\n\n/**\n * @internal\n * See also: getRegularExpressionForWildcard, which seems to do almost the same thing\n */\nexport function getPatternFromSpec(spec: string, basePath: string) {\n const pattern = spec && getSubPatternFromSpec(spec, basePath, excludeMatcher);\n return pattern && `^(${pattern})${'($|/)'}`;\n}\nfunction getSubPatternFromSpec(\n spec: string,\n basePath: string,\n { singleAsteriskRegexFragment, doubleAsteriskRegexFragment, replaceWildcardCharacter }: WildcardMatcher\n): string {\n let subpattern = '';\n let hasWrittenComponent = false;\n const components = getNormalizedPathComponents(spec, basePath);\n const lastComponent = last(components);\n\n // getNormalizedPathComponents includes the separator for the root component.\n // We need to remove to create our regex correctly.\n components[0] = removeTrailingDirectorySeparator(components[0]);\n\n if (isImplicitGlob(lastComponent)) {\n components.push('**', '*');\n }\n\n let optionalCount = 0;\n for (let component of components) {\n if (component === '**') {\n subpattern += doubleAsteriskRegexFragment;\n } else {\n if (hasWrittenComponent) {\n subpattern += directorySeparator;\n }\n subpattern += component.replace(reservedCharacterPattern, replaceWildcardCharacter);\n }\n\n hasWrittenComponent = true;\n }\n\n while (optionalCount > 0) {\n subpattern += ')?';\n optionalCount--;\n }\n\n return subpattern;\n}\ninterface WildcardMatcher {\n singleAsteriskRegexFragment: string;\n doubleAsteriskRegexFragment: string;\n replaceWildcardCharacter: (match: string) => string;\n}\nconst directoriesMatcher: WildcardMatcher = {\n singleAsteriskRegexFragment: '[^/]*',\n /**\n * Regex for the ** wildcard. Matches any num of subdirectories. When used for including\n * files or directories, does not match subdirectories that start with a . character\n */\n doubleAsteriskRegexFragment: `(/[^/.][^/]*)*?`,\n replaceWildcardCharacter: (match) => replaceWildcardCharacter(match, directoriesMatcher.singleAsteriskRegexFragment),\n};\nconst excludeMatcher: WildcardMatcher = {\n singleAsteriskRegexFragment: '[^/]*',\n doubleAsteriskRegexFragment: '(/.+?)?',\n replaceWildcardCharacter: (match) => replaceWildcardCharacter(match, excludeMatcher.singleAsteriskRegexFragment),\n};\nfunction getNormalizedPathComponents(path: string, currentDirectory: string | undefined) {\n return reducePathComponents(getPathComponents(path, currentDirectory));\n}\nfunction getPathComponents(path: string, currentDirectory = '') {\n path = combinePaths(currentDirectory, path);\n return pathComponents(path, getRootLength(path));\n}\nfunction reducePathComponents(components: readonly string[]) {\n if (!some(components)) return [];\n const reduced = [components[0]];\n for (let i = 1; i < components.length; i++) {\n const component = components[i];\n if (!component) continue;\n if (component === '.') continue;\n if (component === '..') {\n if (reduced.length > 1) {\n if (reduced[reduced.length - 1] !== '..') {\n reduced.pop();\n continue;\n }\n } else if (reduced[0]) continue;\n }\n reduced.push(component);\n }\n return reduced;\n}\nfunction getRootLength(path: string) {\n const rootLength = getEncodedRootLength(path);\n return rootLength < 0 ? ~rootLength : rootLength;\n}\nfunction getEncodedRootLength(path: string): number {\n if (!path) return 0;\n const ch0 = path.charCodeAt(0);\n\n // POSIX or UNC\n if (ch0 === CharacterCodes.slash || ch0 === CharacterCodes.backslash) {\n if (path.charCodeAt(1) !== ch0) return 1; // POSIX: \"/\" (or non-normalized \"\\\")\n\n const p1 = path.indexOf(ch0 === CharacterCodes.slash ? directorySeparator : altDirectorySeparator, 2);\n if (p1 < 0) return path.length; // UNC: \"//server\" or \"\\\\server\"\n\n return p1 + 1; // UNC: \"//server/\" or \"\\\\server\\\"\n }\n\n // DOS\n if (isVolumeCharacter(ch0) && path.charCodeAt(1) === CharacterCodes.colon) {\n const ch2 = path.charCodeAt(2);\n if (ch2 === CharacterCodes.slash || ch2 === CharacterCodes.backslash) return 3; // DOS: \"c:/\" or \"c:\\\"\n if (path.length === 2) return 2; // DOS: \"c:\" (but not \"c:d\")\n }\n\n // URL\n const schemeEnd = path.indexOf(urlSchemeSeparator);\n if (schemeEnd !== -1) {\n const authorityStart = schemeEnd + urlSchemeSeparator.length;\n const authorityEnd = path.indexOf(directorySeparator, authorityStart);\n if (authorityEnd !== -1) {\n // URL: \"file:///\", \"file://server/\", \"file://server/path\"\n // For local \"file\" URLs, include the leading DOS volume (if present).\n // Per https://www.ietf.org/rfc/rfc1738.txt, a host of \"\" or \"localhost\" is a\n // special case interpreted as \"the machine from which the URL is being interpreted\".\n const scheme = path.slice(0, schemeEnd);\n const authority = path.slice(authorityStart, authorityEnd);\n if (\n scheme === 'file' &&\n (authority === '' || authority === 'localhost') &&\n isVolumeCharacter(path.charCodeAt(authorityEnd + 1))\n ) {\n const volumeSeparatorEnd = getFileUrlVolumeSeparatorEnd(path, authorityEnd + 2);\n if (volumeSeparatorEnd !== -1) {\n if (path.charCodeAt(volumeSeparatorEnd) === CharacterCodes.slash) {\n // URL: \"file:///c:/\", \"file://localhost/c:/\", \"file:///c%3a/\", \"file://localhost/c%3a/\"\n return ~(volumeSeparatorEnd + 1);\n }\n if (volumeSeparatorEnd === path.length) {\n // URL: \"file:///c:\", \"file://localhost/c:\", \"file:///c$3a\", \"file://localhost/c%3a\"\n // but not \"file:///c:d\" or \"file:///c%3ad\"\n return ~volumeSeparatorEnd;\n }\n }\n }\n return ~(authorityEnd + 1); // URL: \"file://server/\", \"http://server/\"\n }\n return ~path.length; // URL: \"file://server\", \"http://server\"\n }\n\n // relative\n return 0;\n}\nfunction ensureTrailingDirectorySeparator(path: string) {\n if (!hasTrailingDirectorySeparator(path)) {\n return path + directorySeparator;\n }\n\n return path;\n}\nfunction hasTrailingDirectorySeparator(path: string) {\n return path.length > 0 && isAnyDirectorySeparator(path.charCodeAt(path.length - 1));\n}\nfunction isAnyDirectorySeparator(charCode: number): boolean {\n return charCode === CharacterCodes.slash || charCode === CharacterCodes.backslash;\n}\nfunction removeTrailingDirectorySeparator(path: string) {\n if (hasTrailingDirectorySeparator(path)) {\n return path.substr(0, path.length - 1);\n }\n\n return path;\n}\nconst directorySeparator = '/';\nconst altDirectorySeparator = '\\\\';\nconst urlSchemeSeparator = '://';\nfunction isVolumeCharacter(charCode: number) {\n return (\n (charCode >= CharacterCodes.a && charCode <= CharacterCodes.z) ||\n (charCode >= CharacterCodes.A && charCode <= CharacterCodes.Z)\n );\n}\nfunction getFileUrlVolumeSeparatorEnd(url: string, start: number) {\n const ch0 = url.charCodeAt(start);\n if (ch0 === CharacterCodes.colon) return start + 1;\n if (ch0 === CharacterCodes.percent && url.charCodeAt(start + 1) === CharacterCodes._3) {\n const ch2 = url.charCodeAt(start + 2);\n if (ch2 === CharacterCodes.a || ch2 === CharacterCodes.A) return start + 3;\n }\n return -1;\n}\nfunction some(array: readonly T[] | undefined): array is readonly T[];\nfunction some(array: readonly T[] | undefined, predicate: (value: T) => boolean): boolean;\nfunction some(array: readonly T[] | undefined, predicate?: (value: T) => boolean): boolean {\n if (array) {\n if (predicate) {\n for (const v of array) {\n if (predicate(v)) {\n return true;\n }\n }\n } else {\n return array.length > 0;\n }\n }\n return false;\n}\n/* @internal */\nconst enum CharacterCodes {\n _3 = 0x33,\n a = 0x61,\n z = 0x7a,\n A = 0x41,\n Z = 0x5a,\n asterisk = 0x2a, // *\n backslash = 0x5c, // \\\n colon = 0x3a, // :\n percent = 0x25, // %\n question = 0x3f, // ?\n slash = 0x2f, // /\n}\nfunction pathComponents(path: string, rootLength: number) {\n const root = path.substring(0, rootLength);\n const rest = path.substring(rootLength).split(directorySeparator);\n if (rest.length && !lastOrUndefined(rest)) rest.pop();\n return [root, ...rest];\n}\nfunction lastOrUndefined(array: readonly T[]): T | undefined {\n return array.length === 0 ? undefined : array[array.length - 1];\n}\nfunction last(array: readonly T[]): T {\n // Debug.assert(array.length !== 0);\n return array[array.length - 1];\n}\nfunction replaceWildcardCharacter(match: string, singleAsteriskRegexFragment: string) {\n return match === '*' ? singleAsteriskRegexFragment : match === '?' ? '[^/]' : '\\\\' + match;\n}\n/**\n * An \"includes\" path \"foo\" is implicitly a glob \"foo/** /*\" (without the space) if its last component has no extension,\n * and does not contain any glob characters itself.\n */\nfunction isImplicitGlob(lastPathComponent: string): boolean {\n return !/[.*?]/.test(lastPathComponent);\n}\n"]} +\ No newline at end of file diff --git a/pip-constraints.txt b/pip-constraints.txt index b1b720b86..a921fbc20 100644 --- a/pip-constraints.txt +++ b/pip-constraints.txt @@ -5,7 +5,7 @@ autoflake==2.3.1 bandit==1.7.10 black==24.10.0 build==1.2.2.post1 -certifi==2023.11.17 +certifi==2024.8.30 cffi==1.17.1 cfgv==3.4.0 charset-normalizer==3.4.0 @@ -19,7 +19,7 @@ dulwich==0.22.3 faker==22.7.0 filelock==3.16.1 flake8==7.1.1 -flake8-bugbear==24.8.19 +flake8-bugbear==24.10.31 flake8-comprehensions==3.16.0 flake8-docstrings==1.7.0 flake8-no-pep420==2.8.0 @@ -84,7 +84,7 @@ stevedore==5.3.0 time-machine==2.16.0 tomlkit==0.13.2 tornado==6.4.1 -trove-classifiers==2024.7.1 +trove-classifiers==2024.10.16 twine==5.1.1 types-beautifulsoup4==4.12.0.20241020 types-cffi==1.16.0.20240331 @@ -102,7 +102,7 @@ types-regex==2024.9.11.20240912 types-setuptools==69.5.0.20240522 typing-extensions==4.12.2 urllib3==2.2.3 -virtualenv==20.27.0 +virtualenv==20.27.1 webencodings==0.5.1 zipp==3.20.2 accept-types==0.4.1 @@ -121,7 +121,7 @@ ecs-logging==2.2.0 elastic-apm==6.23.0 elastic-enterprise-search==8.11.0 elastic-transport==8.15.1 -elasticsearch==8.12.1 +elasticsearch==8.15.1 emoji==2.14.0 frozenlist==1.5.0 funcparserlib==1.0.1 @@ -157,4 +157,4 @@ tzdata==2024.2 ultradict==0.0.6 uvloop==0.21.0 wrapt==1.16.0 -yarl==1.16.0 +yarl==1.17.1 diff --git a/pip-dev-requirements.txt b/pip-dev-requirements.txt index 9a1653dcf..4407e132d 100644 --- a/pip-dev-requirements.txt +++ b/pip-dev-requirements.txt @@ -5,7 +5,7 @@ autoflake==2.3.1; python_version >= '3.8' bandit[toml]==1.7.10; python_version >= '3.8' black==24.10.0; python_version >= '3.9' build==1.2.2.post1; python_version >= '3.8' -certifi==2023.11.17; python_version >= '3.6' +certifi==2024.8.30; python_version >= '3.6' cffi==1.17.1; python_version >= '3.8' cfgv==3.4.0; python_version >= '3.8' charset-normalizer==3.4.0; python_full_version >= '3.7.0' @@ -19,7 +19,7 @@ dulwich==0.22.3; python_version >= '3.8' faker==22.7.0; python_version >= '3.8' filelock==3.16.1; python_version >= '3.8' flake8==7.1.1; python_full_version >= '3.8.1' -flake8-bugbear==24.8.19; python_full_version >= '3.8.1' +flake8-bugbear==24.10.31; python_full_version >= '3.8.1' flake8-comprehensions==3.16.0; python_version >= '3.9' flake8-docstrings==1.7.0; python_version >= '3.7' flake8-no-pep420==2.8.0; python_version >= '3.9' @@ -84,7 +84,7 @@ stevedore==5.3.0; python_version >= '3.8' time-machine==2.16.0; python_version >= '3.9' tomlkit==0.13.2; python_version >= '3.8' tornado==6.4.1; python_version >= '3.8' -trove-classifiers==2024.7.1 +trove-classifiers==2024.10.16 twine==5.1.1; python_version >= '3.8' types-beautifulsoup4==4.12.0.20241020; python_version >= '3.8' types-cffi==1.16.0.20240331; python_version >= '3.8' @@ -102,7 +102,7 @@ types-regex==2024.9.11.20240912; python_version >= '3.8' types-setuptools==69.5.0.20240522; python_version >= '3.8' typing-extensions==4.12.2; python_version >= '3.8' urllib3==2.2.3; python_version >= '3.8' -virtualenv==20.27.0; python_version >= '3.8' +virtualenv==20.27.1; python_version >= '3.8' webencodings==0.5.1 zipp==3.20.2; python_version >= '3.8' accept-types==0.4.1 @@ -121,7 +121,7 @@ ecs-logging==2.2.0; python_version >= '3.6' elastic-apm==6.23.0; python_version >= '3.6' and python_version < '4' elastic-enterprise-search==8.11.0; python_version >= '3.6' elastic-transport==8.15.1; python_version >= '3.8' -elasticsearch[async]==8.12.1; python_version >= '3.7' +elasticsearch[async]==8.15.1; python_version >= '3.8' emoji==2.14.0; python_version >= '3.7' frozenlist==1.5.0; python_version >= '3.8' funcparserlib==1.0.1; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4, 3.5, 3.6' and python_version < '3.13' @@ -157,4 +157,4 @@ tzdata==2024.2; python_version >= '2' ultradict==0.0.6; python_version >= '3.8' uvloop==0.21.0; python_full_version >= '3.8.0' wrapt==1.16.0; python_version >= '3.6' -yarl==1.16.0; python_version >= '3.9' +yarl==1.17.1; python_version >= '3.9' diff --git a/pip-requirements.txt b/pip-requirements.txt index 9de54c05a..c10f5955e 100644 --- a/pip-requirements.txt +++ b/pip-requirements.txt @@ -8,7 +8,7 @@ attrs==24.2.0; python_version >= '3.7' beautifulsoup4==4.12.3; python_full_version >= '3.6.0' blake3==0.4.1 brotli==1.1.0 -certifi==2023.11.17; python_version >= '3.6' +certifi==2024.8.30; python_version >= '3.6' cffi==1.17.1; python_version >= '3.8' defity==0.4.1; python_version >= '3.9' defusedxml==0.7.1; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4' @@ -18,7 +18,7 @@ ecs-logging==2.2.0; python_version >= '3.6' elastic-apm==6.23.0; python_version >= '3.6' and python_version < '4' elastic-enterprise-search==8.11.0; python_version >= '3.6' elastic-transport==8.15.1; python_version >= '3.8' -elasticsearch[async]==8.12.1; python_version >= '3.7' +elasticsearch[async]==8.15.1; python_version >= '3.8' emoji==2.14.0; python_version >= '3.7' frozenlist==1.5.0; python_version >= '3.8' funcparserlib==1.0.1; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4, 3.5, 3.6' and python_version < '3.13' @@ -62,4 +62,4 @@ ultradict==0.0.6; python_version >= '3.8' urllib3==2.2.3; python_version >= '3.8' uvloop==0.21.0; python_full_version >= '3.8.0' wrapt==1.16.0; python_version >= '3.6' -yarl==1.16.0; python_version >= '3.9' +yarl==1.17.1; python_version >= '3.9' diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 2225027d2..842b2650f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -7,14 +7,14 @@ settings: overrides: webpack@4: '5' -pnpmfileChecksum: ywflofsit3qw2lcaugokzwrx7q +pnpmfileChecksum: sha256-5KFld5gANFMF2cq54TM6ci/ZMXd2mNJIqi0h+lPvqTE= patchedDependencies: core-js-builder@3.39.0: - hash: uaigxb4svfncpmuo7pakfqf4ai + hash: e687cf6b265ca8af68594873718b115f3545eacf952e0a1505b6f179ce0558a0 path: patches/core-js-builder@3.39.0.patch ts-node@10.9.1: - hash: cstrxxonjryn63zbkj6xbnmhqa + hash: fa27a1acf07317f18abb6c1e91454e5a6a963f2e884cdf7213067b2d9ce764c2 path: patches/ts-node@10.9.1.patch importers: @@ -71,7 +71,7 @@ importers: version: 1.0.30001676 core-js-builder: specifier: 3.39.0 - version: 3.39.0(patch_hash=uaigxb4svfncpmuo7pakfqf4ai)(@types/node@18.19.63)(browserslist@4.24.2(caniuse-lite@1.0.30001676)(electron-to-chromium@1.5.50))(esbuild@0.24.0) + version: 3.39.0(patch_hash=e687cf6b265ca8af68594873718b115f3545eacf952e0a1505b6f179ce0558a0)(@types/node@18.19.63)(browserslist@4.24.2(caniuse-lite@1.0.30001676)(electron-to-chromium@1.5.50))(esbuild@0.24.0) core-js-compat: specifier: 3.39.0 version: 3.39.0(browserslist@4.24.2(caniuse-lite@1.0.30001676)(electron-to-chromium@1.5.50)) @@ -128,7 +128,7 @@ importers: version: 5.0.2(prettier@3.3.3)(stylelint@16.10.0(typescript@5.6.3)) ts-node: specifier: github:isaacs/ts-node#isaacs/node-20-fix - version: https://codeload.github.com/isaacs/ts-node/tar.gz/b614b1be4d3dacbaf26b31a9320e31287eaf4774(patch_hash=cstrxxonjryn63zbkj6xbnmhqa)(@types/node@18.19.63)(typescript@5.6.3) + version: https://codeload.github.com/isaacs/ts-node/tar.gz/b614b1be4d3dacbaf26b31a9320e31287eaf4774(patch_hash=fa27a1acf07317f18abb6c1e91454e5a6a963f2e884cdf7213067b2d9ce764c2)(@types/node@18.19.63)(typescript@5.6.3) type-fest: specifier: ^4.26.1 version: 4.26.1 @@ -2307,7 +2307,7 @@ snapshots: concat-map@0.0.1: {} - core-js-builder@3.39.0(patch_hash=uaigxb4svfncpmuo7pakfqf4ai)(@types/node@18.19.63)(browserslist@4.24.2(caniuse-lite@1.0.30001676)(electron-to-chromium@1.5.50))(esbuild@0.24.0): + core-js-builder@3.39.0(patch_hash=e687cf6b265ca8af68594873718b115f3545eacf952e0a1505b6f179ce0558a0)(@types/node@18.19.63)(browserslist@4.24.2(caniuse-lite@1.0.30001676)(electron-to-chromium@1.5.50))(esbuild@0.24.0): dependencies: core-js: 3.39.0 core-js-compat: 3.39.0(browserslist@4.24.2(caniuse-lite@1.0.30001676)(electron-to-chromium@1.5.50)) @@ -3180,7 +3180,7 @@ snapshots: dependencies: typescript: 5.6.3 - ts-node@https://codeload.github.com/isaacs/ts-node/tar.gz/b614b1be4d3dacbaf26b31a9320e31287eaf4774(patch_hash=cstrxxonjryn63zbkj6xbnmhqa)(@types/node@18.19.63)(typescript@5.6.3): + ts-node@https://codeload.github.com/isaacs/ts-node/tar.gz/b614b1be4d3dacbaf26b31a9320e31287eaf4774(patch_hash=fa27a1acf07317f18abb6c1e91454e5a6a963f2e884cdf7213067b2d9ce764c2)(@types/node@18.19.63)(typescript@5.6.3): dependencies: '@cspotcode/source-map-support': 0.8.1 '@tsconfig/node14': 14.1.2 diff --git a/pyproject.toml b/pyproject.toml index 33f6b75b4..bcd3595d4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,11 +6,10 @@ build-backend = "setuptools.build_meta" skips = ["B101", "B311", "B413"] [tool.black] -target-version = ["py312"] +target-version = ["py312", "py313"] line-length = 80 [tool.isort] -add_imports = ["from __future__ import annotations"] atomic = true combine_as_imports = true line_length = 80 diff --git a/scripts/core-js-builder.ts b/scripts/core-js-builder.ts index 1d43a9174..5d098804c 100755 --- a/scripts/core-js-builder.ts +++ b/scripts/core-js-builder.ts @@ -8,7 +8,7 @@ const args = parseArgs(process.argv.slice(2), { string: ["targets", "format"], default: { targets: - ">=0.1% and supports es6-module, Chrome 120, Firefox ESR, Safari 15.6", + ">=0.1% and supports es6-module, Chrome 120, Firefox 115, Safari 15.6", format: "bundle", }, }); diff --git a/scripts/core-js-compat.ts b/scripts/core-js-compat.ts index 23ed22baa..e11b3cb94 100755 --- a/scripts/core-js-compat.ts +++ b/scripts/core-js-compat.ts @@ -7,7 +7,7 @@ const args = parseArgs(process.argv.slice(2), { string: ["targets", "version"], default: { targets: - ">=0.1% and supports es6-module, Chrome 120, Firefox ESR, Safari 15.6", + ">=0.1% and supports es6-module, Chrome 120, Firefox 115, Safari 15.6", }, }); diff --git a/scripts/deno/core-js-builder.ts b/scripts/deno/core-js-builder.ts index 7ae0dad16..2d23eec3e 100755 --- a/scripts/deno/core-js-builder.ts +++ b/scripts/deno/core-js-builder.ts @@ -8,7 +8,7 @@ const args = parseArgs(Deno.args, { string: ["targets", "format"], default: { targets: - ">=0.1% and supports es6-module, Chrome 120, Firefox ESR, Safari 15.6", + ">=0.1% and supports es6-module, Chrome 120, Firefox 115, Safari 15.6", format: "bundle", }, }); diff --git a/scripts/deno/core-js-compat.ts b/scripts/deno/core-js-compat.ts index 831a09752..d64f50727 100755 --- a/scripts/deno/core-js-compat.ts +++ b/scripts/deno/core-js-compat.ts @@ -7,7 +7,7 @@ const args = parseArgs(Deno.args, { string: ["targets", "version"], default: { targets: - ">=0.1% and supports es6-module, Chrome 120, Firefox ESR, Safari 15.6", + ">=0.1% and supports es6-module, Chrome 120, Firefox 115, Safari 15.6", }, }); diff --git a/setup.py b/setup.py index 80b744b4f..04f37ec4a 100755 --- a/setup.py +++ b/setup.py @@ -29,9 +29,9 @@ from setuptools.build_meta import SetupRequirementsError BACKEND_REQUIRES = set() -DULWICH = "dulwich==0.22.1" +DULWICH = "dulwich==0.22.5" GET_VERSION = "get-version==3.5.5" -TROVE_CLASSIFIERS = "trove-classifiers" +TROVE_CLASSIFIERS = "trove-classifiers==2024.10.16" filterwarnings("ignore", "", UserWarning, "setuptools.dist") diff --git a/style/.stylelintrc.yaml b/style/.stylelintrc.yaml index 91e265bab..c38956ef1 100644 --- a/style/.stylelintrc.yaml +++ b/style/.stylelintrc.yaml @@ -8,8 +8,8 @@ rules: "plugin/no-unsupported-browser-features": - true - severity: "warning" - browsers: "Chrome 120, Firefox ESR, Safari 15.6" -reportDescriptionlessDisables: false + browsers: "Chrome 120, Firefox 115, Safari 15.6" +reportDescriptionlessDisables: [true, { severity: "warning" }] reportInvalidScopeDisables: true reportNeedlessDisables: true ignoreFiles: