workers-sdk icon indicating copy to clipboard operation
workers-sdk copied to clipboard

fix: check for nonempty kv id and r2 bucket_name

Open arjunyel opened this issue 1 year ago • 1 comments

Close #1660

In packages/wrangler/src/config/validation.ts I originally tried to get isRequiredProperty to type narrow object. This may be impossible https://github.com/microsoft/TypeScript/issues/31755#issuecomment-498669080 so I casted it manually.

arjunyel avatar Aug 12 '22 03:08 arjunyel

🦋 Changeset detected

Latest commit: 3ba50bc7c884246766d114f9070a04a402b44fda

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

changeset-bot[bot] avatar Aug 12 '22 03:08 changeset-bot[bot]

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/2879344956/npm-package-wrangler-1667

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

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

Or you can use npx with this latest build directly:

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

github-actions[bot] avatar Aug 15 '22 16:08 github-actions[bot]

Sorry, not sure why my VS Code didn't run Prettier, fixed

arjunyel avatar Aug 15 '22 16:08 arjunyel

Codecov Report

Merging #1667 (3ba50bc) into main (af669a1) will decrease coverage by 0.43%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1667      +/-   ##
==========================================
- Coverage   81.37%   80.94%   -0.44%     
==========================================
  Files          90       90              
  Lines        5955     6071     +116     
  Branches     1527     1560      +33     
==========================================
+ Hits         4846     4914      +68     
- Misses       1109     1157      +48     
Impacted Files Coverage Δ
packages/wrangler/src/config/validation-helpers.ts 97.97% <ø> (ø)
packages/wrangler/src/config/validation.ts 91.57% <100.00%> (+0.06%) :arrow_up:
packages/wrangler/src/pages/publish.tsx 43.79% <0.00%> (-2.69%) :arrow_down:
packages/wrangler/src/cfetch/internal.ts 7.69% <0.00%> (-1.77%) :arrow_down:
packages/wrangler/src/pages/dev.tsx 21.97% <0.00%> (-0.92%) :arrow_down:
...ages/wrangler/src/__tests__/helpers/mock-cfetch.ts 95.00% <0.00%> (-0.72%) :arrow_down:
packages/wrangler/src/api/dev.ts 15.38% <0.00%> (ø)
packages/wrangler/src/config-cache.ts 100.00% <0.00%> (ø)
packages/wrangler/src/pages/constants.ts 100.00% <0.00%> (ø)
...angler/src/pages/functions/routes-consolidation.ts 100.00% <0.00%> (ø)
... and 6 more

codecov[bot] avatar Aug 15 '22 17:08 codecov[bot]

This is missing a changeset by the way (run npx changeset in your terminal to create one)

Skye-31 avatar Aug 15 '22 17:08 Skye-31

Hello I can generate a changeset tonight, just curious what changes need one? The API always rejected empty strings so this didn't seem like a change a user would notice. Thank you!

arjunyel avatar Aug 16 '22 14:08 arjunyel

Looks good to me. Thank you for the PR!

threepointone avatar Aug 22 '22 12:08 threepointone