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

feat: --local mode only applies in wrangler dev #537

Merged
merged 1 commit into from
Mar 7, 2022

Conversation

threepointone
Copy link
Contributor

We'd originally planned for --local mode to be a thing across all wrangler commands. In hindsight, that didn't make much sense, since every command other than wrangler dev assumes some interaction with cloudflare and their API. The only command other than dev where this "worked" was kv, but even that didn't make sense because wrangler dev wouldn't even read from it. We also have --experimental-enable-local-persistence there anyway.

So this moves the --local flag to only apply for wrangler dev and removes any trace from other commands.

@changeset-bot
Copy link

changeset-bot bot commented Mar 3, 2022

🦋 Changeset detected

Latest commit: 386adfb

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

This PR includes changesets to release 1 package
Name Type
wrangler 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

@github-actions
Copy link
Contributor

github-actions bot commented Mar 3, 2022

A wrangler prerelease is available for testing. You can install this latest build in your project with:

npm install --save-dev https://prerelease-registry.developers.workers.dev/runs/1938173074/npm-package-wrangler-537

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

npm install --save-dev https://prerelease-registry.developers.workers.dev/prs/537/npm-package-wrangler-537

Or you can use npx with this latest build directly:

npx https://prerelease-registry.developers.workers.dev/runs/1938173074/npm-package-wrangler-537 dev path/to/script.js

threepointone added a commit that referenced this pull request Mar 4, 2022
There was a common chunk of code across most commands that ensures a user is logged in, and retrieves an account ID. I'd resisted making this into an abstraction for a while. Now that the codebase is stable, and #537 removes some surrounding code there, I made an abstraction for this common code as `requireAuth()`. This gets a mention in the changelog simply because it touches a bunch of code, although it's mostly mechanical deletion/replacement.
We'd originally planned for `--local` mode to be a thing across all wrangler commands. In hindsight, that didn't make much sense, since every command other than `wrangler dev` assumes some interaction with cloudflare and their API. The only command other than dev where this "worked" was `kv`, but even that didn't make sense because wrangler dev wouldn't even read from it. We also have `--experimental-enable-local-persistence` there anyway.

So this moves the `--local` flag to only apply for `wrangler dev` and removes any trace from other commands.
Copy link
Contributor

@petebacondarwin petebacondarwin left a comment

Choose a reason for hiding this comment

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

LGTM!

@petebacondarwin petebacondarwin merged commit b978db4 into main Mar 7, 2022
@petebacondarwin petebacondarwin deleted the local-mode-in-dev-only branch March 7, 2022 13:20
@github-actions github-actions bot mentioned this pull request Mar 7, 2022
petebacondarwin pushed a commit that referenced this pull request Mar 7, 2022
There was a common chunk of code across most commands that ensures a user is logged in, and retrieves an account ID. I'd resisted making this into an abstraction for a while. Now that the codebase is stable, and #537 removes some surrounding code there, I made an abstraction for this common code as `requireAuth()`. This gets a mention in the changelog simply because it touches a bunch of code, although it's mostly mechanical deletion/replacement.
threepointone added a commit that referenced this pull request Mar 7, 2022
There was a common chunk of code across most commands that ensures a user is logged in, and retrieves an account ID. I'd resisted making this into an abstraction for a while. Now that the codebase is stable, and #537 removes some surrounding code there, I made an abstraction for this common code as `requireAuth()`. This gets a mention in the changelog simply because it touches a bunch of code, although it's mostly mechanical deletion/replacement.
petebacondarwin pushed a commit that referenced this pull request Mar 7, 2022
There was a common chunk of code across most commands that ensures a user is logged in, and retrieves an account ID. I'd resisted making this into an abstraction for a while. Now that the codebase is stable, and #537 removes some surrounding code there, I made an abstraction for this common code as `requireAuth()`. This gets a mention in the changelog simply because it touches a bunch of code, although it's mostly mechanical deletion/replacement.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants