Skip to content

Conversation

@vicb
Copy link
Contributor

@vicb vicb commented Dec 12, 2025

image

Rationale:

Note that for the Wrangler version check to run in the Vite Plugin before we try to access a potentially missing export from Wrangler, one must now always import stuff from Wrangler using a namespace import. E.g.

import * as wrangler from "wrangler"; ... wrangler.readConfig()

rather than

import { readConfig } from "wrangler"; ... readConfig();

Courtesy of Claude


  • Tests
    • Tests included/updated
    • Tests not necessary because: lint rule
  • Public documentation
    • Cloudflare docs PR(s):
    • Documentation not necessary because: lint rule
  • Wrangler V3 Backport
    • Wrangler PR:
    • Not necessary because: lint rule

A picture of a cute animal (not mandatory, but encouraged)

@vicb vicb requested a review from a team as a code owner December 12, 2025 17:14
@changeset-bot
Copy link

changeset-bot bot commented Dec 12, 2025

⚠️ No Changeset found

Latest commit: 8193df1

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.

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

@github-project-automation github-project-automation bot moved this from Untriaged to Approved in workers-sdk Dec 12, 2025
@vicb vicb requested a review from petebacondarwin December 15, 2025 07:56
await page?.close();
await server?.close();
// @ts-expect-error TODO: fix
await watcher?.close();
Copy link
Contributor Author

Choose a reason for hiding this comment

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

It looks like watcher is never assigned?

Copy link
Contributor

Choose a reason for hiding this comment

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

Let's leave this as it is with the TODO for now so we can follow up in a different PR. Need to look into whether the watcher should be assigned or is just leftover from some other changes.

Copy link
Contributor

Choose a reason for hiding this comment

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

Could it say what needs fixing?

Copy link
Contributor

@jamesopstad jamesopstad left a comment

Choose a reason for hiding this comment

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

Thanks Vic! The new shortcuts playground also needs a few corrections (that was added after you started this).

@ascorbic

This comment was marked as outdated.

vicb and others added 13 commits December 15, 2025 10:36
…hile/src/index.ts Co-authored-by: James Opstad <13586373+jamesopstad@users.noreply.github.com>
…ite.config.ts Co-authored-by: James Opstad <13586373+jamesopstad@users.noreply.github.com>
Co-authored-by: James Opstad <13586373+jamesopstad@users.noreply.github.com>
Co-authored-by: James Opstad <13586373+jamesopstad@users.noreply.github.com>
Co-authored-by: James Opstad <13586373+jamesopstad@users.noreply.github.com>
Co-authored-by: James Opstad <13586373+jamesopstad@users.noreply.github.com>
…p.tsx Co-authored-by: James Opstad <13586373+jamesopstad@users.noreply.github.com>
@ascorbic ascorbic changed the title Add a lint rule for #11265 Add a lint rule to ban named imports from wrangler Dec 15, 2025
@vicb vicb merged commit ba4f4f9 into main Dec 15, 2025
35 checks passed
@vicb vicb deleted the vicb/lint-11265 branch December 15, 2025 16:11
@github-project-automation github-project-automation bot moved this from Approved to Done in workers-sdk Dec 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

4 participants