From bf9e525483abe58b25685fb3f9ab733cb3bbe0cc Mon Sep 17 00:00:00 2001 From: Jason Caldwell Date: Thu, 21 Sep 2023 05:59:58 -0400 Subject: [PATCH] Project update. [p][robotic] --- .browserslistrc | 2 +- .dockerignore | 2 +- .gitattributes | 2 +- .gitignore | 2 +- .npmignore | 2 +- .prettierignore | 2 +- .vscode/settings.json | 2 +- .vscodeignore | 2 +- dev/.files/bin/includes/extensions.mjs | 16 ++ dev/.files/vite/config.mjs | 37 ++--- dev/.files/vite/includes/package/updates.mjs | 68 ++++----- dev/.files/vite/includes/rollup/config.mjs | 54 ++----- dev/.files/wrangler/config.mjs | 51 +++++-- package-lock.json | 148 +++++++++---------- package.json | 8 +- tsconfig.json | 2 +- wrangler.toml | 44 +++--- 17 files changed, 208 insertions(+), 236 deletions(-) diff --git a/.browserslistrc b/.browserslistrc index 0cc6f8bf..319a522e 100644 --- a/.browserslistrc +++ b/.browserslistrc @@ -17,7 +17,7 @@ # Generated data. # -# Last generated Thu, Sep 21, 2023, 3:57:18 AM EDT. +# Last generated Thu, Sep 21, 2023, 5:59:38 AM EDT. [production] last 1 chrome versions diff --git a/.dockerignore b/.dockerignore index 635c644c..a625abe4 100644 --- a/.dockerignore +++ b/.dockerignore @@ -17,7 +17,7 @@ # Generated data. # -# Last generated Thu, Sep 21, 2023, 3:57:18 AM EDT. +# Last generated Thu, Sep 21, 2023, 5:59:37 AM EDT. # Locals diff --git a/.gitattributes b/.gitattributes index 61c00379..53997b01 100644 --- a/.gitattributes +++ b/.gitattributes @@ -17,7 +17,7 @@ # Generated data. # -# Last generated Thu, Sep 21, 2023, 3:57:18 AM EDT. +# Last generated Thu, Sep 21, 2023, 5:59:37 AM EDT. # Default diff --git a/.gitignore b/.gitignore index 215be719..a2a4cdd9 100644 --- a/.gitignore +++ b/.gitignore @@ -17,7 +17,7 @@ # Generated data. # -# Last generated Thu, Sep 21, 2023, 3:57:18 AM EDT. +# Last generated Thu, Sep 21, 2023, 5:59:37 AM EDT. # Locals diff --git a/.npmignore b/.npmignore index 5f0a42f8..642a1b08 100644 --- a/.npmignore +++ b/.npmignore @@ -25,7 +25,7 @@ # Generated data. # -# Last generated Thu, Sep 21, 2023, 3:57:18 AM EDT. +# Last generated Thu, Sep 21, 2023, 5:59:37 AM EDT. # Locals diff --git a/.prettierignore b/.prettierignore index 83d4a6f7..1d24ca25 100644 --- a/.prettierignore +++ b/.prettierignore @@ -17,7 +17,7 @@ # Generated data. # -# Last generated Thu, Sep 21, 2023, 3:57:18 AM EDT. +# Last generated Thu, Sep 21, 2023, 5:59:37 AM EDT. # Packages diff --git a/.vscode/settings.json b/.vscode/settings.json index 7ad80ee6..3419a2ab 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` Thu, Sep 21, 2023, 3:57:18 AM EDT. + * Last generated using `./settings.mjs` Thu, Sep 21, 2023, 5:59:37 AM EDT. */ { "editor.autoIndent": "full", diff --git a/.vscodeignore b/.vscodeignore index ddc3af51..f9e449ab 100644 --- a/.vscodeignore +++ b/.vscodeignore @@ -17,7 +17,7 @@ # Generated data. # -# Last generated Thu, Sep 21, 2023, 3:57:18 AM EDT. +# Last generated Thu, Sep 21, 2023, 5:59:37 AM EDT. # Locals diff --git a/dev/.files/bin/includes/extensions.mjs b/dev/.files/bin/includes/extensions.mjs index ef588933..07a9ed8d 100644 --- a/dev/.files/bin/includes/extensions.mjs +++ b/dev/.files/bin/includes/extensions.mjs @@ -40,6 +40,17 @@ const asBracedGlob = (exts) => { return (exts.length > 1 ? '{' : '') + noDot(exts).join(',') + (exts.length > 1 ? '}' : ''); }; +/** + * Converts an array of extensions into no-brace globstars. + * + * @param exts Array of extensions. + * + * @returns Extensions as no-brace globstars. + */ +const asNoBraceGlobstars = (exts) => { + return noDot(exts).map((ext) => '**/*.' + ext); +}; + /** * Converts an array of extensions into a regular expression fragment. * @@ -59,6 +70,7 @@ const extensions = { dot, noDot, asBracedGlob, + asNoBraceGlobstars, asRegExpFrag, /** @@ -105,6 +117,10 @@ const extensions = { allJavaScript: ['.js', '.jsx', '.cjs', '.cjsx', '.mjs', '.mjsx'], allTypeScript: ['.ts', '.tsx', '.cts', '.ctsx', '.mts', '.mtsx'], + + // Compiled WASM (WebAssembly). + + wasm: ['.wasm'], }; /** diff --git a/dev/.files/vite/config.mjs b/dev/.files/vite/config.mjs index 8db6cf2e..94dc848e 100644 --- a/dev/.files/vite/config.mjs +++ b/dev/.files/vite/config.mjs @@ -90,12 +90,6 @@ export default async ({ mode, command, ssrBuild: isSSRBuild }) => { const appBaseURL = env.APP_BASE_URL || ''; // e.g., `https://example.com/base`. const appBasePath = env.APP_BASE_PATH || ''; // e.g., `/base`. - let appUMDName = (pkg.name || '').toLowerCase(); - appUMDName = appUMDName.replace(/\bclevercanyon\b/gu, 'c10n'); - appUMDName = appUMDName.replace(/@/gu, '').replace(/\./gu, '-').replace(/\/+/gu, '.'); - appUMDName = appUMDName.replace(/[^a-z.0-9]([^.])/gu, (m0, m1) => m1.toUpperCase()); - appUMDName = appUMDName.replace(/^\.|\.$/u, ''); - const appType = $obp.get(pkg, 'config.c10n.&.' + (isSSRBuild ? 'ssrBuild' : 'build') + '.appType') || 'cma'; const targetEnv = $obp.get(pkg, 'config.c10n.&.' + (isSSRBuild ? 'ssrBuild' : 'build') + '.targetEnv') || 'any'; const entryFiles = $obp.get(pkg, 'config.c10n.&.' + (isSSRBuild ? 'ssrBuild' : 'build') + '.entryFiles') || []; @@ -120,14 +114,13 @@ export default async ({ mode, command, ssrBuild: isSSRBuild }) => { const targetEnvIsServer = ['cfw', 'node'].includes(targetEnv); const useMinifier = 'dev' !== mode && !['lib'].includes(appType); const preserveModules = ['lib'].includes(appType) && appEntries.length > 1; - const useUMD = !isSSRBuild && !targetEnvIsServer && !preserveModules && !peerDepKeys.length && useLibMode && 1 === appEntries.length; - const vitestSandboxEnable = $str.parseValue(String(process.env.VITEST_SANDBOX_ENABLE || '')); // We invented this environment variable. - const vitestExamplesEnable = $str.parseValue(String(process.env.VITEST_EXAMPLES_ENABLE || '')); // We invented this environment variable. + const vitestSandboxEnable = $str.parseValue(String(process.env.VITEST_SANDBOX_ENABLE || '')); + const vitestExamplesEnable = $str.parseValue(String(process.env.VITEST_EXAMPLES_ENABLE || '')); /** * Validates all of the above. */ - if (!pkg.name || !appUMDName) { + if (!pkg.name) { throw new Error('Apps must have a name.'); } if (!appEntryFiles.length || !appEntries.length) { @@ -153,9 +146,9 @@ export default async ({ mode, command, ssrBuild: isSSRBuild }) => { * Prepares `package.json` property updates. */ const pkgUpdates = await vitePkgUpdates({ - command, isSSRBuild, projDir, pkg, appType, targetEnv, useUMD, - appEntriesAsProjRelPaths, appEntriesAsSrcSubpaths, appEntriesAsSrcSubpathsNoExt - }); // prettier-ignore + command, isSSRBuild, projDir, pkg, appType, targetEnv, + appEntriesAsProjRelPaths, appEntriesAsSrcSubpaths, appEntriesAsSrcSubpathsNoExt + }); // prettier-ignore /** * Configures plugins for Vite. @@ -166,9 +159,9 @@ export default async ({ mode, command, ssrBuild: isSSRBuild }) => { await viteEJSConfig({ mode, projDir, srcDir, pkg, env }), await viteMinifyConfig({ mode }), await viteC10nConfig({ - mode, command, isSSRBuild, projDir, distDir, - pkg, env, appType, targetEnv, staticDefs, pkgUpdates - }), // prettier-ignore + mode, command, isSSRBuild, projDir, distDir, + pkg, env, appType, targetEnv, staticDefs, pkgUpdates + }), // prettier-ignore ]; /** @@ -179,7 +172,7 @@ export default async ({ mode, command, ssrBuild: isSSRBuild }) => { /** * Configures rollup for Vite. */ - const rollupConfig = await viteRollupConfig({ srcDir, distDir, a16sDir, appEntries, peerDepKeys, preserveModules, useMinifier, useUMD }); + const rollupConfig = await viteRollupConfig({ srcDir, distDir, a16sDir, appEntries, peerDepKeys, preserveModules, useMinifier }); /** * Configures tests for Vite. @@ -253,15 +246,7 @@ export default async ({ mode, command, ssrBuild: isSSRBuild }) => { minify: useMinifier ? 'esbuild' : false, // Minify userland code? modulePreload: false, // Disable. DOM injections conflict with our SPAs. - ...(useLibMode // Use library mode in Vite, with specific formats? - ? { - lib: { - name: appUMDName, // Name of UMD window global var. - entry: appEntries, // Should match up with `rollupOptions.input`. - formats: isSSRBuild ? ['es'] : useUMD ? ['es', 'umd'] : ['es', 'cjs'], - }, - } - : {}), + ...(useLibMode ? { lib: { entry: appEntries, formats: ['es'] } } : {}), rollupOptions: rollupConfig, // See: . }, }; diff --git a/dev/.files/vite/includes/package/updates.mjs b/dev/.files/vite/includes/package/updates.mjs index 63e2cc69..d427740b 100644 --- a/dev/.files/vite/includes/package/updates.mjs +++ b/dev/.files/vite/includes/package/updates.mjs @@ -22,7 +22,7 @@ import u from '../../../bin/includes/utilities.mjs'; * * @returns Build-related property updates. */ -export default async ({ command, isSSRBuild, projDir, pkg, appType, targetEnv, appEntriesAsProjRelPaths, appEntriesAsSrcSubpaths, appEntriesAsSrcSubpathsNoExt, useUMD }) => { +export default async ({ command, isSSRBuild, projDir, pkg, appType, targetEnv, appEntriesAsProjRelPaths, appEntriesAsSrcSubpaths, appEntriesAsSrcSubpathsNoExt }) => { const updates = {}; // Initialize. if (isSSRBuild) { @@ -45,7 +45,7 @@ export default async ({ command, isSSRBuild, projDir, pkg, appType, targetEnv, a throw new Error('Multipage apps must have an `./index.' + extensions.asBracedGlob([...extensions.trueHTML]) + '` entry point.'); } (updates.exports = null), (updates.typesVersions = {}); - updates.module = updates.main = updates.browser = updates.unpkg = updates.types = ''; + updates.main = updates.module = updates.unpkg = updates.browser = updates.types = ''; break; // Stop here. } @@ -63,51 +63,33 @@ export default async ({ command, isSSRBuild, projDir, pkg, appType, targetEnv, a 'Library apps must have an `./index.' + extensions.asBracedGlob([...extensions.sTypeScript, ...extensions.sTypeScriptReact]) + '` entry point.', ); } - if (useUMD) { - updates.exports = { - '.': { - import: './dist/' + appEntryIndexAsSrcSubpathNoExt + '.js', - require: './dist/' + appEntryIndexAsSrcSubpathNoExt + '.umd.cjs', - types: './dist/types/' + appEntryIndexAsSrcSubpathNoExt + '.d.ts', - }, - }; - updates.module = './dist/' + appEntryIndexAsSrcSubpathNoExt + '.js'; - updates.main = './dist/' + appEntryIndexAsSrcSubpathNoExt + '.umd.cjs'; - - updates.browser = ['web', 'webw'].includes(targetEnv) ? updates.main : ''; - updates.unpkg = updates.main; + updates.exports = { + '.': { + types: './dist/types/' + appEntryIndexAsSrcSubpathNoExt + '.d.ts', // First, always. + import: './dist/' + appEntryIndexAsSrcSubpathNoExt + '.js', // ESM module import path. + default: './dist/' + appEntryIndexAsSrcSubpathNoExt + '.js', // Last, always. + }, + }; + updates.main = './dist/' + appEntryIndexAsSrcSubpathNoExt + '.js'; + updates.module = './dist/' + appEntryIndexAsSrcSubpathNoExt + '.js'; - updates.types = './dist/types/' + appEntryIndexAsSrcSubpathNoExt + '.d.ts'; - updates.typesVersions = { '>=3.1': { './*': ['./dist/types/*'] } }; - } else { - updates.exports = { - '.': { - import: './dist/' + appEntryIndexAsSrcSubpathNoExt + '.js', - require: './dist/' + appEntryIndexAsSrcSubpathNoExt + '.cjs', - types: './dist/types/' + appEntryIndexAsSrcSubpathNoExt + '.d.ts', - }, - }; - updates.module = './dist/' + appEntryIndexAsSrcSubpathNoExt + '.js'; - updates.main = './dist/' + appEntryIndexAsSrcSubpathNoExt + '.cjs'; + updates.unpkg = updates.module; // Same, same. ESM-only builds. + updates.browser = ['web'].includes(targetEnv) ? updates.module : ''; - updates.browser = ['web', 'webw'].includes(targetEnv) ? updates.module : ''; - updates.unpkg = updates.module; + updates.typesVersions = { '>=3.1': { './*': ['./dist/types/*'] } }; + updates.types = './dist/types/' + appEntryIndexAsSrcSubpathNoExt + '.d.ts'; - updates.types = './dist/types/' + appEntryIndexAsSrcSubpathNoExt + '.d.ts'; - updates.typesVersions = { '>=3.1': { './*': ['./dist/types/*'] } }; - - for (const appEntryAsSrcSubpathNoExt of appEntriesAsSrcSubpathsNoExt) { - if (appEntryAsSrcSubpathNoExt === appEntryIndexAsSrcSubpathNoExt) { - continue; // Don't remap the entry index. - } - $obj.patchDeep(updates.exports, { - ['./' + appEntryAsSrcSubpathNoExt]: { - import: './dist/' + appEntryAsSrcSubpathNoExt + '.js', - require: './dist/' + appEntryAsSrcSubpathNoExt + '.cjs', - types: './dist/types/' + appEntryAsSrcSubpathNoExt + '.d.ts', - }, - }); + for (const appEntryAsSrcSubpathNoExt of appEntriesAsSrcSubpathsNoExt) { + if (appEntryAsSrcSubpathNoExt === appEntryIndexAsSrcSubpathNoExt) { + continue; // Don't remap the entry index. } + $obj.patchDeep(updates.exports, { + ['./' + appEntryAsSrcSubpathNoExt]: { + types: './dist/types/' + appEntryAsSrcSubpathNoExt + '.d.ts', // First, always. + import: './dist/' + appEntryAsSrcSubpathNoExt + '.js', // ESM module import path. + default: './dist/' + appEntryAsSrcSubpathNoExt + '.js', // Last, always. + }, + }); } break; // Stop here. } diff --git a/dev/.files/vite/includes/rollup/config.mjs b/dev/.files/vite/includes/rollup/config.mjs index 3d8cf2a4..bbd38d07 100644 --- a/dev/.files/vite/includes/rollup/config.mjs +++ b/dev/.files/vite/includes/rollup/config.mjs @@ -12,7 +12,8 @@ */ import path from 'node:path'; -import { $json, $str } from '../../../../../node_modules/@clevercanyon/utilities/dist/index.js'; +import { $path, $str } from '../../../../../node_modules/@clevercanyon/utilities/dist/index.js'; +import extensions from '../../../bin/includes/extensions.mjs'; /** * Configures rollup for Vite. @@ -21,10 +22,7 @@ import { $json, $str } from '../../../../../node_modules/@clevercanyon/utilities * * @returns Rollup configuration. */ -export default async ({ srcDir, distDir, a16sDir, appEntries, peerDepKeys, preserveModules, useMinifier, useUMD }) => { - const entryCounters = new Map(), - chunkCounters = new Map(); - +export default async ({ srcDir, distDir, a16sDir, appEntries, peerDepKeys, preserveModules, useMinifier }) => { return { input: appEntries, @@ -42,50 +40,28 @@ export default async ({ srcDir, distDir, a16sDir, appEntries, peerDepKeys, prese compact: useMinifier, // Minify wrapper code generated by rollup? // By default, special chars in a path like `[[name]].js` get changed to `__name__.js`. - // This prevents that by enforcing a custom sanitizer. See: for details. + // This prevents that by enforcing a custom sanitizer. More details: . sanitizeFileName: (fileName) => fileName.replace(/[\0?*]/gu, ''), - // By default, in SSR mode, Vite forces all entry files into the distDir root. + // By default, in SSR mode, Vite forces all entry files into the `distDir` root. // This prevents that by enforcing a consistently relative location for all entries. entryFileNames: (entry) => { - // This function doesn’t have access to the current output format, unfortunately. - // However, we are setting `build.lib.formats` explicitly in the configuration below. - // Therefore, we know `es` comes first, followed by either `umd` or `cjs` output entries. - // So, entry counters make it possible to infer build output format, based on sequence. - - const entryKey = $json.stringify(entry); // JSON serialization. - const entryCounter = Number(entryCounters.get(entryKey) || 0) + 1; - - const entryFormat = entryCounter > 1 ? (useUMD ? 'umd' : 'cjs') : 'es'; - const entryExt = 'umd' === entryFormat ? 'umd.cjs' : 'cjs' === entryFormat ? 'cjs' : 'js'; - - entryCounters.set(entryKey, entryCounter); // Updates counter. - - if ('.html' === path.extname(entry.facadeModuleId)) { - if (/\//u.test(entry.name)) return '[name]-[hash].' + entryExt; - return path.join(path.relative(distDir, a16sDir), '[name]-[hash].' + entryExt); + if ([...extensions.trueHTML].includes($path.ext(entry.facadeModuleId))) { + if (/\//u.test(entry.name)) return '[name]-[hash].js'; // Already a subpath. + return path.join(path.relative(distDir, a16sDir), '[name]-[hash].js'); } - if (/\//u.test(entry.name)) return '[name].' + entryExt; // Already a subpath. - return path.join(path.relative(srcDir, path.dirname(entry.facadeModuleId)), '[name].' + entryExt); + if (/\//u.test(entry.name)) return '[name].js'; // Already a subpath. + return path.join(path.relative(srcDir, path.dirname(entry.facadeModuleId)), '[name].js'); }, // By default, in library mode, Vite ignores `build.assetsDir`. // This prevents that by enforcing a consistent location for chunks and assets. - chunkFileNames: (chunk) => { - // This function doesn’t have access to the current output format, unfortunately. - // However, we are setting `build.lib.formats` explicitly in the configuration below. - // Therefore, we know `es` comes first, followed by either `umd` or `cjs` output chunks. - // So, chunk counters make it possible to infer build output format, based on sequence. - - const chunkKey = $json.stringify(chunk); // JSON serialization. - const chunkCounter = Number(chunkCounters.get(chunkKey) || 0) + 1; - - const chunkFormat = chunkCounter > 1 ? (useUMD ? 'umd' : 'cjs') : 'es'; - const chunkExt = 'umd' === chunkFormat ? 'umd.cjs' : 'cjs' === chunkFormat ? 'cjs' : 'js'; - - chunkCounters.set(chunkKey, chunkCounter); // Updates counter. - return path.join(path.relative(distDir, a16sDir), '[name]-[hash].' + chunkExt); + chunkFileNames: (/* chunk */) => { + return path.join(path.relative(distDir, a16sDir), '[name]-[hash].js'); }, + + // By default, in library mode, Vite ignores `build.assetsDir`. + // This prevents that by enforcing a consistent location for chunks and assets. assetFileNames: (/* asset */) => path.join(path.relative(distDir, a16sDir), '[name]-[hash].[ext]'), // Preserves module structure in apps built explicitly as multi-entry libraries. diff --git a/dev/.files/wrangler/config.mjs b/dev/.files/wrangler/config.mjs index 0b31af3c..54549e74 100755 --- a/dev/.files/wrangler/config.mjs +++ b/dev/.files/wrangler/config.mjs @@ -23,6 +23,7 @@ import path from 'node:path'; import { $fs } from '../../../node_modules/@clevercanyon/utilities.node/dist/index.js'; import { $path, $str, $url } from '../../../node_modules/@clevercanyon/utilities/dist/index.js'; +import extensions from '../bin/includes/extensions.mjs'; import u from '../bin/includes/utilities.mjs'; const __dirname = $fs.imuDirname(import.meta.url); @@ -49,10 +50,10 @@ export default async () => { send_metrics: false, // Don't share usage. usage_model: 'bundled', // 10M/mo free + $0.50/M. - // Account ID and worker name. + // Worker name & account ID. - account_id: defaultAccountId, name: defaultWorkerName, + account_id: defaultAccountId, // Workers.dev configuration. @@ -65,11 +66,31 @@ export default async () => { // Dynamic import configuration. rules: [ - { type: 'Data', globs: ['**/*.bin'], fallthrough: false }, - { type: 'CompiledWasm', globs: ['**/*.wasm'], fallthrough: false }, - { type: 'ESModule', globs: ['**/*.js', '**/*.jsx', '**/*.mjs', '**/*.mjsx'], fallthrough: false }, - { type: 'CommonJS', globs: ['**/*.cjs', '**/*.cjsx', '**/*.node'], fallthrough: false }, - { type: 'Text', globs: ['**/*.md', '**/*.txt', '**/*.xml', '**/*.html', '**/*.shtml', '**/*.ejs', '**/*.json'], fallthrough: false }, + { + type: 'Text', + globs: extensions.asNoBraceGlobstars([]), + fallthrough: false, + }, + { + type: 'ESModule', + globs: extensions.asNoBraceGlobstars([ + ...extensions.sJavaScript, // + ...extensions.mJavaScript, + ...extensions.sJavaScriptReact, + ...extensions.mJavaScriptReact, + ]), + fallthrough: false, + }, + { + type: 'CommonJS', + globs: extensions.asNoBraceGlobstars([ + ...extensions.cJavaScript, // + ...extensions.cJavaScriptReact, + ]), + fallthrough: false, + }, + { type: 'CompiledWasm', globs: extensions.asNoBraceGlobstars([...extensions.wasm]), fallthrough: false }, + { type: 'Data', globs: extensions.asNoBraceGlobstars([].filter((ext) => '.wasm' !== ext)), fallthrough: false }, ], // Custom build configuration. @@ -78,14 +99,6 @@ export default async () => { watch_dir: './' + path.relative(projDir, './src'), command: 'npx @clevercanyon/madrun build --mode=prod', }, - // Other environments used by this worker. - - env: { - dev: { - workers_dev: false, - build: { command: 'npx @clevercanyon/madrun build --mode=dev' }, - }, - }, // Worker sites; i.e., bucket configuration. site: { @@ -101,6 +114,14 @@ export default async () => { zone_name: defaultZoneName, pattern: defaultZoneDomain + '/' + $url.encode(defaultWorkerName) + '/*', }, + // Other environments used by this worker. + + env: { + dev: { + workers_dev: false, + build: { command: 'npx @clevercanyon/madrun build --mode=dev' }, + }, + }, }; /** diff --git a/package-lock.json b/package-lock.json index 4a523c3d..dc945549 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@clevercanyon/micromatch.fork", - "version": "4.0.57", + "version": "4.0.58", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@clevercanyon/micromatch.fork", - "version": "4.0.57", + "version": "4.0.58", "cpu": [ "x64", "arm64" @@ -17,11 +17,11 @@ "linux" ], "dependencies": { - "braces": "npm:@clevercanyon/braces.fork@^3.0.54", - "picomatch": "npm:@clevercanyon/picomatch.fork@^2.3.53" + "braces": "npm:@clevercanyon/braces.fork@^3.0.55", + "picomatch": "npm:@clevercanyon/picomatch.fork@^2.3.54" }, "devDependencies": { - "@clevercanyon/dev-deps": "^1.0.229" + "@clevercanyon/dev-deps": "^1.0.230" }, "engines": { "node": "^19.1.0 || ^20.5.1", @@ -766,9 +766,9 @@ "dev": true }, "node_modules/@clevercanyon/dev-deps": { - "version": "1.0.229", - "resolved": "https://registry.npmjs.org/@clevercanyon/dev-deps/-/dev-deps-1.0.229.tgz", - "integrity": "sha512-pNm9NP9bQY3ytbN/LVisbKDujWk0q2NmwPp4hhXrto2V1hEntc/6KfNqrd/c1ncCP/YgM0pBOE+280Iqsr5Ikw==", + "version": "1.0.230", + "resolved": "https://registry.npmjs.org/@clevercanyon/dev-deps/-/dev-deps-1.0.230.tgz", + "integrity": "sha512-T64usCA275IUe4JngAqhStCaNe7NxVtnRjAZmX8y98Qipfc8BFOBpIqhx4czpdkKQmT6LhzyyzTxHsJ/PD1uYA==", "cpu": [ "x64", "arm64" @@ -779,10 +779,10 @@ "linux" ], "dependencies": { - "@clevercanyon/madrun": "^1.0.97", - "@clevercanyon/utilities": "^1.0.264", - "@clevercanyon/utilities.cfp": "^1.0.92", - "@clevercanyon/utilities.node": "^1.0.104", + "@clevercanyon/madrun": "^1.0.98", + "@clevercanyon/utilities": "^1.0.265", + "@clevercanyon/utilities.cfp": "^1.0.93", + "@clevercanyon/utilities.node": "^1.0.105", "@cloudflare/workers-types": "^4.20230914.0", "@eslint/js": "^8.48.0", "@iarna/toml": "^2.2.5", @@ -877,9 +877,9 @@ } }, "node_modules/@clevercanyon/madrun": { - "version": "1.0.98", - "resolved": "https://registry.npmjs.org/@clevercanyon/madrun/-/madrun-1.0.98.tgz", - "integrity": "sha512-oSQuKe7eKy/4etUcLb5pfJ2XwICz8AbZ/6DrHl3bAub58dY158tvsei7lp5K/EhXhG3taXMy68NuZ5nTouwsfg==", + "version": "1.0.99", + "resolved": "https://registry.npmjs.org/@clevercanyon/madrun/-/madrun-1.0.99.tgz", + "integrity": "sha512-X32w6B1jO2Z0r2b48pk68WkAmhmYY6roZw0Brm81pTRjEX2GpJDoavSKWFUERmVe8Rja8ZsRtQGCiSx4EDm/lA==", "cpu": [ "x64", "arm64" @@ -890,8 +890,8 @@ "linux" ], "dependencies": { - "@clevercanyon/utilities": "^1.0.264", - "@clevercanyon/utilities.node": "^1.0.104" + "@clevercanyon/utilities": "^1.0.265", + "@clevercanyon/utilities.node": "^1.0.105" }, "bin": { "madrun": "dist/bin/cli.js" @@ -905,9 +905,9 @@ } }, "node_modules/@clevercanyon/preact-iso.fork": { - "version": "2.3.60", - "resolved": "https://registry.npmjs.org/@clevercanyon/preact-iso.fork/-/preact-iso.fork-2.3.60.tgz", - "integrity": "sha512-aKjwOmcw4Q8axypMSU9yJL3JYuUtdaX3E9WezEeg+2xm+CnKPZwnsKMUinS43vQjuPJfiHkJOfvzM5pipp/pCw==", + "version": "2.3.61", + "resolved": "https://registry.npmjs.org/@clevercanyon/preact-iso.fork/-/preact-iso.fork-2.3.61.tgz", + "integrity": "sha512-WbHxx1IdpP/PNGdORyI09o6J/+T+JDf1OTimTrd0pLVr3eBEmHhCJvER1G05vP2liH1tYEOZplNHtISEN0gbXA==", "cpu": [ "x64", "arm64" @@ -931,9 +931,9 @@ } }, "node_modules/@clevercanyon/split-cmd.fork": { - "version": "1.0.55", - "resolved": "https://registry.npmjs.org/@clevercanyon/split-cmd.fork/-/split-cmd.fork-1.0.55.tgz", - "integrity": "sha512-LW4aFpzj/Ij2Ym3jXB/6lzcFOfwt+ymNjDOCZcS83EHnXFVz9xNkirxUFqVE87YmEbDjXXS7wawiDNe9Frpvjw==", + "version": "1.0.56", + "resolved": "https://registry.npmjs.org/@clevercanyon/split-cmd.fork/-/split-cmd.fork-1.0.56.tgz", + "integrity": "sha512-ZKhIpR/jQq4FrGAcU5bCu5GfrmDsau4trVjLQUEZ9rNPpwkksl8clW9yGrsZ/jrX5EzQQu3Yb3z8R3i8dYrEGA==", "cpu": [ "x64", "arm64" @@ -953,9 +953,9 @@ } }, "node_modules/@clevercanyon/utilities": { - "version": "1.0.264", - "resolved": "https://registry.npmjs.org/@clevercanyon/utilities/-/utilities-1.0.264.tgz", - "integrity": "sha512-85jVDKK4k1wPGa5uHHDtXvYhxGV6uj3BPEtNHjEIHuRWo20YXmYIrHFBdv3+ytNW/auJNh+21iQ1uQrgEP9+vw==", + "version": "1.0.265", + "resolved": "https://registry.npmjs.org/@clevercanyon/utilities/-/utilities-1.0.265.tgz", + "integrity": "sha512-j65SsPdJ3pZVsr6D/ix/fs5MIIy6Y+7WgfMtXbAwYGzP0JOts5XZAjTJ+oRA26kRMCRlZIYES8xlHkIhIJe6Ew==", "cpu": [ "x64", "arm64" @@ -973,11 +973,11 @@ "url": "https://github.com/sponsors/clevercanyon" }, "peerDependencies": { - "@clevercanyon/preact-iso.fork": "^2.3.60", + "@clevercanyon/preact-iso.fork": "^2.3.61", "fast-equals": "^4.0.3", "ignore": "^5.2.4", "luxon": "^3.4.3", - "micromatch": "npm:@clevercanyon/micromatch.fork@^4.0.57", + "micromatch": "npm:@clevercanyon/micromatch.fork@^4.0.58", "moize": "^6.1.6", "preact": "^10.17.1", "preact-render-to-string": "^6.2.1", @@ -987,9 +987,9 @@ } }, "node_modules/@clevercanyon/utilities.cfp": { - "version": "1.0.92", - "resolved": "https://registry.npmjs.org/@clevercanyon/utilities.cfp/-/utilities.cfp-1.0.92.tgz", - "integrity": "sha512-ei5ls6tP+N6vYKboFkDetYL067TONioTu18+Pm2qovow2JlCqoUmGoyFCPLR8s3rAeK2uycwHhFQTWCohcG8QQ==", + "version": "1.0.93", + "resolved": "https://registry.npmjs.org/@clevercanyon/utilities.cfp/-/utilities.cfp-1.0.93.tgz", + "integrity": "sha512-ZOXk09Yq7HW1WDhXVbsbRwag7v7xCxPCgaXCZlvriEQdbua+rnTazrtQl9aQRYVQ2gi+3YPv55evoZ32riwN1w==", "cpu": [ "x64", "arm64" @@ -1007,15 +1007,15 @@ "url": "https://github.com/sponsors/clevercanyon" }, "peerDependencies": { - "@clevercanyon/utilities": "^1.0.264", - "@clevercanyon/utilities.cfw": "^1.0.101", - "@clevercanyon/utilities.web": "^1.0.71" + "@clevercanyon/utilities": "^1.0.265", + "@clevercanyon/utilities.cfw": "^1.0.102", + "@clevercanyon/utilities.web": "^1.0.72" } }, "node_modules/@clevercanyon/utilities.cfw": { - "version": "1.0.101", - "resolved": "https://registry.npmjs.org/@clevercanyon/utilities.cfw/-/utilities.cfw-1.0.101.tgz", - "integrity": "sha512-CBpYAT0srPV6fYBR2L3SOoc/M3ErcXAsXJjyYySeFF7OPSrt6iPc7kzrcADx07JdY+lwbwnfiClD7f8OSgqLig==", + "version": "1.0.102", + "resolved": "https://registry.npmjs.org/@clevercanyon/utilities.cfw/-/utilities.cfw-1.0.102.tgz", + "integrity": "sha512-aAd3X8iczvIIyfPsWth7E2lN73Gq5oSpEY2ChJj8NzZZzykeZ1/eH3eqA88hFWyxFv9OndJMMtWmDLAF8gr5cw==", "cpu": [ "x64", "arm64" @@ -1034,14 +1034,14 @@ "url": "https://github.com/sponsors/clevercanyon" }, "peerDependencies": { - "@clevercanyon/utilities": "^1.0.264", + "@clevercanyon/utilities": "^1.0.265", "@cloudflare/kv-asset-handler": "^0.2.0" } }, "node_modules/@clevercanyon/utilities.node": { - "version": "1.0.104", - "resolved": "https://registry.npmjs.org/@clevercanyon/utilities.node/-/utilities.node-1.0.104.tgz", - "integrity": "sha512-1zxICZFFVSn/rX/HN/B4Dr4kqJpR3QD6zEY4GW2orkujDc9/PIjgVEvGcayoxWj2rQ0btzqkXbt1jfuaz2WKtg==", + "version": "1.0.105", + "resolved": "https://registry.npmjs.org/@clevercanyon/utilities.node/-/utilities.node-1.0.105.tgz", + "integrity": "sha512-hchak1AgQ00zRq4kFRcbQZ67nQNN4p69Gj5KbyRLqRkCYJwrgEFXO4bT3ULgMs/c9+jeZj7ntCbPycz18IHkPw==", "cpu": [ "x64", "arm64" @@ -1059,8 +1059,8 @@ "url": "https://github.com/sponsors/clevercanyon" }, "peerDependencies": { - "@clevercanyon/split-cmd.fork": "^1.0.55", - "@clevercanyon/utilities": "^1.0.264", + "@clevercanyon/split-cmd.fork": "^1.0.56", + "@clevercanyon/utilities": "^1.0.265", "archiver": "^5.3.2", "boxen": "^7.1.1", "chalk": "^5.3.0", @@ -1070,16 +1070,16 @@ "globby": "^13.2.2", "prettier": "^3.0.3", "shescape": "^2.0.0", - "spawn-please": "npm:@clevercanyon/spawn-please.fork@^2.0.49", + "spawn-please": "npm:@clevercanyon/spawn-please.fork@^2.0.50", "term-img": "^6.0.0", "yargs": "^17.7.2", "yargs-parser": "^21.1.1" } }, "node_modules/@clevercanyon/utilities.web": { - "version": "1.0.72", - "resolved": "https://registry.npmjs.org/@clevercanyon/utilities.web/-/utilities.web-1.0.72.tgz", - "integrity": "sha512-3XPXNxzpDccB1UF+Zogm/8N8uZswI6kjswirEW/vSZEBo0pqoJG+aDlhMkufLQYEz5ljaIu6RQOvCFmk1SFGyw==", + "version": "1.0.73", + "resolved": "https://registry.npmjs.org/@clevercanyon/utilities.web/-/utilities.web-1.0.73.tgz", + "integrity": "sha512-fHN4iVKNgfJz+E0jz3PuMpwNVv1XnpfOL/N01Qz2RD+ul0rnkCGJ/+Wv0RTxrFQFjax6y7UGayULjt0JVGNfOQ==", "cpu": [ "x64", "arm64" @@ -1098,7 +1098,7 @@ "url": "https://github.com/sponsors/clevercanyon" }, "peerDependencies": { - "@clevercanyon/utilities": "^1.0.264" + "@clevercanyon/utilities": "^1.0.265" } }, "node_modules/@cloudflare/kv-asset-handler": { @@ -7482,9 +7482,9 @@ }, "node_modules/braces": { "name": "@clevercanyon/braces.fork", - "version": "3.0.54", - "resolved": "https://registry.npmjs.org/@clevercanyon/braces.fork/-/braces.fork-3.0.54.tgz", - "integrity": "sha512-oILDxhhW5CIeJmrD7veTNfmQxONqSvYMjrNMlWk8vlh2fh0p6A/OYfPU0UV2nBkjCKPdeoCOC7sXSgT9sov6lQ==", + "version": "3.0.55", + "resolved": "https://registry.npmjs.org/@clevercanyon/braces.fork/-/braces.fork-3.0.55.tgz", + "integrity": "sha512-/I/KlVX9/mS5+p9SVLyFY8BrmmJ6Kycp9Ssz+JUL1u+RU/zw+8kShRmZBL2rSgas+uIe8lJ3q6np0PrqaeXYaA==", "cpu": [ "x64", "arm64" @@ -7494,7 +7494,7 @@ "linux" ], "dependencies": { - "fill-range": "npm:@clevercanyon/fill-range.fork@^7.0.53" + "fill-range": "npm:@clevercanyon/fill-range.fork@^7.0.54" }, "engines": { "node": "^19.1.0 || ^20.5.1", @@ -11932,9 +11932,9 @@ }, "node_modules/fill-range": { "name": "@clevercanyon/fill-range.fork", - "version": "7.0.53", - "resolved": "https://registry.npmjs.org/@clevercanyon/fill-range.fork/-/fill-range.fork-7.0.53.tgz", - "integrity": "sha512-HD7kPVsNZlcO0Bf53+8c0+PYi5wpKBxJE19U9Be5ka2BI0Za9hA8FpF1U1/XLGhFVSdemSMU3MKjDMnmz9MNiQ==", + "version": "7.0.54", + "resolved": "https://registry.npmjs.org/@clevercanyon/fill-range.fork/-/fill-range.fork-7.0.54.tgz", + "integrity": "sha512-bpmy066CJGTY/ewFEirt2tTwYlVXiqGI3cgJRBi3d5msXZkq3t1pLiFstqaIgf9U89wuY5C8NDPNF5GwIg1qQg==", "cpu": [ "x64", "arm64" @@ -11944,7 +11944,7 @@ "linux" ], "dependencies": { - "to-regex-range": "npm:@clevercanyon/to-regex-range.fork@^5.0.53" + "to-regex-range": "npm:@clevercanyon/to-regex-range.fork@^5.0.54" }, "engines": { "node": "^19.1.0 || ^20.5.1", @@ -14056,9 +14056,9 @@ }, "node_modules/is-number": { "name": "@clevercanyon/is-number.fork", - "version": "7.0.56", - "resolved": "https://registry.npmjs.org/@clevercanyon/is-number.fork/-/is-number.fork-7.0.56.tgz", - "integrity": "sha512-Zn8mOq0VnAsU9AEo49s3H07h5PiFvTkpaH15Zm6uSGFacbLPXRV7jLNhxQ2mHjUysXYhCjWyHLGOggNfsvNFqg==", + "version": "7.0.57", + "resolved": "https://registry.npmjs.org/@clevercanyon/is-number.fork/-/is-number.fork-7.0.57.tgz", + "integrity": "sha512-Qe5P9X8+pSJehYUiN5++Odiu+v73FiUA7ds1Mc0iiE75D3S1ww9NIkIJdDWuN5sebt/veiR/e/I69Xt1ygt8Eg==", "cpu": [ "x64", "arm64" @@ -18759,9 +18759,9 @@ }, "node_modules/micromatch": { "name": "@clevercanyon/micromatch.fork", - "version": "4.0.57", - "resolved": "https://registry.npmjs.org/@clevercanyon/micromatch.fork/-/micromatch.fork-4.0.57.tgz", - "integrity": "sha512-luBAloj5v0y7czETbGymJ7iDMbRmeEJ/wMLTAOgqLTOaMugfn0rArvq/7nRNhiQxD0oS414QC1Gc8mvzOtHAkA==", + "version": "4.0.58", + "resolved": "https://registry.npmjs.org/@clevercanyon/micromatch.fork/-/micromatch.fork-4.0.58.tgz", + "integrity": "sha512-4xp/G45Ml1cSweDGGtlC5BdNGr1nHiseeheb1HRdtqgyQuxz+fwjJ4cEdixa91Tvl1xOdpwdQ/rt2CSlmCl1SQ==", "cpu": [ "x64", "arm64" @@ -18772,8 +18772,8 @@ "linux" ], "dependencies": { - "braces": "npm:@clevercanyon/braces.fork@^3.0.53", - "picomatch": "npm:@clevercanyon/picomatch.fork@^2.3.52" + "braces": "npm:@clevercanyon/braces.fork@^3.0.54", + "picomatch": "npm:@clevercanyon/picomatch.fork@^2.3.53" }, "engines": { "node": "^19.1.0 || ^20.5.1", @@ -20289,9 +20289,9 @@ }, "node_modules/picomatch": { "name": "@clevercanyon/picomatch.fork", - "version": "2.3.53", - "resolved": "https://registry.npmjs.org/@clevercanyon/picomatch.fork/-/picomatch.fork-2.3.53.tgz", - "integrity": "sha512-lj9otV6PZrwtk/amStPVYJ/fS7wjaoDlF27AfS3SmHhTdiNFyM9rgRhQaHUR4nxd4z+h7QE0/FVfTjguEIq2Pg==", + "version": "2.3.54", + "resolved": "https://registry.npmjs.org/@clevercanyon/picomatch.fork/-/picomatch.fork-2.3.54.tgz", + "integrity": "sha512-ftHWRH64ppwZBILNdtnaBp6uzQPICvX9k1u0Q0B+dCUOhkAYgZukGuqlTwEgbNNwWodFrx4hc+NpQjqMiXGjlQ==", "cpu": [ "x64", "arm64" @@ -24434,9 +24434,9 @@ }, "node_modules/spawn-please": { "name": "@clevercanyon/spawn-please.fork", - "version": "2.0.49", - "resolved": "https://registry.npmjs.org/@clevercanyon/spawn-please.fork/-/spawn-please.fork-2.0.49.tgz", - "integrity": "sha512-yD2EC5nJqrAbpWbVcLq2/wgKUv4oke1cGA0JdCvsa38DqIJnMtG0+GxEIdKnY/Ae6hdKxWiXf7+udp5bDdOuDg==", + "version": "2.0.50", + "resolved": "https://registry.npmjs.org/@clevercanyon/spawn-please.fork/-/spawn-please.fork-2.0.50.tgz", + "integrity": "sha512-sUtOAwzW4cHtAD47H1o8B80sDOmyNg5O1srsBKOPwZuObJOJpsAhx/iq67L2rfdPt8DUs5NoKarJZXuc7FVRKg==", "cpu": [ "x64", "arm64" @@ -25745,9 +25745,9 @@ }, "node_modules/to-regex-range": { "name": "@clevercanyon/to-regex-range.fork", - "version": "5.0.53", - "resolved": "https://registry.npmjs.org/@clevercanyon/to-regex-range.fork/-/to-regex-range.fork-5.0.53.tgz", - "integrity": "sha512-jm2Z4BqXtikBOG+LanD4dGLRVfx2E+nIn9iSLl58D1Z+MxMS8/eE2nNAnyELhPdj6SlMDa6sT5A8pC2ooZ0vsA==", + "version": "5.0.54", + "resolved": "https://registry.npmjs.org/@clevercanyon/to-regex-range.fork/-/to-regex-range.fork-5.0.54.tgz", + "integrity": "sha512-5Sb2guS0J8Yybe2HVaDVAYJZSmfzCpVDSgYMshiFKrx9aGCOIlrebaqCH/VYkA7RXFeZYKVptBdNQtxCrG4G5A==", "cpu": [ "x64", "arm64" @@ -25757,7 +25757,7 @@ "linux" ], "dependencies": { - "is-number": "npm:@clevercanyon/is-number.fork@^7.0.56" + "is-number": "npm:@clevercanyon/is-number.fork@^7.0.57" }, "engines": { "node": "^19.1.0 || ^20.5.1", diff --git a/package.json b/package.json index 93466e81..09c111cc 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "publishConfig": { "access": "public" }, - "version": "4.0.58", + "version": "4.0.59", "license": "MIT", "name": "@clevercanyon/micromatch.fork", "description": "Glob matching. A replacement and faster alternative to minimatch and multimatch.", @@ -35,15 +35,15 @@ "types": "", "typesVersions": {}, "dependencies": { - "braces": "npm:@clevercanyon/braces.fork@^3.0.54", - "picomatch": "npm:@clevercanyon/picomatch.fork@^2.3.53" + "braces": "npm:@clevercanyon/braces.fork@^3.0.55", + "picomatch": "npm:@clevercanyon/picomatch.fork@^2.3.54" }, "peerDependencies": {}, "peerDependenciesMeta": {}, "optionalDependencies": {}, "bundleDependencies": [], "devDependencies": { - "@clevercanyon/dev-deps": "^1.0.229" + "@clevercanyon/dev-deps": "^1.0.230" }, "overrides": {}, "cpu": ["x64", "arm64"], diff --git a/tsconfig.json b/tsconfig.json index b7027235..11c8b776 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` Thu, Sep 21, 2023, 3:57:19 AM EDT. + * Last generated using `./tsconfig.mjs` Thu, Sep 21, 2023, 5:59:38 AM EDT. */ { "include": ["./*.d.ts", "./src/**/*"], diff --git a/wrangler.toml b/wrangler.toml index 86ce752f..e9916ee5 100644 --- a/wrangler.toml +++ b/wrangler.toml @@ -7,48 +7,40 @@ # @note This entire file will be updated automatically. # @note Instead of editing here, please review `./wrangler.mjs`. # -# Last generated using `./wrangler.mjs` Thu, Sep 21, 2023, 3:57:19 AM EDT. +# Last generated using `./wrangler.mjs` Thu, Sep 21, 2023, 5:59:38 AM EDT. ## compatibility_date = "2023-08-15" send_metrics = false usage_model = "bundled" -account_id = "f1176464a976947aa5665d989814a4b1" name = "micromatch-fork" +account_id = "f1176464a976947aa5665d989814a4b1" workers_dev = false main = "./dist/index.js" [[rules]] -type = "Data" -globs = [ "**/*.bin" ] +type = "Text" +globs = [ ] fallthrough = false [[rules]] -type = "CompiledWasm" -globs = [ "**/*.wasm" ] +type = "ESModule" +globs = [ "**/*.js", "**/*.mjs", "**/*.jsx", "**/*.mjsx" ] fallthrough = false [[rules]] -type = "ESModule" -globs = [ "**/*.js", "**/*.jsx", "**/*.mjs", "**/*.mjsx" ] +type = "CommonJS" +globs = [ "**/*.cjs", "**/*.cjsx" ] fallthrough = false [[rules]] -type = "CommonJS" -globs = [ "**/*.cjs", "**/*.cjsx", "**/*.node" ] +type = "CompiledWasm" +globs = [ "**/*.wasm" ] fallthrough = false [[rules]] -type = "Text" -globs = [ - "**/*.md", - "**/*.txt", - "**/*.xml", - "**/*.html", - "**/*.shtml", - "**/*.ejs", - "**/*.json" -] +type = "Data" +globs = [ ] fallthrough = false [build] @@ -56,12 +48,6 @@ cwd = "./" watch_dir = "./src" command = "npx @clevercanyon/madrun build --mode=prod" -[env.dev] -workers_dev = false - - [env.dev.build] - command = "npx @clevercanyon/madrun build --mode=dev" - [site] bucket = "./dist/assets" exclude = [ @@ -181,3 +167,9 @@ exclude = [ [route] zone_name = "hop.gdn" pattern = "workers.hop.gdn/micromatch-fork/*" + +[env.dev] +workers_dev = false + + [env.dev.build] + command = "npx @clevercanyon/madrun build --mode=dev"