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

Further key-value tests and refactorings #189

Merged
merged 2 commits into from
Jan 7, 2022

Conversation

petebacondarwin
Copy link
Contributor

@petebacondarwin petebacondarwin commented Jan 4, 2022

See the individual commits for the details.

The refactoring of the cfetch stuff makes it possible to handle "cursors" for when lists come back in chunks.

Note that in order to use the module mocking (i.e. mock('../cfetch/internal')) I created an "internal" module that gets mocked. The actual API that downstream callers access is just ../cfetch - but these then wrap the internal one with extra behaviour.

Note also that it is not allowed to have any TS type annotations in files that contain the string ock(!! This is because the esbuild-jest plugin runs a Babel transform of files that contain that string, and it cannot handle TS annotations.

@changeset-bot
Copy link

changeset-bot bot commented Jan 4, 2022

🦋 Changeset detected

Latest commit: 5ad907c

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

@@ -116,5 +120,18 @@
"setupFilesAfterEnv": [
"<rootDir>/src/__tests__/jest.setup.ts"
]
},
Copy link
Contributor

Choose a reason for hiding this comment

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

this doesn't seem right, that's why we have esbuild-jest, to strip the types.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Because of this: aelbore/esbuild-jest#57

@petebacondarwin petebacondarwin force-pushed the kv-tests-3 branch 6 times, most recently from d04a03c to 9cd63e6 Compare January 5, 2022 14:12
@JacobMGEvans
Copy link
Contributor

Looking good to me. Read through both commits. I also noticed some improvements to naming conventions which is a nice ergonomic change too.

@threepointone
Copy link
Contributor

sorry for the delay on reviewing this, promise I'll do so tomorrow

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.

This all looks pretty reasonable. RIP cfetch :(

@petebacondarwin
Copy link
Contributor Author

This all looks pretty reasonable. RIP cfetch :(

Well you can rename it back to cfetch if you like 😸

@petebacondarwin petebacondarwin merged commit 2f7e1b2 into cloudflare:main Jan 7, 2022
@petebacondarwin petebacondarwin deleted the kv-tests-3 branch January 7, 2022 10:44
@github-actions github-actions bot mentioned this pull request Jan 7, 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.

3 participants