diff --git a/examples/e2e/app-router/next.config.ts b/examples/e2e/app-router/next.config.ts index 8a85d80a..6b6ae2af 100644 --- a/examples/e2e/app-router/next.config.ts +++ b/examples/e2e/app-router/next.config.ts @@ -6,6 +6,9 @@ const nextConfig: NextConfig = { transpilePackages: ["@example/shared"], output: "standalone", // outputFileTracingRoot: "../sst", + typescript: { + ignoreBuildErrors: true, + }, eslint: { ignoreDuringBuilds: true, }, diff --git a/examples/e2e/app-router/package.json b/examples/e2e/app-router/package.json index 68eedd7a..da8c5a76 100644 --- a/examples/e2e/app-router/package.json +++ b/examples/e2e/app-router/package.json @@ -9,7 +9,7 @@ "start": "next start --port 3001", "lint": "next lint", "clean": "rm -rf .turbo node_modules .next .open-next", - "build:worker-tofix": "pnpm opennextjs-cloudflare", + "build:worker": "pnpm opennextjs-cloudflare", "dev:worker": "wrangler dev --port 8770 --inspector-port 9330", "preview": "pnpm build:worker && pnpm dev:worker" }, diff --git a/packages/cloudflare/package.json b/packages/cloudflare/package.json index 660d7d65..90b1fc86 100644 --- a/packages/cloudflare/package.json +++ b/packages/cloudflare/package.json @@ -58,24 +58,26 @@ "@types/mock-fs": "catalog:", "@types/node": "catalog:", "esbuild": "catalog:", + "eslint": "catalog:", "eslint-plugin-import": "catalog:", "eslint-plugin-simple-import-sort": "catalog:", "eslint-plugin-unicorn": "catalog:", - "eslint": "catalog:", "globals": "catalog:", "mock-fs": "catalog:", "next": "catalog:", "rimraf": "catalog:", - "typescript-eslint": "catalog:", "typescript": "catalog:", + "typescript-eslint": "catalog:", "vitest": "catalog:" }, "dependencies": { + "@ast-grep/napi": "^0.33.1", "@dotenvx/dotenvx": "catalog:", "@opennextjs/aws": "https://pkg.pr.new/@opennextjs/aws@704", + "enquirer": "^2.4.1", "glob": "catalog:", "ts-morph": "catalog:", - "enquirer": "^2.4.1" + "yaml": "^2.7.0" }, "peerDependencies": { "wrangler": "catalog:" diff --git a/packages/cloudflare/src/cli/build/bundle-server.ts b/packages/cloudflare/src/cli/build/bundle-server.ts index 637f2355..0c308ca2 100644 --- a/packages/cloudflare/src/cli/build/bundle-server.ts +++ b/packages/cloudflare/src/cli/build/bundle-server.ts @@ -3,11 +3,13 @@ import { readFile, writeFile } from "node:fs/promises"; import path from "node:path"; import { fileURLToPath } from "node:url"; +import { Lang, parse } from "@ast-grep/napi"; import type { BuildOptions } from "@opennextjs/aws/build/helper.js"; import { getCrossPlatformPathRegex } from "@opennextjs/aws/utils/regex.js"; import { build, Plugin } from "esbuild"; import { Config } from "../config.js"; +import { patchOptionalDependencies } from "./patches/ast/optional-deps.js"; import * as patches from "./patches/index.js"; import { normalizePath, patchCodeWithValidations } from "./utils/index.js"; @@ -44,7 +46,7 @@ export async function bundleServer(config: Config, openNextOptions: BuildOptions target: "esnext", minify: false, plugins: [createFixRequiresESBuildPlugin(config)], - external: ["./middleware/handler.mjs"], + external: ["./middleware/handler.mjs", "caniuse-lite"], alias: { // Note: we apply an empty shim to next/dist/compiled/ws because it generates two `eval`s: // eval("require")("bufferutil"); @@ -176,7 +178,11 @@ async function updateWorkerBundledCode( ], ]); - await writeFile(workerOutputFile, patchedCode); + const bundle = parse(Lang.TypeScript, patchedCode).root(); + + const edits = patchOptionalDependencies(bundle); + + await writeFile(workerOutputFile, bundle.commitEdits(edits)); } function createFixRequiresESBuildPlugin(config: Config): Plugin { diff --git a/packages/cloudflare/src/cli/build/patches/ast/optional-deps.ts b/packages/cloudflare/src/cli/build/patches/ast/optional-deps.ts new file mode 100644 index 00000000..d28529a6 --- /dev/null +++ b/packages/cloudflare/src/cli/build/patches/ast/optional-deps.ts @@ -0,0 +1,41 @@ +import { type SgNode } from "@ast-grep/napi"; + +import { applyRule } from "./util.js"; + +/** + * Handle optional dependencies. + * + * A top level `require(dep)` would throw when the dep is not installed. + * + * So we wrap any of + * - `t = require("dep")` + * - `t = require("dep/sub/path")` + * - `t = require("dep/sub/path/" + var)` + * - `e.exports = require("dep")` + * + * in a try/catch (only if not already). + */ +const rule = ` +rule: + pattern: $$$LHS = require($$$REQ) + has: + pattern: $MOD + kind: string_fragment + stopBy: end + regex: ^caniuse-lite(/|$) + not: + inside: + kind: try_statement + stopBy: end + +fix: |- + try { + $$$LHS = require($$$REQ); + } catch { + throw new Error('The optional dependency "$MOD" is not installed'); + } +`; + +export function patchOptionalDependencies(root: SgNode) { + return applyRule(rule, root); +} diff --git a/packages/cloudflare/src/cli/build/patches/ast/util.ts b/packages/cloudflare/src/cli/build/patches/ast/util.ts new file mode 100644 index 00000000..5949ed96 --- /dev/null +++ b/packages/cloudflare/src/cli/build/patches/ast/util.ts @@ -0,0 +1,48 @@ +import { type Edit, type NapiConfig, type SgNode } from "@ast-grep/napi"; +import yaml from "yaml"; + +/** + * Returns the `Edit`s for an ast-grep rule in yaml format + * + * The rule must have a `fix` to rewrite the matched node. + * + * Tip: use https://ast-grep.github.io/playground.html to create rules. + * + * @param yamlRule The rule in yaml format + * @param root The root node + * @param once only apply once + * @returns A list of edits. + */ +export function applyRule(yamlRule: string, root: SgNode, { once = false } = {}) { + const rule: NapiConfig & { fix?: string } = yaml.parse(yamlRule); + if (rule.transform) { + throw new Error("transform is not supported"); + } + if (!rule.fix) { + throw new Error("no fix to apply"); + } + + const fix = rule.fix; + + const matches = once ? [root.find(rule)].filter((m) => m !== null) : root.findAll(rule); + + const edits: Edit[] = []; + + matches.forEach((match) => { + edits.push( + match.replace( + // Replace known placeholders by their value + fix + .replace(/\$\$\$([A-Z0-9_]+)/g, (_m, name) => + match + .getMultipleMatches(name) + .map((n) => n.text()) + .join("") + ) + .replace(/\$([A-Z0-9_]+)/g, (m, name) => match.getMatch(name)?.text() ?? m) + ) + ); + }); + + return edits; +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6034fd57..3f336dbf 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -85,8 +85,8 @@ catalogs: specifier: ^2.1.1 version: 2.1.1 wrangler: - specifier: ^3.101.0 - version: 3.101.0 + specifier: ^3.103.0 + version: 3.104.0 e2e: '@types/node': specifier: 20.17.6 @@ -171,7 +171,7 @@ importers: version: 22.2.0 wrangler: specifier: 'catalog:' - version: 3.101.0(@cloudflare/workers-types@4.20250109.0) + version: 3.104.0(@cloudflare/workers-types@4.20250109.0) examples/create-next-app: dependencies: @@ -217,7 +217,7 @@ importers: version: 5.7.3 wrangler: specifier: 'catalog:' - version: 3.101.0(@cloudflare/workers-types@4.20250109.0) + version: 3.104.0(@cloudflare/workers-types@4.20250109.0) examples/e2e/app-router: dependencies: @@ -316,7 +316,7 @@ importers: version: 5.7.3 wrangler: specifier: 'catalog:' - version: 3.101.0(@cloudflare/workers-types@4.20250109.0) + version: 3.104.0(@cloudflare/workers-types@4.20250109.0) examples/vercel-blog-starter: dependencies: @@ -371,7 +371,7 @@ importers: version: 5.7.3 wrangler: specifier: 'catalog:' - version: 3.101.0(@cloudflare/workers-types@4.20250109.0) + version: 3.104.0(@cloudflare/workers-types@4.20250109.0) examples/vercel-commerce: dependencies: @@ -438,10 +438,13 @@ importers: version: 5.7.3 wrangler: specifier: 'catalog:' - version: 3.101.0(@cloudflare/workers-types@4.20250109.0) + version: 3.104.0(@cloudflare/workers-types@4.20250109.0) packages/cloudflare: dependencies: + '@ast-grep/napi': + specifier: ^0.33.1 + version: 0.33.1 '@dotenvx/dotenvx': specifier: 'catalog:' version: 1.31.0 @@ -459,7 +462,10 @@ importers: version: 23.0.0 wrangler: specifier: 'catalog:' - version: 3.101.0(@cloudflare/workers-types@4.20250109.0) + version: 3.104.0(@cloudflare/workers-types@4.20250109.0) + yaml: + specifier: ^2.7.0 + version: 2.7.0 devDependencies: '@cloudflare/workers-types': specifier: 'catalog:' @@ -519,6 +525,64 @@ packages: resolution: {integrity: sha512-UrcABB+4bUrFABwbluTIBErXwvbsU/V7TZWfmbgJfbkwiBuziS9gxdODUyuiecfdGQ85jglMW6juS3+z5TsKLw==} engines: {node: '>=10'} + '@ast-grep/napi-darwin-arm64@0.33.1': + resolution: {integrity: sha512-HJcjxDhF1THn6VlUMpYFQoZBWWMk3flBJpLEDWLjH3Umk7/4tQvaJeKwhl32Snegj35p9SHGz1cS8D2k1nDsEg==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [darwin] + + '@ast-grep/napi-darwin-x64@0.33.1': + resolution: {integrity: sha512-Gu3dd+7RZcLyte/xwBX4ErT12GYgGeQGQh6743NffChyVnpwZpj2aWmdkD8gHRKswXz2dp5R01QMCV0G5o8rDQ==} + engines: {node: '>= 10'} + cpu: [x64] + os: [darwin] + + '@ast-grep/napi-linux-arm64-gnu@0.33.1': + resolution: {integrity: sha512-4rvHBtq/0Ziwr93Mp86GQPMMySNHCMXnSIdJqJjTikt/LhJNdxmXtEVadashwxbBGWvcIy8dL6OCBHblzY/3ZQ==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [linux] + + '@ast-grep/napi-linux-arm64-musl@0.33.1': + resolution: {integrity: sha512-+vTHYYP8iRG9lZHhcpQRxAuD8CBYXJHFXgsevmnurS/R53r0YjNtrtj6W33e7RYXY5hehmey2Cz/5h6OhdLcJw==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [linux] + + '@ast-grep/napi-linux-x64-gnu@0.33.1': + resolution: {integrity: sha512-Qm42//ZHIi2XvyvHboRPaNt32v143feG2aCqxZ2qhKJCI33abtH8pW8MF90Ix85d927xYtTwZX/ovOmJ4bghFQ==} + engines: {node: '>= 10'} + cpu: [x64] + os: [linux] + + '@ast-grep/napi-linux-x64-musl@0.33.1': + resolution: {integrity: sha512-+ye9d8nwgi+f9yhA0NEv5lDcpfIF7xhCcF9FerIKpksX57oI68QWNz1bOWHOuebaf9Wc0hgEtfai7lzcDWcsnA==} + engines: {node: '>= 10'} + cpu: [x64] + os: [linux] + + '@ast-grep/napi-win32-arm64-msvc@0.33.1': + resolution: {integrity: sha512-0IrPtvqMUJmvmbBN3JcAmUoKUxsWMmrp0VAoJ+zUBHcz3GeWDISgxrUcx1z6edMeF+Ktm0SUG2LfqrzFhUqMyw==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [win32] + + '@ast-grep/napi-win32-ia32-msvc@0.33.1': + resolution: {integrity: sha512-rM6kK19Z9mknXQLZYvIGW1vR472n0dzhexWRM4O8BAL33B4NXA0qa7lX7I3ioHBTOUx0dGW10oNRm3yindUohg==} + engines: {node: '>= 10'} + cpu: [ia32] + os: [win32] + + '@ast-grep/napi-win32-x64-msvc@0.33.1': + resolution: {integrity: sha512-8ATNhuU28PoUBxSgsPQnPpY+rl8DPEQCuUS55X0BLAvNQwR+Tc4MHHHX1FwjQxLLSAPfd5weiG4XQA+l7sIr0w==} + engines: {node: '>= 10'} + cpu: [x64] + os: [win32] + + '@ast-grep/napi@0.33.1': + resolution: {integrity: sha512-AfUsqmEa8NoYq1QhY2LWKCgKRBrCW89WB2D7t4hhTwXcfBB+CWRtY11vUughpfGLrdyziPst7kpdFzI9TC9Efw==} + engines: {node: '>= 10'} + '@aws-crypto/crc32@5.2.0': resolution: {integrity: sha512-nLbCWqQNgUiwwtFsen1AdzAtvuLRsQS8rYgMuxCrdKf9kOssamGLuPwyTY9wyYblNr9+1XM8v6zoDTPPSIeANg==} engines: {node: '>=16.0.0'} @@ -2864,9 +2928,6 @@ packages: '@types/ms@0.7.34': resolution: {integrity: sha512-nG96G3Wp6acyAgJqGasjODb+acrI7KltPiRxzHPXnP3NgI28bpQDRv53olbqGXbfcgF5aiiHmO3xpwEpS5Ld9g==} - '@types/node-forge@1.3.11': - resolution: {integrity: sha512-FQx220y22OKNTqaByeBGqHWYz4cl94tpcxeFdvBo3wjG6XPBuZ0BNgNZRV5J5TFmmcsJ4IzsLkmGRiQbnYsBEQ==} - '@types/node@12.20.55': resolution: {integrity: sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==} @@ -3261,10 +3322,6 @@ packages: resolution: {integrity: sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==} engines: {node: '>= 8.10.0'} - chokidar@4.0.3: - resolution: {integrity: sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==} - engines: {node: '>= 14.16.0'} - ci-info@3.9.0: resolution: {integrity: sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==} engines: {node: '>=8'} @@ -3410,9 +3467,6 @@ packages: date-fns@3.6.0: resolution: {integrity: sha512-fRHTG8g/Gif+kSh50gaGEdToemgfj74aRX3swtiouboip5JDLAyDE9F11nHMIcvOaXeOC6D7SpNhi7uFyB7Uww==} - date-fns@4.1.0: - resolution: {integrity: sha512-Ukq0owbQXxa/U3EGtsdVBkR1w7KOQ5gIBqdH2hkvknzZPYvBxb/aa6E8L7tmjFtkwZBu3UXBbjIgPo/Ez4xaNg==} - debug@2.6.9: resolution: {integrity: sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==} peerDependencies: @@ -4353,9 +4407,6 @@ packages: iterator.prototype@1.1.2: resolution: {integrity: sha512-DR33HMMr8EzwuRL8Y9D3u2BMj8+RqSE850jfGu59kS7tbmPLzGkZmVSfyCFSDxuZiEY6Rzt3T2NA/qU+NwVj1w==} - itty-time@1.0.6: - resolution: {integrity: sha512-+P8IZaLLBtFv8hCkIjcymZOp4UJ+xW6bSlQsXGqrkmJh7vSiMFSlNne0mCYagEE0N7HDNR5jJBRxwN0oYv61Rw==} - jackspeak@2.3.6: resolution: {integrity: sha512-N3yCS/NegsOBokc8GAdM8UcmfsKiSS8cipheD/nivzr700H+nsMOxJjQnvwOcRYVuFkdH0wGUvW2WbXGmrZGbQ==} engines: {node: '>=14'} @@ -4642,8 +4693,8 @@ packages: resolution: {integrity: sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==} engines: {node: '>=4'} - miniflare@3.20241230.1: - resolution: {integrity: sha512-CS6zm12IK7VQGAnypfqqfweVtRKwkz1k4E1cKuF04yCDsuKzkM1UkzCfKhD7cJdGwdEtdtRwq69kODeVFAl8og==} + miniflare@3.20241230.2: + resolution: {integrity: sha512-gFC3IaUKrLGdtA6y6PLpC/QE5YAjB5ITCfBZHkosRyFZ9ApaCHKcHRvrEFMc/R19QxxtHD+G3tExEHp7MmtsYQ==} engines: {node: '>=16.13'} hasBin: true @@ -4791,10 +4842,6 @@ packages: no-case@3.0.4: resolution: {integrity: sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg==} - node-forge@1.3.1: - resolution: {integrity: sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA==} - engines: {node: '>= 6.13.0'} - node-releases@2.0.18: resolution: {integrity: sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g==} @@ -5265,10 +5312,6 @@ packages: resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==} engines: {node: '>=8.10.0'} - readdirp@4.1.1: - resolution: {integrity: sha512-h80JrZu/MHUZCyHu5ciuoI0+WxsCxzxJTILn6Fs8rxSnFPh+UVHYfeIxK1nVGugMqkfC4vJcBOYbkfkwYK0+gw==} - engines: {node: '>= 14.18.0'} - reflect.getprototypeof@1.0.6: resolution: {integrity: sha512-fmfw4XgoDke3kdI6h4xcUz1dG8uaiv5q9gcEwLS4Pnth2kxT+GZ7YehS1JTMGBQmtV7Y4GFGbs2re2NqhdozUg==} engines: {node: '>= 0.4'} @@ -5386,10 +5429,6 @@ packages: resolution: {integrity: sha512-vfD3pmTzGpufjScBh50YHKzEu2lxBWhVEHsNGoEXmCmn2hKGfeNLYMzCJpe8cD7gqX7TJluOVpBkAequ6dgMmA==} engines: {node: '>=4'} - selfsigned@2.4.1: - resolution: {integrity: sha512-th5B4L2U+eGLq1TVh7zNRGBapioSORUeymIydxgFpwww9d2qyKvtuPU2jJuHvYAwwqi2Y596QBL3eEqcPEYL8Q==} - engines: {node: '>=10'} - semver@5.7.2: resolution: {integrity: sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==} hasBin: true @@ -5861,8 +5900,8 @@ packages: resolution: {integrity: sha512-U8uCCl2x9TK3WANvmBavymRzxbfFYG+tAu+fgx3zxQy3qdagQqBLwJVrdyO1TBfUXvfKveMKJZhpvUYoOjM+4g==} engines: {node: '>=18.17'} - unenv-nightly@2.0.0-20241218-183400-5d6aec3: - resolution: {integrity: sha512-7Xpi29CJRbOV1/IrC03DawMJ0hloklDLq/cigSe+J2jkcC+iDres2Cy0r4ltj5f0x7DqsaGaB4/dLuCPPFZnZA==} + unenv@2.0.0-rc.0: + resolution: {integrity: sha512-H0kl2w8jFL/FAk0xvjVing4bS3jd//mbg1QChDnn58l9Sc5RtduaKmLAL8n+eBw5jJo8ZjYV7CrEGage5LAOZQ==} unified@11.0.5: resolution: {integrity: sha512-xKvGhPWw3k84Qjh8bI3ZeJjqnyadK+GEFtazSfZv/rKeTkTjOJho6mFqh2SM96iIcZokxiOpg78GazTSg8+KHA==} @@ -6046,8 +6085,8 @@ packages: engines: {node: '>=16'} hasBin: true - wrangler@3.101.0: - resolution: {integrity: sha512-zKRqL/jjyF54DH8YCCaF4B2x0v9kSdxLpNkxGDltZ17vCBbq9PCchooN25jbmxOTC2LWdB2LVDw7S66zdl7XuQ==} + wrangler@3.104.0: + resolution: {integrity: sha512-txxgkKZwPQrX1PDgY+ATWnnx4GSeNxUrnBumudWPRmXG0JdLzCf09R+723slMMT1m+CKQXU1KvuUHc/GxTnTyA==} engines: {node: '>=16.17.0'} hasBin: true peerDependencies: @@ -6079,14 +6118,11 @@ packages: utf-8-validate: optional: true - xxhash-wasm@1.1.0: - resolution: {integrity: sha512-147y/6YNh+tlp6nd/2pWq38i9h6mz/EuQ6njIrmW8D1BS5nCqs0P6DG+m6zTGnNz5I+uhZ0SHxBs9BsPrwcKDA==} - yallist@2.1.2: resolution: {integrity: sha512-ncTzHV7NvsQZkYe1DW7cbDLm0YpzHmZF5r/iyP3ZnQtMiJ+pjzisCiMNI+Sj+xQF5pXhSHxSB3uDbsBTzY/c2A==} - yaml@2.5.1: - resolution: {integrity: sha512-bLQOjaX/ADgQ20isPJRvF0iRUHIxVhYvr53Of7wGcWlO2jvtUlH5m87DsmulFVxRpNLOnI4tB6p/oh8D7kpn9Q==} + yaml@2.7.0: + resolution: {integrity: sha512-+hSoy/QHluxmC9kCIJyL/uyFmLmc+e5CFR5Wa+bpIhIj85LVb9ZH2nVnqrHoSvKogwODv0ClqZkmiSSaIH5LTA==} engines: {node: '>= 14'} hasBin: true @@ -6111,6 +6147,45 @@ snapshots: '@alloc/quick-lru@5.2.0': {} + '@ast-grep/napi-darwin-arm64@0.33.1': + optional: true + + '@ast-grep/napi-darwin-x64@0.33.1': + optional: true + + '@ast-grep/napi-linux-arm64-gnu@0.33.1': + optional: true + + '@ast-grep/napi-linux-arm64-musl@0.33.1': + optional: true + + '@ast-grep/napi-linux-x64-gnu@0.33.1': + optional: true + + '@ast-grep/napi-linux-x64-musl@0.33.1': + optional: true + + '@ast-grep/napi-win32-arm64-msvc@0.33.1': + optional: true + + '@ast-grep/napi-win32-ia32-msvc@0.33.1': + optional: true + + '@ast-grep/napi-win32-x64-msvc@0.33.1': + optional: true + + '@ast-grep/napi@0.33.1': + optionalDependencies: + '@ast-grep/napi-darwin-arm64': 0.33.1 + '@ast-grep/napi-darwin-x64': 0.33.1 + '@ast-grep/napi-linux-arm64-gnu': 0.33.1 + '@ast-grep/napi-linux-arm64-musl': 0.33.1 + '@ast-grep/napi-linux-x64-gnu': 0.33.1 + '@ast-grep/napi-linux-x64-musl': 0.33.1 + '@ast-grep/napi-win32-arm64-msvc': 0.33.1 + '@ast-grep/napi-win32-ia32-msvc': 0.33.1 + '@ast-grep/napi-win32-x64-msvc': 0.33.1 + '@aws-crypto/crc32@5.2.0': dependencies: '@aws-crypto/util': 5.2.0 @@ -9484,10 +9559,6 @@ snapshots: '@types/ms@0.7.34': {} - '@types/node-forge@1.3.11': - dependencies: - '@types/node': 22.2.0 - '@types/node@12.20.55': {} '@types/node@20.17.6': @@ -9954,7 +10025,7 @@ snapshots: capnp-ts@0.7.0: dependencies: debug: 4.3.6 - tslib: 2.6.3 + tslib: 2.8.1 transitivePeerDependencies: - supports-color @@ -10003,10 +10074,6 @@ snapshots: optionalDependencies: fsevents: 2.3.3 - chokidar@4.0.3: - dependencies: - readdirp: 4.1.1 - ci-info@3.9.0: {} ci-info@4.0.0: {} @@ -10129,8 +10196,6 @@ snapshots: date-fns@3.6.0: {} - date-fns@4.1.0: {} - debug@2.6.9: dependencies: ms: 2.0.0 @@ -11386,8 +11451,6 @@ snapshots: reflect.getprototypeof: 1.0.6 set-function-name: 2.0.2 - itty-time@1.0.6: {} - jackspeak@2.3.6: dependencies: '@isaacs/cliui': 8.0.2 @@ -11744,7 +11807,7 @@ snapshots: min-indent@1.0.1: {} - miniflare@3.20241230.1: + miniflare@3.20241230.2: dependencies: '@cspotcode/source-map-support': 0.8.1 acorn: 8.14.0 @@ -11942,8 +12005,6 @@ snapshots: lower-case: 2.0.2 tslib: 2.6.3 - node-forge@1.3.1: {} - node-releases@2.0.18: {} normalize-package-data@2.5.0: @@ -12192,7 +12253,7 @@ snapshots: postcss-load-config@4.0.2(postcss@8.4.47): dependencies: lilconfig: 3.1.2 - yaml: 2.5.1 + yaml: 2.7.0 optionalDependencies: postcss: 8.4.47 @@ -12348,8 +12409,6 @@ snapshots: dependencies: picomatch: 2.3.1 - readdirp@4.1.1: {} - reflect.getprototypeof@1.0.6: dependencies: call-bind: 1.0.7 @@ -12521,11 +12580,6 @@ snapshots: extend-shallow: 2.0.1 kind-of: 6.0.3 - selfsigned@2.4.1: - dependencies: - '@types/node-forge': 1.3.11 - node-forge: 1.3.1 - semver@5.7.2: {} semver@6.3.1: {} @@ -13077,7 +13131,7 @@ snapshots: undici@6.19.8: {} - unenv-nightly@2.0.0-20241218-183400-5d6aec3: + unenv@2.0.0-rc.0: dependencies: defu: 6.1.4 mlly: 1.7.4 @@ -13293,31 +13347,21 @@ snapshots: '@cloudflare/workerd-linux-arm64': 1.20241230.0 '@cloudflare/workerd-windows-64': 1.20241230.0 - wrangler@3.101.0(@cloudflare/workers-types@4.20250109.0): + wrangler@3.104.0(@cloudflare/workers-types@4.20250109.0): dependencies: - '@aws-sdk/client-s3': 3.726.1 '@cloudflare/kv-asset-handler': 0.3.4 '@esbuild-plugins/node-globals-polyfill': 0.2.3(esbuild@0.17.19) '@esbuild-plugins/node-modules-polyfill': 0.2.2(esbuild@0.17.19) blake3-wasm: 2.1.5 - chokidar: 4.0.3 - date-fns: 4.1.0 esbuild: 0.17.19 - itty-time: 1.0.6 - miniflare: 3.20241230.1 - nanoid: 3.3.7 + miniflare: 3.20241230.2 path-to-regexp: 6.3.0 - resolve: 1.22.8 - selfsigned: 2.4.1 - source-map: 0.6.1 - unenv: unenv-nightly@2.0.0-20241218-183400-5d6aec3 + unenv: 2.0.0-rc.0 workerd: 1.20241230.0 - xxhash-wasm: 1.1.0 optionalDependencies: '@cloudflare/workers-types': 4.20250109.0 fsevents: 2.3.3 transitivePeerDependencies: - - aws-crt - bufferutil - supports-color - utf-8-validate @@ -13338,11 +13382,9 @@ snapshots: ws@8.18.0: {} - xxhash-wasm@1.1.0: {} - yallist@2.1.2: {} - yaml@2.5.1: {} + yaml@2.7.0: {} yocto-queue@0.1.0: {} diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 46b43eb2..b406d915 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -33,7 +33,7 @@ catalog: typescript-eslint: ^8.7.0 typescript: ^5.7.3 vitest: ^2.1.1 - wrangler: ^3.101.0 + wrangler: ^3.103.0 # e2e tests catalogs: