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

chore: refactor wrangler login/logout/whoami to use defineCommand #7150

Merged
merged 7 commits into from
Nov 5, 2024

Conversation

emily-shen
Copy link
Contributor

@emily-shen emily-shen commented Nov 1, 2024

Fixes #N/A
Landing #6655 in smaller chunks. This one does wrangler login/logout/whoami . There should be no functionality change.


  • Tests
    • TODO (before merge)
    • Tests included
    • Tests not necessary because: no behaviour change, just needs to pass existing
  • E2E Tests CI Job required? (Use "e2e" label or ask maintainer to run separately)
    • I don't know
    • Required
    • Not required because: no behaviour change, just needs to pass existing
  • Public documentation
    • TODO (before merge)
    • Cloudflare docs PR(s):
    • Documentation not necessary because: internal refactor

@emily-shen emily-shen requested a review from a team as a code owner November 1, 2024 13:12
Copy link

changeset-bot bot commented Nov 1, 2024

🦋 Changeset detected

Latest commit: ec6d4cd

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
wrangler Patch
@cloudflare/vitest-pool-workers Patch

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

Copy link
Contributor

github-actions bot commented Nov 1, 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/11670128969/npm-package-wrangler-7150

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

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

Or you can use npx with this latest build directly:

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

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


[email protected] includes the following runtime dependencies:

Package Constraint Resolved
miniflare workspace:* 3.20241022.0
workerd 1.20241022.0 1.20241022.0
workerd --version 1.20241022.0 2024-10-22

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

@emily-shen emily-shen changed the title chore: refactor wrangler login/logout/whoami to use defineCommand chore: refactor wrangler login/logout/whoami/types to use defineCommand Nov 1, 2024
@emily-shen emily-shen changed the title chore: refactor wrangler login/logout/whoami/types to use defineCommand chore: refactor wrangler login/logout/whoami to use defineCommand Nov 1, 2024
Copy link
Contributor

@penalosa penalosa left a comment

Choose a reason for hiding this comment

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

Couple small things, but otherwise ✅

packages/wrangler/src/index.ts Outdated Show resolved Hide resolved
packages/wrangler/src/user/commands.ts Outdated Show resolved Hide resolved
packages/wrangler/src/user/commands.ts Outdated Show resolved Hide resolved
packages/wrangler/src/user/commands.ts Outdated Show resolved Hide resolved
packages/wrangler/src/user/commands.ts Outdated Show resolved Hide resolved
Comment on lines +105 to +109
/**
* By default, wrangler will print warnings about wrangler.toml configuration.
* Set this value to `false` to skip printing these warnings.
*/
printConfigWarnings?: boolean;
Copy link
Member

Choose a reason for hiding this comment

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

I was rebasing the changes on #6756 over to this PR and notice the same changes doesn't work here. The reason was that defineCommand will read the config for you and there was no way to disable the warning. You can find the full changes that enable this option in ec6d4cd

cc: @penalosa @emily-shen

@edmundhung edmundhung merged commit 6380d86 into main Nov 5, 2024
20 checks passed
@edmundhung edmundhung deleted the emily/begin-command-refactor branch November 5, 2024 13:03
@workers-devprod workers-devprod mentioned this pull request Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants