diff --git a/README.md b/README.md index f707dd40..9afeaeaa 100644 --- a/README.md +++ b/README.md @@ -2,29 +2,29 @@ Documentation and code for all the latest `@augment-vir` packages. -- [`@augment-vir/assert`](https://www.npmjs.com/package/@augment-vir/assert): A collection of assertions for test and production code alike. These main exports are the following: - - [`assert`](https://electrovir.github.io/augment-vir/functions/assert.html): a collection of assertion methods with type guards when possible. Example: [`assert.isDefined()`](https://electrovir.github.io/augment-vir/functions/assert.html#isDefined) - - [`check`](https://electrovir.github.io/augment-vir/functions/check.html): a collection of boolean check methods with type guards when possible. Example: [`check.isBoolean()`](https://electrovir.github.io/augment-vir/functions/check.html#isBoolean) - - [`assertWrap`](https://electrovir.github.io/augment-vir/functions/assertWrap.html): a collection of assertions that return the asserted value if the assertion passes. Examples [`assertWrap.isArray()`](https://electrovir.github.io/augment-vir/functions/assertWrap.html#isArray) - - [`checkWrap`](https://electrovir.github.io/augment-vir/functions/checkWrap.html): a collection of checks that return the checked value if it passes or `undefined`. Example: [`checkWrap.isInfinite()`](https://electrovir.github.io/augment-vir/functions/checkWrap.html#isInfinite) - - [`waitUntil`](https://electrovir.github.io/augment-vir/functions/waitUntil.html): a collection of assertion methods that try to wait until the assertion becomes true. Example: [`waitUntil.isTruthy()`](https://electrovir.github.io/augment-vir/functions/waitUntil.html#isTruthy) -- [`@augment-vir/common`](https://www.npmjs.com/package/@augment-vir/common): A collection of augments, helpers types, functions, and classes for any JavaScript environment. - - Examples: [`filterObject`](https://electrovir.github.io/augment-vir/functions/filterObject.html), [`wait`](https://electrovir.github.io/augment-vir/functions/wait.html), [`getEnumValues`](https://electrovir.github.io/augment-vir/functions/getEnumValues.html) - - Includes a colored logger implementation: [`log`](https://electrovir.github.io/augment-vir/variables/log.html) - - Includes a SQL-select-like runtime implementation of TypeScript's `Pick`: [`selectFrom`](https://electrovir.github.io/augment-vir/functions/selectFrom-1.html) - - Includes Prisma type helpers. - - and much more... -- [`@augment-vir/node`](https://www.npmjs.com/package/@augment-vir/node): A collection of augments, helpers types, functions, and classes only for Node.js (backend) JavaScript environments. - - Includes a custom Prisma API built on its CLI: [`prisma`](https://electrovir.github.io/augment-vir/variables/prisma.html). - - Includes a custom Docker API built on its CLI: [`docker`](https://electrovir.github.io/augment-vir/variables/docker.html). - - Includes an easy to use shell script runner: [`runShellCommand`](https://electrovir.github.io/augment-vir/functions/runShellCommand.html). - - and much more! -- [`@augment-vir/test`](https://www.npmjs.com/package/@augment-vir/test): A universal testing suite that works with Mocha style test runners _and_ Node.js's built-in test runner with the following main exports: - - [`describe`](https://electrovir.github.io/augment-vir/functions/describe.html): the normal describe test suite function, automatically imported based on the current environment. - - [`it`](https://electrovir.github.io/augment-vir/functions/it.html): the normal it test function, automatically imported based on the current environment. - - [`itCases`](https://electrovir.github.io/augment-vir/functions/itCases.html): a succinct way to test lots of inputs and outputs to a single function. - - [`testWeb`](https://electrovir.github.io/augment-vir/variables/testWeb.html): a API of web-testing utilities, only available in browser environments. -- [`@augment-vir/web`](https://www.npmjs.com/package/@augment-vir/web): A collection of augments, helpers types, functions, and classes, that only work in a browser JavaScript environment. - - Includes a `querySelector` implementation that works with Shadow DOM: [`queryThroughShadow`](https://electrovir.github.io/augment-vir/functions/queryThroughShadow.html). - - Includes an easy way to list all nested children of an element: [`getNestedChildren`](https://electrovir.github.io/augment-vir/functions/getNestedChildren.html). - - and much more! +- [`@augment-vir/assert`](https://www.npmjs.com/package/@augment-vir/assert): A collection of assertions for test and production code alike. These main exports are the following: + - [`assert`](https://electrovir.github.io/augment-vir/functions/assert.html): a collection of assertion methods with type guards when possible. Example: [`assert.isDefined()`](https://electrovir.github.io/augment-vir/functions/assert.html#isDefined) + - [`check`](https://electrovir.github.io/augment-vir/functions/check.html): a collection of boolean check methods with type guards when possible. Example: [`check.isBoolean()`](https://electrovir.github.io/augment-vir/functions/check.html#isBoolean) + - [`assertWrap`](https://electrovir.github.io/augment-vir/functions/assertWrap.html): a collection of assertions that return the asserted value if the assertion passes. Examples [`assertWrap.isArray()`](https://electrovir.github.io/augment-vir/functions/assertWrap.html#isArray) + - [`checkWrap`](https://electrovir.github.io/augment-vir/functions/checkWrap.html): a collection of checks that return the checked value if it passes or `undefined`. Example: [`checkWrap.isInfinite()`](https://electrovir.github.io/augment-vir/functions/checkWrap.html#isInfinite) + - [`waitUntil`](https://electrovir.github.io/augment-vir/functions/waitUntil.html): a collection of assertion methods that try to wait until the assertion becomes true. Example: [`waitUntil.isTruthy()`](https://electrovir.github.io/augment-vir/functions/waitUntil.html#isTruthy) +- [`@augment-vir/common`](https://www.npmjs.com/package/@augment-vir/common): A collection of augments, helpers types, functions, and classes for any JavaScript environment. + - Examples: [`filterObject`](https://electrovir.github.io/augment-vir/functions/filterObject.html), [`wait`](https://electrovir.github.io/augment-vir/functions/wait.html), [`getEnumValues`](https://electrovir.github.io/augment-vir/functions/getEnumValues.html) + - Includes a colored logger implementation: [`log`](https://electrovir.github.io/augment-vir/variables/log.html) + - Includes a SQL-select-like runtime implementation of TypeScript's `Pick`: [`selectFrom`](https://electrovir.github.io/augment-vir/functions/selectFrom-1.html) + - Includes Prisma type helpers. + - and much more... +- [`@augment-vir/node`](https://www.npmjs.com/package/@augment-vir/node): A collection of augments, helpers types, functions, and classes only for Node.js (backend) JavaScript environments. + - Includes a custom Prisma API built on its CLI: [`prisma`](https://electrovir.github.io/augment-vir/variables/prisma.html). + - Includes a custom Docker API built on its CLI: [`docker`](https://electrovir.github.io/augment-vir/variables/docker.html). + - Includes an easy to use shell script runner: [`runShellCommand`](https://electrovir.github.io/augment-vir/functions/runShellCommand.html). + - and much more! +- [`@augment-vir/test`](https://www.npmjs.com/package/@augment-vir/test): A universal testing suite that works with Mocha style test runners _and_ Node.js's built-in test runner with the following main exports: + - [`describe`](https://electrovir.github.io/augment-vir/functions/describe.html): the normal describe test suite function, automatically imported based on the current environment. + - [`it`](https://electrovir.github.io/augment-vir/functions/it.html): the normal it test function, automatically imported based on the current environment. + - [`itCases`](https://electrovir.github.io/augment-vir/functions/itCases.html): a succinct way to test lots of inputs and outputs to a single function. + - [`testWeb`](https://electrovir.github.io/augment-vir/variables/testWeb.html): a API of web-testing utilities, only available in browser environments. +- [`@augment-vir/web`](https://www.npmjs.com/package/@augment-vir/web): A collection of augments, helpers types, functions, and classes, that only work in a browser JavaScript environment. + - Includes a `querySelector` implementation that works with Shadow DOM: [`queryThroughShadow`](https://electrovir.github.io/augment-vir/functions/queryThroughShadow.html). + - Includes an easy way to list all nested children of an element: [`getNestedChildren`](https://electrovir.github.io/augment-vir/functions/getNestedChildren.html). + - and much more! diff --git a/package-lock.json b/package-lock.json index a0e1dca7..e3b1a7e3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@augment-vir/mono-repo-root", - "version": "31.1.1", + "version": "31.2.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@augment-vir/mono-repo-root", - "version": "31.1.1", + "version": "31.2.0", "hasInstallScript": true, "license": "(MIT or CC0 1.0)", "workspaces": [ @@ -32,7 +32,7 @@ "eslint-plugin-unicorn": "^56.0.1", "mono-vir": "^2.0.4", "npm-check-updates": "^17.1.11", - "prettier": "^3.4.1", + "prettier": "3.3.3", "prettier-plugin-interpolated-html-tags": "^2.0.0", "prettier-plugin-jsdoc": "^1.3.0", "prettier-plugin-multiline-arrays": "^3.0.6", @@ -14272,9 +14272,9 @@ } }, "node_modules/prettier": { - "version": "3.4.1", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.4.1.tgz", - "integrity": "sha512-G+YdqtITVZmOJje6QkXQWzl3fSfMxFwm1tjTyo9exhkmWSqC4Yhd1+lug++IlR2mvRVAxEDDWYkQdeSztajqgg==", + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.3.tgz", + "integrity": "sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==", "dev": true, "license": "MIT", "bin": { @@ -18940,10 +18940,10 @@ }, "packages/assert": { "name": "@augment-vir/assert", - "version": "31.1.1", + "version": "31.2.0", "license": "(MIT or CC0 1.0)", "dependencies": { - "@augment-vir/core": "^31.1.1", + "@augment-vir/core": "^31.2.0", "@date-vir/duration": "^7.0.1", "deep-eql": "^5.0.2", "expect-type": "^1.1.0", @@ -18978,11 +18978,11 @@ }, "packages/common": { "name": "@augment-vir/common", - "version": "31.1.1", + "version": "31.2.0", "license": "(MIT or CC0 1.0)", "dependencies": { - "@augment-vir/assert": "^31.1.1", - "@augment-vir/core": "^31.1.1", + "@augment-vir/assert": "^31.2.0", + "@augment-vir/core": "^31.2.0", "@date-vir/duration": "^7.0.1", "ansi-styles": "^6.2.1", "json5": "^2.2.3", @@ -19017,7 +19017,7 @@ }, "packages/core": { "name": "@augment-vir/core", - "version": "31.1.1", + "version": "31.2.0", "license": "(MIT or CC0 1.0)", "dependencies": { "@date-vir/duration": "^7.0.1", @@ -19048,11 +19048,11 @@ }, "packages/node": { "name": "@augment-vir/node", - "version": "31.1.1", + "version": "31.2.0", "license": "(MIT or CC0 1.0)", "dependencies": { - "@augment-vir/assert": "^31.1.1", - "@augment-vir/common": "^31.1.1", + "@augment-vir/assert": "^31.2.0", + "@augment-vir/common": "^31.2.0", "@date-vir/duration": "^7.0.1", "ansi-styles": "^6.2.1", "terminate": "^2.8.0", @@ -19060,7 +19060,7 @@ "typed-event-target": "^4.0.2" }, "devDependencies": { - "@augment-vir/test": "^31.1.1", + "@augment-vir/test": "^31.2.0", "@prisma/client": "^5.22.0", "@types/node": "^22.10.0", "@web/dev-server-esbuild": "^1.0.3", @@ -19091,18 +19091,18 @@ }, "packages/scripts": { "name": "@augment-vir/scripts", - "version": "31.1.1", + "version": "31.2.0", "license": "(MIT or CC0 1.0)", "dependencies": { - "@augment-vir/assert": "^31.1.1", - "@augment-vir/common": "^31.1.1", - "@augment-vir/node": "^31.1.1", + "@augment-vir/assert": "^31.2.0", + "@augment-vir/common": "^31.2.0", + "@augment-vir/node": "^31.2.0", "@virmator/docs": "^13.10.3", "jsdom": "^25.0.1", "typedoc": "^0.27.0" }, "devDependencies": { - "@augment-vir/test": "^31.1.1", + "@augment-vir/test": "^31.2.0", "@types/jsdom": "^21.1.7", "@types/node": "^22.10.0" }, @@ -19112,11 +19112,11 @@ }, "packages/test": { "name": "@augment-vir/test", - "version": "31.1.1", + "version": "31.2.0", "license": "(MIT or CC0 1.0)", "dependencies": { - "@augment-vir/assert": "^31.1.1", - "@augment-vir/common": "^31.1.1", + "@augment-vir/assert": "^31.2.0", + "@augment-vir/common": "^31.2.0", "@open-wc/testing-helpers": "^3.0.1", "@virmator/test": "^13.10.3", "type-fest": "^4.29.0" @@ -19150,17 +19150,17 @@ }, "packages/web": { "name": "@augment-vir/web", - "version": "31.1.1", + "version": "31.2.0", "license": "(MIT or CC0 1.0)", "dependencies": { - "@augment-vir/assert": "^31.1.1", - "@augment-vir/common": "^31.1.1", + "@augment-vir/assert": "^31.2.0", + "@augment-vir/common": "^31.2.0", "@date-vir/duration": "^7.0.1", "html-spec-tags": "^2.2.1", "type-fest": "^4.29.0" }, "devDependencies": { - "@augment-vir/test": "^31.1.1", + "@augment-vir/test": "^31.2.0", "bowser": "^2.11.0", "typescript": "^5.6.3" }, diff --git a/package.json b/package.json index 34e5d547..b3424606 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@augment-vir/mono-repo-root", - "version": "31.1.1", + "version": "31.2.0", "private": true, "homepage": "https://github.com/electrovir/augment-vir", "bugs": { @@ -57,7 +57,7 @@ "eslint-plugin-unicorn": "^56.0.1", "mono-vir": "^2.0.4", "npm-check-updates": "^17.1.11", - "prettier": "^3.4.1", + "prettier": "3.3.3", "prettier-plugin-interpolated-html-tags": "^2.0.0", "prettier-plugin-jsdoc": "^1.3.0", "prettier-plugin-multiline-arrays": "^3.0.6", diff --git a/packages/assert/README.md b/packages/assert/README.md index a0089819..7a8b0c5c 100644 --- a/packages/assert/README.md +++ b/packages/assert/README.md @@ -2,10 +2,10 @@ A collection of assertions for test and production code alike. These main exports are the following: -- [`assert`](https://electrovir.github.io/augment-vir/functions/assert.html): a collection of assertion methods with type guards when possible. Example: [`assert.isDefined()`](https://electrovir.github.io/augment-vir/functions/assert.html#isDefined) -- [`check`](https://electrovir.github.io/augment-vir/functions/check.html): a collection of boolean check methods with type guards when possible. Example: [`check.isBoolean()`](https://electrovir.github.io/augment-vir/functions/check.html#isBoolean) -- [`assertWrap`](https://electrovir.github.io/augment-vir/functions/assertWrap.html): a collection of assertions that return the asserted value if the assertion passes. Examples [`assertWrap.isArray()`](https://electrovir.github.io/augment-vir/functions/assertWrap.html#isArray) -- [`checkWrap`](https://electrovir.github.io/augment-vir/functions/checkWrap.html): a collection of checks that return the checked value if it passes or `undefined`. Example: [`checkWrap.isInfinite()`](https://electrovir.github.io/augment-vir/functions/checkWrap.html#isInfinite) -- [`waitUntil`](https://electrovir.github.io/augment-vir/functions/waitUntil.html): a collection of assertion methods that try to wait until the assertion becomes true. Example: [`waitUntil.isTruthy()`](https://electrovir.github.io/augment-vir/functions/waitUntil.html#isTruthy) +- [`assert`](https://electrovir.github.io/augment-vir/functions/assert.html): a collection of assertion methods with type guards when possible. Example: [`assert.isDefined()`](https://electrovir.github.io/augment-vir/functions/assert.html#isDefined) +- [`check`](https://electrovir.github.io/augment-vir/functions/check.html): a collection of boolean check methods with type guards when possible. Example: [`check.isBoolean()`](https://electrovir.github.io/augment-vir/functions/check.html#isBoolean) +- [`assertWrap`](https://electrovir.github.io/augment-vir/functions/assertWrap.html): a collection of assertions that return the asserted value if the assertion passes. Examples [`assertWrap.isArray()`](https://electrovir.github.io/augment-vir/functions/assertWrap.html#isArray) +- [`checkWrap`](https://electrovir.github.io/augment-vir/functions/checkWrap.html): a collection of checks that return the checked value if it passes or `undefined`. Example: [`checkWrap.isInfinite()`](https://electrovir.github.io/augment-vir/functions/checkWrap.html#isInfinite) +- [`waitUntil`](https://electrovir.github.io/augment-vir/functions/waitUntil.html): a collection of assertion methods that try to wait until the assertion becomes true. Example: [`waitUntil.isTruthy()`](https://electrovir.github.io/augment-vir/functions/waitUntil.html#isTruthy) See the docs under `Assert`, or `Package: @augment-vir/assert` here: https://electrovir.github.io/augment-vir diff --git a/packages/assert/package.json b/packages/assert/package.json index 9a042da9..437baed2 100644 --- a/packages/assert/package.json +++ b/packages/assert/package.json @@ -1,6 +1,6 @@ { "name": "@augment-vir/assert", - "version": "31.1.1", + "version": "31.2.0", "description": "A collection of assertions for test and production code alike.", "keywords": [ "augment", @@ -41,7 +41,7 @@ "test:update": "npm test" }, "dependencies": { - "@augment-vir/core": "^31.1.1", + "@augment-vir/core": "^31.2.0", "@date-vir/duration": "^7.0.1", "deep-eql": "^5.0.2", "expect-type": "^1.1.0", diff --git a/packages/common/README.md b/packages/common/README.md index 37cb5ea5..32a5cb56 100644 --- a/packages/common/README.md +++ b/packages/common/README.md @@ -2,10 +2,10 @@ A collection of augments, helpers types, functions, and classes for any JavaScript environment. -- Examples: [`filterObject`](https://electrovir.github.io/augment-vir/functions/filterObject.html), [`wait`](https://electrovir.github.io/augment-vir/functions/wait.html), [`getEnumValues`](https://electrovir.github.io/augment-vir/functions/getEnumValues.html) -- Includes a colored logger implementation: [`log`](https://electrovir.github.io/augment-vir/variables/log.html) -- Includes a SQL-select-like runtime implementation of TypeScript's `Pick`: [`selectFrom`](https://electrovir.github.io/augment-vir/functions/selectFrom-1.html) -- Includes Prisma type helpers. -- and much more... +- Examples: [`filterObject`](https://electrovir.github.io/augment-vir/functions/filterObject.html), [`wait`](https://electrovir.github.io/augment-vir/functions/wait.html), [`getEnumValues`](https://electrovir.github.io/augment-vir/functions/getEnumValues.html) +- Includes a colored logger implementation: [`log`](https://electrovir.github.io/augment-vir/variables/log.html) +- Includes a SQL-select-like runtime implementation of TypeScript's `Pick`: [`selectFrom`](https://electrovir.github.io/augment-vir/functions/selectFrom-1.html) +- Includes Prisma type helpers. +- and much more... See all `@augment-vir` docs here: https://electrovir.github.io/augment-vir diff --git a/packages/common/package.json b/packages/common/package.json index 0912b8ab..c1ef9a58 100644 --- a/packages/common/package.json +++ b/packages/common/package.json @@ -1,6 +1,6 @@ { "name": "@augment-vir/common", - "version": "31.1.1", + "version": "31.2.0", "description": "A collection of augments, helpers types, functions, and classes for any JavaScript environment.", "keywords": [ "augment", @@ -39,8 +39,8 @@ "test:web": "virmator --no-deps test web" }, "dependencies": { - "@augment-vir/assert": "^31.1.1", - "@augment-vir/core": "^31.1.1", + "@augment-vir/assert": "^31.2.0", + "@augment-vir/core": "^31.2.0", "@date-vir/duration": "^7.0.1", "ansi-styles": "^6.2.1", "json5": "^2.2.3", diff --git a/packages/common/src/augments/object/map-entries.ts b/packages/common/src/augments/object/map-entries.ts index b88a9429..857198db 100644 --- a/packages/common/src/augments/object/map-entries.ts +++ b/packages/common/src/augments/object/map-entries.ts @@ -1,5 +1,5 @@ import {check} from '@augment-vir/assert'; -import {Values, ensureError, type MaybePromise} from '@augment-vir/core'; +import {Values, ensureError, type CompleteValues, type MaybePromise} from '@augment-vir/core'; import {filterMap} from '../array/filter.js'; import {getObjectTypedEntries, typedObjectFromEntries} from './object-entries.js'; @@ -61,7 +61,7 @@ export function mapObject< originalObject: OriginalObject, mapCallback: ( originalKey: keyof OriginalObject, - originalValue: Values, + originalValue: CompleteValues, originalObject: OriginalObject, ) => MaybePromise<{key: NewKey; value: NewValue} | undefined>, ): MaybePromise> { diff --git a/packages/common/src/augments/object/object-filter.ts b/packages/common/src/augments/object/object-filter.ts index 4dabbe87..ff9fdc48 100644 --- a/packages/common/src/augments/object/object-filter.ts +++ b/packages/common/src/augments/object/object-filter.ts @@ -1,4 +1,4 @@ -import {type Values} from '@augment-vir/core'; +import {type CompleteValues} from '@augment-vir/core'; import {getObjectTypedEntries, typedObjectFromEntries} from './object-entries.js'; /** @@ -25,7 +25,7 @@ export function filterObject( inputObject: ObjectGeneric, callback: ( key: keyof ObjectGeneric, - value: Values, + value: CompleteValues, fullObject: ObjectGeneric, ) => boolean, ): Partial { diff --git a/packages/core/package.json b/packages/core/package.json index 6884296d..4c2d5597 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@augment-vir/core", - "version": "31.1.1", + "version": "31.2.0", "description": "Core augment-vir augments. Use @augment-vir/common instead.", "homepage": "https://github.com/electrovir/augment-vir", "bugs": { diff --git a/packages/core/src/augments/object/object-value-types.ts b/packages/core/src/augments/object/object-value-types.ts index 2411288a..c5cd373e 100644 --- a/packages/core/src/augments/object/object-value-types.ts +++ b/packages/core/src/augments/object/object-value-types.ts @@ -1,13 +1,21 @@ import type {CompleteRequire} from './required-keys.js'; /** - * Gets all values of an object. + * Gets the value types of an object with all parts of that object required. * * @category Object * @category Package : @augment-vir/common * @package [`@augment-vir/common`](https://www.npmjs.com/package/@augment-vir/common) */ -export type Values = CompleteRequire[keyof T]; +export type CompleteValues = CompleteRequire[keyof T]; +/** + * Gets the value types of an object. + * + * @category Object + * @category Package : @augment-vir/common + * @package [`@augment-vir/common`](https://www.npmjs.com/package/@augment-vir/common) + */ +export type Values = T[keyof T]; /** * Gets the value within an object when all its keys are required. diff --git a/packages/node/README.md b/packages/node/README.md index 2d55e252..50da3daf 100644 --- a/packages/node/README.md +++ b/packages/node/README.md @@ -2,9 +2,9 @@ A collection of augments, helpers types, functions, and classes only for Node.js (backend) JavaScript environments. -- Includes a custom Prisma API built on its CLI: [`prisma`](https://electrovir.github.io/augment-vir/variables/prisma.html). -- Includes a custom Docker API built on its CLI: [`docker`](https://electrovir.github.io/augment-vir/variables/docker.html). -- Includes an easy to use shell script runner: [`runShellCommand`](https://electrovir.github.io/augment-vir/functions/runShellCommand.html). -- and much more! +- Includes a custom Prisma API built on its CLI: [`prisma`](https://electrovir.github.io/augment-vir/variables/prisma.html). +- Includes a custom Docker API built on its CLI: [`docker`](https://electrovir.github.io/augment-vir/variables/docker.html). +- Includes an easy to use shell script runner: [`runShellCommand`](https://electrovir.github.io/augment-vir/functions/runShellCommand.html). +- and much more! See all the docs under `Node : *`, or `* : Node`, or `Package: @augment-vir/node` here: https://electrovir.github.io/augment-vir diff --git a/packages/node/package.json b/packages/node/package.json index 1249d2c8..905ff96b 100644 --- a/packages/node/package.json +++ b/packages/node/package.json @@ -1,6 +1,6 @@ { "name": "@augment-vir/node", - "version": "31.1.1", + "version": "31.2.0", "description": "A collection of augments, helpers types, functions, and classes only for Node.js (backend) JavaScript environments.", "keywords": [ "augment", @@ -37,8 +37,8 @@ "test:update": "npm test" }, "dependencies": { - "@augment-vir/assert": "^31.1.1", - "@augment-vir/common": "^31.1.1", + "@augment-vir/assert": "^31.2.0", + "@augment-vir/common": "^31.2.0", "@date-vir/duration": "^7.0.1", "ansi-styles": "^6.2.1", "terminate": "^2.8.0", @@ -46,7 +46,7 @@ "typed-event-target": "^4.0.2" }, "devDependencies": { - "@augment-vir/test": "^31.1.1", + "@augment-vir/test": "^31.2.0", "@prisma/client": "^5.22.0", "@types/node": "^22.10.0", "@web/dev-server-esbuild": "^1.0.3", diff --git a/packages/node/src/prisma/model-data.ts b/packages/node/src/prisma/model-data.ts index 970049f1..1c2c9358 100644 --- a/packages/node/src/prisma/model-data.ts +++ b/packages/node/src/prisma/model-data.ts @@ -91,9 +91,9 @@ async function addModelDataObject( /** Add the mock data to the mock prisma client. */ await awaitedForEach(getObjectTypedEntries(data), async ([modelName, mockData]) => { /** - * This type is dumbed down to just `AnyObject[]` because the union of all possible - * model data is just way too big (and not helpful as the inputs to this function are - * already type guarded). + * This type is dumbed down to just `AnyObject[]` because the union of all possible model + * data is just way too big (and not helpful as the inputs to this function are already type + * guarded). */ const mockModelInstances: AnyObject[] = Array.isArray(mockData) ? mockData diff --git a/packages/scripts/package.json b/packages/scripts/package.json index 9951b233..07562cd0 100644 --- a/packages/scripts/package.json +++ b/packages/scripts/package.json @@ -1,6 +1,6 @@ { "name": "@augment-vir/scripts", - "version": "31.1.1", + "version": "31.2.0", "private": true, "homepage": "https://github.com/electrovir/augment-vir", "bugs": { @@ -24,15 +24,15 @@ "test:update": "npm test" }, "dependencies": { - "@augment-vir/assert": "^31.1.1", - "@augment-vir/common": "^31.1.1", - "@augment-vir/node": "^31.1.1", + "@augment-vir/assert": "^31.2.0", + "@augment-vir/common": "^31.2.0", + "@augment-vir/node": "^31.2.0", "@virmator/docs": "^13.10.3", "jsdom": "^25.0.1", "typedoc": "^0.27.0" }, "devDependencies": { - "@augment-vir/test": "^31.1.1", + "@augment-vir/test": "^31.2.0", "@types/jsdom": "^21.1.7", "@types/node": "^22.10.0" }, diff --git a/packages/test/README.md b/packages/test/README.md index 1cd0eaeb..79c14b4a 100644 --- a/packages/test/README.md +++ b/packages/test/README.md @@ -2,9 +2,9 @@ A universal testing suite that works with Mocha style test runners _and_ Node.js's built-in test runner with the following main exports: -- [`describe`](https://electrovir.github.io/augment-vir/functions/describe.html): the normal describe test suite function, automatically imported based on the current environment. -- [`it`](https://electrovir.github.io/augment-vir/functions/it.html): the normal it test function, automatically imported based on the current environment. -- [`itCases`](https://electrovir.github.io/augment-vir/functions/itCases.html): a succinct way to test lots of inputs and outputs to a single function. -- [`testWeb`](https://electrovir.github.io/augment-vir/variables/testWeb.html): a API of web-testing utilities, only available in browser environments. +- [`describe`](https://electrovir.github.io/augment-vir/functions/describe.html): the normal describe test suite function, automatically imported based on the current environment. +- [`it`](https://electrovir.github.io/augment-vir/functions/it.html): the normal it test function, automatically imported based on the current environment. +- [`itCases`](https://electrovir.github.io/augment-vir/functions/itCases.html): a succinct way to test lots of inputs and outputs to a single function. +- [`testWeb`](https://electrovir.github.io/augment-vir/variables/testWeb.html): a API of web-testing utilities, only available in browser environments. See the docs under `Test`, or `Package: @augment-vir/test` here: https://electrovir.github.io/augment-vir diff --git a/packages/test/package.json b/packages/test/package.json index 78a39fde..da280959 100644 --- a/packages/test/package.json +++ b/packages/test/package.json @@ -1,6 +1,6 @@ { "name": "@augment-vir/test", - "version": "31.1.1", + "version": "31.2.0", "description": "A universal testing suite that works with Mocha style test runners _and_ Node.js's built-in test runner.", "keywords": [ "test", @@ -42,8 +42,8 @@ "test:web": "virmator test --no-deps web 'src/test-web/**/*.test.ts' 'src/augments/universal-testing-suite/**/*.test.ts'" }, "dependencies": { - "@augment-vir/assert": "^31.1.1", - "@augment-vir/common": "^31.1.1", + "@augment-vir/assert": "^31.2.0", + "@augment-vir/common": "^31.2.0", "@open-wc/testing-helpers": "^3.0.1", "@virmator/test": "^13.10.3", "type-fest": "^4.29.0" diff --git a/packages/web/README.md b/packages/web/README.md index 54d90c97..b2536eb7 100644 --- a/packages/web/README.md +++ b/packages/web/README.md @@ -2,8 +2,8 @@ A collection of augments, helpers types, functions, and classes only for web (frontend) JavaScript environments. -- Includes a `querySelector` implementation that works with Shadow DOM: [`queryThroughShadow`](https://electrovir.github.io/augment-vir/functions/queryThroughShadow.html). -- Includes an easy way to list all nested children of an element: [`getNestedChildren`](https://electrovir.github.io/augment-vir/functions/getNestedChildren.html). -- and much more! +- Includes a `querySelector` implementation that works with Shadow DOM: [`queryThroughShadow`](https://electrovir.github.io/augment-vir/functions/queryThroughShadow.html). +- Includes an easy way to list all nested children of an element: [`getNestedChildren`](https://electrovir.github.io/augment-vir/functions/getNestedChildren.html). +- and much more! See the docs under `Web`, `Web : Elements`, or `Package: @augment-vir/web` here: https://electrovir.github.io/augment-vir diff --git a/packages/web/package.json b/packages/web/package.json index 9c616d0b..e92adec1 100644 --- a/packages/web/package.json +++ b/packages/web/package.json @@ -1,6 +1,6 @@ { "name": "@augment-vir/web", - "version": "31.1.1", + "version": "31.2.0", "description": "A collection of augments, helpers types, functions, and classes only for web (frontend) JavaScript environments.", "keywords": [ "augment", @@ -35,14 +35,14 @@ "test:update": "npm test" }, "dependencies": { - "@augment-vir/assert": "^31.1.1", - "@augment-vir/common": "^31.1.1", + "@augment-vir/assert": "^31.2.0", + "@augment-vir/common": "^31.2.0", "@date-vir/duration": "^7.0.1", "html-spec-tags": "^2.2.1", "type-fest": "^4.29.0" }, "devDependencies": { - "@augment-vir/test": "^31.1.1", + "@augment-vir/test": "^31.2.0", "bowser": "^2.11.0", "typescript": "^5.6.3" }, diff --git a/todo.md b/todo.md index 8f3283c3..e745db04 100644 --- a/todo.md +++ b/todo.md @@ -1,49 +1,38 @@ # Todo -- add a pretty diff to the assertion errors like chai has - - or at least include functions in the stringify output -- make a snapshot function in `@augment-vir/test` that supports both Node.js's built-in test runner's snapshot testing as well as something that works in web-test-runner. - - add `itSnapshots` -- look into using typedoc plugins - - https://github.com/Gerrit0/typedoc-plugin-mdn-links - - https://github.com/eyworldwide/typedoc-plugin-remove-references - - https://github.com/Gerrit0/typedoc-plugin-missing-exports -- make `isElementVisible` work in more situations (see its stackoverflow link) -- reverse engineer how web-test-runner calculates code coverage, because it works really well, and apply it to node test coverage -- add type guards to the boundary assertions on strings (like `assert.endsWith`) -- add a logger that saves to a file or to indexeddb -- create an augment that is like `Promise.all` but works on objects -- add shallow copy and deep copy -- move virmator's dir-contents augments into `@augment-vir/node` -- move path transforms to `@augment-vir/common` (like `toPosixPath`) - - maybe -- add a `convert` which is like `assert` - - `convertTo.number`, `convertToEnsured.number`, `convertToMaybe.number`, etc. for numbers, strings, etc. - - remove `number-conversation.ts` -- just a plain `diff` function - - better outputs from `diffArray` (it should output a partial) -- add a function that batches `Promise.all` calls -- allow readonly inputs to all guards (like assert.deepEquals) -- add `NestedType` type from `element-book` -- fix infinite recursion types, `InfiniteRecursionLimiter` from `element-book` works better -- add `NonEmptyString` from `element-vir` -- write my own node snapshot assertion that doesn't use Node.js's built-in format (which I don't like) -- make the operating system enums work in the frontend (move it to the common package) - -## Immediately after v30 release - -- use `ListenTarget` for `ShellEmitter` -- convert `Debounce` into an ListenTarget and emit events when: - - execute is called with no callback - - the callback is triggered - - the callback is skipped -- update all deps from `virmator` so they're all on v30 of augment-vir - - `prettier-plugin-multiline-arrays` - - `virmator` -- figure out why most packages are failing tests on windows - - like this: https://github.com/electrovir/proxy-vir/actions/runs/11876323290/job/33094520685 -- remove type guard from equality checks? (like jsonEquals) - -## Do now - -- add `this:void` to all functions +- add a pretty diff to the assertion errors like chai has + - or at least include functions in the stringify output +- look into using typedoc plugins + - https://github.com/Gerrit0/typedoc-plugin-mdn-links + - https://github.com/eyworldwide/typedoc-plugin-remove-references + - https://github.com/Gerrit0/typedoc-plugin-missing-exports +- make `isElementVisible` work in more situations (see its stackoverflow link) +- reverse engineer how web-test-runner calculates code coverage, because it works really well, and apply it to node test coverage +- add type guards to the boundary assertions on strings (like `assert.endsWith`) +- add a logger that saves to a file or to indexeddb +- create an augment that is like `Promise.all` but works on objects +- add shallow copy and deep copy +- move path transforms to `@augment-vir/common` (like `toPosixPath`) + - maybe +- add a `convert` which is like `assert` + - `convertTo.number`, `convertToEnsured.number`, `convertToMaybe.number`, etc. for numbers, strings, etc. + - remove `number-conversation.ts` +- just a plain `diff` function + - better outputs from `diffArray` (it should output a partial) +- add a function that batches `Promise.all` calls +- allow readonly inputs to all guards (like assert.deepEquals) +- add `NestedType` type from `element-book` +- fix infinite recursion types, `InfiniteRecursionLimiter` from `element-book` works better +- add `NonEmptyString` from `element-vir` +- write my own node snapshot assertion that doesn't use Node.js's built-in format (which I don't like) +- make the operating system enums work in the frontend (move it to the common package) +- add an `OmitSelect` (opposite of `SelectFrom`) +- use `ListenTarget` for `ShellEmitter` +- convert `Debounce` into an ListenTarget and emit events when: + - execute is called with no callback + - the callback is triggered + - the callback is skipped +- figure out why most packages are failing tests on windows + - like this: https://github.com/electrovir/proxy-vir/actions/runs/11876323290/job/33094520685 +- remove type guard from equality checks? (like jsonEquals) +- add `this:void` to all functions