diff --git a/.changeset/config.json b/.changeset/config.json index 348119ae3..601474915 100644 --- a/.changeset/config.json +++ b/.changeset/config.json @@ -8,6 +8,5 @@ "linked": [], "access": "public", "baseBranch": "main", - "updateInternalDependencies": "patch", - "ignore": ["@bench/*"] + "updateInternalDependencies": "patch" } diff --git a/.changeset/quick-coats-mix.md b/.changeset/quick-coats-mix.md new file mode 100644 index 000000000..964144b4f --- /dev/null +++ b/.changeset/quick-coats-mix.md @@ -0,0 +1,40 @@ +--- +"@httpx/assert": minor +--- + +Improve PlainObject convenience typings when passing a generic. + +```typescript +import { isPlainObject, assertPlainObject } from '@httpx/assert'; + +type TValue = { + key: string, + deep: { + connected: boolean + } +} +const value = { + key: 'hello', + deep: { + connected: true + } +} as unknown; + +// Without generic + +assertPlainObject(value); +// value is Record +// -> no typing + +value.key; // unknown, no runtime error +value.anything; // unknown, no runtime error +// value.deep.connected // not possible without explicit typing + +// With generic + +assertPlainObject(value); + +value.key; // unknown, no runtime error +value.anything; // unknown, no runtime error +value.deep?.connected; // connected is 'unknown', typescript suggest the type +``` diff --git a/.github/workflows/ci-packages.yml b/.github/workflows/ci-packages.yml index 1585fea07..0b193ae63 100644 --- a/.github/workflows/ci-packages.yml +++ b/.github/workflows/ci-packages.yml @@ -63,11 +63,11 @@ jobs: - name: πŸ•΅οΈ Typecheck if: matrix.node-version == '20.x' - run: yarn nx run-many --target=typecheck --exclude='examples/**' --exclude='bench/**' --exclude='docs' + run: yarn nx run-many --target=typecheck --exclude='examples/**' --exclude='docs' - name: πŸ”¬ ESLint checks if: matrix.node-version == '20.x' - run: yarn nx run-many --target=lint --exclude='examples/**' --exclude='bench/**' --exclude='docs' + run: yarn nx run-many --target=lint --exclude='examples/**' --exclude='docs' - name: πŸ§ͺ Unit tests (no-coverage - node !== 20.x) if: matrix.node-version != '20.x' diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 454503daa..26755c8aa 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -33,24 +33,24 @@ If applicable: ## Local scripts -| Name | Description | -|------------------------------|-------------------------------------------------------------------------------------------------------------------------------------| -| `yarn g:changeset` | Add a changeset to declare a new version | -| `yarn g:typecheck` | Run typechecks in all workspaces | -| `yarn g:lint` | Display linter issues in all workspaces | -| `yarn g:lint --fix` | Attempt to run linter auto-fix in all workspaces | -| `yarn g:test-unit` | Run unit tests in all workspaces | -| `yarn g:build` | Run build in all workspaces | -| `yarn g:clean` | Clean builds in all workspaces | -| `yarn g:check-dist` | Ensure build dist files passes es2017 (run `g:build` first). | -| `yarn g:check-size` | Ensure build files are within size limit (run `g:build` first). | -| `yarn g:docgen` | Build documentation (generally api doc) | -| `yarn g:bench-dist` | Run comparative benchmarks of latest | -| `yarn clean:global-cache` | Clean tooling caches (eslint, jest...) | -| `yarn deps:check --dep dev` | Will print what packages can be upgraded globally (see also [.ncurc.yml](https://github.com/belgattitude/httpx/blob/main/.ncurc.yml)) | -| `yarn deps:update --dep dev` | Apply possible updates (run `yarn install && yarn dedupe` after) | -| `yarn check:install` | Verify if there's no peer-deps missing in packages | -| `yarn dedupe` | Built-in yarn deduplication of the lock file | +| Name | Description | +|------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------| +| `yarn g:changeset` | Add a changeset to declare a new version | +| `yarn g:typecheck` | Run typechecks in all workspaces | +| `yarn g:lint` | Display linter issues in all workspaces | +| `yarn g:lint --fix` | Attempt to run linter auto-fix in all workspaces | +| `yarn g:test-unit` | Run unit tests in all workspaces | +| `yarn g:build` | Run build in all workspaces | +| `yarn g:clean` | Clean builds in all workspaces | +| `yarn g:check-dist` | Ensure build dist files passes es2017 (run `g:build` first). | +| `yarn g:check-size` | Ensure build files are within size limit (run `g:build` first). | +| `yarn g:docgen` | Build documentation (generally api doc) | +| `yarn g:bench` | Run benchmarks for all workspaces. | +| `yarn clean:global-cache` | Clean tooling caches (eslint, jest...) | +| `yarn deps:check --dep dev` | Will print what packages can be upgraded globally (see also [.ncurc.yml](https://github.com/belgattitude/httpx/blob/main/.ncurc.yml)) | +| `yarn deps:update --dep dev` | Apply possible updates (run `yarn install && yarn dedupe` after) | +| `yarn check:install` | Verify if there's no peer-deps missing in packages | +| `yarn dedupe` | Built-in yarn deduplication of the lock file | ## Git message format diff --git a/bench/assert/.eslintignore b/bench/assert/.eslintignore deleted file mode 100644 index 8c1b08d02..000000000 --- a/bench/assert/.eslintignore +++ /dev/null @@ -1,6 +0,0 @@ -dist -out -build -coverage -_release - diff --git a/bench/assert/.eslintrc.cjs b/bench/assert/.eslintrc.cjs deleted file mode 100644 index befd5e9b5..000000000 --- a/bench/assert/.eslintrc.cjs +++ /dev/null @@ -1,47 +0,0 @@ -/** - * Specific eslint rules for this workspace, learn how to compose - * @link https://github.com/belgattitude/perso/tree/main/packages/eslint-config-bases - */ - -// Workaround for https://github.com/eslint/eslint/issues/3458 -require('@belgattitude/eslint-config-bases/patch/modern-module-resolution'); - -const { - getDefaultIgnorePatterns, -} = require('@belgattitude/eslint-config-bases/helpers'); - -module.exports = { - extends: [ - '@belgattitude/eslint-config-bases/typescript', - '@belgattitude/eslint-config-bases/simple-import-sort', - '@belgattitude/eslint-config-bases/sonar', - '@belgattitude/eslint-config-bases/regexp', - '@belgattitude/eslint-config-bases/jest', - '@belgattitude/eslint-config-bases/performance', - - // Apply prettier and disable incompatible rules - '@belgattitude/eslint-config-bases/prettier-plugin', - ], - ignorePatterns: [ - ...getDefaultIgnorePatterns(), - '**/build', - '**/.cache', - '**/dist', - '**/_release', - '.cache', - '**/docs', - ], - overrides: [ - { - files: ['src/**/*.ts'], - rules: {}, - }, - ], - parser: '@typescript-eslint/parser', - parserOptions: { - project: 'tsconfig.json', - tsconfigRootDir: __dirname, - }, - root: true, - rules: {}, -}; diff --git a/bench/assert/.gitignore b/bench/assert/.gitignore deleted file mode 100644 index 2dbff1bf4..000000000 --- a/bench/assert/.gitignore +++ /dev/null @@ -1,37 +0,0 @@ -# dependencies -node_modules -/.pnp -.pnp.js - -# production output -/dist -/build -/out - -# tests -/coverage -/.nyc_output - -# editor -/.idea -.project -.classpath -.c9/ -*.launch -.settings/ -*.sublime-workspace -.vscode/* -!.vscode/settings.json -!.vscode/tasks.json -!.vscode/launch.json -!.vscode/extensions.json - -# os -.DS_Store - -# debug -npm-debug.log* -yarn-debug.log* -yarn-error.log* -lerna-debug.log* - diff --git a/bench/assert/bench/benchmark-results.json b/bench/assert/bench/benchmark-results.json deleted file mode 100644 index 706ed2322..000000000 --- a/bench/assert/bench/benchmark-results.json +++ /dev/null @@ -1,106 +0,0 @@ -{ - "files": [ - { - "filepath": "/home/sebastien/github/httpx/bench/assert/src/main.bench.ts", - "groups": [ - { - "fullName": "src/main.bench.ts > isPlainObject", - "benchmarks": [ - { - "id": "1895279271_0_0", - "sampleCount": 351597, - "name": "@httpx/assert: `isPlainObject(v)`", - "rank": 1, - "rme": 0.041483146163102426, - "totalTime": 500.0013865120709, - "min": 0.00137300044298172, - "max": 0.044540997594594955, - "hz": 703192.050031469, - "period": 0.0014220866119792571, - "mean": 0.0014220866119792571, - "variance": 3.185139714518867e-8, - "sd": 0.00017846959725731628, - "sem": 3.0098278970064616e-7, - "df": 351596, - "critical": 1.96, - "moe": 5.899262678132665e-7, - "p75": 0.0014100000262260437, - "p99": 0.002376001328229904, - "p995": 0.002542998641729355, - "p999": 0.0026690028607845306 - }, - { - "id": "1895279271_0_1", - "sampleCount": 253654, - "name": "@sindresorhus/is: `is.plainObject(v)`", - "rank": 3, - "rme": 0.059455874056027265, - "totalTime": 500.0017051026225, - "min": 0.0018820017576217651, - "max": 0.13113800063729286, - "hz": 507306.26998149726, - "period": 0.0019711958222721603, - "mean": 0.0019711958222721603, - "variance": 9.069401924380675e-8, - "sd": 0.00030115447737632384, - "sem": 5.979549517794933e-7, - "df": 253653, - "critical": 1.96, - "moe": 0.0000011719917054878067, - "p75": 0.0019720010459423065, - "p99": 0.0021730028092861176, - "p995": 0.0027900002896785736, - "p999": 0.0036289989948272705 - }, - { - "id": "1895279271_0_2", - "sampleCount": 341331, - "name": "is-plain-obj: `isPlainObj(v)`", - "rank": 2, - "rme": 0.02483356376002929, - "totalTime": 500.0007661022246, - "min": 0.0014320015907287598, - "max": 0.03036399930715561, - "hz": 682660.954023849, - "period": 0.001464856008104229, - "mean": 0.001464856008104229, - "variance": 1.1757948653429083e-8, - "sd": 0.00010843407514904658, - "sem": 1.855999748801957e-7, - "df": 341330, - "critical": 1.96, - "moe": 3.6377595076518354e-7, - "p75": 0.0014679990708827972, - "p99": 0.0014929994940757751, - "p995": 0.0015009976923465729, - "p999": 0.0023039989173412323 - }, - { - "id": "1895279271_0_3", - "sampleCount": 6027, - "name": "lodash-es: `_.isPlainObject(v)`", - "rank": 4, - "rme": 0.2664562411447772, - "totalTime": 500.0052360482514, - "min": 0.0788080021739006, - "max": 0.33079900220036507, - "hz": 12053.873770670642, - "period": 0.08296088203886699, - "mean": 0.08296088203886699, - "variance": 0.00007666330968425547, - "sd": 0.008755758658406219, - "sem": 0.0001127828815823049, - "df": 6026, - "critical": 1.96, - "moe": 0.00022105444790131759, - "p75": 0.08217500150203705, - "p99": 0.11034799739718437, - "p995": 0.12764700129628181, - "p999": 0.2455960027873516 - } - ] - } - ] - } - ] -} diff --git a/bench/assert/package.json b/bench/assert/package.json deleted file mode 100644 index 774c5b07f..000000000 --- a/bench/assert/package.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "name": "@bench/assert", - "private": true, - "description": "benchmarks for @httpx/assert", - "version": "0.0.0-local", - "license": "MIT", - "author": { - "name": "Vanvelthem SΓ©bastien", - "url": "https://github.com/belgattitude" - }, - "homepage": "https://belgattitude.github.io/httpx/assert", - "repository": { - "type": "git", - "url": "https://github.com/belgattitude/httpx.git", - "directory": "bench/assert" - }, - "sideEffects": false, - "type": "module", - "exports": { - "./package.json": "./package.json" - }, - "scripts": { - "clean": "rimraf ./dist ./build ./coverage ./_release", - "fix-staged": "lint-staged --allow-empty", - "bench-dist": "vitest bench --run", - "tinybench": "tsx ./src/benchmarks.ts", - "lint-disabled": "eslint . --ext .ts,.tsx,.js,.jsx,.mjs,.cjs,.mts,.cts", - "typecheck-disabled": "tsc --project tsconfig.json --noEmit" - }, - "dependencies": { - "@httpx/assert": "workspace:^" - }, - "devDependencies": { - "@belgattitude/eslint-config-bases": "5.9.0", - "@sindresorhus/is": "6.3.1", - "@types/lodash-es": "4.17.12", - "cross-env": "7.0.3", - "esbuild": "0.21.3", - "eslint": "8.57.0", - "is-plain-obj": "4.1.0", - "lodash-es": "4.17.21", - "moderndash": "3.12.0", - "rimraf": "5.0.7", - "tinybench": "2.8.0", - "tsx": "4.11.0", - "type-fest": "4.18.2", - "typescript": "5.4.5", - "vite": "5.2.11", - "vite-tsconfig-paths": "4.3.2", - "vitest": "1.6.0" - }, - "engines": { - "node": ">=18" - } -} diff --git a/bench/assert/src/benchmarks.ts b/bench/assert/src/benchmarks.ts deleted file mode 100644 index a9ca07793..000000000 --- a/bench/assert/src/benchmarks.ts +++ /dev/null @@ -1,35 +0,0 @@ -// import { isPlainObject } from '../dist/index.mjs'; -import { isPlainObject } from '@httpx/assert'; -import is from '@sindresorhus/is'; -import { Bench } from 'tinybench'; - -const bench = new Bench({ time: 1000 }); - -const realLifeScenarios = [ - ...Array.from({ length: 70 }).map((_) => ({ a: Math.random() })), - ...Array.from({ length: 10 }).fill(new Map()), - ...Array.from({ length: 5 }).fill(null), - // eslint-disable-next-line unicorn/no-useless-undefined - ...Array.from({ length: 5 }).fill(undefined), - ...Array.from({ length: 10 }).fill('str'), -]; -const { plainObject } = is; -bench - .add('@httpx/assert (isPlainObject)', () => { - realLifeScenarios.forEach((value) => isPlainObject(value)); - }) - .add('@sindresorhus/is (is.plainObject(v))', async () => { - realLifeScenarios.forEach((value) => is.plainObject(value)); - }) - .add( - '@sindresorhus/is (const { plainObject } = is; plainObject(v))', - async () => { - realLifeScenarios.forEach((value) => plainObject(value)); - } - ) - .todo('unimplemented bench'); - -await bench.warmup(); // make results more reliable, ref: https://github.com/tinylibs/tinybench/pull/50 -await bench.run(); - -console.table(bench.table()); diff --git a/bench/assert/tsconfig.json b/bench/assert/tsconfig.json deleted file mode 100644 index fb5a68298..000000000 --- a/bench/assert/tsconfig.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "$schema": "https://json.schemastore.org/tsconfig", - "extends": "../../tsconfig.base.json", - "compilerOptions": { - "target": "esnext", - "module": "esnext", - "moduleResolution": "Bundler", - "verbatimModuleSyntax": true, - "strict": true, - "paths": {}, - "types": ["vitest/globals"] - }, - "exclude": ["**/node_modules", "**/.*/*", "dist", "coverage"], - "include": [ - ".eslintrc.*", - "**/*.ts", - "**/*.tsx", - "**/*.js", - "**/*.jsx", - "**/*.cjs", - "**/*.mjs", - "**/*.json" - ] -} diff --git a/bench/assert/vitest.config.ts b/bench/assert/vitest.config.ts deleted file mode 100644 index 2b2f5c748..000000000 --- a/bench/assert/vitest.config.ts +++ /dev/null @@ -1,37 +0,0 @@ -import tsconfigPaths from 'vite-tsconfig-paths'; -import { defineConfig } from 'vitest/config'; - -const testFiles = ['./src/**/*.test.{js,ts}', './test/**/*.test.{js,ts}']; - -export default defineConfig({ - esbuild: { - target: ['node20'], - }, - plugins: [tsconfigPaths()], - test: { - pool: 'forks', - deps: { - optimizer: { - web: { - enabled: false, - }, - ssr: { - enabled: false, - }, - }, - }, - benchmark: { - reporters: ['default'], - outputJson: './bench/benchmark-results.json', - }, - environment: 'node', - exclude: [ - '**/node_modules/**', - 'dist/**', - '**/coverage/**', - '**/.{idea,git,cache,output,temp}/**', - ], - globals: false, - include: testFiles, - }, -}); diff --git a/docs/src/pages/assert/index.mdx b/docs/src/pages/assert/index.mdx index cd7d9f638..f85bfd7af 100644 --- a/docs/src/pages/assert/index.mdx +++ b/docs/src/pages/assert/index.mdx @@ -189,19 +189,47 @@ switch(state) { #### isPlainObject +#### isPlainObject | Name | Type | Comment | |-------------------------|------------------|---------| | isPlainObject\ | `PlainObject` | | | assertPlainObject\ | `PlainObject` | | +> Inspired and compatible with [is-plain-obj](https://github.com/sindresorhus/is-plain-obj). Check the [test file](https://github.com/belgattitude/httpx/blob/main/packages/assert/src/__tests__/object.guards.test.ts) + ```typescript + import { isPlainObject, assertPlainObject } from '@httpx/assert'; // Simple case: without generic value -isPlainObject({cwol: true}); // πŸ‘ˆ true -isPlainObject(new Promise()); // πŸ‘ˆ false -assertPlainObject({}); +isPlainObject({ }); // πŸ‘ˆ βœ… true +isPlainObject({ key: 'value' }); // πŸ‘ˆ βœ… true +isPlainObject({ key: new Date() }); // πŸ‘ˆ βœ… true +isPlainObject(new Object()); // πŸ‘ˆ βœ… true +isPlainObject(Object.create(null)); // πŸ‘ˆ βœ… true +isPlainObject({nested: { key: true} }); // πŸ‘ˆ βœ… true + +class Test { }; + +isPlainObject(new Test()) // πŸ‘ˆ ❌ false +isPlainObject(10); // πŸ‘ˆ ❌ false +isPlainObject(null); // πŸ‘ˆ ❌ false +isPlainObject('hello'); // πŸ‘ˆ ❌ false +isPlainObject([]); // πŸ‘ˆ ❌ false +isPlainObject(new Date()); // πŸ‘ˆ ❌ false +isPlainObject(Math); // πŸ‘ˆ ❌ false +// (... see test file) + +assertPlainObject({}) // πŸ‘ˆ βœ… true + +``` + +#### Usage with generic + +```typescript + +import { isPlainObject, assertPlainObject } from '@httpx/assert'; // With generic value (unchecked at runtime!) type CustomType = { @@ -219,8 +247,11 @@ const value = { if (isPlainObject(value)) { // Notice it's a deep partial to allow autocompletion - value?.deep?.yes; // πŸ‘ˆ yes will be unknown to reflect that not runtime check was done + value?.deep?.yes; // πŸ‘ˆ yes will be unknown to reflect that no runtime check was done } + +assertPlainObject(value); + ``` ### Number related diff --git a/examples/nextjs-app/package.json b/examples/nextjs-app/package.json index 2067e92c6..0c6941080 100644 --- a/examples/nextjs-app/package.json +++ b/examples/nextjs-app/package.json @@ -22,7 +22,7 @@ "@httpx/assert": "workspace:^", "@httpx/dsn-parser": "workspace:^", "@httpx/exception": "workspace:^", - "axios": "1.6.8", + "axios": "1.7.2", "ky": "1.2.4", "next": "14.2.3", "pino": "9.1.0", @@ -32,11 +32,11 @@ "zod": "3.23.8" }, "devDependencies": { - "@belgattitude/eslint-config-bases": "5.8.0", + "@belgattitude/eslint-config-bases": "5.9.0", "@types/node": "20.12.12", - "@types/react": "18.3.2", + "@types/react": "18.3.3", "@types/react-dom": "18.3.0", - "@vitejs/plugin-react-swc": "3.6.0", + "@vitejs/plugin-react-swc": "3.7.0", "@vitest/coverage-v8": "1.6.0", "@vitest/ui": "1.6.0", "cross-env": "7.0.3", diff --git a/nx.json b/nx.json index 872a6b236..a63851340 100644 --- a/nx.json +++ b/nx.json @@ -53,8 +53,8 @@ "outputs": ["{workspaceRoot}/.cache/eslint/*.eslintcache"], "cache": true }, - "bench-dist": { - "dependsOn": ["bench-dist"], + "bench": { + "dependsOn": ["^build", "^bench"], "inputs": ["default", "^public"], "outputs": [], "cache": false diff --git a/package.json b/package.json index f9a87389b..97ca8ce30 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "repository": "belgattitude/httpx", "scripts": { "g:clean": "yarn clean:global-cache && yarn workspaces foreach --all -pv run clean", - "g:bench-dist": "yarn nx run-many --output-style=static --target=bench-dist --exclude='examples/**' --exclude='docs'", + "g:bench": "yarn nx run-many --output-style=static --target=bench --exclude='examples/**' --exclude='docs'", "g:build": "yarn nx affected --output-style=static --target=build --exclude='examples/**' --exclude='docs'", "g:build-release": "yarn workspaces foreach -tv --worktree --from 'packages/*' run build-release", "g:build-packages": "yarn workspaces foreach -tv --worktree --from 'packages/*' run build", @@ -45,7 +45,6 @@ "prettier:format": "prettier --config .prettierrc.js --cache --cache-location=\".cache/prettier/monorepo.prettiercache\" --ignore-path .prettierignore \"**/*.{js,cjs,mjs,ts,mts,md,mdx,json}\" --write" }, "workspaces": [ - "bench/*", "docs", "examples/*", "integrations/*", @@ -66,7 +65,7 @@ "is-ci": "3.0.1", "lint-staged": "15.2.4", "npm-run-all2": "6.2.0", - "nx": "19.0.7", + "nx": "19.0.8", "prettier": "3.2.5", "rimraf": "5.0.7", "rollup": "4.18.0", diff --git a/packages/assert/.eslintrc.cjs b/packages/assert/.eslintrc.cjs index c491dc10f..3efcc1b62 100644 --- a/packages/assert/.eslintrc.cjs +++ b/packages/assert/.eslintrc.cjs @@ -33,6 +33,14 @@ module.exports = { '**/docs', ], overrides: [ + { + files: ['bench/**/*.bench.ts'], + rules: { + '@typescript-eslint/no-unsafe-assignment': 'off', + '@typescript-eslint/no-unsafe-return': 'off', + '@typescript-eslint/no-unsafe-member-access': 'off', + }, + }, { files: ['src/**/*.ts'], rules: { diff --git a/packages/assert/README.md b/packages/assert/README.md index 49ad5f463..b7f34cdbb 100644 --- a/packages/assert/README.md +++ b/packages/assert/README.md @@ -176,14 +176,39 @@ switch(state) { | isPlainObject\ | `PlainObject` | | | assertPlainObject\ | `PlainObject` | | +> Inspired and compatible with [is-plain-obj](https://github.com/sindresorhus/is-plain-obj). Check the [test file](https://github.com/belgattitude/httpx/blob/main/packages/assert/src/__tests__/object.guards.test.ts) + ```typescript import { isPlainObject, assertPlainObject } from '@httpx/assert'; // Simple case: without generic value -isPlainObject({cwol: true}); // πŸ‘ˆ true -isPlainObject(new Promise()); // πŸ‘ˆ false -assertPlainObject({}); +isPlainObject({ }); // πŸ‘ˆ βœ… true +isPlainObject({ key: 'value' }); // πŸ‘ˆ βœ… true +isPlainObject({ key: new Date() }); // πŸ‘ˆ βœ… true +isPlainObject(new Object()); // πŸ‘ˆ βœ… true +isPlainObject(Object.create(null)); // πŸ‘ˆ βœ… true +isPlainObject({nested: { key: true} }); // πŸ‘ˆ βœ… true + +class Test { }; + +isPlainObject(new Test()) // πŸ‘ˆ ❌ false +isPlainObject(10); // πŸ‘ˆ ❌ false +isPlainObject(null); // πŸ‘ˆ ❌ false +isPlainObject('hello'); // πŸ‘ˆ ❌ false +isPlainObject([]); // πŸ‘ˆ ❌ false +isPlainObject(new Date()); // πŸ‘ˆ ❌ false +isPlainObject(Math); // πŸ‘ˆ ❌ false +// (... see test file) + +assertPlainObject({}) // πŸ‘ˆ βœ… true + +``` + +#### Usage with generic + +```typescript +import { isPlainObject, assertPlainObject } from '@httpx/assert'; // With generic value (unchecked at runtime!) type CustomType = { @@ -203,6 +228,8 @@ if (isPlainObject(value)) { // Notice it's a deep partial to allow autocompletion value?.deep?.yes; // πŸ‘ˆ yes will be unknown to reflect that no runtime check was done } + +assertPlainObject(value); ``` ### Number related diff --git a/packages/assert/bench/README.md b/packages/assert/bench/README.md new file mode 100644 index 000000000..fb07a2030 --- /dev/null +++ b/packages/assert/bench/README.md @@ -0,0 +1,40 @@ +## @httpx/assert benchmarks + +Benchmarks to measure [@httpx/assert](../../packages/assert/README.md) performance over +popular libraries. + + +### Run + +```bash +yarn install +cd packages/assert +yarn build +yarn bench +``` + +### Example + +#### isPlainObject + +See the [source](./comparative.bench.ts). + +``` +RUN v1.6.0 /home/sebastien/github/httpx/packages/assert + + βœ“ bench/comparative.bench.ts (4) 3144ms + βœ“ isPlainObject (4) 3142ms + name hz min max mean p75 p99 p995 p999 rme samples + Β· @httpx/assert: `isPlainObject(v)` 714,543.46 0.0014 0.2664 0.0014 0.0014 0.0014 0.0015 0.0024 Β±0.11% 357272 fastest + Β· is-plain-obj: `isPlainObj(v)` 656,190.24 0.0014 0.0359 0.0015 0.0015 0.0027 0.0033 0.0066 Β±0.09% 328096 + Β· @sindresorhus/is: `is.plainObject(v)` 516,388.64 0.0018 0.0246 0.0019 0.0020 0.0021 0.0022 0.0033 Β±0.04% 258195 + Β· lodash-es: `_.isPlainObject(v)` 11,986.22 0.0799 0.3059 0.0834 0.0833 0.0930 0.0966 0.2284 Β±0.20% 5994 slowest + + + BENCH Summary + + @httpx/assert: `isPlainObject(v)` - bench/comparative.bench.ts > isPlainObject + 1.09x faster than is-plain-obj: `isPlainObj(v)` + 1.38x faster than @sindresorhus/is: `is.plainObject(v)` + 59.61x faster than lodash-es: `_.isPlainObject(v)` +``` \ No newline at end of file diff --git a/bench/assert/src/main.bench.ts b/packages/assert/bench/comparative.bench.ts similarity index 71% rename from bench/assert/src/main.bench.ts rename to packages/assert/bench/comparative.bench.ts index c9fa6fb9f..95b92ca75 100644 --- a/bench/assert/src/main.bench.ts +++ b/packages/assert/bench/comparative.bench.ts @@ -10,43 +10,41 @@ describe('isPlainObject', async () => { ...Array.from({ length: 10 }).fill('str'), ]; - const httpxIsPlainObject = await import('@httpx/assert').then( - (mod) => mod.isPlainObject - ); + // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore to apply benchmarks assert must be built + const httpxIsPlainObject: (_v) => boolean = await import('@httpx/assert') + .then((mod) => mod.isPlainObject) + .catch((_e) => { + throw new Error( + 'Comparative benchmarks requires httpx/assert to be built (yarn build)' + ); + }); const is = await import('@sindresorhus/is').then((mod) => mod.default); const isPlainObj = await import('is-plain-obj').then((mod) => mod.default); const lodash = await import('lodash-es').then((mod) => mod.default); - const moderndash = await import('moderndash').then( - (mod) => mod.isPlainObject - ); - bench('@httpx/assert: `isPlainObject(v)`', () => { + bench('@httpx/assert: `isPlainObject(v)`', () => { for (const value of realLifeScenarios) { const _v8 = httpxIsPlainObject(value); } }); - bench('@sindresorhus/is: `is.plainObject(v)`', () => { - for (const value of realLifeScenarios) { - const _v8 = is.plainObject(value); - } - }); - bench('is-plain-obj: `isPlainObj(v)`', () => { for (const value of realLifeScenarios) { const _v8 = isPlainObj(value); } }); - bench('lodash-es: `_.isPlainObject(v)`', () => { + bench('@sindresorhus/is: `is.plainObject(v)`', () => { for (const value of realLifeScenarios) { - const _v8 = lodash.isPlainObject(value); + const _v8 = is.plainObject(value); } }); - bench.skip('(not compliant !) moderndash: `isPlainObject(v)`', () => { + bench('lodash-es: `_.isPlainObject(v)`', () => { for (const value of realLifeScenarios) { - const _v8 = moderndash(value); + const _v8 = lodash.isPlainObject(value); } }); }); diff --git a/packages/assert/bench/output/benchmark-results.json b/packages/assert/bench/output/benchmark-results.json new file mode 100644 index 000000000..a2877e80e --- /dev/null +++ b/packages/assert/bench/output/benchmark-results.json @@ -0,0 +1,106 @@ +{ + "files": [ + { + "filepath": "/home/sebastien/github/httpx/packages/assert/bench/comparative.bench.ts", + "groups": [ + { + "fullName": "bench/comparative.bench.ts > isPlainObject", + "benchmarks": [ + { + "id": "-524832507_0_0", + "sampleCount": 343510, + "name": "@httpx/assert: `isPlainObject(v)`", + "rank": 1, + "rme": 0.09152906134795517, + "totalTime": 500.00063578411937, + "min": 0.0013350006192922592, + "max": 0.09234399907290936, + "hz": 687019.1264082994, + "period": 0.0014555635521065454, + "mean": 0.0014555635521065454, + "variance": 1.5871121018532514e-7, + "sd": 0.0003983857555000243, + "sem": 6.797263553908548e-7, + "df": 343509, + "critical": 1.96, + "moe": 0.0000013322636565660753, + "p75": 0.0014079995453357697, + "p99": 0.0026079993695020676, + "p995": 0.0031519997864961624, + "p999": 0.006294999271631241 + }, + { + "id": "-524832507_0_1", + "sampleCount": 339605, + "name": "is-plain-obj: `isPlainObj(v)`", + "rank": 2, + "rme": 0.03239878480859276, + "totalTime": 500.0008005835116, + "min": 0.0014009997248649597, + "max": 0.023360999301075935, + "hz": 679208.9124730875, + "period": 0.0014723010573563745, + "mean": 0.0014723010573563745, + "variance": 2.0114656643e-8, + "sd": 0.0001418261493625206, + "sem": 2.4337125066710597e-7, + "df": 339604, + "critical": 1.96, + "moe": 4.770076513075277e-7, + "p75": 0.0014730002731084824, + "p99": 0.0018360000103712082, + "p995": 0.0022630002349615097, + "p999": 0.002547001466155052 + }, + { + "id": "-524832507_0_2", + "sampleCount": 237565, + "name": "@sindresorhus/is: `is.plainObject(v)`", + "rank": 3, + "rme": 0.10427009217176544, + "totalTime": 500.0013849865645, + "min": 0.001847999170422554, + "max": 0.029186999425292015, + "hz": 475128.6839063128, + "period": 0.002104692968183716, + "mean": 0.002104692968183716, + "variance": 2.9782923746705974e-7, + "sd": 0.0005457373337669503, + "sem": 0.0000011196761723764422, + "df": 237564, + "critical": 1.96, + "moe": 0.0000021945652978578266, + "p75": 0.002088000997900963, + "p99": 0.004065999761223793, + "p995": 0.004605000838637352, + "p999": 0.009328000247478485 + }, + { + "id": "-524832507_0_3", + "sampleCount": 6097, + "name": "lodash-es: `_.isPlainObject(v)`", + "rank": 4, + "rme": 0.21391102132703346, + "totalTime": 500.055477976799, + "min": 0.07876300066709518, + "max": 0.2980220001190901, + "hz": 12192.647153208232, + "period": 0.08201664391943563, + "mean": 0.08201664391943563, + "variance": 0.00004885110179079612, + "sd": 0.006989356321636215, + "sem": 0.00008951155136031685, + "df": 6096, + "critical": 1.96, + "moe": 0.00017544264066622102, + "p75": 0.0826909989118576, + "p99": 0.09366600029170513, + "p995": 0.09732099995017052, + "p999": 0.2199339997023344 + } + ] + } + ] + } + ] +} diff --git a/packages/assert/docs/api/README.md b/packages/assert/docs/api/README.md index af097d544..fd4cb651d 100644 --- a/packages/assert/docs/api/README.md +++ b/packages/assert/docs/api/README.md @@ -1,8 +1,8 @@ -**@httpx/assert v0.10.2** β€’ **Docs** +**@httpx/assert v0.11.0** β€’ **Docs** *** -# @httpx/assert v0.10.2 +# @httpx/assert v0.11.0 ## Modules @@ -25,6 +25,7 @@ - [number.types](number.types/README.md) - [object.asserts](object.asserts/README.md) - [object.guards](object.guards/README.md) +- [object.internal.types](object.internal.types/README.md) - [object.types](object.types/README.md) - [string.asserts](string.asserts/README.md) - [string.guards](string.guards/README.md) diff --git a/packages/assert/docs/api/array.asserts/README.md b/packages/assert/docs/api/array.asserts/README.md index 7d9fa450c..33b45c04c 100644 --- a/packages/assert/docs/api/array.asserts/README.md +++ b/packages/assert/docs/api/array.asserts/README.md @@ -1,8 +1,8 @@ -[**@httpx/assert v0.10.2**](../README.md) β€’ **Docs** +[**@httpx/assert v0.11.0**](../README.md) β€’ **Docs** *** -[@httpx/assert v0.10.2](../README.md) / array.asserts +[@httpx/assert v0.11.0](../README.md) / array.asserts # array.asserts diff --git a/packages/assert/docs/api/array.asserts/functions/assertArrayNonEmpty.md b/packages/assert/docs/api/array.asserts/functions/assertArrayNonEmpty.md index e707dec08..f94b549e1 100644 --- a/packages/assert/docs/api/array.asserts/functions/assertArrayNonEmpty.md +++ b/packages/assert/docs/api/array.asserts/functions/assertArrayNonEmpty.md @@ -1,8 +1,8 @@ -[**@httpx/assert v0.10.2**](../../README.md) β€’ **Docs** +[**@httpx/assert v0.11.0**](../../README.md) β€’ **Docs** *** -[@httpx/assert v0.10.2](../../README.md) / [array.asserts](../README.md) / assertArrayNonEmpty +[@httpx/assert v0.11.0](../../README.md) / [array.asserts](../README.md) / assertArrayNonEmpty # Function: assertArrayNonEmpty() @@ -30,4 +30,4 @@ TypeError ## Source -[array.asserts.ts:10](https://github.com/belgattitude/httpx/blob/9872a04f73c192beff5f4b4d63a156ff5269c00c/packages/assert/src/array.asserts.ts#L10) +[array.asserts.ts:10](https://github.com/belgattitude/httpx/blob/87fb49862cf7e06acc8e0c35f7b115413ff3c6fe/packages/assert/src/array.asserts.ts#L10) diff --git a/packages/assert/docs/api/array.guards/README.md b/packages/assert/docs/api/array.guards/README.md index ee252db9a..bf348be56 100644 --- a/packages/assert/docs/api/array.guards/README.md +++ b/packages/assert/docs/api/array.guards/README.md @@ -1,8 +1,8 @@ -[**@httpx/assert v0.10.2**](../README.md) β€’ **Docs** +[**@httpx/assert v0.11.0**](../README.md) β€’ **Docs** *** -[@httpx/assert v0.10.2](../README.md) / array.guards +[@httpx/assert v0.11.0](../README.md) / array.guards # array.guards diff --git a/packages/assert/docs/api/array.guards/functions/isArrayNonEmpty.md b/packages/assert/docs/api/array.guards/functions/isArrayNonEmpty.md index b56ff2c48..1f8109a44 100644 --- a/packages/assert/docs/api/array.guards/functions/isArrayNonEmpty.md +++ b/packages/assert/docs/api/array.guards/functions/isArrayNonEmpty.md @@ -1,8 +1,8 @@ -[**@httpx/assert v0.10.2**](../../README.md) β€’ **Docs** +[**@httpx/assert v0.11.0**](../../README.md) β€’ **Docs** *** -[@httpx/assert v0.10.2](../../README.md) / [array.guards](../README.md) / isArrayNonEmpty +[@httpx/assert v0.11.0](../../README.md) / [array.guards](../README.md) / isArrayNonEmpty # Function: isArrayNonEmpty() @@ -22,4 +22,4 @@ ## Source -[array.guards.ts:3](https://github.com/belgattitude/httpx/blob/9872a04f73c192beff5f4b4d63a156ff5269c00c/packages/assert/src/array.guards.ts#L3) +[array.guards.ts:3](https://github.com/belgattitude/httpx/blob/87fb49862cf7e06acc8e0c35f7b115413ff3c6fe/packages/assert/src/array.guards.ts#L3) diff --git a/packages/assert/docs/api/array.types/README.md b/packages/assert/docs/api/array.types/README.md index add4f4776..55c8b6f62 100644 --- a/packages/assert/docs/api/array.types/README.md +++ b/packages/assert/docs/api/array.types/README.md @@ -1,8 +1,8 @@ -[**@httpx/assert v0.10.2**](../README.md) β€’ **Docs** +[**@httpx/assert v0.11.0**](../README.md) β€’ **Docs** *** -[@httpx/assert v0.10.2](../README.md) / array.types +[@httpx/assert v0.11.0](../README.md) / array.types # array.types diff --git a/packages/assert/docs/api/array.types/type-aliases/ArrayNonEmpty.md b/packages/assert/docs/api/array.types/type-aliases/ArrayNonEmpty.md index 27043aac7..d51ba48c0 100644 --- a/packages/assert/docs/api/array.types/type-aliases/ArrayNonEmpty.md +++ b/packages/assert/docs/api/array.types/type-aliases/ArrayNonEmpty.md @@ -1,8 +1,8 @@ -[**@httpx/assert v0.10.2**](../../README.md) β€’ **Docs** +[**@httpx/assert v0.11.0**](../../README.md) β€’ **Docs** *** -[@httpx/assert v0.10.2](../../README.md) / [array.types](../README.md) / ArrayNonEmpty +[@httpx/assert v0.11.0](../../README.md) / [array.types](../README.md) / ArrayNonEmpty # Type alias: ArrayNonEmpty\ @@ -14,4 +14,4 @@ ## Source -[array.types.ts:1](https://github.com/belgattitude/httpx/blob/9872a04f73c192beff5f4b4d63a156ff5269c00c/packages/assert/src/array.types.ts#L1) +[array.types.ts:1](https://github.com/belgattitude/httpx/blob/87fb49862cf7e06acc8e0c35f7b115413ff3c6fe/packages/assert/src/array.types.ts#L1) diff --git a/packages/assert/docs/api/barcode.asserts/README.md b/packages/assert/docs/api/barcode.asserts/README.md index 0cb908176..4cdae3a44 100644 --- a/packages/assert/docs/api/barcode.asserts/README.md +++ b/packages/assert/docs/api/barcode.asserts/README.md @@ -1,8 +1,8 @@ -[**@httpx/assert v0.10.2**](../README.md) β€’ **Docs** +[**@httpx/assert v0.11.0**](../README.md) β€’ **Docs** *** -[@httpx/assert v0.10.2](../README.md) / barcode.asserts +[@httpx/assert v0.11.0](../README.md) / barcode.asserts # barcode.asserts diff --git a/packages/assert/docs/api/barcode.asserts/functions/assertEan13.md b/packages/assert/docs/api/barcode.asserts/functions/assertEan13.md index 013ac330e..06b95bf13 100644 --- a/packages/assert/docs/api/barcode.asserts/functions/assertEan13.md +++ b/packages/assert/docs/api/barcode.asserts/functions/assertEan13.md @@ -1,8 +1,8 @@ -[**@httpx/assert v0.10.2**](../../README.md) β€’ **Docs** +[**@httpx/assert v0.11.0**](../../README.md) β€’ **Docs** *** -[@httpx/assert v0.10.2](../../README.md) / [barcode.asserts](../README.md) / assertEan13 +[@httpx/assert v0.11.0](../../README.md) / [barcode.asserts](../README.md) / assertEan13 # Function: assertEan13() @@ -26,4 +26,4 @@ TypeError ## Source -[barcode.asserts.ts:10](https://github.com/belgattitude/httpx/blob/9872a04f73c192beff5f4b4d63a156ff5269c00c/packages/assert/src/barcode.asserts.ts#L10) +[barcode.asserts.ts:10](https://github.com/belgattitude/httpx/blob/87fb49862cf7e06acc8e0c35f7b115413ff3c6fe/packages/assert/src/barcode.asserts.ts#L10) diff --git a/packages/assert/docs/api/barcode.guards/README.md b/packages/assert/docs/api/barcode.guards/README.md index f49badd70..abeb9c374 100644 --- a/packages/assert/docs/api/barcode.guards/README.md +++ b/packages/assert/docs/api/barcode.guards/README.md @@ -1,8 +1,8 @@ -[**@httpx/assert v0.10.2**](../README.md) β€’ **Docs** +[**@httpx/assert v0.11.0**](../README.md) β€’ **Docs** *** -[@httpx/assert v0.10.2](../README.md) / barcode.guards +[@httpx/assert v0.11.0](../README.md) / barcode.guards # barcode.guards diff --git a/packages/assert/docs/api/barcode.guards/functions/isEan13.md b/packages/assert/docs/api/barcode.guards/functions/isEan13.md index abbbefa8e..99f093cf9 100644 --- a/packages/assert/docs/api/barcode.guards/functions/isEan13.md +++ b/packages/assert/docs/api/barcode.guards/functions/isEan13.md @@ -1,8 +1,8 @@ -[**@httpx/assert v0.10.2**](../../README.md) β€’ **Docs** +[**@httpx/assert v0.11.0**](../../README.md) β€’ **Docs** *** -[@httpx/assert v0.10.2](../../README.md) / [barcode.guards](../README.md) / isEan13 +[@httpx/assert v0.11.0](../../README.md) / [barcode.guards](../README.md) / isEan13 # Function: isEan13() @@ -18,4 +18,4 @@ ## Source -[barcode.guards.ts:3](https://github.com/belgattitude/httpx/blob/9872a04f73c192beff5f4b4d63a156ff5269c00c/packages/assert/src/barcode.guards.ts#L3) +[barcode.guards.ts:3](https://github.com/belgattitude/httpx/blob/87fb49862cf7e06acc8e0c35f7b115413ff3c6fe/packages/assert/src/barcode.guards.ts#L3) diff --git a/packages/assert/docs/api/barcode.types/README.md b/packages/assert/docs/api/barcode.types/README.md index 4573b9099..3546f7aeb 100644 --- a/packages/assert/docs/api/barcode.types/README.md +++ b/packages/assert/docs/api/barcode.types/README.md @@ -1,8 +1,8 @@ -[**@httpx/assert v0.10.2**](../README.md) β€’ **Docs** +[**@httpx/assert v0.11.0**](../README.md) β€’ **Docs** *** -[@httpx/assert v0.10.2](../README.md) / barcode.types +[@httpx/assert v0.11.0](../README.md) / barcode.types # barcode.types diff --git a/packages/assert/docs/api/barcode.types/type-aliases/Ean13.md b/packages/assert/docs/api/barcode.types/type-aliases/Ean13.md index 2acff2107..4ec55af5c 100644 --- a/packages/assert/docs/api/barcode.types/type-aliases/Ean13.md +++ b/packages/assert/docs/api/barcode.types/type-aliases/Ean13.md @@ -1,8 +1,8 @@ -[**@httpx/assert v0.10.2**](../../README.md) β€’ **Docs** +[**@httpx/assert v0.11.0**](../../README.md) β€’ **Docs** *** -[@httpx/assert v0.10.2](../../README.md) / [barcode.types](../README.md) / Ean13 +[@httpx/assert v0.11.0](../../README.md) / [barcode.types](../README.md) / Ean13 # Type alias: Ean13 @@ -10,4 +10,4 @@ ## Source -[barcode.types.ts:3](https://github.com/belgattitude/httpx/blob/9872a04f73c192beff5f4b4d63a156ff5269c00c/packages/assert/src/barcode.types.ts#L3) +[barcode.types.ts:3](https://github.com/belgattitude/httpx/blob/87fb49862cf7e06acc8e0c35f7b115413ff3c6fe/packages/assert/src/barcode.types.ts#L3) diff --git a/packages/assert/docs/api/http.asserts/README.md b/packages/assert/docs/api/http.asserts/README.md index 6bb7979d6..210a6250a 100644 --- a/packages/assert/docs/api/http.asserts/README.md +++ b/packages/assert/docs/api/http.asserts/README.md @@ -1,8 +1,8 @@ -[**@httpx/assert v0.10.2**](../README.md) β€’ **Docs** +[**@httpx/assert v0.11.0**](../README.md) β€’ **Docs** *** -[@httpx/assert v0.10.2](../README.md) / http.asserts +[@httpx/assert v0.11.0](../README.md) / http.asserts # http.asserts diff --git a/packages/assert/docs/api/http.asserts/functions/assertHttpMethod.md b/packages/assert/docs/api/http.asserts/functions/assertHttpMethod.md index ab4f3e915..7ff8ff0ac 100644 --- a/packages/assert/docs/api/http.asserts/functions/assertHttpMethod.md +++ b/packages/assert/docs/api/http.asserts/functions/assertHttpMethod.md @@ -1,8 +1,8 @@ -[**@httpx/assert v0.10.2**](../../README.md) β€’ **Docs** +[**@httpx/assert v0.11.0**](../../README.md) β€’ **Docs** *** -[@httpx/assert v0.10.2](../../README.md) / [http.asserts](../README.md) / assertHttpMethod +[@httpx/assert v0.11.0](../../README.md) / [http.asserts](../README.md) / assertHttpMethod # Function: assertHttpMethod() @@ -30,4 +30,4 @@ TypeError ## Source -[http.asserts.ts:25](https://github.com/belgattitude/httpx/blob/9872a04f73c192beff5f4b4d63a156ff5269c00c/packages/assert/src/http.asserts.ts#L25) +[http.asserts.ts:25](https://github.com/belgattitude/httpx/blob/87fb49862cf7e06acc8e0c35f7b115413ff3c6fe/packages/assert/src/http.asserts.ts#L25) diff --git a/packages/assert/docs/api/http.asserts/functions/assertHttpValidMethod.md b/packages/assert/docs/api/http.asserts/functions/assertHttpValidMethod.md index 8f6fd4fce..814f3c6ec 100644 --- a/packages/assert/docs/api/http.asserts/functions/assertHttpValidMethod.md +++ b/packages/assert/docs/api/http.asserts/functions/assertHttpValidMethod.md @@ -1,8 +1,8 @@ -[**@httpx/assert v0.10.2**](../../README.md) β€’ **Docs** +[**@httpx/assert v0.11.0**](../../README.md) β€’ **Docs** *** -[@httpx/assert v0.10.2](../../README.md) / [http.asserts](../README.md) / assertHttpValidMethod +[@httpx/assert v0.11.0](../../README.md) / [http.asserts](../README.md) / assertHttpValidMethod # Function: assertHttpValidMethod() @@ -26,4 +26,4 @@ TypeError ## Source -[http.asserts.ts:10](https://github.com/belgattitude/httpx/blob/9872a04f73c192beff5f4b4d63a156ff5269c00c/packages/assert/src/http.asserts.ts#L10) +[http.asserts.ts:10](https://github.com/belgattitude/httpx/blob/87fb49862cf7e06acc8e0c35f7b115413ff3c6fe/packages/assert/src/http.asserts.ts#L10) diff --git a/packages/assert/docs/api/http.consts/README.md b/packages/assert/docs/api/http.consts/README.md index e483b45b2..00cf5d1eb 100644 --- a/packages/assert/docs/api/http.consts/README.md +++ b/packages/assert/docs/api/http.consts/README.md @@ -1,8 +1,8 @@ -[**@httpx/assert v0.10.2**](../README.md) β€’ **Docs** +[**@httpx/assert v0.11.0**](../README.md) β€’ **Docs** *** -[@httpx/assert v0.10.2](../README.md) / http.consts +[@httpx/assert v0.11.0](../README.md) / http.consts # http.consts diff --git a/packages/assert/docs/api/http.consts/variables/httpMethods.md b/packages/assert/docs/api/http.consts/variables/httpMethods.md index 2b7e98d38..6c3aacfed 100644 --- a/packages/assert/docs/api/http.consts/variables/httpMethods.md +++ b/packages/assert/docs/api/http.consts/variables/httpMethods.md @@ -1,8 +1,8 @@ -[**@httpx/assert v0.10.2**](../../README.md) β€’ **Docs** +[**@httpx/assert v0.11.0**](../../README.md) β€’ **Docs** *** -[@httpx/assert v0.10.2](../../README.md) / [http.consts](../README.md) / httpMethods +[@httpx/assert v0.11.0](../../README.md) / [http.consts](../README.md) / httpMethods # Variable: httpMethods @@ -10,4 +10,4 @@ ## Source -[http.consts.ts:1](https://github.com/belgattitude/httpx/blob/9872a04f73c192beff5f4b4d63a156ff5269c00c/packages/assert/src/http.consts.ts#L1) +[http.consts.ts:1](https://github.com/belgattitude/httpx/blob/87fb49862cf7e06acc8e0c35f7b115413ff3c6fe/packages/assert/src/http.consts.ts#L1) diff --git a/packages/assert/docs/api/http.guards/README.md b/packages/assert/docs/api/http.guards/README.md index f8af0e27b..e24120844 100644 --- a/packages/assert/docs/api/http.guards/README.md +++ b/packages/assert/docs/api/http.guards/README.md @@ -1,8 +1,8 @@ -[**@httpx/assert v0.10.2**](../README.md) β€’ **Docs** +[**@httpx/assert v0.11.0**](../README.md) β€’ **Docs** *** -[@httpx/assert v0.10.2](../README.md) / http.guards +[@httpx/assert v0.11.0](../README.md) / http.guards # http.guards diff --git a/packages/assert/docs/api/http.guards/functions/isHttpMethod.md b/packages/assert/docs/api/http.guards/functions/isHttpMethod.md index 0a7d918d8..6291d5d52 100644 --- a/packages/assert/docs/api/http.guards/functions/isHttpMethod.md +++ b/packages/assert/docs/api/http.guards/functions/isHttpMethod.md @@ -1,8 +1,8 @@ -[**@httpx/assert v0.10.2**](../../README.md) β€’ **Docs** +[**@httpx/assert v0.11.0**](../../README.md) β€’ **Docs** *** -[@httpx/assert v0.10.2](../../README.md) / [http.guards](../README.md) / isHttpMethod +[@httpx/assert v0.11.0](../../README.md) / [http.guards](../README.md) / isHttpMethod # Function: isHttpMethod() @@ -24,4 +24,4 @@ ## Source -[http.guards.ts:15](https://github.com/belgattitude/httpx/blob/9872a04f73c192beff5f4b4d63a156ff5269c00c/packages/assert/src/http.guards.ts#L15) +[http.guards.ts:15](https://github.com/belgattitude/httpx/blob/87fb49862cf7e06acc8e0c35f7b115413ff3c6fe/packages/assert/src/http.guards.ts#L15) diff --git a/packages/assert/docs/api/http.guards/functions/isHttpValidMethod.md b/packages/assert/docs/api/http.guards/functions/isHttpValidMethod.md index fe8d57a69..4ac45c352 100644 --- a/packages/assert/docs/api/http.guards/functions/isHttpValidMethod.md +++ b/packages/assert/docs/api/http.guards/functions/isHttpValidMethod.md @@ -1,8 +1,8 @@ -[**@httpx/assert v0.10.2**](../../README.md) β€’ **Docs** +[**@httpx/assert v0.11.0**](../../README.md) β€’ **Docs** *** -[@httpx/assert v0.10.2](../../README.md) / [http.guards](../README.md) / isHttpValidMethod +[@httpx/assert v0.11.0](../../README.md) / [http.guards](../README.md) / isHttpValidMethod # Function: isHttpValidMethod() @@ -21,4 +21,4 @@ a case-insensitive manner. ## Source -[http.guards.ts:8](https://github.com/belgattitude/httpx/blob/9872a04f73c192beff5f4b4d63a156ff5269c00c/packages/assert/src/http.guards.ts#L8) +[http.guards.ts:8](https://github.com/belgattitude/httpx/blob/87fb49862cf7e06acc8e0c35f7b115413ff3c6fe/packages/assert/src/http.guards.ts#L8) diff --git a/packages/assert/docs/api/http.types/README.md b/packages/assert/docs/api/http.types/README.md index fe379979d..586c14772 100644 --- a/packages/assert/docs/api/http.types/README.md +++ b/packages/assert/docs/api/http.types/README.md @@ -1,8 +1,8 @@ -[**@httpx/assert v0.10.2**](../README.md) β€’ **Docs** +[**@httpx/assert v0.11.0**](../README.md) β€’ **Docs** *** -[@httpx/assert v0.10.2](../README.md) / http.types +[@httpx/assert v0.11.0](../README.md) / http.types # http.types diff --git a/packages/assert/docs/api/http.types/type-aliases/HttpMethod.md b/packages/assert/docs/api/http.types/type-aliases/HttpMethod.md index 3e8fb4483..dc442aeec 100644 --- a/packages/assert/docs/api/http.types/type-aliases/HttpMethod.md +++ b/packages/assert/docs/api/http.types/type-aliases/HttpMethod.md @@ -1,8 +1,8 @@ -[**@httpx/assert v0.10.2**](../../README.md) β€’ **Docs** +[**@httpx/assert v0.11.0**](../../README.md) β€’ **Docs** *** -[@httpx/assert v0.10.2](../../README.md) / [http.types](../README.md) / HttpMethod +[@httpx/assert v0.11.0](../../README.md) / [http.types](../README.md) / HttpMethod # Type alias: HttpMethod @@ -10,4 +10,4 @@ ## Source -[http.types.ts:1](https://github.com/belgattitude/httpx/blob/9872a04f73c192beff5f4b4d63a156ff5269c00c/packages/assert/src/http.types.ts#L1) +[http.types.ts:1](https://github.com/belgattitude/httpx/blob/87fb49862cf7e06acc8e0c35f7b115413ff3c6fe/packages/assert/src/http.types.ts#L1) diff --git a/packages/assert/docs/api/index/README.md b/packages/assert/docs/api/index/README.md index 83de713bd..b137f3d70 100644 --- a/packages/assert/docs/api/index/README.md +++ b/packages/assert/docs/api/index/README.md @@ -1,8 +1,8 @@ -[**@httpx/assert v0.10.2**](../README.md) β€’ **Docs** +[**@httpx/assert v0.11.0**](../README.md) β€’ **Docs** *** -[@httpx/assert v0.10.2](../README.md) / index +[@httpx/assert v0.11.0](../README.md) / index # index @@ -56,12 +56,6 @@ Re-exports [PlainObject](../object.types/type-aliases/PlainObject.md) *** -### PlainObjectDeepPartialUnknown - -Re-exports [PlainObjectDeepPartialUnknown](../object.types/type-aliases/PlainObjectDeepPartialUnknown.md) - -*** - ### StringNonEmpty Re-exports [StringNonEmpty](../string.types/type-aliases/StringNonEmpty.md) diff --git a/packages/assert/docs/api/network.asserts/README.md b/packages/assert/docs/api/network.asserts/README.md index c176e2b54..7f770ec23 100644 --- a/packages/assert/docs/api/network.asserts/README.md +++ b/packages/assert/docs/api/network.asserts/README.md @@ -1,8 +1,8 @@ -[**@httpx/assert v0.10.2**](../README.md) β€’ **Docs** +[**@httpx/assert v0.11.0**](../README.md) β€’ **Docs** *** -[@httpx/assert v0.10.2](../README.md) / network.asserts +[@httpx/assert v0.11.0](../README.md) / network.asserts # network.asserts diff --git a/packages/assert/docs/api/network.asserts/functions/assertNetworkPort.md b/packages/assert/docs/api/network.asserts/functions/assertNetworkPort.md index 9db2700c2..08e17c202 100644 --- a/packages/assert/docs/api/network.asserts/functions/assertNetworkPort.md +++ b/packages/assert/docs/api/network.asserts/functions/assertNetworkPort.md @@ -1,8 +1,8 @@ -[**@httpx/assert v0.10.2**](../../README.md) β€’ **Docs** +[**@httpx/assert v0.11.0**](../../README.md) β€’ **Docs** *** -[@httpx/assert v0.10.2](../../README.md) / [network.asserts](../README.md) / assertNetworkPort +[@httpx/assert v0.11.0](../../README.md) / [network.asserts](../README.md) / assertNetworkPort # Function: assertNetworkPort() @@ -24,4 +24,4 @@ TypeError ## Source -[network.asserts.ts:9](https://github.com/belgattitude/httpx/blob/9872a04f73c192beff5f4b4d63a156ff5269c00c/packages/assert/src/network.asserts.ts#L9) +[network.asserts.ts:9](https://github.com/belgattitude/httpx/blob/87fb49862cf7e06acc8e0c35f7b115413ff3c6fe/packages/assert/src/network.asserts.ts#L9) diff --git a/packages/assert/docs/api/network.guards/README.md b/packages/assert/docs/api/network.guards/README.md index 4a9874d79..6b218b7a1 100644 --- a/packages/assert/docs/api/network.guards/README.md +++ b/packages/assert/docs/api/network.guards/README.md @@ -1,8 +1,8 @@ -[**@httpx/assert v0.10.2**](../README.md) β€’ **Docs** +[**@httpx/assert v0.11.0**](../README.md) β€’ **Docs** *** -[@httpx/assert v0.10.2](../README.md) / network.guards +[@httpx/assert v0.11.0](../README.md) / network.guards # network.guards diff --git a/packages/assert/docs/api/network.guards/functions/isNetworkPort.md b/packages/assert/docs/api/network.guards/functions/isNetworkPort.md index da56e0257..fadf0d21e 100644 --- a/packages/assert/docs/api/network.guards/functions/isNetworkPort.md +++ b/packages/assert/docs/api/network.guards/functions/isNetworkPort.md @@ -1,8 +1,8 @@ -[**@httpx/assert v0.10.2**](../../README.md) β€’ **Docs** +[**@httpx/assert v0.11.0**](../../README.md) β€’ **Docs** *** -[@httpx/assert v0.10.2](../../README.md) / [network.guards](../README.md) / isNetworkPort +[@httpx/assert v0.11.0](../../README.md) / [network.guards](../README.md) / isNetworkPort # Function: isNetworkPort() @@ -18,4 +18,4 @@ ## Source -[network.guards.ts:3](https://github.com/belgattitude/httpx/blob/9872a04f73c192beff5f4b4d63a156ff5269c00c/packages/assert/src/network.guards.ts#L3) +[network.guards.ts:3](https://github.com/belgattitude/httpx/blob/87fb49862cf7e06acc8e0c35f7b115413ff3c6fe/packages/assert/src/network.guards.ts#L3) diff --git a/packages/assert/docs/api/network.types/README.md b/packages/assert/docs/api/network.types/README.md index 5859bc505..5ad04f858 100644 --- a/packages/assert/docs/api/network.types/README.md +++ b/packages/assert/docs/api/network.types/README.md @@ -1,8 +1,8 @@ -[**@httpx/assert v0.10.2**](../README.md) β€’ **Docs** +[**@httpx/assert v0.11.0**](../README.md) β€’ **Docs** *** -[@httpx/assert v0.10.2](../README.md) / network.types +[@httpx/assert v0.11.0](../README.md) / network.types # network.types diff --git a/packages/assert/docs/api/network.types/type-aliases/NetworkPort.md b/packages/assert/docs/api/network.types/type-aliases/NetworkPort.md index 17638cebd..8dccf7355 100644 --- a/packages/assert/docs/api/network.types/type-aliases/NetworkPort.md +++ b/packages/assert/docs/api/network.types/type-aliases/NetworkPort.md @@ -1,8 +1,8 @@ -[**@httpx/assert v0.10.2**](../../README.md) β€’ **Docs** +[**@httpx/assert v0.11.0**](../../README.md) β€’ **Docs** *** -[@httpx/assert v0.10.2](../../README.md) / [network.types](../README.md) / NetworkPort +[@httpx/assert v0.11.0](../../README.md) / [network.types](../README.md) / NetworkPort # Type alias: NetworkPort @@ -10,4 +10,4 @@ ## Source -[network.types.ts:3](https://github.com/belgattitude/httpx/blob/9872a04f73c192beff5f4b4d63a156ff5269c00c/packages/assert/src/network.types.ts#L3) +[network.types.ts:3](https://github.com/belgattitude/httpx/blob/87fb49862cf7e06acc8e0c35f7b115413ff3c6fe/packages/assert/src/network.types.ts#L3) diff --git a/packages/assert/docs/api/number.asserts/README.md b/packages/assert/docs/api/number.asserts/README.md index a855ed56b..d815d9753 100644 --- a/packages/assert/docs/api/number.asserts/README.md +++ b/packages/assert/docs/api/number.asserts/README.md @@ -1,8 +1,8 @@ -[**@httpx/assert v0.10.2**](../README.md) β€’ **Docs** +[**@httpx/assert v0.11.0**](../README.md) β€’ **Docs** *** -[@httpx/assert v0.10.2](../README.md) / number.asserts +[@httpx/assert v0.11.0](../README.md) / number.asserts # number.asserts diff --git a/packages/assert/docs/api/number.asserts/functions/assertNumberSafeInt.md b/packages/assert/docs/api/number.asserts/functions/assertNumberSafeInt.md index c861b254e..0c49deb80 100644 --- a/packages/assert/docs/api/number.asserts/functions/assertNumberSafeInt.md +++ b/packages/assert/docs/api/number.asserts/functions/assertNumberSafeInt.md @@ -1,8 +1,8 @@ -[**@httpx/assert v0.10.2**](../../README.md) β€’ **Docs** +[**@httpx/assert v0.11.0**](../../README.md) β€’ **Docs** *** -[@httpx/assert v0.10.2](../../README.md) / [number.asserts](../README.md) / assertNumberSafeInt +[@httpx/assert v0.11.0](../../README.md) / [number.asserts](../README.md) / assertNumberSafeInt # Function: assertNumberSafeInt() @@ -26,4 +26,4 @@ TypeError ## Source -[number.asserts.ts:10](https://github.com/belgattitude/httpx/blob/9872a04f73c192beff5f4b4d63a156ff5269c00c/packages/assert/src/number.asserts.ts#L10) +[number.asserts.ts:10](https://github.com/belgattitude/httpx/blob/87fb49862cf7e06acc8e0c35f7b115413ff3c6fe/packages/assert/src/number.asserts.ts#L10) diff --git a/packages/assert/docs/api/number.guards/README.md b/packages/assert/docs/api/number.guards/README.md index fdbc0c61e..6d7020af0 100644 --- a/packages/assert/docs/api/number.guards/README.md +++ b/packages/assert/docs/api/number.guards/README.md @@ -1,8 +1,8 @@ -[**@httpx/assert v0.10.2**](../README.md) β€’ **Docs** +[**@httpx/assert v0.11.0**](../README.md) β€’ **Docs** *** -[@httpx/assert v0.10.2](../README.md) / number.guards +[@httpx/assert v0.11.0](../README.md) / number.guards # number.guards diff --git a/packages/assert/docs/api/number.guards/functions/isNumberSafeInt.md b/packages/assert/docs/api/number.guards/functions/isNumberSafeInt.md index d5a4b3671..b820d31f2 100644 --- a/packages/assert/docs/api/number.guards/functions/isNumberSafeInt.md +++ b/packages/assert/docs/api/number.guards/functions/isNumberSafeInt.md @@ -1,8 +1,8 @@ -[**@httpx/assert v0.10.2**](../../README.md) β€’ **Docs** +[**@httpx/assert v0.11.0**](../../README.md) β€’ **Docs** *** -[@httpx/assert v0.10.2](../../README.md) / [number.guards](../README.md) / isNumberSafeInt +[@httpx/assert v0.11.0](../../README.md) / [number.guards](../README.md) / isNumberSafeInt # Function: isNumberSafeInt() @@ -18,4 +18,4 @@ ## Source -[number.guards.ts:3](https://github.com/belgattitude/httpx/blob/9872a04f73c192beff5f4b4d63a156ff5269c00c/packages/assert/src/number.guards.ts#L3) +[number.guards.ts:3](https://github.com/belgattitude/httpx/blob/87fb49862cf7e06acc8e0c35f7b115413ff3c6fe/packages/assert/src/number.guards.ts#L3) diff --git a/packages/assert/docs/api/number.types/README.md b/packages/assert/docs/api/number.types/README.md index 61266ab26..8fd92618f 100644 --- a/packages/assert/docs/api/number.types/README.md +++ b/packages/assert/docs/api/number.types/README.md @@ -1,8 +1,8 @@ -[**@httpx/assert v0.10.2**](../README.md) β€’ **Docs** +[**@httpx/assert v0.11.0**](../README.md) β€’ **Docs** *** -[@httpx/assert v0.10.2](../README.md) / number.types +[@httpx/assert v0.11.0](../README.md) / number.types # number.types diff --git a/packages/assert/docs/api/number.types/type-aliases/NumberSafeInt.md b/packages/assert/docs/api/number.types/type-aliases/NumberSafeInt.md index d5740472f..8176e073e 100644 --- a/packages/assert/docs/api/number.types/type-aliases/NumberSafeInt.md +++ b/packages/assert/docs/api/number.types/type-aliases/NumberSafeInt.md @@ -1,8 +1,8 @@ -[**@httpx/assert v0.10.2**](../../README.md) β€’ **Docs** +[**@httpx/assert v0.11.0**](../../README.md) β€’ **Docs** *** -[@httpx/assert v0.10.2](../../README.md) / [number.types](../README.md) / NumberSafeInt +[@httpx/assert v0.11.0](../../README.md) / [number.types](../README.md) / NumberSafeInt # Type alias: NumberSafeInt @@ -10,4 +10,4 @@ ## Source -[number.types.ts:3](https://github.com/belgattitude/httpx/blob/9872a04f73c192beff5f4b4d63a156ff5269c00c/packages/assert/src/number.types.ts#L3) +[number.types.ts:3](https://github.com/belgattitude/httpx/blob/87fb49862cf7e06acc8e0c35f7b115413ff3c6fe/packages/assert/src/number.types.ts#L3) diff --git a/packages/assert/docs/api/object.asserts/README.md b/packages/assert/docs/api/object.asserts/README.md index ba85781ca..13800950d 100644 --- a/packages/assert/docs/api/object.asserts/README.md +++ b/packages/assert/docs/api/object.asserts/README.md @@ -1,8 +1,8 @@ -[**@httpx/assert v0.10.2**](../README.md) β€’ **Docs** +[**@httpx/assert v0.11.0**](../README.md) β€’ **Docs** *** -[@httpx/assert v0.10.2](../README.md) / object.asserts +[@httpx/assert v0.11.0](../README.md) / object.asserts # object.asserts diff --git a/packages/assert/docs/api/object.asserts/functions/assertPlainObject.md b/packages/assert/docs/api/object.asserts/functions/assertPlainObject.md index 1662a19ce..f0d7c263d 100644 --- a/packages/assert/docs/api/object.asserts/functions/assertPlainObject.md +++ b/packages/assert/docs/api/object.asserts/functions/assertPlainObject.md @@ -1,18 +1,18 @@ -[**@httpx/assert v0.10.2**](../../README.md) β€’ **Docs** +[**@httpx/assert v0.11.0**](../../README.md) β€’ **Docs** *** -[@httpx/assert v0.10.2](../../README.md) / [object.asserts](../README.md) / assertPlainObject +[@httpx/assert v0.11.0](../../README.md) / [object.asserts](../README.md) / assertPlainObject # Function: assertPlainObject() -> **assertPlainObject**\<`TValue`\>(`v`, `msgOrErrorFactory`?): `asserts v is PlainObjectDeepPartialUnknown` +> **assertPlainObject**\<`TValue`\>(`v`, `msgOrErrorFactory`?): `asserts v is TValue extends UnspecifiedPlainObjectType ? BasePlainObject : PlainObject` Assert a value is a plain object ## Type parameters -β€’ **TValue** *extends* `Record`\<`string`, `unknown`\> = `Record`\<`string`, `unknown`\> +β€’ **TValue** *extends* `Record`\<`string`, `unknown`\> = [`UnspecifiedPlainObjectType`](../../object.internal.types/type-aliases/UnspecifiedPlainObjectType.md) ## Parameters @@ -22,7 +22,7 @@ Assert a value is a plain object ## Returns -`asserts v is PlainObjectDeepPartialUnknown` +`asserts v is TValue extends UnspecifiedPlainObjectType ? BasePlainObject : PlainObject` ## Throws @@ -30,4 +30,4 @@ TypeError ## Source -[object.asserts.ts:11](https://github.com/belgattitude/httpx/blob/9872a04f73c192beff5f4b4d63a156ff5269c00c/packages/assert/src/object.asserts.ts#L11) +[object.asserts.ts:15](https://github.com/belgattitude/httpx/blob/87fb49862cf7e06acc8e0c35f7b115413ff3c6fe/packages/assert/src/object.asserts.ts#L15) diff --git a/packages/assert/docs/api/object.guards/README.md b/packages/assert/docs/api/object.guards/README.md index 980fdb89d..c3d144c37 100644 --- a/packages/assert/docs/api/object.guards/README.md +++ b/packages/assert/docs/api/object.guards/README.md @@ -1,8 +1,8 @@ -[**@httpx/assert v0.10.2**](../README.md) β€’ **Docs** +[**@httpx/assert v0.11.0**](../README.md) β€’ **Docs** *** -[@httpx/assert v0.10.2](../README.md) / object.guards +[@httpx/assert v0.11.0](../README.md) / object.guards # object.guards diff --git a/packages/assert/docs/api/object.guards/functions/isPlainObject.md b/packages/assert/docs/api/object.guards/functions/isPlainObject.md index 72af1c43e..6dbccf110 100644 --- a/packages/assert/docs/api/object.guards/functions/isPlainObject.md +++ b/packages/assert/docs/api/object.guards/functions/isPlainObject.md @@ -1,16 +1,20 @@ -[**@httpx/assert v0.10.2**](../../README.md) β€’ **Docs** +[**@httpx/assert v0.11.0**](../../README.md) β€’ **Docs** *** -[@httpx/assert v0.10.2](../../README.md) / [object.guards](../README.md) / isPlainObject +[@httpx/assert v0.11.0](../../README.md) / [object.guards](../README.md) / isPlainObject # Function: isPlainObject() -> **isPlainObject**\<`TValue`\>(`v`): `v is PlainObjectDeepPartialUnknown` +> **isPlainObject**\<`TValue`\>(`v`): `v is TValue extends UnspecifiedPlainObjectType ? BasePlainObject : PlainObject` + +Check if a value is a plain object + +An object is plain if it's created by either {}, new Object(), or Object.create(null). ## Type parameters -β€’ **TValue** *extends* `Record`\<`string`, `unknown`\> = `Record`\<`string`, `unknown`\> +β€’ **TValue** *extends* `Record`\<`string`, `unknown`\> = [`UnspecifiedPlainObjectType`](../../object.internal.types/type-aliases/UnspecifiedPlainObjectType.md) ## Parameters @@ -18,8 +22,28 @@ ## Returns -`v is PlainObjectDeepPartialUnknown` +`v is TValue extends UnspecifiedPlainObjectType ? BasePlainObject : PlainObject` + +## Example + +```typescript +isPlainObject({ key: 'value' }); // πŸ‘ˆ βœ… true +isPlainObject({ key: new Date() }); // πŸ‘ˆ βœ… true +isPlainObject(new Object()); // πŸ‘ˆ βœ… true +isPlainObject(Object.create(null)); // πŸ‘ˆ βœ… true +isPlainObject({nested: { key: true} } // πŸ‘ˆ βœ… true + +class Test { }; + +isPlainObject(new Test()) // πŸ‘ˆ ❌ false +isPlainObject(10); // πŸ‘ˆ ❌ false +isPlainObject(null); // πŸ‘ˆ ❌ false +isPlainObject('hello'); // πŸ‘ˆ ❌ false +isPlainObject([]); // πŸ‘ˆ ❌ false +isPlainObject(new Date()); // πŸ‘ˆ ❌ false +isPlainObject(Math); // πŸ‘ˆ ❌ false +(...) ## Source -[object.guards.ts:3](https://github.com/belgattitude/httpx/blob/9872a04f73c192beff5f4b4d63a156ff5269c00c/packages/assert/src/object.guards.ts#L3) +[object.guards.ts:31](https://github.com/belgattitude/httpx/blob/87fb49862cf7e06acc8e0c35f7b115413ff3c6fe/packages/assert/src/object.guards.ts#L31) diff --git a/packages/assert/docs/api/object.internal.types/README.md b/packages/assert/docs/api/object.internal.types/README.md new file mode 100644 index 000000000..a5f0b1eb1 --- /dev/null +++ b/packages/assert/docs/api/object.internal.types/README.md @@ -0,0 +1,16 @@ +[**@httpx/assert v0.11.0**](../README.md) β€’ **Docs** + +*** + +[@httpx/assert v0.11.0](../README.md) / object.internal.types + +# object.internal.types + +## Index + +### Type Aliases + +- [BasePlainObject](type-aliases/BasePlainObject.md) +- [PlainObjectDeepPartialUnknown](type-aliases/PlainObjectDeepPartialUnknown.md) +- [PlainObjectKey](type-aliases/PlainObjectKey.md) +- [UnspecifiedPlainObjectType](type-aliases/UnspecifiedPlainObjectType.md) diff --git a/packages/assert/docs/api/object.internal.types/type-aliases/BasePlainObject.md b/packages/assert/docs/api/object.internal.types/type-aliases/BasePlainObject.md new file mode 100644 index 000000000..c0fcb492c --- /dev/null +++ b/packages/assert/docs/api/object.internal.types/type-aliases/BasePlainObject.md @@ -0,0 +1,13 @@ +[**@httpx/assert v0.11.0**](../../README.md) β€’ **Docs** + +*** + +[@httpx/assert v0.11.0](../../README.md) / [object.internal.types](../README.md) / BasePlainObject + +# Type alias: BasePlainObject + +> **BasePlainObject**: `Record`\<[`PlainObjectKey`](PlainObjectKey.md), `unknown`\> + +## Source + +[object.internal.types.ts:9](https://github.com/belgattitude/httpx/blob/87fb49862cf7e06acc8e0c35f7b115413ff3c6fe/packages/assert/src/object.internal.types.ts#L9) diff --git a/packages/assert/docs/api/object.internal.types/type-aliases/PlainObjectDeepPartialUnknown.md b/packages/assert/docs/api/object.internal.types/type-aliases/PlainObjectDeepPartialUnknown.md new file mode 100644 index 000000000..b48ea02c2 --- /dev/null +++ b/packages/assert/docs/api/object.internal.types/type-aliases/PlainObjectDeepPartialUnknown.md @@ -0,0 +1,17 @@ +[**@httpx/assert v0.11.0**](../../README.md) β€’ **Docs** + +*** + +[@httpx/assert v0.11.0](../../README.md) / [object.internal.types](../README.md) / PlainObjectDeepPartialUnknown + +# Type alias: PlainObjectDeepPartialUnknown\ + +> **PlainObjectDeepPartialUnknown**\<`T`\>: `{ [P in keyof T]?: NonNullable extends BasePlainObject ? Simplify>> : unknown }` + +## Type parameters + +β€’ **T** + +## Source + +[object.internal.types.ts:11](https://github.com/belgattitude/httpx/blob/87fb49862cf7e06acc8e0c35f7b115413ff3c6fe/packages/assert/src/object.internal.types.ts#L11) diff --git a/packages/assert/docs/api/object.internal.types/type-aliases/PlainObjectKey.md b/packages/assert/docs/api/object.internal.types/type-aliases/PlainObjectKey.md new file mode 100644 index 000000000..d2aa471c1 --- /dev/null +++ b/packages/assert/docs/api/object.internal.types/type-aliases/PlainObjectKey.md @@ -0,0 +1,13 @@ +[**@httpx/assert v0.11.0**](../../README.md) β€’ **Docs** + +*** + +[@httpx/assert v0.11.0](../../README.md) / [object.internal.types](../README.md) / PlainObjectKey + +# Type alias: PlainObjectKey + +> **PlainObjectKey**: `string` + +## Source + +[object.internal.types.ts:3](https://github.com/belgattitude/httpx/blob/87fb49862cf7e06acc8e0c35f7b115413ff3c6fe/packages/assert/src/object.internal.types.ts#L3) diff --git a/packages/assert/docs/api/object.internal.types/type-aliases/UnspecifiedPlainObjectType.md b/packages/assert/docs/api/object.internal.types/type-aliases/UnspecifiedPlainObjectType.md new file mode 100644 index 000000000..07794b516 --- /dev/null +++ b/packages/assert/docs/api/object.internal.types/type-aliases/UnspecifiedPlainObjectType.md @@ -0,0 +1,19 @@ +[**@httpx/assert v0.11.0**](../../README.md) β€’ **Docs** + +*** + +[@httpx/assert v0.11.0](../../README.md) / [object.internal.types](../README.md) / UnspecifiedPlainObjectType + +# Type alias: UnspecifiedPlainObjectType + +> **UnspecifiedPlainObjectType**: [`BasePlainObject`](BasePlainObject.md) & `object` + +## Type declaration + +### \_\_httpxInternalTag + +> `readonly` **\_\_httpxInternalTag**: `"@httpx/PlainObject"` + +## Source + +[object.internal.types.ts:5](https://github.com/belgattitude/httpx/blob/87fb49862cf7e06acc8e0c35f7b115413ff3c6fe/packages/assert/src/object.internal.types.ts#L5) diff --git a/packages/assert/docs/api/object.types/README.md b/packages/assert/docs/api/object.types/README.md index e3eac9a7a..7e8948966 100644 --- a/packages/assert/docs/api/object.types/README.md +++ b/packages/assert/docs/api/object.types/README.md @@ -1,8 +1,8 @@ -[**@httpx/assert v0.10.2**](../README.md) β€’ **Docs** +[**@httpx/assert v0.11.0**](../README.md) β€’ **Docs** *** -[@httpx/assert v0.10.2](../README.md) / object.types +[@httpx/assert v0.11.0](../README.md) / object.types # object.types @@ -11,4 +11,3 @@ ### Type Aliases - [PlainObject](type-aliases/PlainObject.md) -- [PlainObjectDeepPartialUnknown](type-aliases/PlainObjectDeepPartialUnknown.md) diff --git a/packages/assert/docs/api/object.types/type-aliases/PlainObject.md b/packages/assert/docs/api/object.types/type-aliases/PlainObject.md index 704cc3b67..d0d103ef4 100644 --- a/packages/assert/docs/api/object.types/type-aliases/PlainObject.md +++ b/packages/assert/docs/api/object.types/type-aliases/PlainObject.md @@ -1,17 +1,17 @@ -[**@httpx/assert v0.10.2**](../../README.md) β€’ **Docs** +[**@httpx/assert v0.11.0**](../../README.md) β€’ **Docs** *** -[@httpx/assert v0.10.2](../../README.md) / [object.types](../README.md) / PlainObject +[@httpx/assert v0.11.0](../../README.md) / [object.types](../README.md) / PlainObject # Type alias: PlainObject\ -> **PlainObject**\<`TValue`\>: [`PlainObjectDeepPartialUnknown`](PlainObjectDeepPartialUnknown.md)\<`TValue`\> +> **PlainObject**\<`TValue`\>: `TValue` *extends* [`UnspecifiedPlainObjectType`](../../object.internal.types/type-aliases/UnspecifiedPlainObjectType.md) ? `Record`\<[`PlainObjectKey`](../../object.internal.types/type-aliases/PlainObjectKey.md), `unknown`\> : `Simplify`\<[`PlainObjectDeepPartialUnknown`](../../object.internal.types/type-aliases/PlainObjectDeepPartialUnknown.md)\<`TValue`\>\> ## Type parameters -β€’ **TValue** *extends* `Record`\<`string`, `unknown`\> = `Record`\<`string`, `unknown`\> +β€’ **TValue** *extends* [`BasePlainObject`](../../object.internal.types/type-aliases/BasePlainObject.md) = [`UnspecifiedPlainObjectType`](../../object.internal.types/type-aliases/UnspecifiedPlainObjectType.md) ## Source -[object.types.ts:7](https://github.com/belgattitude/httpx/blob/9872a04f73c192beff5f4b4d63a156ff5269c00c/packages/assert/src/object.types.ts#L7) +[object.types.ts:9](https://github.com/belgattitude/httpx/blob/87fb49862cf7e06acc8e0c35f7b115413ff3c6fe/packages/assert/src/object.types.ts#L9) diff --git a/packages/assert/docs/api/object.types/type-aliases/PlainObjectDeepPartialUnknown.md b/packages/assert/docs/api/object.types/type-aliases/PlainObjectDeepPartialUnknown.md deleted file mode 100644 index 1bc21952d..000000000 --- a/packages/assert/docs/api/object.types/type-aliases/PlainObjectDeepPartialUnknown.md +++ /dev/null @@ -1,17 +0,0 @@ -[**@httpx/assert v0.10.2**](../../README.md) β€’ **Docs** - -*** - -[@httpx/assert v0.10.2](../../README.md) / [object.types](../README.md) / PlainObjectDeepPartialUnknown - -# Type alias: PlainObjectDeepPartialUnknown\ - -> **PlainObjectDeepPartialUnknown**\<`T`\>: `{ [P in keyof T]?: NonNullable extends Record ? PlainObjectDeepPartialUnknown> : unknown }` - -## Type parameters - -β€’ **T** - -## Source - -[object.types.ts:1](https://github.com/belgattitude/httpx/blob/9872a04f73c192beff5f4b4d63a156ff5269c00c/packages/assert/src/object.types.ts#L1) diff --git a/packages/assert/docs/api/string.asserts/README.md b/packages/assert/docs/api/string.asserts/README.md index be2735cb2..a991a2fcf 100644 --- a/packages/assert/docs/api/string.asserts/README.md +++ b/packages/assert/docs/api/string.asserts/README.md @@ -1,8 +1,8 @@ -[**@httpx/assert v0.10.2**](../README.md) β€’ **Docs** +[**@httpx/assert v0.11.0**](../README.md) β€’ **Docs** *** -[@httpx/assert v0.10.2](../README.md) / string.asserts +[@httpx/assert v0.11.0](../README.md) / string.asserts # string.asserts diff --git a/packages/assert/docs/api/string.asserts/functions/assertParsableSafeInt.md b/packages/assert/docs/api/string.asserts/functions/assertParsableSafeInt.md index 0d6df36a5..502c10462 100644 --- a/packages/assert/docs/api/string.asserts/functions/assertParsableSafeInt.md +++ b/packages/assert/docs/api/string.asserts/functions/assertParsableSafeInt.md @@ -1,8 +1,8 @@ -[**@httpx/assert v0.10.2**](../../README.md) β€’ **Docs** +[**@httpx/assert v0.11.0**](../../README.md) β€’ **Docs** *** -[@httpx/assert v0.10.2](../../README.md) / [string.asserts](../README.md) / assertParsableSafeInt +[@httpx/assert v0.11.0](../../README.md) / [string.asserts](../README.md) / assertParsableSafeInt # Function: assertParsableSafeInt() @@ -20,4 +20,4 @@ ## Source -[string.asserts.ts:28](https://github.com/belgattitude/httpx/blob/9872a04f73c192beff5f4b4d63a156ff5269c00c/packages/assert/src/string.asserts.ts#L28) +[string.asserts.ts:28](https://github.com/belgattitude/httpx/blob/87fb49862cf7e06acc8e0c35f7b115413ff3c6fe/packages/assert/src/string.asserts.ts#L28) diff --git a/packages/assert/docs/api/string.asserts/functions/assertParsableStrictIsoDateZ.md b/packages/assert/docs/api/string.asserts/functions/assertParsableStrictIsoDateZ.md index 09040afee..99d3d7315 100644 --- a/packages/assert/docs/api/string.asserts/functions/assertParsableStrictIsoDateZ.md +++ b/packages/assert/docs/api/string.asserts/functions/assertParsableStrictIsoDateZ.md @@ -1,8 +1,8 @@ -[**@httpx/assert v0.10.2**](../../README.md) β€’ **Docs** +[**@httpx/assert v0.11.0**](../../README.md) β€’ **Docs** *** -[@httpx/assert v0.10.2](../../README.md) / [string.asserts](../README.md) / assertParsableStrictIsoDateZ +[@httpx/assert v0.11.0](../../README.md) / [string.asserts](../README.md) / assertParsableStrictIsoDateZ # Function: assertParsableStrictIsoDateZ() @@ -24,4 +24,4 @@ TypeError ## Source -[string.asserts.ts:43](https://github.com/belgattitude/httpx/blob/9872a04f73c192beff5f4b4d63a156ff5269c00c/packages/assert/src/string.asserts.ts#L43) +[string.asserts.ts:43](https://github.com/belgattitude/httpx/blob/87fb49862cf7e06acc8e0c35f7b115413ff3c6fe/packages/assert/src/string.asserts.ts#L43) diff --git a/packages/assert/docs/api/string.asserts/functions/assertStringNonEmpty.md b/packages/assert/docs/api/string.asserts/functions/assertStringNonEmpty.md index a6442770f..e2db5270a 100644 --- a/packages/assert/docs/api/string.asserts/functions/assertStringNonEmpty.md +++ b/packages/assert/docs/api/string.asserts/functions/assertStringNonEmpty.md @@ -1,8 +1,8 @@ -[**@httpx/assert v0.10.2**](../../README.md) β€’ **Docs** +[**@httpx/assert v0.11.0**](../../README.md) β€’ **Docs** *** -[@httpx/assert v0.10.2](../../README.md) / [string.asserts](../README.md) / assertStringNonEmpty +[@httpx/assert v0.11.0](../../README.md) / [string.asserts](../README.md) / assertStringNonEmpty # Function: assertStringNonEmpty() @@ -26,4 +26,4 @@ TypeError ## Source -[string.asserts.ts:16](https://github.com/belgattitude/httpx/blob/9872a04f73c192beff5f4b4d63a156ff5269c00c/packages/assert/src/string.asserts.ts#L16) +[string.asserts.ts:16](https://github.com/belgattitude/httpx/blob/87fb49862cf7e06acc8e0c35f7b115413ff3c6fe/packages/assert/src/string.asserts.ts#L16) diff --git a/packages/assert/docs/api/string.guards/README.md b/packages/assert/docs/api/string.guards/README.md index 1e44cf6af..28ca1e168 100644 --- a/packages/assert/docs/api/string.guards/README.md +++ b/packages/assert/docs/api/string.guards/README.md @@ -1,8 +1,8 @@ -[**@httpx/assert v0.10.2**](../README.md) β€’ **Docs** +[**@httpx/assert v0.11.0**](../README.md) β€’ **Docs** *** -[@httpx/assert v0.10.2](../README.md) / string.guards +[@httpx/assert v0.11.0](../README.md) / string.guards # string.guards diff --git a/packages/assert/docs/api/string.guards/functions/isParsableSafeInt.md b/packages/assert/docs/api/string.guards/functions/isParsableSafeInt.md index ceeed92f5..6ef8d658e 100644 --- a/packages/assert/docs/api/string.guards/functions/isParsableSafeInt.md +++ b/packages/assert/docs/api/string.guards/functions/isParsableSafeInt.md @@ -1,8 +1,8 @@ -[**@httpx/assert v0.10.2**](../../README.md) β€’ **Docs** +[**@httpx/assert v0.11.0**](../../README.md) β€’ **Docs** *** -[@httpx/assert v0.10.2](../../README.md) / [string.guards](../README.md) / isParsableSafeInt +[@httpx/assert v0.11.0](../../README.md) / [string.guards](../README.md) / isParsableSafeInt # Function: isParsableSafeInt() @@ -18,4 +18,4 @@ ## Source -[string.guards.ts:14](https://github.com/belgattitude/httpx/blob/9872a04f73c192beff5f4b4d63a156ff5269c00c/packages/assert/src/string.guards.ts#L14) +[string.guards.ts:14](https://github.com/belgattitude/httpx/blob/87fb49862cf7e06acc8e0c35f7b115413ff3c6fe/packages/assert/src/string.guards.ts#L14) diff --git a/packages/assert/docs/api/string.guards/functions/isParsableStrictIsoDateZ.md b/packages/assert/docs/api/string.guards/functions/isParsableStrictIsoDateZ.md index eb67e4e88..4ba98585e 100644 --- a/packages/assert/docs/api/string.guards/functions/isParsableStrictIsoDateZ.md +++ b/packages/assert/docs/api/string.guards/functions/isParsableStrictIsoDateZ.md @@ -1,8 +1,8 @@ -[**@httpx/assert v0.10.2**](../../README.md) β€’ **Docs** +[**@httpx/assert v0.11.0**](../../README.md) β€’ **Docs** *** -[@httpx/assert v0.10.2](../../README.md) / [string.guards](../README.md) / isParsableStrictIsoDateZ +[@httpx/assert v0.11.0](../../README.md) / [string.guards](../README.md) / isParsableStrictIsoDateZ # Function: isParsableStrictIsoDateZ() @@ -38,4 +38,4 @@ https://en.wikipedia.org/wiki/Coordinated_Universal_Time ## Source -[string.guards.ts:35](https://github.com/belgattitude/httpx/blob/9872a04f73c192beff5f4b4d63a156ff5269c00c/packages/assert/src/string.guards.ts#L35) +[string.guards.ts:35](https://github.com/belgattitude/httpx/blob/87fb49862cf7e06acc8e0c35f7b115413ff3c6fe/packages/assert/src/string.guards.ts#L35) diff --git a/packages/assert/docs/api/string.guards/functions/isStringNonEmpty.md b/packages/assert/docs/api/string.guards/functions/isStringNonEmpty.md index fa9597847..b1112e1e1 100644 --- a/packages/assert/docs/api/string.guards/functions/isStringNonEmpty.md +++ b/packages/assert/docs/api/string.guards/functions/isStringNonEmpty.md @@ -1,8 +1,8 @@ -[**@httpx/assert v0.10.2**](../../README.md) β€’ **Docs** +[**@httpx/assert v0.11.0**](../../README.md) β€’ **Docs** *** -[@httpx/assert v0.10.2](../../README.md) / [string.guards](../README.md) / isStringNonEmpty +[@httpx/assert v0.11.0](../../README.md) / [string.guards](../README.md) / isStringNonEmpty # Function: isStringNonEmpty() @@ -18,4 +18,4 @@ ## Source -[string.guards.ts:9](https://github.com/belgattitude/httpx/blob/9872a04f73c192beff5f4b4d63a156ff5269c00c/packages/assert/src/string.guards.ts#L9) +[string.guards.ts:9](https://github.com/belgattitude/httpx/blob/87fb49862cf7e06acc8e0c35f7b115413ff3c6fe/packages/assert/src/string.guards.ts#L9) diff --git a/packages/assert/docs/api/string.types/README.md b/packages/assert/docs/api/string.types/README.md index 93d010a4e..b948ea311 100644 --- a/packages/assert/docs/api/string.types/README.md +++ b/packages/assert/docs/api/string.types/README.md @@ -1,8 +1,8 @@ -[**@httpx/assert v0.10.2**](../README.md) β€’ **Docs** +[**@httpx/assert v0.11.0**](../README.md) β€’ **Docs** *** -[@httpx/assert v0.10.2](../README.md) / string.types +[@httpx/assert v0.11.0](../README.md) / string.types # string.types diff --git a/packages/assert/docs/api/string.types/type-aliases/ParsableSafeInt.md b/packages/assert/docs/api/string.types/type-aliases/ParsableSafeInt.md index 3f66c8a17..a72fe6c3e 100644 --- a/packages/assert/docs/api/string.types/type-aliases/ParsableSafeInt.md +++ b/packages/assert/docs/api/string.types/type-aliases/ParsableSafeInt.md @@ -1,8 +1,8 @@ -[**@httpx/assert v0.10.2**](../../README.md) β€’ **Docs** +[**@httpx/assert v0.11.0**](../../README.md) β€’ **Docs** *** -[@httpx/assert v0.10.2](../../README.md) / [string.types](../README.md) / ParsableSafeInt +[@httpx/assert v0.11.0](../../README.md) / [string.types](../README.md) / ParsableSafeInt # Type alias: ParsableSafeInt @@ -10,4 +10,4 @@ ## Source -[string.types.ts:4](https://github.com/belgattitude/httpx/blob/9872a04f73c192beff5f4b4d63a156ff5269c00c/packages/assert/src/string.types.ts#L4) +[string.types.ts:4](https://github.com/belgattitude/httpx/blob/87fb49862cf7e06acc8e0c35f7b115413ff3c6fe/packages/assert/src/string.types.ts#L4) diff --git a/packages/assert/docs/api/string.types/type-aliases/ParsableStrictIsoDateZ.md b/packages/assert/docs/api/string.types/type-aliases/ParsableStrictIsoDateZ.md index ffe4fd8dc..d35b0793e 100644 --- a/packages/assert/docs/api/string.types/type-aliases/ParsableStrictIsoDateZ.md +++ b/packages/assert/docs/api/string.types/type-aliases/ParsableStrictIsoDateZ.md @@ -1,8 +1,8 @@ -[**@httpx/assert v0.10.2**](../../README.md) β€’ **Docs** +[**@httpx/assert v0.11.0**](../../README.md) β€’ **Docs** *** -[@httpx/assert v0.10.2](../../README.md) / [string.types](../README.md) / ParsableStrictIsoDateZ +[@httpx/assert v0.11.0](../../README.md) / [string.types](../README.md) / ParsableStrictIsoDateZ # Type alias: ParsableStrictIsoDateZ @@ -10,4 +10,4 @@ ## Source -[string.types.ts:5](https://github.com/belgattitude/httpx/blob/9872a04f73c192beff5f4b4d63a156ff5269c00c/packages/assert/src/string.types.ts#L5) +[string.types.ts:5](https://github.com/belgattitude/httpx/blob/87fb49862cf7e06acc8e0c35f7b115413ff3c6fe/packages/assert/src/string.types.ts#L5) diff --git a/packages/assert/docs/api/string.types/type-aliases/StringNonEmpty.md b/packages/assert/docs/api/string.types/type-aliases/StringNonEmpty.md index 420cc578e..4865e8798 100644 --- a/packages/assert/docs/api/string.types/type-aliases/StringNonEmpty.md +++ b/packages/assert/docs/api/string.types/type-aliases/StringNonEmpty.md @@ -1,8 +1,8 @@ -[**@httpx/assert v0.10.2**](../../README.md) β€’ **Docs** +[**@httpx/assert v0.11.0**](../../README.md) β€’ **Docs** *** -[@httpx/assert v0.10.2](../../README.md) / [string.types](../README.md) / StringNonEmpty +[@httpx/assert v0.11.0](../../README.md) / [string.types](../README.md) / StringNonEmpty # Type alias: StringNonEmpty @@ -10,4 +10,4 @@ ## Source -[string.types.ts:3](https://github.com/belgattitude/httpx/blob/9872a04f73c192beff5f4b4d63a156ff5269c00c/packages/assert/src/string.types.ts#L3) +[string.types.ts:3](https://github.com/belgattitude/httpx/blob/87fb49862cf7e06acc8e0c35f7b115413ff3c6fe/packages/assert/src/string.types.ts#L3) diff --git a/packages/assert/docs/api/string.utils/README.md b/packages/assert/docs/api/string.utils/README.md index 4bc082bd6..db13a015b 100644 --- a/packages/assert/docs/api/string.utils/README.md +++ b/packages/assert/docs/api/string.utils/README.md @@ -1,8 +1,8 @@ -[**@httpx/assert v0.10.2**](../README.md) β€’ **Docs** +[**@httpx/assert v0.11.0**](../README.md) β€’ **Docs** *** -[@httpx/assert v0.10.2](../README.md) / string.utils +[@httpx/assert v0.11.0](../README.md) / string.utils # string.utils diff --git a/packages/assert/docs/api/string.utils/variables/isoDateTimeZRegexp.md b/packages/assert/docs/api/string.utils/variables/isoDateTimeZRegexp.md index 49fa98a86..772af3451 100644 --- a/packages/assert/docs/api/string.utils/variables/isoDateTimeZRegexp.md +++ b/packages/assert/docs/api/string.utils/variables/isoDateTimeZRegexp.md @@ -1,8 +1,8 @@ -[**@httpx/assert v0.10.2**](../../README.md) β€’ **Docs** +[**@httpx/assert v0.11.0**](../../README.md) β€’ **Docs** *** -[@httpx/assert v0.10.2](../../README.md) / [string.utils](../README.md) / isoDateTimeZRegexp +[@httpx/assert v0.11.0](../../README.md) / [string.utils](../README.md) / isoDateTimeZRegexp # Variable: isoDateTimeZRegexp @@ -10,4 +10,4 @@ ## Source -[string.utils.ts:1](https://github.com/belgattitude/httpx/blob/9872a04f73c192beff5f4b4d63a156ff5269c00c/packages/assert/src/string.utils.ts#L1) +[string.utils.ts:1](https://github.com/belgattitude/httpx/blob/87fb49862cf7e06acc8e0c35f7b115413ff3c6fe/packages/assert/src/string.utils.ts#L1) diff --git a/packages/assert/docs/api/types.asserts/README.md b/packages/assert/docs/api/types.asserts/README.md index 2ff67995f..b1ccd0527 100644 --- a/packages/assert/docs/api/types.asserts/README.md +++ b/packages/assert/docs/api/types.asserts/README.md @@ -1,8 +1,8 @@ -[**@httpx/assert v0.10.2**](../README.md) β€’ **Docs** +[**@httpx/assert v0.11.0**](../README.md) β€’ **Docs** *** -[@httpx/assert v0.10.2](../README.md) / types.asserts +[@httpx/assert v0.11.0](../README.md) / types.asserts # types.asserts diff --git a/packages/assert/docs/api/types.asserts/functions/assertNever.md b/packages/assert/docs/api/types.asserts/functions/assertNever.md index cffd0c633..4833c6fb3 100644 --- a/packages/assert/docs/api/types.asserts/functions/assertNever.md +++ b/packages/assert/docs/api/types.asserts/functions/assertNever.md @@ -1,8 +1,8 @@ -[**@httpx/assert v0.10.2**](../../README.md) β€’ **Docs** +[**@httpx/assert v0.11.0**](../../README.md) β€’ **Docs** *** -[@httpx/assert v0.10.2](../../README.md) / [types.asserts](../README.md) / assertNever +[@httpx/assert v0.11.0](../../README.md) / [types.asserts](../README.md) / assertNever # Function: assertNever() @@ -24,4 +24,4 @@ TypeError ## Source -[types.asserts.ts:8](https://github.com/belgattitude/httpx/blob/9872a04f73c192beff5f4b4d63a156ff5269c00c/packages/assert/src/types.asserts.ts#L8) +[types.asserts.ts:8](https://github.com/belgattitude/httpx/blob/87fb49862cf7e06acc8e0c35f7b115413ff3c6fe/packages/assert/src/types.asserts.ts#L8) diff --git a/packages/assert/docs/api/types.asserts/functions/assertNeverNoThrow.md b/packages/assert/docs/api/types.asserts/functions/assertNeverNoThrow.md index 3b672bc7b..5868d1d1e 100644 --- a/packages/assert/docs/api/types.asserts/functions/assertNeverNoThrow.md +++ b/packages/assert/docs/api/types.asserts/functions/assertNeverNoThrow.md @@ -1,8 +1,8 @@ -[**@httpx/assert v0.10.2**](../../README.md) β€’ **Docs** +[**@httpx/assert v0.11.0**](../../README.md) β€’ **Docs** *** -[@httpx/assert v0.10.2](../../README.md) / [types.asserts](../README.md) / assertNeverNoThrow +[@httpx/assert v0.11.0](../../README.md) / [types.asserts](../README.md) / assertNeverNoThrow # Function: assertNeverNoThrow() @@ -21,4 +21,4 @@ will return the value. Typechecks are still enforced. ## Source -[types.asserts.ts:24](https://github.com/belgattitude/httpx/blob/9872a04f73c192beff5f4b4d63a156ff5269c00c/packages/assert/src/types.asserts.ts#L24) +[types.asserts.ts:24](https://github.com/belgattitude/httpx/blob/87fb49862cf7e06acc8e0c35f7b115413ff3c6fe/packages/assert/src/types.asserts.ts#L24) diff --git a/packages/assert/docs/api/uuid.asserts/README.md b/packages/assert/docs/api/uuid.asserts/README.md index a552c42f7..a20da0d26 100644 --- a/packages/assert/docs/api/uuid.asserts/README.md +++ b/packages/assert/docs/api/uuid.asserts/README.md @@ -1,8 +1,8 @@ -[**@httpx/assert v0.10.2**](../README.md) β€’ **Docs** +[**@httpx/assert v0.11.0**](../README.md) β€’ **Docs** *** -[@httpx/assert v0.10.2](../README.md) / uuid.asserts +[@httpx/assert v0.11.0](../README.md) / uuid.asserts # uuid.asserts diff --git a/packages/assert/docs/api/uuid.asserts/functions/assertUuid.md b/packages/assert/docs/api/uuid.asserts/functions/assertUuid.md index 85913c39b..4867affaa 100644 --- a/packages/assert/docs/api/uuid.asserts/functions/assertUuid.md +++ b/packages/assert/docs/api/uuid.asserts/functions/assertUuid.md @@ -1,8 +1,8 @@ -[**@httpx/assert v0.10.2**](../../README.md) β€’ **Docs** +[**@httpx/assert v0.11.0**](../../README.md) β€’ **Docs** *** -[@httpx/assert v0.10.2](../../README.md) / [uuid.asserts](../README.md) / assertUuid +[@httpx/assert v0.11.0](../../README.md) / [uuid.asserts](../README.md) / assertUuid # Function: assertUuid() @@ -31,4 +31,4 @@ TypeError ## Source -[uuid.asserts.ts:24](https://github.com/belgattitude/httpx/blob/9872a04f73c192beff5f4b4d63a156ff5269c00c/packages/assert/src/uuid.asserts.ts#L24) +[uuid.asserts.ts:24](https://github.com/belgattitude/httpx/blob/87fb49862cf7e06acc8e0c35f7b115413ff3c6fe/packages/assert/src/uuid.asserts.ts#L24) diff --git a/packages/assert/docs/api/uuid.asserts/functions/assertUuidV1.md b/packages/assert/docs/api/uuid.asserts/functions/assertUuidV1.md index 6ca597a66..490e5a9bb 100644 --- a/packages/assert/docs/api/uuid.asserts/functions/assertUuidV1.md +++ b/packages/assert/docs/api/uuid.asserts/functions/assertUuidV1.md @@ -1,8 +1,8 @@ -[**@httpx/assert v0.10.2**](../../README.md) β€’ **Docs** +[**@httpx/assert v0.11.0**](../../README.md) β€’ **Docs** *** -[@httpx/assert v0.10.2](../../README.md) / [uuid.asserts](../README.md) / assertUuidV1 +[@httpx/assert v0.11.0](../../README.md) / [uuid.asserts](../README.md) / assertUuidV1 # Function: assertUuidV1() @@ -26,4 +26,4 @@ TypeError ## Source -[uuid.asserts.ts:44](https://github.com/belgattitude/httpx/blob/9872a04f73c192beff5f4b4d63a156ff5269c00c/packages/assert/src/uuid.asserts.ts#L44) +[uuid.asserts.ts:44](https://github.com/belgattitude/httpx/blob/87fb49862cf7e06acc8e0c35f7b115413ff3c6fe/packages/assert/src/uuid.asserts.ts#L44) diff --git a/packages/assert/docs/api/uuid.asserts/functions/assertUuidV3.md b/packages/assert/docs/api/uuid.asserts/functions/assertUuidV3.md index 3c7863396..6007881c7 100644 --- a/packages/assert/docs/api/uuid.asserts/functions/assertUuidV3.md +++ b/packages/assert/docs/api/uuid.asserts/functions/assertUuidV3.md @@ -1,8 +1,8 @@ -[**@httpx/assert v0.10.2**](../../README.md) β€’ **Docs** +[**@httpx/assert v0.11.0**](../../README.md) β€’ **Docs** *** -[@httpx/assert v0.10.2](../../README.md) / [uuid.asserts](../README.md) / assertUuidV3 +[@httpx/assert v0.11.0](../../README.md) / [uuid.asserts](../README.md) / assertUuidV3 # Function: assertUuidV3() @@ -26,4 +26,4 @@ TypeError ## Source -[uuid.asserts.ts:58](https://github.com/belgattitude/httpx/blob/9872a04f73c192beff5f4b4d63a156ff5269c00c/packages/assert/src/uuid.asserts.ts#L58) +[uuid.asserts.ts:58](https://github.com/belgattitude/httpx/blob/87fb49862cf7e06acc8e0c35f7b115413ff3c6fe/packages/assert/src/uuid.asserts.ts#L58) diff --git a/packages/assert/docs/api/uuid.asserts/functions/assertUuidV4.md b/packages/assert/docs/api/uuid.asserts/functions/assertUuidV4.md index 048327f79..83a7e60a6 100644 --- a/packages/assert/docs/api/uuid.asserts/functions/assertUuidV4.md +++ b/packages/assert/docs/api/uuid.asserts/functions/assertUuidV4.md @@ -1,8 +1,8 @@ -[**@httpx/assert v0.10.2**](../../README.md) β€’ **Docs** +[**@httpx/assert v0.11.0**](../../README.md) β€’ **Docs** *** -[@httpx/assert v0.10.2](../../README.md) / [uuid.asserts](../README.md) / assertUuidV4 +[@httpx/assert v0.11.0](../../README.md) / [uuid.asserts](../README.md) / assertUuidV4 # Function: assertUuidV4() @@ -26,4 +26,4 @@ TypeError ## Source -[uuid.asserts.ts:71](https://github.com/belgattitude/httpx/blob/9872a04f73c192beff5f4b4d63a156ff5269c00c/packages/assert/src/uuid.asserts.ts#L71) +[uuid.asserts.ts:71](https://github.com/belgattitude/httpx/blob/87fb49862cf7e06acc8e0c35f7b115413ff3c6fe/packages/assert/src/uuid.asserts.ts#L71) diff --git a/packages/assert/docs/api/uuid.asserts/functions/assertUuidV5.md b/packages/assert/docs/api/uuid.asserts/functions/assertUuidV5.md index b4231d889..277d07128 100644 --- a/packages/assert/docs/api/uuid.asserts/functions/assertUuidV5.md +++ b/packages/assert/docs/api/uuid.asserts/functions/assertUuidV5.md @@ -1,8 +1,8 @@ -[**@httpx/assert v0.10.2**](../../README.md) β€’ **Docs** +[**@httpx/assert v0.11.0**](../../README.md) β€’ **Docs** *** -[@httpx/assert v0.10.2](../../README.md) / [uuid.asserts](../README.md) / assertUuidV5 +[@httpx/assert v0.11.0](../../README.md) / [uuid.asserts](../README.md) / assertUuidV5 # Function: assertUuidV5() @@ -26,4 +26,4 @@ TypeError ## Source -[uuid.asserts.ts:84](https://github.com/belgattitude/httpx/blob/9872a04f73c192beff5f4b4d63a156ff5269c00c/packages/assert/src/uuid.asserts.ts#L84) +[uuid.asserts.ts:84](https://github.com/belgattitude/httpx/blob/87fb49862cf7e06acc8e0c35f7b115413ff3c6fe/packages/assert/src/uuid.asserts.ts#L84) diff --git a/packages/assert/docs/api/uuid.guards/README.md b/packages/assert/docs/api/uuid.guards/README.md index d2e6590b6..d0c50d2dc 100644 --- a/packages/assert/docs/api/uuid.guards/README.md +++ b/packages/assert/docs/api/uuid.guards/README.md @@ -1,8 +1,8 @@ -[**@httpx/assert v0.10.2**](../README.md) β€’ **Docs** +[**@httpx/assert v0.11.0**](../README.md) β€’ **Docs** *** -[@httpx/assert v0.10.2](../README.md) / uuid.guards +[@httpx/assert v0.11.0](../README.md) / uuid.guards # uuid.guards diff --git a/packages/assert/docs/api/uuid.guards/functions/isUuid.md b/packages/assert/docs/api/uuid.guards/functions/isUuid.md index c431db004..fa991be59 100644 --- a/packages/assert/docs/api/uuid.guards/functions/isUuid.md +++ b/packages/assert/docs/api/uuid.guards/functions/isUuid.md @@ -1,8 +1,8 @@ -[**@httpx/assert v0.10.2**](../../README.md) β€’ **Docs** +[**@httpx/assert v0.11.0**](../../README.md) β€’ **Docs** *** -[@httpx/assert v0.10.2](../../README.md) / [uuid.guards](../README.md) / isUuid +[@httpx/assert v0.11.0](../../README.md) / [uuid.guards](../README.md) / isUuid # Function: isUuid() @@ -23,4 +23,4 @@ optional given version ## Source -[uuid.guards.ts:24](https://github.com/belgattitude/httpx/blob/9872a04f73c192beff5f4b4d63a156ff5269c00c/packages/assert/src/uuid.guards.ts#L24) +[uuid.guards.ts:24](https://github.com/belgattitude/httpx/blob/87fb49862cf7e06acc8e0c35f7b115413ff3c6fe/packages/assert/src/uuid.guards.ts#L24) diff --git a/packages/assert/docs/api/uuid.guards/functions/isUuidV1.md b/packages/assert/docs/api/uuid.guards/functions/isUuidV1.md index 7303aa843..58f419aa0 100644 --- a/packages/assert/docs/api/uuid.guards/functions/isUuidV1.md +++ b/packages/assert/docs/api/uuid.guards/functions/isUuidV1.md @@ -1,8 +1,8 @@ -[**@httpx/assert v0.10.2**](../../README.md) β€’ **Docs** +[**@httpx/assert v0.11.0**](../../README.md) β€’ **Docs** *** -[@httpx/assert v0.10.2](../../README.md) / [uuid.guards](../README.md) / isUuidV1 +[@httpx/assert v0.11.0](../../README.md) / [uuid.guards](../README.md) / isUuidV1 # Function: isUuidV1() @@ -18,4 +18,4 @@ ## Source -[uuid.guards.ts:32](https://github.com/belgattitude/httpx/blob/9872a04f73c192beff5f4b4d63a156ff5269c00c/packages/assert/src/uuid.guards.ts#L32) +[uuid.guards.ts:32](https://github.com/belgattitude/httpx/blob/87fb49862cf7e06acc8e0c35f7b115413ff3c6fe/packages/assert/src/uuid.guards.ts#L32) diff --git a/packages/assert/docs/api/uuid.guards/functions/isUuidV3.md b/packages/assert/docs/api/uuid.guards/functions/isUuidV3.md index 8f3e00784..f8f59d401 100644 --- a/packages/assert/docs/api/uuid.guards/functions/isUuidV3.md +++ b/packages/assert/docs/api/uuid.guards/functions/isUuidV3.md @@ -1,8 +1,8 @@ -[**@httpx/assert v0.10.2**](../../README.md) β€’ **Docs** +[**@httpx/assert v0.11.0**](../../README.md) β€’ **Docs** *** -[@httpx/assert v0.10.2](../../README.md) / [uuid.guards](../README.md) / isUuidV3 +[@httpx/assert v0.11.0](../../README.md) / [uuid.guards](../README.md) / isUuidV3 # Function: isUuidV3() @@ -18,4 +18,4 @@ ## Source -[uuid.guards.ts:34](https://github.com/belgattitude/httpx/blob/9872a04f73c192beff5f4b4d63a156ff5269c00c/packages/assert/src/uuid.guards.ts#L34) +[uuid.guards.ts:34](https://github.com/belgattitude/httpx/blob/87fb49862cf7e06acc8e0c35f7b115413ff3c6fe/packages/assert/src/uuid.guards.ts#L34) diff --git a/packages/assert/docs/api/uuid.guards/functions/isUuidV4.md b/packages/assert/docs/api/uuid.guards/functions/isUuidV4.md index ceb241039..074def1e7 100644 --- a/packages/assert/docs/api/uuid.guards/functions/isUuidV4.md +++ b/packages/assert/docs/api/uuid.guards/functions/isUuidV4.md @@ -1,8 +1,8 @@ -[**@httpx/assert v0.10.2**](../../README.md) β€’ **Docs** +[**@httpx/assert v0.11.0**](../../README.md) β€’ **Docs** *** -[@httpx/assert v0.10.2](../../README.md) / [uuid.guards](../README.md) / isUuidV4 +[@httpx/assert v0.11.0](../../README.md) / [uuid.guards](../README.md) / isUuidV4 # Function: isUuidV4() @@ -18,4 +18,4 @@ ## Source -[uuid.guards.ts:35](https://github.com/belgattitude/httpx/blob/9872a04f73c192beff5f4b4d63a156ff5269c00c/packages/assert/src/uuid.guards.ts#L35) +[uuid.guards.ts:35](https://github.com/belgattitude/httpx/blob/87fb49862cf7e06acc8e0c35f7b115413ff3c6fe/packages/assert/src/uuid.guards.ts#L35) diff --git a/packages/assert/docs/api/uuid.guards/functions/isUuidV5.md b/packages/assert/docs/api/uuid.guards/functions/isUuidV5.md index a5f174d35..e5a8839df 100644 --- a/packages/assert/docs/api/uuid.guards/functions/isUuidV5.md +++ b/packages/assert/docs/api/uuid.guards/functions/isUuidV5.md @@ -1,8 +1,8 @@ -[**@httpx/assert v0.10.2**](../../README.md) β€’ **Docs** +[**@httpx/assert v0.11.0**](../../README.md) β€’ **Docs** *** -[@httpx/assert v0.10.2](../../README.md) / [uuid.guards](../README.md) / isUuidV5 +[@httpx/assert v0.11.0](../../README.md) / [uuid.guards](../README.md) / isUuidV5 # Function: isUuidV5() @@ -18,4 +18,4 @@ ## Source -[uuid.guards.ts:36](https://github.com/belgattitude/httpx/blob/9872a04f73c192beff5f4b4d63a156ff5269c00c/packages/assert/src/uuid.guards.ts#L36) +[uuid.guards.ts:36](https://github.com/belgattitude/httpx/blob/87fb49862cf7e06acc8e0c35f7b115413ff3c6fe/packages/assert/src/uuid.guards.ts#L36) diff --git a/packages/assert/docs/api/uuid.guards/functions/isUuidV7.md b/packages/assert/docs/api/uuid.guards/functions/isUuidV7.md index 20bde501f..c0c8319a8 100644 --- a/packages/assert/docs/api/uuid.guards/functions/isUuidV7.md +++ b/packages/assert/docs/api/uuid.guards/functions/isUuidV7.md @@ -1,8 +1,8 @@ -[**@httpx/assert v0.10.2**](../../README.md) β€’ **Docs** +[**@httpx/assert v0.11.0**](../../README.md) β€’ **Docs** *** -[@httpx/assert v0.10.2](../../README.md) / [uuid.guards](../README.md) / isUuidV7 +[@httpx/assert v0.11.0](../../README.md) / [uuid.guards](../README.md) / isUuidV7 # Function: isUuidV7() @@ -18,4 +18,4 @@ ## Source -[uuid.guards.ts:37](https://github.com/belgattitude/httpx/blob/9872a04f73c192beff5f4b4d63a156ff5269c00c/packages/assert/src/uuid.guards.ts#L37) +[uuid.guards.ts:37](https://github.com/belgattitude/httpx/blob/87fb49862cf7e06acc8e0c35f7b115413ff3c6fe/packages/assert/src/uuid.guards.ts#L37) diff --git a/packages/assert/docs/api/uuid.guards/functions/isUuidVersion.md b/packages/assert/docs/api/uuid.guards/functions/isUuidVersion.md index ec8ffdc46..59e669a15 100644 --- a/packages/assert/docs/api/uuid.guards/functions/isUuidVersion.md +++ b/packages/assert/docs/api/uuid.guards/functions/isUuidVersion.md @@ -1,8 +1,8 @@ -[**@httpx/assert v0.10.2**](../../README.md) β€’ **Docs** +[**@httpx/assert v0.11.0**](../../README.md) β€’ **Docs** *** -[@httpx/assert v0.10.2](../../README.md) / [uuid.guards](../README.md) / isUuidVersion +[@httpx/assert v0.11.0](../../README.md) / [uuid.guards](../README.md) / isUuidVersion # Function: isUuidVersion() @@ -20,4 +20,4 @@ Check if a value is a valid uuid version: 1, 3, 4 or 5 ## Source -[uuid.guards.ts:16](https://github.com/belgattitude/httpx/blob/9872a04f73c192beff5f4b4d63a156ff5269c00c/packages/assert/src/uuid.guards.ts#L16) +[uuid.guards.ts:16](https://github.com/belgattitude/httpx/blob/87fb49862cf7e06acc8e0c35f7b115413ff3c6fe/packages/assert/src/uuid.guards.ts#L16) diff --git a/packages/assert/docs/api/uuid.helpers/README.md b/packages/assert/docs/api/uuid.helpers/README.md index ea5f04e4c..6228b52d2 100644 --- a/packages/assert/docs/api/uuid.helpers/README.md +++ b/packages/assert/docs/api/uuid.helpers/README.md @@ -1,8 +1,8 @@ -[**@httpx/assert v0.10.2**](../README.md) β€’ **Docs** +[**@httpx/assert v0.11.0**](../README.md) β€’ **Docs** *** -[@httpx/assert v0.10.2](../README.md) / uuid.helpers +[@httpx/assert v0.11.0](../README.md) / uuid.helpers # uuid.helpers diff --git a/packages/assert/docs/api/uuid.helpers/functions/getUuidVersion.md b/packages/assert/docs/api/uuid.helpers/functions/getUuidVersion.md index 476d9b5ff..c860ba81f 100644 --- a/packages/assert/docs/api/uuid.helpers/functions/getUuidVersion.md +++ b/packages/assert/docs/api/uuid.helpers/functions/getUuidVersion.md @@ -1,8 +1,8 @@ -[**@httpx/assert v0.10.2**](../../README.md) β€’ **Docs** +[**@httpx/assert v0.11.0**](../../README.md) β€’ **Docs** *** -[@httpx/assert v0.10.2](../../README.md) / [uuid.helpers](../README.md) / getUuidVersion +[@httpx/assert v0.11.0](../../README.md) / [uuid.helpers](../README.md) / getUuidVersion # Function: getUuidVersion() @@ -20,4 +20,4 @@ Adapted from https://github.com/uuidjs/uuid/blob/main/src/version.js ## Source -[uuid.helpers.ts:7](https://github.com/belgattitude/httpx/blob/9872a04f73c192beff5f4b4d63a156ff5269c00c/packages/assert/src/uuid.helpers.ts#L7) +[uuid.helpers.ts:7](https://github.com/belgattitude/httpx/blob/87fb49862cf7e06acc8e0c35f7b115413ff3c6fe/packages/assert/src/uuid.helpers.ts#L7) diff --git a/packages/assert/docs/api/uuid.types/README.md b/packages/assert/docs/api/uuid.types/README.md index dc0150b31..3312bdcf9 100644 --- a/packages/assert/docs/api/uuid.types/README.md +++ b/packages/assert/docs/api/uuid.types/README.md @@ -1,8 +1,8 @@ -[**@httpx/assert v0.10.2**](../README.md) β€’ **Docs** +[**@httpx/assert v0.11.0**](../README.md) β€’ **Docs** *** -[@httpx/assert v0.10.2](../README.md) / uuid.types +[@httpx/assert v0.11.0](../README.md) / uuid.types # uuid.types diff --git a/packages/assert/docs/api/uuid.types/type-aliases/Uuid.md b/packages/assert/docs/api/uuid.types/type-aliases/Uuid.md index acdc9a419..b99d32ba9 100644 --- a/packages/assert/docs/api/uuid.types/type-aliases/Uuid.md +++ b/packages/assert/docs/api/uuid.types/type-aliases/Uuid.md @@ -1,8 +1,8 @@ -[**@httpx/assert v0.10.2**](../../README.md) β€’ **Docs** +[**@httpx/assert v0.11.0**](../../README.md) β€’ **Docs** *** -[@httpx/assert v0.10.2](../../README.md) / [uuid.types](../README.md) / Uuid +[@httpx/assert v0.11.0](../../README.md) / [uuid.types](../README.md) / Uuid # Type alias: Uuid @@ -10,4 +10,4 @@ ## Source -[uuid.types.ts:3](https://github.com/belgattitude/httpx/blob/9872a04f73c192beff5f4b4d63a156ff5269c00c/packages/assert/src/uuid.types.ts#L3) +[uuid.types.ts:3](https://github.com/belgattitude/httpx/blob/87fb49862cf7e06acc8e0c35f7b115413ff3c6fe/packages/assert/src/uuid.types.ts#L3) diff --git a/packages/assert/docs/api/uuid.types/type-aliases/UuidV1.md b/packages/assert/docs/api/uuid.types/type-aliases/UuidV1.md index 3c4e9770b..08a1ae1a6 100644 --- a/packages/assert/docs/api/uuid.types/type-aliases/UuidV1.md +++ b/packages/assert/docs/api/uuid.types/type-aliases/UuidV1.md @@ -1,8 +1,8 @@ -[**@httpx/assert v0.10.2**](../../README.md) β€’ **Docs** +[**@httpx/assert v0.11.0**](../../README.md) β€’ **Docs** *** -[@httpx/assert v0.10.2](../../README.md) / [uuid.types](../README.md) / UuidV1 +[@httpx/assert v0.11.0](../../README.md) / [uuid.types](../README.md) / UuidV1 # Type alias: UuidV1 @@ -10,4 +10,4 @@ ## Source -[uuid.types.ts:5](https://github.com/belgattitude/httpx/blob/9872a04f73c192beff5f4b4d63a156ff5269c00c/packages/assert/src/uuid.types.ts#L5) +[uuid.types.ts:5](https://github.com/belgattitude/httpx/blob/87fb49862cf7e06acc8e0c35f7b115413ff3c6fe/packages/assert/src/uuid.types.ts#L5) diff --git a/packages/assert/docs/api/uuid.types/type-aliases/UuidV3.md b/packages/assert/docs/api/uuid.types/type-aliases/UuidV3.md index b596129be..207ffafbb 100644 --- a/packages/assert/docs/api/uuid.types/type-aliases/UuidV3.md +++ b/packages/assert/docs/api/uuid.types/type-aliases/UuidV3.md @@ -1,8 +1,8 @@ -[**@httpx/assert v0.10.2**](../../README.md) β€’ **Docs** +[**@httpx/assert v0.11.0**](../../README.md) β€’ **Docs** *** -[@httpx/assert v0.10.2](../../README.md) / [uuid.types](../README.md) / UuidV3 +[@httpx/assert v0.11.0](../../README.md) / [uuid.types](../README.md) / UuidV3 # Type alias: UuidV3 @@ -10,4 +10,4 @@ ## Source -[uuid.types.ts:6](https://github.com/belgattitude/httpx/blob/9872a04f73c192beff5f4b4d63a156ff5269c00c/packages/assert/src/uuid.types.ts#L6) +[uuid.types.ts:6](https://github.com/belgattitude/httpx/blob/87fb49862cf7e06acc8e0c35f7b115413ff3c6fe/packages/assert/src/uuid.types.ts#L6) diff --git a/packages/assert/docs/api/uuid.types/type-aliases/UuidV4.md b/packages/assert/docs/api/uuid.types/type-aliases/UuidV4.md index e7546d64a..78029f09f 100644 --- a/packages/assert/docs/api/uuid.types/type-aliases/UuidV4.md +++ b/packages/assert/docs/api/uuid.types/type-aliases/UuidV4.md @@ -1,8 +1,8 @@ -[**@httpx/assert v0.10.2**](../../README.md) β€’ **Docs** +[**@httpx/assert v0.11.0**](../../README.md) β€’ **Docs** *** -[@httpx/assert v0.10.2](../../README.md) / [uuid.types](../README.md) / UuidV4 +[@httpx/assert v0.11.0](../../README.md) / [uuid.types](../README.md) / UuidV4 # Type alias: UuidV4 @@ -10,4 +10,4 @@ ## Source -[uuid.types.ts:7](https://github.com/belgattitude/httpx/blob/9872a04f73c192beff5f4b4d63a156ff5269c00c/packages/assert/src/uuid.types.ts#L7) +[uuid.types.ts:7](https://github.com/belgattitude/httpx/blob/87fb49862cf7e06acc8e0c35f7b115413ff3c6fe/packages/assert/src/uuid.types.ts#L7) diff --git a/packages/assert/docs/api/uuid.types/type-aliases/UuidV5.md b/packages/assert/docs/api/uuid.types/type-aliases/UuidV5.md index c6bcdd0d3..604c78cb5 100644 --- a/packages/assert/docs/api/uuid.types/type-aliases/UuidV5.md +++ b/packages/assert/docs/api/uuid.types/type-aliases/UuidV5.md @@ -1,8 +1,8 @@ -[**@httpx/assert v0.10.2**](../../README.md) β€’ **Docs** +[**@httpx/assert v0.11.0**](../../README.md) β€’ **Docs** *** -[@httpx/assert v0.10.2](../../README.md) / [uuid.types](../README.md) / UuidV5 +[@httpx/assert v0.11.0](../../README.md) / [uuid.types](../README.md) / UuidV5 # Type alias: UuidV5 @@ -10,4 +10,4 @@ ## Source -[uuid.types.ts:8](https://github.com/belgattitude/httpx/blob/9872a04f73c192beff5f4b4d63a156ff5269c00c/packages/assert/src/uuid.types.ts#L8) +[uuid.types.ts:8](https://github.com/belgattitude/httpx/blob/87fb49862cf7e06acc8e0c35f7b115413ff3c6fe/packages/assert/src/uuid.types.ts#L8) diff --git a/packages/assert/docs/api/uuid.types/type-aliases/UuidV7.md b/packages/assert/docs/api/uuid.types/type-aliases/UuidV7.md index a9cc2cc65..106383f56 100644 --- a/packages/assert/docs/api/uuid.types/type-aliases/UuidV7.md +++ b/packages/assert/docs/api/uuid.types/type-aliases/UuidV7.md @@ -1,8 +1,8 @@ -[**@httpx/assert v0.10.2**](../../README.md) β€’ **Docs** +[**@httpx/assert v0.11.0**](../../README.md) β€’ **Docs** *** -[@httpx/assert v0.10.2](../../README.md) / [uuid.types](../README.md) / UuidV7 +[@httpx/assert v0.11.0](../../README.md) / [uuid.types](../README.md) / UuidV7 # Type alias: UuidV7 @@ -10,4 +10,4 @@ ## Source -[uuid.types.ts:9](https://github.com/belgattitude/httpx/blob/9872a04f73c192beff5f4b4d63a156ff5269c00c/packages/assert/src/uuid.types.ts#L9) +[uuid.types.ts:9](https://github.com/belgattitude/httpx/blob/87fb49862cf7e06acc8e0c35f7b115413ff3c6fe/packages/assert/src/uuid.types.ts#L9) diff --git a/packages/assert/docs/api/uuid.types/type-aliases/UuidVersion.md b/packages/assert/docs/api/uuid.types/type-aliases/UuidVersion.md index c783e76b9..ca02d2718 100644 --- a/packages/assert/docs/api/uuid.types/type-aliases/UuidVersion.md +++ b/packages/assert/docs/api/uuid.types/type-aliases/UuidVersion.md @@ -1,8 +1,8 @@ -[**@httpx/assert v0.10.2**](../../README.md) β€’ **Docs** +[**@httpx/assert v0.11.0**](../../README.md) β€’ **Docs** *** -[@httpx/assert v0.10.2](../../README.md) / [uuid.types](../README.md) / UuidVersion +[@httpx/assert v0.11.0](../../README.md) / [uuid.types](../README.md) / UuidVersion # Type alias: UuidVersion @@ -10,4 +10,4 @@ ## Source -[uuid.types.ts:11](https://github.com/belgattitude/httpx/blob/9872a04f73c192beff5f4b4d63a156ff5269c00c/packages/assert/src/uuid.types.ts#L11) +[uuid.types.ts:11](https://github.com/belgattitude/httpx/blob/87fb49862cf7e06acc8e0c35f7b115413ff3c6fe/packages/assert/src/uuid.types.ts#L11) diff --git a/packages/assert/docs/api/uuid.types/type-aliases/UuidVersionOrNumber.md b/packages/assert/docs/api/uuid.types/type-aliases/UuidVersionOrNumber.md index 94f99eb96..a7f558a67 100644 --- a/packages/assert/docs/api/uuid.types/type-aliases/UuidVersionOrNumber.md +++ b/packages/assert/docs/api/uuid.types/type-aliases/UuidVersionOrNumber.md @@ -1,8 +1,8 @@ -[**@httpx/assert v0.10.2**](../../README.md) β€’ **Docs** +[**@httpx/assert v0.11.0**](../../README.md) β€’ **Docs** *** -[@httpx/assert v0.10.2](../../README.md) / [uuid.types](../README.md) / UuidVersionOrNumber +[@httpx/assert v0.11.0](../../README.md) / [uuid.types](../README.md) / UuidVersionOrNumber # Type alias: UuidVersionOrNumber @@ -10,4 +10,4 @@ ## Source -[uuid.types.ts:12](https://github.com/belgattitude/httpx/blob/9872a04f73c192beff5f4b4d63a156ff5269c00c/packages/assert/src/uuid.types.ts#L12) +[uuid.types.ts:12](https://github.com/belgattitude/httpx/blob/87fb49862cf7e06acc8e0c35f7b115413ff3c6fe/packages/assert/src/uuid.types.ts#L12) diff --git a/packages/assert/docs/api/uuid.utils/README.md b/packages/assert/docs/api/uuid.utils/README.md index 964d1902f..2079caf68 100644 --- a/packages/assert/docs/api/uuid.utils/README.md +++ b/packages/assert/docs/api/uuid.utils/README.md @@ -1,8 +1,8 @@ -[**@httpx/assert v0.10.2**](../README.md) β€’ **Docs** +[**@httpx/assert v0.11.0**](../README.md) β€’ **Docs** *** -[@httpx/assert v0.10.2](../README.md) / uuid.utils +[@httpx/assert v0.11.0](../README.md) / uuid.utils # uuid.utils diff --git a/packages/assert/docs/api/uuid.utils/variables/uuidRegexp.md b/packages/assert/docs/api/uuid.utils/variables/uuidRegexp.md index 6d0c2dd43..1ac8f608b 100644 --- a/packages/assert/docs/api/uuid.utils/variables/uuidRegexp.md +++ b/packages/assert/docs/api/uuid.utils/variables/uuidRegexp.md @@ -1,8 +1,8 @@ -[**@httpx/assert v0.10.2**](../../README.md) β€’ **Docs** +[**@httpx/assert v0.11.0**](../../README.md) β€’ **Docs** *** -[@httpx/assert v0.10.2](../../README.md) / [uuid.utils](../README.md) / uuidRegexp +[@httpx/assert v0.11.0](../../README.md) / [uuid.utils](../README.md) / uuidRegexp # Variable: uuidRegexp @@ -12,4 +12,4 @@ Taken from https://github.com/uuidjs/uuid/blob/main/src/regex.js ## Source -[uuid.utils.ts:4](https://github.com/belgattitude/httpx/blob/9872a04f73c192beff5f4b4d63a156ff5269c00c/packages/assert/src/uuid.utils.ts#L4) +[uuid.utils.ts:4](https://github.com/belgattitude/httpx/blob/87fb49862cf7e06acc8e0c35f7b115413ff3c6fe/packages/assert/src/uuid.utils.ts#L4) diff --git a/packages/assert/docs/api/uuid.utils/variables/uuidSupportedVersions.md b/packages/assert/docs/api/uuid.utils/variables/uuidSupportedVersions.md index 0256ca04a..6312f9bc6 100644 --- a/packages/assert/docs/api/uuid.utils/variables/uuidSupportedVersions.md +++ b/packages/assert/docs/api/uuid.utils/variables/uuidSupportedVersions.md @@ -1,8 +1,8 @@ -[**@httpx/assert v0.10.2**](../../README.md) β€’ **Docs** +[**@httpx/assert v0.11.0**](../../README.md) β€’ **Docs** *** -[@httpx/assert v0.10.2](../../README.md) / [uuid.utils](../README.md) / uuidSupportedVersions +[@httpx/assert v0.11.0](../../README.md) / [uuid.utils](../README.md) / uuidSupportedVersions # Variable: uuidSupportedVersions @@ -10,4 +10,4 @@ ## Source -[uuid.utils.ts:7](https://github.com/belgattitude/httpx/blob/9872a04f73c192beff5f4b4d63a156ff5269c00c/packages/assert/src/uuid.utils.ts#L7) +[uuid.utils.ts:7](https://github.com/belgattitude/httpx/blob/87fb49862cf7e06acc8e0c35f7b115413ff3c6fe/packages/assert/src/uuid.utils.ts#L7) diff --git a/packages/assert/package.json b/packages/assert/package.json index fd54a241a..633f1cabe 100644 --- a/packages/assert/package.json +++ b/packages/assert/package.json @@ -60,6 +60,8 @@ "dev": "tsup --watch", "fix-staged": "lint-staged --allow-empty", "lint": "eslint . --ext .ts,.tsx,.js,.jsx,.mjs,.cjs,.mts,.cts --cache --cache-location ../../.cache/eslint/assert.eslintcache", + "bench": "vitest bench --run", + "bench-watch": "vitest bench", "test": "vitest run", "test-unit": "vitest run", "test-unit-coverage": "vitest run --coverage", @@ -73,8 +75,10 @@ "@arethetypeswrong/cli": "0.15.3", "@belgattitude/eslint-config-bases": "5.9.0", "@edge-runtime/vm": "3.2.0", + "@sindresorhus/is": "6.3.1", "@size-limit/file": "11.1.4", "@size-limit/webpack": "11.1.4", + "@types/lodash-es": "4.17.12", "@vitest/coverage-istanbul": "1.6.0", "@vitest/ui": "1.6.0", "browserslist": "4.23.0", @@ -85,10 +89,12 @@ "esbuild-plugin-file-path-extensions": "2.1.1", "eslint": "8.57.0", "is-plain-obj": "4.1.0", + "lodash-es": "4.17.21", "npm-run-all2": "6.2.0", "rimraf": "5.0.7", "rollup": "4.18.0", "size-limit": "11.1.4", + "tinybench": "2.8.0", "tsup": "8.0.2", "type-fest": "4.18.2", "typedoc": "0.25.13", diff --git a/packages/assert/src/__tests__/object.guards.test.ts b/packages/assert/src/__tests__/object.guards.test.ts index 43ec4f4ed..02f3d5845 100644 --- a/packages/assert/src/__tests__/object.guards.test.ts +++ b/packages/assert/src/__tests__/object.guards.test.ts @@ -5,31 +5,47 @@ import { isPlainObject } from '../object.guards'; describe('Object typeguards tests', () => { describe('isPlainObject', () => { const str = 'key'; - const cases = [ + function fnWithProto(x: number) { + // @ts-expect-error for the sake of testing + this.x = x; + } + function ObjectConstructor() {} + ObjectConstructor.prototype.constructor = Object; + + const validPlainObjects = [ [{}, true], [Object.create(null), true], - [{ 1: 'cool' }, true], - [{ name: 'seb' }, true], - [{ [str]: 'seb' }, true], + [new Object({ key: 'new_object' }), true], + [new Object({ key: new Date() }), true], + [{ 1: 'integer_key' }, true], + [{ name: 'string_key' }, true], + [{ [str]: 'dynamic_string_key' }, true], [{ [Symbol('tag')]: 'value' }, true], - [{ children: [{ test: 1 }], name: 'deep-plain' }, true], + [{ children: [{ key: 'deep-children' }], name: 'deep-plain' }, true], [ - { children: [{ test: new Date() }], name: 'deep-with-regular-object' }, + { children: [{ key: new Date() }], name: 'deep-with-regular-object' }, true, ], [{ constructor: { name: 'Object2' } }, true], [JSON.parse('{}'), true], - // ############ Rejected ############################# + [new Proxy({}, {}), true], + [new Proxy({ key: 'proxied_key' }, {}), true], + ] as const; + + const invalidPlainObjects = [ ['hello', false], [false, false], [undefined, false], [null, false], [10, false], + [[], false], [Number.NaN, false], // functions and objects [() => 'cool', false], [new (class Cls {})(), false], + [new Intl.Locale('en'), false], [new (class extends Object {})(), false], + [fnWithProto, false], // Symbols [Symbol('cool'), false], [ @@ -51,6 +67,7 @@ describe('Object typeguards tests', () => { [JSON, false], [Math, false], [Atomics, false], + [JSON, false], // built-in classes [new Date(), false], [new Map(), false], @@ -63,17 +80,30 @@ describe('Object typeguards tests', () => { [/(\d+)/, false], // eslint-disable-next-line prefer-regex-literals [new RegExp('/d+/'), false], + [/d+/, false], // Template literals [`cool`, false], [String.raw`rawtemplate`, false], + // @ts-expect-error to allow testing crafted object + [new ObjectConstructor(), false], + [ + new Proxy(new Date(), { + get(target, _prop, _receiver) { + return target; + }, + }), + false, + ], ] as const; + + const cases = [...validPlainObjects, ...invalidPlainObjects] as const; it.each(cases)('when "%s" is given, should return %s', (v, expected) => { expect(isPlainObject(v)).toStrictEqual(expected); }); describe('Compatibility with is-plain-obj', () => { it.each(cases)( 'compat when "%s" is given, should return %s', - (v, expected) => { + (v, _expected) => { expect(isPlainObject(v)).toBe(isPlainObj(v)); } ); diff --git a/packages/assert/src/__tests__/object.types.test.ts b/packages/assert/src/__tests__/object.types.test.ts index bd0413597..604819ab7 100644 --- a/packages/assert/src/__tests__/object.types.test.ts +++ b/packages/assert/src/__tests__/object.types.test.ts @@ -1,50 +1,99 @@ -import { assertType } from 'vitest'; +import { assertType, expect, expectTypeOf } from 'vitest'; import { assertPlainObject } from '../object.asserts'; import { isPlainObject } from '../object.guards'; -import type { - PlainObject, - PlainObjectDeepPartialUnknown, -} from '../object.types'; +import type { PlainObjectDeepPartialUnknown } from '../object.internal.types'; +import type { PlainObject } from '../object.types'; describe('object types tests', () => { - describe('isPlainObject', () => { - it('should return a type PlainObject compatible with object', () => { - const po = {}; - assertPlainObject(po); - assertType(po); - assertType>(po); + describe('assertPlainObject', () => { + describe('when no generic is given', () => { + it('should return a type PlainObject compatible Record', () => { + const unknownPo = { + key: 'value', + } as unknown; + + // @ts-expect-error ensure our plain object is unknown + const _notInferrable1 = unknownPo.key; + // @ts-expect-error ensure our plain object is unknown + const _notInferrable2 = unknownPo.invalidKey; + + // act + assertPlainObject(unknownPo); + + // Now the type is Record, javascript allows to retrieve it + // even if it doesn't exist. The value should be undefined|unknown + const invalidKeyIsUnknown = unknownPo.invalidKey; + expect(invalidKeyIsUnknown).toBe(undefined); + // when removing the nullable (undefined) from the union + expectTypeOf(invalidKeyIsUnknown).toBeUnknown(); + + const unknownPo2 = unknownPo; + unknownPo2.key; + + assertType(unknownPo); + assertType>(unknownPo); + expectTypeOf(unknownPo.key).not.toBeString(); + expectTypeOf(unknownPo.key).not.toBeString(); + }); }); + }); - it('should return a type PlainObject with shaped values', () => { + describe('isPlainObject', () => { + it(`should not make any assumptions when the value isn't statically known`, () => { + const unknownPo = { + key: 'value', + } as unknown; + const typed = isPlainObject(unknownPo); + // eslint-disable-next-line jest/no-conditional-in-test + if (!typed) { + throw new Error('Test code is incorrect'); + } + assertType(unknownPo); + expectTypeOf(unknownPo.key).not.toBeString(); + }); + it(`should preserve typings if value is statically known`, () => { + const knownPo = { + key: 'value', + }; + const typed = isPlainObject(knownPo); + // eslint-disable-next-line jest/no-conditional-in-test + if (!typed) { + throw new Error('Test code is incorrect'); + } + assertType(knownPo); + expectTypeOf(knownPo.key).toBeString(); + }); + it('should offer convenience typings when a type is given', () => { type CustomType = { name: string; deep: { yes: boolean | null; }; }; - const po = { + const unknownPo = { name: 'hello', deep: { yes: true, }, } as unknown; - const typed = isPlainObject(po); + const typed = isPlainObject(unknownPo); // eslint-disable-next-line jest/no-conditional-in-test if (!typed) { throw new Error('Test code is incorrect'); } - assertType>(po); - assertType>(po); - assertType(po?.deep); - assertType(po?.deep?.yes); + assertType>(unknownPo); + assertType>(unknownPo); + assertType(unknownPo?.deep); + assertType(unknownPo?.deep?.yes); + expectTypeOf(unknownPo.name).not.toBeString(); }); it('should return a type PlainObject with shaped non null | undefined values', () => { type DeepCustomType = { id: number; requiredDeep: { - id: number; + idReq: number; }; data?: { test: string[]; @@ -58,7 +107,7 @@ describe('object types tests', () => { const po = { id: 1, requiredDeep: { - id: 1, + idReq: 1, }, data: { attributes: { @@ -74,13 +123,16 @@ describe('object types tests', () => { } assertType(po); assertType>(po); + assertType>(po); + assertType>(po); assertType>(po); assertType>(po); expectTypeOf(po?.data).not.toBeUnknown(); expectTypeOf(po?.data?.attributes).not.toBeUnknown(); expectTypeOf(po?.data?.attributes?.url).toBeUnknown(); + expectTypeOf(po?.data?.attributes?.url).not.toBeString(); expectTypeOf(po?.id).toBeUnknown(); - expectTypeOf(po?.requiredDeep?.id).toBeUnknown(); + expectTypeOf(po?.requiredDeep?.idReq).toBeUnknown(); }); }); }); diff --git a/packages/assert/src/object.asserts.ts b/packages/assert/src/object.asserts.ts index 35e27ac9d..03bee9b38 100644 --- a/packages/assert/src/object.asserts.ts +++ b/packages/assert/src/object.asserts.ts @@ -1,5 +1,9 @@ import { formatErrMsg } from './messages/errorMessages'; import { isPlainObject } from './object.guards'; +import type { + BasePlainObject, + UnspecifiedPlainObjectType, +} from './object.internal.types'; import type { PlainObject } from './object.types'; import type { MsgOrErrorFactory } from './types/internal.types'; import { createAssertException } from './utils/createAssertException'; @@ -9,11 +13,13 @@ import { createAssertException } from './utils/createAssertException'; * @throws TypeError */ export function assertPlainObject< - TValue extends Record = Record, + TValue extends Record = UnspecifiedPlainObjectType, >( v: unknown, msgOrErrorFactory?: MsgOrErrorFactory -): asserts v is PlainObject { +): asserts v is TValue extends UnspecifiedPlainObjectType + ? BasePlainObject + : PlainObject { if (!isPlainObject(v)) { throw createAssertException( msgOrErrorFactory, diff --git a/packages/assert/src/object.guards.ts b/packages/assert/src/object.guards.ts index 68be8e372..ca9ad594d 100644 --- a/packages/assert/src/object.guards.ts +++ b/packages/assert/src/object.guards.ts @@ -1,10 +1,40 @@ +import type { + BasePlainObject, + UnspecifiedPlainObjectType, +} from './object.internal.types'; import type { PlainObject } from './object.types'; +/** + * Check if a value is a plain object + * + * An object is plain if it's created by either {}, new Object(), or Object.create(null). + * + * @example + * ```typescript + * isPlainObject({ key: 'value' }); // πŸ‘ˆ βœ… true + * isPlainObject({ key: new Date() }); // πŸ‘ˆ βœ… true + * isPlainObject(new Object()); // πŸ‘ˆ βœ… true + * isPlainObject(Object.create(null)); // πŸ‘ˆ βœ… true + * isPlainObject({nested: { key: true} } // πŸ‘ˆ βœ… true + * + * class Test { }; + * + * isPlainObject(new Test()) // πŸ‘ˆ ❌ false + * isPlainObject(10); // πŸ‘ˆ ❌ false + * isPlainObject(null); // πŸ‘ˆ ❌ false + * isPlainObject('hello'); // πŸ‘ˆ ❌ false + * isPlainObject([]); // πŸ‘ˆ ❌ false + * isPlainObject(new Date()); // πŸ‘ˆ ❌ false + * isPlainObject(Math); // πŸ‘ˆ ❌ false + * (...) + */ export const isPlainObject = < - TValue extends Record = Record, + TValue extends Record = UnspecifiedPlainObjectType, >( v: unknown -): v is PlainObject => { +): v is TValue extends UnspecifiedPlainObjectType + ? BasePlainObject + : PlainObject => { if (!v || typeof v !== 'object') { return false; } diff --git a/packages/assert/src/object.internal.types.ts b/packages/assert/src/object.internal.types.ts new file mode 100644 index 000000000..d0dd6a395 --- /dev/null +++ b/packages/assert/src/object.internal.types.ts @@ -0,0 +1,15 @@ +import type { Simplify } from './types/internal.types'; + +export type PlainObjectKey = string; + +export type UnspecifiedPlainObjectType = BasePlainObject & { + readonly __httpxInternalTag: '@httpx/PlainObject'; +}; + +export type BasePlainObject = Record; + +export type PlainObjectDeepPartialUnknown = { + [P in keyof T]?: NonNullable extends BasePlainObject + ? Simplify>> + : unknown; +}; diff --git a/packages/assert/src/object.types.ts b/packages/assert/src/object.types.ts index 321726214..feaa04172 100644 --- a/packages/assert/src/object.types.ts +++ b/packages/assert/src/object.types.ts @@ -1,9 +1,13 @@ -export type PlainObjectDeepPartialUnknown = { - [P in keyof T]?: NonNullable extends Record - ? PlainObjectDeepPartialUnknown> - : unknown; -}; +import type { + BasePlainObject, + PlainObjectDeepPartialUnknown, + PlainObjectKey, + UnspecifiedPlainObjectType, +} from './object.internal.types'; +import type { Simplify } from './types/internal.types'; export type PlainObject< - TValue extends Record = Record, -> = PlainObjectDeepPartialUnknown; + TValue extends BasePlainObject = UnspecifiedPlainObjectType, +> = TValue extends UnspecifiedPlainObjectType + ? Record + : Simplify>; diff --git a/packages/assert/src/types/internal.types.ts b/packages/assert/src/types/internal.types.ts index 02c072b65..ea68c8cc4 100644 --- a/packages/assert/src/types/internal.types.ts +++ b/packages/assert/src/types/internal.types.ts @@ -1 +1,8 @@ export type MsgOrErrorFactory = string | (() => Error); + +/** + * @credits https://github.com/sindresorhus/type-fest/blob/main/source/simplify.d.ts + */ +export type Simplify = { + [KeyType in keyof T]: T[KeyType]; +} & NonNullable; diff --git a/packages/assert/vitest.config.ts b/packages/assert/vitest.config.ts index 3a19422a1..8895a8aea 100644 --- a/packages/assert/vitest.config.ts +++ b/packages/assert/vitest.config.ts @@ -21,6 +21,10 @@ export default defineConfig({ typecheck: { enabled: false, }, + benchmark: { + reporters: ['default'], + outputJson: './bench/output/benchmark-results.json', + }, pool: 'forks', poolOptions: { vmThreads: { @@ -33,11 +37,6 @@ export default defineConfig({ isolate: false, // perf+++ }, }, - benchmark: { - // reporters: [], - outputFile: './bench/benchmark-results.md', - }, - environment: 'node', exclude: [ '**/node_modules/**', diff --git a/yarn.lock b/yarn.lock index 0334dd724..e79f2572a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -60,238 +60,237 @@ __metadata: languageName: node linkType: hard -"@babel/code-frame@npm:^7.0.0, @babel/code-frame@npm:^7.23.5, @babel/code-frame@npm:^7.24.2": - version: 7.24.2 - resolution: "@babel/code-frame@npm:7.24.2" +"@babel/code-frame@npm:^7.0.0, @babel/code-frame@npm:^7.24.6": + version: 7.24.6 + resolution: "@babel/code-frame@npm:7.24.6" dependencies: - "@babel/highlight": "npm:^7.24.2" + "@babel/highlight": "npm:^7.24.6" picocolors: "npm:^1.0.0" - checksum: 10/7db8f5b36ffa3f47a37f58f61e3d130b9ecad21961f3eede7e2a4ac2c7e4a5efb6e9d03a810c669bc986096831b6c0dfc2c3082673d93351b82359c1b03e0590 + checksum: 10/e9b70af2a9c7c734ac36c2e6e1da640a6e0a483bfba7cf620226a1226a2e6d64961324b02d786e06ce72f0aa329e190dfc49128367a2368b69e2219ffddcdcc5 languageName: node linkType: hard -"@babel/compat-data@npm:^7.23.5": - version: 7.24.4 - resolution: "@babel/compat-data@npm:7.24.4" - checksum: 10/e51faec0ac8259f03cc5029d2b4a944b4fee44cb5188c11530769d5beb81f384d031dba951febc3e33dbb48ceb8045b1184f5c1ac4c5f86ab1f5e951e9aaf7af +"@babel/compat-data@npm:^7.24.6": + version: 7.24.6 + resolution: "@babel/compat-data@npm:7.24.6" + checksum: 10/c355141e4649ef6efa413d71cfc1efb183be46b8fc945fc17e3c7f4313b4b566af575a4183450697916cd6b8c7f180e315986b5d7f07e7b7afd0786594754f7d languageName: node linkType: hard "@babel/core@npm:^7.21.3, @babel/core@npm:^7.23.9": - version: 7.24.5 - resolution: "@babel/core@npm:7.24.5" + version: 7.24.6 + resolution: "@babel/core@npm:7.24.6" dependencies: "@ampproject/remapping": "npm:^2.2.0" - "@babel/code-frame": "npm:^7.24.2" - "@babel/generator": "npm:^7.24.5" - "@babel/helper-compilation-targets": "npm:^7.23.6" - "@babel/helper-module-transforms": "npm:^7.24.5" - "@babel/helpers": "npm:^7.24.5" - "@babel/parser": "npm:^7.24.5" - "@babel/template": "npm:^7.24.0" - "@babel/traverse": "npm:^7.24.5" - "@babel/types": "npm:^7.24.5" + "@babel/code-frame": "npm:^7.24.6" + "@babel/generator": "npm:^7.24.6" + "@babel/helper-compilation-targets": "npm:^7.24.6" + "@babel/helper-module-transforms": "npm:^7.24.6" + "@babel/helpers": "npm:^7.24.6" + "@babel/parser": "npm:^7.24.6" + "@babel/template": "npm:^7.24.6" + "@babel/traverse": "npm:^7.24.6" + "@babel/types": "npm:^7.24.6" convert-source-map: "npm:^2.0.0" debug: "npm:^4.1.0" gensync: "npm:^1.0.0-beta.2" json5: "npm:^2.2.3" semver: "npm:^6.3.1" - checksum: 10/b0d02c51f39cc4c6f8fcaab7052d17dea63aab36d7e2567bfbad074e5a027df737ebcaf3029c3a659bc719bbac806311c2e8786be1d686abd093c48a6068395c + checksum: 10/49cd61b99984f0197f657690ec250fb68897de16180116ed0d4f66341eddd85757fd7ec20ba4fcf255990568515f3dd55248c30f1f831cbfaa1da4602a000e4e languageName: node linkType: hard -"@babel/generator@npm:^7.24.5": - version: 7.24.5 - resolution: "@babel/generator@npm:7.24.5" +"@babel/generator@npm:^7.24.6": + version: 7.24.6 + resolution: "@babel/generator@npm:7.24.6" dependencies: - "@babel/types": "npm:^7.24.5" + "@babel/types": "npm:^7.24.6" "@jridgewell/gen-mapping": "npm:^0.3.5" "@jridgewell/trace-mapping": "npm:^0.3.25" jsesc: "npm:^2.5.1" - checksum: 10/7a3782f1d2f824025a538444a0fce44f5b30a7b013984279561bcb3450eec91a41526533fd0b25b1a6fde627bebd0e645c0ea2aa907cc15c7f3da2d9eb71f069 + checksum: 10/247002f1246c3cb825497dc7ce55dc1d10c5f0486f546d1c087aeed7e38df6eb7837758fdfa2ae1234c26c60f883756fd79b7b3f0443771bd79bdfbb0dde8cd4 languageName: node linkType: hard -"@babel/helper-compilation-targets@npm:^7.23.6": - version: 7.23.6 - resolution: "@babel/helper-compilation-targets@npm:7.23.6" +"@babel/helper-compilation-targets@npm:^7.24.6": + version: 7.24.6 + resolution: "@babel/helper-compilation-targets@npm:7.24.6" dependencies: - "@babel/compat-data": "npm:^7.23.5" - "@babel/helper-validator-option": "npm:^7.23.5" + "@babel/compat-data": "npm:^7.24.6" + "@babel/helper-validator-option": "npm:^7.24.6" browserslist: "npm:^4.22.2" lru-cache: "npm:^5.1.1" semver: "npm:^6.3.1" - checksum: 10/05595cd73087ddcd81b82d2f3297aac0c0422858dfdded43d304786cf680ec33e846e2317e6992d2c964ee61d93945cbf1fa8ec80b55aee5bfb159227fb02cb9 + checksum: 10/28f34f2c9e0ec047360c4dca8d4fb99009e868f9c1acad0ca125f2f9990790897216155d44935209c6e4c4e0318f5a9a46304771d75823add7400e3079945314 languageName: node linkType: hard -"@babel/helper-environment-visitor@npm:^7.22.20": - version: 7.22.20 - resolution: "@babel/helper-environment-visitor@npm:7.22.20" - checksum: 10/d80ee98ff66f41e233f36ca1921774c37e88a803b2f7dca3db7c057a5fea0473804db9fb6729e5dbfd07f4bed722d60f7852035c2c739382e84c335661590b69 +"@babel/helper-environment-visitor@npm:^7.24.6": + version: 7.24.6 + resolution: "@babel/helper-environment-visitor@npm:7.24.6" + checksum: 10/9c2b3f1ee7ba46b61b0482efab6d37f5c76f0ea4e9d9775df44a89644729c3a50101040a0233543ec6c3f416d8e548d337f310ff3e164f847945507428ee39e5 languageName: node linkType: hard -"@babel/helper-function-name@npm:^7.23.0": - version: 7.23.0 - resolution: "@babel/helper-function-name@npm:7.23.0" +"@babel/helper-function-name@npm:^7.24.6": + version: 7.24.6 + resolution: "@babel/helper-function-name@npm:7.24.6" dependencies: - "@babel/template": "npm:^7.22.15" - "@babel/types": "npm:^7.23.0" - checksum: 10/7b2ae024cd7a09f19817daf99e0153b3bf2bc4ab344e197e8d13623d5e36117ed0b110914bc248faa64e8ccd3e97971ec7b41cc6fd6163a2b980220c58dcdf6d + "@babel/template": "npm:^7.24.6" + "@babel/types": "npm:^7.24.6" + checksum: 10/66c0669c16f9fd8b977303c3bd233f962a803de409f4a1db43d965c7cd3ddc12a07b82eb8e06624d76237726407b33fc6d6987a1e40e0c32fc1fc2c5be49340b languageName: node linkType: hard -"@babel/helper-hoist-variables@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/helper-hoist-variables@npm:7.22.5" +"@babel/helper-hoist-variables@npm:^7.24.6": + version: 7.24.6 + resolution: "@babel/helper-hoist-variables@npm:7.24.6" dependencies: - "@babel/types": "npm:^7.22.5" - checksum: 10/394ca191b4ac908a76e7c50ab52102669efe3a1c277033e49467913c7ed6f7c64d7eacbeabf3bed39ea1f41731e22993f763b1edce0f74ff8563fd1f380d92cc + "@babel/types": "npm:^7.24.6" + checksum: 10/4819b574393a5214aff6ae02a6e5250ace2564f8bcdb28d580ffec57bbb2092425e8f39563d75cfa268940a01fd425bad503c0b92717c12426f15cf6847855d3 languageName: node linkType: hard -"@babel/helper-module-imports@npm:^7.24.3": - version: 7.24.3 - resolution: "@babel/helper-module-imports@npm:7.24.3" +"@babel/helper-module-imports@npm:^7.24.6": + version: 7.24.6 + resolution: "@babel/helper-module-imports@npm:7.24.6" dependencies: - "@babel/types": "npm:^7.24.0" - checksum: 10/42fe124130b78eeb4bb6af8c094aa749712be0f4606f46716ce74bc18a5ea91c918c547c8bb2307a2e4b33f163e4ad2cb6a7b45f80448e624eae45b597ea3499 + "@babel/types": "npm:^7.24.6" + checksum: 10/38c4432191219a10fe39178e148b295a353a802d3601ed219df6979d322b8179a57f37ee8c0d645f1304023a6b96c4aee351bf7cabe8036b294bfe3b9496ab43 languageName: node linkType: hard -"@babel/helper-module-transforms@npm:^7.24.5": - version: 7.24.5 - resolution: "@babel/helper-module-transforms@npm:7.24.5" +"@babel/helper-module-transforms@npm:^7.24.6": + version: 7.24.6 + resolution: "@babel/helper-module-transforms@npm:7.24.6" dependencies: - "@babel/helper-environment-visitor": "npm:^7.22.20" - "@babel/helper-module-imports": "npm:^7.24.3" - "@babel/helper-simple-access": "npm:^7.24.5" - "@babel/helper-split-export-declaration": "npm:^7.24.5" - "@babel/helper-validator-identifier": "npm:^7.24.5" + "@babel/helper-environment-visitor": "npm:^7.24.6" + "@babel/helper-module-imports": "npm:^7.24.6" + "@babel/helper-simple-access": "npm:^7.24.6" + "@babel/helper-split-export-declaration": "npm:^7.24.6" + "@babel/helper-validator-identifier": "npm:^7.24.6" peerDependencies: "@babel/core": ^7.0.0 - checksum: 10/1a91e8abc2f427f8273ce3b99ef7b9c013eb3628221428553e0d4bc9c6db2e73bc4fc1b8535bd258544936accab9380e0d095f2449f913cad650ddee744b2124 + checksum: 10/e162d0c1d876006d6989eadb9868be688784ea16a719cdce5df22541eac9547bebb137dc4d64f4d0349265b52a3633074a09c33785709e5c198696590d46402d languageName: node linkType: hard -"@babel/helper-simple-access@npm:^7.24.5": - version: 7.24.5 - resolution: "@babel/helper-simple-access@npm:7.24.5" +"@babel/helper-simple-access@npm:^7.24.6": + version: 7.24.6 + resolution: "@babel/helper-simple-access@npm:7.24.6" dependencies: - "@babel/types": "npm:^7.24.5" - checksum: 10/db8768a16592faa1bde9061cac3d903bdbb2ddb2a7e9fb73c5904daee1f1b1dc69ba4d249dc22c45885c0d4b54fd0356ee78e6d67a9a90330c7dd37e6cd3acff + "@babel/types": "npm:^7.24.6" + checksum: 10/4649d08f3e5eb30240f49ef7951b12d02ae4c30e6bef7b1b79ade587ff0b73223f3be840f6144b49c6b1a4a9dece890ada279b0844345ea8c011fb064fa2b9a3 languageName: node linkType: hard -"@babel/helper-split-export-declaration@npm:^7.24.5": - version: 7.24.5 - resolution: "@babel/helper-split-export-declaration@npm:7.24.5" +"@babel/helper-split-export-declaration@npm:^7.24.6": + version: 7.24.6 + resolution: "@babel/helper-split-export-declaration@npm:7.24.6" dependencies: - "@babel/types": "npm:^7.24.5" - checksum: 10/84777b6304ef0fe6501038985b61aaa118082688aa54eca8265f14f3ae2e01adf137e9111f4eb9870e0e9bc23901e0b8859bb2a9e4362ddf89d05e1c409c2422 + "@babel/types": "npm:^7.24.6" + checksum: 10/48ded9611f87a23bc962c9cd576cc653bd78eab3d9987d3b1c18571481d0d17d7d29397a5c07a1f5e182ef1a1c6f420b9934975bf57e8d7cbcb8d8853cc21d6c languageName: node linkType: hard -"@babel/helper-string-parser@npm:^7.24.1": - version: 7.24.1 - resolution: "@babel/helper-string-parser@npm:7.24.1" - checksum: 10/04c0ede77b908b43e6124753b48bc485528112a9335f0a21a226bff1ace75bb6e64fab24c85cb4b1610ef3494dacd1cb807caeb6b79a7b36c43d48c289b35949 +"@babel/helper-string-parser@npm:^7.24.6": + version: 7.24.6 + resolution: "@babel/helper-string-parser@npm:7.24.6" + checksum: 10/a24631e13850eb24a5e88fba4d1b86115a79f6d4a0b3a96641fdcdc4a6d706d7e09f17ae77fa26bc72a8a7253bc83b535a2e2865a78185ed1f957b299ea6c59c languageName: node linkType: hard -"@babel/helper-validator-identifier@npm:^7.24.5": - version: 7.24.5 - resolution: "@babel/helper-validator-identifier@npm:7.24.5" - checksum: 10/38aaf6a64a0ea2e84766165b461deda3c24fd2173dff18419a2cc9e1ea1d3e709039aee94db29433a07011492717c80900a5eb564cdca7d137757c3c69e26898 +"@babel/helper-validator-identifier@npm:^7.24.5, @babel/helper-validator-identifier@npm:^7.24.6": + version: 7.24.6 + resolution: "@babel/helper-validator-identifier@npm:7.24.6" + checksum: 10/7e725ef0684291ca3306d5174a5d1cd9072ad58ba444cfa50aaf92a5c59dd723fa15031733ac598bb6b066cb62c2472e14cd82325522348977a72e99aa21b97a languageName: node linkType: hard -"@babel/helper-validator-option@npm:^7.23.5": - version: 7.23.5 - resolution: "@babel/helper-validator-option@npm:7.23.5" - checksum: 10/537cde2330a8aede223552510e8a13e9c1c8798afee3757995a7d4acae564124fe2bf7e7c3d90d62d3657434a74340a274b3b3b1c6f17e9a2be1f48af29cb09e +"@babel/helper-validator-option@npm:^7.24.6": + version: 7.24.6 + resolution: "@babel/helper-validator-option@npm:7.24.6" + checksum: 10/5defb2da74e1cac9497016f4e41698aeed75ec7a5e9dc07e777cdb67ef73cd2e27bd2bf8a3ab8d37e0b93a6a45524a9728f03e263afdef452436cf74794bde87 languageName: node linkType: hard -"@babel/helpers@npm:^7.24.5": - version: 7.24.5 - resolution: "@babel/helpers@npm:7.24.5" +"@babel/helpers@npm:^7.24.6": + version: 7.24.6 + resolution: "@babel/helpers@npm:7.24.6" dependencies: - "@babel/template": "npm:^7.24.0" - "@babel/traverse": "npm:^7.24.5" - "@babel/types": "npm:^7.24.5" - checksum: 10/efd74325823c70a32aa9f5e263c8eb0a1f729f5e9ea168e3226fa92a10b1702593b76034812e9f7b560d6447f9cd446bad231d7086af842129c6596306300094 + "@babel/template": "npm:^7.24.6" + "@babel/types": "npm:^7.24.6" + checksum: 10/9043f7140651e89246d0653c7198832e644865038dc18c117c492d450f237514764d1476faa1ba7466b83b348891f10f564b0c5615d86d6833fb275ead7fb259 languageName: node linkType: hard -"@babel/highlight@npm:^7.24.2": - version: 7.24.5 - resolution: "@babel/highlight@npm:7.24.5" +"@babel/highlight@npm:^7.24.6": + version: 7.24.6 + resolution: "@babel/highlight@npm:7.24.6" dependencies: - "@babel/helper-validator-identifier": "npm:^7.24.5" + "@babel/helper-validator-identifier": "npm:^7.24.6" chalk: "npm:^2.4.2" js-tokens: "npm:^4.0.0" picocolors: "npm:^1.0.0" - checksum: 10/afde0403154ad69ecd58a98903058e776760444bf4d0363fb740a8596bc6278b72c5226637c4f6b3674d70acb1665207fe2fcecfe93a74f2f4ab033e89fd7e8c + checksum: 10/e11cd39ceb01c9b5e4f2684a45caefe7b2d7bb74997c30922e6b4063a6f16aff88356091350f0af01f044e1a198579a6b5c4161a84d0a6090e63a41167569daf languageName: node linkType: hard -"@babel/parser@npm:^7.23.9, @babel/parser@npm:^7.24.0, @babel/parser@npm:^7.24.4, @babel/parser@npm:^7.24.5": - version: 7.24.5 - resolution: "@babel/parser@npm:7.24.5" +"@babel/parser@npm:^7.23.9, @babel/parser@npm:^7.24.4, @babel/parser@npm:^7.24.6": + version: 7.24.6 + resolution: "@babel/parser@npm:7.24.6" bin: parser: ./bin/babel-parser.js - checksum: 10/f5ed1c5fd4b0045a364fb906f54fd30e2fff93a45069068b6d80d3ab2b64f5569c90fb41d39aff80fb7e925ca4d44917965a76776a3ca11924ec1fae3be5d1ea + checksum: 10/48af4251d030623a8fbf22979fc718bd9dead6ba6a64cae717270c6c809faaf303d137d82593912291ee761130c4731f0c25feb54629ba3fa4edcc496690cb44 languageName: node linkType: hard "@babel/runtime@npm:^7.20.1, @babel/runtime@npm:^7.23.2, @babel/runtime@npm:^7.23.8, @babel/runtime@npm:^7.5.5": - version: 7.24.5 - resolution: "@babel/runtime@npm:7.24.5" + version: 7.24.6 + resolution: "@babel/runtime@npm:7.24.6" dependencies: regenerator-runtime: "npm:^0.14.0" - checksum: 10/e0f4f4d4503f7338749d1dd92361ad132d683bde64e6b61d6c855e100dcd01592295fcfdcc960c946b85ef7908dc2f501080da58447c05812cf3cd80c599bb62 + checksum: 10/6c4e12731cd9206a883c19d48fa04f6aaaf7ee83f049b22631e6521b866edc20832b4d5db30aa86d8ae799c4dcf57761fe8a4af2bf7e233245c079c1dafb5668 languageName: node linkType: hard -"@babel/template@npm:^7.22.15, @babel/template@npm:^7.24.0": - version: 7.24.0 - resolution: "@babel/template@npm:7.24.0" +"@babel/template@npm:^7.24.6": + version: 7.24.6 + resolution: "@babel/template@npm:7.24.6" dependencies: - "@babel/code-frame": "npm:^7.23.5" - "@babel/parser": "npm:^7.24.0" - "@babel/types": "npm:^7.24.0" - checksum: 10/8c538338c7de8fac8ada691a5a812bdcbd60bd4a4eb5adae2cc9ee19773e8fb1a724312a00af9e1ce49056ffd3c3475e7287b5668cf6360bfb3f8ac827a06ffe + "@babel/code-frame": "npm:^7.24.6" + "@babel/parser": "npm:^7.24.6" + "@babel/types": "npm:^7.24.6" + checksum: 10/e4641733dfb29b15f1b7f1a81579b3131d854d5aa2dc37a8b827e4eb6839c752cba45570934041b9f3dcf0edde8328f5313b092eaa6c7a342020b59d355f8bf5 languageName: node linkType: hard -"@babel/traverse@npm:^7.24.5": - version: 7.24.5 - resolution: "@babel/traverse@npm:7.24.5" +"@babel/traverse@npm:^7.24.6": + version: 7.24.6 + resolution: "@babel/traverse@npm:7.24.6" dependencies: - "@babel/code-frame": "npm:^7.24.2" - "@babel/generator": "npm:^7.24.5" - "@babel/helper-environment-visitor": "npm:^7.22.20" - "@babel/helper-function-name": "npm:^7.23.0" - "@babel/helper-hoist-variables": "npm:^7.22.5" - "@babel/helper-split-export-declaration": "npm:^7.24.5" - "@babel/parser": "npm:^7.24.5" - "@babel/types": "npm:^7.24.5" + "@babel/code-frame": "npm:^7.24.6" + "@babel/generator": "npm:^7.24.6" + "@babel/helper-environment-visitor": "npm:^7.24.6" + "@babel/helper-function-name": "npm:^7.24.6" + "@babel/helper-hoist-variables": "npm:^7.24.6" + "@babel/helper-split-export-declaration": "npm:^7.24.6" + "@babel/parser": "npm:^7.24.6" + "@babel/types": "npm:^7.24.6" debug: "npm:^4.3.1" globals: "npm:^11.1.0" - checksum: 10/e237de56e0c30795293fdb6f2cb09a75e6230836e3dc67dc4fa21781eb4d5842996bf3af95bc57ac5c7e6e97d06446f14732d0952eb57d5d9643de7c4f95bee6 + checksum: 10/11e5904f9aa255ac1470c6966e1898a718ea0cc7f41938a30df1a20dc31dfea34f66791a5ee0dd6d8d485230fe2e970d8301fa6908a524b3e7c96e52c0112ab6 languageName: node linkType: hard -"@babel/types@npm:^7.21.3, @babel/types@npm:^7.22.5, @babel/types@npm:^7.23.0, @babel/types@npm:^7.24.0, @babel/types@npm:^7.24.5, @babel/types@npm:^7.8.3": - version: 7.24.5 - resolution: "@babel/types@npm:7.24.5" +"@babel/types@npm:^7.21.3, @babel/types@npm:^7.24.0, @babel/types@npm:^7.24.6, @babel/types@npm:^7.8.3": + version: 7.24.6 + resolution: "@babel/types@npm:7.24.6" dependencies: - "@babel/helper-string-parser": "npm:^7.24.1" - "@babel/helper-validator-identifier": "npm:^7.24.5" + "@babel/helper-string-parser": "npm:^7.24.6" + "@babel/helper-validator-identifier": "npm:^7.24.6" to-fast-properties: "npm:^2.0.0" - checksum: 10/259e7512476ae64830e73f2addf143159232bcbf0eba6a6a27cab25a960cd353a11c826eb54185fdf7d8d9865922cbcd6522149e9ec55b967131193f9c9111a1 + checksum: 10/34552539cdc740513650cb3c7754f77a55cc5253dff9d45afd52292d366eb1c099939d5db066e458abcf4c9a7dedfe43467445f9c2208b3cb64866762dee5e9d languageName: node linkType: hard @@ -302,68 +301,6 @@ __metadata: languageName: node linkType: hard -"@belgattitude/eslint-config-bases@npm:5.8.0": - version: 5.8.0 - resolution: "@belgattitude/eslint-config-bases@npm:5.8.0" - dependencies: - "@rushstack/eslint-patch": "npm:^1.10.2" - "@tanstack/eslint-plugin-query": "npm:^5.35.6" - "@typescript-eslint/eslint-plugin": "npm:^7.9.0" - "@typescript-eslint/parser": "npm:^7.9.0" - "@typescript-eslint/typescript-estree": "npm:^7.9.0" - "@typescript-eslint/utils": "npm:^7.9.0" - eslint-config-prettier: "npm:^9.1.0" - eslint-import-resolver-typescript: "npm:^3.6.1" - eslint-plugin-import: "npm:^2.29.1" - eslint-plugin-import-x: "npm:^0.5.0" - eslint-plugin-jest: "npm:^28.5.0" - eslint-plugin-jest-formatting: "npm:^3.1.0" - eslint-plugin-jsx-a11y: "npm:^6.8.0" - eslint-plugin-perfectionist: "npm:^2.10.0" - eslint-plugin-playwright: "npm:^1.6.1" - eslint-plugin-prettier: "npm:^5.1.3" - eslint-plugin-react: "npm:^7.34.1" - eslint-plugin-react-hooks: "npm:^4.6.2 || 5.0.0-canary-7118f5dd7-20230705" - eslint-plugin-regexp: "npm:^2.5.0" - eslint-plugin-simple-import-sort: "npm:^12.1.0" - eslint-plugin-sonarjs: "npm:^0.25.1" - eslint-plugin-storybook: "npm:^0.8.0" - eslint-plugin-testing-library: "npm:^6.2.2" - eslint-plugin-unicorn: "npm:^53.0.0" - eslint-plugin-unused-imports: "npm:^3.2.0" - peerDependencies: - "@graphql-eslint/eslint-plugin": ^3.20.1 - eslint: ^8.56.0 - eslint-plugin-mdx: ^3.1.5 - eslint-plugin-tailwindcss: ^3.15.1 - graphql: ^16.7.0 - prettier: ">=3.2.0 <5.0.0" - react: ">=18.2.0" - react-dom: ">=18.2.0" - typescript: ^5.2.2 - peerDependenciesMeta: - "@graphql-eslint/eslint-plugin": - optional: true - eslint-plugin-mdx: - optional: true - eslint-plugin-tailwindcss: - optional: true - graphql: - optional: true - prettier: - optional: true - react: - optional: true - react-dom: - optional: true - tailwindcss: - optional: true - typescript: - optional: true - checksum: 10/a35c8b203c884629d74f6de7ed50565289202a97ccb9a17eb3c637efb8897ca6925b8a3e7e5e9f26b1d57da7d9af7aa1f84623f8a2eca1b31362efce60e015d7 - languageName: node - linkType: hard - "@belgattitude/eslint-config-bases@npm:5.9.0": version: 5.9.0 resolution: "@belgattitude/eslint-config-bases@npm:5.9.0" @@ -426,31 +363,6 @@ __metadata: languageName: node linkType: hard -"@bench/assert@workspace:bench/assert": - version: 0.0.0-use.local - resolution: "@bench/assert@workspace:bench/assert" - dependencies: - "@belgattitude/eslint-config-bases": "npm:5.9.0" - "@httpx/assert": "workspace:^" - "@sindresorhus/is": "npm:6.3.1" - "@types/lodash-es": "npm:4.17.12" - cross-env: "npm:7.0.3" - esbuild: "npm:0.21.3" - eslint: "npm:8.57.0" - is-plain-obj: "npm:4.1.0" - lodash-es: "npm:4.17.21" - moderndash: "npm:3.12.0" - rimraf: "npm:5.0.7" - tinybench: "npm:2.8.0" - tsx: "npm:4.11.0" - type-fest: "npm:4.18.2" - typescript: "npm:5.4.5" - vite: "npm:5.2.11" - vite-tsconfig-paths: "npm:4.3.2" - vitest: "npm:1.6.0" - languageName: unknown - linkType: soft - "@braintree/sanitize-url@npm:^6.0.1": version: 6.0.4 resolution: "@braintree/sanitize-url@npm:6.0.4" @@ -1186,8 +1098,8 @@ __metadata: linkType: hard "@eslint/eslintrc@npm:^3.0.2": - version: 3.0.2 - resolution: "@eslint/eslintrc@npm:3.0.2" + version: 3.1.0 + resolution: "@eslint/eslintrc@npm:3.1.0" dependencies: ajv: "npm:^6.12.4" debug: "npm:^4.3.2" @@ -1198,7 +1110,7 @@ __metadata: js-yaml: "npm:^4.1.0" minimatch: "npm:^3.1.2" strip-json-comments: "npm:^3.1.1" - checksum: 10/04e3d7de2b16fd59ba8985ecd6922eb488e630f94e4433858567a8a6c99b478bb7b47854b166b830b44905759547d0a03654eb1265952c812d5d1d70e3e4ccf9 + checksum: 10/02bf892d1397e1029209dea685e9f4f87baf643315df2a632b5f121ec7e8548a3b34f428a007234fa82772218fa8a3ac2d10328637b9ce63b7f8344035b74db3 languageName: node linkType: hard @@ -1213,17 +1125,17 @@ __metadata: version: 0.0.0-use.local resolution: "@examples/nextjs-app@workspace:examples/nextjs-app" dependencies: - "@belgattitude/eslint-config-bases": "npm:5.8.0" + "@belgattitude/eslint-config-bases": "npm:5.9.0" "@httpx/assert": "workspace:^" "@httpx/dsn-parser": "workspace:^" "@httpx/exception": "workspace:^" "@types/node": "npm:20.12.12" - "@types/react": "npm:18.3.2" + "@types/react": "npm:18.3.3" "@types/react-dom": "npm:18.3.0" - "@vitejs/plugin-react-swc": "npm:3.6.0" + "@vitejs/plugin-react-swc": "npm:3.7.0" "@vitest/coverage-v8": "npm:1.6.0" "@vitest/ui": "npm:1.6.0" - axios: "npm:1.6.8" + axios: "npm:1.7.2" cross-env: "npm:7.0.3" eslint: "npm:8.57.0" eslint-config-next: "npm:14.2.3" @@ -1267,8 +1179,10 @@ __metadata: "@arethetypeswrong/cli": "npm:0.15.3" "@belgattitude/eslint-config-bases": "npm:5.9.0" "@edge-runtime/vm": "npm:3.2.0" + "@sindresorhus/is": "npm:6.3.1" "@size-limit/file": "npm:11.1.4" "@size-limit/webpack": "npm:11.1.4" + "@types/lodash-es": "npm:4.17.12" "@vitest/coverage-istanbul": "npm:1.6.0" "@vitest/ui": "npm:1.6.0" browserslist: "npm:4.23.0" @@ -1279,10 +1193,12 @@ __metadata: esbuild-plugin-file-path-extensions: "npm:2.1.1" eslint: "npm:8.57.0" is-plain-obj: "npm:4.1.0" + lodash-es: "npm:4.17.21" npm-run-all2: "npm:6.2.0" rimraf: "npm:5.0.7" rollup: "npm:4.18.0" size-limit: "npm:11.1.4" + tinybench: "npm:2.8.0" tsup: "npm:8.0.2" type-fest: "npm:4.18.2" typedoc: "npm:0.25.13" @@ -1815,84 +1731,84 @@ __metadata: languageName: node linkType: hard -"@nrwl/tao@npm:19.0.7": - version: 19.0.7 - resolution: "@nrwl/tao@npm:19.0.7" +"@nrwl/tao@npm:19.0.8": + version: 19.0.8 + resolution: "@nrwl/tao@npm:19.0.8" dependencies: - nx: "npm:19.0.7" + nx: "npm:19.0.8" tslib: "npm:^2.3.0" bin: tao: index.js - checksum: 10/bfc99dff56f54c7756bfbd6b175aca66b01234109a712408722fe88a781dc4e333296e700fa5ef9f6fb30694ab43b8f0faee2ba13ed54dfa7625e5c280602f28 + checksum: 10/b62774319de9b851a91c8d2463843a230d2ad3699260920006394abe2016a7d8d5579b7a72d2989b977224f58f47644a409fbabd41173082aa3bd0602d19210a languageName: node linkType: hard -"@nx/nx-darwin-arm64@npm:19.0.7": - version: 19.0.7 - resolution: "@nx/nx-darwin-arm64@npm:19.0.7" +"@nx/nx-darwin-arm64@npm:19.0.8": + version: 19.0.8 + resolution: "@nx/nx-darwin-arm64@npm:19.0.8" conditions: os=darwin & cpu=arm64 languageName: node linkType: hard -"@nx/nx-darwin-x64@npm:19.0.7": - version: 19.0.7 - resolution: "@nx/nx-darwin-x64@npm:19.0.7" +"@nx/nx-darwin-x64@npm:19.0.8": + version: 19.0.8 + resolution: "@nx/nx-darwin-x64@npm:19.0.8" conditions: os=darwin & cpu=x64 languageName: node linkType: hard -"@nx/nx-freebsd-x64@npm:19.0.7": - version: 19.0.7 - resolution: "@nx/nx-freebsd-x64@npm:19.0.7" +"@nx/nx-freebsd-x64@npm:19.0.8": + version: 19.0.8 + resolution: "@nx/nx-freebsd-x64@npm:19.0.8" conditions: os=freebsd & cpu=x64 languageName: node linkType: hard -"@nx/nx-linux-arm-gnueabihf@npm:19.0.7": - version: 19.0.7 - resolution: "@nx/nx-linux-arm-gnueabihf@npm:19.0.7" +"@nx/nx-linux-arm-gnueabihf@npm:19.0.8": + version: 19.0.8 + resolution: "@nx/nx-linux-arm-gnueabihf@npm:19.0.8" conditions: os=linux & cpu=arm languageName: node linkType: hard -"@nx/nx-linux-arm64-gnu@npm:19.0.7": - version: 19.0.7 - resolution: "@nx/nx-linux-arm64-gnu@npm:19.0.7" +"@nx/nx-linux-arm64-gnu@npm:19.0.8": + version: 19.0.8 + resolution: "@nx/nx-linux-arm64-gnu@npm:19.0.8" conditions: os=linux & cpu=arm64 & libc=glibc languageName: node linkType: hard -"@nx/nx-linux-arm64-musl@npm:19.0.7": - version: 19.0.7 - resolution: "@nx/nx-linux-arm64-musl@npm:19.0.7" +"@nx/nx-linux-arm64-musl@npm:19.0.8": + version: 19.0.8 + resolution: "@nx/nx-linux-arm64-musl@npm:19.0.8" conditions: os=linux & cpu=arm64 & libc=musl languageName: node linkType: hard -"@nx/nx-linux-x64-gnu@npm:19.0.7": - version: 19.0.7 - resolution: "@nx/nx-linux-x64-gnu@npm:19.0.7" +"@nx/nx-linux-x64-gnu@npm:19.0.8": + version: 19.0.8 + resolution: "@nx/nx-linux-x64-gnu@npm:19.0.8" conditions: os=linux & cpu=x64 & libc=glibc languageName: node linkType: hard -"@nx/nx-linux-x64-musl@npm:19.0.7": - version: 19.0.7 - resolution: "@nx/nx-linux-x64-musl@npm:19.0.7" +"@nx/nx-linux-x64-musl@npm:19.0.8": + version: 19.0.8 + resolution: "@nx/nx-linux-x64-musl@npm:19.0.8" conditions: os=linux & cpu=x64 & libc=musl languageName: node linkType: hard -"@nx/nx-win32-arm64-msvc@npm:19.0.7": - version: 19.0.7 - resolution: "@nx/nx-win32-arm64-msvc@npm:19.0.7" +"@nx/nx-win32-arm64-msvc@npm:19.0.8": + version: 19.0.8 + resolution: "@nx/nx-win32-arm64-msvc@npm:19.0.8" conditions: os=win32 & cpu=arm64 languageName: node linkType: hard -"@nx/nx-win32-x64-msvc@npm:19.0.7": - version: 19.0.7 - resolution: "@nx/nx-win32-x64-msvc@npm:19.0.7" +"@nx/nx-win32-x64-msvc@npm:19.0.8": + version: 19.0.8 + resolution: "@nx/nx-win32-x64-msvc@npm:19.0.8" conditions: os=win32 & cpu=x64 languageName: node linkType: hard @@ -2053,7 +1969,7 @@ __metadata: languageName: node linkType: hard -"@rushstack/eslint-patch@npm:^1.10.2, @rushstack/eslint-patch@npm:^1.10.3, @rushstack/eslint-patch@npm:^1.3.3": +"@rushstack/eslint-patch@npm:^1.10.3, @rushstack/eslint-patch@npm:^1.3.3": version: 1.10.3 resolution: "@rushstack/eslint-patch@npm:1.10.3" checksum: 10/e1986178618bfb5fb636a54c420a7c359879d7aed6a0e456333a92fdc93e0e7a9a914114284308317cdc75e522c0696f760cd6d0b77409ed8b9633e75f096628 @@ -2502,7 +2418,7 @@ __metadata: languageName: node linkType: hard -"@swc/core@npm:^1.3.107": +"@swc/core@npm:^1.5.7": version: 1.5.7 resolution: "@swc/core@npm:1.5.7" dependencies: @@ -2882,13 +2798,13 @@ __metadata: languageName: node linkType: hard -"@types/react@npm:*, @types/react@npm:18.3.2, @types/react@npm:>=16": - version: 18.3.2 - resolution: "@types/react@npm:18.3.2" +"@types/react@npm:*, @types/react@npm:18.3.3, @types/react@npm:>=16": + version: 18.3.3 + resolution: "@types/react@npm:18.3.3" dependencies: "@types/prop-types": "npm:*" csstype: "npm:^3.0.2" - checksum: 10/a85eed82c1009dc9d979281d9ea1f5322255003de3378390f35d897b4bdaf1d34ea748636c03e9e9b4b7cc97c2f4582993d2d60e40846226ad497d97c7d8565a + checksum: 10/68e203b7f1f91d6cf21f33fc7af9d6d228035a26c83f514981e54aa3da695d0ec6af10c277c6336de1dd76c4adbe9563f3a21f80c4462000f41e5f370b46e96c languageName: node linkType: hard @@ -2945,7 +2861,7 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/eslint-plugin@npm:^7.10.0, @typescript-eslint/eslint-plugin@npm:^7.9.0": +"@typescript-eslint/eslint-plugin@npm:^7.10.0": version: 7.10.0 resolution: "@typescript-eslint/eslint-plugin@npm:7.10.0" dependencies: @@ -2986,7 +2902,7 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/parser@npm:^7.10.0, @typescript-eslint/parser@npm:^7.9.0": +"@typescript-eslint/parser@npm:^7.10.0": version: 7.10.0 resolution: "@typescript-eslint/parser@npm:7.10.0" dependencies: @@ -3126,7 +3042,7 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/typescript-estree@npm:7.10.0, @typescript-eslint/typescript-estree@npm:^7.10.0, @typescript-eslint/typescript-estree@npm:^7.9.0": +"@typescript-eslint/typescript-estree@npm:7.10.0, @typescript-eslint/typescript-estree@npm:^7.10.0": version: 7.10.0 resolution: "@typescript-eslint/typescript-estree@npm:7.10.0" dependencies: @@ -3164,7 +3080,7 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/utils@npm:7.10.0, @typescript-eslint/utils@npm:^6.0.0 || ^7.0.0, @typescript-eslint/utils@npm:^6.13.0 || ^7.0.0, @typescript-eslint/utils@npm:^7.10.0, @typescript-eslint/utils@npm:^7.4.0, @typescript-eslint/utils@npm:^7.9.0": +"@typescript-eslint/utils@npm:7.10.0, @typescript-eslint/utils@npm:^6.0.0 || ^7.0.0, @typescript-eslint/utils@npm:^6.13.0 || ^7.0.0, @typescript-eslint/utils@npm:^7.10.0, @typescript-eslint/utils@npm:^7.4.0": version: 7.10.0 resolution: "@typescript-eslint/utils@npm:7.10.0" dependencies: @@ -3260,14 +3176,14 @@ __metadata: languageName: node linkType: hard -"@vitejs/plugin-react-swc@npm:3.6.0": - version: 3.6.0 - resolution: "@vitejs/plugin-react-swc@npm:3.6.0" +"@vitejs/plugin-react-swc@npm:3.7.0": + version: 3.7.0 + resolution: "@vitejs/plugin-react-swc@npm:3.7.0" dependencies: - "@swc/core": "npm:^1.3.107" + "@swc/core": "npm:^1.5.7" peerDependencies: vite: ^4 || ^5 - checksum: 10/8bff5065e9689d0b0405932b5f2483bd0c388812dc13219a1511023f7eaca7a53c43f75f3eae785e27f7ce5a60e99d5d32bac4845a63ab095d5562180f7efa7c + checksum: 10/16498c65aca482f638f490a59c4ef49875e59d4f1631dad7515e2fce2f87a69a4ec0cd9774fc3666b8a6e211f65b78442411a743aea33762caa0044e3c04ad39 languageName: node linkType: hard @@ -3566,6 +3482,17 @@ __metadata: languageName: node linkType: hard +"@zkochan/js-yaml@npm:0.0.7": + version: 0.0.7 + resolution: "@zkochan/js-yaml@npm:0.0.7" + dependencies: + argparse: "npm:^2.0.1" + bin: + js-yaml: bin/js-yaml.js + checksum: 10/83642debff31400764e8721ba8f386e0f5444b118c7a6c17dbdcb316b56fefa061ea0587af47de75e04d60059215a703a1ca8bbc479149581cd57d752cb3d4e0 + languageName: node + linkType: hard + "JSONStream@npm:^1.3.5": version: 1.3.5 resolution: "JSONStream@npm:1.3.5" @@ -4038,14 +3965,14 @@ __metadata: languageName: node linkType: hard -"axios@npm:1.6.8, axios@npm:^1.6.0": - version: 1.6.8 - resolution: "axios@npm:1.6.8" +"axios@npm:1.7.2, axios@npm:^1.6.0": + version: 1.7.2 + resolution: "axios@npm:1.7.2" dependencies: follow-redirects: "npm:^1.15.6" form-data: "npm:^4.0.0" proxy-from-env: "npm:^1.1.0" - checksum: 10/3f9a79eaf1d159544fca9576261ff867cbbff64ed30017848e4210e49f3b01e97cf416390150e6fdf6633f336cd43dc1151f890bbd09c3c01ad60bb0891eee63 + checksum: 10/6ae80dda9736bb4762ce717f1a26ff997d94672d3a5799ad9941c24d4fb019c1dff45be8272f08d1975d7950bac281f3ba24aff5ecd49ef5a04d872ec428782f languageName: node linkType: hard @@ -4311,9 +4238,9 @@ __metadata: linkType: hard "caniuse-lite@npm:^1.0.30001579, caniuse-lite@npm:^1.0.30001587": - version: 1.0.30001620 - resolution: "caniuse-lite@npm:1.0.30001620" - checksum: 10/d615ab66eb14d9b621004297a8f61e435dca67e9311f3979e47ee1af1be2a8f14997b947a101073d949b5454dad745cc35134bc3c4295c7f33968f3f665eba19 + version: 1.0.30001621 + resolution: "caniuse-lite@npm:1.0.30001621" + checksum: 10/238187b8565edd98b041829a4157ff23406e8b573a8f5a7f7d75fd6bd46c508e4d1a07eb4a0086cfa1bce2f45fcd3b08ea7ffc36584ef2b1d38f8215b7301853 languageName: node linkType: hard @@ -5662,9 +5589,9 @@ __metadata: linkType: hard "dompurify@npm:^3.0.5": - version: 3.1.3 - resolution: "dompurify@npm:3.1.3" - checksum: 10/bb1badf23e8b8c32e116339ae70842465f35706be0d3b2c38a392f3ee1f32e73dbabee6462e9e89406a527e837100b75002b86d8f386937663448cbdf714c466 + version: 3.1.4 + resolution: "dompurify@npm:3.1.4" + checksum: 10/be036d5c10bda3ca9cc8069f26f3e586ac0379fc2a2499df7c362eeee53de49594ead3cc7e82e012eadcb071cf7327001fca33751682882e42da87618b10a4e6 languageName: node linkType: hard @@ -5730,9 +5657,9 @@ __metadata: linkType: hard "electron-to-chromium@npm:^1.4.668": - version: 1.4.774 - resolution: "electron-to-chromium@npm:1.4.774" - checksum: 10/1424a1d4c89b498eaa02146ed89d79b3d9536b8c745753433b1f8b9ed12cc701aa3528e87a86c6c07ac4e35490dc1c44a3955408274a32d1446fbb56a0cffc2d + version: 1.4.782 + resolution: "electron-to-chromium@npm:1.4.782" + checksum: 10/d5550876e4ee04df75e3bf6e0809de2b8d6129dd1ef3a8508020c0620bc814c496b5852b3a99cfe1bb79662c8dd5182ae18844af089414e6e92790d5deeea864 languageName: node linkType: hard @@ -5970,9 +5897,9 @@ __metadata: linkType: hard "es-module-lexer@npm:^1.2.1": - version: 1.5.2 - resolution: "es-module-lexer@npm:1.5.2" - checksum: 10/65b437022293fadba1f720edb0d79090e72a20f107407fb79127755f6d659f27100eec1c55c425ed3af34063586848399bb1924fe913680f8ed903f7b6290c1b + version: 1.5.3 + resolution: "es-module-lexer@npm:1.5.3" + checksum: 10/2d80297e955f52ec6a4c7c7683ec2ee80b33c61b46af4f6ed3ef8feab16ba10fd4798141132b3fd0f5e2edb36abd4ad50c63cf3e26da2cca1c56debc68816c44 languageName: node linkType: hard @@ -6330,7 +6257,7 @@ __metadata: languageName: node linkType: hard -"eslint-plugin-playwright@npm:^1.6.1, eslint-plugin-playwright@npm:^1.6.2": +"eslint-plugin-playwright@npm:^1.6.2": version: 1.6.2 resolution: "eslint-plugin-playwright@npm:1.6.2" dependencies: @@ -6402,7 +6329,7 @@ __metadata: languageName: node linkType: hard -"eslint-plugin-regexp@npm:^2.5.0, eslint-plugin-regexp@npm:^2.6.0": +"eslint-plugin-regexp@npm:^2.6.0": version: 2.6.0 resolution: "eslint-plugin-regexp@npm:2.6.0" dependencies: @@ -7314,7 +7241,7 @@ __metadata: languageName: node linkType: hard -"get-tsconfig@npm:^4.5.0, get-tsconfig@npm:^4.7.3, get-tsconfig@npm:^4.7.5": +"get-tsconfig@npm:^4.5.0, get-tsconfig@npm:^4.7.3": version: 4.7.5 resolution: "get-tsconfig@npm:4.7.5" dependencies: @@ -7421,17 +7348,17 @@ __metadata: linkType: hard "glob@npm:^10.2.2, glob@npm:^10.3.10, glob@npm:^10.3.7": - version: 10.3.15 - resolution: "glob@npm:10.3.15" + version: 10.4.1 + resolution: "glob@npm:10.4.1" dependencies: foreground-child: "npm:^3.1.0" - jackspeak: "npm:^2.3.6" - minimatch: "npm:^9.0.1" - minipass: "npm:^7.0.4" - path-scurry: "npm:^1.11.0" + jackspeak: "npm:^3.1.2" + minimatch: "npm:^9.0.4" + minipass: "npm:^7.1.2" + path-scurry: "npm:^1.11.1" bin: glob: dist/esm/bin.mjs - checksum: 10/b2b1c74309979b34fd6010afb50418a12525def32f1d3758d5827fc75d6143fc3ee5d1f3180a43111f6386c9e297c314f208d9d09955a6c6b69f22e92ee97635 + checksum: 10/d7bb49d2b413f77bdd59fea4ca86dcc12450deee221af0ca93e09534b81b9ef68fe341345751d8ff0c5b54bad422307e0e44266ff8ad7fbbd0c200e8ec258b16 languageName: node linkType: hard @@ -7866,13 +7793,6 @@ __metadata: languageName: node linkType: hard -"hotscript@npm:1.0.13": - version: 1.0.13 - resolution: "hotscript@npm:1.0.13" - checksum: 10/c384f44965c8481877f65dacaf1b7162e71ee0b54f5b4a7c28afa7c19e3233fdace3ae61de50984986cf150c392143b577314d30affdbd87e80a394b4042618f - languageName: node - linkType: hard - "html-escaper@npm:^2.0.0": version: 2.0.2 resolution: "html-escaper@npm:2.0.2" @@ -7955,7 +7875,7 @@ __metadata: is-ci: "npm:3.0.1" lint-staged: "npm:15.2.4" npm-run-all2: "npm:6.2.0" - nx: "npm:19.0.7" + nx: "npm:19.0.8" prettier: "npm:3.2.5" rimraf: "npm:5.0.7" rollup: "npm:4.18.0" @@ -8723,7 +8643,7 @@ __metadata: languageName: node linkType: hard -"jackspeak@npm:^2.3.5, jackspeak@npm:^2.3.6": +"jackspeak@npm:^2.3.5": version: 2.3.6 resolution: "jackspeak@npm:2.3.6" dependencies: @@ -8736,6 +8656,19 @@ __metadata: languageName: node linkType: hard +"jackspeak@npm:^3.1.2": + version: 3.1.2 + resolution: "jackspeak@npm:3.1.2" + dependencies: + "@isaacs/cliui": "npm:^8.0.2" + "@pkgjs/parseargs": "npm:^0.11.0" + dependenciesMeta: + "@pkgjs/parseargs": + optional: true + checksum: 10/7e6b94103e5fea5e6311aacf45fe80e98583df55c39b9d8478dd0ce02f1f8f0a11fc419311c277aca959b95635ec9a6be97445a31794254946c679dd0a19f007 + languageName: node + linkType: hard + "jest-diff@npm:^29.4.1": version: 29.7.0 resolution: "jest-diff@npm:29.7.0" @@ -8805,17 +8738,6 @@ __metadata: languageName: node linkType: hard -"js-yaml@npm:@zkochan/js-yaml@0.0.7": - version: 0.0.7 - resolution: "@zkochan/js-yaml@npm:0.0.7" - dependencies: - argparse: "npm:^2.0.1" - bin: - js-yaml: bin/js-yaml.js - checksum: 10/83642debff31400764e8721ba8f386e0f5444b118c7a6c17dbdcb316b56fefa061ea0587af47de75e04d60059215a703a1ca8bbc479149581cd57d752cb3d4e0 - languageName: node - linkType: hard - "js-yaml@npm:^3.10.0, js-yaml@npm:^3.13.0, js-yaml@npm:^3.13.1, js-yaml@npm:^3.6.1": version: 3.14.1 resolution: "js-yaml@npm:3.14.1" @@ -9063,9 +8985,9 @@ __metadata: linkType: hard "language-subtag-registry@npm:^0.3.20": - version: 0.3.22 - resolution: "language-subtag-registry@npm:0.3.22" - checksum: 10/5591f4abd775d1ab5945355a5ba894327d2d94c900607bdb69aac1bc5bb921dbeeeb5f616df95e8c0ae875501d19c1cfa0e852ece822121e95048deb34f2b4d2 + version: 0.3.23 + resolution: "language-subtag-registry@npm:0.3.23" + checksum: 10/fe13ed74ab9f862db8e5747b98cc9aa08d52a19f85b5cdb4975cd364c8539bd2da3380e4560d2dbbd728ec33dff8a4b4421fcb2e5b1b1bdaa21d16f91a54d0d4 languageName: node linkType: hard @@ -10411,7 +10333,7 @@ __metadata: languageName: node linkType: hard -"micromatch@npm:4.0.6, micromatch@npm:^4.0.2, micromatch@npm:^4.0.4, micromatch@npm:^4.0.5": +"micromatch@npm:4.0.6": version: 4.0.6 resolution: "micromatch@npm:4.0.6" dependencies: @@ -10421,6 +10343,16 @@ __metadata: languageName: node linkType: hard +"micromatch@npm:^4.0.2, micromatch@npm:^4.0.4, micromatch@npm:^4.0.5": + version: 4.0.7 + resolution: "micromatch@npm:4.0.7" + dependencies: + braces: "npm:^3.0.3" + picomatch: "npm:^2.3.1" + checksum: 10/a11ed1cb67dcbbe9a5fc02c4062cf8bb0157d73bf86956003af8dcfdf9b287f9e15ec0f6d6925ff6b8b5b496202335e497b01de4d95ef6cf06411bc5e5c474a0 + languageName: node + linkType: hard + "mime-db@npm:1.52.0": version: 1.52.0 resolution: "mime-db@npm:1.52.0" @@ -10570,10 +10502,10 @@ __metadata: languageName: node linkType: hard -"minipass@npm:^5.0.0 || ^6.0.2 || ^7.0.0, minipass@npm:^7.0.2, minipass@npm:^7.0.3, minipass@npm:^7.0.4": - version: 7.1.1 - resolution: "minipass@npm:7.1.1" - checksum: 10/6f4f920f1b5ea585d08fa3739b9bd81726cd85a0c972fb371c0fa6c1544d468813fb1694c7bc64ad81f138fd8abf665e2af0f406de9ba5741d8e4a377ed346b1 +"minipass@npm:^5.0.0 || ^6.0.2 || ^7.0.0, minipass@npm:^7.0.2, minipass@npm:^7.0.3, minipass@npm:^7.1.2": + version: 7.1.2 + resolution: "minipass@npm:7.1.2" + checksum: 10/c25f0ee8196d8e6036661104bacd743785b2599a21de5c516b32b3fa2b83113ac89a2358465bc04956baab37ffb956ae43be679b2262bf7be15fce467ccd7950 languageName: node linkType: hard @@ -10615,15 +10547,6 @@ __metadata: languageName: node linkType: hard -"moderndash@npm:3.12.0": - version: 3.12.0 - resolution: "moderndash@npm:3.12.0" - dependencies: - hotscript: "npm:1.0.13" - checksum: 10/4dd438f4392d0fdfccd274b6048bc6ee6a851af42859cccae6bd064348d7ece512812f02524dcc3cb1753323dbad4b920ff676b81ff56ca03418201eb9d536be - languageName: node - linkType: hard - "mri@npm:^1.1.0": version: 1.2.0 resolution: "mri@npm:1.2.0" @@ -11057,23 +10980,24 @@ __metadata: languageName: node linkType: hard -"nx@npm:19.0.7": - version: 19.0.7 - resolution: "nx@npm:19.0.7" +"nx@npm:19.0.8": + version: 19.0.8 + resolution: "nx@npm:19.0.8" dependencies: - "@nrwl/tao": "npm:19.0.7" - "@nx/nx-darwin-arm64": "npm:19.0.7" - "@nx/nx-darwin-x64": "npm:19.0.7" - "@nx/nx-freebsd-x64": "npm:19.0.7" - "@nx/nx-linux-arm-gnueabihf": "npm:19.0.7" - "@nx/nx-linux-arm64-gnu": "npm:19.0.7" - "@nx/nx-linux-arm64-musl": "npm:19.0.7" - "@nx/nx-linux-x64-gnu": "npm:19.0.7" - "@nx/nx-linux-x64-musl": "npm:19.0.7" - "@nx/nx-win32-arm64-msvc": "npm:19.0.7" - "@nx/nx-win32-x64-msvc": "npm:19.0.7" + "@nrwl/tao": "npm:19.0.8" + "@nx/nx-darwin-arm64": "npm:19.0.8" + "@nx/nx-darwin-x64": "npm:19.0.8" + "@nx/nx-freebsd-x64": "npm:19.0.8" + "@nx/nx-linux-arm-gnueabihf": "npm:19.0.8" + "@nx/nx-linux-arm64-gnu": "npm:19.0.8" + "@nx/nx-linux-arm64-musl": "npm:19.0.8" + "@nx/nx-linux-x64-gnu": "npm:19.0.8" + "@nx/nx-linux-x64-musl": "npm:19.0.8" + "@nx/nx-win32-arm64-msvc": "npm:19.0.8" + "@nx/nx-win32-x64-msvc": "npm:19.0.8" "@yarnpkg/lockfile": "npm:^1.1.0" "@yarnpkg/parsers": "npm:3.0.0-rc.46" + "@zkochan/js-yaml": "npm:0.0.7" axios: "npm:^1.6.0" chalk: "npm:^4.1.0" cli-cursor: "npm:3.1.0" @@ -11087,7 +11011,6 @@ __metadata: fs-extra: "npm:^11.1.0" ignore: "npm:^5.0.4" jest-diff: "npm:^29.4.1" - js-yaml: "npm:@zkochan/js-yaml@0.0.7" jsonc-parser: "npm:3.2.0" lines-and-columns: "npm:~2.0.3" minimatch: "npm:9.0.3" @@ -11136,7 +11059,7 @@ __metadata: bin: nx: bin/nx.js nx-cloud: bin/nx-cloud.js - checksum: 10/1dc33b14c7e779295816efaf0c6f8f4b4d52d6fc04ecffd5a46bde219952f4dc40dce8f6a5fd6e0e66d4a8fc58483bcd0574b13dd93643502b8b69da078ba7b7 + checksum: 10/5b0ce398257bcbe51387af82d9a620b6872ffadc9b45c35e3350e798c063f2bb3b9606fba124d0abe09515a472b98578a12bb30426f71db169918c2e123a7971 languageName: node linkType: hard @@ -11580,7 +11503,7 @@ __metadata: languageName: node linkType: hard -"path-scurry@npm:^1.10.1, path-scurry@npm:^1.11.0": +"path-scurry@npm:^1.10.1, path-scurry@npm:^1.11.1": version: 1.11.1 resolution: "path-scurry@npm:1.11.1" dependencies: @@ -13233,9 +13156,9 @@ __metadata: linkType: hard "spdx-license-ids@npm:^3.0.0": - version: 3.0.17 - resolution: "spdx-license-ids@npm:3.0.17" - checksum: 10/8f6c6ae02ebb25b4ca658b8990d9e8a8f8d8a95e1d8b9fd84d87eed80a7dc8f8073d6a8d50b8a0295c0e8399e1f8814f5c00e2985e6bf3731540a16f7241cbf1 + version: 3.0.18 + resolution: "spdx-license-ids@npm:3.0.18" + checksum: 10/45fdbb50c4bbe364720ef0acd19f4fc1914d73ba1e2b1ce9db21ee12d7f9e8bf14336289f6ad3d5acac3dc5b91aafe61e9c652d5806b31cbb8518a14979a16ff languageName: node linkType: hard @@ -13866,11 +13789,11 @@ __metadata: linkType: hard "thread-stream@npm:^3.0.0": - version: 3.0.0 - resolution: "thread-stream@npm:3.0.0" + version: 3.0.1 + resolution: "thread-stream@npm:3.0.1" dependencies: real-require: "npm:^0.2.0" - checksum: 10/f7a8b8539a75194a5c53c2506da4110ced4b3b7096f4ac7fa1bf07a96a7d0dccbe46d8b87cf1427e09804fcdbd6a51ddf5d1da01c58f7ccb7e4b3baf513bf02e + checksum: 10/9b8025733a19cae3b09007f6eeb9efdb6b2e7552cc347feadad10d97a886307946c5155f59d0505d4f2f0f4b242c0875bfe9dc26cd5f5d9a6ae97b574656d07d languageName: node linkType: hard @@ -14176,22 +14099,6 @@ __metadata: languageName: node linkType: hard -"tsx@npm:4.11.0": - version: 4.11.0 - resolution: "tsx@npm:4.11.0" - dependencies: - esbuild: "npm:~0.20.2" - fsevents: "npm:~2.3.3" - get-tsconfig: "npm:^4.7.5" - dependenciesMeta: - fsevents: - optional: true - bin: - tsx: dist/cli.mjs - checksum: 10/04fca21db8d518d103b05ab42b0196b9f8ab11769c475446eb5d56d19f313ddad357b98992ed5d96749472ffd459e0ae9ea2d5f0ebe8bbc27c611d1f6df6ec9b - languageName: node - linkType: hard - "tty-table@npm:^4.1.5": version: 4.2.3 resolution: "tty-table@npm:4.2.3"