From e541552d14fd4412f6981cc3274bd32a2871d001 Mon Sep 17 00:00:00 2001 From: Lou Cyx Date: Fri, 22 May 2026 16:34:22 -0500 Subject: [PATCH 1/8] =?UTF-8?q?=E2=9A=A1=EF=B8=8F=20(@coven/memo)=20Optimi?= =?UTF-8?q?ze=20`updateCache`.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- @coven/memo/updateCache.ts | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/@coven/memo/updateCache.ts b/@coven/memo/updateCache.ts index ad4ace1..4365b0b 100644 --- a/@coven/memo/updateCache.ts +++ b/@coven/memo/updateCache.ts @@ -14,10 +14,9 @@ const createMap = () => new Map(); */ export const updateCache: ( cache: Cache, -) => (iterable: Iterable) => Cache = reduce( - (item) => (updateCache) => - updateCache.getOrInsertComputed( - isObject(item) ? memo(item) : item, - createMap, - ) as Cache, -); +) => (iterable: Iterable) => Cache = reduce((item) => { + const key = isObject(item) ? memo(item) : item; + + return (updateCache) => + updateCache.getOrInsertComputed(key, createMap) as Cache; +}); From fc552631e89097becbd3a1c9f4151ca5e8fb894c Mon Sep 17 00:00:00 2001 From: Lou Cyx Date: Fri, 22 May 2026 17:34:09 -0500 Subject: [PATCH 2/8] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20(@coven/compare)=20Ref?= =?UTF-8?q?actor=20`compareIterables`=20to=20use=20more=20of=20`@coven/ite?= =?UTF-8?q?rables`.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- @coven/compare/compareIterables.ts | 52 ++++++++++++++---------------- 1 file changed, 24 insertions(+), 28 deletions(-) diff --git a/@coven/compare/compareIterables.ts b/@coven/compare/compareIterables.ts index c3ea620..53acdf3 100644 --- a/@coven/compare/compareIterables.ts +++ b/@coven/compare/compareIterables.ts @@ -1,14 +1,20 @@ import { SIGIL } from "@coven/constants"; import { - getIterator, + append, + forever, iteratorFunctionToIterableIterator, map, + zip, + zipIndex, } from "@coven/iterables"; +import { always } from "@coven/utils"; import { compare } from "./compare.ts"; import type { CurriedComparison } from "./CurriedComparison.ts"; import type { Difference } from "./Difference.ts"; import { pathPrepend } from "./pathPrepend.ts"; +const appendSigilForever = append(forever(always(SIGIL))); + /** * Deep-compare iterables. * @@ -26,39 +32,29 @@ import { pathPrepend } from "./pathPrepend.ts"; * @param left Original iterable. * @returns Curried generator with `left` in context. */ -export const compareIterables = - ( - left: Iterable, - ): CurriedComparison> => +export const compareIterables = ( + left: Iterable, +): CurriedComparison> => { + const zipExtendedLeft = zip(zipIndex(appendSigilForever(left))); + /** * Curried {@linkcode compareIterables} with `left` set in context. * * @param right New iterable. * @returns Generator with differences. */ - (right) => + return (right) => iteratorFunctionToIterableIterator(function* (): Generator { - const leftIterator = getIterator(left); - const rightIterator = getIterator(right); - - // deno-lint-ignore coven/no-for - for ( - let index = 0, - { done: leftDone = false, value: leftValue } = - leftIterator.next(), - { done: rightDone = false, value: rightValue } = - rightIterator.next(); - !(leftDone && rightDone); - index += 1, - { done: leftDone = false, value: leftValue } = - leftIterator.next(), - { done: rightDone = false, value: rightValue } = - rightIterator.next() - ) { - yield* map(pathPrepend(index))( - compare(leftDone ? SIGIL : leftValue)( - rightDone ? SIGIL : rightValue, - ), - ); + for (const [[index, leftValue], rightValue] of zipExtendedLeft( + appendSigilForever(right), + )) { + if (leftValue !== SIGIL || rightValue !== SIGIL) { + yield* map(pathPrepend(index))( + compare(leftValue)(rightValue), + ); + } else { + return; + } } }); +}; From 307d0a814f8f75d1ed67a6522347044b3c980b1b Mon Sep 17 00:00:00 2001 From: Lou Cyx Date: Fri, 22 May 2026 17:35:55 -0500 Subject: [PATCH 3/8] =?UTF-8?q?=F0=9F=94=96=20(shared)=20Version=20bump.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- @coven/compare/deno.json | 2 +- @coven/constants/deno.json | 2 +- @coven/cron/deno.json | 2 +- @coven/expression/deno.json | 2 +- @coven/iterables/deno.json | 2 +- @coven/math/deno.json | 2 +- @coven/memo/deno.json | 2 +- @coven/pair/deno.json | 2 +- @coven/parsers/deno.json | 2 +- @coven/predicates/deno.json | 2 +- @coven/rules/deno.json | 2 +- @coven/template/deno.json | 2 +- @coven/terminal/deno.json | 2 +- @coven/types/deno.json | 2 +- @coven/utils/deno.json | 2 +- @simulcast/core/deno.json | 2 +- @simulcast/preact/deno.json | 2 +- @simulcast/react/deno.json | 2 +- @simulcast/vue/deno.json | 2 +- 19 files changed, 19 insertions(+), 19 deletions(-) diff --git a/@coven/compare/deno.json b/@coven/compare/deno.json index c7eb4a4..4838f6c 100644 --- a/@coven/compare/deno.json +++ b/@coven/compare/deno.json @@ -2,5 +2,5 @@ "$schema": "https://raw.githubusercontent.com/denoland/deno/main/cli/schemas/config-file.v1.json", "exports": "./mod.ts", "name": "@coven/compare", - "version": "0.9.8" + "version": "0.9.9" } diff --git a/@coven/constants/deno.json b/@coven/constants/deno.json index 7c955f2..3678327 100644 --- a/@coven/constants/deno.json +++ b/@coven/constants/deno.json @@ -2,5 +2,5 @@ "$schema": "https://raw.githubusercontent.com/denoland/deno/main/cli/schemas/config-file.v1.json", "exports": "./mod.ts", "name": "@coven/constants", - "version": "0.9.8" + "version": "0.9.9" } diff --git a/@coven/cron/deno.json b/@coven/cron/deno.json index 2da8305..e305797 100644 --- a/@coven/cron/deno.json +++ b/@coven/cron/deno.json @@ -2,5 +2,5 @@ "$schema": "https://raw.githubusercontent.com/denoland/deno/main/cli/schemas/config-file.v1.json", "exports": "./mod.ts", "name": "@coven/cron", - "version": "0.9.8" + "version": "0.9.9" } diff --git a/@coven/expression/deno.json b/@coven/expression/deno.json index 4e31664..25cdfd9 100644 --- a/@coven/expression/deno.json +++ b/@coven/expression/deno.json @@ -2,5 +2,5 @@ "$schema": "https://raw.githubusercontent.com/denoland/deno/main/cli/schemas/config-file.v1.json", "exports": "./mod.ts", "name": "@coven/expression", - "version": "0.9.8" + "version": "0.9.9" } diff --git a/@coven/iterables/deno.json b/@coven/iterables/deno.json index 2f40eeb..8fd3da9 100644 --- a/@coven/iterables/deno.json +++ b/@coven/iterables/deno.json @@ -5,5 +5,5 @@ "./async": "./async/mod.ts" }, "name": "@coven/iterables", - "version": "0.9.8" + "version": "0.9.9" } diff --git a/@coven/math/deno.json b/@coven/math/deno.json index 975c71f..e470404 100644 --- a/@coven/math/deno.json +++ b/@coven/math/deno.json @@ -2,5 +2,5 @@ "$schema": "https://raw.githubusercontent.com/denoland/deno/main/cli/schemas/config-file.v1.json", "exports": "./mod.ts", "name": "@coven/math", - "version": "0.9.8" + "version": "0.9.9" } diff --git a/@coven/memo/deno.json b/@coven/memo/deno.json index 51bb6b3..ccd0eec 100644 --- a/@coven/memo/deno.json +++ b/@coven/memo/deno.json @@ -2,5 +2,5 @@ "$schema": "https://raw.githubusercontent.com/denoland/deno/main/cli/schemas/config-file.v1.json", "exports": "./mod.ts", "name": "@coven/memo", - "version": "0.9.8" + "version": "0.9.9" } diff --git a/@coven/pair/deno.json b/@coven/pair/deno.json index 9566796..7054a8e 100644 --- a/@coven/pair/deno.json +++ b/@coven/pair/deno.json @@ -13,5 +13,5 @@ "react-dom": "npm:react-dom@^19.2.6" }, "name": "@coven/pair", - "version": "0.9.8" + "version": "0.9.9" } diff --git a/@coven/parsers/deno.json b/@coven/parsers/deno.json index b157e6a..531362e 100644 --- a/@coven/parsers/deno.json +++ b/@coven/parsers/deno.json @@ -2,5 +2,5 @@ "$schema": "https://raw.githubusercontent.com/denoland/deno/main/cli/schemas/config-file.v1.json", "exports": "./mod.ts", "name": "@coven/parsers", - "version": "0.9.8" + "version": "0.9.9" } diff --git a/@coven/predicates/deno.json b/@coven/predicates/deno.json index 4171509..29f05eb 100644 --- a/@coven/predicates/deno.json +++ b/@coven/predicates/deno.json @@ -2,5 +2,5 @@ "$schema": "https://raw.githubusercontent.com/denoland/deno/main/cli/schemas/config-file.v1.json", "exports": "./mod.ts", "name": "@coven/predicates", - "version": "0.9.8" + "version": "0.9.9" } diff --git a/@coven/rules/deno.json b/@coven/rules/deno.json index a084e5d..a6f9812 100644 --- a/@coven/rules/deno.json +++ b/@coven/rules/deno.json @@ -2,5 +2,5 @@ "$schema": "https://raw.githubusercontent.com/denoland/deno/main/cli/schemas/config-file.v1.json", "exports": "./mod.ts", "name": "@coven/rules", - "version": "0.9.8" + "version": "0.9.9" } diff --git a/@coven/template/deno.json b/@coven/template/deno.json index 338b925..a86b8db 100644 --- a/@coven/template/deno.json +++ b/@coven/template/deno.json @@ -2,5 +2,5 @@ "$schema": "https://raw.githubusercontent.com/denoland/deno/main/cli/schemas/config-file.v1.json", "exports": "./mod.ts", "name": "@coven/template", - "version": "0.9.8" + "version": "0.9.9" } diff --git a/@coven/terminal/deno.json b/@coven/terminal/deno.json index e3bc61c..1fa210e 100644 --- a/@coven/terminal/deno.json +++ b/@coven/terminal/deno.json @@ -2,5 +2,5 @@ "$schema": "https://raw.githubusercontent.com/denoland/deno/main/cli/schemas/config-file.v1.json", "exports": "./mod.ts", "name": "@coven/terminal", - "version": "0.9.8" + "version": "0.9.9" } diff --git a/@coven/types/deno.json b/@coven/types/deno.json index b2d50ad..bb26541 100644 --- a/@coven/types/deno.json +++ b/@coven/types/deno.json @@ -2,5 +2,5 @@ "$schema": "https://raw.githubusercontent.com/denoland/deno/main/cli/schemas/config-file.v1.json", "exports": "./mod.ts", "name": "@coven/types", - "version": "0.9.8" + "version": "0.9.9" } diff --git a/@coven/utils/deno.json b/@coven/utils/deno.json index 214c19c..af632b2 100644 --- a/@coven/utils/deno.json +++ b/@coven/utils/deno.json @@ -2,5 +2,5 @@ "$schema": "https://raw.githubusercontent.com/denoland/deno/main/cli/schemas/config-file.v1.json", "exports": "./mod.ts", "name": "@coven/utils", - "version": "0.9.8" + "version": "0.9.9" } diff --git a/@simulcast/core/deno.json b/@simulcast/core/deno.json index dc754ef..f13ebda 100644 --- a/@simulcast/core/deno.json +++ b/@simulcast/core/deno.json @@ -2,5 +2,5 @@ "$schema": "https://raw.githubusercontent.com/denoland/deno/main/cli/schemas/config-file.v1.json", "exports": "./mod.ts", "name": "@simulcast/core", - "version": "0.9.8" + "version": "0.9.9" } diff --git a/@simulcast/preact/deno.json b/@simulcast/preact/deno.json index 9f60646..3062c50 100644 --- a/@simulcast/preact/deno.json +++ b/@simulcast/preact/deno.json @@ -11,5 +11,5 @@ "preact": "npm:preact@^10.29.1" }, "name": "@simulcast/preact", - "version": "0.9.8" + "version": "0.9.9" } diff --git a/@simulcast/react/deno.json b/@simulcast/react/deno.json index 543b57f..892f162 100644 --- a/@simulcast/react/deno.json +++ b/@simulcast/react/deno.json @@ -12,5 +12,5 @@ "react": "npm:react@^19.2.6" }, "name": "@simulcast/react", - "version": "0.9.8" + "version": "0.9.9" } diff --git a/@simulcast/vue/deno.json b/@simulcast/vue/deno.json index c69a6c1..bbf8705 100644 --- a/@simulcast/vue/deno.json +++ b/@simulcast/vue/deno.json @@ -6,5 +6,5 @@ "vue": "npm:vue@^3.5.34" }, "name": "@simulcast/vue", - "version": "0.9.8" + "version": "0.9.9" } From 5fa517b298625853dc4b49633f99c29f3141a349 Mon Sep 17 00:00:00 2001 From: Lou Cyx Date: Fri, 22 May 2026 19:41:45 -0500 Subject: [PATCH 4/8] =?UTF-8?q?=F0=9F=90=9B=20(@coven/compare)=20Better=20?= =?UTF-8?q?`compareIterables`.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- @coven/compare/compareIterables.ts | 48 ++++++++++++++++-------------- 1 file changed, 25 insertions(+), 23 deletions(-) diff --git a/@coven/compare/compareIterables.ts b/@coven/compare/compareIterables.ts index 53acdf3..ca4c04d 100644 --- a/@coven/compare/compareIterables.ts +++ b/@coven/compare/compareIterables.ts @@ -1,19 +1,19 @@ import { SIGIL } from "@coven/constants"; import { - append, - forever, + getIterator, iteratorFunctionToIterableIterator, map, - zip, - zipIndex, } from "@coven/iterables"; -import { always } from "@coven/utils"; import { compare } from "./compare.ts"; import type { CurriedComparison } from "./CurriedComparison.ts"; import type { Difference } from "./Difference.ts"; import { pathPrepend } from "./pathPrepend.ts"; -const appendSigilForever = append(forever(always(SIGIL))); +const nextValue = (iteratorObject: IteratorObject) => { + const result = iteratorObject.next(); + + return result.done ? SIGIL : result.value; +}; /** * Deep-compare iterables. @@ -32,29 +32,31 @@ const appendSigilForever = append(forever(always(SIGIL))); * @param left Original iterable. * @returns Curried generator with `left` in context. */ -export const compareIterables = ( - left: Iterable, -): CurriedComparison> => { - const zipExtendedLeft = zip(zipIndex(appendSigilForever(left))); - +export const compareIterables = + ( + left: Iterable, + ): CurriedComparison> => /** * Curried {@linkcode compareIterables} with `left` set in context. * * @param right New iterable. * @returns Generator with differences. */ - return (right) => + (right) => iteratorFunctionToIterableIterator(function* (): Generator { - for (const [[index, leftValue], rightValue] of zipExtendedLeft( - appendSigilForever(right), - )) { - if (leftValue !== SIGIL || rightValue !== SIGIL) { - yield* map(pathPrepend(index))( - compare(leftValue)(rightValue), - ); - } else { - return; - } + const leftIterator = getIterator(left); + const rigthIterator = getIterator(right); + + // deno-lint-ignore coven/no-for + for ( + let index = 0, + leftValue = nextValue(leftIterator), + rightValue = nextValue(rigthIterator); + leftValue !== SIGIL || rightValue !== SIGIL; + index += 1, + leftValue = nextValue(leftIterator), + rightValue = nextValue(rigthIterator) + ) { + yield* map(pathPrepend(index))(compare(leftValue)(rightValue)); } }); -}; From d57341e4b455c849c7dc2d9c992b693daeae5300 Mon Sep 17 00:00:00 2001 From: Lou Cyx Date: Fri, 22 May 2026 19:42:47 -0500 Subject: [PATCH 5/8] =?UTF-8?q?=E2=AC=86=EF=B8=8F=20(shared)=20Dependency?= =?UTF-8?q?=20upgrade.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- @coven/pair/deno.json | 6 +++--- @simulcast/preact/deno.json | 2 +- @simulcast/react/deno.json | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/@coven/pair/deno.json b/@coven/pair/deno.json index 7054a8e..8cd4780 100644 --- a/@coven/pair/deno.json +++ b/@coven/pair/deno.json @@ -5,10 +5,10 @@ "./react": "./react/mod.ts" }, "imports": { - "@types/react": "npm:@types/react@^19.2.14", + "@types/react": "npm:@types/react@^19.2.15", "@types/react-dom": "npm:@types/react-dom@^19.2.3", - "preact": "npm:preact@^10.29.1", - "preact-render-to-string": "npm:preact-render-to-string@^6.6.7", + "preact": "npm:preact@^10.29.2", + "preact-render-to-string": "npm:preact-render-to-string@^6.7.0", "react": "npm:react@^19.2.6", "react-dom": "npm:react-dom@^19.2.6" }, diff --git a/@simulcast/preact/deno.json b/@simulcast/preact/deno.json index 3062c50..db0152b 100644 --- a/@simulcast/preact/deno.json +++ b/@simulcast/preact/deno.json @@ -8,7 +8,7 @@ "imports": { "@testing-library/preact": "npm:@testing-library/preact@^3.2.4", "@testing-library/user-event": "npm:@testing-library/user-event@^14.6.1", - "preact": "npm:preact@^10.29.1" + "preact": "npm:preact@^10.29.2" }, "name": "@simulcast/preact", "version": "0.9.9" diff --git a/@simulcast/react/deno.json b/@simulcast/react/deno.json index 892f162..1d4dd53 100644 --- a/@simulcast/react/deno.json +++ b/@simulcast/react/deno.json @@ -8,7 +8,7 @@ "imports": { "@testing-library/react": "npm:@testing-library/react@^16.3.2", "@testing-library/user-event": "npm:@testing-library/user-event@^14.6.1", - "@types/react": "npm:@types/react@^19.2.14", + "@types/react": "npm:@types/react@^19.2.15", "react": "npm:react@^19.2.6" }, "name": "@simulcast/react", From 5036bd677d29b5fbd489d8dd705074177c51ab5d Mon Sep 17 00:00:00 2001 From: Lou Cyx Date: Wed, 17 Jun 2026 15:49:40 -0500 Subject: [PATCH 6/8] =?UTF-8?q?=F0=9F=8E=A8=20(prettier)=20Make=20formatti?= =?UTF-8?q?ng=20more=20consistent.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- @coven/compare/README.md | 24 +++------------- @coven/compare/tests/compare.test.ts | 29 +++----------------- @coven/compare/tests/pathPrepend.test.ts | 16 ++--------- @coven/cron/tests/parse.test.ts | 8 +----- @coven/expression/build.ts | 5 +--- @coven/iterables/async/tests/groupBy.test.ts | 5 +--- @coven/iterables/deno.json | 5 +--- @coven/pair/deno.json | 5 +--- @coven/pair/react/tests/react.test.ts | 6 +--- @coven/rules/README.md | 4 +-- @coven/template/README.md | 5 +--- @coven/template/tests/template.test.ts | 5 +--- @coven/utils/tests/mutate.test.ts | 10 ++----- @coven/utils/tests/set.test.ts | 7 +---- @simulcast/core/tests/emit.test.ts | 6 ++-- @simulcast/preact/deno.json | 5 +--- @simulcast/react/README.md | 4 +-- @simulcast/react/deno.json | 5 +--- @simulcast/react/tests/useBroadcast.test.tsx | 4 +-- prettier.config.ts | 7 ++++- 20 files changed, 35 insertions(+), 130 deletions(-) diff --git a/@coven/compare/README.md b/@coven/compare/README.md index a779d94..4aad22c 100644 --- a/@coven/compare/README.md +++ b/@coven/compare/README.md @@ -61,12 +61,7 @@ compare({ example: 13 })({ example: 42 }); The yielded update will have values yielded from its `path`: ```typescript -({ - kind: "UPDATE", - left: 13, - right: 42, - path: ["example"], -}); +({ kind: "UPDATE", left: 13, right: 42, path: ["example"] }); ``` ### Object delete @@ -82,11 +77,7 @@ compare({ example: 13 })({}); Yields this: ```typescript -({ - kind: "DELETE", - left: 13, - path: ["example"], -}); +({ kind: "DELETE", left: 13, path: ["example"] }); ``` ### Object create @@ -102,11 +93,7 @@ compare({})({ example: 42 }); Yields this: ```typescript -({ - kind: "CREATE", - right: 42, - path: ["example"], -}); +({ kind: "CREATE", right: 42, path: ["example"] }); ``` ### Multiple differences @@ -117,10 +104,7 @@ differences: ```typescript import { compare } from "@coven/compare"; -compare({ - original: "old", - updated: "old", -})({ +compare({ original: "old", updated: "old" })({ created: "new", updated: "new", }); diff --git a/@coven/compare/tests/compare.test.ts b/@coven/compare/tests/compare.test.ts index 1ee31e8..00bf5c8 100644 --- a/@coven/compare/tests/compare.test.ts +++ b/@coven/compare/tests/compare.test.ts @@ -26,12 +26,7 @@ Deno.test("Comparing same object yields nothing", () => Deno.test("Comparing different string yields `UpdateDifference`", () => assertEquals(flat(compare("magic")("cat")), [ - { - kind: UPDATE_KIND, - left: "magic", - path: [], - right: "cat", - }, + { kind: UPDATE_KIND, left: "magic", path: [], right: "cat" }, ]), ); @@ -41,12 +36,7 @@ Deno.test("Comparing equal arrays yields nothing", () => Deno.test("Comparing different arrays yields `UpdateDifference`", () => assertEquals(flat(compare(["magic"])(["cat"])), [ - { - kind: UPDATE_KIND, - left: "magic", - path: [0], - right: "cat", - }, + { kind: UPDATE_KIND, left: "magic", path: [0], right: "cat" }, ]), ); @@ -104,13 +94,7 @@ Deno.test("Comparing array with less items yields `DeleteDifference`", () => { [property1]: "magic" }, ]), ), - [ - { - kind: DELETE_KIND, - left: { [property2]: "cat" }, - path: [1], - }, - ], + [{ kind: DELETE_KIND, left: { [property2]: "cat" }, path: [1] }], ), ); @@ -220,12 +204,7 @@ Deno.test( Deno.test("Comparing 0 with -0 should yield `UpdateDifference`", () => assertEquals(flat(compare(-0)(0)), [ - { - kind: UPDATE_KIND, - left: -0, - path: [], - right: 0, - }, + { kind: UPDATE_KIND, left: -0, path: [], right: 0 }, ]), ); diff --git a/@coven/compare/tests/pathPrepend.test.ts b/@coven/compare/tests/pathPrepend.test.ts index 705fa3d..3efa887 100644 --- a/@coven/compare/tests/pathPrepend.test.ts +++ b/@coven/compare/tests/pathPrepend.test.ts @@ -22,19 +22,7 @@ Deno.test("Prepend key to existing path", () => Deno.test("Prepend key to missing path yields prepended key", () => assertEquals( - flat([ - prepend13({ - kind: DELETE_KIND, - left: "✨", - path: [].values(), - }), - ]), - [ - { - kind: DELETE_KIND, - left: "✨", - path: [13], - }, - ], + flat([prepend13({ kind: DELETE_KIND, left: "✨", path: [].values() })]), + [{ kind: DELETE_KIND, left: "✨", path: [13] }], ), ); diff --git a/@coven/cron/tests/parse.test.ts b/@coven/cron/tests/parse.test.ts index ebe8db0..1457e85 100644 --- a/@coven/cron/tests/parse.test.ts +++ b/@coven/cron/tests/parse.test.ts @@ -132,13 +132,7 @@ Deno.test( Deno.test("all fields set return object with all properties set", () => assertStrictEquals( parse("13 13 13 10 5"), - memo({ - dayOfMonth: 13, - dayOfWeek: 5, - hour: 13, - minute: 13, - month: 10, - }), + memo({ dayOfMonth: 13, dayOfWeek: 5, hour: 13, minute: 13, month: 10 }), ), ); diff --git a/@coven/expression/build.ts b/@coven/expression/build.ts index 59cebbc..6dceb4a 100644 --- a/@coven/expression/build.ts +++ b/@coven/expression/build.ts @@ -37,10 +37,7 @@ export const build: ( ) => new RegExp(join(...atoms), flags) as Replace< RegExp, - Readonly<{ - flags: Flags; - source: StringJoin; - }> + Readonly<{ flags: Flags; source: StringJoin }> >, ), ); diff --git a/@coven/iterables/async/tests/groupBy.test.ts b/@coven/iterables/async/tests/groupBy.test.ts index 0747d9e..c5c38e4 100644 --- a/@coven/iterables/async/tests/groupBy.test.ts +++ b/@coven/iterables/async/tests/groupBy.test.ts @@ -11,10 +11,7 @@ Deno.test( async () => assertEquals( await groupBy((groupName: string) => groupName)(stringArray), - { - [string1]: [string1, string1], - [string2]: [string2, string2], - }, + { [string1]: [string1, string1], [string2]: [string2, string2] }, ), ); diff --git a/@coven/iterables/deno.json b/@coven/iterables/deno.json index 8fd3da9..8d4b4bc 100644 --- a/@coven/iterables/deno.json +++ b/@coven/iterables/deno.json @@ -1,9 +1,6 @@ { "$schema": "https://raw.githubusercontent.com/denoland/deno/main/cli/schemas/config-file.v1.json", - "exports": { - ".": "./mod.ts", - "./async": "./async/mod.ts" - }, + "exports": { ".": "./mod.ts", "./async": "./async/mod.ts" }, "name": "@coven/iterables", "version": "0.9.9" } diff --git a/@coven/pair/deno.json b/@coven/pair/deno.json index 8cd4780..de3b600 100644 --- a/@coven/pair/deno.json +++ b/@coven/pair/deno.json @@ -1,9 +1,6 @@ { "$schema": "https://raw.githubusercontent.com/denoland/deno/main/cli/schemas/config-file.v1.json", - "exports": { - "./preact": "./preact/mod.ts", - "./react": "./react/mod.ts" - }, + "exports": { "./preact": "./preact/mod.ts", "./react": "./react/mod.ts" }, "imports": { "@types/react": "npm:@types/react@^19.2.15", "@types/react-dom": "npm:@types/react-dom@^19.2.3", diff --git a/@coven/pair/react/tests/react.test.ts b/@coven/pair/react/tests/react.test.ts index 64bb66e..d306643 100644 --- a/@coven/pair/react/tests/react.test.ts +++ b/@coven/pair/react/tests/react.test.ts @@ -12,11 +12,7 @@ const Render = (usePairedState: typeof useState) => { [], ); - return jsx("button", { - children: count, - onClick, - type: "button", - }); + return jsx("button", { children: count, onClick, type: "button" }); }; const Wanted = ({ children }: PairedComponentProperties) => diff --git a/@coven/rules/README.md b/@coven/rules/README.md index c8ca503..5b69faf 100644 --- a/@coven/rules/README.md +++ b/@coven/rules/README.md @@ -33,9 +33,7 @@ To use this from deno, update `deno.json`'s `lint` property and add the following: ```json -{ - "plugins": ["jsr:@coven/rules"] -} +{ "plugins": ["jsr:@coven/rules"] } ``` ## Other links diff --git a/@coven/template/README.md b/@coven/template/README.md index bc27d84..9e63afc 100644 --- a/@coven/template/README.md +++ b/@coven/template/README.md @@ -18,10 +18,7 @@ import { template } from "@coven/template"; const moneyTemplate = template({ boolean: (payed) => (payed ? "it's payed" : "it's due"), number: (cost) => - cost.toLocaleString("en-US", { - style: "currency", - currency: "USD", - }), + cost.toLocaleString("en-US", { style: "currency", currency: "USD" }), }); // And then we use it anywhere diff --git a/@coven/template/tests/template.test.ts b/@coven/template/tests/template.test.ts index 5a70029..7ad9fdd 100644 --- a/@coven/template/tests/template.test.ts +++ b/@coven/template/tests/template.test.ts @@ -4,10 +4,7 @@ import { assertStrictEquals } from "@std/assert"; const moneyTemplate = template({ boolean: (payed) => (payed ? "it's payed" : "it's due"), number: (cost) => - cost.toLocaleString("en-US", { - style: "currency", - currency: "USD", - }), + cost.toLocaleString("en-US", { style: "currency", currency: "USD" }), }); const payed = false; diff --git a/@coven/utils/tests/mutate.test.ts b/@coven/utils/tests/mutate.test.ts index 33ea01b..0d32da4 100644 --- a/@coven/utils/tests/mutate.test.ts +++ b/@coven/utils/tests/mutate.test.ts @@ -9,18 +9,12 @@ const magicObject = { "✨": "✨" }; Deno.test( 'Mutate function that sets a `"✨"` property to `"🎃"` and an empty object returns object with added property', - () => - assertEquals((mutateMagic(emptyObject), emptyObject), { - "✨": "🎃", - }), + () => assertEquals((mutateMagic(emptyObject), emptyObject), { "✨": "🎃" }), ); Deno.test( 'Mutate function that sets a `"✨"` property to `"🎃"` and an object with that property on it returns object with added property', - () => - assertEquals((mutateMagic(magicObject), magicObject), { - "✨": "🎃", - }), + () => assertEquals((mutateMagic(magicObject), magicObject), { "✨": "🎃" }), ); Deno.test( diff --git a/@coven/utils/tests/set.test.ts b/@coven/utils/tests/set.test.ts index daf1b50..b11e8ca 100644 --- a/@coven/utils/tests/set.test.ts +++ b/@coven/utils/tests/set.test.ts @@ -19,11 +19,6 @@ Deno.test( Deno.test("Setter doesn't mutate original object", () => assertEquals( [setMagic(existingObject), existingObject], - [ - { - "✨": true, - }, - { "✨": false }, - ], + [{ "✨": true }, { "✨": false }], ), ); diff --git a/@simulcast/core/tests/emit.test.ts b/@simulcast/core/tests/emit.test.ts index a6084b5..b7fa41c 100644 --- a/@simulcast/core/tests/emit.test.ts +++ b/@simulcast/core/tests/emit.test.ts @@ -8,9 +8,9 @@ type TestRegistry = { [TEST_EVENT]: never }; Deno.test("Emit with handlers calls the handlers", () => { let called = false; - emit({ - [TEST_EVENT]: [() => (called = true)].values(), - })(TEST_EVENT)(); + emit({ [TEST_EVENT]: [() => (called = true)].values() })( + TEST_EVENT, + )(); assert(called); }); diff --git a/@simulcast/preact/deno.json b/@simulcast/preact/deno.json index db0152b..b7f716a 100644 --- a/@simulcast/preact/deno.json +++ b/@simulcast/preact/deno.json @@ -1,9 +1,6 @@ { "$schema": "https://raw.githubusercontent.com/denoland/deno/main/cli/schemas/config-file.v1.json", - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "preact" - }, + "compilerOptions": { "jsx": "react-jsx", "jsxImportSource": "preact" }, "exports": "./mod.ts", "imports": { "@testing-library/preact": "npm:@testing-library/preact@^3.2.4", diff --git a/@simulcast/react/README.md b/@simulcast/react/README.md index 778b709..0de8e4a 100644 --- a/@simulcast/react/README.md +++ b/@simulcast/react/README.md @@ -14,9 +14,7 @@ import { broadcast } from "@simulcast/core"; import { useBroadcast } from "@simulcast/react"; import type { MouseEvent } from "react"; -const { registry } = broadcast<{ - click: MouseEvent; -}>(); +const { registry } = broadcast<{ click: MouseEvent }>(); const Component = () => { const { emitClick, onClick } = useBroadcast(registry); diff --git a/@simulcast/react/deno.json b/@simulcast/react/deno.json index 1d4dd53..afcb818 100644 --- a/@simulcast/react/deno.json +++ b/@simulcast/react/deno.json @@ -1,9 +1,6 @@ { "$schema": "https://raw.githubusercontent.com/denoland/deno/main/cli/schemas/config-file.v1.json", - "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "react" - }, + "compilerOptions": { "jsx": "react-jsx", "jsxImportSource": "react" }, "exports": "./mod.ts", "imports": { "@testing-library/react": "npm:@testing-library/react@^16.3.2", diff --git a/@simulcast/react/tests/useBroadcast.test.tsx b/@simulcast/react/tests/useBroadcast.test.tsx index 1ee5627..b3023a5 100644 --- a/@simulcast/react/tests/useBroadcast.test.tsx +++ b/@simulcast/react/tests/useBroadcast.test.tsx @@ -68,9 +68,7 @@ Deno.test( Deno.test("Broadcast's on handler is removed when unmounted", async () => { const state1 = { calledTimes: 0 }; const state2 = { calledTimes: 0 }; - const { registry } = broadcast<{ - click: MouseEvent; - }>(); + const { registry } = broadcast<{ click: MouseEvent }>(); const App = () => { // deno-lint-ignore no-boolean-literal-for-arguments diff --git a/prettier.config.ts b/prettier.config.ts index e604c39..72dec53 100644 --- a/prettier.config.ts +++ b/prettier.config.ts @@ -51,6 +51,11 @@ export default { */ jsxSingleQuote: false, + /** + * Collapse all objects that can be collapsed. + */ + objectWrap: "collapse", + /** * Print width is ideal at 80 characters. */ @@ -64,7 +69,7 @@ export default { /** * Add quotes around properties of object if needed. */ - quoteProps: "as-needed", + quoteProps: "consistent", /** * Print semicolons at the ends of statements. From 10560eb203ca4b5bab7b1a786e5cf91c0bc79edf Mon Sep 17 00:00:00 2001 From: Lou Cyx Date: Wed, 17 Jun 2026 15:49:54 -0500 Subject: [PATCH 7/8] =?UTF-8?q?=E2=AC=86=EF=B8=8F=20(shared)=20Dependency?= =?UTF-8?q?=20upgrade.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- @coven/pair/deno.json | 6 +++--- @simulcast/react/deno.json | 4 ++-- @simulcast/vue/deno.json | 4 ++-- deno.json | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/@coven/pair/deno.json b/@coven/pair/deno.json index de3b600..af48da8 100644 --- a/@coven/pair/deno.json +++ b/@coven/pair/deno.json @@ -2,12 +2,12 @@ "$schema": "https://raw.githubusercontent.com/denoland/deno/main/cli/schemas/config-file.v1.json", "exports": { "./preact": "./preact/mod.ts", "./react": "./react/mod.ts" }, "imports": { - "@types/react": "npm:@types/react@^19.2.15", + "@types/react": "npm:@types/react@^19.2.17", "@types/react-dom": "npm:@types/react-dom@^19.2.3", "preact": "npm:preact@^10.29.2", "preact-render-to-string": "npm:preact-render-to-string@^6.7.0", - "react": "npm:react@^19.2.6", - "react-dom": "npm:react-dom@^19.2.6" + "react": "npm:react@^19.2.7", + "react-dom": "npm:react-dom@^19.2.7" }, "name": "@coven/pair", "version": "0.9.9" diff --git a/@simulcast/react/deno.json b/@simulcast/react/deno.json index afcb818..d36273c 100644 --- a/@simulcast/react/deno.json +++ b/@simulcast/react/deno.json @@ -5,8 +5,8 @@ "imports": { "@testing-library/react": "npm:@testing-library/react@^16.3.2", "@testing-library/user-event": "npm:@testing-library/user-event@^14.6.1", - "@types/react": "npm:@types/react@^19.2.15", - "react": "npm:react@^19.2.6" + "@types/react": "npm:@types/react@^19.2.17", + "react": "npm:react@^19.2.7" }, "name": "@simulcast/react", "version": "0.9.9" diff --git a/@simulcast/vue/deno.json b/@simulcast/vue/deno.json index bbf8705..66cb852 100644 --- a/@simulcast/vue/deno.json +++ b/@simulcast/vue/deno.json @@ -2,8 +2,8 @@ "$schema": "https://raw.githubusercontent.com/denoland/deno/main/cli/schemas/config-file.v1.json", "exports": "./mod.ts", "imports": { - "@vue/test-utils": "npm:@vue/test-utils@^2.4.10", - "vue": "npm:vue@^3.5.34" + "@vue/test-utils": "npm:@vue/test-utils@^2.4.11", + "vue": "npm:vue@^3.5.38" }, "name": "@simulcast/vue", "version": "0.9.9" diff --git a/deno.json b/deno.json index f4fd5b4..2006578 100644 --- a/deno.json +++ b/deno.json @@ -34,8 +34,8 @@ }, "imports": { "@std/assert": "jsr:@std/assert@^1.0.19", - "happy-dom": "npm:happy-dom@^20.9.0", - "prettier": "npm:prettier@^3.8.3" + "happy-dom": "npm:happy-dom@^20.10.5", + "prettier": "npm:prettier@^3.8.4" }, "lint": { "plugins": ["jsr:@coven/rules"], From 1f067a4f03aa0ea0d46737208f6a56edaff5b4e6 Mon Sep 17 00:00:00 2001 From: Lou Cyx Date: Wed, 17 Jun 2026 16:37:15 -0500 Subject: [PATCH 8/8] =?UTF-8?q?=F0=9F=93=9D=20(shared)=20Update=20all=20RE?= =?UTF-8?q?ADME.md=20files=20to=20organize=20links.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- @coven/compare/README.md | 29 +++++++---- @coven/constants/README.md | 31 +++++++----- @coven/cron/README.md | 36 +++++++++----- @coven/expression/README.md | 29 +++++++---- @coven/iterables/README.md | 27 ++++++---- @coven/math/README.md | 39 +++++++++------ @coven/memo/README.md | 29 +++++++---- @coven/pair/README.md | 33 ++++++++----- @coven/parsers/README.md | 35 ++++++++----- @coven/predicates/README.md | 29 +++++++---- @coven/rules/README.md | 26 ++++++---- @coven/template/README.md | 27 +++++++--- @coven/terminal/README.md | 98 +++++++++++++++++++++++++------------ @coven/types/README.md | 21 +++++--- @coven/utils/README.md | 32 +++++++----- @simulcast/core/README.md | 36 +++++++++----- @simulcast/preact/README.md | 28 +++++++---- @simulcast/react/README.md | 28 +++++++---- @simulcast/vue/README.md | 28 +++++++---- 19 files changed, 423 insertions(+), 218 deletions(-) diff --git a/@coven/compare/README.md b/@coven/compare/README.md index 4aad22c..77c296f 100644 --- a/@coven/compare/README.md +++ b/@coven/compare/README.md @@ -1,8 +1,7 @@ -![Coven Engineering Compare](https://raw.githubusercontent.com/covenengineering/libraries/main/@coven/compare/logo.svg) +![Coven Engineering Compare][logo] -[![JSR](https://jsr.io/badges/@coven/compare)](https://coven.to/compare) -[![JSR Score](https://jsr.io/badges/@coven/compare/score)](https://coven.to/compare/score) -[![Coverage Status](https://img.shields.io/codecov/c/github/covenengineering/libraries?color=%23083344&component=coven__compare&label=Codecov&labelColor=%23F01F7A&logo=Codecov&logoColor=%23fff)](https://app.codecov.io/github/covenengineering/libraries?components[0]=Coven%20Engineering%20Compare) +[![JSR][jsr-version-badge]][jsr-link] [![JSR Score][jsr-score-badge]][jsr-score] +[![Coverage Status][coverage-badge]][coverage] ⚖️ Minimalist diffing. @@ -15,9 +14,9 @@ the differences between said values. The yielded differences are represented by - **Update:** When `left` and `right` values are different. - **Delete:** When `left` value exists and `right` value is missing. -Like all [Coven Engineering](https://coven.engineering) libraries, it has 100% -test coverage and it's built in top of modern tech compatible with all -JavaScript runtimes. +Like all [Coven Engineering][coven-engineering] libraries, it has 100% test +coverage and it's built in top of modern tech compatible with all JavaScript +runtimes. ## Examples @@ -118,6 +117,16 @@ That yields all 3 kind of differences: ({ kind: "CREATE", right: "new", path: ["created"] }); ``` -## Other links - -- [Coverage](https://app.codecov.io/github/covenengineering/libraries). + + +[coven-engineering]: https://coven.engineering +[coverage]: + https://app.codecov.io/github/covenengineering/libraries%3Fcomponents%5B0%5D%3DCoven%2520Engineering%2520Compare +[coverage-badge]: + https://img.shields.io/codecov/c/github/covenengineering/libraries?color=%23083344&component=coven__compare&label=Codecov&labelColor=%23F01F7A&logo=Codecov&logoColor=%23fff +[jsr-link]: https://coven.to/compare +[jsr-score]: https://coven.to/compare/score +[jsr-score-badge]: https://jsr.io/badges/@coven/compare/score +[jsr-version-badge]: https://jsr.io/badges/@coven/compare +[logo]: + https://raw.githubusercontent.com/covenengineering/libraries/main/@coven/compare/logo.svg diff --git a/@coven/constants/README.md b/@coven/constants/README.md index 14d1cad..1f517af 100644 --- a/@coven/constants/README.md +++ b/@coven/constants/README.md @@ -1,18 +1,17 @@ -![Coven Engineering Constants](https://raw.githubusercontent.com/covenengineering/libraries/main/@coven/constants/logo.svg) +![Coven Engineering Constants][logo] -[![JSR](https://jsr.io/badges/@coven/constants)](https://coven.to/constants) -[![JSR Score](https://jsr.io/badges/@coven/constants/score)](https://coven.to/constants/score) -[![Coverage Status](https://img.shields.io/codecov/c/github/covenengineering/libraries?color=%23083344&component=coven__constants&label=Codecov&labelColor=%23F01F7A&logo=Codecov&logoColor=%23fff)](https://app.codecov.io/github/covenengineering/libraries?components[0]=Coven%20Engineering%20Constants) +[![JSR][jsr-version-badge]][jsr-link] [![JSR Score][jsr-score-badge]][jsr-score] +[![Coverage Status][coverage-badge]][coverage] 🧱 Common constants. This library provides constants commonly used for initial and default values as immutable structures to avoid accidental mutations. -Like all [Coven Engineering](https://coven.engineering) libraries, it has 100% -test coverage and it's built in top of modern tech compatible with all -JavaScript runtimes. The tests for this library only make sure trying to do -mutations throws. +Like all [Coven Engineering][coven-engineering] libraries, it has 100% test +coverage and it's built in top of modern tech compatible with all JavaScript +runtimes. The tests for this library only make sure trying to do mutations +throws. ## Exported constants @@ -31,6 +30,16 @@ console.log(EMPTY_OBJECT); // {} console.log(SIGIL); // Symbol("⛧") ``` -## Other links - -- [Coverage](https://app.codecov.io/github/covenengineering/libraries). + + +[coven-engineering]: https://coven.engineering +[coverage]: + https://app.codecov.io/github/covenengineering/libraries%3Fcomponents%5B0%5D%3DCoven%2520Engineering%2520Constants +[coverage-badge]: + https://img.shields.io/codecov/c/github/covenengineering/libraries?color=%23083344&component=coven__constants&label=Codecov&labelColor=%23F01F7A&logo=Codecov&logoColor=%23fff +[jsr-link]: https://coven.to/constants +[jsr-score]: https://coven.to/constants/score +[jsr-score-badge]: https://jsr.io/badges/@coven/constants/score +[jsr-version-badge]: https://jsr.io/badges/@coven/constants +[logo]: + https://raw.githubusercontent.com/covenengineering/libraries/main/@coven/constants/logo.svg diff --git a/@coven/cron/README.md b/@coven/cron/README.md index d495314..190b376 100644 --- a/@coven/cron/README.md +++ b/@coven/cron/README.md @@ -1,24 +1,23 @@ -![Coven Engineering Cron](https://raw.githubusercontent.com/covenengineering/libraries/main/@coven/cron/logo.svg) +![Coven Engineering Cron][logo] -[![JSR](https://jsr.io/badges/@coven/cron)](https://coven.to/cron) -[![JSR Score](https://jsr.io/badges/@coven/cron/score)](https://coven.to/cron/score) -[![Coverage Status](https://img.shields.io/codecov/c/github/covenengineering/libraries?color=%23083344&component=coven__cron&label=Codecov&labelColor=%23F01F7A&logo=Codecov&logoColor=%23fff)](https://app.codecov.io/github/covenengineering/libraries?components[0]=Coven%20Engineering%20Cron) +[![JSR][jsr-version-badge]][jsr-link] [![JSR Score][jsr-score-badge]][jsr-score] +[![Coverage Status][coverage-badge]][coverage] ⏳ Fantastic cron parser and constructor. This library is the fastest, smallest and safest cron expression parser out there. This is because it uses a regular expression (built with -[`@coven/expression`](https://coven.to/expression)) to parse strings into a -consumable object, and the parse back is done by really quick curried functions -and generators. +[`@coven/expression`][coven-expression]) to parse strings into a consumable +object, and the parse back is done by really quick curried functions and +generators. It also includes a `nextDate` util that given a `Date` and a valid cron expression, will return the next matching date. It does validations beforehand so no "Invalid Date" errors are returned. -Like all [Coven Engineering](https://coven.engineering) libraries, it has 100% -test coverage and it's built in top of modern tech compatible with all -JavaScript runtimes. +Like all [Coven Engineering][coven-engineering] libraries, it has 100% test +coverage and it's built in top of modern tech compatible with all JavaScript +runtimes. Only known limitation is it only accepts valid standard unix cron expressions, so cron quartz is not supported. @@ -112,6 +111,17 @@ take(2)(nextISODates("1989-10-13T10:15:42.123Z")("* * * * *")); // ["1989-10-13T10:16:00.000Z", "1989-10-13T10:17:00.000Z"] ``` -## Other links - -- [Coverage](https://app.codecov.io/github/covenengineering/libraries). + + +[coven-expression]: https://coven.to/expression +[coven-engineering]: https://coven.engineering +[coverage]: + https://app.codecov.io/github/covenengineering/libraries%3Fcomponents%5B0%5D%3DCoven%2520Engineering%2520Cron +[coverage-badge]: + https://img.shields.io/codecov/c/github/covenengineering/libraries?color=%23083344&component=coven__cron&label=Codecov&labelColor=%23F01F7A&logo=Codecov&logoColor=%23fff +[jsr-link]: https://coven.to/cron +[jsr-score]: https://coven.to/cron/score +[jsr-score-badge]: https://jsr.io/badges/@coven/cron/score +[jsr-version-badge]: https://jsr.io/badges/@coven/cron +[logo]: + https://raw.githubusercontent.com/covenengineering/libraries/main/@coven/cron/logo.svg diff --git a/@coven/expression/README.md b/@coven/expression/README.md index 3c04e86..d457401 100644 --- a/@coven/expression/README.md +++ b/@coven/expression/README.md @@ -1,8 +1,7 @@ -![Coven Engineering Expression](https://raw.githubusercontent.com/covenengineering/libraries/main/@coven/expression/logo.svg) +![Coven Engineering Expression][logo] -[![JSR](https://jsr.io/badges/@coven/expression)](https://coven.to/expression) -[![JSR Score](https://jsr.io/badges/@coven/expression/score)](https://coven.to/expression/score) -[![Coverage Status](https://img.shields.io/codecov/c/github/covenengineering/libraries?color=%23083344&component=coven__expression&label=Codecov&labelColor=%23F01F7A&logo=Codecov&logoColor=%23fff)](https://app.codecov.io/github/covenengineering/libraries?components[0]=Coven%20Engineering%20Expression) +[![JSR][jsr-version-badge]][jsr-link] [![JSR Score][jsr-score-badge]][jsr-score] +[![Coverage Status][coverage-badge]][coverage] 🧙‍♀️ Magical regular expressions composer. @@ -12,9 +11,9 @@ functions and constants strongly typed, so the type is already a hardcoded string that reflects the regular expression being built, while giving an API that's easier to read and maintain. -Like all [Coven Engineering](https://coven.engineering) libraries, it has 100% -test coverage and it's built in top of modern tech compatible with all -JavaScript runtimes. +Like all [Coven Engineering][coven-engineering] libraries, it has 100% test +coverage and it's built in top of modern tech compatible with all JavaScript +runtimes. ## Example @@ -24,6 +23,16 @@ import { buildUnicode, disjunction, group } from "@coven/expression"; buildUnicode(group(disjunction("this", "that"))); // /(?:this|that)/u ``` -## Other links - -- [Coverage](https://app.codecov.io/github/covenengineering/libraries). + + +[coven-engineering]: https://coven.engineering +[coverage]: + https://app.codecov.io/github/covenengineering/libraries%3Fcomponents%5B0%5D%3DCoven%2520Engineering%2520Expression +[coverage-badge]: + https://img.shields.io/codecov/c/github/covenengineering/libraries?color=%23083344&component=coven__expression&label=Codecov&labelColor=%23F01F7A&logo=Codecov&logoColor=%23fff +[jsr-link]: https://coven.to/expression +[jsr-score]: https://coven.to/expression/score +[jsr-score-badge]: https://jsr.io/badges/@coven/expression/score +[jsr-version-badge]: https://jsr.io/badges/@coven/expression +[logo]: + https://raw.githubusercontent.com/covenengineering/libraries/main/@coven/expression/logo.svg diff --git a/@coven/iterables/README.md b/@coven/iterables/README.md index 774aacd..4073e8f 100644 --- a/@coven/iterables/README.md +++ b/@coven/iterables/README.md @@ -1,8 +1,7 @@ -![Coven Engineering Iterables](https://raw.githubusercontent.com/covenengineering/libraries/main/@coven/iterables/logo.svg) +![Coven Engineering Iterables][logo] -[![JSR](https://jsr.io/badges/@coven/iterables)](https://coven.to/iterables) -[![JSR Score](https://jsr.io/badges/@coven/iterables/score)](https://coven.to/iterables/score) -[![Coverage Status](https://img.shields.io/codecov/c/github/covenengineering/libraries?color=%23083344&component=coven__iterables&label=Codecov&labelColor=%23F01F7A&logo=Codecov&logoColor=%23fff)](https://app.codecov.io/github/covenengineering/libraries?components[0]=Coven%20Engineering%20Iterables) +[![JSR][jsr-version-badge]][jsr-link] [![JSR Score][jsr-score-badge]][jsr-score] +[![Coverage Status][coverage-badge]][coverage] ♻️ `Iterable` and `AsyncIterable` utilities. iterables, which results in duplicated code. @@ -12,9 +11,9 @@ then `@coven/iterables/async` for asynchronous iterables. All functions are curried to reduce code duplication, and they work with all iterables (generator functions, arrays, strings, Sets, Maps, etc.). -Like all [Coven Engineering](https://coven.engineering) libraries, it has 100% -test coverage and it's built in top of modern tech compatible with all -JavaScript runtimes. +Like all [Coven Engineering][coven-engineering] libraries, it has 100% test +coverage and it's built in top of modern tech compatible with all JavaScript +runtimes. ## Examples @@ -53,6 +52,16 @@ forEach(console.log)(map(next)(map(double)([1, 2, 3, 4]))); // 4. 8 → 9 → Logs 9 ``` -## Other links + -- [Coverage](https://app.codecov.io/github/covenengineering/libraries). +[coven-engineering]: https://coven.engineering +[coverage]: + https://app.codecov.io/github/covenengineering/libraries%3Fcomponents%5B0%5D%3DCoven%2520Engineering%2520Iterables +[coverage-badge]: + https://img.shields.io/codecov/c/github/covenengineering/libraries?color=%23083344&component=coven__iterables&label=Codecov&labelColor=%23F01F7A&logo=Codecov&logoColor=%23fff +[jsr-link]: https://coven.to/iterables +[jsr-score]: https://coven.to/iterables/score +[jsr-score-badge]: https://jsr.io/badges/@coven/iterables/score +[jsr-version-badge]: https://jsr.io/badges/@coven/iterables +[logo]: + https://raw.githubusercontent.com/covenengineering/libraries/main/@coven/iterables/logo.svg diff --git a/@coven/math/README.md b/@coven/math/README.md index 37d5338..9829495 100644 --- a/@coven/math/README.md +++ b/@coven/math/README.md @@ -1,18 +1,17 @@ -![Coven Engineering Math](https://raw.githubusercontent.com/covenengineering/libraries/main/@coven/math/logo.svg) +![Coven Engineering Math][logo] -[![JSR](https://jsr.io/badges/@coven/math)](https://coven.to/math) -[![JSR Score](https://jsr.io/badges/@coven/math/score)](https://coven.to/math/score) -[![Coverage Status](https://img.shields.io/codecov/c/github/covenengineering/libraries?color=%23083344&component=coven__math&label=Codecov&labelColor=%23F01F7A&logo=Codecov&logoColor=%23fff)](https://app.codecov.io/github/covenengineering/libraries?components[0]=Coven%20Engineering%20Math) +[![JSR][jsr-version-badge]][jsr-link] [![JSR Score][jsr-score-badge]][jsr-score] +[![Coverage Status][coverage-badge]][coverage] 🧮 Precise math utilities. Using this library, adding `0.2` + `0.1` will result in `0.3`, and that might -look like nothing to the untrained eye, but it's not -[what JavaScript usually does](https://0.30000000000000004.com/). +look like nothing to the untrained eye, but it's not [what JavaScript usually +does][floating-point-math]. The way we achieve this is by using a `bigint` to contain the binary data for a -coefficient and exponent pair (implementation based on -[`DEC64`](https://www.crockford.com/dec64.html)) that we call `Precise`: +coefficient and exponent pair (implementation based on [`DEC64`][dec64]) that we +call `Precise`: ``` N 8 7 0 @@ -22,9 +21,9 @@ N 8 7 0 We then do all math operations using that `Precise` and turn them back to `number` when we are done. -Like all [Coven Engineering](https://coven.engineering) libraries, it has 100% -test coverage and it's built in top of modern tech compatible with all -JavaScript runtimes. +Like all [Coven Engineering][coven-engineering] libraries, it has 100% test +coverage and it's built in top of modern tech compatible with all JavaScript +runtimes. > [!NOTE] > @@ -59,6 +58,18 @@ const { plus } = calculate(0.1); +plus(1e20).minus(1e20); // 0.1 ``` -## Other links - -- [Coverage](https://app.codecov.io/github/covenengineering/libraries). + + +[coven-engineering]: https://coven.engineering +[coverage]: + https://app.codecov.io/github/covenengineering/libraries%3Fcomponents%5B0%5D%3DCoven%2520Engineering%2520Math +[coverage-badge]: + https://img.shields.io/codecov/c/github/covenengineering/libraries?color=%23083344&component=coven__math&label=Codecov&labelColor=%23F01F7A&logo=Codecov&logoColor=%23fff +[dec64]: https://www.crockford.com/dec64.html +[floating-point-math]: https://0.30000000000000004.com/ +[jsr-link]: https://coven.to/math +[jsr-score]: https://coven.to/math/score +[jsr-score-badge]: https://jsr.io/badges/@coven/math/score +[jsr-version-badge]: https://jsr.io/badges/@coven/math +[logo]: + https://raw.githubusercontent.com/covenengineering/libraries/main/@coven/math/logo.svg diff --git a/@coven/memo/README.md b/@coven/memo/README.md index 9627ec0..d44cd03 100644 --- a/@coven/memo/README.md +++ b/@coven/memo/README.md @@ -1,8 +1,7 @@ -![Coven Engineering Memo](https://raw.githubusercontent.com/covenengineering/libraries/main/@coven/memo/logo.svg) +![Coven Engineering Memo][logo] -[![JSR](https://jsr.io/badges/@coven/memo)](https://coven.to/memo) -[![JSR Score](https://jsr.io/badges/@coven/memo/score)](https://coven.to/memo/score) -[![Coverage Status](https://img.shields.io/codecov/c/github/covenengineering/libraries?color=%23083344&component=coven__memo&label=Codecov&labelColor=%23F01F7A&logo=Codecov&logoColor=%23fff)](https://app.codecov.io/github/covenengineering/libraries?components[0]=Coven%20Engineering%20Memo) +[![JSR][jsr-version-badge]][jsr-link] [![JSR Score][jsr-score-badge]][jsr-score] +[![Coverage Status][coverage-badge]][coverage] 💾 Memoization utilities. @@ -14,9 +13,9 @@ This library uses nested `Map`s to save a "tree" with references to all structures linked to its internal values. The nesting level is the index and the SIGIL symbol flags a value. -Like all [Coven Engineering](https://coven.engineering) libraries, it has 100% -test coverage and it's built in top of modern tech compatible with all -JavaScript runtimes. +Like all [Coven Engineering][coven-engineering] libraries, it has 100% test +coverage and it's built in top of modern tech compatible with all JavaScript +runtimes. ## Example @@ -69,6 +68,16 @@ In the example we use it with a simple function that doesn't require memoization, but ideally `memoFunction` should be used with expensive functions or functions that return objects which identities we want to keep. -## Other links - -- [Coverage](https://app.codecov.io/github/covenengineering/libraries). + + +[coven-engineering]: https://coven.engineering +[coverage]: + https://app.codecov.io/github/covenengineering/libraries%3Fcomponents%5B0%5D%3DCoven%2520Engineering%2520Memo +[coverage-badge]: + https://img.shields.io/codecov/c/github/covenengineering/libraries?color=%23083344&component=coven__memo&label=Codecov&labelColor=%23F01F7A&logo=Codecov&logoColor=%23fff +[jsr-link]: https://coven.to/memo +[jsr-score]: https://coven.to/memo/score +[jsr-score-badge]: https://jsr.io/badges/@coven/memo/score +[jsr-version-badge]: https://jsr.io/badges/@coven/memo +[logo]: + https://raw.githubusercontent.com/covenengineering/libraries/main/@coven/memo/logo.svg diff --git a/@coven/pair/README.md b/@coven/pair/README.md index e6360e1..b2c9148 100644 --- a/@coven/pair/README.md +++ b/@coven/pair/README.md @@ -1,16 +1,14 @@ -![Coven Engineering Pair](https://raw.githubusercontent.com/covenengineering/libraries/main/@coven/pair/logo.svg) +![Coven Engineering Pair][logo] -[![JSR](https://jsr.io/badges/@coven/pair)](https://coven.to/pair) -[![JSR Score](https://jsr.io/badges/@coven/pair/score)](https://coven.to/pair/score) -[![Coverage Status](https://img.shields.io/codecov/c/github/covenengineering/libraries?color=%23083344&component=coven__pair&label=Codecov&labelColor=%23F01F7A&logo=Codecov&logoColor=%23fff)](https://app.codecov.io/github/covenengineering/libraries?components[0]=Coven%20Engineering%20Pair) +[![JSR][jsr-version-badge]][jsr-link] [![JSR Score][jsr-score-badge]][jsr-score] +[![Coverage Status][coverage-badge]][coverage] -🖇️ [Paired hook pattern](https://lou.cx/articles/the-paired-hook-pattern) -helper. It only makes pairing simpler and provides a little bit better DX -(integration with React Devtools by setting a `displayName` automatically), -while also having 100% coverage like with all -[Coven Engineering](https://coven.engineering) libraries. +🖇️ [Paired hook pattern][the-paired-hook-pattern] helper. It only makes pairing +simpler and provides a little bit better DX (integration with React Devtools by +setting a `displayName` automatically), while also having 100% coverage like +with all [Coven Engineering][coven-engineering] libraries. Currently supported frameworks: @@ -87,6 +85,17 @@ const Component = ({ array = [] }) => ( ); ``` -## Other links - -- [Coverage](https://app.codecov.io/github/covenengineering/libraries). + + +[coven-engineering]: https://coven.engineering +[coverage]: + https://app.codecov.io/github/covenengineering/libraries%3Fcomponents%5B0%5D%3DCoven%2520Engineering%2520Pair +[coverage-badge]: + https://img.shields.io/codecov/c/github/covenengineering/libraries?color=%23083344&component=coven__pair&label=Codecov&labelColor=%23F01F7A&logo=Codecov&logoColor=%23fff +[jsr-link]: https://coven.to/pair +[jsr-score]: https://coven.to/pair/score +[jsr-score-badge]: https://jsr.io/badges/@coven/pair/score +[jsr-version-badge]: https://jsr.io/badges/@coven/pair +[logo]: + https://raw.githubusercontent.com/covenengineering/libraries/main/@coven/pair/logo.svg +[the-paired-hook-pattern]: https://lou.cx/articles/the-paired-hook-pattern diff --git a/@coven/parsers/README.md b/@coven/parsers/README.md index fe41677..c9bf221 100644 --- a/@coven/parsers/README.md +++ b/@coven/parsers/README.md @@ -1,20 +1,18 @@ -![Coven Engineering Parsers](https://raw.githubusercontent.com/covenengineering/libraries/main/@coven/parsers/logo.svg) +![Coven Engineering Parsers][logo] -[![JSR](https://jsr.io/badges/@coven/parsers)](https://coven.to/parsers) -[![JSR Score](https://jsr.io/badges/@coven/parsers/score)](https://coven.to/parsers/score) -[![Coverage Status](https://img.shields.io/codecov/c/github/covenengineering/libraries?color=%23083344&component=coven__parsers&label=Codecov&labelColor=%23F01F7A&logo=Codecov&logoColor=%23fff)](https://app.codecov.io/github/covenengineering/libraries?components[0]=Coven%20Engineering%20Parsers) +[![JSR][jsr-version-badge]][jsr-link] [![JSR Score][jsr-score-badge]][jsr-score] +[![Coverage Status][coverage-badge]][coverage] 💫 Parsing utilities. Instead of throwing or returning values like `NaN`, the parsers in this library either return the expected parsed value or `undefined` (making use of the -[Maybe](https://coven.to/types/doc/~/Maybe) type). This enables default value -handling and error handling based on nullish checks (relying on operators like -`??` and `?.`). +[Maybe][maybe] type). This enables default value handling and error handling +based on nullish checks (relying on operators like `??` and `?.`). -Like all [Coven Engineering](https://coven.engineering) libraries, it has 100% -test coverage and it's built in top of modern tech compatible with all -JavaScript runtimes. +Like all [Coven Engineering][coven-engineering] libraries, it has 100% test +coverage and it's built in top of modern tech compatible with all JavaScript +runtimes. ## Example @@ -25,6 +23,17 @@ parseDecimal("101"); // 101 parseDecimal("nope"); // undefined ``` -## Other links - -- [Coverage](https://app.codecov.io/github/covenengineering/libraries). + + +[coven-engineering]: https://coven.engineering +[coverage]: + https://app.codecov.io/github/covenengineering/libraries%3Fcomponents%5B0%5D%3DCoven%2520Engineering%2520Parsers +[coverage-badge]: + https://img.shields.io/codecov/c/github/covenengineering/libraries?color=%23083344&component=coven__parsers&label=Codecov&labelColor=%23F01F7A&logo=Codecov&logoColor=%23fff +[jsr-link]: https://coven.to/parsers +[jsr-score]: https://coven.to/parsers/score +[jsr-score-badge]: https://jsr.io/badges/@coven/parsers/score +[jsr-version-badge]: https://jsr.io/badges/@coven/parsers +[logo]: + https://raw.githubusercontent.com/covenengineering/libraries/main/@coven/parsers/logo.svg +[maybe]: https://coven.to/types/doc/~/Maybe diff --git a/@coven/predicates/README.md b/@coven/predicates/README.md index 48043bf..3b2cd3a 100644 --- a/@coven/predicates/README.md +++ b/@coven/predicates/README.md @@ -1,17 +1,16 @@ -![Coven Engineering Predicates](https://raw.githubusercontent.com/covenengineering/libraries/main/@coven/predicates/logo.svg) +![Coven Engineering Predicates][logo] -[![JSR](https://jsr.io/badges/@coven/predicates)](https://coven.to/predicates) -[![JSR Score](https://jsr.io/badges/@coven/predicates/score)](https://coven.to/predicates/score) -[![Coverage Status](https://img.shields.io/codecov/c/github/covenengineering/libraries?color=%23083344&component=coven__predicates&label=Codecov&labelColor=%23F01F7A&logo=Codecov&logoColor=%23fff)](https://app.codecov.io/github/covenengineering/libraries?components[0]=Coven%20Engineering%20Predicates) +[![JSR][jsr-version-badge]][jsr-link] [![JSR Score][jsr-score-badge]][jsr-score] +[![Coverage Status][coverage-badge]][coverage] 🕵️‍♀️ Predicate utilities. This library offers a collection of common predicate functions to check for type, instances, presence of properties and more. -Like all [Coven Engineering](https://coven.engineering) libraries, it has 100% -test coverage and it's built in top of modern tech compatible with all -JavaScript runtimes. +Like all [Coven Engineering][coven-engineering] libraries, it has 100% test +coverage and it's built in top of modern tech compatible with all JavaScript +runtimes. ## Example @@ -23,6 +22,16 @@ isBoolean(false); // true isBoolean(undefined); // false ``` -## Other links - -- [Coverage](https://app.codecov.io/github/covenengineering/libraries). + + +[coven-engineering]: https://coven.engineering +[coverage]: + https://app.codecov.io/github/covenengineering/libraries%3Fcomponents%5B0%5D%3DCoven%2520Engineering%2520Predicates +[coverage-badge]: + https://img.shields.io/codecov/c/github/covenengineering/libraries?color=%23083344&component=coven__predicates&label=Codecov&labelColor=%23F01F7A&logo=Codecov&logoColor=%23fff +[jsr-link]: https://coven.to/predicates +[jsr-score]: https://coven.to/predicates/score +[jsr-score-badge]: https://jsr.io/badges/@coven/predicates/score +[jsr-version-badge]: https://jsr.io/badges/@coven/predicates +[logo]: + https://raw.githubusercontent.com/covenengineering/libraries/main/@coven/predicates/logo.svg diff --git a/@coven/rules/README.md b/@coven/rules/README.md index 5b69faf..0440ed2 100644 --- a/@coven/rules/README.md +++ b/@coven/rules/README.md @@ -1,24 +1,27 @@ -![Coven Engineering Rules](https://raw.githubusercontent.com/covenengineering/libraries/main/@coven/rules/logo.svg) +![Coven Engineering Rules][logo] -[![JSR](https://jsr.io/badges/@coven/rules)](https://coven.to/rules) -[![JSR Score](https://jsr.io/badges/@coven/rules/score)](https://coven.to/rules/score) +[![JSR][jsr-version-badge]][jsr-link] [![JSR Score][jsr-score-badge]][jsr-score] 🚨 Linting rules. This library has a collection of linting rules used in Coven Engineering -libraries in Deno environments. In theory it should be also compatible with -ESLint. +libraries in Deno environments using +[`deno lint`](<(https://docs.deno.com/runtime/reference/cli/lint/)>). In theory +it should be also compatible with ESLint. ## Full list of rules - `coven/max-lines`: Allow a max of `300` lines per file. +- `coven/no-array-type`: Disallow `Type[]` in favor of `Array`. - `coven/no-break`: Disallow `break` statements. - `coven/no-class`: Disallow classes. - `coven/no-continue`: Disallow `continue` statements. - `coven/no-default-export`: Disallow `export default` (use named instead). - `coven/no-do-while`: Disallow `do..while` loops. +- `coven/no-early-return`: Disallow early `return` in favor of a single exit + point per function. - `coven/no-enum`: Disallow `enum`. -- `coven/no-for-in`: Disallow `for..in` loops. +- `coven/no-for`: Disallow `for` loops. - `coven/no-function`: Disallow `function` (use `const` instead). - `coven/no-null`: Disallow `null` (use `undefined` instead). - `coven/no-switch`: Disallow `switch`. @@ -36,7 +39,12 @@ following: { "plugins": ["jsr:@coven/rules"] } ``` -## Other links + -- [Coverage](https://app.codecov.io/github/covenengineering/libraries). -- [Deno Lint](https://docs.deno.com/runtime/reference/cli/lint/). +[coven-engineering]: https://coven.engineering +[jsr-link]: https://coven.to/rules +[jsr-score]: https://coven.to/rules/score +[jsr-score-badge]: https://jsr.io/badges/@coven/rules/score +[jsr-version-badge]: https://jsr.io/badges/@coven/rules +[logo]: + https://raw.githubusercontent.com/covenengineering/libraries/main/@coven/rules/logo.svg diff --git a/@coven/template/README.md b/@coven/template/README.md index 9e63afc..74ace13 100644 --- a/@coven/template/README.md +++ b/@coven/template/README.md @@ -1,14 +1,17 @@ -![Coven Engineering Template](https://raw.githubusercontent.com/covenengineering/libraries/main/@coven/template/logo.svg) +![Coven Engineering Template][logo] -[![JSR](https://jsr.io/badges/@coven/template)](https://coven.to/template) -[![JSR Score](https://jsr.io/badges/@coven/template/score)](https://coven.to/template/score) -[![Coverage Status](https://img.shields.io/codecov/c/github/covenengineering/libraries?color=%23083344&component=coven__template&label=Codecov&labelColor=%23F01F7A&logo=Codecov&logoColor=%23fff)](https://app.codecov.io/github/covenengineering/libraries?components[0]=Coven%20Engineering%20Template) +[![JSR][jsr-version-badge]][jsr-link] [![JSR Score][jsr-score-badge]][jsr-score] +[![Coverage Status][coverage-badge]][coverage] 🧩 Tagged template literals simplified. This library provides a setup `template` function to create tagged template literal functions that will format strings like magic. +Like all [Coven Engineering][coven-engineering] libraries, it has 100% test +coverage and it's built in top of modern tech compatible with all JavaScript +runtimes. + ## Example ```typescript @@ -27,6 +30,16 @@ console.log(moneyTemplate`The amount is ${13_000} and ${payed}.`); // Logs: "The amount is $13,000.00 and it's due." ``` -## Other links - -- [Coverage](https://app.codecov.io/github/covenengineering/libraries). + + +[coven-engineering]: https://coven.engineering +[coverage]: + https://app.codecov.io/github/covenengineering/libraries%3Fcomponents%5B0%5D%3DCoven%2520Engineering%2520Template +[coverage-badge]: + https://img.shields.io/codecov/c/github/covenengineering/libraries?color=%23083344&component=coven__template&label=Codecov&labelColor=%23F01F7A&logo=Codecov&logoColor=%23fff +[jsr-link]: https://coven.to/template +[jsr-score]: https://coven.to/template/score +[jsr-score-badge]: https://jsr.io/badges/@coven/template/score +[jsr-version-badge]: https://jsr.io/badges/@coven/template +[logo]: + https://raw.githubusercontent.com/covenengineering/libraries/main/@coven/template/logo.svg diff --git a/@coven/terminal/README.md b/@coven/terminal/README.md index be6b6c6..3e481de 100644 --- a/@coven/terminal/README.md +++ b/@coven/terminal/README.md @@ -1,8 +1,7 @@ -![Coven Engineering Terminal](https://raw.githubusercontent.com/covenengineering/libraries/main/@coven/terminal/logo.svg) +![Coven Engineering Terminal][logo] -[![JSR](https://jsr.io/badges/@coven/terminal)](https://coven.to/terminal) -[![JSR Score](https://jsr.io/badges/@coven/terminal/score)](https://coven.to/terminal/score) -[![Coverage Status](https://img.shields.io/codecov/c/github/covenengineering/libraries?color=%23083344&component=coven__terminal&label=Codecov&labelColor=%23F01F7A&logo=Codecov&logoColor=%23fff)](https://app.codecov.io/github/covenengineering/libraries?components[0]=Coven%20Engineering%20Terminal) +[![JSR][jsr-version-badge]][jsr-link] [![JSR Score][jsr-score-badge]][jsr-score] +[![Coverage Status][coverage-badge]][coverage] 🌈 Terminal ANSI colors utilities. @@ -33,24 +32,24 @@ bold("Example") === bold`Example`; These functions set the foreground and background color of a string. The full list of available foreground and background functions: -| Color | Foreground | Background | -| -------------------------------------------------------------------------------------------------------------------------------------------- | --------------- | ----------------- | -| ![Black](https://raw.githubusercontent.com/covenengineering/libraries/main/@coven/terminal/colors/black.svg) Black | `black` | `bgBlack` | -| ![White](https://raw.githubusercontent.com/covenengineering/libraries/main/@coven/terminal/colors/white.svg) White | `white` | `bgWhite` | -| ![Gray](https://raw.githubusercontent.com/covenengineering/libraries/main/@coven/terminal/colors/gray.svg) Gray | `gray` | `bgGray` | -| ![Bright gray](https://raw.githubusercontent.com/covenengineering/libraries/main/@coven/terminal/colors/brightGray.svg) Bright Gray | `brightGray` | `bgBrightGray` | -| ![Red](https://raw.githubusercontent.com/covenengineering/libraries/main/@coven/terminal/colors/red.svg) Red | `red` | `bgRed` | -| ![Bright red](https://raw.githubusercontent.com/covenengineering/libraries/main/@coven/terminal/colors/brightRed.svg) Bright Red | `brightRed` | `bgBrightRed` | -| ![Yellow](https://raw.githubusercontent.com/covenengineering/libraries/main/@coven/terminal/colors/yellow.svg) Yellow | `yellow` | `bgYellow` | -| ![Bright yellow](https://raw.githubusercontent.com/covenengineering/libraries/main/@coven/terminal/colors/brightYellow.svg) Bright Yellow | `brightYellow` | `bgBrightYellow` | -| ![Green](https://raw.githubusercontent.com/covenengineering/libraries/main/@coven/terminal/colors/green.svg) Green | `green` | `bgGreen` | -| ![Bright green](https://raw.githubusercontent.com/covenengineering/libraries/main/@coven/terminal/colors/brightGreen.svg) Bright Green | `brightGreen` | `bgBrightGreen` | -| ![Cyan](https://raw.githubusercontent.com/covenengineering/libraries/main/@coven/terminal/colors/cyan.svg) Cyan | `cyan` | `bgCyan` | -| ![Bright cyan](https://raw.githubusercontent.com/covenengineering/libraries/main/@coven/terminal/colors/brightCyan.svg) Bright Cyan | `brightCyan` | `bgBrightCyan` | -| ![Blue](https://raw.githubusercontent.com/covenengineering/libraries/main/@coven/terminal/colors/blue.svg) Blue | `blue` | `bgBlue` | -| ![Bright blue](https://raw.githubusercontent.com/covenengineering/libraries/main/@coven/terminal/colors/brightBlue.svg) Bright Blue | `brightBlue` | `bgBrightBlue` | -| ![Magenta](https://raw.githubusercontent.com/covenengineering/libraries/main/@coven/terminal/colors/magenta.svg) Magenta | `magenta` | `bgMagenta` | -| ![Bright magenta](https://raw.githubusercontent.com/covenengineering/libraries/main/@coven/terminal/colors/brightMagenta.svg) Bright Magenta | `brightMagenta` | `bgBrightMagenta` | +| Color | Foreground | Background | +| ------------------------------------------------------ | --------------- | ----------------- | +| ![Black][color-black] Black | `black` | `bgBlack` | +| ![White][color-white] White | `white` | `bgWhite` | +| ![Gray][color-gray] Gray | `gray` | `bgGray` | +| ![Bright gray][color-bright-gray] Bright Gray | `brightGray` | `bgBrightGray` | +| ![Red][color-red] Red | `red` | `bgRed` | +| ![Bright red][color-bright-red] Bright Red | `brightRed` | `bgBrightRed` | +| ![Yellow][color-yellow] Yellow | `yellow` | `bgYellow` | +| ![Bright yellow][color-bright-yellow] Bright Yellow | `brightYellow` | `bgBrightYellow` | +| ![Green][color-green] Green | `green` | `bgGreen` | +| ![Bright green][color-bright-green] Bright Green | `brightGreen` | `bgBrightGreen` | +| ![Cyan][color-cyan] Cyan | `cyan` | `bgCyan` | +| ![Bright cyan][color-bright-cyan] Bright Cyan | `brightCyan` | `bgBrightCyan` | +| ![Blue][color-blue] Blue | `blue` | `bgBlue` | +| ![Bright blue][color-bright-blue] Bright Blue | `brightBlue` | `bgBrightBlue` | +| ![Magenta][color-magenta] Magenta | `magenta` | `bgMagenta` | +| ![Bright magenta][color-bright-magenta] Bright Magenta | `brightMagenta` | `bgBrightMagenta` | ### Style Functions @@ -77,15 +76,54 @@ const example = mix(bold, red, bgWhite); example`Coven Engineering`; // The string "Coven Engineering", with bold style, red color and white background ``` -Like all [Coven Engineering](https://coven.engineering) libraries, it has 100% -test coverage and it's built in top of modern tech compatible with all -JavaScript runtimes. +Like all [Coven Engineering][coven-engineering] libraries, it has 100% test +coverage and it's built in top of modern tech compatible with all JavaScript +runtimes. -## Other links - -- [Coverage](https://app.codecov.io/github/covenengineering/libraries). - - + [ansi-escape-code]: https://en.wikipedia.org/wiki/ANSI_escape_code +[color-black]: + https://raw.githubusercontent.com/covenengineering/libraries/main/@coven/terminal/colors/black.svg +[color-white]: + https://raw.githubusercontent.com/covenengineering/libraries/main/@coven/terminal/colors/white.svg +[color-gray]: + https://raw.githubusercontent.com/covenengineering/libraries/main/@coven/terminal/colors/gray.svg +[color-bright-gray]: + https://raw.githubusercontent.com/covenengineering/libraries/main/@coven/terminal/colors/brightGray.svg +[color-red]: + https://raw.githubusercontent.com/covenengineering/libraries/main/@coven/terminal/colors/red.svg +[color-bright-red]: + https://raw.githubusercontent.com/covenengineering/libraries/main/@coven/terminal/colors/brightRed.svg +[color-yellow]: + https://raw.githubusercontent.com/covenengineering/libraries/main/@coven/terminal/colors/yellow.svg +[color-bright-yellow]: + https://raw.githubusercontent.com/covenengineering/libraries/main/@coven/terminal/colors/brightYellow.svg +[color-green]: + https://raw.githubusercontent.com/covenengineering/libraries/main/@coven/terminal/colors/green.svg +[color-bright-green]: + https://raw.githubusercontent.com/covenengineering/libraries/main/@coven/terminal/colors/brightGreen.svg +[color-cyan]: + https://raw.githubusercontent.com/covenengineering/libraries/main/@coven/terminal/colors/cyan.svg +[color-bright-cyan]: + https://raw.githubusercontent.com/covenengineering/libraries/main/@coven/terminal/colors/brightCyan.svg +[color-blue]: + https://raw.githubusercontent.com/covenengineering/libraries/main/@coven/terminal/colors/blue.svg +[color-bright-blue]: + https://raw.githubusercontent.com/covenengineering/libraries/main/@coven/terminal/colors/brightBlue.svg +[color-magenta]: + https://raw.githubusercontent.com/covenengineering/libraries/main/@coven/terminal/colors/magenta.svg +[color-bright-magenta]: + https://raw.githubusercontent.com/covenengineering/libraries/main/@coven/terminal/colors/brightMagenta.svg +[coven-engineering]: https://coven.engineering +[coverage]: + https://app.codecov.io/github/covenengineering/libraries%3Fcomponents%5B0%5D%3DCoven%2520Engineering%2520Terminal +[coverage-badge]: + https://img.shields.io/codecov/c/github/covenengineering/libraries?color=%23083344&component=coven__terminal&label=Codecov&labelColor=%23F01F7A&logo=Codecov&logoColor=%23fff +[jsr-link]: https://coven.to/terminal +[jsr-score]: https://coven.to/terminal/score +[jsr-score-badge]: https://jsr.io/badges/@coven/terminal/score +[jsr-version-badge]: https://jsr.io/badges/@coven/terminal +[logo]: + https://raw.githubusercontent.com/covenengineering/libraries/main/@coven/terminal/logo.svg [template-literals]: https://coven.to/mdn/Template_literals diff --git a/@coven/types/README.md b/@coven/types/README.md index 8ac6f9c..8875745 100644 --- a/@coven/types/README.md +++ b/@coven/types/README.md @@ -1,13 +1,12 @@ -![Coven Engineering Types](https://raw.githubusercontent.com/covenengineering/libraries/main/@coven/types/logo.svg) +![Coven Engineering Types][logo] -[![JSR](https://jsr.io/badges/@coven/types)](https://coven.to/types) -[![JSR Score](https://jsr.io/badges/@coven/types/score)](https://coven.to/types/score) +[![JSR][jsr-version-badge]][jsr-link] [![JSR Score][jsr-score-badge]][jsr-score] 🏷️ Collection of TypeScript types. -This types are mainly meant as a way of centralizing types used by -[Coven Engineering](https://coven.engineering/) libraries, but as the rest of -the libraries, it's open source so anyone interested can use these. +This types are mainly meant as a way of centralizing types used by [Coven +Engineering][coven-engineering] libraries, but as the rest of the libraries, +it's open source so anyone interested can use these. > [!CAUTION] > @@ -23,6 +22,12 @@ import type { Unary } from "@coven/types"; const next: Unary<[input: number], number> = (input) => input + 1; ``` -## Other links + -- [Coverage](https://app.codecov.io/github/covenengineering/libraries). +[coven-engineering]: https://coven.engineering +[jsr-link]: https://coven.to/types +[jsr-score]: https://coven.to/types/score +[jsr-score-badge]: https://jsr.io/badges/@coven/types/score +[jsr-version-badge]: https://jsr.io/badges/@coven/types +[logo]: + https://raw.githubusercontent.com/covenengineering/libraries/main/@coven/types/logo.svg diff --git a/@coven/utils/README.md b/@coven/utils/README.md index 1159279..90e40be 100644 --- a/@coven/utils/README.md +++ b/@coven/utils/README.md @@ -1,18 +1,16 @@ -![Coven Engineering Utils](https://raw.githubusercontent.com/covenengineering/libraries/main/@coven/utils/logo.svg) +![Coven Engineering Utils][logo] -[![JSR](https://jsr.io/badges/@coven/utils)](https://coven.to/utils) -[![JSR Score](https://jsr.io/badges/@coven/utils/score)](https://coven.to/utils/score) -[![Coverage Status](https://img.shields.io/codecov/c/github/covenengineering/libraries?color=%23083344&component=coven__utils&label=Codecov&labelColor=%23F01F7A&logo=Codecov&logoColor=%23fff)](https://app.codecov.io/github/covenengineering/libraries?components[0]=Coven%20Engineering%20Utils) +[![JSR][jsr-version-badge]][jsr-link] [![JSR Score][jsr-score-badge]][jsr-score] +[![Coverage Status][coverage-badge]][coverage] 🛠️ General utilities. This is a small collection of common utilities used by other libraries from -[Coven Engineering](https://coven.engineering), for some common patterns found -in them. +[Coven Engineering][coven-engineering], for some common patterns found in them. -Like all [Coven Engineering](https://coven.engineering) libraries, it has 100% -test coverage and it's built in top of modern tech compatible with all -JavaScript runtimes. +Like all [Coven Engineering][coven-engineering] libraries, it has 100% test +coverage and it's built in top of modern tech compatible with all JavaScript +runtimes. ## Example @@ -24,6 +22,16 @@ const getMagic = get("✨"); getMagic({ "✨": "🎃" }); // "🎃" ``` -## Other links - -- [Coverage](https://app.codecov.io/github/covenengineering/libraries). + + +[coven-engineering]: https://coven.engineering +[coverage]: + https://app.codecov.io/github/covenengineering/libraries%3Fcomponents%5B0%5D%3DCoven%2520Engineering%2520Utils +[coverage-badge]: + https://img.shields.io/codecov/c/github/covenengineering/libraries?color=%23083344&component=coven__utils&label=Codecov&labelColor=%23F01F7A&logo=Codecov&logoColor=%23fff +[jsr-link]: https://coven.to/utils +[jsr-score]: https://coven.to/utils/score +[jsr-score-badge]: https://jsr.io/badges/@coven/utils/score +[jsr-version-badge]: https://jsr.io/badges/@coven/utils +[logo]: + https://raw.githubusercontent.com/covenengineering/libraries/main/@coven/utils/logo.svg diff --git a/@simulcast/core/README.md b/@simulcast/core/README.md index 073d479..21547b7 100644 --- a/@simulcast/core/README.md +++ b/@simulcast/core/README.md @@ -1,8 +1,7 @@ -Simulcast Core logo +![Simulcast Core][logo] -[![JSR](https://jsr.io/badges/@simulcast/core)](https://simulcast.coven.to/core) -[![JSR Score](https://jsr.io/badges/@simulcast/core/score)](https://simulcast.coven.to/core/score) -[![Coverage Status](https://img.shields.io/codecov/c/github/covenengineering/libraries?color=%23083344&component=simulcast__core&label=Codecov&labelColor=%23F01F7A&logo=Codecov&logoColor=%23fff)](https://app.codecov.io/github/covenengineering/libraries?components[0]=Simulcast%20Core) +[![JSR][jsr-version-badge]][jsr-link] [![JSR Score][jsr-score-badge]][jsr-score] +[![Coverage Status][coverage-badge]][coverage] 📡 Cross-framework communication. @@ -15,13 +14,13 @@ implement. This is specially useful when migrating from one framework to another. The library can be used directly, or through some of the framework specific -adapters like [`@simulcast/react`](https://simulcast.coven.to/react). Because it -uses really simple structures, it can be consumed from pretty much any place -that supports JavaScript. +adapters like [`@simulcast/react`][simulcast-react]. Because it uses really +simple structures, it can be consumed from pretty much any place that supports +JavaScript. -Like all [Coven Engineering](https://coven.engineering) libraries, it has 100% -test coverage and it's built in top of modern tech compatible with all -JavaScript runtimes. +Like all [Coven Engineering][coven-engineering] libraries, it has 100% test +coverage and it's built in top of modern tech compatible with all JavaScript +runtimes. ## Example @@ -38,6 +37,17 @@ offEvent(); emitEvent("Nope"); // Nothing happens ``` -## Other links - -- [Coverage](https://app.codecov.io/github/covenengineering/libraries). + + +[coven-engineering]: https://coven.engineering +[coverage]: + https://app.codecov.io/github/covenengineering/libraries%3Fcomponents%5B0%5D%3DSimulcast%20Core +[coverage-badge]: + https://img.shields.io/codecov/c/github/covenengineering/libraries?color=%23083344&component=simulcast__core&label=Codecov&labelColor=%23F01F7A&logo=Codecov&logoColor=%23fff +[jsr-link]: https://simulcast.coven.to/core +[jsr-score]: https://simulcast.coven.to/core/score +[jsr-score-badge]: https://jsr.io/badges/@simulcast/core/score +[jsr-version-badge]: https://jsr.io/badges/@simulcast/core +[logo]: + https://raw.githubusercontent.com/covenengineering/libraries/main/@simulcast/core/logo.svg +[simulcast-react]: https://simulcast.coven.to/react diff --git a/@simulcast/preact/README.md b/@simulcast/preact/README.md index 83fd753..14f5a4d 100644 --- a/@simulcast/preact/README.md +++ b/@simulcast/preact/README.md @@ -1,11 +1,9 @@ -Simulcast Preact logo +![Simulcast Preact][logo] -[![JSR](https://jsr.io/badges/@simulcast/preact)](https://simulcast.coven.to/preact) -[![JSR Score](https://jsr.io/badges/@simulcast/preact/score)](https://simulcast.coven.to/preact/score) -[![Coverage Status](https://img.shields.io/codecov/c/github/covenengineering/libraries?color=%23083344&component=simulcast__preact&label=Codecov&labelColor=%23F01F7A&logo=Codecov&logoColor=%23fff)](https://app.codecov.io/github/covenengineering/libraries?components[0]=Simulcast%20Preact) +[![JSR][jsr-version-badge]][jsr-link] [![JSR Score][jsr-score-badge]][jsr-score] +[![Coverage Status][coverage-badge]][coverage] -📡 [Preact](https://preactjs.com/) hook for -[`@simulcast/core`](https://simulcast.coven.to/core). +📡 [Preact][preact] hook for [`@simulcast/core`][simulcast-core]. ## Example @@ -31,6 +29,18 @@ const Component = () => { }; ``` -## Other links - -- [Coverage](https://app.codecov.io/github/covenengineering/libraries). + + +[coven-engineering]: https://coven.engineering +[coverage]: + https://app.codecov.io/github/covenengineering/libraries%3Fcomponents%5B0%5D%3DSimulcast%20Preact +[coverage-badge]: + https://img.shields.io/codecov/c/github/covenengineering/libraries?color=%23083344&component=simulcast__preact&label=Codecov&labelColor=%23F01F7A&logo=Codecov&logoColor=%23fff +[jsr-link]: https://simulcast.coven.to/preact +[jsr-score]: https://simulcast.coven.to/core/preact +[jsr-score-badge]: https://jsr.io/badges/@simulcast/preact/score +[jsr-version-badge]: https://jsr.io/badges/@simulcast/preact +[logo]: + https://raw.githubusercontent.com/covenengineering/libraries/main/@simulcast/preact/logo.svg +[preact]: https://preactjs.com/ +[simulcast-core]: https://simulcast.coven.to/core diff --git a/@simulcast/react/README.md b/@simulcast/react/README.md index 0de8e4a..d734627 100644 --- a/@simulcast/react/README.md +++ b/@simulcast/react/README.md @@ -1,11 +1,9 @@ -Simulcast React logo +![Simulcast React][logo] -[![JSR](https://jsr.io/badges/@simulcast/react)](https://simulcast.coven.to/react) -[![JSR Score](https://jsr.io/badges/@simulcast/react/score)](https://simulcast.coven.to/react/score) -[![Coverage Status](https://img.shields.io/codecov/c/github/covenengineering/libraries?color=%23083344&component=simulcast__react&label=Codecov&labelColor=%23F01F7A&logo=Codecov&logoColor=%23fff)](https://app.codecov.io/github/covenengineering/libraries?components[0]=Simulcast%20React) +[![JSR][jsr-version-badge]][jsr-link] [![JSR Score][jsr-score-badge]][jsr-score] +[![Coverage Status][coverage-badge]][coverage] -📡 [React](https://react.dev/) hook for -[`@simulcast/core`](https://simulcast.coven.to/core). +📡 [React][react] hook for [`@simulcast/core`][simulcast-core]. ## Example @@ -29,6 +27,18 @@ const Component = () => { }; ``` -## Other links - -- [Coverage](https://app.codecov.io/github/covenengineering/libraries). + + +[coven-engineering]: https://coven.engineering +[coverage]: + https://app.codecov.io/github/covenengineering/libraries%3Fcomponents%5B0%5D%3DSimulcast%20React +[coverage-badge]: + https://img.shields.io/codecov/c/github/covenengineering/libraries?color=%23083344&component=simulcast__react&label=Codecov&labelColor=%23F01F7A&logo=Codecov&logoColor=%23fff +[jsr-link]: https://simulcast.coven.to/react +[jsr-score]: https://simulcast.coven.to/core/react +[jsr-score-badge]: https://jsr.io/badges/@simulcast/react/score +[jsr-version-badge]: https://jsr.io/badges/@simulcast/react +[logo]: + https://raw.githubusercontent.com/covenengineering/libraries/main/@simulcast/react/logo.svg +[react]: https://react.dev/ +[simulcast-core]: https://simulcast.coven.to/core diff --git a/@simulcast/vue/README.md b/@simulcast/vue/README.md index a9a8ab2..ce24c99 100644 --- a/@simulcast/vue/README.md +++ b/@simulcast/vue/README.md @@ -1,11 +1,9 @@ -Simulcast Vue logo +![Simulcast Vue][logo] -[![JSR](https://jsr.io/badges/@simulcast/vue)](https://simulcast.coven.to/vue) -[![JSR Score](https://jsr.io/badges/@simulcast/vue/score)](https://simulcast.coven.to/vue/score) -[![Coverage Status](https://img.shields.io/codecov/c/github/covenengineering/libraries?color=%23083344&component=simulcast__vue&label=Codecov&labelColor=%23F01F7A&logo=Codecov&logoColor=%23fff)](https://app.codecov.io/github/covenengineering/libraries?components[0]=Simulcast%20Vue) +[![JSR][jsr-version-badge]][jsr-link] [![JSR Score][jsr-score-badge]][jsr-score] +[![Coverage Status][coverage-badge]][coverage] -📡 [Vue](https://vuejs.org/) hook for -[`@simulcast/core`](https://simulcast.coven.to/core). +📡 [Vue][vue] hook for [`@simulcast/core`][simulcast-core]. ## Example @@ -25,6 +23,18 @@ ``` -## Other links - -- [Coverage](https://app.codecov.io/github/covenengineering/libraries). + + +[coven-engineering]: https://coven.engineering +[coverage]: + https://app.codecov.io/github/covenengineering/libraries%3Fcomponents%5B0%5D%3DSimulcast%20vue +[coverage-badge]: + https://img.shields.io/codecov/c/github/covenengineering/libraries?color=%23083344&component=simulcast__vue&label=Codecov&labelColor=%23F01F7A&logo=Codecov&logoColor=%23fff +[jsr-link]: https://simulcast.coven.to/vue +[jsr-score]: https://simulcast.coven.to/core/vue +[jsr-score-badge]: https://jsr.io/badges/@simulcast/vue/score +[jsr-version-badge]: https://jsr.io/badges/@simulcast/vue +[logo]: + https://raw.githubusercontent.com/covenengineering/libraries/main/@simulcast/vue/logo.svg +[vue]: https://vuejs.org/ +[simulcast-core]: https://simulcast.coven.to/core