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

docs: remove warning about packageManager and pnpm default #245

Merged
merged 4 commits into from
Mar 26, 2024
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 17 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ jobs:
- name: Deploy
uses: cloudflare/wrangler-action@v3
with:
packageManager: pnpm # you can omit this if you use npm
Copy link
Contributor

@IgorMinar IgorMinar Mar 26, 2024

Choose a reason for hiding this comment

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

+1, we should shouldn't be forcing this on devs

Copy link
Contributor Author

Choose a reason for hiding this comment

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

typo, and I assume you mean "shouldn't"? If so, agreed!

Copy link
Contributor

Choose a reason for hiding this comment

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

oops.. yup. shouldn't

apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
```

Expand All @@ -53,10 +52,6 @@ jobs:

## Configuration

### packageManager

⚠️ you must specify package manager. If not specified GH action assumes you are using npm and other managers might be failing. For example pnpm will fail with: `Cannot read properties of null (reading 'matches')`
Copy link
Contributor

Choose a reason for hiding this comment

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

I agree that we should drop this paragraph, but we should completely undocument the packageManager option. Instead of dropping this paragraph, could you please replace it with an a short blurb about packageManager option and how to use it (following the style for other options below). thanks

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The original intent here was mainly to just revert #242, but I've added a short blurb about packageManager under the "advanced usage" section since I figure most people won't ever need to touch this.

Copy link
Contributor

Choose a reason for hiding this comment

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

Thank you, James!


If you need to install a specific version of Wrangler to use for deployment, you can also pass the input `wranglerVersion` to install a specific version of Wrangler from NPM. This should be a [SemVer](https://semver.org/)-style version number, such as `2.20.0`:

```yaml
Expand Down Expand Up @@ -273,6 +268,23 @@ The resulting output will look something like this:
https://<your_pages_site>.pages.dev
```

### Using a different package manager

By default, this action will detect which package manager to use, based on the presence of a `package-lock.json`, `yarn.lock`, `pnpm-lock.yaml`, or `bun.lockb` file.
IgorMinar marked this conversation as resolved.
Show resolved Hide resolved

If you need to use a specific package manager for your application, you can set the `packageManager` input to `npm`, `yarn`, `pnpm`, or `bun`. You don't need to set this option unless you want to override the default behavior.

IgorMinar marked this conversation as resolved.
Show resolved Hide resolved

```yaml
jobs:
deploy:
steps:
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
packageManager: pnpm
```

## Troubleshooting

### "I just started using Workers/Wrangler and I don't know what this is!"
Expand Down
Loading