Skip to content

Commit

Permalink
[minor] simplify the Values type and add CompleteValues with its prev…
Browse files Browse the repository at this point in the history
…ious implementation
  • Loading branch information
electrovir committed Dec 18, 2024
1 parent bf4fd7d commit 1e05bd3
Show file tree
Hide file tree
Showing 20 changed files with 152 additions and 155 deletions.
52 changes: 26 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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!
56 changes: 28 additions & 28 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down Expand Up @@ -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",
Expand Down
10 changes: 5 additions & 5 deletions packages/assert/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions packages/assert/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down Expand Up @@ -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",
Expand Down
Loading

0 comments on commit 1e05bd3

Please sign in to comment.