diff --git a/.attw.json b/.attw.json new file mode 100644 index 00000000000..7e5b3c23693 --- /dev/null +++ b/.attw.json @@ -0,0 +1,6 @@ +{ + "ignoreRules": [ + "false-esm", + "cjs-resolves-to-esm" + ] +} diff --git a/.changeset/lemon-fans-shake.md b/.changeset/lemon-fans-shake.md new file mode 100644 index 00000000000..b04acc33dbb --- /dev/null +++ b/.changeset/lemon-fans-shake.md @@ -0,0 +1,5 @@ +--- +'@apollo/client': minor +--- + +Add .js file extensions to imports in src and dist/**/*.d.ts diff --git a/.eslintrc b/.eslintrc index a143ca2ac1b..354cef8621d 100644 --- a/.eslintrc +++ b/.eslintrc @@ -1,6 +1,6 @@ { "parser": "@typescript-eslint/parser", - "plugins": ["@typescript-eslint"], + "plugins": ["@typescript-eslint", "import"], "env": { "browser": true, "node": true, @@ -9,17 +9,35 @@ "parserOptions": { "ecmaVersion": "latest" }, + "settings": { + "import/parsers": { + "@typescript-eslint/parser": [".ts", ".tsx"] + }, + "import/resolver": { + "typescript": { + "alwaysTryTypes": true + } + } + }, "overrides": [ { "files": ["**/*.ts", "**/*.tsx"], "excludedFiles": ["**/__tests__/**/*.*"], "rules": { - "@typescript-eslint/consistent-type-imports": ["error", { + "@typescript-eslint/consistent-type-imports": ["error", { "prefer": "type-imports", "disallowTypeAnnotations": false, "fixStyle": "separate-type-imports" }], - "@typescript-eslint/no-import-type-side-effects": "error" + "@typescript-eslint/no-import-type-side-effects": "error", + "import/extensions": [ + "error", + "always", + { + "ignorePackages": true, + "checkTypeImports": true + } + ] } }, { @@ -31,4 +49,7 @@ } } ], + "rules": { + "import/no-unresolved": "error" + } } diff --git a/.github/workflows/arethetypeswrong.yml b/.github/workflows/arethetypeswrong.yml new file mode 100644 index 00000000000..8e6756cc794 --- /dev/null +++ b/.github/workflows/arethetypeswrong.yml @@ -0,0 +1,28 @@ +name: AreTheTypesWrong +on: + pull_request: + branches: + - main + - release-* + +concurrency: ${{ github.workflow }}-${{ github.ref }} + +jobs: + arethetypeswrong: + name: Are the types wrong + runs-on: ubuntu-latest + steps: + - name: Checkout repo + uses: actions/checkout@v3 + - name: Setup Node.js 18.x + uses: actions/setup-node@v3 + with: + node-version: 18.x + - name: Install dependencies (with cache) + uses: bahmutov/npm-install@v1 + + - name: Run build + run: npm run build + - name: Run AreTheTypesWrong + id: attw + run: ./node_modules/.bin/attw --format ascii --pack dist > $GITHUB_STEP_SUMMARY diff --git a/.gitignore b/.gitignore index 0bcd3880f96..88b6925bf38 100644 --- a/.gitignore +++ b/.gitignore @@ -70,3 +70,6 @@ junit.xml reports esbuild-why-*.html + +.yalc +yalc.lock diff --git a/config/entryPoints.js b/config/entryPoints.js index e33d53ceb00..8afa1c9af0c 100644 --- a/config/entryPoints.js +++ b/config/entryPoints.js @@ -88,6 +88,9 @@ exports.check = function (id, parentId) { function partsAfterDist(id) { const parts = id.split(path.sep); const distIndex = parts.lastIndexOf("dist"); + if (/^index.jsx?$/.test(parts[parts.length - 1])) { + parts.pop(); + } if (distIndex >= 0) { return parts.slice(distIndex + 1); } diff --git a/config/jest.config.js b/config/jest.config.js index 109d90c9044..e8ae983c671 100644 --- a/config/jest.config.js +++ b/config/jest.config.js @@ -23,6 +23,7 @@ const defaults = { }, ], }, + resolver: "ts-jest-resolver", }; const ignoreTSFiles = '.ts$'; diff --git a/config/postprocessDist.ts b/config/postprocessDist.ts index c5dbf500efb..2d6d04d106e 100644 --- a/config/postprocessDist.ts +++ b/config/postprocessDist.ts @@ -1,7 +1,6 @@ -import * as fs from "fs"; -import * as path from "path"; -import resolve from "resolve"; -import { distDir, eachFile, reparse, reprint } from './helpers'; +import { distDir } from './helpers.ts'; +import fs from 'node:fs'; +import path from 'node:path'; const globalTypesFile = path.resolve(distDir, "utilities/globals/global.d.ts"); fs.writeFileSync(globalTypesFile, @@ -10,116 +9,4 @@ fs.writeFileSync(globalTypesFile, .filter(line => line.trim() !== 'const __DEV__: boolean;') .join("\n"), "utf8" -); - -// The primary goal of the 'npm run resolve' script is to make ECMAScript -// modules exposed by Apollo Client easier to consume natively in web browsers, -// without bundling, and without help from package.json files. It accomplishes -// this goal by rewriting internal ./ and ../ (relative) imports to refer to a -// specific ESM module (not a directory), including its file extension. Because -// of this limited goal, this script only touches ESM modules that have .js file -// extensions, not .cjs CommonJS bundles. - -// A secondary goal of this script is to enforce that any module using the -// __DEV__ global constant imports the @apollo/client/utilities/globals polyfill -// module first. - -eachFile(distDir, (file, relPath) => new Promise((resolve, reject) => { - fs.readFile(file, "utf8", (error, source) => { - if (error) return reject(error); - - const tr = new Transformer; - const output = tr.transform(source, file); - - if (source === output) { - resolve(file); - } else { - fs.writeFile(file, output, "utf8", error => { - error ? reject(error) : resolve(file); - }); - } - }); -})); - -import * as recast from "recast"; -const n = recast.types.namedTypes; -type Node = recast.types.namedTypes.Node; - -class Transformer { - absolutePaths = new Set(); - - transform(code: string, file: string) { - const ast = reparse(code); - const transformer = this; - - recast.visit(ast, { - visitImportDeclaration(path) { - this.traverse(path); - transformer.normalizeSourceString(file, path.node.source); - }, - - visitImportExpression(path) { - this.traverse(path); - transformer.normalizeSourceString(file, path.node.source); - }, - - visitExportAllDeclaration(path) { - this.traverse(path); - transformer.normalizeSourceString(file, path.node.source); - }, - - visitExportNamedDeclaration(path) { - this.traverse(path); - transformer.normalizeSourceString(file, path.node.source); - }, - }); - - return reprint(ast); - } - - isRelative(id: string) { - return id.startsWith("./") || id.startsWith("../"); - } - - normalizeSourceString(file: string, source?: Node | null) { - if (source && n.StringLiteral.check(source)) { - // We mostly only worry about normalizing _relative_ module identifiers, - // which start with a ./ or ../ and refer to other modules within the - // @apollo/client package, but we also manually normalize one non-relative - // identifier, ts-invariant/process, to prevent webpack 5 errors - // containing the phrase "failed to resolve only because it was resolved - // as fully specified," referring to webpack's resolve.fullySpecified - // option, which is apparently now true by default when the enclosing - // package's package.json file has "type": "module" (which became true for - // Apollo Client in v3.5). - if (source.value.split("/", 2).join("/") === "ts-invariant/process") { - source.value = "ts-invariant/process/index.js"; - } else if (this.isRelative(source.value)) { - try { - source.value = this.normalizeId(source.value, file); - } catch (error) { - console.error(`Failed to resolve ${source.value} in ${file} with error ${error}`); - process.exit(1); - } - } - } - } - - normalizeId(id: string, file: string) { - const basedir = path.dirname(file); - const absPath = resolve.sync(id, { - basedir, - extensions: [".mjs", ".js"], - packageFilter(pkg) { - return pkg.module ? { - ...pkg, - main: pkg.module, - } : pkg; - }, - }); - this.absolutePaths.add(absPath); - const relPath = path.relative(basedir, absPath); - const relId = relPath.split(path.sep).join('/'); - return this.isRelative(relId) ? relId : "./" + relId; - } -} +); \ No newline at end of file diff --git a/config/processInvariants.ts b/config/processInvariants.ts index 34cd9eaded3..787772aa262 100644 --- a/config/processInvariants.ts +++ b/config/processInvariants.ts @@ -1,6 +1,6 @@ import * as fs from 'fs'; import { posix, join as osPathJoin } from 'path'; -import { distDir, eachFile, reparse, reprint } from './helpers'; +import { distDir, eachFile, reparse, reprint } from './helpers.ts'; import type { ExpressionKind } from 'ast-types/lib/gen/kinds'; eachFile(distDir, (file, relPath) => { @@ -211,7 +211,6 @@ function transform(code: string, relativeFilePath: string) { b.literal(false) ); } - return node; }, }); diff --git a/config/rewriteSourceMaps.ts b/config/rewriteSourceMaps.ts index c88da784d60..cb3c284ef0d 100644 --- a/config/rewriteSourceMaps.ts +++ b/config/rewriteSourceMaps.ts @@ -1,6 +1,6 @@ import * as fs from "fs"; import * as path from "path"; -import { distDir } from './helpers'; +import { distDir } from './helpers.ts'; import glob = require("glob"); glob(`${distDir.replace(/\\/g, '/')}/**/*.js.map`, (error, files) => { diff --git a/config/rollup.config.js b/config/rollup.config.js index e81e122b01d..081c430d278 100644 --- a/config/rollup.config.js +++ b/config/rollup.config.js @@ -1,4 +1,4 @@ -import path from 'path'; +import path, { resolve, dirname } from 'path'; import { promises as fs } from "fs"; import nodeResolve from '@rollup/plugin-node-resolve'; @@ -109,9 +109,8 @@ function prepareBundle({ return { input: inputFile, - external(id, parentId) { - return isExternal(id, parentId, true); - }, + // the external check is done by the `'externalize-dependency'` plugin + // external(id, parentId) {} output: { file: outputFile, format: 'cjs', @@ -120,6 +119,29 @@ function prepareBundle({ externalLiveBindings: false, }, plugins: [ + { + name: 'externalize-dependency', + resolveId(id, parentId) { + if (!parentId) { + return null; + } + function removeIndex(filename) { + if (filename.endsWith(`${path.sep}index.js`)) { + return filename.slice(0, -`${path.sep}index.js`.length) + } + return filename + } + + const external = isExternal(id, parentId, true) + if (external) { + if (id.startsWith(".")) { + return { id: removeIndex(resolve(dirname(parentId), id)), external: true }; + } + return { id: removeIndex(id), external: true }; + } + return null; + } + }, extensions ? nodeResolve({ extensions }) : nodeResolve(), { name: "copy *.cjs to *.cjs.native.js", diff --git a/config/tsconfig.json b/config/tsconfig.json index 65154546a8b..d8975964558 100644 --- a/config/tsconfig.json +++ b/config/tsconfig.json @@ -12,6 +12,8 @@ "esModuleInterop": true, "sourceMap": true, "inlineSourceMap": false, + "noEmit": true, + "allowImportingTsExtensions": true, // This option should cause sourcesContent to be included in the // source map JSON, so we don't have to rely on the (nonexistent) // relative paths in the sources array, but it appears tsc does not diff --git a/package-lock.json b/package-lock.json index e422a19f141..8a0272c6fd9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -25,6 +25,7 @@ "zen-observable-ts": "^1.2.5" }, "devDependencies": { + "@arethetypeswrong/cli": "0.4.2", "@babel/parser": "7.22.5", "@changesets/changelog-github": "0.4.8", "@changesets/cli": "2.26.1", @@ -47,13 +48,15 @@ "@types/react": "18.2.14", "@types/react-dom": "18.2.6", "@types/use-sync-external-store": "0.0.3", - "@typescript-eslint/eslint-plugin": "5.60.0", - "@typescript-eslint/parser": "5.60.0", + "@typescript-eslint/eslint-plugin": "5.61.0", + "@typescript-eslint/parser": "5.61.0", "acorn": "8.9.0", "blob-polyfill": "7.0.20220408", "bytes": "3.1.2", "cross-fetch": "3.1.6", "eslint": "8.43.0", + "eslint-import-resolver-typescript": "3.5.5", + "eslint-plugin-import": "npm:@phryneas/eslint-plugin-import@^2.27.5-pr.2813.2817.199971c", "eslint-plugin-testing-library": "5.11.0", "expect-type": "0.15.0", "fetch-mock": "9.11.0", @@ -81,6 +84,7 @@ "subscriptions-transport-ws": "0.11.0", "terser": "5.18.1", "ts-jest": "29.1.0", + "ts-jest-resolver": "2.0.1", "ts-node": "10.9.1", "typedoc": "0.24.7", "typescript": "5.1.3", @@ -119,6 +123,76 @@ "integrity": "sha512-+u76oB43nOHrF4DDWRLWDCtci7f3QJoEBigemIdIeTi1ODqjx6Tad9NCVnPRwewWlKkVab5PlK8DCtPTyX7S8g==", "dev": true }, + "node_modules/@andrewbranch/untar.js": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@andrewbranch/untar.js/-/untar.js-1.0.2.tgz", + "integrity": "sha512-hL80MHK3b++pEp6K23+Nl5r5D1F19DRagp2ruCBIv4McyCiLKq67vUNvEQY1aGCAKNZ8GxV23n5MhOm7RwO8Pg==", + "dev": true + }, + "node_modules/@arethetypeswrong/cli": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/@arethetypeswrong/cli/-/cli-0.4.2.tgz", + "integrity": "sha512-RlAiNUUgvsM8GX9kzNTgB8xuANf2j9klpHxU3xPhfqO03MU9ybD7Qq82ULWECe/pAX9CfT93EzEzFmoFivv5VA==", + "dev": true, + "dependencies": { + "@arethetypeswrong/core": "0.4.1", + "chalk": "^4.1.2", + "cli-table3": "^0.6.3", + "commander": "^10.0.1", + "marked": "^5.1.0", + "marked-terminal": "^5.2.0" + }, + "bin": { + "attw": "dist/index.js" + } + }, + "node_modules/@arethetypeswrong/cli/node_modules/commander": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-10.0.1.tgz", + "integrity": "sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==", + "dev": true, + "engines": { + "node": ">=14" + } + }, + "node_modules/@arethetypeswrong/cli/node_modules/marked": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/marked/-/marked-5.1.0.tgz", + "integrity": "sha512-z3/nBe7aTI8JDszlYLk7dDVNpngjw0o1ZJtrA9kIfkkHcIF+xH7mO23aISl4WxP83elU+MFROgahqdpd05lMEQ==", + "dev": true, + "bin": { + "marked": "bin/marked.js" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/@arethetypeswrong/core": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/@arethetypeswrong/core/-/core-0.4.1.tgz", + "integrity": "sha512-DNRPu3ndvMqr6hewDP+Od8K9jZTj6cP8f/5eqRvEyZQPl11FmqOWaEuDFTEKym4nLGHM2cV5OOCnQBJ1IQbXQA==", + "dev": true, + "dependencies": { + "@andrewbranch/untar.js": "^1.0.0", + "fetch-ponyfill": "^7.1.0", + "fflate": "^0.7.4", + "typescript": "^5.1.3", + "validate-npm-package-name": "^5.0.0" + } + }, + "node_modules/@arethetypeswrong/core/node_modules/typescript": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.1.6.tgz", + "integrity": "sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, "node_modules/@babel/code-frame": { "version": "7.16.7", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.16.7.tgz", @@ -1105,6 +1179,16 @@ "prettier": "^2.7.1" } }, + "node_modules/@colors/colors": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@colors/colors/-/colors-1.5.0.tgz", + "integrity": "sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==", + "dev": true, + "optional": true, + "engines": { + "node": ">=0.1.90" + } + }, "node_modules/@cspotcode/source-map-support": { "version": "0.8.1", "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", @@ -2317,6 +2401,56 @@ "node": ">=14" } }, + "node_modules/@pkgr/utils": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/@pkgr/utils/-/utils-2.4.1.tgz", + "integrity": "sha512-JOqwkgFEyi+OROIyq7l4Jy28h/WwhDnG/cPkXG2Z1iFbubB6jsHW1NDvmyOzTBxHr3yg68YGirmh1JUgMqa+9w==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.3", + "fast-glob": "^3.2.12", + "is-glob": "^4.0.3", + "open": "^9.1.0", + "picocolors": "^1.0.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": "^12.20.0 || ^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/unts" + } + }, + "node_modules/@pkgr/utils/node_modules/define-lazy-prop": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-3.0.0.tgz", + "integrity": "sha512-N+MeXYoqr3pOgn8xfyRPREN7gHakLYjhsHhWGT3fWAiL4IkAt0iDw14QiiEm2bE30c5XX5q0FtAA3CK5f9/BUg==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@pkgr/utils/node_modules/open": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/open/-/open-9.1.0.tgz", + "integrity": "sha512-OS+QTnw1/4vrf+9hh1jc1jnYjzSG4ttTBB8UxOwAnInG3Uo4ssetzC1ihqaIHjLJnA5GGlRl6QlZXOTQhRBUvg==", + "dev": true, + "dependencies": { + "default-browser": "^4.0.0", + "define-lazy-prop": "^3.0.0", + "is-inside-container": "^1.0.0", + "is-wsl": "^2.2.0" + }, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/@rollup/plugin-node-resolve": { "version": "11.2.1", "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-11.2.1.tgz", @@ -2872,6 +3006,12 @@ "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==", "dev": true }, + "node_modules/@types/json5": { + "version": "0.0.29", + "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", + "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==", + "dev": true + }, "node_modules/@types/lodash": { "version": "4.14.195", "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.195.tgz", @@ -3022,17 +3162,17 @@ "dev": true }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "5.60.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.60.0.tgz", - "integrity": "sha512-78B+anHLF1TI8Jn/cD0Q00TBYdMgjdOn980JfAVa9yw5sop8nyTfVOQAv6LWywkOGLclDBtv5z3oxN4w7jxyNg==", + "version": "5.61.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.61.0.tgz", + "integrity": "sha512-A5l/eUAug103qtkwccSCxn8ZRwT+7RXWkFECdA4Cvl1dOlDUgTpAOfSEElZn2uSUxhdDpnCdetrf0jvU4qrL+g==", "dev": true, "dependencies": { "@eslint-community/regexpp": "^4.4.0", - "@typescript-eslint/scope-manager": "5.60.0", - "@typescript-eslint/type-utils": "5.60.0", - "@typescript-eslint/utils": "5.60.0", + "@typescript-eslint/scope-manager": "5.61.0", + "@typescript-eslint/type-utils": "5.61.0", + "@typescript-eslint/utils": "5.61.0", "debug": "^4.3.4", - "grapheme-splitter": "^1.0.4", + "graphemer": "^1.4.0", "ignore": "^5.2.0", "natural-compare-lite": "^1.4.0", "semver": "^7.3.7", @@ -3071,14 +3211,14 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "5.60.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.60.0.tgz", - "integrity": "sha512-jBONcBsDJ9UoTWrARkRRCgDz6wUggmH5RpQVlt7BimSwaTkTjwypGzKORXbR4/2Hqjk9hgwlon2rVQAjWNpkyQ==", + "version": "5.61.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.61.0.tgz", + "integrity": "sha512-yGr4Sgyh8uO6fSi9hw3jAFXNBHbCtKKFMdX2IkT3ZqpKmtAq3lHS4ixB/COFuAIJpwl9/AqF7j72ZDWYKmIfvg==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "5.60.0", - "@typescript-eslint/types": "5.60.0", - "@typescript-eslint/typescript-estree": "5.60.0", + "@typescript-eslint/scope-manager": "5.61.0", + "@typescript-eslint/types": "5.61.0", + "@typescript-eslint/typescript-estree": "5.61.0", "debug": "^4.3.4" }, "engines": { @@ -3098,13 +3238,13 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "5.60.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.60.0.tgz", - "integrity": "sha512-hakuzcxPwXi2ihf9WQu1BbRj1e/Pd8ZZwVTG9kfbxAMZstKz8/9OoexIwnmLzShtsdap5U/CoQGRCWlSuPbYxQ==", + "version": "5.61.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.61.0.tgz", + "integrity": "sha512-W8VoMjoSg7f7nqAROEmTt6LoBpn81AegP7uKhhW5KzYlehs8VV0ZW0fIDVbcZRcaP3aPSW+JZFua+ysQN+m/Nw==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.60.0", - "@typescript-eslint/visitor-keys": "5.60.0" + "@typescript-eslint/types": "5.61.0", + "@typescript-eslint/visitor-keys": "5.61.0" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -3115,13 +3255,13 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "5.60.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.60.0.tgz", - "integrity": "sha512-X7NsRQddORMYRFH7FWo6sA9Y/zbJ8s1x1RIAtnlj6YprbToTiQnM6vxcMu7iYhdunmoC0rUWlca13D5DVHkK2g==", + "version": "5.61.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.61.0.tgz", + "integrity": "sha512-kk8u//r+oVK2Aj3ph/26XdH0pbAkC2RiSjUYhKD+PExemG4XSjpGFeyZ/QM8lBOa7O8aGOU+/yEbMJgQv/DnCg==", "dev": true, "dependencies": { - "@typescript-eslint/typescript-estree": "5.60.0", - "@typescript-eslint/utils": "5.60.0", + "@typescript-eslint/typescript-estree": "5.61.0", + "@typescript-eslint/utils": "5.61.0", "debug": "^4.3.4", "tsutils": "^3.21.0" }, @@ -3142,9 +3282,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "5.60.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.60.0.tgz", - "integrity": "sha512-ascOuoCpNZBccFVNJRSC6rPq4EmJ2NkuoKnd6LDNyAQmdDnziAtxbCGWCbefG1CNzmDvd05zO36AmB7H8RzKPA==", + "version": "5.61.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.61.0.tgz", + "integrity": "sha512-ldyueo58KjngXpzloHUog/h9REmHl59G1b3a5Sng1GfBo14BkS3ZbMEb3693gnP1k//97lh7bKsp6/V/0v1veQ==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -3155,13 +3295,13 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "5.60.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.60.0.tgz", - "integrity": "sha512-R43thAuwarC99SnvrBmh26tc7F6sPa2B3evkXp/8q954kYL6Ro56AwASYWtEEi+4j09GbiNAHqYwNNZuNlARGQ==", + "version": "5.61.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.61.0.tgz", + "integrity": "sha512-Fud90PxONnnLZ36oR5ClJBLTLfU4pIWBmnvGwTbEa2cXIqj70AEDEmOmpkFComjBZ/037ueKrOdHuYmSFVD7Rw==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.60.0", - "@typescript-eslint/visitor-keys": "5.60.0", + "@typescript-eslint/types": "5.61.0", + "@typescript-eslint/visitor-keys": "5.61.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -3197,17 +3337,17 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "5.60.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.60.0.tgz", - "integrity": "sha512-ba51uMqDtfLQ5+xHtwlO84vkdjrqNzOnqrnwbMHMRY8Tqeme8C2Q8Fc7LajfGR+e3/4LoYiWXUM6BpIIbHJ4hQ==", + "version": "5.61.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.61.0.tgz", + "integrity": "sha512-mV6O+6VgQmVE6+xzlA91xifndPW9ElFW8vbSF0xCT/czPXVhwDewKila1jOyRwa9AE19zKnrr7Cg5S3pJVrTWQ==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@types/json-schema": "^7.0.9", "@types/semver": "^7.3.12", - "@typescript-eslint/scope-manager": "5.60.0", - "@typescript-eslint/types": "5.60.0", - "@typescript-eslint/typescript-estree": "5.60.0", + "@typescript-eslint/scope-manager": "5.61.0", + "@typescript-eslint/types": "5.61.0", + "@typescript-eslint/typescript-estree": "5.61.0", "eslint-scope": "^5.1.1", "semver": "^7.3.7" }, @@ -3266,12 +3406,12 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "5.60.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.60.0.tgz", - "integrity": "sha512-wm9Uz71SbCyhUKgcaPRauBdTegUyY/ZWl8gLwD/i/ybJqscrrdVSFImpvUz16BLPChIeKBK5Fa9s6KDQjsjyWw==", + "version": "5.61.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.61.0.tgz", + "integrity": "sha512-50XQ5VdbWrX06mQXhy93WywSFZZGsv3EOjq+lqp6WC2t+j3mb6A9xYVdrRxafvK88vg9k9u+CT4l6D8PEatjKg==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.60.0", + "@typescript-eslint/types": "5.61.0", "eslint-visitor-keys": "^3.3.0" }, "engines": { @@ -3458,6 +3598,12 @@ "node": ">=4" } }, + "node_modules/ansicolors": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/ansicolors/-/ansicolors-0.3.2.tgz", + "integrity": "sha512-QXu7BPrP29VllRxH8GwB7x5iX5qWKAAMLqKQGWTeLWVlNHNOpVMJ91dsxQAIWXpjuW5wqvxu3Jd/nRjrJ+0pqg==", + "dev": true + }, "node_modules/anymatch": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", @@ -3495,6 +3641,25 @@ "node": ">=6.0" } }, + "node_modules/array-includes": { + "version": "3.1.6", + "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.6.tgz", + "integrity": "sha512-sgTbLvL6cNnw24FnbaDyjmvddQ2ML8arZsgaJhoABMoplz/4QRhtrYS+alr1BUM1Bwp6dhx8vVCBSLG+StwOFw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4", + "get-intrinsic": "^1.1.3", + "is-string": "^1.0.7" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/array-union": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", @@ -3504,6 +3669,25 @@ "node": ">=8" } }, + "node_modules/array.prototype.findlastindex": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.2.tgz", + "integrity": "sha512-tb5thFFlUcp7NdNF6/MpDk/1r/4awWG1FIz3YqDf+/zJSTezBb+/5WViH41obXULHVpDzoiCLpJ/ZO9YbJMsdw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4", + "es-shim-unscopables": "^1.0.0", + "get-intrinsic": "^1.1.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/array.prototype.flat": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.1.tgz", @@ -3522,6 +3706,24 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/array.prototype.flatmap": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.1.tgz", + "integrity": "sha512-8UGn9O1FDVvMNB0UlLv4voxRMze7+FpHyF5mSMRjWHUMlpoDViniy05870VlxhfgTnLbpuwTzvD76MTtWxB/mQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4", + "es-shim-unscopables": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/arrify": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", @@ -3697,6 +3899,15 @@ "node": ">=4" } }, + "node_modules/big-integer": { + "version": "1.6.51", + "resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.51.tgz", + "integrity": "sha512-GPEid2Y9QU1Exl1rpO9B2IPJGHPSupF5GnVIP0blYvNOMer2bTvSWs1jGOUg04hTmu67nmLsQ9TBo1puaotBHg==", + "dev": true, + "engines": { + "node": ">=0.6" + } + }, "node_modules/binary-extensions": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", @@ -3712,6 +3923,18 @@ "integrity": "sha512-oD8Ydw+5lNoqq+en24iuPt1QixdPpe/nUF8azTHnviCZYu9zUC+TwdzIp5orpblJosNlgNbVmmAb//c6d6ImUQ==", "dev": true }, + "node_modules/bplist-parser": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/bplist-parser/-/bplist-parser-0.2.0.tgz", + "integrity": "sha512-z0M+byMThzQmD9NILRniCUXYsYpjwnlO8N5uCFaCqIOpqRsJCrQL9NK3JsD67CN5a08nF5oIL2bD6loTdHOuKw==", + "dev": true, + "dependencies": { + "big-integer": "^1.6.44" + }, + "engines": { + "node": ">= 5.10.0" + } + }, "node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -3811,6 +4034,45 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/builtins": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/builtins/-/builtins-5.0.1.tgz", + "integrity": "sha512-qwVpFEHNfhYJIzNRBvd2C1kyo6jz3ZSMPyyuR47OPdiKWlbYnZNyDWuyR175qDnAJLiCo5fBBqPb3RiXgWlkOQ==", + "dev": true, + "dependencies": { + "semver": "^7.0.0" + } + }, + "node_modules/builtins/node_modules/semver": { + "version": "7.5.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.3.tgz", + "integrity": "sha512-QBlUtyVk/5EeHbi7X0fw6liDZc7BBmEaSYn01fMU1OUYbf6GPsbTtd8WmnqbI20SeycoHSeiybkE/q1Q+qlThQ==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/bundle-name": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/bundle-name/-/bundle-name-3.0.0.tgz", + "integrity": "sha512-PKA4BeSvBpQKQ8iPOGCSiell+N8P+Tf1DlwqmYhpe2gAhKPHn8EYOxVT+ShuGmhg8lN8XiSlS80yiExKXrURlw==", + "dev": true, + "dependencies": { + "run-applescript": "^5.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/bytes": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", @@ -3887,6 +4149,19 @@ "url": "https://opencollective.com/browserslist" } }, + "node_modules/cardinal": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/cardinal/-/cardinal-2.1.1.tgz", + "integrity": "sha512-JSr5eOgoEymtYHBjNWyjrMqet9Am2miJhlfKNdqLp6zoeAh0KN5dRAcxlecj5mAJrmQomgiOBj35xHLrFjqBpw==", + "dev": true, + "dependencies": { + "ansicolors": "~0.3.2", + "redeyed": "~2.1.0" + }, + "bin": { + "cdl": "bin/cdl.js" + } + }, "node_modules/chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", @@ -3999,6 +4274,21 @@ "integrity": "sha512-cOU9usZw8/dXIXKtwa8pM0OTJQuJkxMN6w30csNRUerHfeQ5R6U3kkU/FtJeIf3M202OHfY2U8ccInBG7/xogA==", "dev": true }, + "node_modules/cli-table3": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/cli-table3/-/cli-table3-0.6.3.tgz", + "integrity": "sha512-w5Jac5SykAeZJKntOxJCrm63Eg5/4dhMWIcuTbo9rpE+brgaSZo0RuNJZeOyMgsUdhDeojvgyQLmjI+K50ZGyg==", + "dev": true, + "dependencies": { + "string-width": "^4.2.0" + }, + "engines": { + "node": "10.* || >= 12.*" + }, + "optionalDependencies": { + "@colors/colors": "1.5.0" + } + }, "node_modules/cliui": { "version": "8.0.1", "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", @@ -4333,6 +4623,150 @@ "node": ">=0.10.0" } }, + "node_modules/default-browser": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/default-browser/-/default-browser-4.0.0.tgz", + "integrity": "sha512-wX5pXO1+BrhMkSbROFsyxUm0i/cJEScyNhA4PPxc41ICuv05ZZB/MX28s8aZx6xjmatvebIapF6hLEKEcpneUA==", + "dev": true, + "dependencies": { + "bundle-name": "^3.0.0", + "default-browser-id": "^3.0.0", + "execa": "^7.1.1", + "titleize": "^3.0.0" + }, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/default-browser-id": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/default-browser-id/-/default-browser-id-3.0.0.tgz", + "integrity": "sha512-OZ1y3y0SqSICtE8DE4S8YOE9UZOJ8wO16fKWVP5J1Qz42kV9jcnMVFrEE/noXb/ss3Q4pZIH79kxofzyNNtUNA==", + "dev": true, + "dependencies": { + "bplist-parser": "^0.2.0", + "untildify": "^4.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/default-browser/node_modules/execa": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-7.1.1.tgz", + "integrity": "sha512-wH0eMf/UXckdUYnO21+HDztteVv05rq2GXksxT4fCGeHkBhw1DROXh40wcjMcRqDOWE7iPJ4n3M7e2+YFP+76Q==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.1", + "human-signals": "^4.3.0", + "is-stream": "^3.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^5.1.0", + "onetime": "^6.0.0", + "signal-exit": "^3.0.7", + "strip-final-newline": "^3.0.0" + }, + "engines": { + "node": "^14.18.0 || ^16.14.0 || >=18.0.0" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" + } + }, + "node_modules/default-browser/node_modules/human-signals": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-4.3.1.tgz", + "integrity": "sha512-nZXjEF2nbo7lIw3mgYjItAfgQXog3OjJogSbKa2CQIIvSGWcKgeJnQlNXip6NglNzYH45nSRiEVimMvYL8DDqQ==", + "dev": true, + "engines": { + "node": ">=14.18.0" + } + }, + "node_modules/default-browser/node_modules/is-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz", + "integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==", + "dev": true, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/default-browser/node_modules/mimic-fn": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz", + "integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/default-browser/node_modules/npm-run-path": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.1.0.tgz", + "integrity": "sha512-sJOdmRGrY2sjNTRMbSvluQqg+8X7ZK61yvzBEIDhz4f8z1TZFYABsqjjCBd/0PUNE9M6QDgHJXQkGUEm7Q+l9Q==", + "dev": true, + "dependencies": { + "path-key": "^4.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/default-browser/node_modules/onetime": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz", + "integrity": "sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==", + "dev": true, + "dependencies": { + "mimic-fn": "^4.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/default-browser/node_modules/path-key": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz", + "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/default-browser/node_modules/strip-final-newline": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz", + "integrity": "sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/defaults": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.4.tgz", @@ -4505,6 +4939,19 @@ "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", "dev": true }, + "node_modules/enhanced-resolve": { + "version": "5.15.0", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.15.0.tgz", + "integrity": "sha512-LXYT42KJ7lpIKECr2mAXIaMldcNCh/7E0KBKOu4KSfkHmP+mZmSs+8V5gBAqisWBy0OO4W5Oyys0GO1Y8KtdKg==", + "dev": true, + "dependencies": { + "graceful-fs": "^4.2.4", + "tapable": "^2.2.0" + }, + "engines": { + "node": ">=10.13.0" + } + }, "node_modules/enquirer": { "version": "2.3.6", "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", @@ -4774,6 +5221,162 @@ "url": "https://opencollective.com/eslint" } }, + "node_modules/eslint-import-resolver-node": { + "version": "0.3.7", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.7.tgz", + "integrity": "sha512-gozW2blMLJCeFpBwugLTGyvVjNoeo1knonXAcatC6bjPBZitotxdWf7Gimr25N4c0AAOo4eOUfaG82IJPDpqCA==", + "dev": true, + "dependencies": { + "debug": "^3.2.7", + "is-core-module": "^2.11.0", + "resolve": "^1.22.1" + } + }, + "node_modules/eslint-import-resolver-node/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/eslint-import-resolver-typescript": { + "version": "3.5.5", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-3.5.5.tgz", + "integrity": "sha512-TdJqPHs2lW5J9Zpe17DZNQuDnox4xo2o+0tE7Pggain9Rbc19ik8kFtXdxZ250FVx2kF4vlt2RSf4qlUpG7bhw==", + "dev": true, + "dependencies": { + "debug": "^4.3.4", + "enhanced-resolve": "^5.12.0", + "eslint-module-utils": "^2.7.4", + "get-tsconfig": "^4.5.0", + "globby": "^13.1.3", + "is-core-module": "^2.11.0", + "is-glob": "^4.0.3", + "synckit": "^0.8.5" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/unts/projects/eslint-import-resolver-ts" + }, + "peerDependencies": { + "eslint": "*", + "eslint-plugin-import": "*" + } + }, + "node_modules/eslint-import-resolver-typescript/node_modules/globby": { + "version": "13.2.1", + "resolved": "https://registry.npmjs.org/globby/-/globby-13.2.1.tgz", + "integrity": "sha512-DPCBxctI7dN4EeIqjW2KGqgdcUMbrhJ9AzON+PlxCtvppWhubTLD4+a0GFxiym14ZvacUydTPjLPc2DlKz7EIg==", + "dev": true, + "dependencies": { + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.11", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^4.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint-import-resolver-typescript/node_modules/slash": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-4.0.0.tgz", + "integrity": "sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint-module-utils": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.8.0.tgz", + "integrity": "sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==", + "dev": true, + "dependencies": { + "debug": "^3.2.7" + }, + "engines": { + "node": ">=4" + }, + "peerDependenciesMeta": { + "eslint": { + "optional": true + } + } + }, + "node_modules/eslint-module-utils/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/eslint-plugin-import": { + "name": "@phryneas/eslint-plugin-import", + "version": "2.27.5-pr.2813.2817.199971c", + "resolved": "https://registry.npmjs.org/@phryneas/eslint-plugin-import/-/eslint-plugin-import-2.27.5-pr.2813.2817.199971c.tgz", + "integrity": "sha512-aTaMmV+0Xo500xIk0B5h13xomDWWHvn8NfSZfkbn4rt/lgRWfbhhF5UfdD8nFjvuQUmYBSo/K6n4LRlr3O5rmw==", + "dev": true, + "dependencies": { + "array-includes": "^3.1.6", + "array.prototype.findlastindex": "^1.2.2", + "array.prototype.flat": "^1.3.1", + "array.prototype.flatmap": "^1.3.1", + "debug": "^3.2.7", + "doctrine": "^2.1.0", + "eslint-import-resolver-node": "^0.3.7", + "eslint-module-utils": "^2.8.0", + "has": "^1.0.3", + "is-core-module": "^2.12.1", + "is-glob": "^4.0.3", + "minimatch": "^3.1.2", + "object.fromentries": "^2.0.6", + "object.values": "^1.1.6", + "resolve": "^1.22.3", + "semver": "^6.3.0", + "tsconfig-paths": "^3.14.2" + }, + "engines": { + "node": ">=4" + }, + "peerDependencies": { + "eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8" + } + }, + "node_modules/eslint-plugin-import/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/eslint-plugin-import/node_modules/doctrine": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", + "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", + "dev": true, + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/eslint-plugin-testing-library": { "version": "5.11.0", "resolved": "https://registry.npmjs.org/eslint-plugin-testing-library/-/eslint-plugin-testing-library-5.11.0.tgz", @@ -5254,6 +5857,21 @@ } } }, + "node_modules/fetch-ponyfill": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/fetch-ponyfill/-/fetch-ponyfill-7.1.0.tgz", + "integrity": "sha512-FhbbL55dj/qdVO3YNK7ZEkshvj3eQ7EuIGV2I6ic/2YiocvyWv+7jg2s4AyS0wdRU75s3tA8ZxI/xPigb0v5Aw==", + "dev": true, + "dependencies": { + "node-fetch": "~2.6.1" + } + }, + "node_modules/fflate": { + "version": "0.7.4", + "resolved": "https://registry.npmjs.org/fflate/-/fflate-0.7.4.tgz", + "integrity": "sha512-5u2V/CDW15QM1XbbgS+0DfPxVB+jUKhWEKuuFuHncbk3tEEqzmoXL+2KyOFuKGqOnmdIy0/davWF1CkuwtibCw==", + "dev": true + }, "node_modules/file-entry-cache": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", @@ -5551,6 +6169,18 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/get-tsconfig": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.6.2.tgz", + "integrity": "sha512-E5XrT4CbbXcXWy+1jChlZmrmCwd5KGx502kDCXJJ7y898TtWW9FwoG5HfOLVRKmlmDGkWN2HM9Ho+/Y8F0sJDg==", + "dev": true, + "dependencies": { + "resolve-pkg-maps": "^1.0.0" + }, + "funding": { + "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1" + } + }, "node_modules/glob": { "version": "8.1.0", "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", @@ -6055,9 +6685,9 @@ } }, "node_modules/is-core-module": { - "version": "2.12.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.12.0.tgz", - "integrity": "sha512-RECHCBCd/viahWmwj6enj19sKbHfJrddi/6cBDsNTKbNq0f7VeaUkBo60BqzvPqo/W54ChS62Z5qyun7cfOMqQ==", + "version": "2.12.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.12.1.tgz", + "integrity": "sha512-Q4ZuBAe2FUsKtyQJoQHlvP8OvBERxO3jEmy1I7hcRXcJBGGHFh/aJBswbXuS9sgrDH2QUO8ilkwNPHvHMd8clg==", "dev": true, "dependencies": { "has": "^1.0.3" @@ -6147,7 +6777,40 @@ "is-extglob": "^2.1.1" }, "engines": { - "node": ">=0.10.0" + "node": ">=0.10.0" + } + }, + "node_modules/is-inside-container": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-inside-container/-/is-inside-container-1.0.0.tgz", + "integrity": "sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA==", + "dev": true, + "dependencies": { + "is-docker": "^3.0.0" + }, + "bin": { + "is-inside-container": "cli.js" + }, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-inside-container/node_modules/is-docker": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-3.0.0.tgz", + "integrity": "sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ==", + "dev": true, + "bin": { + "is-docker": "cli.js" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/is-module": { @@ -7870,6 +8533,65 @@ "node": ">= 12" } }, + "node_modules/marked-terminal": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/marked-terminal/-/marked-terminal-5.2.0.tgz", + "integrity": "sha512-Piv6yNwAQXGFjZSaiNljyNFw7jKDdGrw70FSbtxEyldLsyeuV5ZHm/1wW++kWbrOF1VPnUgYOhB2oLL0ZpnekA==", + "dev": true, + "dependencies": { + "ansi-escapes": "^6.2.0", + "cardinal": "^2.1.1", + "chalk": "^5.2.0", + "cli-table3": "^0.6.3", + "node-emoji": "^1.11.0", + "supports-hyperlinks": "^2.3.0" + }, + "engines": { + "node": ">=14.13.1 || >=16.0.0" + }, + "peerDependencies": { + "marked": "^1.0.0 || ^2.0.0 || ^3.0.0 || ^4.0.0 || ^5.0.0" + } + }, + "node_modules/marked-terminal/node_modules/ansi-escapes": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-6.2.0.tgz", + "integrity": "sha512-kzRaCqXnpzWs+3z5ABPQiVke+iq0KXkHo8xiWV4RPTi5Yli0l97BEQuhXV1s7+aSU/fu1kUuxgS4MsQ0fRuygw==", + "dev": true, + "dependencies": { + "type-fest": "^3.0.0" + }, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/marked-terminal/node_modules/chalk": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.2.0.tgz", + "integrity": "sha512-ree3Gqw/nazQAPuJJEy+avdl7QfZMcUvmHIKgEZkGL+xOBzRvup5Hxo6LHuMceSxOabuJLJm5Yp/92R9eMmMvA==", + "dev": true, + "engines": { + "node": "^12.17.0 || ^14.13 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/marked-terminal/node_modules/type-fest": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-3.12.0.tgz", + "integrity": "sha512-qj9wWsnFvVEMUDbESiilKeXeHL7FwwiFcogfhfyjmvT968RXSvnl23f1JOClTHYItsi7o501C/7qVllscUP3oA==", + "dev": true, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/meow": { "version": "6.1.1", "resolved": "https://registry.npmjs.org/meow/-/meow-6.1.1.tgz", @@ -8052,6 +8774,12 @@ "node": ">=10" } }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true + }, "node_modules/nanoid": { "version": "3.3.6", "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz", @@ -8091,6 +8819,15 @@ "integrity": "sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==", "dev": true }, + "node_modules/node-emoji": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/node-emoji/-/node-emoji-1.11.0.tgz", + "integrity": "sha512-wo2DpQkQp7Sjm2A0cq+sN7EHKO6Sl0ctXeBdFZrL9T9+UywORbufTcTZxom8YqpLQt/FqNMUkOpkZrJVYSKD3A==", + "dev": true, + "dependencies": { + "lodash": "^4.17.21" + } + }, "node_modules/node-fetch": { "version": "2.6.11", "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.11.tgz", @@ -8253,6 +8990,40 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/object.fromentries": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.6.tgz", + "integrity": "sha512-VciD13dswC4j1Xt5394WR4MzmAQmlgN72phd/riNp9vtD7tp4QQWJ0R4wvclXcafgcYK8veHRed2W6XeGBvcfg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object.values": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.6.tgz", + "integrity": "sha512-FVVTkD1vENCsAcwNs9k6jea2uHC/X0+JcjG8YA60FN5CMaJmG95wT9jek/xX9nornqGRrBkKtzuAu2wuHpKqvw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -9121,6 +9892,15 @@ "node": ">=8" } }, + "node_modules/redeyed": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/redeyed/-/redeyed-2.1.1.tgz", + "integrity": "sha512-FNpGGo1DycYAdnrKFxCMmKYgo/mILAqtRYbkdQD8Ep/Hk2PQ5+aEAEx+IU713RTDmuBaH0c8P5ZozurNu5ObRQ==", + "dev": true, + "dependencies": { + "esprima": "~4.0.0" + } + }, "node_modules/regenerator-runtime": { "version": "0.13.11", "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz", @@ -9197,6 +9977,15 @@ "node": ">=8" } }, + "node_modules/resolve-pkg-maps": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz", + "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==", + "dev": true, + "funding": { + "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1" + } + }, "node_modules/resolve.exports": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-2.0.1.tgz", @@ -9332,6 +10121,21 @@ "node": ">= 10.13.0" } }, + "node_modules/run-applescript": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/run-applescript/-/run-applescript-5.0.0.tgz", + "integrity": "sha512-XcT5rBksx1QdIhlFOCtgZkB99ZEouFZ1E2Kc2LHqNW13U3/74YGdkQRmThTwxy4QIyookibDKYZOPqX//6BlAg==", + "dev": true, + "dependencies": { + "execa": "^5.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/run-parallel": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", @@ -9973,6 +10777,19 @@ "node": ">=8" } }, + "node_modules/supports-hyperlinks": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-2.3.0.tgz", + "integrity": "sha512-RpsAZlpWcDwOPQA22aCH4J0t7L8JmAvsCxfOSEwm7cQs3LshN36QaTkwd70DnBOXDWGssw2eUoc8CaRWT0XunA==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0", + "supports-color": "^7.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/supports-preserve-symlinks-flag": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", @@ -9999,6 +10816,31 @@ "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==", "dev": true }, + "node_modules/synckit": { + "version": "0.8.5", + "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.8.5.tgz", + "integrity": "sha512-L1dapNV6vu2s/4Sputv8xGsCdAVlb5nRDMFU/E27D44l5U6cw1g0dGd45uLc+OXjNMmF4ntiMdCimzcjFKQI8Q==", + "dev": true, + "dependencies": { + "@pkgr/utils": "^2.3.1", + "tslib": "^2.5.0" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/unts" + } + }, + "node_modules/tapable": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", + "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, "node_modules/term-size": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/term-size/-/term-size-2.2.1.tgz", @@ -10069,6 +10911,18 @@ "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", "dev": true }, + "node_modules/titleize": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/titleize/-/titleize-3.0.0.tgz", + "integrity": "sha512-KxVu8EYHDPBdUYdKZdKtU2aj2XfEx9AfjXxE/Aj0vT06w2icA09Vus1rh6eSu1y01akYg6BjIK/hxyLJINoMLQ==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/tmp": { "version": "0.0.33", "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", @@ -10194,6 +11048,15 @@ } } }, + "node_modules/ts-jest-resolver": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/ts-jest-resolver/-/ts-jest-resolver-2.0.1.tgz", + "integrity": "sha512-FolE73BqVZCs8/RbLKxC67iaAtKpBWx7PeLKFW2zJQlOf9j851I7JRxSDenri2NFvVH3QP7v3S8q1AmL24Zb9Q==", + "dev": true, + "dependencies": { + "jest-resolve": "^29.5.0" + } + }, "node_modules/ts-jest/node_modules/semver": { "version": "7.3.8", "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", @@ -10261,10 +11124,43 @@ "node": ">=0.4.0" } }, + "node_modules/tsconfig-paths": { + "version": "3.14.2", + "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.14.2.tgz", + "integrity": "sha512-o/9iXgCYc5L/JxCHPe3Hvh8Q/2xm5Z+p18PESBU6Ff33695QnCHBEjcytY2q19ua7Mbl/DavtBOLq+oG0RCL+g==", + "dev": true, + "dependencies": { + "@types/json5": "^0.0.29", + "json5": "^1.0.2", + "minimist": "^1.2.6", + "strip-bom": "^3.0.0" + } + }, + "node_modules/tsconfig-paths/node_modules/json5": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", + "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", + "dev": true, + "dependencies": { + "minimist": "^1.2.0" + }, + "bin": { + "json5": "lib/cli.js" + } + }, + "node_modules/tsconfig-paths/node_modules/strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", + "dev": true, + "engines": { + "node": ">=4" + } + }, "node_modules/tslib": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", - "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==" + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.0.tgz", + "integrity": "sha512-7At1WUettjcSRHXCyYtTselblcHl9PJFFVKiCAy/bY97+BPZXSQ2wbq0P9s8tK2G7dFQfNnlJnPAiArVBVBsfA==" }, "node_modules/tsutils": { "version": "3.21.0", @@ -10432,6 +11328,15 @@ "node": ">= 4.0.0" } }, + "node_modules/untildify": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/untildify/-/untildify-4.0.0.tgz", + "integrity": "sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/uri-js": { "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", @@ -10503,6 +11408,18 @@ "spdx-expression-parse": "^3.0.0" } }, + "node_modules/validate-npm-package-name": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-5.0.0.tgz", + "integrity": "sha512-YuKoXDAhBYxY7SfOKxHBDoSyENFeW5VvIIQp2TGQuit8gpK6MnWaQelBKxso72DoxTZfZdcP3W90LqpSkgPzLQ==", + "dev": true, + "dependencies": { + "builtins": "^5.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, "node_modules/value-or-promise": { "version": "1.0.12", "resolved": "https://registry.npmjs.org/value-or-promise/-/value-or-promise-1.0.12.tgz", @@ -10965,6 +11882,61 @@ "integrity": "sha512-+u76oB43nOHrF4DDWRLWDCtci7f3QJoEBigemIdIeTi1ODqjx6Tad9NCVnPRwewWlKkVab5PlK8DCtPTyX7S8g==", "dev": true }, + "@andrewbranch/untar.js": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@andrewbranch/untar.js/-/untar.js-1.0.2.tgz", + "integrity": "sha512-hL80MHK3b++pEp6K23+Nl5r5D1F19DRagp2ruCBIv4McyCiLKq67vUNvEQY1aGCAKNZ8GxV23n5MhOm7RwO8Pg==", + "dev": true + }, + "@arethetypeswrong/cli": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/@arethetypeswrong/cli/-/cli-0.4.2.tgz", + "integrity": "sha512-RlAiNUUgvsM8GX9kzNTgB8xuANf2j9klpHxU3xPhfqO03MU9ybD7Qq82ULWECe/pAX9CfT93EzEzFmoFivv5VA==", + "dev": true, + "requires": { + "@arethetypeswrong/core": "0.4.1", + "chalk": "^4.1.2", + "cli-table3": "^0.6.3", + "commander": "^10.0.1", + "marked": "^5.1.0", + "marked-terminal": "^5.2.0" + }, + "dependencies": { + "commander": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-10.0.1.tgz", + "integrity": "sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==", + "dev": true + }, + "marked": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/marked/-/marked-5.1.0.tgz", + "integrity": "sha512-z3/nBe7aTI8JDszlYLk7dDVNpngjw0o1ZJtrA9kIfkkHcIF+xH7mO23aISl4WxP83elU+MFROgahqdpd05lMEQ==", + "dev": true + } + } + }, + "@arethetypeswrong/core": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/@arethetypeswrong/core/-/core-0.4.1.tgz", + "integrity": "sha512-DNRPu3ndvMqr6hewDP+Od8K9jZTj6cP8f/5eqRvEyZQPl11FmqOWaEuDFTEKym4nLGHM2cV5OOCnQBJ1IQbXQA==", + "dev": true, + "requires": { + "@andrewbranch/untar.js": "^1.0.0", + "fetch-ponyfill": "^7.1.0", + "fflate": "^0.7.4", + "typescript": "^5.1.3", + "validate-npm-package-name": "^5.0.0" + }, + "dependencies": { + "typescript": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.1.6.tgz", + "integrity": "sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA==", + "dev": true + } + } + }, "@babel/code-frame": { "version": "7.16.7", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.16.7.tgz", @@ -11770,6 +12742,13 @@ "prettier": "^2.7.1" } }, + "@colors/colors": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@colors/colors/-/colors-1.5.0.tgz", + "integrity": "sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==", + "dev": true, + "optional": true + }, "@cspotcode/source-map-support": { "version": "0.8.1", "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", @@ -12594,6 +13573,40 @@ "dev": true, "optional": true }, + "@pkgr/utils": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/@pkgr/utils/-/utils-2.4.1.tgz", + "integrity": "sha512-JOqwkgFEyi+OROIyq7l4Jy28h/WwhDnG/cPkXG2Z1iFbubB6jsHW1NDvmyOzTBxHr3yg68YGirmh1JUgMqa+9w==", + "dev": true, + "requires": { + "cross-spawn": "^7.0.3", + "fast-glob": "^3.2.12", + "is-glob": "^4.0.3", + "open": "^9.1.0", + "picocolors": "^1.0.0", + "tslib": "^2.5.0" + }, + "dependencies": { + "define-lazy-prop": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-3.0.0.tgz", + "integrity": "sha512-N+MeXYoqr3pOgn8xfyRPREN7gHakLYjhsHhWGT3fWAiL4IkAt0iDw14QiiEm2bE30c5XX5q0FtAA3CK5f9/BUg==", + "dev": true + }, + "open": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/open/-/open-9.1.0.tgz", + "integrity": "sha512-OS+QTnw1/4vrf+9hh1jc1jnYjzSG4ttTBB8UxOwAnInG3Uo4ssetzC1ihqaIHjLJnA5GGlRl6QlZXOTQhRBUvg==", + "dev": true, + "requires": { + "default-browser": "^4.0.0", + "define-lazy-prop": "^3.0.0", + "is-inside-container": "^1.0.0", + "is-wsl": "^2.2.0" + } + } + } + }, "@rollup/plugin-node-resolve": { "version": "11.2.1", "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-11.2.1.tgz", @@ -13061,6 +14074,12 @@ "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==", "dev": true }, + "@types/json5": { + "version": "0.0.29", + "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", + "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==", + "dev": true + }, "@types/lodash": { "version": "4.14.195", "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.195.tgz", @@ -13210,17 +14229,17 @@ "dev": true }, "@typescript-eslint/eslint-plugin": { - "version": "5.60.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.60.0.tgz", - "integrity": "sha512-78B+anHLF1TI8Jn/cD0Q00TBYdMgjdOn980JfAVa9yw5sop8nyTfVOQAv6LWywkOGLclDBtv5z3oxN4w7jxyNg==", + "version": "5.61.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.61.0.tgz", + "integrity": "sha512-A5l/eUAug103qtkwccSCxn8ZRwT+7RXWkFECdA4Cvl1dOlDUgTpAOfSEElZn2uSUxhdDpnCdetrf0jvU4qrL+g==", "dev": true, "requires": { "@eslint-community/regexpp": "^4.4.0", - "@typescript-eslint/scope-manager": "5.60.0", - "@typescript-eslint/type-utils": "5.60.0", - "@typescript-eslint/utils": "5.60.0", + "@typescript-eslint/scope-manager": "5.61.0", + "@typescript-eslint/type-utils": "5.61.0", + "@typescript-eslint/utils": "5.61.0", "debug": "^4.3.4", - "grapheme-splitter": "^1.0.4", + "graphemer": "^1.4.0", "ignore": "^5.2.0", "natural-compare-lite": "^1.4.0", "semver": "^7.3.7", @@ -13239,53 +14258,53 @@ } }, "@typescript-eslint/parser": { - "version": "5.60.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.60.0.tgz", - "integrity": "sha512-jBONcBsDJ9UoTWrARkRRCgDz6wUggmH5RpQVlt7BimSwaTkTjwypGzKORXbR4/2Hqjk9hgwlon2rVQAjWNpkyQ==", + "version": "5.61.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.61.0.tgz", + "integrity": "sha512-yGr4Sgyh8uO6fSi9hw3jAFXNBHbCtKKFMdX2IkT3ZqpKmtAq3lHS4ixB/COFuAIJpwl9/AqF7j72ZDWYKmIfvg==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "5.60.0", - "@typescript-eslint/types": "5.60.0", - "@typescript-eslint/typescript-estree": "5.60.0", + "@typescript-eslint/scope-manager": "5.61.0", + "@typescript-eslint/types": "5.61.0", + "@typescript-eslint/typescript-estree": "5.61.0", "debug": "^4.3.4" } }, "@typescript-eslint/scope-manager": { - "version": "5.60.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.60.0.tgz", - "integrity": "sha512-hakuzcxPwXi2ihf9WQu1BbRj1e/Pd8ZZwVTG9kfbxAMZstKz8/9OoexIwnmLzShtsdap5U/CoQGRCWlSuPbYxQ==", + "version": "5.61.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.61.0.tgz", + "integrity": "sha512-W8VoMjoSg7f7nqAROEmTt6LoBpn81AegP7uKhhW5KzYlehs8VV0ZW0fIDVbcZRcaP3aPSW+JZFua+ysQN+m/Nw==", "dev": true, "requires": { - "@typescript-eslint/types": "5.60.0", - "@typescript-eslint/visitor-keys": "5.60.0" + "@typescript-eslint/types": "5.61.0", + "@typescript-eslint/visitor-keys": "5.61.0" } }, "@typescript-eslint/type-utils": { - "version": "5.60.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.60.0.tgz", - "integrity": "sha512-X7NsRQddORMYRFH7FWo6sA9Y/zbJ8s1x1RIAtnlj6YprbToTiQnM6vxcMu7iYhdunmoC0rUWlca13D5DVHkK2g==", + "version": "5.61.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.61.0.tgz", + "integrity": "sha512-kk8u//r+oVK2Aj3ph/26XdH0pbAkC2RiSjUYhKD+PExemG4XSjpGFeyZ/QM8lBOa7O8aGOU+/yEbMJgQv/DnCg==", "dev": true, "requires": { - "@typescript-eslint/typescript-estree": "5.60.0", - "@typescript-eslint/utils": "5.60.0", + "@typescript-eslint/typescript-estree": "5.61.0", + "@typescript-eslint/utils": "5.61.0", "debug": "^4.3.4", "tsutils": "^3.21.0" } }, "@typescript-eslint/types": { - "version": "5.60.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.60.0.tgz", - "integrity": "sha512-ascOuoCpNZBccFVNJRSC6rPq4EmJ2NkuoKnd6LDNyAQmdDnziAtxbCGWCbefG1CNzmDvd05zO36AmB7H8RzKPA==", + "version": "5.61.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.61.0.tgz", + "integrity": "sha512-ldyueo58KjngXpzloHUog/h9REmHl59G1b3a5Sng1GfBo14BkS3ZbMEb3693gnP1k//97lh7bKsp6/V/0v1veQ==", "dev": true }, "@typescript-eslint/typescript-estree": { - "version": "5.60.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.60.0.tgz", - "integrity": "sha512-R43thAuwarC99SnvrBmh26tc7F6sPa2B3evkXp/8q954kYL6Ro56AwASYWtEEi+4j09GbiNAHqYwNNZuNlARGQ==", + "version": "5.61.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.61.0.tgz", + "integrity": "sha512-Fud90PxONnnLZ36oR5ClJBLTLfU4pIWBmnvGwTbEa2cXIqj70AEDEmOmpkFComjBZ/037ueKrOdHuYmSFVD7Rw==", "dev": true, "requires": { - "@typescript-eslint/types": "5.60.0", - "@typescript-eslint/visitor-keys": "5.60.0", + "@typescript-eslint/types": "5.61.0", + "@typescript-eslint/visitor-keys": "5.61.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -13305,17 +14324,17 @@ } }, "@typescript-eslint/utils": { - "version": "5.60.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.60.0.tgz", - "integrity": "sha512-ba51uMqDtfLQ5+xHtwlO84vkdjrqNzOnqrnwbMHMRY8Tqeme8C2Q8Fc7LajfGR+e3/4LoYiWXUM6BpIIbHJ4hQ==", + "version": "5.61.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.61.0.tgz", + "integrity": "sha512-mV6O+6VgQmVE6+xzlA91xifndPW9ElFW8vbSF0xCT/czPXVhwDewKila1jOyRwa9AE19zKnrr7Cg5S3pJVrTWQ==", "dev": true, "requires": { "@eslint-community/eslint-utils": "^4.2.0", "@types/json-schema": "^7.0.9", "@types/semver": "^7.3.12", - "@typescript-eslint/scope-manager": "5.60.0", - "@typescript-eslint/types": "5.60.0", - "@typescript-eslint/typescript-estree": "5.60.0", + "@typescript-eslint/scope-manager": "5.61.0", + "@typescript-eslint/types": "5.61.0", + "@typescript-eslint/typescript-estree": "5.61.0", "eslint-scope": "^5.1.1", "semver": "^7.3.7" }, @@ -13354,12 +14373,12 @@ } }, "@typescript-eslint/visitor-keys": { - "version": "5.60.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.60.0.tgz", - "integrity": "sha512-wm9Uz71SbCyhUKgcaPRauBdTegUyY/ZWl8gLwD/i/ybJqscrrdVSFImpvUz16BLPChIeKBK5Fa9s6KDQjsjyWw==", + "version": "5.61.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.61.0.tgz", + "integrity": "sha512-50XQ5VdbWrX06mQXhy93WywSFZZGsv3EOjq+lqp6WC2t+j3mb6A9xYVdrRxafvK88vg9k9u+CT4l6D8PEatjKg==", "dev": true, "requires": { - "@typescript-eslint/types": "5.60.0", + "@typescript-eslint/types": "5.61.0", "eslint-visitor-keys": "^3.3.0" } }, @@ -13492,6 +14511,12 @@ "color-convert": "^1.9.0" } }, + "ansicolors": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/ansicolors/-/ansicolors-0.3.2.tgz", + "integrity": "sha512-QXu7BPrP29VllRxH8GwB7x5iX5qWKAAMLqKQGWTeLWVlNHNOpVMJ91dsxQAIWXpjuW5wqvxu3Jd/nRjrJ+0pqg==", + "dev": true + }, "anymatch": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", @@ -13523,12 +14548,38 @@ "integrity": "sha512-V+SM7AbUwJ+EBnB8+DXs0hPZHO0W6pqBcc0dW90OwtVG02PswOu/teuARoLQjdDOH+t9pJgGnW5/Qmouf3gPJg==", "dev": true }, + "array-includes": { + "version": "3.1.6", + "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.6.tgz", + "integrity": "sha512-sgTbLvL6cNnw24FnbaDyjmvddQ2ML8arZsgaJhoABMoplz/4QRhtrYS+alr1BUM1Bwp6dhx8vVCBSLG+StwOFw==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4", + "get-intrinsic": "^1.1.3", + "is-string": "^1.0.7" + } + }, "array-union": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", "dev": true }, + "array.prototype.findlastindex": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.2.tgz", + "integrity": "sha512-tb5thFFlUcp7NdNF6/MpDk/1r/4awWG1FIz3YqDf+/zJSTezBb+/5WViH41obXULHVpDzoiCLpJ/ZO9YbJMsdw==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4", + "es-shim-unscopables": "^1.0.0", + "get-intrinsic": "^1.1.3" + } + }, "array.prototype.flat": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.1.tgz", @@ -13541,6 +14592,18 @@ "es-shim-unscopables": "^1.0.0" } }, + "array.prototype.flatmap": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.1.tgz", + "integrity": "sha512-8UGn9O1FDVvMNB0UlLv4voxRMze7+FpHyF5mSMRjWHUMlpoDViniy05870VlxhfgTnLbpuwTzvD76MTtWxB/mQ==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4", + "es-shim-unscopables": "^1.0.0" + } + }, "arrify": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", @@ -13677,6 +14740,12 @@ "is-windows": "^1.0.0" } }, + "big-integer": { + "version": "1.6.51", + "resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.51.tgz", + "integrity": "sha512-GPEid2Y9QU1Exl1rpO9B2IPJGHPSupF5GnVIP0blYvNOMer2bTvSWs1jGOUg04hTmu67nmLsQ9TBo1puaotBHg==", + "dev": true + }, "binary-extensions": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", @@ -13689,6 +14758,15 @@ "integrity": "sha512-oD8Ydw+5lNoqq+en24iuPt1QixdPpe/nUF8azTHnviCZYu9zUC+TwdzIp5orpblJosNlgNbVmmAb//c6d6ImUQ==", "dev": true }, + "bplist-parser": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/bplist-parser/-/bplist-parser-0.2.0.tgz", + "integrity": "sha512-z0M+byMThzQmD9NILRniCUXYsYpjwnlO8N5uCFaCqIOpqRsJCrQL9NK3JsD67CN5a08nF5oIL2bD6loTdHOuKw==", + "dev": true, + "requires": { + "big-integer": "^1.6.44" + } + }, "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -13766,6 +14844,35 @@ "integrity": "sha512-lGzLKcioL90C7wMczpkY0n/oART3MbBa8R9OFGE1rJxoVI86u4WAGfEk8Wjv10eKSyTHVGkSo3bvBylCEtk7LA==", "dev": true }, + "builtins": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/builtins/-/builtins-5.0.1.tgz", + "integrity": "sha512-qwVpFEHNfhYJIzNRBvd2C1kyo6jz3ZSMPyyuR47OPdiKWlbYnZNyDWuyR175qDnAJLiCo5fBBqPb3RiXgWlkOQ==", + "dev": true, + "requires": { + "semver": "^7.0.0" + }, + "dependencies": { + "semver": { + "version": "7.5.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.3.tgz", + "integrity": "sha512-QBlUtyVk/5EeHbi7X0fw6liDZc7BBmEaSYn01fMU1OUYbf6GPsbTtd8WmnqbI20SeycoHSeiybkE/q1Q+qlThQ==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + } + } + }, + "bundle-name": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/bundle-name/-/bundle-name-3.0.0.tgz", + "integrity": "sha512-PKA4BeSvBpQKQ8iPOGCSiell+N8P+Tf1DlwqmYhpe2gAhKPHn8EYOxVT+ShuGmhg8lN8XiSlS80yiExKXrURlw==", + "dev": true, + "requires": { + "run-applescript": "^5.0.0" + } + }, "bytes": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", @@ -13817,6 +14924,16 @@ "integrity": "sha512-AcKqikjMLlvghZL/vfTHorlQsLDhGRalYf1+GmWCf5SCMziSGjRYQW/JEksj14NaYHIR6KIhrFAy0HV5C25UzQ==", "dev": true }, + "cardinal": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/cardinal/-/cardinal-2.1.1.tgz", + "integrity": "sha512-JSr5eOgoEymtYHBjNWyjrMqet9Am2miJhlfKNdqLp6zoeAh0KN5dRAcxlecj5mAJrmQomgiOBj35xHLrFjqBpw==", + "dev": true, + "requires": { + "ansicolors": "~0.3.2", + "redeyed": "~2.1.0" + } + }, "chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", @@ -13893,6 +15010,16 @@ "integrity": "sha512-cOU9usZw8/dXIXKtwa8pM0OTJQuJkxMN6w30csNRUerHfeQ5R6U3kkU/FtJeIf3M202OHfY2U8ccInBG7/xogA==", "dev": true }, + "cli-table3": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/cli-table3/-/cli-table3-0.6.3.tgz", + "integrity": "sha512-w5Jac5SykAeZJKntOxJCrm63Eg5/4dhMWIcuTbo9rpE+brgaSZo0RuNJZeOyMgsUdhDeojvgyQLmjI+K50ZGyg==", + "dev": true, + "requires": { + "@colors/colors": "1.5.0", + "string-width": "^4.2.0" + } + }, "cliui": { "version": "8.0.1", "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", @@ -14173,6 +15300,95 @@ "integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==", "dev": true }, + "default-browser": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/default-browser/-/default-browser-4.0.0.tgz", + "integrity": "sha512-wX5pXO1+BrhMkSbROFsyxUm0i/cJEScyNhA4PPxc41ICuv05ZZB/MX28s8aZx6xjmatvebIapF6hLEKEcpneUA==", + "dev": true, + "requires": { + "bundle-name": "^3.0.0", + "default-browser-id": "^3.0.0", + "execa": "^7.1.1", + "titleize": "^3.0.0" + }, + "dependencies": { + "execa": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-7.1.1.tgz", + "integrity": "sha512-wH0eMf/UXckdUYnO21+HDztteVv05rq2GXksxT4fCGeHkBhw1DROXh40wcjMcRqDOWE7iPJ4n3M7e2+YFP+76Q==", + "dev": true, + "requires": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.1", + "human-signals": "^4.3.0", + "is-stream": "^3.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^5.1.0", + "onetime": "^6.0.0", + "signal-exit": "^3.0.7", + "strip-final-newline": "^3.0.0" + } + }, + "human-signals": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-4.3.1.tgz", + "integrity": "sha512-nZXjEF2nbo7lIw3mgYjItAfgQXog3OjJogSbKa2CQIIvSGWcKgeJnQlNXip6NglNzYH45nSRiEVimMvYL8DDqQ==", + "dev": true + }, + "is-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz", + "integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==", + "dev": true + }, + "mimic-fn": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz", + "integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==", + "dev": true + }, + "npm-run-path": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.1.0.tgz", + "integrity": "sha512-sJOdmRGrY2sjNTRMbSvluQqg+8X7ZK61yvzBEIDhz4f8z1TZFYABsqjjCBd/0PUNE9M6QDgHJXQkGUEm7Q+l9Q==", + "dev": true, + "requires": { + "path-key": "^4.0.0" + } + }, + "onetime": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz", + "integrity": "sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==", + "dev": true, + "requires": { + "mimic-fn": "^4.0.0" + } + }, + "path-key": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz", + "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==", + "dev": true + }, + "strip-final-newline": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz", + "integrity": "sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==", + "dev": true + } + } + }, + "default-browser-id": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/default-browser-id/-/default-browser-id-3.0.0.tgz", + "integrity": "sha512-OZ1y3y0SqSICtE8DE4S8YOE9UZOJ8wO16fKWVP5J1Qz42kV9jcnMVFrEE/noXb/ss3Q4pZIH79kxofzyNNtUNA==", + "dev": true, + "requires": { + "bplist-parser": "^0.2.0", + "untildify": "^4.0.0" + } + }, "defaults": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.4.tgz", @@ -14299,6 +15515,16 @@ "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", "dev": true }, + "enhanced-resolve": { + "version": "5.15.0", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.15.0.tgz", + "integrity": "sha512-LXYT42KJ7lpIKECr2mAXIaMldcNCh/7E0KBKOu4KSfkHmP+mZmSs+8V5gBAqisWBy0OO4W5Oyys0GO1Y8KtdKg==", + "dev": true, + "requires": { + "graceful-fs": "^4.2.4", + "tapable": "^2.2.0" + } + }, "enquirer": { "version": "2.3.6", "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", @@ -14629,6 +15855,130 @@ } } }, + "eslint-import-resolver-node": { + "version": "0.3.7", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.7.tgz", + "integrity": "sha512-gozW2blMLJCeFpBwugLTGyvVjNoeo1knonXAcatC6bjPBZitotxdWf7Gimr25N4c0AAOo4eOUfaG82IJPDpqCA==", + "dev": true, + "requires": { + "debug": "^3.2.7", + "is-core-module": "^2.11.0", + "resolve": "^1.22.1" + }, + "dependencies": { + "debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + } + } + }, + "eslint-import-resolver-typescript": { + "version": "3.5.5", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-3.5.5.tgz", + "integrity": "sha512-TdJqPHs2lW5J9Zpe17DZNQuDnox4xo2o+0tE7Pggain9Rbc19ik8kFtXdxZ250FVx2kF4vlt2RSf4qlUpG7bhw==", + "dev": true, + "requires": { + "debug": "^4.3.4", + "enhanced-resolve": "^5.12.0", + "eslint-module-utils": "^2.7.4", + "get-tsconfig": "^4.5.0", + "globby": "^13.1.3", + "is-core-module": "^2.11.0", + "is-glob": "^4.0.3", + "synckit": "^0.8.5" + }, + "dependencies": { + "globby": { + "version": "13.2.1", + "resolved": "https://registry.npmjs.org/globby/-/globby-13.2.1.tgz", + "integrity": "sha512-DPCBxctI7dN4EeIqjW2KGqgdcUMbrhJ9AzON+PlxCtvppWhubTLD4+a0GFxiym14ZvacUydTPjLPc2DlKz7EIg==", + "dev": true, + "requires": { + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.11", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^4.0.0" + } + }, + "slash": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-4.0.0.tgz", + "integrity": "sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew==", + "dev": true + } + } + }, + "eslint-module-utils": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.8.0.tgz", + "integrity": "sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==", + "dev": true, + "requires": { + "debug": "^3.2.7" + }, + "dependencies": { + "debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + } + } + }, + "eslint-plugin-import": { + "version": "npm:@phryneas/eslint-plugin-import@2.27.5-pr.2813.2817.199971c", + "resolved": "https://registry.npmjs.org/@phryneas/eslint-plugin-import/-/eslint-plugin-import-2.27.5-pr.2813.2817.199971c.tgz", + "integrity": "sha512-aTaMmV+0Xo500xIk0B5h13xomDWWHvn8NfSZfkbn4rt/lgRWfbhhF5UfdD8nFjvuQUmYBSo/K6n4LRlr3O5rmw==", + "dev": true, + "requires": { + "array-includes": "^3.1.6", + "array.prototype.findlastindex": "^1.2.2", + "array.prototype.flat": "^1.3.1", + "array.prototype.flatmap": "^1.3.1", + "debug": "^3.2.7", + "doctrine": "^2.1.0", + "eslint-import-resolver-node": "^0.3.7", + "eslint-module-utils": "^2.8.0", + "has": "^1.0.3", + "is-core-module": "^2.12.1", + "is-glob": "^4.0.3", + "minimatch": "^3.1.2", + "object.fromentries": "^2.0.6", + "object.values": "^1.1.6", + "resolve": "^1.22.3", + "semver": "^6.3.0", + "tsconfig-paths": "^3.14.2" + }, + "dependencies": { + "debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "doctrine": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", + "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", + "dev": true, + "requires": { + "esutils": "^2.0.2" + } + } + } + }, "eslint-plugin-testing-library": { "version": "5.11.0", "resolved": "https://registry.npmjs.org/eslint-plugin-testing-library/-/eslint-plugin-testing-library-5.11.0.tgz", @@ -14850,6 +16200,21 @@ "whatwg-url": "^6.5.0" } }, + "fetch-ponyfill": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/fetch-ponyfill/-/fetch-ponyfill-7.1.0.tgz", + "integrity": "sha512-FhbbL55dj/qdVO3YNK7ZEkshvj3eQ7EuIGV2I6ic/2YiocvyWv+7jg2s4AyS0wdRU75s3tA8ZxI/xPigb0v5Aw==", + "dev": true, + "requires": { + "node-fetch": "~2.6.1" + } + }, + "fflate": { + "version": "0.7.4", + "resolved": "https://registry.npmjs.org/fflate/-/fflate-0.7.4.tgz", + "integrity": "sha512-5u2V/CDW15QM1XbbgS+0DfPxVB+jUKhWEKuuFuHncbk3tEEqzmoXL+2KyOFuKGqOnmdIy0/davWF1CkuwtibCw==", + "dev": true + }, "file-entry-cache": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", @@ -15069,6 +16434,15 @@ "get-intrinsic": "^1.1.1" } }, + "get-tsconfig": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.6.2.tgz", + "integrity": "sha512-E5XrT4CbbXcXWy+1jChlZmrmCwd5KGx502kDCXJJ7y898TtWW9FwoG5HfOLVRKmlmDGkWN2HM9Ho+/Y8F0sJDg==", + "dev": true, + "requires": { + "resolve-pkg-maps": "^1.0.0" + } + }, "glob": { "version": "8.1.0", "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", @@ -15439,9 +16813,9 @@ } }, "is-core-module": { - "version": "2.12.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.12.0.tgz", - "integrity": "sha512-RECHCBCd/viahWmwj6enj19sKbHfJrddi/6cBDsNTKbNq0f7VeaUkBo60BqzvPqo/W54ChS62Z5qyun7cfOMqQ==", + "version": "2.12.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.12.1.tgz", + "integrity": "sha512-Q4ZuBAe2FUsKtyQJoQHlvP8OvBERxO3jEmy1I7hcRXcJBGGHFh/aJBswbXuS9sgrDH2QUO8ilkwNPHvHMd8clg==", "dev": true, "requires": { "has": "^1.0.3" @@ -15498,6 +16872,23 @@ "is-extglob": "^2.1.1" } }, + "is-inside-container": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-inside-container/-/is-inside-container-1.0.0.tgz", + "integrity": "sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA==", + "dev": true, + "requires": { + "is-docker": "^3.0.0" + }, + "dependencies": { + "is-docker": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-3.0.0.tgz", + "integrity": "sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ==", + "dev": true + } + } + }, "is-module": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz", @@ -16787,6 +18178,43 @@ "integrity": "sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A==", "dev": true }, + "marked-terminal": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/marked-terminal/-/marked-terminal-5.2.0.tgz", + "integrity": "sha512-Piv6yNwAQXGFjZSaiNljyNFw7jKDdGrw70FSbtxEyldLsyeuV5ZHm/1wW++kWbrOF1VPnUgYOhB2oLL0ZpnekA==", + "dev": true, + "requires": { + "ansi-escapes": "^6.2.0", + "cardinal": "^2.1.1", + "chalk": "^5.2.0", + "cli-table3": "^0.6.3", + "node-emoji": "^1.11.0", + "supports-hyperlinks": "^2.3.0" + }, + "dependencies": { + "ansi-escapes": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-6.2.0.tgz", + "integrity": "sha512-kzRaCqXnpzWs+3z5ABPQiVke+iq0KXkHo8xiWV4RPTi5Yli0l97BEQuhXV1s7+aSU/fu1kUuxgS4MsQ0fRuygw==", + "dev": true, + "requires": { + "type-fest": "^3.0.0" + } + }, + "chalk": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.2.0.tgz", + "integrity": "sha512-ree3Gqw/nazQAPuJJEy+avdl7QfZMcUvmHIKgEZkGL+xOBzRvup5Hxo6LHuMceSxOabuJLJm5Yp/92R9eMmMvA==", + "dev": true + }, + "type-fest": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-3.12.0.tgz", + "integrity": "sha512-qj9wWsnFvVEMUDbESiilKeXeHL7FwwiFcogfhfyjmvT968RXSvnl23f1JOClTHYItsi7o501C/7qVllscUP3oA==", + "dev": true + } + } + }, "meow": { "version": "6.1.1", "resolved": "https://registry.npmjs.org/meow/-/meow-6.1.1.tgz", @@ -16917,6 +18345,12 @@ "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", "dev": true }, + "ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true + }, "nanoid": { "version": "3.3.6", "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz", @@ -16944,6 +18378,15 @@ "integrity": "sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==", "dev": true }, + "node-emoji": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/node-emoji/-/node-emoji-1.11.0.tgz", + "integrity": "sha512-wo2DpQkQp7Sjm2A0cq+sN7EHKO6Sl0ctXeBdFZrL9T9+UywORbufTcTZxom8YqpLQt/FqNMUkOpkZrJVYSKD3A==", + "dev": true, + "requires": { + "lodash": "^4.17.21" + } + }, "node-fetch": { "version": "2.6.11", "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.11.tgz", @@ -17069,6 +18512,28 @@ "object-keys": "^1.1.1" } }, + "object.fromentries": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.6.tgz", + "integrity": "sha512-VciD13dswC4j1Xt5394WR4MzmAQmlgN72phd/riNp9vtD7tp4QQWJ0R4wvclXcafgcYK8veHRed2W6XeGBvcfg==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4" + } + }, + "object.values": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.6.tgz", + "integrity": "sha512-FVVTkD1vENCsAcwNs9k6jea2uHC/X0+JcjG8YA60FN5CMaJmG95wT9jek/xX9nornqGRrBkKtzuAu2wuHpKqvw==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4" + } + }, "once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -17702,6 +19167,15 @@ "strip-indent": "^3.0.0" } }, + "redeyed": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/redeyed/-/redeyed-2.1.1.tgz", + "integrity": "sha512-FNpGGo1DycYAdnrKFxCMmKYgo/mILAqtRYbkdQD8Ep/Hk2PQ5+aEAEx+IU713RTDmuBaH0c8P5ZozurNu5ObRQ==", + "dev": true, + "requires": { + "esprima": "~4.0.0" + } + }, "regenerator-runtime": { "version": "0.13.11", "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz", @@ -17757,6 +19231,12 @@ "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", "dev": true }, + "resolve-pkg-maps": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz", + "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==", + "dev": true + }, "resolve.exports": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-2.0.1.tgz", @@ -17850,6 +19330,15 @@ } } }, + "run-applescript": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/run-applescript/-/run-applescript-5.0.0.tgz", + "integrity": "sha512-XcT5rBksx1QdIhlFOCtgZkB99ZEouFZ1E2Kc2LHqNW13U3/74YGdkQRmThTwxy4QIyookibDKYZOPqX//6BlAg==", + "dev": true, + "requires": { + "execa": "^5.0.0" + } + }, "run-parallel": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", @@ -18369,6 +19858,16 @@ "has-flag": "^4.0.0" } }, + "supports-hyperlinks": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-2.3.0.tgz", + "integrity": "sha512-RpsAZlpWcDwOPQA22aCH4J0t7L8JmAvsCxfOSEwm7cQs3LshN36QaTkwd70DnBOXDWGssw2eUoc8CaRWT0XunA==", + "dev": true, + "requires": { + "has-flag": "^4.0.0", + "supports-color": "^7.0.0" + } + }, "supports-preserve-symlinks-flag": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", @@ -18386,6 +19885,22 @@ "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==", "dev": true }, + "synckit": { + "version": "0.8.5", + "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.8.5.tgz", + "integrity": "sha512-L1dapNV6vu2s/4Sputv8xGsCdAVlb5nRDMFU/E27D44l5U6cw1g0dGd45uLc+OXjNMmF4ntiMdCimzcjFKQI8Q==", + "dev": true, + "requires": { + "@pkgr/utils": "^2.3.1", + "tslib": "^2.5.0" + } + }, + "tapable": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", + "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==", + "dev": true + }, "term-size": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/term-size/-/term-size-2.2.1.tgz", @@ -18437,6 +19952,12 @@ "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", "dev": true }, + "titleize": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/titleize/-/titleize-3.0.0.tgz", + "integrity": "sha512-KxVu8EYHDPBdUYdKZdKtU2aj2XfEx9AfjXxE/Aj0vT06w2icA09Vus1rh6eSu1y01akYg6BjIK/hxyLJINoMLQ==", + "dev": true + }, "tmp": { "version": "0.0.33", "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", @@ -18528,6 +20049,15 @@ } } }, + "ts-jest-resolver": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/ts-jest-resolver/-/ts-jest-resolver-2.0.1.tgz", + "integrity": "sha512-FolE73BqVZCs8/RbLKxC67iaAtKpBWx7PeLKFW2zJQlOf9j851I7JRxSDenri2NFvVH3QP7v3S8q1AmL24Zb9Q==", + "dev": true, + "requires": { + "jest-resolve": "^29.5.0" + } + }, "ts-node": { "version": "10.9.1", "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz", @@ -18557,10 +20087,39 @@ } } }, + "tsconfig-paths": { + "version": "3.14.2", + "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.14.2.tgz", + "integrity": "sha512-o/9iXgCYc5L/JxCHPe3Hvh8Q/2xm5Z+p18PESBU6Ff33695QnCHBEjcytY2q19ua7Mbl/DavtBOLq+oG0RCL+g==", + "dev": true, + "requires": { + "@types/json5": "^0.0.29", + "json5": "^1.0.2", + "minimist": "^1.2.6", + "strip-bom": "^3.0.0" + }, + "dependencies": { + "json5": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", + "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", + "dev": true, + "requires": { + "minimist": "^1.2.0" + } + }, + "strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", + "dev": true + } + } + }, "tslib": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", - "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==" + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.0.tgz", + "integrity": "sha512-7At1WUettjcSRHXCyYtTselblcHl9PJFFVKiCAy/bY97+BPZXSQ2wbq0P9s8tK2G7dFQfNnlJnPAiArVBVBsfA==" }, "tsutils": { "version": "3.21.0", @@ -18679,6 +20238,12 @@ "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", "dev": true }, + "untildify": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/untildify/-/untildify-4.0.0.tgz", + "integrity": "sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw==", + "dev": true + }, "uri-js": { "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", @@ -18746,6 +20311,15 @@ "spdx-expression-parse": "^3.0.0" } }, + "validate-npm-package-name": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-5.0.0.tgz", + "integrity": "sha512-YuKoXDAhBYxY7SfOKxHBDoSyENFeW5VvIIQp2TGQuit8gpK6MnWaQelBKxso72DoxTZfZdcP3W90LqpSkgPzLQ==", + "dev": true, + "requires": { + "builtins": "^5.0.0" + } + }, "value-or-promise": { "version": "1.0.12", "resolved": "https://registry.npmjs.org/value-or-promise/-/value-or-promise-1.0.12.tgz", diff --git a/package.json b/package.json index db3a1c9c699..bf01f1addd8 100644 --- a/package.json +++ b/package.json @@ -100,6 +100,7 @@ "zen-observable-ts": "^1.2.5" }, "devDependencies": { + "@arethetypeswrong/cli": "0.4.2", "@babel/parser": "7.22.5", "@changesets/changelog-github": "0.4.8", "@changesets/cli": "2.26.1", @@ -122,13 +123,15 @@ "@types/react": "18.2.14", "@types/react-dom": "18.2.6", "@types/use-sync-external-store": "0.0.3", - "@typescript-eslint/eslint-plugin": "5.60.0", - "@typescript-eslint/parser": "5.60.0", + "@typescript-eslint/eslint-plugin": "5.61.0", + "@typescript-eslint/parser": "5.61.0", "acorn": "8.9.0", "blob-polyfill": "7.0.20220408", "bytes": "3.1.2", "cross-fetch": "3.1.6", "eslint": "8.43.0", + "eslint-import-resolver-typescript": "3.5.5", + "eslint-plugin-import": "npm:@phryneas/eslint-plugin-import@^2.27.5-pr.2813.2817.199971c", "eslint-plugin-testing-library": "5.11.0", "expect-type": "0.15.0", "fetch-mock": "9.11.0", @@ -156,6 +159,7 @@ "subscriptions-transport-ws": "0.11.0", "terser": "5.18.1", "ts-jest": "29.1.0", + "ts-jest-resolver": "2.0.1", "ts-node": "10.9.1", "typedoc": "0.24.7", "typescript": "5.1.3", diff --git a/src/cache/core/cache.ts b/src/cache/core/cache.ts index e48f12ccaec..c116c9ed5eb 100644 --- a/src/cache/core/cache.ts +++ b/src/cache/core/cache.ts @@ -3,12 +3,12 @@ import { wrap } from 'optimism'; import type { StoreObject, - Reference} from '../../utilities'; + Reference} from '../../utilities/index.js'; import { getFragmentQueryDocument, -} from '../../utilities'; -import type { DataProxy } from './types/DataProxy'; -import type { Cache } from './types/Cache'; +} from '../../utilities/index.js'; +import type { DataProxy } from './types/DataProxy.js'; +import type { Cache } from './types/Cache.js'; export type Transaction = (c: ApolloCache) => void; diff --git a/src/cache/core/types/Cache.ts b/src/cache/core/types/Cache.ts index 47504c287c7..5ddc56018c9 100644 --- a/src/cache/core/types/Cache.ts +++ b/src/cache/core/types/Cache.ts @@ -1,6 +1,6 @@ -import { DataProxy } from './DataProxy'; -import type { AllFieldsModifier, Modifiers } from './common';; -import type { ApolloCache } from '../cache'; +import { DataProxy } from './DataProxy.js'; +import type { AllFieldsModifier, Modifiers } from './common.js';; +import type { ApolloCache } from '../cache.js'; export namespace Cache { export type WatchCallback = ( diff --git a/src/cache/core/types/DataProxy.ts b/src/cache/core/types/DataProxy.ts index 5d9e0fef1c5..3c893237a6e 100644 --- a/src/cache/core/types/DataProxy.ts +++ b/src/cache/core/types/DataProxy.ts @@ -1,8 +1,8 @@ import type { DocumentNode } from 'graphql'; // ignore-comment eslint-disable-line import/no-extraneous-dependencies, import/no-unresolved import type { TypedDocumentNode } from '@graphql-typed-document-node/core'; -import type { MissingFieldError } from './common'; -import type { Reference } from '../../../utilities'; +import type { MissingFieldError } from './common.js'; +import type { Reference } from '../../../utilities/index.js'; export namespace DataProxy { export interface Query { diff --git a/src/cache/core/types/common.ts b/src/cache/core/types/common.ts index 3a1cdcf4df6..9749f53c105 100644 --- a/src/cache/core/types/common.ts +++ b/src/cache/core/types/common.ts @@ -5,9 +5,9 @@ import type { StoreObject, StoreValue, isReference, -} from '../../../utilities'; +} from '../../../utilities/index.js'; -import type { StorageType } from '../../inmemory/policies'; +import type { StorageType } from '../../inmemory/policies.js'; // The Readonly type only really works for object types, since it marks // all of the object's properties as readonly, but there are many cases when @@ -98,7 +98,7 @@ export type Modifier = ( details: ModifierDetails ) => T | DeleteModifier | InvalidateModifier; -type StoreObjectValueMaybeReference = +type StoreObjectValueMaybeReference = StoreVal extends Record[] ? Readonly | readonly Reference[] : StoreVal extends Record @@ -107,7 +107,7 @@ type StoreObjectValueMaybeReference = export type AllFieldsModifier< Entity extends Record -> = Modifier = Modifier> : never>; diff --git a/src/cache/index.ts b/src/cache/index.ts index 4c143d45457..d50ed678ddd 100644 --- a/src/cache/index.ts +++ b/src/cache/index.ts @@ -1,8 +1,8 @@ -import '../utilities/globals'; +import '../utilities/globals/index.js'; -export { Transaction, ApolloCache } from './core/cache'; -export { Cache } from './core/types/Cache'; -export { DataProxy } from './core/types/DataProxy'; +export { Transaction, ApolloCache } from './core/cache.js'; +export { Cache } from './core/types/Cache.js'; +export { DataProxy } from './core/types/DataProxy.js'; export { MissingTree, Modifier, @@ -10,29 +10,29 @@ export { ModifierDetails, MissingFieldError, ReadFieldOptions -} from './core/types/common'; +} from './core/types/common.js'; export { Reference, isReference, makeReference, -} from '../utilities'; +} from '../utilities/index.js'; -export { EntityStore } from './inmemory/entityStore'; +export { EntityStore } from './inmemory/entityStore.js'; export { fieldNameFromStoreName, defaultDataIdFromObject, -} from './inmemory/helpers' +} from './inmemory/helpers.js' export { InMemoryCache, -} from './inmemory/inMemoryCache'; +} from './inmemory/inMemoryCache.js'; export { ReactiveVar, makeVar, cacheSlot, -} from './inmemory/reactiveVars'; +} from './inmemory/reactiveVars.js'; export { TypePolicies, @@ -43,15 +43,15 @@ export { FieldFunctionOptions, PossibleTypesMap, Policies, -} from './inmemory/policies'; +} from './inmemory/policies.js'; export { canonicalStringify, -} from './inmemory/object-canon'; +} from './inmemory/object-canon.js'; export { FragmentRegistryAPI, createFragmentRegistry, -} from './inmemory/fragmentRegistry'; +} from './inmemory/fragmentRegistry.js'; -export * from './inmemory/types'; +export * from './inmemory/types.js'; diff --git a/src/cache/inmemory/entityStore.ts b/src/cache/inmemory/entityStore.ts index a7dd96be059..4ff97337eb7 100644 --- a/src/cache/inmemory/entityStore.ts +++ b/src/cache/inmemory/entityStore.ts @@ -1,4 +1,4 @@ -import { invariant } from '../../utilities/globals'; +import { invariant } from '../../utilities/globals/index.js'; import type { OptimisticDependencyFunction } from 'optimism'; import { dep } from 'optimism'; import { equal } from '@wry/equality'; @@ -7,7 +7,7 @@ import { Trie } from '@wry/trie'; import type { StoreValue, StoreObject, - Reference} from '../../utilities'; + Reference} from '../../utilities/index.js'; import { isReference, makeReference, @@ -15,11 +15,11 @@ import { maybeDeepFreeze, canUseWeakMap, isNonNullObject, -} from '../../utilities'; -import type { NormalizedCache, NormalizedCacheObject } from './types'; -import { hasOwn, fieldNameFromStoreName } from './helpers'; -import type { Policies, StorageType } from './policies'; -import type { Cache } from '../core/types/Cache'; +} from '../../utilities/index.js'; +import type { NormalizedCache, NormalizedCacheObject } from './types.js'; +import { hasOwn, fieldNameFromStoreName } from './helpers.js'; +import type { Policies, StorageType } from './policies.js'; +import type { Cache } from '../core/types/Cache.js'; import type { SafeReadonly, Modifier, @@ -30,7 +30,7 @@ import type { InvalidateModifier, DeleteModifier, ModifierDetails, -} from '../core/types/common'; +} from '../core/types/common.js'; const DELETE: DeleteModifier = Object.create(null); const delModifier: Modifier = () => DELETE; diff --git a/src/cache/inmemory/fragmentRegistry.ts b/src/cache/inmemory/fragmentRegistry.ts index 8709a26d95f..59d9318c83a 100644 --- a/src/cache/inmemory/fragmentRegistry.ts +++ b/src/cache/inmemory/fragmentRegistry.ts @@ -9,8 +9,8 @@ import { import { wrap } from "optimism"; -import type { FragmentMap} from "../../utilities"; -import { getFragmentDefinitions } from "../../utilities"; +import type { FragmentMap} from "../../utilities/index.js"; +import { getFragmentDefinitions } from "../../utilities/index.js"; export interface FragmentRegistryAPI { register(...fragments: DocumentNode[]): this; diff --git a/src/cache/inmemory/helpers.ts b/src/cache/inmemory/helpers.ts index 06f6c0b5311..35af7be1ef8 100644 --- a/src/cache/inmemory/helpers.ts +++ b/src/cache/inmemory/helpers.ts @@ -3,17 +3,17 @@ import type { DocumentNode, FragmentDefinitionNode, SelectionSetNode } from 'gra import type { NormalizedCache, InMemoryCacheConfig, -} from './types'; +} from './types.js'; -import type { KeyFieldsContext } from './policies'; -import type { FragmentRegistryAPI } from './fragmentRegistry'; +import type { KeyFieldsContext } from './policies.js'; +import type { FragmentRegistryAPI } from './fragmentRegistry.js'; import type { Reference, StoreValue, StoreObject, FragmentMap, - FragmentMapFunction} from '../../utilities'; + FragmentMapFunction} from '../../utilities/index.js'; import { isReference, isField, @@ -25,7 +25,7 @@ import { createFragmentMap, getFragmentDefinitions, isArray, -} from '../../utilities'; +} from '../../utilities/index.js'; export const { hasOwnProperty: hasOwn, diff --git a/src/cache/inmemory/inMemoryCache.ts b/src/cache/inmemory/inMemoryCache.ts index 49b33c59397..dc74f9d4a56 100644 --- a/src/cache/inmemory/inMemoryCache.ts +++ b/src/cache/inmemory/inMemoryCache.ts @@ -1,36 +1,36 @@ -import { invariant } from '../../utilities/globals'; +import { invariant } from '../../utilities/globals/index.js'; // Make builtins like Map and Set safe to use with non-extensible objects. -import './fixPolyfills'; +import './fixPolyfills.js'; import type { DocumentNode } from 'graphql'; import type { OptimisticWrapperFunction} from 'optimism'; import { wrap } from 'optimism'; import { equal } from '@wry/equality'; -import { ApolloCache } from '../core/cache'; -import type { Cache } from '../core/types/Cache'; -import { MissingFieldError } from '../core/types/common'; +import { ApolloCache } from '../core/cache.js'; +import type { Cache } from '../core/types/Cache.js'; +import { MissingFieldError } from '../core/types/common.js'; import type { StoreObject, - Reference} from '../../utilities'; + Reference} from '../../utilities/index.js'; import { addTypenameToDocument, isReference, DocumentTransform, -} from '../../utilities'; +} from '../../utilities/index.js'; import type { InMemoryCacheConfig, NormalizedCacheObject, -} from './types'; -import { StoreReader } from './readFromStore'; -import { StoreWriter } from './writeToStore'; -import { EntityStore, supportsResultCaching } from './entityStore'; -import { makeVar, forgetCache, recallCache } from './reactiveVars'; -import { Policies } from './policies'; -import { hasOwn, normalizeConfig, shouldCanonizeResults } from './helpers'; -import { canonicalStringify } from './object-canon'; -import type { OperationVariables } from '../../core'; +} from './types.js'; +import { StoreReader } from './readFromStore.js'; +import { StoreWriter } from './writeToStore.js'; +import { EntityStore, supportsResultCaching } from './entityStore.js'; +import { makeVar, forgetCache, recallCache } from './reactiveVars.js'; +import { Policies } from './policies.js'; +import { hasOwn, normalizeConfig, shouldCanonizeResults } from './helpers.js'; +import { canonicalStringify } from './object-canon.js'; +import type { OperationVariables } from '../../core/index.js'; type BroadcastOptions = Pick< Cache.BatchOptions, diff --git a/src/cache/inmemory/key-extractor.ts b/src/cache/inmemory/key-extractor.ts index 722a59812ce..e4c96489456 100644 --- a/src/cache/inmemory/key-extractor.ts +++ b/src/cache/inmemory/key-extractor.ts @@ -1,18 +1,18 @@ -import { invariant } from "../../utilities/globals"; +import { invariant } from "../../utilities/globals/index.js"; import { argumentsObjectFromField, DeepMerger, isNonEmptyArray, isNonNullObject, -} from "../../utilities"; +} from "../../utilities/index.js"; -import { hasOwn, isArray } from "./helpers"; +import { hasOwn, isArray } from "./helpers.js"; import type { KeySpecifier, KeyFieldsFunction, KeyArgsFunction, -} from "./policies"; +} from "./policies.js"; // Mapping from JSON-encoded KeySpecifier strings to associated information. const specifierInfoCache: Record(value: T): T { if (isObjectOrArray(value)) { diff --git a/src/cache/inmemory/policies.ts b/src/cache/inmemory/policies.ts index e75636e006d..9ee25c4be4c 100644 --- a/src/cache/inmemory/policies.ts +++ b/src/cache/inmemory/policies.ts @@ -1,4 +1,4 @@ -import { invariant, newInvariantError } from '../../utilities/globals'; +import { invariant, newInvariantError } from '../../utilities/globals/index.js'; import type { InlineFragmentNode, @@ -11,7 +11,7 @@ import type { FragmentMap, StoreValue, StoreObject, - Reference} from '../../utilities'; + Reference} from '../../utilities/index.js'; import { storeKeyNameFromField, argumentsObjectFromField, @@ -19,13 +19,13 @@ import { getStoreKeyName, isNonNullObject, stringifyForDisplay, -} from '../../utilities'; +} from '../../utilities/index.js'; import type { IdGetter, MergeInfo, NormalizedCache, ReadMergeModifyContext, -} from "./types"; +} from "./types.js"; import { hasOwn, fieldNameFromStoreName, @@ -34,9 +34,9 @@ import { TypeOrFieldNameRegExp, defaultDataIdFromObject, isArray, -} from './helpers'; -import { cacheSlot } from './reactiveVars'; -import type { InMemoryCache } from './inMemoryCache'; +} from './helpers.js'; +import { cacheSlot } from './reactiveVars.js'; +import type { InMemoryCache } from './inMemoryCache.js'; import type { SafeReadonly, FieldSpecifier, @@ -44,14 +44,14 @@ import type { ReadFieldFunction, ReadFieldOptions, CanReadFunction, -} from '../core/types/common'; -import type { WriteContext } from './writeToStore'; +} from '../core/types/common.js'; +import type { WriteContext } from './writeToStore.js'; // Upgrade to a faster version of the default stable JSON.stringify function // used by getStoreKeyName. This function is used when computing storeFieldName // strings (when no keyArgs has been configured for a field). -import { canonicalStringify } from './object-canon'; -import { keyArgsFnFromSpecifier, keyFieldsFnFromSpecifier } from './key-extractor'; +import { canonicalStringify } from './object-canon.js'; +import { keyArgsFnFromSpecifier, keyFieldsFnFromSpecifier } from './key-extractor.js'; getStoreKeyName.setStringify(canonicalStringify); diff --git a/src/cache/inmemory/reactiveVars.ts b/src/cache/inmemory/reactiveVars.ts index 9e347f35f4a..d1cc70fc508 100644 --- a/src/cache/inmemory/reactiveVars.ts +++ b/src/cache/inmemory/reactiveVars.ts @@ -1,8 +1,8 @@ import type { OptimisticDependencyFunction } from "optimism"; import { dep } from "optimism"; import { Slot } from "@wry/context"; -import type { InMemoryCache } from "./inMemoryCache"; -import type { ApolloCache } from '../../core'; +import type { InMemoryCache } from "./inMemoryCache.js"; +import type { ApolloCache } from '../../core/index.js'; export interface ReactiveVar { (newValue?: T): T; diff --git a/src/cache/inmemory/readFromStore.ts b/src/cache/inmemory/readFromStore.ts index 45fec6a5d52..eb1669e3aed 100644 --- a/src/cache/inmemory/readFromStore.ts +++ b/src/cache/inmemory/readFromStore.ts @@ -1,4 +1,4 @@ -import { invariant, newInvariantError } from '../../utilities/globals'; +import { invariant, newInvariantError } from '../../utilities/globals/index.js'; import type { DocumentNode, @@ -14,7 +14,7 @@ import type { Reference, StoreObject, FragmentMap, - FragmentMapFunction} from '../../utilities'; + FragmentMapFunction} from '../../utilities/index.js'; import { isField, resultKeyNameFromField, @@ -32,21 +32,21 @@ import { isNonNullObject, canUseWeakMap, compact -} from '../../utilities'; -import type { Cache } from '../core/types/Cache'; +} from '../../utilities/index.js'; +import type { Cache } from '../core/types/Cache.js'; import type { DiffQueryAgainstStoreOptions, InMemoryCacheConfig, NormalizedCache, ReadMergeModifyContext, -} from './types'; -import { maybeDependOnExistenceOfEntity, supportsResultCaching } from './entityStore'; -import { isArray, extractFragmentContext, getTypenameFromStoreObject, shouldCanonizeResults } from './helpers'; -import type { Policies } from './policies'; -import type { InMemoryCache } from './inMemoryCache'; -import type { MissingTree } from '../core/types/common'; -import { MissingFieldError } from '../core/types/common'; -import { canonicalStringify, ObjectCanon } from './object-canon'; +} from './types.js'; +import { maybeDependOnExistenceOfEntity, supportsResultCaching } from './entityStore.js'; +import { isArray, extractFragmentContext, getTypenameFromStoreObject, shouldCanonizeResults } from './helpers.js'; +import type { Policies } from './policies.js'; +import type { InMemoryCache } from './inMemoryCache.js'; +import type { MissingTree } from '../core/types/common.js'; +import { MissingFieldError } from '../core/types/common.js'; +import { canonicalStringify, ObjectCanon } from './object-canon.js'; export type VariableMap = { [name: string]: any }; @@ -522,7 +522,7 @@ function assertSelectionSetForIdValue( invariant( !isReference(value), `Missing selection set for object of type %s returned for query field %s`, - getTypenameFromStoreObject(store, value), + getTypenameFromStoreObject(store, value), field.name.value ); Object.values(value).forEach(workSet.add, workSet); diff --git a/src/cache/inmemory/types.ts b/src/cache/inmemory/types.ts index 286649c8239..b7941b5ae16 100644 --- a/src/cache/inmemory/types.ts +++ b/src/cache/inmemory/types.ts @@ -1,27 +1,27 @@ import type { DocumentNode, FieldNode } from 'graphql'; -import type { Transaction } from '../core/cache'; +import type { Transaction } from '../core/cache.js'; import { StoreObject, StoreValue, Reference, -} from '../../utilities'; -import type { FieldValueGetter } from './entityStore'; +} from '../../utilities/index.js'; +import type { FieldValueGetter } from './entityStore.js'; import type { TypePolicies, PossibleTypesMap, KeyFieldsFunction, StorageType, FieldMergeFunction, -} from './policies'; +} from './policies.js'; import type { Modifiers, ToReferenceFunction, CanReadFunction, AllFieldsModifier, -} from '../core/types/common'; +} from '../core/types/common.js'; -import type { FragmentRegistryAPI } from './fragmentRegistry'; +import type { FragmentRegistryAPI } from './fragmentRegistry.js'; export { StoreObject, StoreValue, Reference } diff --git a/src/cache/inmemory/writeToStore.ts b/src/cache/inmemory/writeToStore.ts index 3f40fb3ac59..0f8f4b74ee2 100644 --- a/src/cache/inmemory/writeToStore.ts +++ b/src/cache/inmemory/writeToStore.ts @@ -1,4 +1,4 @@ -import { invariant, newInvariantError } from '../../utilities/globals'; +import { invariant, newInvariantError } from '../../utilities/globals/index.js'; import { equal } from '@wry/equality'; import { Trie } from '@wry/trie'; import type { @@ -13,7 +13,7 @@ import type { FragmentMapFunction, StoreValue, StoreObject, - Reference} from '../../utilities'; + Reference} from '../../utilities/index.js'; import { getFragmentFromSelection, getDefaultValues, @@ -28,17 +28,17 @@ import { addTypenameToDocument, isNonEmptyArray, argumentsObjectFromField, -} from '../../utilities'; - -import type { NormalizedCache, ReadMergeModifyContext, MergeTree, InMemoryCacheConfig } from './types'; -import { isArray, makeProcessedFieldsMerger, fieldNameFromStoreName, storeValueIsStoreObject, extractFragmentContext } from './helpers'; -import type { StoreReader } from './readFromStore'; -import type { InMemoryCache } from './inMemoryCache'; -import type { EntityStore } from './entityStore'; -import type { Cache } from '../../core'; -import { canonicalStringify } from './object-canon'; -import { normalizeReadFieldOptions } from './policies'; -import type { ReadFieldFunction } from '../core/types/common'; +} from '../../utilities/index.js'; + +import type { NormalizedCache, ReadMergeModifyContext, MergeTree, InMemoryCacheConfig } from './types.js'; +import { isArray, makeProcessedFieldsMerger, fieldNameFromStoreName, storeValueIsStoreObject, extractFragmentContext } from './helpers.js'; +import type { StoreReader } from './readFromStore.js'; +import type { InMemoryCache } from './inMemoryCache.js'; +import type { EntityStore } from './entityStore.js'; +import type { Cache } from '../../core/index.js'; +import { canonicalStringify } from './object-canon.js'; +import { normalizeReadFieldOptions } from './policies.js'; +import type { ReadFieldFunction } from '../core/types/common.js'; export interface WriteContext extends ReadMergeModifyContext { readonly written: { diff --git a/src/config/jest/setup.ts b/src/config/jest/setup.ts index 179023e7dcb..8dd8a0cdb3c 100644 --- a/src/config/jest/setup.ts +++ b/src/config/jest/setup.ts @@ -1,7 +1,7 @@ import gql from 'graphql-tag'; import '@testing-library/jest-dom'; -import { loadErrorMessageHandler } from '../../dev/loadErrorMessageHandler'; -import '../../testing/matchers'; +import { loadErrorMessageHandler } from '../../dev/loadErrorMessageHandler.js'; +import '../../testing/matchers/index.js'; // Turn off warnings for repeated fragment names gql.disableFragmentWarnings(); diff --git a/src/core/ApolloClient.ts b/src/core/ApolloClient.ts index 69c60ee38e2..69d124bfad0 100644 --- a/src/core/ApolloClient.ts +++ b/src/core/ApolloClient.ts @@ -1,17 +1,17 @@ -import { invariant, newInvariantError } from '../utilities/globals'; +import { invariant, newInvariantError } from '../utilities/globals/index.js'; import type { ExecutionResult, DocumentNode } from 'graphql'; -import type { FetchResult, GraphQLRequest} from '../link/core'; -import { ApolloLink, execute } from '../link/core'; -import type { ApolloCache, DataProxy, Reference } from '../cache'; -import type { DocumentTransform, Observable } from '../utilities'; -import { version } from '../version'; -import type { UriFunction } from '../link/http'; -import { HttpLink } from '../link/http'; +import type { FetchResult, GraphQLRequest} from '../link/core/index.js'; +import { ApolloLink, execute } from '../link/core/index.js'; +import type { ApolloCache, DataProxy, Reference } from '../cache/index.js'; +import type { DocumentTransform, Observable } from '../utilities/index.js'; +import { version } from '../version.js'; +import type { UriFunction } from '../link/http/index.js'; +import { HttpLink } from '../link/http/index.js'; -import { QueryManager } from './QueryManager'; -import type { ObservableQuery } from './ObservableQuery'; +import { QueryManager } from './QueryManager.js'; +import type { ObservableQuery } from './ObservableQuery.js'; import type { ApolloQueryResult, @@ -22,7 +22,7 @@ import type { RefetchQueriesResult, InternalRefetchQueriesResult, RefetchQueriesInclude, -} from './types'; +} from './types.js'; import type { QueryOptions, @@ -30,13 +30,13 @@ import type { MutationOptions, SubscriptionOptions, WatchQueryFetchPolicy, -} from './watchQueryOptions'; +} from './watchQueryOptions.js'; import type { - FragmentMatcher} from './LocalState'; + FragmentMatcher} from './LocalState.js'; import { LocalState -} from './LocalState'; +} from './LocalState.js'; export interface DefaultOptions { watchQuery?: Partial>; @@ -70,7 +70,7 @@ export type ApolloClientOptions = { // previously declared and exported from this module, and then reexported from // @apollo/client/core. Since we need to preserve that API anyway, the easiest // solution is to reexport mergeOptions where it was previously declared (here). -import { mergeOptions } from "../utilities"; +import { mergeOptions } from "../utilities/index.js"; export { mergeOptions } /** diff --git a/src/core/LocalState.ts b/src/core/LocalState.ts index a9e026e0e29..69009576b2b 100644 --- a/src/core/LocalState.ts +++ b/src/core/LocalState.ts @@ -1,4 +1,4 @@ -import { invariant } from '../utilities/globals'; +import { invariant } from '../utilities/globals/index.js'; import type { DocumentNode, @@ -18,10 +18,10 @@ import { isSelectionNode } from 'graphql'; -import type { ApolloCache } from '../cache'; +import type { ApolloCache } from '../cache/index.js'; import type { FragmentMap, - StoreObject} from '../utilities'; + StoreObject} from '../utilities/index.js'; import { argumentsObjectFromField, buildQueryFromSelectionSet, @@ -36,11 +36,11 @@ import { removeClientSetsFromDocument, resultKeyNameFromField, shouldInclude, -} from '../utilities'; -import type { ApolloClient } from './ApolloClient'; -import type { Resolvers, OperationVariables } from './types'; -import type { FetchResult } from '../link/core'; -import { cacheSlot } from '../cache'; +} from '../utilities/index.js'; +import type { ApolloClient } from './ApolloClient.js'; +import type { Resolvers, OperationVariables } from './types.js'; +import type { FetchResult } from '../link/core/index.js'; +import { cacheSlot } from '../cache/index.js'; export type Resolver = ( rootValue?: any, diff --git a/src/core/ObservableQuery.ts b/src/core/ObservableQuery.ts index 3f0d1a20bb5..2418d676b91 100644 --- a/src/core/ObservableQuery.ts +++ b/src/core/ObservableQuery.ts @@ -1,12 +1,12 @@ -import { invariant } from '../utilities/globals'; +import { invariant } from '../utilities/globals/index.js'; import type { DocumentNode } from 'graphql'; import { equal } from '@wry/equality'; -import { NetworkStatus, isNetworkRequestInFlight } from './networkStatus'; +import { NetworkStatus, isNetworkRequestInFlight } from './networkStatus.js'; import type { Concast, Observer, - ObservableSubscription} from '../utilities'; + ObservableSubscription} from '../utilities/index.js'; import { cloneDeep, compact, @@ -15,25 +15,25 @@ import { iterateObserversSafely, fixObservableSubclass, getQueryDefinition, -} from '../utilities'; -import type { ApolloError } from '../errors'; -import type { QueryManager } from './QueryManager'; +} from '../utilities/index.js'; +import type { ApolloError } from '../errors/index.js'; +import type { QueryManager } from './QueryManager.js'; import type { ApolloQueryResult, OperationVariables, TypedDocumentNode, -} from './types'; +} from './types.js'; import type { WatchQueryOptions, FetchMoreQueryOptions, SubscribeToMoreOptions, NextFetchPolicyContext, WatchQueryFetchPolicy, -} from './watchQueryOptions'; -import type { QueryInfo } from './QueryInfo'; -import type { MissingFieldError } from '../cache'; -import type { MissingTree } from '../cache/core/types/common'; -import { equalByQuery } from './equalByQuery'; +} from './watchQueryOptions.js'; +import type { QueryInfo } from './QueryInfo.js'; +import type { MissingFieldError } from '../cache/index.js'; +import type { MissingTree } from '../cache/core/types/common.js'; +import { equalByQuery } from './equalByQuery.js'; const { assign, @@ -398,8 +398,8 @@ export class ObservableQuery< const vars = queryDef.variableDefinitions; if (!vars || !vars.some(v => v.variable.name.value === "variables")) { invariant.warn(`Called refetch(%o) for query %o, which does not declare a $variables variable. -Did you mean to call refetch(variables) instead of refetch({ variables })?`, - variables, +Did you mean to call refetch(variables) instead of refetch({ variables })?`, + variables, queryDef.name?.value || queryDef ); } @@ -451,12 +451,12 @@ Did you mean to call refetch(variables) instead of refetch({ variables })?`, const qid = this.queryManager.generateQueryId(); - // If a temporary query is passed to `fetchMore`, we don't want to store - // it as the last query result since it may be an optimized query for - // pagination. We will however run the transforms on the original document - // as well as the document passed in `fetchMoreOptions` to ensure the cache + // If a temporary query is passed to `fetchMore`, we don't want to store + // it as the last query result since it may be an optimized query for + // pagination. We will however run the transforms on the original document + // as well as the document passed in `fetchMoreOptions` to ensure the cache // uses the most up-to-date document which may rely on runtime conditionals. - this.lastQuery = fetchMoreOptions.query + this.lastQuery = fetchMoreOptions.query ? this.transformDocument(this.options.query) : combinedOptions.query; @@ -851,9 +851,9 @@ Did you mean to call refetch(variables) instead of refetch({ variables })?`, ? mergedOptions : assign(this.options, mergedOptions); - // Don't update options.query with the transformed query to avoid - // overwriting this.options.query when we aren't using a disposable concast. - // We want to ensure we can re-run the custom document transforms the next + // Don't update options.query with the transformed query to avoid + // overwriting this.options.query when we aren't using a disposable concast. + // We want to ensure we can re-run the custom document transforms the next // time a request is made against the original query. const query = this.transformDocument(options.query); diff --git a/src/core/QueryInfo.ts b/src/core/QueryInfo.ts index 1ce6377c40b..307caee1547 100644 --- a/src/core/QueryInfo.ts +++ b/src/core/QueryInfo.ts @@ -1,27 +1,27 @@ import type { DocumentNode, GraphQLError } from 'graphql'; import { equal } from "@wry/equality"; -import type { Cache, ApolloCache } from '../cache'; -import { DeepMerger } from "../utilities" -import { mergeIncrementalData } from '../utilities'; -import type { WatchQueryOptions, ErrorPolicy } from './watchQueryOptions'; -import type { ObservableQuery} from './ObservableQuery'; -import { reobserveCacheFirst } from './ObservableQuery'; -import type { QueryListener, MethodKeys } from './types'; -import type { FetchResult } from '../link/core'; +import type { Cache, ApolloCache } from '../cache/index.js'; +import { DeepMerger } from "../utilities/index.js" +import { mergeIncrementalData } from '../utilities/index.js'; +import type { WatchQueryOptions, ErrorPolicy } from './watchQueryOptions.js'; +import type { ObservableQuery} from './ObservableQuery.js'; +import { reobserveCacheFirst } from './ObservableQuery.js'; +import type { QueryListener, MethodKeys } from './types.js'; +import type { FetchResult } from '../link/core/index.js'; import type { - ObservableSubscription} from '../utilities'; + ObservableSubscription} from '../utilities/index.js'; import { isNonEmptyArray, graphQLResultHasError, canUseWeakMap, -} from '../utilities'; +} from '../utilities/index.js'; import { NetworkStatus, isNetworkRequestInFlight, -} from './networkStatus'; -import type { ApolloError } from '../errors'; -import type { QueryManager } from './QueryManager'; +} from './networkStatus.js'; +import type { ApolloError } from '../errors/index.js'; +import type { QueryManager } from './QueryManager.js'; export type QueryStoreValue = Pick { public cache: ApolloCache; diff --git a/src/core/equalByQuery.ts b/src/core/equalByQuery.ts index 94a5aa1e21b..0ac40c95558 100644 --- a/src/core/equalByQuery.ts +++ b/src/core/equalByQuery.ts @@ -1,4 +1,4 @@ -import equal from "@wry/equality"; +import equal from '@wry/equality'; import type { DirectiveNode, @@ -9,15 +9,11 @@ import type { InlineFragmentNode, SelectionNode, SelectionSetNode, -} from "graphql"; +} from 'graphql'; -import type { - ApolloQueryResult, - OperationVariables, -} from "./types"; +import type { ApolloQueryResult, OperationVariables } from './types.js'; -import type { - FragmentMap} from "../utilities"; +import type { FragmentMap } from '../utilities/index.js'; import { createFragmentMap, getFragmentDefinitions, @@ -26,7 +22,7 @@ import { isField, resultKeyNameFromField, shouldInclude, -} from "../utilities"; +} from '../utilities/index.js'; // Returns true if aResult and bResult are deeply equal according to the fields // selected by the given query, ignoring any fields marked as @nonreactive. @@ -34,16 +30,14 @@ export function equalByQuery( query: DocumentNode, { data: aData, ...aRest }: Partial>, { data: bData, ...bRest }: Partial>, - variables?: OperationVariables, + variables?: OperationVariables ): boolean { - return equal(aRest, bRest) && equalBySelectionSet( - getMainDefinition(query).selectionSet, - aData, - bData, - { + return ( + equal(aRest, bRest) && + equalBySelectionSet(getMainDefinition(query).selectionSet, aData, bData, { fragmentMap: createFragmentMap(getFragmentDefinitions(query)), variables, - }, + }) ); } @@ -58,7 +52,7 @@ function equalBySelectionSet( selectionSet: SelectionSetNode, aResult: any, bResult: any, - context: CompareContext, + context: CompareContext ): boolean { if (aResult === bResult) { return true; @@ -69,7 +63,7 @@ function equalBySelectionSet( // Returning true from this Array.prototype.every callback function skips the // current field/subtree. Returning false aborts the entire traversal // immediately, causing equalBySelectionSet to return false. - return selectionSet.selections.every(selection => { + return selectionSet.selections.every((selection) => { // Avoid re-processing the same selection at the same level of recursion, in // case the same field gets included via multiple indirect fragment spreads. if (seenSelections.has(selection)) return true; @@ -103,12 +97,14 @@ function equalBySelectionSet( return false; } for (let i = 0; i < length; ++i) { - if (!equalBySelectionSet( - childSelectionSet, - aResultChild[i], - bResultChild[i], - context, - )) { + if ( + !equalBySelectionSet( + childSelectionSet, + aResultChild[i], + bResultChild[i], + context + ) + ) { return false; } } @@ -119,9 +115,8 @@ function equalBySelectionSet( childSelectionSet, aResultChild, bResultChild, - context, + context ); - } else { const fragment = getFragmentFromSelection(selection, context.fragmentMap); if (fragment) { @@ -137,22 +132,25 @@ function equalBySelectionSet( // that should be applied to the current result value(s). aResult, bResult, - context, + context ); } } }); } -function selectionHasNonreactiveDirective(selection: - | FieldNode - | InlineFragmentNode - | FragmentSpreadNode - | FragmentDefinitionNode, +function selectionHasNonreactiveDirective( + selection: + | FieldNode + | InlineFragmentNode + | FragmentSpreadNode + | FragmentDefinitionNode ): boolean { - return !!selection.directives && selection.directives.some(directiveIsNonreactive); + return ( + !!selection.directives && selection.directives.some(directiveIsNonreactive) + ); } function directiveIsNonreactive(dir: DirectiveNode): boolean { - return dir.name.value === "nonreactive"; + return dir.name.value === 'nonreactive'; } diff --git a/src/core/index.ts b/src/core/index.ts index 72858da4502..f1afdd13dae 100644 --- a/src/core/index.ts +++ b/src/core/index.ts @@ -5,12 +5,12 @@ export { ApolloClientOptions, DefaultOptions, mergeOptions, -} from './ApolloClient'; +} from './ApolloClient.js'; export { ObservableQuery, FetchMoreOptions, UpdateQueryOptions, -} from './ObservableQuery'; +} from './ObservableQuery.js'; export { QueryOptions, WatchQueryOptions, @@ -21,14 +21,14 @@ export { ErrorPolicy, FetchMoreQueryOptions, SubscribeToMoreOptions, -} from './watchQueryOptions'; -export { NetworkStatus, isNetworkRequestSettled } from './networkStatus'; -export * from './types'; +} from './watchQueryOptions.js'; +export { NetworkStatus, isNetworkRequestSettled } from './networkStatus.js'; +export * from './types.js'; export { Resolver, FragmentMatcher, -} from './LocalState'; -export { isApolloError, ApolloError } from '../errors'; +} from './LocalState.js'; +export { isApolloError, ApolloError } from '../errors/index.js'; /* Cache */ export { @@ -51,21 +51,21 @@ export { FieldMergeFunction, FieldFunctionOptions, PossibleTypesMap, -} from '../cache'; +} from '../cache/index.js'; -export * from '../cache/inmemory/types'; +export * from '../cache/inmemory/types.js'; /* Link */ -export * from '../link/core'; -export * from '../link/http'; +export * from '../link/core/index.js'; +export * from '../link/http/index.js'; export { fromError, toPromise, fromPromise, ServerError, throwServerError, -} from '../link/utils'; +} from '../link/utils/index.js'; /* Utilities */ @@ -79,7 +79,7 @@ export { isReference, makeReference, StoreObject, -} from '../utilities'; +} from '../utilities/index.js'; /* Supporting */ diff --git a/src/core/types.ts b/src/core/types.ts index 4d6b6c7f301..1dc7ca5e4a2 100644 --- a/src/core/types.ts +++ b/src/core/types.ts @@ -1,15 +1,15 @@ import type { DocumentNode, GraphQLError } from 'graphql'; -import type { ApolloCache } from '../cache'; -import type { FetchResult } from '../link/core'; -import type { ApolloError } from '../errors'; -import type { QueryInfo } from './QueryInfo'; -import type { NetworkStatus } from './networkStatus'; -import type { Resolver } from './LocalState'; -import type { ObservableQuery } from './ObservableQuery'; -import type { QueryOptions } from './watchQueryOptions'; -import type { Cache } from '../cache'; -import type { IsStrictlyAny } from '../utilities'; +import type { ApolloCache } from '../cache/index.js'; +import type { FetchResult } from '../link/core/index.js'; +import type { ApolloError } from '../errors/index.js'; +import type { QueryInfo } from './QueryInfo.js'; +import type { NetworkStatus } from './networkStatus.js'; +import type { Resolver } from './LocalState.js'; +import type { ObservableQuery } from './ObservableQuery.js'; +import type { QueryOptions } from './watchQueryOptions.js'; +import type { Cache } from '../cache/index.js'; +import type { IsStrictlyAny } from '../utilities/index.js'; export { TypedDocumentNode } from '@graphql-typed-document-node/core'; diff --git a/src/core/watchQueryOptions.ts b/src/core/watchQueryOptions.ts index d06913b43d2..8ff94aec5aa 100644 --- a/src/core/watchQueryOptions.ts +++ b/src/core/watchQueryOptions.ts @@ -1,7 +1,7 @@ import type { DocumentNode } from 'graphql'; import type { TypedDocumentNode } from '@graphql-typed-document-node/core'; -import type { FetchResult } from '../link/core'; +import type { FetchResult } from '../link/core/index.js'; import type { DefaultContext, MutationQueryReducersMap, @@ -9,9 +9,9 @@ import type { MutationUpdaterFunction, OnQueryUpdated, InternalRefetchQueriesInclude, -} from './types'; -import type { ApolloCache } from '../cache'; -import type { ObservableQuery } from './ObservableQuery'; +} from './types.js'; +import type { ApolloCache } from '../cache/index.js'; +import type { ObservableQuery } from './ObservableQuery.js'; /** * fetchPolicy determines where the client may return a result from. The options are: diff --git a/src/dev/index.ts b/src/dev/index.ts index d9472d58c7e..47b8d089dbd 100644 --- a/src/dev/index.ts +++ b/src/dev/index.ts @@ -1,3 +1,3 @@ -export { loadDevMessages } from './loadDevMessages'; -export { loadErrorMessageHandler } from './loadErrorMessageHandler'; -export { loadErrorMessages } from './loadErrorMessages'; +export { loadDevMessages } from './loadDevMessages.js'; +export { loadErrorMessageHandler } from './loadErrorMessageHandler.js'; +export { loadErrorMessages } from './loadErrorMessages.js'; diff --git a/src/dev/loadDevMessages.ts b/src/dev/loadDevMessages.ts index fdb9d3f082d..5ad1aa130aa 100644 --- a/src/dev/loadDevMessages.ts +++ b/src/dev/loadDevMessages.ts @@ -1,5 +1,5 @@ -import { devDebug, devError, devLog, devWarn } from '../invariantErrorCodes'; -import { loadErrorMessageHandler } from './loadErrorMessageHandler'; +import { devDebug, devError, devLog, devWarn } from '../invariantErrorCodes.js'; +import { loadErrorMessageHandler } from './loadErrorMessageHandler.js'; export function loadDevMessages() { loadErrorMessageHandler(devDebug, devError, devLog, devWarn); diff --git a/src/dev/loadErrorMessageHandler.ts b/src/dev/loadErrorMessageHandler.ts index 28fafa48a39..120f7d43919 100644 --- a/src/dev/loadErrorMessageHandler.ts +++ b/src/dev/loadErrorMessageHandler.ts @@ -1,6 +1,6 @@ -import type { ErrorCodes } from '../invariantErrorCodes'; -import { global } from '../utilities/globals'; -import { ApolloErrorMessageHandler } from '../utilities/globals/invariantWrappers'; +import type { ErrorCodes } from '../invariantErrorCodes.js'; +import { global } from '../utilities/globals/index.js'; +import { ApolloErrorMessageHandler } from '../utilities/globals/invariantWrappers.js'; export function loadErrorMessageHandler(...errorCodes: ErrorCodes[]) { if (!global[ApolloErrorMessageHandler]) { diff --git a/src/dev/loadErrorMessages.ts b/src/dev/loadErrorMessages.ts index a5b59984941..fa64ef81735 100644 --- a/src/dev/loadErrorMessages.ts +++ b/src/dev/loadErrorMessages.ts @@ -1,5 +1,5 @@ -import { errorCodes } from '../invariantErrorCodes'; -import { loadErrorMessageHandler } from './loadErrorMessageHandler'; +import { errorCodes } from '../invariantErrorCodes.js'; +import { loadErrorMessageHandler } from './loadErrorMessageHandler.js'; export function loadErrorMessages() { loadErrorMessageHandler(errorCodes); diff --git a/src/errors/index.ts b/src/errors/index.ts index 153fbfb7a2b..e39b2b67388 100644 --- a/src/errors/index.ts +++ b/src/errors/index.ts @@ -1,11 +1,11 @@ -import '../utilities/globals'; +import '../utilities/globals/index.js'; import type { GraphQLError, GraphQLErrorExtensions } from 'graphql'; -import { isNonNullObject } from '../utilities'; -import type { ServerParseError } from '../link/http'; -import type { ServerError } from '../link/utils'; -import type { FetchResult } from "../link/core"; +import { isNonNullObject } from '../utilities/index.js'; +import type { ServerParseError } from '../link/http/index.js'; +import type { ServerError } from '../link/utils/index.js'; +import type { FetchResult } from "../link/core/index.js"; // This Symbol allows us to pass transport-specific errors from the link chain // into QueryManager/client internals without risking a naming collision within diff --git a/src/index.ts b/src/index.ts index 78a29b8b5a3..34d2c78525f 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,2 +1,2 @@ -export * from './core'; -export * from './react'; +export * from './core/index.js'; +export * from './react/index.js'; diff --git a/src/link/batch-http/batchHttpLink.ts b/src/link/batch-http/batchHttpLink.ts index fbc746af67c..8e12eb7e17e 100644 --- a/src/link/batch-http/batchHttpLink.ts +++ b/src/link/batch-http/batchHttpLink.ts @@ -1,13 +1,13 @@ -import type { Operation, FetchResult } from '../core'; -import { ApolloLink } from '../core'; +import type { Operation, FetchResult } from '../core/index.js'; +import { ApolloLink } from '../core/index.js'; import { Observable, hasDirectives, removeClientSetsFromDocument -} from '../../utilities'; -import { fromError } from '../utils'; +} from '../../utilities/index.js'; +import { fromError } from '../utils/index.js'; import type { - HttpOptions} from '../http'; + HttpOptions} from '../http/index.js'; import { serializeFetchParameter, selectURI, @@ -17,9 +17,9 @@ import { defaultPrinter, fallbackHttpConfig, createSignalIfSupported, -} from '../http'; -import { BatchLink } from '../batch'; -import { filterOperationVariables } from "../utils/filterOperationVariables"; +} from '../http/index.js'; +import { BatchLink } from '../batch/index.js'; +import { filterOperationVariables } from "../utils/filterOperationVariables.js"; export namespace BatchHttpLink { export type Options = Pick< diff --git a/src/link/batch-http/index.ts b/src/link/batch-http/index.ts index 0fb6eb74e5b..4f97fe5a8a0 100644 --- a/src/link/batch-http/index.ts +++ b/src/link/batch-http/index.ts @@ -1 +1 @@ -export * from './batchHttpLink'; +export * from './batchHttpLink.js'; diff --git a/src/link/batch/batchLink.ts b/src/link/batch/batchLink.ts index 73130b45e5a..b4d8f40027b 100644 --- a/src/link/batch/batchLink.ts +++ b/src/link/batch/batchLink.ts @@ -1,9 +1,9 @@ -import type { Operation, FetchResult, NextLink } from '../core'; -import { ApolloLink } from '../core'; -import type { Observable } from '../../utilities'; -import type { BatchHandler } from './batching'; -import { OperationBatcher } from './batching'; -export { OperationBatcher, BatchableRequest, BatchHandler } from './batching'; +import type { Operation, FetchResult, NextLink } from '../core/index.js'; +import { ApolloLink } from '../core/index.js'; +import type { Observable } from '../../utilities/index.js'; +import type { BatchHandler } from './batching.js'; +import { OperationBatcher } from './batching.js'; +export { OperationBatcher, BatchableRequest, BatchHandler } from './batching.js'; export namespace BatchLink { diff --git a/src/link/batch/batching.ts b/src/link/batch/batching.ts index 358e806fcaf..c4163b7bf93 100644 --- a/src/link/batch/batching.ts +++ b/src/link/batch/batching.ts @@ -1,6 +1,6 @@ -import type { FetchResult, NextLink, Operation } from '../core'; -import type { ObservableSubscription } from '../../utilities'; -import { Observable } from '../../utilities'; +import type { FetchResult, NextLink, Operation } from '../core/index.js'; +import type { ObservableSubscription } from '../../utilities/index.js'; +import { Observable } from '../../utilities/index.js'; export type BatchHandler = ( operations: Operation[], diff --git a/src/link/batch/index.ts b/src/link/batch/index.ts index 1df23cd6419..bf4560af157 100644 --- a/src/link/batch/index.ts +++ b/src/link/batch/index.ts @@ -1 +1 @@ -export * from './batchLink'; +export * from './batchLink.js'; diff --git a/src/link/context/index.ts b/src/link/context/index.ts index f6c9ff2e2c0..11ffd4e878c 100644 --- a/src/link/context/index.ts +++ b/src/link/context/index.ts @@ -1,8 +1,8 @@ -import type { Operation, GraphQLRequest, NextLink } from '../core'; -import { ApolloLink } from '../core'; -import type { ObservableSubscription } from '../../utilities'; -import { Observable } from '../../utilities'; -import type { DefaultContext } from '../../core'; +import type { Operation, GraphQLRequest, NextLink } from '../core/index.js'; +import { ApolloLink } from '../core/index.js'; +import type { ObservableSubscription } from '../../utilities/index.js'; +import { Observable } from '../../utilities/index.js'; +import type { DefaultContext } from '../../core/index.js'; export type ContextSetter = ( operation: GraphQLRequest, diff --git a/src/link/core/ApolloLink.ts b/src/link/core/ApolloLink.ts index 9b26e56f8ee..9473a54446b 100644 --- a/src/link/core/ApolloLink.ts +++ b/src/link/core/ApolloLink.ts @@ -1,19 +1,19 @@ -import { newInvariantError, invariant } from '../../utilities/globals'; +import { newInvariantError, invariant } from '../../utilities/globals/index.js'; -import type { Observer } from '../../utilities'; -import { Observable } from '../../utilities'; +import type { Observer } from '../../utilities/index.js'; +import { Observable } from '../../utilities/index.js'; import type { NextLink, Operation, RequestHandler, FetchResult, GraphQLRequest -} from './types'; +} from './types.js'; import { validateOperation, createOperation, transformOperation, -} from '../utils'; +} from '../utils/index.js'; function passthrough(op: Operation, forward: NextLink) { return (forward ? forward(op) : Observable.of()) as Observable; diff --git a/src/link/core/concat.ts b/src/link/core/concat.ts index a6cbcee58e2..b682e9b4c97 100644 --- a/src/link/core/concat.ts +++ b/src/link/core/concat.ts @@ -1,3 +1,3 @@ -import { ApolloLink } from './ApolloLink'; +import { ApolloLink } from './ApolloLink.js'; export const concat = ApolloLink.concat; diff --git a/src/link/core/empty.ts b/src/link/core/empty.ts index 8d93c8ce90d..fd1b7bcb2e0 100644 --- a/src/link/core/empty.ts +++ b/src/link/core/empty.ts @@ -1,3 +1,3 @@ -import { ApolloLink } from './ApolloLink'; +import { ApolloLink } from './ApolloLink.js'; export const empty = ApolloLink.empty; diff --git a/src/link/core/execute.ts b/src/link/core/execute.ts index 49217fa8ad3..bcbe1be04a8 100644 --- a/src/link/core/execute.ts +++ b/src/link/core/execute.ts @@ -1,3 +1,3 @@ -import { ApolloLink } from './ApolloLink'; +import { ApolloLink } from './ApolloLink.js'; export const execute = ApolloLink.execute; diff --git a/src/link/core/from.ts b/src/link/core/from.ts index c2bed562ea6..a54022d2cb5 100644 --- a/src/link/core/from.ts +++ b/src/link/core/from.ts @@ -1,3 +1,3 @@ -import { ApolloLink } from './ApolloLink'; +import { ApolloLink } from './ApolloLink.js'; export const from = ApolloLink.from; diff --git a/src/link/core/index.ts b/src/link/core/index.ts index 6637331b2fa..ec1e2895a0f 100644 --- a/src/link/core/index.ts +++ b/src/link/core/index.ts @@ -1,10 +1,10 @@ -import '../../utilities/globals'; +import '../../utilities/globals/index.js'; -export { empty } from './empty'; -export { from } from './from'; -export { split } from './split'; -export { concat } from './concat'; -export { execute } from './execute'; -export { ApolloLink } from './ApolloLink'; +export { empty } from './empty.js'; +export { from } from './from.js'; +export { split } from './split.js'; +export { concat } from './concat.js'; +export { execute } from './execute.js'; +export { ApolloLink } from './ApolloLink.js'; -export * from './types'; +export * from './types.js'; diff --git a/src/link/core/split.ts b/src/link/core/split.ts index c109ebd29f4..6a839ab6541 100644 --- a/src/link/core/split.ts +++ b/src/link/core/split.ts @@ -1,3 +1,3 @@ -import { ApolloLink } from './ApolloLink'; +import { ApolloLink } from './ApolloLink.js'; export const split = ApolloLink.split; diff --git a/src/link/core/types.ts b/src/link/core/types.ts index 58c0e10b4ac..3d90d151178 100644 --- a/src/link/core/types.ts +++ b/src/link/core/types.ts @@ -1,9 +1,9 @@ import type { ExecutionResult, GraphQLError } from "graphql"; import { DocumentNode } from "graphql"; -import type { DefaultContext } from "../../core"; +import type { DefaultContext } from "../../core/index.js"; export { DocumentNode }; -import type { Observable } from "../../utilities"; +import type { Observable } from "../../utilities/index.js"; export type Path = ReadonlyArray; diff --git a/src/link/error/index.ts b/src/link/error/index.ts index 9f004f2afef..44e01882b4b 100644 --- a/src/link/error/index.ts +++ b/src/link/error/index.ts @@ -1,9 +1,9 @@ import type { ExecutionResult } from 'graphql'; -import type { NetworkError, GraphQLErrors } from '../../errors'; -import { Observable } from '../../utilities'; -import type { Operation, FetchResult, NextLink } from '../core'; -import { ApolloLink } from '../core'; +import type { NetworkError, GraphQLErrors } from '../../errors/index.js'; +import { Observable } from '../../utilities/index.js'; +import type { Operation, FetchResult, NextLink } from '../core/index.js'; +import { ApolloLink } from '../core/index.js'; export interface ErrorResponse { graphQLErrors?: GraphQLErrors; diff --git a/src/link/http/HttpLink.ts b/src/link/http/HttpLink.ts index e44dafb92e3..4eb013aaf1e 100644 --- a/src/link/http/HttpLink.ts +++ b/src/link/http/HttpLink.ts @@ -1,7 +1,7 @@ -import type { RequestHandler } from '../core'; -import { ApolloLink } from '../core'; -import type { HttpOptions } from './selectHttpOptionsAndBody'; -import { createHttpLink } from './createHttpLink'; +import type { RequestHandler } from '../core/index.js'; +import { ApolloLink } from '../core/index.js'; +import type { HttpOptions } from './selectHttpOptionsAndBody.js'; +import { createHttpLink } from './createHttpLink.js'; export class HttpLink extends ApolloLink { public requester: RequestHandler; diff --git a/src/link/http/checkFetcher.ts b/src/link/http/checkFetcher.ts index 5bbb672347b..e2ef9bded6c 100644 --- a/src/link/http/checkFetcher.ts +++ b/src/link/http/checkFetcher.ts @@ -1,4 +1,4 @@ -import { newInvariantError } from '../../utilities/globals'; +import { newInvariantError } from '../../utilities/globals/index.js'; export const checkFetcher = (fetcher: WindowOrWorkerGlobalScope['fetch'] | undefined) => { if (!fetcher && typeof fetch === 'undefined') { diff --git a/src/link/http/createHttpLink.ts b/src/link/http/createHttpLink.ts index 6d445682062..1660730cd57 100644 --- a/src/link/http/createHttpLink.ts +++ b/src/link/http/createHttpLink.ts @@ -1,33 +1,33 @@ -import { invariant } from '../../utilities/globals'; +import { invariant } from '../../utilities/globals/index.js'; import type { DefinitionNode } from 'graphql'; -import { ApolloLink } from '../core'; -import { Observable, hasDirectives } from '../../utilities'; -import { serializeFetchParameter } from './serializeFetchParameter'; -import { selectURI } from './selectURI'; +import { ApolloLink } from '../core/index.js'; +import { Observable, hasDirectives } from '../../utilities/index.js'; +import { serializeFetchParameter } from './serializeFetchParameter.js'; +import { selectURI } from './selectURI.js'; import { handleError, readMultipartBody, readJsonBody -} from './parseAndCheckHttpResponse'; -import { checkFetcher } from './checkFetcher'; +} from './parseAndCheckHttpResponse.js'; +import { checkFetcher } from './checkFetcher.js'; import type { HttpOptions -} from './selectHttpOptionsAndBody'; +} from './selectHttpOptionsAndBody.js'; import { selectHttpOptionsAndBodyInternal, defaultPrinter, fallbackHttpConfig -} from './selectHttpOptionsAndBody'; -import { createSignalIfSupported } from './createSignalIfSupported'; -import { rewriteURIForGET } from './rewriteURIForGET'; -import { fromError, filterOperationVariables } from '../utils'; +} from './selectHttpOptionsAndBody.js'; +import { createSignalIfSupported } from './createSignalIfSupported.js'; +import { rewriteURIForGET } from './rewriteURIForGET.js'; +import { fromError, filterOperationVariables } from '../utils/index.js'; import { maybe, getMainDefinition, removeClientSetsFromDocument -} from '../../utilities'; +} from '../../utilities/index.js'; const backupFetch = maybe(() => fetch); diff --git a/src/link/http/index.ts b/src/link/http/index.ts index e0c9a5246c2..53107ace3fb 100644 --- a/src/link/http/index.ts +++ b/src/link/http/index.ts @@ -1,13 +1,13 @@ -import '../../utilities/globals'; +import '../../utilities/globals/index.js'; export { parseAndCheckHttpResponse, ServerParseError -} from './parseAndCheckHttpResponse'; +} from './parseAndCheckHttpResponse.js'; export { serializeFetchParameter, ClientParseError -} from './serializeFetchParameter'; +} from './serializeFetchParameter.js'; export { HttpOptions, fallbackHttpConfig, @@ -15,10 +15,10 @@ export { selectHttpOptionsAndBody, selectHttpOptionsAndBodyInternal, // needed by ../batch-http but not public UriFunction -} from './selectHttpOptionsAndBody'; -export { checkFetcher } from './checkFetcher'; -export { createSignalIfSupported } from './createSignalIfSupported'; -export { selectURI } from './selectURI'; -export { createHttpLink } from './createHttpLink'; -export { HttpLink } from './HttpLink'; -export { rewriteURIForGET } from './rewriteURIForGET'; +} from './selectHttpOptionsAndBody.js'; +export { checkFetcher } from './checkFetcher.js'; +export { createSignalIfSupported } from './createSignalIfSupported.js'; +export { selectURI } from './selectURI.js'; +export { createHttpLink } from './createHttpLink.js'; +export { HttpLink } from './HttpLink.js'; +export { rewriteURIForGET } from './rewriteURIForGET.js'; diff --git a/src/link/http/iterators/nodeStream.ts b/src/link/http/iterators/nodeStream.ts index 4690f649c84..967f244b0fd 100644 --- a/src/link/http/iterators/nodeStream.ts +++ b/src/link/http/iterators/nodeStream.ts @@ -4,7 +4,7 @@ */ import type { Readable as NodeReadableStream } from "stream"; -import { canUseAsyncIteratorSymbol } from "../../../utilities"; +import { canUseAsyncIteratorSymbol } from "../../../utilities/index.js"; interface NodeStreamIterator { next(): Promise>; diff --git a/src/link/http/iterators/promise.ts b/src/link/http/iterators/promise.ts index 10668c547a8..f4b18832007 100644 --- a/src/link/http/iterators/promise.ts +++ b/src/link/http/iterators/promise.ts @@ -3,7 +3,7 @@ * https://github.com/kmalakoff/response-iterator/blob/master/src/iterators/promise.ts */ -import { canUseAsyncIteratorSymbol } from "../../../utilities"; +import { canUseAsyncIteratorSymbol } from "../../../utilities/index.js"; interface PromiseIterator { next(): Promise>; diff --git a/src/link/http/iterators/reader.ts b/src/link/http/iterators/reader.ts index d943982d5bf..3a81e37cf2a 100644 --- a/src/link/http/iterators/reader.ts +++ b/src/link/http/iterators/reader.ts @@ -3,7 +3,7 @@ * https://github.com/kmalakoff/response-iterator/blob/master/src/iterators/reader.ts */ -import { canUseAsyncIteratorSymbol } from "../../../utilities"; +import { canUseAsyncIteratorSymbol } from "../../../utilities/index.js"; interface ReaderIterator { next(): Promise>; diff --git a/src/link/http/parseAndCheckHttpResponse.ts b/src/link/http/parseAndCheckHttpResponse.ts index bd83842c2d7..6273d26c9c4 100644 --- a/src/link/http/parseAndCheckHttpResponse.ts +++ b/src/link/http/parseAndCheckHttpResponse.ts @@ -1,11 +1,11 @@ -import { responseIterator } from "./responseIterator"; -import type { Operation } from "../core"; -import { throwServerError } from "../utils"; -import { PROTOCOL_ERRORS_SYMBOL } from '../../errors'; -import type { Observer } from "../../utilities"; +import { responseIterator } from "./responseIterator.js"; +import type { Operation } from "../core/index.js"; +import { throwServerError } from "../utils/index.js"; +import { PROTOCOL_ERRORS_SYMBOL } from '../../errors/index.js'; +import type { Observer } from "../../utilities/index.js"; import { isApolloPayloadResult -} from '../../utilities/common/incrementalResult'; +} from '../../utilities/common/incrementalResult.js'; const { hasOwnProperty } = Object.prototype; diff --git a/src/link/http/responseIterator.ts b/src/link/http/responseIterator.ts index 75e82df457b..3bcea8a863c 100644 --- a/src/link/http/responseIterator.ts +++ b/src/link/http/responseIterator.ts @@ -11,12 +11,12 @@ import { isNodeReadableStream, isReadableStream, isStreamableBlob, -} from "../../utilities"; +} from "../../utilities/index.js"; -import asyncIterator from "./iterators/async"; -import nodeStreamIterator from "./iterators/nodeStream"; -import promiseIterator from "./iterators/promise"; -import readerIterator from "./iterators/reader"; +import asyncIterator from "./iterators/async.js"; +import nodeStreamIterator from "./iterators/nodeStream.js"; +import promiseIterator from "./iterators/promise.js"; +import readerIterator from "./iterators/reader.js"; export function responseIterator( response: Response | NodeResponse diff --git a/src/link/http/rewriteURIForGET.ts b/src/link/http/rewriteURIForGET.ts index 446a903b630..69234d29e7b 100644 --- a/src/link/http/rewriteURIForGET.ts +++ b/src/link/http/rewriteURIForGET.ts @@ -1,5 +1,5 @@ -import { serializeFetchParameter } from './serializeFetchParameter'; -import type { Body } from './selectHttpOptionsAndBody'; +import { serializeFetchParameter } from './serializeFetchParameter.js'; +import type { Body } from './selectHttpOptionsAndBody.js'; // For GET operations, returns the given URI rewritten with parameters, or a // parse error. diff --git a/src/link/http/selectHttpOptionsAndBody.ts b/src/link/http/selectHttpOptionsAndBody.ts index ef98d38fc45..81a046bc6f7 100644 --- a/src/link/http/selectHttpOptionsAndBody.ts +++ b/src/link/http/selectHttpOptionsAndBody.ts @@ -1,7 +1,7 @@ import type { ASTNode} from 'graphql'; -import { print } from '../../utilities'; +import { print } from '../../utilities/index.js'; -import type { Operation } from '../core'; +import type { Operation } from '../core/index.js'; export interface Printer { (node: ASTNode, originalPrint: typeof print): string diff --git a/src/link/http/selectURI.ts b/src/link/http/selectURI.ts index fb8f50f9789..439d7c48e69 100644 --- a/src/link/http/selectURI.ts +++ b/src/link/http/selectURI.ts @@ -1,4 +1,4 @@ -import type { Operation } from '../core'; +import type { Operation } from '../core/index.js'; export const selectURI = ( operation: Operation, diff --git a/src/link/http/serializeFetchParameter.ts b/src/link/http/serializeFetchParameter.ts index 920f3b73592..0b4a5a900a7 100644 --- a/src/link/http/serializeFetchParameter.ts +++ b/src/link/http/serializeFetchParameter.ts @@ -1,5 +1,5 @@ -import { newInvariantError } from '../../utilities/globals'; -import type { InvariantError } from '../../utilities/globals'; +import { newInvariantError } from '../../utilities/globals/index.js'; +import type { InvariantError } from '../../utilities/globals/index.js'; export type ClientParseError = InvariantError & { parseError: Error; diff --git a/src/link/persisted-queries/index.ts b/src/link/persisted-queries/index.ts index 52bc70c1392..462f8d33e54 100644 --- a/src/link/persisted-queries/index.ts +++ b/src/link/persisted-queries/index.ts @@ -1,24 +1,24 @@ -import { invariant } from '../../utilities/globals'; +import { invariant } from '../../utilities/globals/index.js'; -import { print } from '../../utilities'; +import { print } from '../../utilities/index.js'; import type { DocumentNode, ExecutionResult, GraphQLError, } from 'graphql'; -import type { Operation } from '../core'; -import { ApolloLink } from '../core'; +import type { Operation } from '../core/index.js'; +import { ApolloLink } from '../core/index.js'; import type { Observer, - ObservableSubscription} from '../../utilities'; + ObservableSubscription} from '../../utilities/index.js'; import { Observable, compact, isNonEmptyArray, -} from '../../utilities'; -import type { NetworkError } from '../../errors'; -import type { ServerError } from '../utils'; +} from '../../utilities/index.js'; +import type { NetworkError } from '../../errors/index.js'; +import type { ServerError } from '../utils/index.js'; export const VERSION = 1; diff --git a/src/link/remove-typename/index.ts b/src/link/remove-typename/index.ts index 9b86c52fb17..e84f627bf7a 100644 --- a/src/link/remove-typename/index.ts +++ b/src/link/remove-typename/index.ts @@ -2,4 +2,4 @@ export { removeTypenameFromVariables, KEEP, RemoveTypenameFromVariablesOptions, -} from './removeTypenameFromVariables'; +} from './removeTypenameFromVariables.js'; diff --git a/src/link/remove-typename/removeTypenameFromVariables.ts b/src/link/remove-typename/removeTypenameFromVariables.ts index 72bb8bc0b0f..50a79c64dd6 100644 --- a/src/link/remove-typename/removeTypenameFromVariables.ts +++ b/src/link/remove-typename/removeTypenameFromVariables.ts @@ -1,9 +1,9 @@ import { wrap } from 'optimism'; import type { DocumentNode, TypeNode } from 'graphql'; import { Kind, visit } from 'graphql'; -import { ApolloLink } from '../core'; -import { stripTypename, isPlainObject } from '../../utilities'; -import type { OperationVariables } from '../../core'; +import { ApolloLink } from '../core/index.js'; +import { stripTypename, isPlainObject } from '../../utilities/index.js'; +import type { OperationVariables } from '../../core/index.js'; export const KEEP = '__KEEP'; diff --git a/src/link/retry/delayFunction.ts b/src/link/retry/delayFunction.ts index c6e2552e1ac..659b5cb004a 100644 --- a/src/link/retry/delayFunction.ts +++ b/src/link/retry/delayFunction.ts @@ -1,4 +1,4 @@ -import type { Operation } from '../core'; +import type { Operation } from '../core/index.js'; /** * Advanced mode: a function that implements the strategy for calculating delays diff --git a/src/link/retry/index.ts b/src/link/retry/index.ts index 349058747c6..df045900783 100644 --- a/src/link/retry/index.ts +++ b/src/link/retry/index.ts @@ -1 +1 @@ -export * from './retryLink'; +export * from './retryLink.js'; diff --git a/src/link/retry/retryFunction.ts b/src/link/retry/retryFunction.ts index d5653b36c21..a9760d0b9f2 100644 --- a/src/link/retry/retryFunction.ts +++ b/src/link/retry/retryFunction.ts @@ -1,4 +1,4 @@ -import type { Operation } from '../core'; +import type { Operation } from '../core/index.js'; /** * Advanced mode: a function that determines both whether a particular diff --git a/src/link/retry/retryLink.ts b/src/link/retry/retryLink.ts index 4aa2a9c0933..2db2d9276ee 100644 --- a/src/link/retry/retryLink.ts +++ b/src/link/retry/retryLink.ts @@ -1,19 +1,19 @@ -import type { Operation, FetchResult, NextLink } from '../core'; -import { ApolloLink } from '../core'; -import type { Observer, ObservableSubscription } from '../../utilities'; -import { Observable } from '../../utilities'; +import type { Operation, FetchResult, NextLink } from '../core/index.js'; +import { ApolloLink } from '../core/index.js'; +import type { Observer, ObservableSubscription } from '../../utilities/index.js'; +import { Observable } from '../../utilities/index.js'; import type { DelayFunction, - DelayFunctionOptions} from './delayFunction'; + DelayFunctionOptions} from './delayFunction.js'; import { buildDelayFunction, -} from './delayFunction'; +} from './delayFunction.js'; import type { RetryFunction, - RetryFunctionOptions} from './retryFunction'; + RetryFunctionOptions} from './retryFunction.js'; import { buildRetryFunction, -} from './retryFunction'; +} from './retryFunction.js'; export namespace RetryLink { export interface Options { diff --git a/src/link/schema/index.ts b/src/link/schema/index.ts index 6616fd3281e..320a6af60ff 100644 --- a/src/link/schema/index.ts +++ b/src/link/schema/index.ts @@ -1,9 +1,9 @@ import type { GraphQLSchema } from 'graphql'; import { validate, execute } from 'graphql'; -import type { Operation, FetchResult } from '../core'; -import { ApolloLink } from '../core'; -import { Observable } from '../../utilities'; +import type { Operation, FetchResult } from '../core/index.js'; +import { ApolloLink } from '../core/index.js'; +import { Observable } from '../../utilities/index.js'; export namespace SchemaLink { export type ResolverContext = Record; diff --git a/src/link/subscriptions/index.ts b/src/link/subscriptions/index.ts index 64d65478be0..d4ba8a9567e 100644 --- a/src/link/subscriptions/index.ts +++ b/src/link/subscriptions/index.ts @@ -28,13 +28,13 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -import { print } from '../../utilities'; +import { print } from '../../utilities/index.js'; import type { Client } from "graphql-ws"; -import type { Operation, FetchResult } from "../core"; -import { ApolloLink } from "../core"; -import { isNonNullObject, Observable } from "../../utilities"; -import { ApolloError } from "../../errors"; +import type { Operation, FetchResult } from "../core/index.js"; +import { ApolloLink } from "../core/index.js"; +import { isNonNullObject, Observable } from "../../utilities/index.js"; +import { ApolloError } from "../../errors/index.js"; // https://developer.mozilla.org/en-US/docs/Web/API/WebSocket/close_event function isLikeCloseEvent(val: unknown): val is CloseEvent { diff --git a/src/link/utils/createOperation.ts b/src/link/utils/createOperation.ts index 39c0f1d9041..39caff3c318 100644 --- a/src/link/utils/createOperation.ts +++ b/src/link/utils/createOperation.ts @@ -1,4 +1,4 @@ -import type { GraphQLRequest, Operation } from '../core'; +import type { GraphQLRequest, Operation } from '../core/index.js'; export function createOperation( starting: any, diff --git a/src/link/utils/fromError.ts b/src/link/utils/fromError.ts index f832a7c62d2..7d92f5cb319 100644 --- a/src/link/utils/fromError.ts +++ b/src/link/utils/fromError.ts @@ -1,4 +1,4 @@ -import { Observable } from '../../utilities'; +import { Observable } from '../../utilities/index.js'; export function fromError(errorValue: any): Observable { return new Observable(observer => { diff --git a/src/link/utils/fromPromise.ts b/src/link/utils/fromPromise.ts index 039d71654a5..30d581880ef 100644 --- a/src/link/utils/fromPromise.ts +++ b/src/link/utils/fromPromise.ts @@ -1,4 +1,4 @@ -import { Observable } from '../../utilities'; +import { Observable } from '../../utilities/index.js'; export function fromPromise(promise: Promise): Observable { return new Observable(observer => { diff --git a/src/link/utils/index.ts b/src/link/utils/index.ts index b7deec7f2c2..49daf353e34 100644 --- a/src/link/utils/index.ts +++ b/src/link/utils/index.ts @@ -1,10 +1,10 @@ -import '../../utilities/globals'; +import '../../utilities/globals/index.js'; -export { fromError } from './fromError'; -export { toPromise } from './toPromise'; -export { fromPromise } from './fromPromise'; -export { ServerError, throwServerError } from './throwServerError'; -export { validateOperation } from './validateOperation'; -export { createOperation } from './createOperation'; -export { transformOperation } from './transformOperation'; -export { filterOperationVariables } from './filterOperationVariables'; +export { fromError } from './fromError.js'; +export { toPromise } from './toPromise.js'; +export { fromPromise } from './fromPromise.js'; +export { ServerError, throwServerError } from './throwServerError.js'; +export { validateOperation } from './validateOperation.js'; +export { createOperation } from './createOperation.js'; +export { transformOperation } from './transformOperation.js'; +export { filterOperationVariables } from './filterOperationVariables.js'; diff --git a/src/link/utils/toPromise.ts b/src/link/utils/toPromise.ts index 55b4b87b482..cf922735476 100644 --- a/src/link/utils/toPromise.ts +++ b/src/link/utils/toPromise.ts @@ -1,5 +1,5 @@ -import { invariant } from '../../utilities/globals'; -import type { Observable } from '../../utilities'; +import { invariant } from '../../utilities/globals/index.js'; +import type { Observable } from '../../utilities/index.js'; export function toPromise(observable: Observable): Promise { let completed = false; diff --git a/src/link/utils/transformOperation.ts b/src/link/utils/transformOperation.ts index a7fece2e221..3378785c4db 100644 --- a/src/link/utils/transformOperation.ts +++ b/src/link/utils/transformOperation.ts @@ -1,5 +1,5 @@ -import type { GraphQLRequest, Operation } from '../core'; -import { getOperationName } from '../../utilities'; +import type { GraphQLRequest, Operation } from '../core/index.js'; +import { getOperationName } from '../../utilities/index.js'; export function transformOperation(operation: GraphQLRequest): GraphQLRequest { const transformedOperation: GraphQLRequest = { diff --git a/src/link/utils/validateOperation.ts b/src/link/utils/validateOperation.ts index 3d8542733e1..dafacbd7e66 100644 --- a/src/link/utils/validateOperation.ts +++ b/src/link/utils/validateOperation.ts @@ -1,5 +1,5 @@ -import { newInvariantError } from '../../utilities/globals' -import type { GraphQLRequest } from '../core'; +import { newInvariantError } from '../../utilities/globals/index.js' +import type { GraphQLRequest } from '../core/index.js'; export function validateOperation(operation: GraphQLRequest): GraphQLRequest { const OPERATION_FIELDS = [ diff --git a/src/link/ws/index.ts b/src/link/ws/index.ts index 21d77e2b49b..8c0c2cfed87 100644 --- a/src/link/ws/index.ts +++ b/src/link/ws/index.ts @@ -1,9 +1,9 @@ import type { ClientOptions } from 'subscriptions-transport-ws'; import { SubscriptionClient } from 'subscriptions-transport-ws'; -import type { Operation, FetchResult } from '../core'; -import { ApolloLink } from '../core'; -import type { Observable } from '../../utilities'; +import type { Operation, FetchResult } from '../core/index.js'; +import { ApolloLink } from '../core/index.js'; +import type { Observable } from '../../utilities/index.js'; export namespace WebSocketLink { /** diff --git a/src/react/cache/QueryReference.ts b/src/react/cache/QueryReference.ts index 477771e4851..4896a1b72b4 100644 --- a/src/react/cache/QueryReference.ts +++ b/src/react/cache/QueryReference.ts @@ -5,12 +5,12 @@ import type { ObservableQuery, OperationVariables, WatchQueryOptions, -} from '../../core'; -import { NetworkStatus, isNetworkRequestSettled } from '../../core'; -import type { ObservableSubscription } from '../../utilities'; -import { createFulfilledPromise, createRejectedPromise } from '../../utilities'; -import type { CacheKey } from './types'; -import type { useBackgroundQuery, useReadQuery } from '../hooks'; +} from '../../core/index.js'; +import { NetworkStatus, isNetworkRequestSettled } from '../../core/index.js'; +import type { ObservableSubscription } from '../../utilities/index.js'; +import { createFulfilledPromise, createRejectedPromise } from '../../utilities/index.js'; +import type { CacheKey } from './types.js'; +import type { useBackgroundQuery, useReadQuery } from '../hooks/index.js'; type Listener = (promise: Promise>) => void; diff --git a/src/react/cache/SuspenseCache.ts b/src/react/cache/SuspenseCache.ts index 89ecf6ac300..93642ed3c50 100644 --- a/src/react/cache/SuspenseCache.ts +++ b/src/react/cache/SuspenseCache.ts @@ -1,8 +1,8 @@ import { Trie } from '@wry/trie'; -import type { ObservableQuery } from '../../core'; -import { canUseWeakMap } from '../../utilities'; -import { InternalQueryReference } from './QueryReference'; -import type { CacheKey } from './types'; +import type { ObservableQuery } from '../../core/index.js'; +import { canUseWeakMap } from '../../utilities/index.js'; +import { InternalQueryReference } from './QueryReference.js'; +import type { CacheKey } from './types.js'; interface SuspenseCacheOptions { /** diff --git a/src/react/cache/index.ts b/src/react/cache/index.ts index 534c51cda6e..33f1ca91400 100644 --- a/src/react/cache/index.ts +++ b/src/react/cache/index.ts @@ -1 +1 @@ -export { SuspenseCache } from './SuspenseCache'; +export { SuspenseCache } from './SuspenseCache.js'; diff --git a/src/react/components/Mutation.tsx b/src/react/components/Mutation.tsx index 8e6d19909f4..96a150be61d 100644 --- a/src/react/components/Mutation.tsx +++ b/src/react/components/Mutation.tsx @@ -1,8 +1,8 @@ import * as PropTypes from 'prop-types'; -import type { OperationVariables } from '../../core'; -import type { MutationComponentOptions } from './types'; -import { useMutation } from '../hooks'; +import type { OperationVariables } from '../../core/index.js'; +import type { MutationComponentOptions } from './types.js'; +import { useMutation } from '../hooks/index.js'; export function Mutation( props: MutationComponentOptions diff --git a/src/react/components/Query.tsx b/src/react/components/Query.tsx index bb6956ce931..7332577e2bf 100644 --- a/src/react/components/Query.tsx +++ b/src/react/components/Query.tsx @@ -1,8 +1,8 @@ import * as PropTypes from 'prop-types'; -import type { OperationVariables } from '../../core'; -import type { QueryComponentOptions } from './types'; -import { useQuery } from '../hooks'; +import type { OperationVariables } from '../../core/index.js'; +import type { QueryComponentOptions } from './types.js'; +import { useQuery } from '../hooks/index.js'; export function Query( props: QueryComponentOptions diff --git a/src/react/components/Subscription.tsx b/src/react/components/Subscription.tsx index ab448939c95..fe262391bd8 100644 --- a/src/react/components/Subscription.tsx +++ b/src/react/components/Subscription.tsx @@ -1,8 +1,8 @@ import * as PropTypes from 'prop-types'; -import type { OperationVariables } from '../../core'; -import type { SubscriptionComponentOptions } from './types'; -import { useSubscription } from '../hooks'; +import type { OperationVariables } from '../../core/index.js'; +import type { SubscriptionComponentOptions } from './types.js'; +import { useSubscription } from '../hooks/index.js'; export function Subscription( props: SubscriptionComponentOptions diff --git a/src/react/components/index.ts b/src/react/components/index.ts index 22aa80774ae..5e84197e074 100644 --- a/src/react/components/index.ts +++ b/src/react/components/index.ts @@ -1,5 +1,5 @@ -export { Query } from './Query'; -export { Mutation } from './Mutation'; -export { Subscription } from './Subscription'; +export { Query } from './Query.js'; +export { Mutation } from './Mutation.js'; +export { Subscription } from './Subscription.js'; -export * from './types'; +export * from './types.js'; diff --git a/src/react/components/types.ts b/src/react/components/types.ts index b99387ed96c..000bbb2be03 100644 --- a/src/react/components/types.ts +++ b/src/react/components/types.ts @@ -1,7 +1,7 @@ import type { DocumentNode } from 'graphql'; import type { TypedDocumentNode } from '@graphql-typed-document-node/core'; -import type { OperationVariables, DefaultContext, ApolloCache } from '../../core'; +import type { OperationVariables, DefaultContext, ApolloCache } from '../../core/index.js'; import type { QueryFunctionOptions, QueryResult, @@ -10,7 +10,7 @@ import type { MutationResult, BaseSubscriptionOptions, SubscriptionResult -} from '../types/types'; +} from '../types/types.js'; export interface QueryComponentOptions< TData = any, diff --git a/src/react/context/ApolloConsumer.tsx b/src/react/context/ApolloConsumer.tsx index 7cbd84aecd3..f5e12696cbd 100644 --- a/src/react/context/ApolloConsumer.tsx +++ b/src/react/context/ApolloConsumer.tsx @@ -1,9 +1,9 @@ -import { invariant } from '../../utilities/globals'; +import { invariant } from '../../utilities/globals/index.js'; import * as React from 'react'; -import type { ApolloClient } from '../../core'; -import { getApolloContext } from './ApolloContext'; +import type { ApolloClient } from '../../core/index.js'; +import { getApolloContext } from './ApolloContext.js'; export interface ApolloConsumerProps { children: (client: ApolloClient) => React.ReactChild | null; diff --git a/src/react/context/ApolloContext.ts b/src/react/context/ApolloContext.ts index a93c2709279..3797edaa169 100644 --- a/src/react/context/ApolloContext.ts +++ b/src/react/context/ApolloContext.ts @@ -1,9 +1,9 @@ import * as React from 'react'; -import type { ApolloClient } from '../../core'; -import { canUseSymbol } from '../../utilities'; -import type { SuspenseCache } from '../cache'; -import type { RenderPromises } from '../ssr'; -import { global, invariant } from '../../utilities/globals'; +import type { ApolloClient } from '../../core/index.js'; +import { canUseSymbol } from '../../utilities/index.js'; +import type { SuspenseCache } from '../cache/index.js'; +import type { RenderPromises } from '../ssr/index.js'; +import { global, invariant } from '../../utilities/globals/index.js'; export interface ApolloContextValue { client?: ApolloClient; diff --git a/src/react/context/ApolloProvider.tsx b/src/react/context/ApolloProvider.tsx index aa1bf067164..2bbba279ba2 100644 --- a/src/react/context/ApolloProvider.tsx +++ b/src/react/context/ApolloProvider.tsx @@ -1,10 +1,10 @@ -import { invariant } from '../../utilities/globals'; +import { invariant } from '../../utilities/globals/index.js'; import * as React from 'react'; -import type { ApolloClient } from '../../core'; -import { getApolloContext } from './ApolloContext'; -import type { SuspenseCache } from '../cache'; +import type { ApolloClient } from '../../core/index.js'; +import { getApolloContext } from './ApolloContext.js'; +import type { SuspenseCache } from '../cache/index.js'; export interface ApolloProviderProps { client: ApolloClient; diff --git a/src/react/context/index.ts b/src/react/context/index.ts index 15811a89d8b..40488fd58fe 100644 --- a/src/react/context/index.ts +++ b/src/react/context/index.ts @@ -1,9 +1,9 @@ -import '../../utilities/globals'; +import '../../utilities/globals/index.js'; -export { ApolloConsumer, ApolloConsumerProps } from './ApolloConsumer'; +export { ApolloConsumer, ApolloConsumerProps } from './ApolloConsumer.js'; export { ApolloContextValue, getApolloContext, resetApolloContext -} from './ApolloContext'; -export { ApolloProvider, ApolloProviderProps } from './ApolloProvider'; +} from './ApolloContext.js'; +export { ApolloProvider, ApolloProviderProps } from './ApolloProvider.js'; diff --git a/src/react/hoc/graphql.tsx b/src/react/hoc/graphql.tsx index 09e453bec2a..02220646731 100644 --- a/src/react/hoc/graphql.tsx +++ b/src/react/hoc/graphql.tsx @@ -1,11 +1,11 @@ import type { DocumentNode } from 'graphql'; -import { parser, DocumentType } from '../parser'; -import { withQuery } from './query-hoc'; -import { withMutation } from './mutation-hoc'; -import { withSubscription } from './subscription-hoc'; -import type { OperationOption, DataProps, MutateProps } from './types'; -import type { OperationVariables } from '../../core'; +import { parser, DocumentType } from '../parser/index.js'; +import { withQuery } from './query-hoc.js'; +import { withMutation } from './mutation-hoc.js'; +import { withSubscription } from './subscription-hoc.js'; +import type { OperationOption, DataProps, MutateProps } from './types.js'; +import type { OperationVariables } from '../../core/index.js'; export function graphql< TProps extends TGraphQLVariables | {} = {}, diff --git a/src/react/hoc/hoc-utils.tsx b/src/react/hoc/hoc-utils.tsx index 7a8589b2993..11ec8f381d4 100644 --- a/src/react/hoc/hoc-utils.tsx +++ b/src/react/hoc/hoc-utils.tsx @@ -1,7 +1,7 @@ -import { invariant } from '../../utilities/globals'; +import { invariant } from '../../utilities/globals/index.js'; import * as React from 'react'; -import type { OperationVariables } from '../../core'; -import type { IDocumentDefinition } from '../parser'; +import type { OperationVariables } from '../../core/index.js'; +import type { IDocumentDefinition } from '../parser/index.js'; export const defaultMapPropsToOptions = () => ({}); export const defaultMapResultToProps:

(props: P) => P = props => props; diff --git a/src/react/hoc/index.ts b/src/react/hoc/index.ts index 0fdfbf9e0ea..0d75eba7de2 100644 --- a/src/react/hoc/index.ts +++ b/src/react/hoc/index.ts @@ -1,10 +1,10 @@ -import '../../utilities/globals'; +import '../../utilities/globals/index.js'; -export { graphql } from './graphql'; +export { graphql } from './graphql.js'; -export { withQuery } from './query-hoc'; -export { withMutation } from './mutation-hoc'; -export { withSubscription } from './subscription-hoc'; -export { withApollo } from './withApollo'; +export { withQuery } from './query-hoc.js'; +export { withMutation } from './mutation-hoc.js'; +export { withSubscription } from './subscription-hoc.js'; +export { withApollo } from './withApollo.js'; -export * from './types'; +export * from './types.js'; diff --git a/src/react/hoc/mutation-hoc.tsx b/src/react/hoc/mutation-hoc.tsx index 2732313c443..67f5a96184b 100644 --- a/src/react/hoc/mutation-hoc.tsx +++ b/src/react/hoc/mutation-hoc.tsx @@ -2,23 +2,23 @@ import * as React from 'react'; import type { DocumentNode } from 'graphql'; import hoistNonReactStatics from 'hoist-non-react-statics'; -import { parser } from '../parser'; -import type { DefaultContext, OperationVariables } from '../../core/types'; +import { parser } from '../parser/index.js'; +import type { DefaultContext, OperationVariables } from '../../core/types.js'; import type { BaseMutationOptions, MutationFunction, MutationResult -} from '../types/types'; -import { Mutation } from '../components'; +} from '../types/types.js'; +import { Mutation } from '../components/index.js'; import { defaultMapPropsToOptions, getDisplayName, calculateVariablesFromProps, GraphQLBase -} from './hoc-utils'; -import type { OperationOption, OptionProps, MutateProps } from './types'; -import type { ApolloCache } from '../../core'; +} from './hoc-utils.js'; +import type { OperationOption, OptionProps, MutateProps } from './types.js'; +import type { ApolloCache } from '../../core/index.js'; export function withMutation< TProps extends TGraphQLVariables | {} = {}, diff --git a/src/react/hoc/query-hoc.tsx b/src/react/hoc/query-hoc.tsx index ab8980a4fe3..04cf7a2b3d5 100644 --- a/src/react/hoc/query-hoc.tsx +++ b/src/react/hoc/query-hoc.tsx @@ -2,17 +2,17 @@ import * as React from 'react'; import type { DocumentNode } from 'graphql'; import hoistNonReactStatics from 'hoist-non-react-statics'; -import { parser } from '../parser'; -import type { BaseQueryOptions } from '../types/types'; -import { Query } from '../components'; +import { parser } from '../parser/index.js'; +import type { BaseQueryOptions } from '../types/types.js'; +import { Query } from '../components/index.js'; import { getDisplayName, GraphQLBase, calculateVariablesFromProps, defaultMapPropsToOptions, defaultMapPropsToSkip -} from './hoc-utils'; -import type { OperationOption, OptionProps, DataProps } from './types'; +} from './hoc-utils.js'; +import type { OperationOption, OptionProps, DataProps } from './types.js'; export function withQuery< TProps extends TGraphQLVariables | Record = Record, diff --git a/src/react/hoc/subscription-hoc.tsx b/src/react/hoc/subscription-hoc.tsx index 876ae389709..7f092c72a51 100644 --- a/src/react/hoc/subscription-hoc.tsx +++ b/src/react/hoc/subscription-hoc.tsx @@ -2,17 +2,17 @@ import * as React from 'react'; import type { DocumentNode } from 'graphql'; import hoistNonReactStatics from 'hoist-non-react-statics'; -import { parser } from '../parser'; -import type { BaseQueryOptions } from '../types/types'; -import { Subscription } from '../components'; +import { parser } from '../parser/index.js'; +import type { BaseQueryOptions } from '../types/types.js'; +import { Subscription } from '../components/index.js'; import { getDisplayName, GraphQLBase, calculateVariablesFromProps, defaultMapPropsToOptions, defaultMapPropsToSkip -} from './hoc-utils'; -import type { OperationOption, OptionProps, DataProps } from './types'; +} from './hoc-utils.js'; +import type { OperationOption, OptionProps, DataProps } from './types.js'; export function withSubscription< TProps extends TGraphQLVariables | {} = {}, diff --git a/src/react/hoc/types.ts b/src/react/hoc/types.ts index 11cfcbf88db..26a24f1ef73 100644 --- a/src/react/hoc/types.ts +++ b/src/react/hoc/types.ts @@ -1,5 +1,5 @@ -import type { ApolloCache, ApolloClient } from '../../core'; -import type { ApolloError } from '../../errors'; +import type { ApolloCache, ApolloClient } from '../../core/index.js'; +import type { ApolloError } from '../../errors/index.js'; import type { ApolloQueryResult, OperationVariables, @@ -8,13 +8,13 @@ import type { FetchMoreQueryOptions, SubscribeToMoreOptions, DefaultContext, -} from '../../core'; +} from '../../core/index.js'; import type { MutationFunction, BaseQueryOptions, BaseMutationOptions, MutationResult -} from '../types/types'; +} from '../types/types.js'; export interface QueryControls< TData = any, diff --git a/src/react/hoc/withApollo.tsx b/src/react/hoc/withApollo.tsx index ba457495352..c039c9c2421 100644 --- a/src/react/hoc/withApollo.tsx +++ b/src/react/hoc/withApollo.tsx @@ -1,9 +1,9 @@ -import { invariant } from '../../utilities/globals'; +import { invariant } from '../../utilities/globals/index.js'; import * as React from 'react'; import hoistNonReactStatics from 'hoist-non-react-statics'; -import { ApolloConsumer } from '../context'; -import type { OperationOption, WithApolloClient } from './types'; +import { ApolloConsumer } from '../context/index.js'; +import type { OperationOption, WithApolloClient } from './types.js'; function getDisplayName

(WrappedComponent: React.ComponentType

) { return WrappedComponent.displayName || WrappedComponent.name || 'Component'; diff --git a/src/react/hooks/index.ts b/src/react/hooks/index.ts index 96558794299..5823e12d7c8 100644 --- a/src/react/hooks/index.ts +++ b/src/react/hooks/index.ts @@ -1,21 +1,21 @@ -import '../../utilities/globals'; +import '../../utilities/globals/index.js'; -export * from './useApolloClient'; -export * from './useLazyQuery'; -export * from './useMutation'; -export { useQuery } from './useQuery'; -export * from './useSubscription'; -export * from './useReactiveVar'; -export * from './useFragment'; +export * from './useApolloClient.js'; +export * from './useLazyQuery.js'; +export * from './useMutation.js'; +export { useQuery } from './useQuery.js'; +export * from './useSubscription.js'; +export * from './useReactiveVar.js'; +export * from './useFragment.js'; export { useSuspenseQuery, UseSuspenseQueryResult, FetchMoreFunction, RefetchFunction, SubscribeToMoreFunction, -} from './useSuspenseQuery'; +} from './useSuspenseQuery.js'; export { useBackgroundQuery, UseBackgroundQueryResult, -} from './useBackgroundQuery'; -export { useReadQuery } from './useReadQuery'; +} from './useBackgroundQuery.js'; +export { useReadQuery } from './useReadQuery.js'; diff --git a/src/react/hooks/internal/__use.ts b/src/react/hooks/internal/__use.ts index 936f8a382b2..e8001c9c23c 100644 --- a/src/react/hooks/internal/__use.ts +++ b/src/react/hooks/internal/__use.ts @@ -1,4 +1,4 @@ -import { wrapPromiseWithState } from '../../../utilities'; +import { wrapPromiseWithState } from '../../../utilities/index.js'; import React from 'react'; type Use = (promise: Promise) => T; diff --git a/src/react/hooks/internal/index.ts b/src/react/hooks/internal/index.ts index a41c0902245..46c80dfe954 100644 --- a/src/react/hooks/internal/index.ts +++ b/src/react/hooks/internal/index.ts @@ -1,5 +1,5 @@ // These hooks are used internally and are not exported publicly by the library -export { useDeepMemo } from './useDeepMemo'; -export { useIsomorphicLayoutEffect } from './useIsomorphicLayoutEffect'; -export { useStrictModeSafeCleanupEffect } from './useStrictModeSafeCleanupEffect'; -export { __use } from './__use'; +export { useDeepMemo } from './useDeepMemo.js'; +export { useIsomorphicLayoutEffect } from './useIsomorphicLayoutEffect.js'; +export { useStrictModeSafeCleanupEffect } from './useStrictModeSafeCleanupEffect.js'; +export { __use } from './__use.js'; diff --git a/src/react/hooks/internal/useIsomorphicLayoutEffect.ts b/src/react/hooks/internal/useIsomorphicLayoutEffect.ts index b8bd88b645d..27c81fbd72c 100644 --- a/src/react/hooks/internal/useIsomorphicLayoutEffect.ts +++ b/src/react/hooks/internal/useIsomorphicLayoutEffect.ts @@ -1,5 +1,5 @@ import { useLayoutEffect, useEffect } from 'react'; -import { canUseDOM } from '../../../utilities'; +import { canUseDOM } from '../../../utilities/index.js'; // use canUseDOM here instead of canUseLayoutEffect because we want to be able // to use useLayoutEffect in our jest tests. useLayoutEffect seems to work fine diff --git a/src/react/hooks/useApolloClient.ts b/src/react/hooks/useApolloClient.ts index 61a7adf8d16..b15c9147194 100644 --- a/src/react/hooks/useApolloClient.ts +++ b/src/react/hooks/useApolloClient.ts @@ -1,7 +1,7 @@ -import { invariant } from '../../utilities/globals'; +import { invariant } from '../../utilities/globals/index.js'; import { useContext } from 'react'; -import type { ApolloClient } from '../../core'; -import { getApolloContext } from '../context'; +import type { ApolloClient } from '../../core/index.js'; +import { getApolloContext } from '../context/index.js'; export function useApolloClient( override?: ApolloClient, diff --git a/src/react/hooks/useBackgroundQuery.ts b/src/react/hooks/useBackgroundQuery.ts index e65abe29a53..cfa5b4a3b88 100644 --- a/src/react/hooks/useBackgroundQuery.ts +++ b/src/react/hooks/useBackgroundQuery.ts @@ -3,19 +3,19 @@ import type { DocumentNode, OperationVariables, TypedDocumentNode, -} from '../../core'; -import { useApolloClient } from './useApolloClient'; +} from '../../core/index.js'; +import { useApolloClient } from './useApolloClient.js'; import { QUERY_REFERENCE_SYMBOL, type QueryReference, -} from '../cache/QueryReference'; -import type { BackgroundQueryHookOptions, NoInfer } from '../types/types'; -import { __use } from './internal'; -import { useSuspenseCache } from './useSuspenseCache'; -import { useTrackedQueryRefs, useWatchQueryOptions } from './useSuspenseQuery'; -import type { FetchMoreFunction, RefetchFunction } from './useSuspenseQuery'; -import { canonicalStringify } from '../../cache'; -import type { DeepPartial } from '../../utilities'; +} from '../cache/QueryReference.js'; +import type { BackgroundQueryHookOptions, NoInfer } from '../types/types.js'; +import { __use } from './internal/index.js'; +import { useSuspenseCache } from './useSuspenseCache.js'; +import { useTrackedQueryRefs, useWatchQueryOptions } from './useSuspenseQuery.js'; +import type { FetchMoreFunction, RefetchFunction } from './useSuspenseQuery.js'; +import { canonicalStringify } from '../../cache/index.js'; +import type { DeepPartial } from '../../utilities/index.js'; export type UseBackgroundQueryResult< TData = unknown, diff --git a/src/react/hooks/useFragment.ts b/src/react/hooks/useFragment.ts index 652f5bdeca5..0f26ead89c8 100644 --- a/src/react/hooks/useFragment.ts +++ b/src/react/hooks/useFragment.ts @@ -1,19 +1,19 @@ import { useRef } from "react"; import { equal } from "@wry/equality"; -import type { DeepPartial} from "../../utilities"; -import { mergeDeepArray } from "../../utilities"; +import type { DeepPartial} from "../../utilities/index.js"; +import { mergeDeepArray } from "../../utilities/index.js"; import type { Cache, Reference, StoreObject, MissingTree, -} from "../../cache"; +} from "../../cache/index.js"; -import { useApolloClient } from "./useApolloClient"; -import { useSyncExternalStore } from "./useSyncExternalStore"; -import type { OperationVariables } from "../../core"; -import type { NoInfer } from "../types/types"; +import { useApolloClient } from "./useApolloClient.js"; +import { useSyncExternalStore } from "./useSyncExternalStore.js"; +import type { OperationVariables } from "../../core/index.js"; +import type { NoInfer } from "../types/types.js"; export interface UseFragmentOptions extends Omit< diff --git a/src/react/hooks/useLazyQuery.ts b/src/react/hooks/useLazyQuery.ts index 20b82558702..6452a5bccf2 100644 --- a/src/react/hooks/useLazyQuery.ts +++ b/src/react/hooks/useLazyQuery.ts @@ -2,17 +2,17 @@ import type { DocumentNode } from 'graphql'; import type { TypedDocumentNode } from '@graphql-typed-document-node/core'; import { useCallback, useMemo, useRef } from 'react'; -import type { OperationVariables } from '../../core'; -import { mergeOptions } from '../../utilities'; +import type { OperationVariables } from '../../core/index.js'; +import { mergeOptions } from '../../utilities/index.js'; import type { LazyQueryHookExecOptions, LazyQueryHookOptions, LazyQueryResultTuple, NoInfer, QueryResult, -} from '../types/types'; -import { useInternalState } from './useQuery'; -import { useApolloClient } from './useApolloClient'; +} from '../types/types.js'; +import { useInternalState } from './useQuery.js'; +import { useApolloClient } from './useApolloClient.js'; // The following methods, when called will execute the query, regardless of // whether the useLazyQuery execute function was called before. @@ -35,7 +35,7 @@ export function useLazyQuery { return new Promise>((resolve) => { let result: ApolloQueryResult; - // Subscribe to the concast independently of the ObservableQuery in case + // Subscribe to the concast independently of the ObservableQuery in case // the component gets unmounted before the promise resolves. This prevents // the concast from terminating early and resolving with `undefined` when // there are no more subscribers for the concast. diff --git a/src/react/hooks/useReactiveVar.ts b/src/react/hooks/useReactiveVar.ts index b9b96090ab5..e012878400e 100644 --- a/src/react/hooks/useReactiveVar.ts +++ b/src/react/hooks/useReactiveVar.ts @@ -1,5 +1,5 @@ import { useEffect, useState } from 'react'; -import type { ReactiveVar } from '../../core'; +import type { ReactiveVar } from '../../core/index.js'; export function useReactiveVar(rv: ReactiveVar): T { const value = rv(); diff --git a/src/react/hooks/useReadQuery.ts b/src/react/hooks/useReadQuery.ts index eb0fefcdef7..64d78cdf9ad 100644 --- a/src/react/hooks/useReadQuery.ts +++ b/src/react/hooks/useReadQuery.ts @@ -1,9 +1,9 @@ import { useState, useMemo, useEffect } from "react"; import invariant from "ts-invariant"; -import { NetworkStatus } from "../../core"; -import { QUERY_REFERENCE_SYMBOL, type QueryReference } from "../cache/QueryReference"; -import { __use } from "./internal"; -import { toApolloError } from "./useSuspenseQuery"; +import { NetworkStatus } from "../../core/index.js"; +import { QUERY_REFERENCE_SYMBOL, type QueryReference } from "../cache/QueryReference.js"; +import { __use } from "./internal/index.js"; +import { toApolloError } from "./useSuspenseQuery.js"; export function useReadQuery(queryRef: QueryReference) { const [, forceUpdate] = useState(0); diff --git a/src/react/hooks/useSubscription.ts b/src/react/hooks/useSubscription.ts index 5da11a014ae..aaa87015723 100644 --- a/src/react/hooks/useSubscription.ts +++ b/src/react/hooks/useSubscription.ts @@ -1,17 +1,17 @@ -import { invariant } from '../../utilities/globals'; +import { invariant } from '../../utilities/globals/index.js'; import { useState, useRef, useEffect } from 'react'; import type { DocumentNode } from 'graphql'; import type { TypedDocumentNode } from '@graphql-typed-document-node/core'; import { equal } from '@wry/equality'; -import { DocumentType, verifyDocumentType } from '../parser'; +import { DocumentType, verifyDocumentType } from '../parser/index.js'; import type { NoInfer, SubscriptionHookOptions, SubscriptionResult -} from '../types/types'; -import type { OperationVariables } from '../../core'; -import { useApolloClient } from './useApolloClient'; +} from '../types/types.js'; +import type { OperationVariables } from '../../core/index.js'; +import { useApolloClient } from './useApolloClient.js'; export function useSubscription( subscription: DocumentNode | TypedDocumentNode, diff --git a/src/react/hooks/useSuspenseCache.ts b/src/react/hooks/useSuspenseCache.ts index 5dd01c18df3..e622055f5bd 100644 --- a/src/react/hooks/useSuspenseCache.ts +++ b/src/react/hooks/useSuspenseCache.ts @@ -1,7 +1,7 @@ import { useContext } from 'react'; -import { getApolloContext } from '../context'; -import { invariant } from '../../utilities/globals'; -import type { SuspenseCache } from '../cache'; +import { getApolloContext } from '../context/index.js'; +import { invariant } from '../../utilities/globals/index.js'; +import type { SuspenseCache } from '../cache/index.js'; export function useSuspenseCache(override?: SuspenseCache) { const context = useContext(getApolloContext()); diff --git a/src/react/hooks/useSuspenseQuery.ts b/src/react/hooks/useSuspenseQuery.ts index 9824f2ff000..d116c076a15 100644 --- a/src/react/hooks/useSuspenseQuery.ts +++ b/src/react/hooks/useSuspenseQuery.ts @@ -1,4 +1,4 @@ -import { invariant } from '../../utilities/globals'; +import { invariant } from '../../utilities/globals/index.js'; import { useRef, useCallback, useMemo, useEffect, useState } from 'react'; import type { ApolloClient, @@ -9,21 +9,21 @@ import type { WatchQueryOptions, WatchQueryFetchPolicy, FetchMoreQueryOptions, -} from '../../core'; -import { ApolloError, NetworkStatus } from '../../core'; -import type { DeepPartial } from '../../utilities'; -import { isNonEmptyArray } from '../../utilities'; -import { useApolloClient } from './useApolloClient'; -import { DocumentType, verifyDocumentType } from '../parser'; +} from '../../core/index.js'; +import { ApolloError, NetworkStatus } from '../../core/index.js'; +import type { DeepPartial } from '../../utilities/index.js'; +import { isNonEmptyArray } from '../../utilities/index.js'; +import { useApolloClient } from './useApolloClient.js'; +import { DocumentType, verifyDocumentType } from '../parser/index.js'; import type { SuspenseQueryHookOptions, ObservableQueryFields, NoInfer, -} from '../types/types'; -import { useDeepMemo, useStrictModeSafeCleanupEffect, __use } from './internal'; -import { useSuspenseCache } from './useSuspenseCache'; -import type { InternalQueryReference } from '../cache/QueryReference'; -import { canonicalStringify } from '../../cache'; +} from '../types/types.js'; +import { useDeepMemo, useStrictModeSafeCleanupEffect, __use } from './internal/index.js'; +import { useSuspenseCache } from './useSuspenseCache.js'; +import type { InternalQueryReference } from '../cache/QueryReference.js'; +import { canonicalStringify } from '../../cache/index.js'; export interface UseSuspenseQueryResult< TData = unknown, diff --git a/src/react/hooks/useSyncExternalStore.ts b/src/react/hooks/useSyncExternalStore.ts index 241e7ee403c..4156f949798 100644 --- a/src/react/hooks/useSyncExternalStore.ts +++ b/src/react/hooks/useSyncExternalStore.ts @@ -1,7 +1,7 @@ -import { invariant } from '../../utilities/globals'; +import { invariant } from '../../utilities/globals/index.js'; import * as React from 'react'; -import { canUseLayoutEffect } from '../../utilities'; +import { canUseLayoutEffect } from '../../utilities/index.js'; let didWarnUncachedGetSnapshot = false; diff --git a/src/react/index.ts b/src/react/index.ts index 4682e73080d..181ce02303a 100644 --- a/src/react/index.ts +++ b/src/react/index.ts @@ -1,4 +1,4 @@ -import '../utilities/globals'; +import '../utilities/globals/index.js'; export { ApolloProvider, @@ -6,16 +6,16 @@ export { getApolloContext, resetApolloContext, ApolloContextValue -} from './context'; +} from './context/index.js'; -export * from './hooks'; -export { SuspenseCache } from './cache'; +export * from './hooks/index.js'; +export { SuspenseCache } from './cache/index.js'; export { DocumentType, IDocumentDefinition, operationName, parser -} from './parser'; +} from './parser/index.js'; -export * from './types/types'; +export * from './types/types.js'; diff --git a/src/react/parser/index.ts b/src/react/parser/index.ts index def98e4e04c..74d6d73258c 100644 --- a/src/react/parser/index.ts +++ b/src/react/parser/index.ts @@ -1,4 +1,4 @@ -import { invariant } from '../../utilities/globals'; +import { invariant } from '../../utilities/globals/index.js'; import type { DocumentNode, diff --git a/src/react/ssr/RenderPromises.ts b/src/react/ssr/RenderPromises.ts index a511f96c0b8..733a0e0c9eb 100644 --- a/src/react/ssr/RenderPromises.ts +++ b/src/react/ssr/RenderPromises.ts @@ -1,7 +1,7 @@ import type { DocumentNode } from 'graphql'; -import type { ObservableQuery, OperationVariables } from '../../core'; -import type { QueryDataOptions } from '../types/types'; +import type { ObservableQuery, OperationVariables } from '../../core/index.js'; +import type { QueryDataOptions } from '../types/types.js'; // TODO: A vestigial interface from when hooks were implemented with utility // classes, which should be deleted in the future. diff --git a/src/react/ssr/getDataFromTree.ts b/src/react/ssr/getDataFromTree.ts index 8d8919239ca..39ff5d7a261 100644 --- a/src/react/ssr/getDataFromTree.ts +++ b/src/react/ssr/getDataFromTree.ts @@ -1,6 +1,6 @@ import * as React from 'react'; -import { getApolloContext } from '../context'; -import { RenderPromises } from './RenderPromises'; +import { getApolloContext } from '../context/index.js'; +import { RenderPromises } from './RenderPromises.js'; import { renderToStaticMarkup } from 'react-dom/server'; export function getDataFromTree( diff --git a/src/react/ssr/index.ts b/src/react/ssr/index.ts index f239c2a435f..6a8512ea631 100644 --- a/src/react/ssr/index.ts +++ b/src/react/ssr/index.ts @@ -1,3 +1,3 @@ -export { getMarkupFromTree, getDataFromTree } from './getDataFromTree'; -export { renderToStringWithData } from './renderToStringWithData'; -export { RenderPromises } from './RenderPromises'; +export { getMarkupFromTree, getDataFromTree } from './getDataFromTree.js'; +export { renderToStringWithData } from './renderToStringWithData.js'; +export { RenderPromises } from './RenderPromises.js'; diff --git a/src/react/ssr/renderToStringWithData.ts b/src/react/ssr/renderToStringWithData.ts index a086907d726..c848305d680 100644 --- a/src/react/ssr/renderToStringWithData.ts +++ b/src/react/ssr/renderToStringWithData.ts @@ -1,5 +1,5 @@ import type { ReactElement } from 'react'; -import { getMarkupFromTree } from './getDataFromTree'; +import { getMarkupFromTree } from './getDataFromTree.js'; import { renderToString } from 'react-dom/server'; export function renderToStringWithData( diff --git a/src/react/types/types.ts b/src/react/types/types.ts index a63deda1d26..007faecccd4 100644 --- a/src/react/types/types.ts +++ b/src/react/types/types.ts @@ -2,9 +2,9 @@ import type { ReactNode } from 'react'; import type { DocumentNode } from 'graphql'; import type { TypedDocumentNode } from '@graphql-typed-document-node/core'; -import type { Observable, ObservableSubscription } from '../../utilities'; -import type { FetchResult } from '../../link/core'; -import type { ApolloError } from '../../errors'; +import type { Observable, ObservableSubscription } from '../../utilities/index.js'; +import type { FetchResult } from '../../link/core/index.js'; +import type { ApolloError } from '../../errors/index.js'; import type { ApolloCache, ApolloClient, @@ -17,16 +17,16 @@ import type { InternalRefetchQueriesInclude, WatchQueryOptions, WatchQueryFetchPolicy, -} from '../../core'; -import type { SuspenseCache } from '../cache'; +} from '../../core/index.js'; +import type { SuspenseCache } from '../cache/index.js'; /* QueryReference type */ -export type { QueryReference } from '../cache/QueryReference'; +export type { QueryReference } from '../cache/QueryReference.js'; /* Common types */ -export type { DefaultContext as Context } from "../../core"; +export type { DefaultContext as Context } from "../../core/index.js"; export type CommonOptions = TOptions & { client?: ApolloClient; diff --git a/src/testing/core/index.ts b/src/testing/core/index.ts index ba3d37b2660..0b8cb60b5f9 100644 --- a/src/testing/core/index.ts +++ b/src/testing/core/index.ts @@ -4,13 +4,13 @@ export { MockedResponse, MockLinkOptions, ResultFunction -} from './mocking/mockLink'; +} from './mocking/mockLink.js'; export { MockSubscriptionLink, mockObservableLink -} from './mocking/mockSubscriptionLink'; -export { createMockClient } from './mocking/mockClient'; -export { default as subscribeAndCount } from './subscribeAndCount'; -export { itAsync } from './itAsync'; -export { wait, tick } from './wait' -export * from './withConsoleSpy'; +} from './mocking/mockSubscriptionLink.js'; +export { createMockClient } from './mocking/mockClient.js'; +export { default as subscribeAndCount } from './subscribeAndCount.js'; +export { itAsync } from './itAsync.js'; +export { wait, tick } from './wait.js' +export * from './withConsoleSpy.js'; diff --git a/src/testing/core/mocking/mockClient.ts b/src/testing/core/mocking/mockClient.ts index d45c7293dc7..02a9748a77a 100644 --- a/src/testing/core/mocking/mockClient.ts +++ b/src/testing/core/mocking/mockClient.ts @@ -1,9 +1,9 @@ import type { DocumentNode } from 'graphql'; -import { ApolloClient } from '../../../core'; -import type { NormalizedCacheObject } from '../../../cache'; -import { InMemoryCache } from '../../../cache'; -import { mockSingleLink } from './mockLink'; +import { ApolloClient } from '../../../core/index.js'; +import type { NormalizedCacheObject } from '../../../cache/index.js'; +import { InMemoryCache } from '../../../cache/index.js'; +import { mockSingleLink } from './mockLink.js'; export function createMockClient( data: TData, diff --git a/src/testing/core/mocking/mockLink.ts b/src/testing/core/mocking/mockLink.ts index 9b72d580204..7740828905c 100644 --- a/src/testing/core/mocking/mockLink.ts +++ b/src/testing/core/mocking/mockLink.ts @@ -1,14 +1,14 @@ -import { invariant } from '../../../utilities/globals'; +import { invariant } from '../../../utilities/globals/index.js'; import { equal } from '@wry/equality'; import type { Operation, GraphQLRequest, - FetchResult} from '../../../link/core'; + FetchResult} from '../../../link/core/index.js'; import { ApolloLink -} from '../../../link/core'; +} from '../../../link/core/index.js'; import { Observable, @@ -18,7 +18,7 @@ import { cloneDeep, stringifyForDisplay, print -} from '../../../utilities'; +} from '../../../utilities/index.js'; export type ResultFunction = () => T; @@ -117,7 +117,7 @@ ${unmatchedVars.map(d => ` ${stringifyForDisplay(d)}`).join('\n')} if (this.showWarnings) { console.warn( - configError.message + + configError.message + '\nThis typically indicates a configuration error in your mocks ' + 'setup, usually due to a typo or mismatched variable.' ); diff --git a/src/testing/core/mocking/mockQueryManager.ts b/src/testing/core/mocking/mockQueryManager.ts index 760214d1e84..e6cbc2c1380 100644 --- a/src/testing/core/mocking/mockQueryManager.ts +++ b/src/testing/core/mocking/mockQueryManager.ts @@ -1,7 +1,7 @@ -import { QueryManager } from '../../../core/QueryManager'; -import type { MockedResponse } from './mockLink'; -import { mockSingleLink } from './mockLink'; -import { InMemoryCache } from '../../../cache'; +import { QueryManager } from '../../../core/QueryManager.js'; +import type { MockedResponse } from './mockLink.js'; +import { mockSingleLink } from './mockLink.js'; +import { InMemoryCache } from '../../../cache/index.js'; // Helper method for the tests that construct a query manager out of a // a list of mocked responses for a mocked network interface. diff --git a/src/testing/core/mocking/mockSubscriptionLink.ts b/src/testing/core/mocking/mockSubscriptionLink.ts index 8c92bb35a22..ef810d6760e 100644 --- a/src/testing/core/mocking/mockSubscriptionLink.ts +++ b/src/testing/core/mocking/mockSubscriptionLink.ts @@ -1,6 +1,6 @@ -import { Observable } from '../../../utilities'; -import type { FetchResult, Operation } from '../../../link/core'; -import { ApolloLink } from '../../../link/core'; +import { Observable } from '../../../utilities/index.js'; +import type { FetchResult, Operation } from '../../../link/core/index.js'; +import { ApolloLink } from '../../../link/core/index.js'; export interface MockedSubscription { request: Operation; diff --git a/src/testing/core/mocking/mockWatchQuery.ts b/src/testing/core/mocking/mockWatchQuery.ts index 29bbb559a99..20faa5f70f9 100644 --- a/src/testing/core/mocking/mockWatchQuery.ts +++ b/src/testing/core/mocking/mockWatchQuery.ts @@ -1,6 +1,6 @@ -import type { MockedResponse } from './mockLink'; -import mockQueryManager from './mockQueryManager'; -import type { ObservableQuery } from '../../../core'; +import type { MockedResponse } from './mockLink.js'; +import mockQueryManager from './mockQueryManager.js'; +import type { ObservableQuery } from '../../../core/index.js'; export default (...mockedResponses: MockedResponse[]): ObservableQuery => { const queryManager = mockQueryManager(...mockedResponses); diff --git a/src/testing/core/observableToPromise.ts b/src/testing/core/observableToPromise.ts index 007d5b5ddf8..bdf80d39998 100644 --- a/src/testing/core/observableToPromise.ts +++ b/src/testing/core/observableToPromise.ts @@ -1,5 +1,5 @@ -import type { ObservableQuery, ApolloQueryResult } from '../../core'; -import type { ObservableSubscription } from '../../utilities'; +import type { ObservableQuery, ApolloQueryResult } from '../../core/index.js'; +import type { ObservableSubscription } from '../../utilities/index.js'; /** * diff --git a/src/testing/core/subscribeAndCount.ts b/src/testing/core/subscribeAndCount.ts index c734c466f1a..34cfaddf31b 100644 --- a/src/testing/core/subscribeAndCount.ts +++ b/src/testing/core/subscribeAndCount.ts @@ -1,5 +1,5 @@ -import type { ObservableSubscription, Observable } from '../../utilities'; -import { asyncMap } from '../../utilities'; +import type { ObservableSubscription, Observable } from '../../utilities/index.js'; +import { asyncMap } from '../../utilities/index.js'; export default function subscribeAndCount( reject: (reason: any) => any, diff --git a/src/testing/index.ts b/src/testing/index.ts index e3cd1cdbc3a..2093c09c673 100644 --- a/src/testing/index.ts +++ b/src/testing/index.ts @@ -1,3 +1,3 @@ -import '../utilities/globals'; -export { MockedProvider, MockedProviderProps } from './react/MockedProvider'; -export * from './core'; +import '../utilities/globals/index.js'; +export { MockedProvider, MockedProviderProps } from './react/MockedProvider.js'; +export * from './core/index.js'; diff --git a/src/testing/matchers/index.d.ts b/src/testing/matchers/index.d.ts index 6b62083d712..61d65d29fbd 100644 --- a/src/testing/matchers/index.d.ts +++ b/src/testing/matchers/index.d.ts @@ -2,7 +2,7 @@ import type { ApolloClient, DocumentNode, OperationVariables, -} from '../../core'; +} from '../../core/index.js'; interface ApolloCustomMatchers { /** diff --git a/src/testing/matchers/index.ts b/src/testing/matchers/index.ts index ed88fcdec9d..a6f545ed399 100644 --- a/src/testing/matchers/index.ts +++ b/src/testing/matchers/index.ts @@ -1,6 +1,6 @@ import { expect } from '@jest/globals'; -import { toMatchDocument } from './toMatchDocument'; -import { toHaveSuspenseCacheEntryUsing } from './toHaveSuspenseCacheEntryUsing'; +import { toMatchDocument } from './toMatchDocument.js'; +import { toHaveSuspenseCacheEntryUsing } from './toHaveSuspenseCacheEntryUsing.js'; expect.extend({ toHaveSuspenseCacheEntryUsing, diff --git a/src/testing/matchers/toHaveSuspenseCacheEntryUsing.ts b/src/testing/matchers/toHaveSuspenseCacheEntryUsing.ts index 73ed9ac0ce3..bd789b2755c 100644 --- a/src/testing/matchers/toHaveSuspenseCacheEntryUsing.ts +++ b/src/testing/matchers/toHaveSuspenseCacheEntryUsing.ts @@ -1,8 +1,8 @@ import type { MatcherFunction } from 'expect'; import type { DocumentNode } from 'graphql'; -import type { ApolloClient, OperationVariables } from '../../core'; -import { SuspenseCache } from '../../react'; -import { canonicalStringify } from '../../cache'; +import type { ApolloClient, OperationVariables } from '../../core/index.js'; +import { SuspenseCache } from '../../react/index.js'; +import { canonicalStringify } from '../../cache/index.js'; export const toHaveSuspenseCacheEntryUsing: MatcherFunction< [ diff --git a/src/testing/matchers/toMatchDocument.ts b/src/testing/matchers/toMatchDocument.ts index 23cafefc07d..c338e4d022a 100644 --- a/src/testing/matchers/toMatchDocument.ts +++ b/src/testing/matchers/toMatchDocument.ts @@ -1,5 +1,5 @@ -import { checkDocument, print } from '../../utilities'; -import type { DocumentNode } from '../../core'; +import { checkDocument, print } from '../../utilities/index.js'; +import type { DocumentNode } from '../../core/index.js'; import type { MatcherFunction } from 'expect'; export const toMatchDocument: MatcherFunction<[document: DocumentNode]> = diff --git a/src/testing/react/MockedProvider.tsx b/src/testing/react/MockedProvider.tsx index e634be12057..f9d950bcf00 100644 --- a/src/testing/react/MockedProvider.tsx +++ b/src/testing/react/MockedProvider.tsx @@ -1,15 +1,15 @@ import * as React from 'react'; -import type { DefaultOptions } from '../../core'; -import { ApolloClient } from '../../core'; -import { InMemoryCache as Cache } from '../../cache'; -import { ApolloProvider } from '../../react/context'; -import { SuspenseCache } from '../../react'; -import type { MockedResponse } from '../core'; -import { MockLink } from '../core'; -import type { ApolloLink } from '../../link/core'; -import type { Resolvers } from '../../core'; -import type { ApolloCache } from '../../cache'; +import type { DefaultOptions } from '../../core/index.js'; +import { ApolloClient } from '../../core/index.js'; +import { InMemoryCache as Cache } from '../../cache/index.js'; +import { ApolloProvider } from '../../react/context/index.js'; +import { SuspenseCache } from '../../react/index.js'; +import type { MockedResponse } from '../core/index.js'; +import { MockLink } from '../core/index.js'; +import type { ApolloLink } from '../../link/core/index.js'; +import type { Resolvers } from '../../core/index.js'; +import type { ApolloCache } from '../../cache/index.js'; export interface MockedProviderProps { mocks?: ReadonlyArray; diff --git a/src/utilities/common/canUse.ts b/src/utilities/common/canUse.ts index 453379b7ba7..9ea64725fc1 100644 --- a/src/utilities/common/canUse.ts +++ b/src/utilities/common/canUse.ts @@ -1,4 +1,4 @@ -import { maybe } from "../globals"; +import { maybe } from "../globals/index.js"; export const canUseWeakMap = typeof WeakMap === 'function' && diff --git a/src/utilities/common/compact.ts b/src/utilities/common/compact.ts index cdab8d83b35..ea421732c11 100644 --- a/src/utilities/common/compact.ts +++ b/src/utilities/common/compact.ts @@ -1,4 +1,4 @@ -import type { TupleToIntersection } from './mergeDeep'; +import type { TupleToIntersection } from './mergeDeep.js'; /** * Merges the provided objects shallowly and removes diff --git a/src/utilities/common/errorHandling.ts b/src/utilities/common/errorHandling.ts index e7fa5216f4e..653a0c12cad 100644 --- a/src/utilities/common/errorHandling.ts +++ b/src/utilities/common/errorHandling.ts @@ -1,6 +1,6 @@ -import type { FetchResult } from "../../link/core"; -import { isNonEmptyArray } from "../../utilities/common/arrays"; -import { isExecutionPatchIncrementalResult } from "../../utilities/common/incrementalResult"; +import type { FetchResult } from "../../link/core/index.js"; +import { isNonEmptyArray } from "./arrays.js"; +import { isExecutionPatchIncrementalResult } from "./incrementalResult.js"; export function graphQLResultHasError(result: FetchResult): boolean { const errors = getGraphQLErrorsFromResult(result); diff --git a/src/utilities/common/incrementalResult.ts b/src/utilities/common/incrementalResult.ts index 53a628678c0..c415e9dbbbc 100644 --- a/src/utilities/common/incrementalResult.ts +++ b/src/utilities/common/incrementalResult.ts @@ -4,10 +4,10 @@ import type { ExecutionPatchResult, ApolloPayloadResult, FetchResult, -} from "../../link/core"; -import { isNonNullObject } from "./objects"; -import { isNonEmptyArray } from "./arrays"; -import { DeepMerger } from "./mergeDeep"; +} from "../../link/core/index.js"; +import { isNonNullObject } from "./objects.js"; +import { isNonEmptyArray } from "./arrays.js"; +import { DeepMerger } from "./mergeDeep.js"; export function isExecutionPatchIncrementalResult( value: FetchResult diff --git a/src/utilities/common/maybeDeepFreeze.ts b/src/utilities/common/maybeDeepFreeze.ts index bb1980f1ca8..fdb94016aa6 100644 --- a/src/utilities/common/maybeDeepFreeze.ts +++ b/src/utilities/common/maybeDeepFreeze.ts @@ -1,4 +1,4 @@ -import { isNonNullObject } from './objects'; +import { isNonNullObject } from './objects.js'; function deepFreeze(value: any) { const workSet = new Set([value]); diff --git a/src/utilities/common/mergeDeep.ts b/src/utilities/common/mergeDeep.ts index 22db21e4540..0b23d0404a7 100644 --- a/src/utilities/common/mergeDeep.ts +++ b/src/utilities/common/mergeDeep.ts @@ -1,4 +1,4 @@ -import { isNonNullObject } from "./objects"; +import { isNonNullObject } from "./objects.js"; const { hasOwnProperty } = Object.prototype; diff --git a/src/utilities/common/mergeOptions.ts b/src/utilities/common/mergeOptions.ts index 04a64b0b8ad..6a3fd9bd692 100644 --- a/src/utilities/common/mergeOptions.ts +++ b/src/utilities/common/mergeOptions.ts @@ -3,9 +3,9 @@ import type { WatchQueryOptions, MutationOptions, OperationVariables, -} from "../../core"; +} from "../../core/index.js"; -import { compact } from "./compact"; +import { compact } from "./compact.js"; type OptionsUnion = | WatchQueryOptions diff --git a/src/utilities/common/omitDeep.ts b/src/utilities/common/omitDeep.ts index cb555dfa4a1..0f56a48c901 100644 --- a/src/utilities/common/omitDeep.ts +++ b/src/utilities/common/omitDeep.ts @@ -1,5 +1,5 @@ -import type { DeepOmit } from '../types/DeepOmit'; -import { isPlainObject } from './objects'; +import type { DeepOmit } from '../types/DeepOmit.js'; +import { isPlainObject } from './objects.js'; export function omitDeep(value: T, key: K) { return __omitDeep(value, key); diff --git a/src/utilities/common/responseIterator.ts b/src/utilities/common/responseIterator.ts index 4b316563e05..4e552816f94 100644 --- a/src/utilities/common/responseIterator.ts +++ b/src/utilities/common/responseIterator.ts @@ -1,6 +1,6 @@ import type { Response as NodeResponse } from "node-fetch"; import type { Readable as NodeReadableStream } from "stream"; -import { canUseAsyncIteratorSymbol } from "./canUse"; +import { canUseAsyncIteratorSymbol } from "./canUse.js"; export function isNodeResponse(value: any): value is NodeResponse { return !!(value as NodeResponse).body; diff --git a/src/utilities/common/stringifyForDisplay.ts b/src/utilities/common/stringifyForDisplay.ts index 3499d6ca8f7..92b7487d55f 100644 --- a/src/utilities/common/stringifyForDisplay.ts +++ b/src/utilities/common/stringifyForDisplay.ts @@ -1,4 +1,4 @@ -import { makeUniqueId } from "./makeUniqueId"; +import { makeUniqueId } from "./makeUniqueId.js"; export function stringifyForDisplay(value: any, space = 0): string { const undefId = makeUniqueId("stringifyForDisplay"); diff --git a/src/utilities/common/stripTypename.ts b/src/utilities/common/stripTypename.ts index f3f28526ff8..9d4e3c6a1c4 100644 --- a/src/utilities/common/stripTypename.ts +++ b/src/utilities/common/stripTypename.ts @@ -1,4 +1,4 @@ -import { omitDeep } from './omitDeep'; +import { omitDeep } from './omitDeep.js'; export function stripTypename(value: T) { return omitDeep(value, '__typename'); diff --git a/src/utilities/globals/global.ts b/src/utilities/globals/global.ts index bbc95fc4686..0ae3735377a 100644 --- a/src/utilities/globals/global.ts +++ b/src/utilities/globals/global.ts @@ -1,4 +1,4 @@ -import { maybe } from "./maybe"; +import { maybe } from "./maybe.js"; declare global { const __DEV__: boolean; // will be removed in `dist` by the `postprocessDist` script diff --git a/src/utilities/globals/index.ts b/src/utilities/globals/index.ts index e90228128fc..1ec0b7367ae 100644 --- a/src/utilities/globals/index.ts +++ b/src/utilities/globals/index.ts @@ -1,7 +1,7 @@ -import { invariant, newInvariantError, InvariantError } from "./invariantWrappers"; +import { invariant, newInvariantError, InvariantError } from "./invariantWrappers.js"; -export { maybe } from "./maybe"; -export { default as global } from "./global"; +export { maybe } from "./maybe.js"; +export { default as global } from "./global.js"; export { invariant, newInvariantError, InvariantError } /** diff --git a/src/utilities/globals/invariantWrappers.ts b/src/utilities/globals/invariantWrappers.ts index f3dd751a808..0099d4fdd24 100644 --- a/src/utilities/globals/invariantWrappers.ts +++ b/src/utilities/globals/invariantWrappers.ts @@ -1,8 +1,8 @@ import { invariant as originalInvariant, InvariantError } from 'ts-invariant'; -import { version } from '../../version'; -import global from './global'; -import type { ErrorCodes } from '../../invariantErrorCodes'; -import { stringifyForDisplay } from '../common/stringifyForDisplay'; +import { version } from '../../version.js'; +import global from './global.js'; +import type { ErrorCodes } from '../../invariantErrorCodes.js'; +import { stringifyForDisplay } from '../common/stringifyForDisplay.js'; function wrap(fn: (msg?: string, ...args: any[]) => void) { return function (message: string | number, ...args: any[]) { diff --git a/src/utilities/graphql/DocumentTransform.ts b/src/utilities/graphql/DocumentTransform.ts index d0969f77c89..79682e6aafe 100644 --- a/src/utilities/graphql/DocumentTransform.ts +++ b/src/utilities/graphql/DocumentTransform.ts @@ -1,7 +1,7 @@ import { Trie } from '@wry/trie'; -import { canUseWeakMap, canUseWeakSet } from '../common/canUse'; -import { checkDocument } from './getFromAST'; -import { invariant } from '../globals'; +import { canUseWeakMap, canUseWeakSet } from '../common/canUse.js'; +import { checkDocument } from './getFromAST.js'; +import { invariant } from '../globals/index.js'; import type { DocumentNode } from 'graphql'; export type DocumentTransformCacheKey = ReadonlyArray; diff --git a/src/utilities/graphql/directives.ts b/src/utilities/graphql/directives.ts index e3eaaf86340..58723e099cc 100644 --- a/src/utilities/graphql/directives.ts +++ b/src/utilities/graphql/directives.ts @@ -1,4 +1,4 @@ -import { invariant } from '../globals'; +import { invariant } from '../globals/index.js'; // Provides the methods that allow QueryManager to handle the `skip` and // `include` directives within GraphQL. diff --git a/src/utilities/graphql/fragments.ts b/src/utilities/graphql/fragments.ts index 253497239fe..7c40b0da50e 100644 --- a/src/utilities/graphql/fragments.ts +++ b/src/utilities/graphql/fragments.ts @@ -1,4 +1,4 @@ -import { invariant, newInvariantError } from '../globals'; +import { invariant, newInvariantError } from '../globals/index.js'; import type { DocumentNode, diff --git a/src/utilities/graphql/getFromAST.ts b/src/utilities/graphql/getFromAST.ts index 4701a1144e5..8f4a634cb94 100644 --- a/src/utilities/graphql/getFromAST.ts +++ b/src/utilities/graphql/getFromAST.ts @@ -1,4 +1,4 @@ -import { invariant, newInvariantError } from '../globals'; +import { invariant, newInvariantError } from '../globals/index.js'; import type { DocumentNode, @@ -7,7 +7,7 @@ import type { ValueNode, } from 'graphql'; -import { valueToObjectRepresentation } from './storeUtils'; +import { valueToObjectRepresentation } from './storeUtils.js'; type OperationDefinitionWithName = OperationDefinitionNode & { name: NonNullable; diff --git a/src/utilities/graphql/operations.ts b/src/utilities/graphql/operations.ts index ea91594f919..ef390e8f631 100644 --- a/src/utilities/graphql/operations.ts +++ b/src/utilities/graphql/operations.ts @@ -1,6 +1,6 @@ import { OperationTypeNode } from 'graphql'; -import type { DocumentNode } from '../../core'; -import { getOperationDefinition } from './getFromAST'; +import type { DocumentNode } from '../../core/index.js'; +import { getOperationDefinition } from './getFromAST.js'; function isOperation(document: DocumentNode, operation: OperationTypeNode) { return getOperationDefinition(document)?.operation === operation; diff --git a/src/utilities/graphql/print.ts b/src/utilities/graphql/print.ts index be3eca857a6..6c05355b56c 100644 --- a/src/utilities/graphql/print.ts +++ b/src/utilities/graphql/print.ts @@ -1,5 +1,5 @@ import { print as origPrint } from 'graphql'; -import { canUseWeakMap } from '../common/canUse'; +import { canUseWeakMap } from '../common/canUse.js'; const printCache = canUseWeakMap ? new WeakMap() : undefined; export const print: typeof origPrint = (ast) => { diff --git a/src/utilities/graphql/storeUtils.ts b/src/utilities/graphql/storeUtils.ts index 9271257f7c5..f9f4768c4b4 100644 --- a/src/utilities/graphql/storeUtils.ts +++ b/src/utilities/graphql/storeUtils.ts @@ -1,4 +1,4 @@ -import { newInvariantError } from '../globals'; +import { newInvariantError } from '../globals/index.js'; import type { DirectiveNode, @@ -21,9 +21,9 @@ import type { FragmentSpreadNode, } from 'graphql'; -import { isNonNullObject } from '../common/objects'; -import type { FragmentMap} from './fragments'; -import { getFragmentFromSelection } from './fragments'; +import { isNonNullObject } from '../common/objects.js'; +import type { FragmentMap} from './fragments.js'; +import { getFragmentFromSelection } from './fragments.js'; export interface Reference { readonly __ref: string; diff --git a/src/utilities/graphql/transform.ts b/src/utilities/graphql/transform.ts index 8e255398ff0..91ce5f4ea7c 100644 --- a/src/utilities/graphql/transform.ts +++ b/src/utilities/graphql/transform.ts @@ -1,4 +1,4 @@ -import { invariant } from '../globals'; +import { invariant } from '../globals/index.js'; import type { DocumentNode, @@ -25,14 +25,14 @@ import { getFragmentDefinition, getFragmentDefinitions, getMainDefinition, -} from './getFromAST'; -import { isField } from './storeUtils'; +} from './getFromAST.js'; +import { isField } from './storeUtils.js'; import type { - FragmentMap} from './fragments'; + FragmentMap} from './fragments.js'; import { createFragmentMap -} from './fragments'; -import { isArray, isNonEmptyArray } from '../common/arrays'; +} from './fragments.js'; +import { isArray, isNonEmptyArray } from '../common/arrays.js'; export type RemoveNodeConfig = { name?: string; diff --git a/src/utilities/index.ts b/src/utilities/index.ts index b0dc4a17873..89d30161faa 100644 --- a/src/utilities/index.ts +++ b/src/utilities/index.ts @@ -1,4 +1,4 @@ -export { DEV, maybe } from './globals'; +export { DEV, maybe } from './globals/index.js'; export { DirectiveInfo, @@ -10,12 +10,12 @@ export { hasClientExports, getDirectiveNames, getInclusionDirectives, -} from './graphql/directives'; +} from './graphql/directives.js'; export { DocumentTransform, DocumentTransformCacheKey -} from './graphql/DocumentTransform'; +} from './graphql/DocumentTransform.js'; export { FragmentMap, @@ -23,7 +23,7 @@ export { createFragmentMap, getFragmentQueryDocument, getFragmentFromSelection, -} from './graphql/fragments'; +} from './graphql/fragments.js'; export { checkDocument, @@ -34,11 +34,11 @@ export { getFragmentDefinition, getMainDefinition, getDefaultValues, -} from './graphql/getFromAST'; +} from './graphql/getFromAST.js'; export { print -} from './graphql/print'; +} from './graphql/print.js'; export { StoreObject, @@ -57,7 +57,7 @@ export { resultKeyNameFromField, getStoreKeyName, getTypenameFromResult, -} from './graphql/storeUtils'; +} from './graphql/storeUtils.js'; export { RemoveNodeConfig, @@ -76,54 +76,54 @@ export { removeArgumentsFromDocument, removeFragmentSpreadFromDocument, removeClientSetsFromDocument, -} from './graphql/transform'; +} from './graphql/transform.js'; export { isMutationOperation, isQueryOperation, isSubscriptionOperation, -} from './graphql/operations'; +} from './graphql/operations.js'; export { concatPagination, offsetLimitPagination, relayStylePagination, -} from './policies/pagination'; +} from './policies/pagination.js'; export { Observable, Observer, ObservableSubscription -} from './observables/Observable'; +} from './observables/Observable.js'; export { isStatefulPromise, createFulfilledPromise, createRejectedPromise, wrapPromiseWithState, -} from './promises/decoration'; +} from './promises/decoration.js'; -export * from './common/mergeDeep'; -export * from './common/cloneDeep'; -export * from './common/maybeDeepFreeze'; -export * from './observables/iteration'; -export * from './observables/asyncMap'; -export * from './observables/Concast'; -export * from './observables/subclassing'; -export * from './common/arrays'; -export * from './common/objects'; -export * from './common/errorHandling'; -export * from './common/canUse'; -export * from './common/compact'; -export * from './common/makeUniqueId'; -export * from './common/stringifyForDisplay'; -export * from './common/mergeOptions'; -export * from './common/responseIterator'; -export * from './common/incrementalResult'; +export * from './common/mergeDeep.js'; +export * from './common/cloneDeep.js'; +export * from './common/maybeDeepFreeze.js'; +export * from './observables/iteration.js'; +export * from './observables/asyncMap.js'; +export * from './observables/Concast.js'; +export * from './observables/subclassing.js'; +export * from './common/arrays.js'; +export * from './common/objects.js'; +export * from './common/errorHandling.js'; +export * from './common/canUse.js'; +export * from './common/compact.js'; +export * from './common/makeUniqueId.js'; +export * from './common/stringifyForDisplay.js'; +export * from './common/mergeOptions.js'; +export * from './common/responseIterator.js'; +export * from './common/incrementalResult.js'; -export { omitDeep } from './common/omitDeep'; -export { stripTypename } from './common/stripTypename'; +export { omitDeep } from './common/omitDeep.js'; +export { stripTypename } from './common/stripTypename.js'; -export * from './types/IsStrictlyAny'; -export { DeepOmit } from './types/DeepOmit'; -export { DeepPartial } from './types/DeepPartial'; +export * from './types/IsStrictlyAny.js'; +export { DeepOmit } from './types/DeepOmit.js'; +export { DeepPartial } from './types/DeepPartial.js'; diff --git a/src/utilities/observables/Concast.ts b/src/utilities/observables/Concast.ts index 2b709e2ec72..2c29e0e4dc9 100644 --- a/src/utilities/observables/Concast.ts +++ b/src/utilities/observables/Concast.ts @@ -1,7 +1,7 @@ -import type { Observer, ObservableSubscription, Subscriber } from "./Observable"; -import { Observable } from "./Observable"; -import { iterateObserversSafely } from "./iteration"; -import { fixObservableSubclass } from "./subclassing"; +import type { Observer, ObservableSubscription, Subscriber } from "./Observable.js"; +import { Observable } from "./Observable.js"; +import { iterateObserversSafely } from "./iteration.js"; +import { fixObservableSubclass } from "./subclassing.js"; type MaybeAsync = T | PromiseLike; diff --git a/src/utilities/observables/asyncMap.ts b/src/utilities/observables/asyncMap.ts index 247cbadd903..249f8885c30 100644 --- a/src/utilities/observables/asyncMap.ts +++ b/src/utilities/observables/asyncMap.ts @@ -1,5 +1,5 @@ -import type { Observer } from "./Observable"; -import { Observable } from "./Observable"; +import type { Observer } from "./Observable.js"; +import { Observable } from "./Observable.js"; // Like Observable.prototype.map, except that the mapping function can // optionally return a Promise (or be async). diff --git a/src/utilities/observables/iteration.ts b/src/utilities/observables/iteration.ts index e5c8c013feb..9f4646815fa 100644 --- a/src/utilities/observables/iteration.ts +++ b/src/utilities/observables/iteration.ts @@ -1,4 +1,4 @@ -import type { Observer } from "./Observable"; +import type { Observer } from "./Observable.js"; export function iterateObserversSafely( observers: Set>, diff --git a/src/utilities/observables/subclassing.ts b/src/utilities/observables/subclassing.ts index 962db01e8e2..ad9f93699b5 100644 --- a/src/utilities/observables/subclassing.ts +++ b/src/utilities/observables/subclassing.ts @@ -1,5 +1,5 @@ -import { Observable } from "./Observable"; -import { canUseSymbol } from "../common/canUse"; +import { Observable } from "./Observable.js"; +import { canUseSymbol } from "../common/canUse.js"; // Generic implementations of Observable.prototype methods like map and // filter need to know how to create a new Observable from an Observable diff --git a/src/utilities/policies/pagination.ts b/src/utilities/policies/pagination.ts index ec8edfc1de0..f8fb5b54725 100644 --- a/src/utilities/policies/pagination.ts +++ b/src/utilities/policies/pagination.ts @@ -1,7 +1,7 @@ import { __rest } from "tslib"; -import type { FieldPolicy, Reference } from '../../cache'; -import { mergeDeep } from '../common/mergeDeep'; +import type { FieldPolicy, Reference } from '../../cache/index.js'; +import { mergeDeep } from '../common/mergeDeep.js'; type KeyArgs = FieldPolicy["keyArgs"]; diff --git a/src/utilities/types/DeepOmit.ts b/src/utilities/types/DeepOmit.ts index 6917250f55b..884ce339380 100644 --- a/src/utilities/types/DeepOmit.ts +++ b/src/utilities/types/DeepOmit.ts @@ -1,4 +1,4 @@ -import type { Primitive } from './Primitive'; +import type { Primitive } from './Primitive.js'; // DeepOmit primitives include functions since these are unmodified. type DeepOmitPrimitive = Primitive | Function; diff --git a/src/utilities/types/DeepPartial.ts b/src/utilities/types/DeepPartial.ts index e9d1848e9e2..21ba7f8a6af 100644 --- a/src/utilities/types/DeepPartial.ts +++ b/src/utilities/types/DeepPartial.ts @@ -14,7 +14,7 @@ * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -import type { Primitive } from './Primitive'; +import type { Primitive } from './Primitive.js'; type DeepPartialPrimitive = Primitive | Date | RegExp;