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

fix: KV not setting correctly #964

Merged
merged 1 commit into from
May 11, 2022
Merged

fix: KV not setting correctly #964

merged 1 commit into from
May 11, 2022

Conversation

JacobMGEvans
Copy link
Contributor

The KV has URL inputs, which in the case of / would get collapsed and lost. To handle special characters encodeURIComponent is implemented.

resolves #961

The KV has URL inputs, which in the case of `/` would get collapsed and lost. To handle special characters `encodeURIComponent` is implemented.

resolves #961
@changeset-bot
Copy link

changeset-bot bot commented May 11, 2022

🦋 Changeset detected

Latest commit: e719993

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

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/2308072889/npm-package-wrangler-964

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

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

Or you can use npx with this latest build directly:

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

@JacobMGEvans JacobMGEvans merged commit 0dfd95f into main May 11, 2022
@JacobMGEvans JacobMGEvans deleted the kv-url-encoding branch May 11, 2022 16:02
@github-actions github-actions bot mentioned this pull request May 11, 2022

fix: KV not setting correctly
The KV has URL inputs, which in the case of `/` would get collapsed and lost.
T:o handle special characters `encodeURIComponent` is implemented.
Copy link
Contributor

Choose a reason for hiding this comment

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

Oops!

threepointone added a commit that referenced this pull request May 13, 2022
… a namespace

This cleans up some logic from #964.

- we shouldn't be encoding the id when deleting a namespace, since that'll already be an alphanumeric id
- we should be encoding the key when we call kv:key get, or we get a similar issue as in #961
threepointone added a commit that referenced this pull request May 13, 2022
… a namespace

This cleans up some logic from #964.

- we shouldn't be encoding the id when deleting a namespace, since that'll already be an alphanumeric id
- we should be encoding the key when we call kv:key get, or we get a similar issue as in #961
- adds `KV` to all the KV-related function names
- moves the api calls to `kv:namespace delete` and `kv:key delete` inside `kv.ts` helpers.
threepointone added a commit that referenced this pull request May 13, 2022
… a namespace (#987)

This cleans up some logic from #964.

- we shouldn't be encoding the id when deleting a namespace, since that'll already be an alphanumeric id
- we should be encoding the key when we call kv:key get, or we get a similar issue as in #961
- adds `KV` to all the KV-related function names
- moves the api calls to `kv:namespace delete` and `kv:key delete` inside `kv.ts` helpers.
@github-actions github-actions bot mentioned this pull request May 13, 2022
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.

🐛 BUG: KV keys that begin with slash aren't setting correctly
3 participants