Skip to content
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

Node 18 #5820

Merged
merged 9 commits into from
May 15, 2024
Merged

Node 18 #5820

merged 9 commits into from
May 15, 2024

Conversation

petebacondarwin
Copy link
Contributor

@petebacondarwin petebacondarwin commented May 14, 2024

What this PR solves / how to test

Updates the monorepo to support node 18.

Author has addressed the following

  • Tests
    • TODO (before merge)
    • Included
    • Not necessary because:
  • E2E Tests CI Job required? (Use "e2e" label or ask maintainer to run separately)
    • I don't know
    • Required / Maybe required
    • Not required because:
  • Changeset (Changeset guidelines)
    • TODO (before merge)
    • Included
    • Not necessary because: internal changes
  • Public documentation

Copy link

changeset-bot bot commented May 14, 2024

⚠️ No Changeset found

Latest commit: 613c951

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Contributor

github-actions bot commented May 14, 2024

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/9094843173/npm-package-wrangler-5820

You can reference the automatically updated head of this PR with:

npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/prs/5820/npm-package-wrangler-5820

Or you can use npx with this latest build directly:

npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/9094843173/npm-package-wrangler-5820 dev path/to/script.js
Additional artifacts:
npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/9094843173/npm-package-create-cloudflare-5820 --no-auto-update
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/9094843173/npm-package-cloudflare-kv-asset-handler-5820
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/9094843173/npm-package-miniflare-5820
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/9094843173/npm-package-cloudflare-pages-shared-5820
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/9094843173/npm-package-cloudflare-vitest-pool-workers-5820

Note that these links will no longer work once the GitHub Actions artifact expires.


wrangler@3.56.0 includes the following runtime dependencies:

Package Constraint Resolved
miniflare workspace:* 3.20240512.0
workerd 1.20240512.0 1.20240512.0
workerd --version 1.20240512.0 2024-05-12

Please ensure constraints are pinned, and miniflare/workerd minor versions match.

@petebacondarwin petebacondarwin added the e2e Run e2e tests on a PR label May 14, 2024
@petebacondarwin petebacondarwin marked this pull request as ready for review May 14, 2024 14:25
@petebacondarwin petebacondarwin requested review from a team as code owners May 14, 2024 14:25
uses: actions/setup-node@v3
with:
node-version: 16.18
node-version: 18.20.2
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we pin this to latest v18.x.x rather than the specific v18.20.2?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not keen on doing that because that means that running a build at two different times might have different results. I am also not worried about keeping on the leading edge given that we have spent the last year stuck on v16 😄

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the pnpm PR that will follow this, I move all the dependency installations into a single common action so we only have to change the version in one place.

@@ -1,6 +1,7 @@
import { rest } from "msw";
import { hasMorePages } from "../cfetch";
import { mockAccountId, mockApiToken } from "./helpers/mock-account-id";
import { mockConsoleMethods } from "./helpers/mock-console";
import { createFetchResult, msw } from "./helpers/msw";
import { runInTempDir } from "./helpers/run-in-tmp";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The cleanup for this util is failing on windows again (resource lock) – I thought we solved that? (maybe by just wrapping in try..catch but that seemed fine)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've rerun the job anyway in case it was just a flake

The tests change files within the src directory, which was causing cache misses every time on builds
…issue

When `wrangler dev` is run with `--port=0` workerd can get messed up on Node 18+
because it starts listening to both 127.0.0.1 and ::1 addresses with different dynamically
assigned ports. The workaround is to always specify the IP address when setting port to 0.
@petebacondarwin petebacondarwin merged commit d0fd494 into main May 15, 2024
21 checks passed
@petebacondarwin petebacondarwin deleted the node-18 branch May 15, 2024 12:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
e2e Run e2e tests on a PR
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

2 participants