-
Notifications
You must be signed in to change notification settings - Fork 790
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Normalize some dependencies in workers-sdk #6029
Conversation
🦋 Changeset detectedLatest commit: f42e8db The changes in this PR will be included in the next version bump. This PR includes changesets to release 9 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
@@ -4,7 +4,6 @@ import esbuild from "esbuild"; | |||
import { getPackage, pkgRoot } from "./common.mjs"; | |||
|
|||
const argv = process.argv.slice(2); | |||
const watch = argv[0] === "watch"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this also removes watch mode for miniflare builds (we'll bring that back later)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
later .... 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is used here:
"dev": "concurrently -n esbuild,typechk,typewrk -c yellow,blue,blue.dim \"node scripts/build.mjs watch\" \"node scripts/types.mjs tsconfig.json watch\" \"node scripts/types.mjs src/workers/tsconfig.json watch\"", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tracking at #6042
A wrangler prerelease is available for testing. You can install this latest build in your project with: npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/9518851671/npm-package-wrangler-6029 You can reference the automatically updated head of this PR with: npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/prs/6029/npm-package-wrangler-6029 Or you can use npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/9518851671/npm-package-wrangler-6029 dev path/to/script.js Additional artifacts:npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/9518851671/npm-package-create-cloudflare-6029 --no-auto-update npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/9518851671/npm-package-cloudflare-kv-asset-handler-6029 npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/9518851671/npm-package-miniflare-6029 npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/9518851671/npm-package-cloudflare-pages-shared-6029 npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/9518851671/npm-package-cloudflare-vitest-pool-workers-6029 Note that these links will no longer work once the GitHub Actions artifact expires.
Please ensure constraints are pinned, and |
08aaaf8
to
8c1c5a3
Compare
This is the first of a few expected patches that normalize dependency versions, This normalizes `undici`, `concurrently`, `@types/node`, `react`, `react-dom`, `@types/react`, `@types/react-dom`, `eslint`, `typescript`. There are no functional code changes (but there are a couple of typecheck fixes).
8c1c5a3
to
f42e8db
Compare
@@ -4,7 +4,6 @@ import esbuild from "esbuild"; | |||
import { getPackage, pkgRoot } from "./common.mjs"; | |||
|
|||
const argv = process.argv.slice(2); | |||
const watch = argv[0] === "watch"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is used here:
"dev": "concurrently -n esbuild,typechk,typewrk -c yellow,blue,blue.dim \"node scripts/build.mjs watch\" \"node scripts/types.mjs tsconfig.json watch\" \"node scripts/types.mjs src/workers/tsconfig.json watch\"", |
@@ -4,7 +4,6 @@ import esbuild from "esbuild"; | |||
import { getPackage, pkgRoot } from "./common.mjs"; | |||
|
|||
const argv = process.argv.slice(2); | |||
const watch = argv[0] === "watch"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tracking at #6042
"react": "^18.2.0", | ||
"react-dom": "^18.2.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we have any tests of this template.
Is it definitely going to work with a big major bump like this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tested, works fine
Congratulations @threepointone, you just earned a holobyte! Here it is: https://holopin.io/holobyte/clxezu6jr09100clesvjm6mzx This badge can only be claimed by you, so make sure that your GitHub account is linked to your Holopin account. You can manage those preferences here: https://holopin.io/account. |
Follow up to #6029, this normalizes some more dependencies : `get-port`, `chalk`, `yargs`, `toucan-js`, `@typescript-eslint/parser`, `@typescript-eslint/eslint-plugin`, `esbuild-register`, `hono`, `glob-to-regexp`
Follow up to #6029, this normalizes some more dependencies : `get-port`, `chalk`, `yargs`, `toucan-js`, `@typescript-eslint/parser`, `@typescript-eslint/eslint-plugin`, `esbuild-register`, `hono`, `glob-to-regexp`
Follow up toi #6029, this normalizes some more dependencies : `get-port`, `chalk`, `yargs`, `toucan-js`, `@typescript-eslint/parser`, `@typescript-eslint/eslint-plugin`, `esbuild-register`, `hono`, `glob-to-regexp, `@cloudflare/workers-types``
Follow up toi #6029, this normalizes some more dependencies : `get-port`, `chalk`, `yargs`, `toucan-js`, `@typescript-eslint/parser`, `@typescript-eslint/eslint-plugin`, `esbuild-register`, `hono`, `glob-to-regexp, `@cloudflare/workers-types``
Follow up toi #6029, this normalizes some more dependencies : `get-port`, `chalk`, `yargs`, `toucan-js`, `@typescript-eslint/parser`, `@typescript-eslint/eslint-plugin`, `esbuild-register`, `hono`, `glob-to-regexp, `@cloudflare/workers-types``
runing `pnpm dev` used to start a watch mode, but I removed that in #6029 because the esbuild watch api was changed. This patch brings it back with the new api.
@@ -455,6 +455,7 @@ describe.concurrent(`E2E: Web frameworks`, () => { | |||
await verifyBuildScript(framework, projectPath, logStream); | |||
await storeDiff(framework, projectPath); | |||
} catch (e) { | |||
console.error("ERROR", e); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@threepointone was this meant to be console.error
or logger.error
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can't be logger.error
because that is only used inside Wrangler, right?
Or is there also an e2e test logger?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh, totally missed this was in create-cloudflare
. Is the log relevant here then? I see we're asserting on the fail message...not sure if that needs to be logged for that assertion to pass
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added it while debugging, but it's not a bad idea to keep it here, because otherwise you have to see logs, which are hard to do in CI (unless I'm mistaken?)
[](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [wrangler](https://togithub.com/cloudflare/workers-sdk) ([source](https://togithub.com/cloudflare/workers-sdk/tree/HEAD/packages/wrangler)) | [`3.60.3` -> `3.61.0`](https://renovatebot.com/diffs/npm/wrangler/3.60.3/3.61.0) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>cloudflare/workers-sdk (wrangler)</summary> ### [`v3.61.0`](https://togithub.com/cloudflare/workers-sdk/blob/HEAD/packages/wrangler/CHANGELOG.md#3610) ##### Minor Changes - [#​5995](https://togithub.com/cloudflare/workers-sdk/pull/5995) [`374bc44`](https://togithub.com/cloudflare/workers-sdk/commit/374bc44cce65e2f83f10452122719d3ab28827b3) Thanks [@​petebacondarwin](https://togithub.com/petebacondarwin)! - feat: allow Durable Object migrations to be overridable in environments By making the `migrations` key inheritable, users can provide different migrations for each wrangler.toml environment. Resolves [#​729](https://togithub.com/cloudflare/workers-sdk/issues/729) ##### Patch Changes - [#​6039](https://togithub.com/cloudflare/workers-sdk/pull/6039) [`dc597a3`](https://togithub.com/cloudflare/workers-sdk/commit/dc597a38218b428141c55c4e65633953c87ed180) Thanks [@​petebacondarwin](https://togithub.com/petebacondarwin)! - fix: hybrid nodejs compat now supports requiring the default export of a CJS module Fixes [#​6028](https://togithub.com/cloudflare/workers-sdk/issues/6028) - [#​6051](https://togithub.com/cloudflare/workers-sdk/pull/6051) [`15aff8f`](https://togithub.com/cloudflare/workers-sdk/commit/15aff8f6e6ce533f25495193e702a6bec76fa81c) Thanks [@​threepointone](https://togithub.com/threepointone)! - fix: Don't check expiry dates on custom certs Fixes [https://github.com/cloudflare/workers-sdk/issues/5964](https://togithub.com/cloudflare/workers-sdk/issues/5964) For `wrangler dev`, we don't have to check whether certificates have expired when they're provided by the user. - [#​6052](https://togithub.com/cloudflare/workers-sdk/pull/6052) [`b4c0233`](https://togithub.com/cloudflare/workers-sdk/commit/b4c02333829c2312f883e897f812f9877dba603a) Thanks [@​threepointone](https://togithub.com/threepointone)! - chore: Add `.wrangler` and `.DS_Store` to `.gitignore` generated by `wrangler init` This commit adds a small QOL improvement to `init` (to be deprecated in the future), for those who still use this wrangler command. - [#​6050](https://togithub.com/cloudflare/workers-sdk/pull/6050) [`a0c3327`](https://togithub.com/cloudflare/workers-sdk/commit/a0c3327dd63059d3e24085a95f48f8a98605c49f) Thanks [@​threepointone](https://togithub.com/threepointone)! - chore: Normalize more deps This is the last of the patches that normalize dependencies across the codebase. In this batch: `ws`, `vitest`, `zod` , `rimraf`, `@types/rimraf`, `ava`, `source-map`, `glob`, `cookie`, `@types/cookie`, `@microsoft/api-extractor`, `@types/mime`, `@types/yargs`, `devtools-protocol`, `@vitest/ui`, `execa`, `strip-ansi` This patch also sorts dependencies in every `package.json` - [#​6029](https://togithub.com/cloudflare/workers-sdk/pull/6029) [`f5ad1d3`](https://togithub.com/cloudflare/workers-sdk/commit/f5ad1d3e562ce63b59f6ab136f1cdd703605bca4) Thanks [@​threepointone](https://togithub.com/threepointone)! - chore: Normalize some dependencies in workers-sdk This is the first of a few expected patches that normalize dependency versions, This normalizes `undici`, `concurrently`, `@types/node`, `react`, `react-dom`, `@types/react`, `@types/react-dom`, `eslint`, `typescript`. There are no functional code changes (but there are a couple of typecheck fixes). - [#​6046](https://togithub.com/cloudflare/workers-sdk/pull/6046) [`c643a81`](https://togithub.com/cloudflare/workers-sdk/commit/c643a8193a3c0739b33d3c0072ae716bc8f1565b) Thanks [@​threepointone](https://togithub.com/threepointone)! - chore: Normalize more dependencies. Follow up to [https://github.com/cloudflare/workers-sdk/pull/6029](https://togithub.com/cloudflare/workers-sdk/pull/6029), this normalizes some more dependencies : `get-port`, `chalk`, `yargs`, `toucan-js`, `@typescript-eslint/parser`, `@typescript-eslint/eslint-plugin`, `esbuild-register`, `hono`, `glob-to-regexp`, `@cloudflare/workers-types` - [#​6058](https://togithub.com/cloudflare/workers-sdk/pull/6058) [`31cd51f`](https://togithub.com/cloudflare/workers-sdk/commit/31cd51f251050b0d6db97857a8d1d5427c855d99) Thanks [@​threepointone](https://togithub.com/threepointone)! - chore: Quieter builds This patch cleans up warnings we were seeing when doing a full build. Specifically: - fixtures/remix-pages-app had a bunch of warnings about impending features that it should be upgraded to, so I did that. (tbh this one needs a full upgrade of packages, but we'll get to that later when we're upgrading across the codebase) - updated `@microsoft/api-extractor` so it didn't complain that it didn't match the `typescript` version (that we'd recently upgraded) - it also silenced a bunch of warnings when exporting types from `wrangler`. We'll need to fix those, but we'll do that when we work on unstable_dev etc. - workers-playground was complaining about the size of the bundle being generated, so I increased the limit on it - [#​6043](https://togithub.com/cloudflare/workers-sdk/pull/6043) [`db66101`](https://togithub.com/cloudflare/workers-sdk/commit/db661015d37ce75c021413e3ca7c4f0488790cbc) Thanks [@​threepointone](https://togithub.com/threepointone)! - fix: avoid esbuild warning when running dev/bundle I've been experimenting with esbuild 0.21.4 with wrangler. It's mostly been fine. But I get this warning every time ▲ [WARNING] Import "__INJECT_FOR_TESTING_WRANGLER_MIDDLEWARE__" will always be undefined because there is no matching export in "src/index.ts" [import-is-undefined] .wrangler/tmp/bundle-Z3YXTd/middleware-insertion-facade.js:8:23: 8 │ .....(OTHER_EXPORTS.__INJECT_FOR_TESTING_WRANGLER_MIDDLEWARE__ ?? []), ╵ This is because [email protected] enabled a warning by default whenever an undefined import is accessed on an imports object. However we abuse imports to inject stuff in `middleware.test.ts`. A simple fix is to only inject that code in tests. - [#​6062](https://togithub.com/cloudflare/workers-sdk/pull/6062) [`267761b`](https://togithub.com/cloudflare/workers-sdk/commit/267761b3f5a60e9ea72067d42302895f9d459460) Thanks [@​WalshyDev](https://togithub.com/WalshyDev)! - fix: typo in `wrangler d1 execute` saying "Databas" instead of "Database" - [#​6064](https://togithub.com/cloudflare/workers-sdk/pull/6064) [`84e6aeb`](https://togithub.com/cloudflare/workers-sdk/commit/84e6aeb189a4f385c49b7c6d451d0613186b29be) Thanks [@​helloimalastair](https://togithub.com/helloimalastair)! - fix: Wrangler is now able to upload files to local R2 buckets above the 300 MiB limit - Updated dependencies \[[`a0c3327`](https://togithub.com/cloudflare/workers-sdk/commit/a0c3327dd63059d3e24085a95f48f8a98605c49f), [`f5ad1d3`](https://togithub.com/cloudflare/workers-sdk/commit/f5ad1d3e562ce63b59f6ab136f1cdd703605bca4), [`31cd51f`](https://togithub.com/cloudflare/workers-sdk/commit/31cd51f251050b0d6db97857a8d1d5427c855d99)]: - [email protected] - [@​cloudflare/kv-asset-handler](https://togithub.com/cloudflare/kv-asset-handler)[@​0](https://togithub.com/0).3.3 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/Johannes-Andersen/Johannes). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40MTAuMSIsInVwZGF0ZWRJblZlciI6IjM3LjQxMC4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJ0eXBlL2RlcGVuZGVuY2llcyJdfQ==--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
This is the first of a few expected patches that normalize dependency versions, This normalizes
undici
,concurrently
,@types/node
,react
,react-dom
,@types/react
,@types/react-dom
,eslint
,typescript
. There are no functional code changes (but there are a couple of typecheck fixes).Let's see what CI says.