From a5dbe7f0c3a5fce8f076d57a117a51c36be227d7 Mon Sep 17 00:00:00 2001 From: Jason Caldwell Date: Mon, 8 Apr 2024 10:19:59 -0400 Subject: [PATCH] Project update. [p][robotic] --- .browserslistrc | 2 +- .dockerignore | 2 +- .env.vault | 8 +-- .gitattributes | 2 +- .gitignore | 2 +- .npmignore | 2 +- .prettierignore | 2 +- .vscode/settings.json | 2 +- .vscodeignore | 2 +- package-lock.json | 90 +++++++++++++++---------------- package.json | 6 +-- src/resources/preact/apis/iso.tsx | 13 ++--- tsconfig.json | 2 +- wrangler.toml | 2 +- 14 files changed, 67 insertions(+), 70 deletions(-) diff --git a/.browserslistrc b/.browserslistrc index a8bb8783..dc719249 100644 --- a/.browserslistrc +++ b/.browserslistrc @@ -17,7 +17,7 @@ # Generated data. # -# Last generated Apr 8, 2024 12:42 PM UTC. +# Last generated Apr 8, 2024 2:19 PM UTC. [production] node >= 20.9.0 diff --git a/.dockerignore b/.dockerignore index 1842a854..c8f1ffbc 100644 --- a/.dockerignore +++ b/.dockerignore @@ -17,7 +17,7 @@ # Generated data. # -# Last generated Apr 8, 2024 12:42 PM UTC. +# Last generated Apr 8, 2024 2:19 PM UTC. # Locals diff --git a/.env.vault b/.env.vault index 3be2d08d..04702ecd 100644 --- a/.env.vault +++ b/.env.vault @@ -8,12 +8,12 @@ DOTENV_VAULT_MAIN="7GW98NfL4hM4N6HbfeDXCKreVxKvcVPupFRnZ8XJ+pomaQ==" DOTENV_VAULT_MAIN_VERSION=1 # dev -DOTENV_VAULT_DEV="sWY4hDxZZotrpFBuYWd2le3Wl9K7u99hGj42uo1GpQkRY61euuSvtZMOkJ6N1t84ftzag1DOlUdvnALYbQWVbShUmUmWXXoi+RqGgmU7/mMTW5pv1vQYNiaU+5aU7WGIWi0/vNC1OuyLsVifoZXHdWoiqPQJTLhxI283CoYYj/6y07eZUMsZGJsgjQSazzBfHMuFjsbUR+7ZpbHwzhwOWXYuGQa6imRywR2KLafzhn8VTxCKcH3MLRZSESJ4+jT8RQ==" -DOTENV_VAULT_DEV_VERSION=519 +DOTENV_VAULT_DEV="T6lcbJN7DBvLCpphBlGltyXfxY2uVStOCy+y/TPmASrMpgXFOpmTURdwezSL94qwT58deJUm7zQdltU7UEt4BUdB1qcaCNPpcVT1109buG9mwR2mC3c/8JV9ZTNG9+LDCtvLlvzhSBer42ymWa1u0vG8wmosdgLFJFHUJx0uVpshpuRSCjHIQu54xRAMYUddrSus43soamaY2qAIc1IqV46uz4XsWvMFs0AfBtQQcoVY9HM54O0upstnoqHybT/83Q==" +DOTENV_VAULT_DEV_VERSION=521 # ci -DOTENV_VAULT_CI="I1+jAQYobcSf0RV9PKqVGT3zCGkE8mhYe/RpC+U+H9DWK7hEtujosvUsP9jZGvCnXpTQ18Zi2y3nJLKDjmcdYDetbwCRsFrQlOp043vB8baq/idTfwJgdN2fcPCn2YESIo81gef9ISH1KUe4GMP5tUZsSqzMp9qX95U9IU9mIg==" -DOTENV_VAULT_CI_VERSION=519 +DOTENV_VAULT_CI="rHFWDINIJlhQv+cXz6WzFgECpPOTsxplfNv11xcftwn0JQ+p/T3ee52v5eaF0EFXK3XcLadeYFpne93dz811qEy+s3mt2qAKtI1iLh8KNebHbhNdyMpun/d3MTJzO8Wf1dmxQtFtp7mUt3jh4FjoeYlXx5sIKfmO2h5oEwl/xA==" +DOTENV_VAULT_CI_VERSION=521 # stage DOTENV_VAULT_STAGE="aRP8su2YV4jZu3w1HZ/SLaots0IwJDFw75TCpvXEFeNp7tw=" diff --git a/.gitattributes b/.gitattributes index cd84e431..f856622e 100644 --- a/.gitattributes +++ b/.gitattributes @@ -17,7 +17,7 @@ # Generated data. # -# Last generated Apr 8, 2024 12:42 PM UTC. +# Last generated Apr 8, 2024 2:19 PM UTC. # Default diff --git a/.gitignore b/.gitignore index 863d1239..c42fa706 100644 --- a/.gitignore +++ b/.gitignore @@ -17,7 +17,7 @@ # Generated data. # -# Last generated Apr 8, 2024 12:42 PM UTC. +# Last generated Apr 8, 2024 2:19 PM UTC. # Locals diff --git a/.npmignore b/.npmignore index f346950d..1e850045 100644 --- a/.npmignore +++ b/.npmignore @@ -25,7 +25,7 @@ # Generated data. # -# Last generated Apr 8, 2024 12:42 PM UTC. +# Last generated Apr 8, 2024 2:19 PM UTC. # Locals diff --git a/.prettierignore b/.prettierignore index 493cf21a..1d00744f 100644 --- a/.prettierignore +++ b/.prettierignore @@ -17,7 +17,7 @@ # Generated data. # -# Last generated Apr 8, 2024 12:42 PM UTC. +# Last generated Apr 8, 2024 2:19 PM UTC. # Packages diff --git a/.vscode/settings.json b/.vscode/settings.json index b28334e5..b92a0db8 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -7,7 +7,7 @@ * @note This entire file will be updated automatically. * @note Instead of editing here, please review `./settings.mjs`. * - * Last generated using `./settings.mjs` Apr 8, 2024 12:42 PM UTC. + * Last generated using `./settings.mjs` Apr 8, 2024 2:19 PM UTC. */ { "editor.formatOnType": false, diff --git a/.vscodeignore b/.vscodeignore index e67e6e58..d4f8fe37 100644 --- a/.vscodeignore +++ b/.vscodeignore @@ -17,7 +17,7 @@ # Generated data. # -# Last generated Apr 8, 2024 12:42 PM UTC. +# Last generated Apr 8, 2024 2:19 PM UTC. # Locals diff --git a/package-lock.json b/package-lock.json index 0efbd58a..bad8b6c3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@clevercanyon/utilities", - "version": "1.0.945", + "version": "1.0.946", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@clevercanyon/utilities", - "version": "1.0.945", + "version": "1.0.946", "cpu": [ "x64", "arm64" @@ -17,7 +17,7 @@ "linux" ], "devDependencies": { - "@clevercanyon/dev-deps": "^1.0.377" + "@clevercanyon/dev-deps": "^1.0.378" }, "engines": { "node": "^20.5.0 || ^20.9.0 || ^21.6.2", @@ -34,7 +34,7 @@ "ignore": "5.3.0", "ip-regex": "5.0.0", "micro-memoize": "4.1.2", - "micromatch": "npm:@clevercanyon/micromatch.fork@^4.0.142", + "micromatch": "npm:@clevercanyon/micromatch.fork@^4.0.143", "parse-css-color": "0.2.1", "preact": "10.20.1", "preact-render-to-string": "6.4.1", @@ -777,9 +777,9 @@ "dev": true }, "node_modules/@clevercanyon/dev-deps": { - "version": "1.0.377", - "resolved": "https://registry.npmjs.org/@clevercanyon/dev-deps/-/dev-deps-1.0.377.tgz", - "integrity": "sha512-6FWoku0BSVO410wq45JtTV1lVo7LDKa+roUHMZmFNBo/L2Q2boSqiM5G46NJfzDAtO3CrzJQdDQvEeZpcLmCDw==", + "version": "1.0.378", + "resolved": "https://registry.npmjs.org/@clevercanyon/dev-deps/-/dev-deps-1.0.378.tgz", + "integrity": "sha512-aRJXtHWS5Kwph0qYfP1ABn+Ye+PW3DNMqSjxHoS2nx+vtBOEgo1RiYgjBadq6dygJqeedreQjDdRx06qeaK3KQ==", "cpu": [ "x64", "arm64" @@ -791,7 +791,7 @@ ], "dependencies": { "@clevercanyon/madrun": "^1.0.195", - "@clevercanyon/utilities": "^1.0.945", + "@clevercanyon/utilities": "^1.0.946", "@clevercanyon/utilities.bash": "^1.0.209", "@clevercanyon/utilities.cfp": "^1.0.251", "@clevercanyon/utilities.node": "^1.0.204", @@ -906,9 +906,9 @@ } }, "node_modules/@clevercanyon/madrun": { - "version": "1.0.195", - "resolved": "https://registry.npmjs.org/@clevercanyon/madrun/-/madrun-1.0.195.tgz", - "integrity": "sha512-KOQHczWXo5vHhkBxrciOTHCe5fI0su67tV7LuTateLDL/TyT47DOAiGqd+xqWTlfip1eTRlVt6bc1vnj6O/iYw==", + "version": "1.0.196", + "resolved": "https://registry.npmjs.org/@clevercanyon/madrun/-/madrun-1.0.196.tgz", + "integrity": "sha512-kAyXalP0om3oEm5TZMwBWk12QdpxoRmXZb6HI60RfK89U5Oa8NXboxoO46BKuJdbFss1/52Heq9V31tMpDppTg==", "cpu": [ "x64", "arm64" @@ -919,8 +919,8 @@ "linux" ], "dependencies": { - "@clevercanyon/utilities": "^1.0.942", - "@clevercanyon/utilities.node": "^1.0.203" + "@clevercanyon/utilities": "^1.0.946", + "@clevercanyon/utilities.node": "^1.0.204" }, "bin": { "madrun": "dist/bin/cli.js" @@ -934,9 +934,9 @@ } }, "node_modules/@clevercanyon/split-cmd.fork": { - "version": "1.0.140", - "resolved": "https://registry.npmjs.org/@clevercanyon/split-cmd.fork/-/split-cmd.fork-1.0.140.tgz", - "integrity": "sha512-CjOStnsl4edGkZILjBCgVt9nFM9EKaBNSNzoDYmyLSVhZ8Ew9DmWxmOcvAgtoLtLT/0m0ssfTUFaXtDdP2ka9A==", + "version": "1.0.141", + "resolved": "https://registry.npmjs.org/@clevercanyon/split-cmd.fork/-/split-cmd.fork-1.0.141.tgz", + "integrity": "sha512-/HTvhIREW+Xb3v0f+CfMXdnFIWOUmy/QwNE9lE7jEjIa8Ts1F1sslEX3HmtW6xzDyAikTSyXIcBu6FtxJNWY0g==", "cpu": [ "x64", "arm64" @@ -956,9 +956,9 @@ } }, "node_modules/@clevercanyon/utilities": { - "version": "1.0.945", - "resolved": "https://registry.npmjs.org/@clevercanyon/utilities/-/utilities-1.0.945.tgz", - "integrity": "sha512-MPJ4KYGnqPGovfAxnWZVxfQzy7FFSmoZeHKP9uI/cql/ZqBNlfPwHHbyVXWlnlGYqyhBpud+WiroNtbDh5YJ9Q==", + "version": "1.0.946", + "resolved": "https://registry.npmjs.org/@clevercanyon/utilities/-/utilities-1.0.946.tgz", + "integrity": "sha512-F5vas+sKsEne7cABJR1NGK2FFzgK2tTSL7ZmOJTVuLHenYKlRKS7VvNpDLV29Nh736eDPvzqmcUz384aMLqOqQ==", "cpu": [ "x64", "arm64" @@ -7817,9 +7817,9 @@ }, "node_modules/braces": { "name": "@clevercanyon/braces.fork", - "version": "3.0.138", - "resolved": "https://registry.npmjs.org/@clevercanyon/braces.fork/-/braces.fork-3.0.138.tgz", - "integrity": "sha512-sBX9GQ6ZIZ0mpFNnU7zVYoEs9DaDJgeprUsoIBjlq1DiwqNHHi8w5DKO02Rx4pB4zeWSXLp++6f7FEnDhc7xaA==", + "version": "3.0.139", + "resolved": "https://registry.npmjs.org/@clevercanyon/braces.fork/-/braces.fork-3.0.139.tgz", + "integrity": "sha512-61NV7hzRx/SmttuJvJs8dGlRHGZ9aYOJh/mJk/7mvBqCWxGOvhg34vpFxAlLUndXgd3rbHUPQsDUGj/VbUePkw==", "cpu": [ "x64", "arm64" @@ -7829,7 +7829,7 @@ "linux" ], "dependencies": { - "fill-range": "npm:@clevercanyon/fill-range.fork@^7.0.137" + "fill-range": "npm:@clevercanyon/fill-range.fork@^7.0.138" }, "engines": { "node": "^20.5.0 || ^20.9.0 || ^21.6.2", @@ -12665,9 +12665,9 @@ }, "node_modules/fill-range": { "name": "@clevercanyon/fill-range.fork", - "version": "7.0.137", - "resolved": "https://registry.npmjs.org/@clevercanyon/fill-range.fork/-/fill-range.fork-7.0.137.tgz", - "integrity": "sha512-PxDH5gOfuJ2wFUGI/JemU6k1r8NLdWei89d93wYZqRq7ybJoo4EcWlNhg9B/kRuqKMpLQet4lfjDcktAV9B6ew==", + "version": "7.0.138", + "resolved": "https://registry.npmjs.org/@clevercanyon/fill-range.fork/-/fill-range.fork-7.0.138.tgz", + "integrity": "sha512-3SW5+G4fMfKNgHINhMziP7e9pcbgEo2uXNDwyO6mRH4oz96IdN6ATnNTEAF9q1reuy52LJUR83kFI2zJO7w0Pg==", "cpu": [ "x64", "arm64" @@ -12677,7 +12677,7 @@ "linux" ], "dependencies": { - "to-regex-range": "npm:@clevercanyon/to-regex-range.fork@^5.0.137" + "to-regex-range": "npm:@clevercanyon/to-regex-range.fork@^5.0.138" }, "engines": { "node": "^20.5.0 || ^20.9.0 || ^21.6.2", @@ -14260,9 +14260,9 @@ }, "node_modules/is-number": { "name": "@clevercanyon/is-number.fork", - "version": "7.0.140", - "resolved": "https://registry.npmjs.org/@clevercanyon/is-number.fork/-/is-number.fork-7.0.140.tgz", - "integrity": "sha512-g++EKvwXiD0eTsT7M+bKSV4xPiqXRDQ5Dc5L2a/3uLwdIX608EoLMUwUoCLeJq/FR5No+jobUM3Rczr2LKYabg==", + "version": "7.0.141", + "resolved": "https://registry.npmjs.org/@clevercanyon/is-number.fork/-/is-number.fork-7.0.141.tgz", + "integrity": "sha512-5PJbwcCF0qQv1P28lmkCU+80A5ej6JOSoPRgaKhOYHteTM0166+hnF3mvb527XwAipK4TpeWSisSQzhlRyMbsg==", "cpu": [ "x64", "arm64" @@ -19993,9 +19993,9 @@ }, "node_modules/micromatch": { "name": "@clevercanyon/micromatch.fork", - "version": "4.0.142", - "resolved": "https://registry.npmjs.org/@clevercanyon/micromatch.fork/-/micromatch.fork-4.0.142.tgz", - "integrity": "sha512-aoSI8kxdfgwZCMBy+b2hfe8BlQhVVAaLSUUm5bsgkd9wT1tYR4DwrdSoDqPy8km21h45ZL0oiaIMR3xVEVt3zw==", + "version": "4.0.143", + "resolved": "https://registry.npmjs.org/@clevercanyon/micromatch.fork/-/micromatch.fork-4.0.143.tgz", + "integrity": "sha512-2cg7+PuG6WTrE4oOlfEw55C2QQ+O7hL+plDssA5UI1FjJ/ovTzf3OoLkuAyWl+tdhb8Z5FGCTm7jFdCr3vk5DA==", "cpu": [ "x64", "arm64" @@ -20005,8 +20005,8 @@ "linux" ], "dependencies": { - "braces": "npm:@clevercanyon/braces.fork@^3.0.138", - "picomatch": "npm:@clevercanyon/picomatch.fork@^2.3.136" + "braces": "npm:@clevercanyon/braces.fork@^3.0.139", + "picomatch": "npm:@clevercanyon/picomatch.fork@^2.3.138" }, "engines": { "node": "^20.5.0 || ^20.9.0 || ^21.6.2", @@ -20018,9 +20018,9 @@ }, "node_modules/micromatch/node_modules/picomatch": { "name": "@clevercanyon/picomatch.fork", - "version": "2.3.137", - "resolved": "https://registry.npmjs.org/@clevercanyon/picomatch.fork/-/picomatch.fork-2.3.137.tgz", - "integrity": "sha512-zRsMNtuwKSiSElFQwJyXd8VpGRnDMXO88DwHOYpOXJ8eys0p5qxC1uztTsJr4bR5/ucO/TGXGrYd/pO8mDMlSg==", + "version": "2.3.138", + "resolved": "https://registry.npmjs.org/@clevercanyon/picomatch.fork/-/picomatch.fork-2.3.138.tgz", + "integrity": "sha512-YQV03z9jSIUHeRpRlEf0e1keOjtPrjyv9qFXb1PrSOgk8ISzROQwVqMppyWpwvNm8DEI5CxTDnlvONUaAnsGmA==", "cpu": [ "x64", "arm64" @@ -27269,9 +27269,9 @@ }, "node_modules/spawn-please": { "name": "@clevercanyon/spawn-please.fork", - "version": "2.0.134", - "resolved": "https://registry.npmjs.org/@clevercanyon/spawn-please.fork/-/spawn-please.fork-2.0.134.tgz", - "integrity": "sha512-gUVft0PANpcU5aHWH+tw+zXFQQytiUs0Isn3ft7JyNEdABCjkH6iOTCRvCpz9HJDR0T4GaNLOvqECuafsT7emw==", + "version": "2.0.135", + "resolved": "https://registry.npmjs.org/@clevercanyon/spawn-please.fork/-/spawn-please.fork-2.0.135.tgz", + "integrity": "sha512-Lj2T1DNg7mW1FzPe1yciYsBr3DqbHISslZPmQAJa/+4jdZpiYrgJ6T/ka9Ik+sy44zamWmdZ1Oh0WZtSiVbPew==", "cpu": [ "x64", "arm64" @@ -28597,9 +28597,9 @@ }, "node_modules/to-regex-range": { "name": "@clevercanyon/to-regex-range.fork", - "version": "5.0.137", - "resolved": "https://registry.npmjs.org/@clevercanyon/to-regex-range.fork/-/to-regex-range.fork-5.0.137.tgz", - "integrity": "sha512-5huqR9Hygko016glnKfcG3Q/COZixoS+t74MhWok3fXZ+hdTCI/oP0zaBlT+b3oYZsrzRcNcm2xUPmiU6o/kQw==", + "version": "5.0.138", + "resolved": "https://registry.npmjs.org/@clevercanyon/to-regex-range.fork/-/to-regex-range.fork-5.0.138.tgz", + "integrity": "sha512-y5zlsLb2UAVRnYGbYpzPpUn/W09ERnZQbYC0z1ekTP2gMIaNVs4ZQHqqgW6ldImbx8rGoBQe2AumfEiNgMWybw==", "cpu": [ "x64", "arm64" @@ -28609,7 +28609,7 @@ "linux" ], "dependencies": { - "is-number": "npm:@clevercanyon/is-number.fork@^7.0.140" + "is-number": "npm:@clevercanyon/is-number.fork@^7.0.141" }, "engines": { "node": "^20.5.0 || ^20.9.0 || ^21.6.2", diff --git a/package.json b/package.json index 6b688cf1..9aa282ac 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "publishConfig": { "access": "public" }, - "version": "1.0.946", + "version": "1.0.947", "license": "GPL-3.0-or-later", "name": "@clevercanyon/utilities", "description": "Utilities for JavaScript apps running in any environment.", @@ -326,7 +326,7 @@ "ignore": "5.3.0", "ip-regex": "5.0.0", "micro-memoize": "4.1.2", - "micromatch": "npm:@clevercanyon/micromatch.fork@^4.0.142", + "micromatch": "npm:@clevercanyon/micromatch.fork@^4.0.143", "parse-css-color": "0.2.1", "preact": "10.20.1", "preact-render-to-string": "6.4.1", @@ -337,7 +337,7 @@ "optionalDependencies": {}, "bundleDependencies": [], "devDependencies": { - "@clevercanyon/dev-deps": "^1.0.377" + "@clevercanyon/dev-deps": "^1.0.378" }, "overrides": {}, "cpu": ["x64", "arm64"], diff --git a/src/resources/preact/apis/iso.tsx b/src/resources/preact/apis/iso.tsx index d40b6544..9b09b6c0 100644 --- a/src/resources/preact/apis/iso.tsx +++ b/src/resources/preact/apis/iso.tsx @@ -202,20 +202,17 @@ export const lazyLoader = (loader: Loader, r /** * Produces a routed component that lazy loads an async function component. * - * Note: For now, any hooks/contexts needed by an async function component must be passed down as props. + * Note: Any hooks/contexts needed by an async function component must be passed down as props. * - * Why? The problem is that because this is async, components throw a promise, childDidSuspend(), and Preact moves on. - * Within the promise function `currentComponent` has changed in the eyes of Preact, which means hooks/contexts won’t - * work inside async functions. We are not sure how to fix this. {@see lazyRoute()} doesn’t have this problem because - * promises are connected to imports. Here, what we have is essentially a promise forking itself outside of the Preact - * workflow. For now, any hooks/contexts needed by an async function component must be passed down as props. + * Why? Async components throw a promise, triggering `childDidSuspend()`, and Preact moves on. Within the promise + * function `currentComponent` has changed in the eyes of Preact, which means hooks/contexts won’t work inside async + * functions. Here, what we have is essentially a promise forking itself outside of the Preact workflow. Therefore, any + * hooks/contexts needed by an async function component must be passed down as props. * * @param fn Async function component; {@see $preact.AsyncFnComponent}. * @param routerProps Optional router props; {@see LazyRouterProps}. * * @returns A routed component that lazy loads an async function component. - * - * @review: Consider ways to improve this. See notes above regarding `currentComponent`. */ export const lazyComponent = (fn: $preact.AsyncFnComponent, routerProps?: LazyRouterProps): ((props?: Props) => LazyRouterVNode | null) => { type Context = { diff --git a/tsconfig.json b/tsconfig.json index 639c472e..c3de9faf 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -7,7 +7,7 @@ * @note This entire file will be updated automatically. * @note Instead of editing here, please review `./tsconfig.mjs`. * - * Last generated using `./tsconfig.mjs` Apr 8, 2024 12:42 PM UTC. + * Last generated using `./tsconfig.mjs` Apr 8, 2024 2:19 PM UTC. */ { "include": ["./src/**/*", "./dev-types.d.ts"], diff --git a/wrangler.toml b/wrangler.toml index 77054d91..31ee1550 100644 --- a/wrangler.toml +++ b/wrangler.toml @@ -7,7 +7,7 @@ # @note This entire file will be updated automatically. # @note Instead of editing here, please review `./wrangler.mjs`. # -# Last generated using `./wrangler.mjs` Apr 8, 2024 12:42 PM UTC. +# Last generated using `./wrangler.mjs` Apr 8, 2024 2:19 PM UTC. ## send_metrics = false