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

Add wrangler2 as an alias #40

Merged
merged 1 commit into from
Nov 29, 2021
Merged

Conversation

TehShrike
Copy link
Contributor

@TehShrike TehShrike commented Nov 23, 2021

So that when wrangler2 is installed along @cloudflare/wrangler, they can each be referenced in npm run scripts.

See cloudflare/wrangler-legacy#2139

So that when wrangler2 is installed along @cloudflare/wrangler, they can each be referenced in dev scripts
TehShrike added a commit to TehShrike/wrangler that referenced this pull request Nov 23, 2021
So that when @cloudflare/wrangler is installed along wrangler2, they can each be referenced in npm run scripts.

See cloudflare/workers-sdk#40
@TehShrike
Copy link
Contributor Author

My current workaround is to publish a fork https://www.npmjs.com/package/@tehshrike/wrangler2

@GregBrimble
Copy link
Member

Pretty sure can reference wrangler v1 with npx @cloudflare/wrangler, so you should be able to avoid this conflict already.

@threepointone
Copy link
Contributor

This PR seems unnecessary. You can install wrangler locally to a project and refer to it via npm scripts, or use npx.

Copy link
Contributor

@threepointone threepointone left a comment

Choose a reason for hiding this comment

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

As mentioned

@TehShrike
Copy link
Contributor Author

TehShrike commented Nov 25, 2021

Pretty sure can reference wrangler v1 with npx @cloudflare/wrangler, so you should be able to avoid this conflict already.

Nope, I tried that – npx looks up @cloudflare/wrangler, checks to see what its bin script name is, looks in node_modules/.bin, sees that wrangler exists there, and calls it, even if it points to the script in node_modules/wrangler.

This PR seems unnecessary. You can install wrangler locally to a project and refer to it via npm scripts, or use npx.

There is currently no way to install both wrangler and @cloudflare/wrangler and reliably execute one or the other via npm run scripts.

I was not using any global scripts, I was only using versions of wrangler that were direct dependencies of my project.

@threepointone
Copy link
Contributor

Noted, thanks for the investigation. Lemme think about this, but I'm leaning towards merging this atm.

@threepointone threepointone merged commit c9dc473 into cloudflare:main Nov 29, 2021
threepointone added a commit to cloudflare/wrangler-legacy that referenced this pull request Dec 13, 2021
So that when @cloudflare/wrangler is installed along wrangler2, they can each be referenced in npm run scripts.

See cloudflare/workers-sdk#40

Co-authored-by: Sunil Pai <spai@cloudflare.com>
petebacondarwin pushed a commit to petebacondarwin/wrangler2 that referenced this pull request Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Untriaged
Development

Successfully merging this pull request may close these issues.

3 participants