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

Better pages path error message issue 5540 #5640

Merged
merged 2 commits into from
Apr 18, 2024

Conversation

petebacondarwin
Copy link
Contributor

@petebacondarwin petebacondarwin commented Apr 17, 2024

What this PR solves / how to test

Fixes #5540.

Author has addressed the following

…mes are invalid.

Param names can only contain alphanumeric and underscore characters. Previously the user would see a confusing error message similar to:

```
 TypeError: Unexpected MODIFIER at 8, expected END
```

Now the user is given an error similar to:

```
Invalid Pages function route parameter - "[hyphen-not-allowed]". Parameter names must only contain alphanumeric and underscore characters.
```

Fixes #5540
@petebacondarwin petebacondarwin requested review from a team as code owners April 17, 2024 14:54
Copy link

changeset-bot bot commented Apr 17, 2024

🦋 Changeset detected

Latest commit: 87ae31d

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

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/8724110771/npm-package-wrangler-5640

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

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

Or you can use npx with this latest build directly:

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

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


wrangler@3.51.0 includes the following runtime dependencies:

Package Constraint Resolved
miniflare workspace:* 3.20240405.2
workerd 1.20240405.0 1.20240405.0
workerd --version 1.20240405.0 2024-04-05

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

@petebacondarwin petebacondarwin merged commit bd2031b into main Apr 18, 2024
15 checks passed
@petebacondarwin petebacondarwin deleted the better-pages-path-error-message-issue-5540 branch April 18, 2024 10:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

🐛 BUG: [wrangler:err] TypeError: Unexpected MODIFIER at 35, expected END
2 participants