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

Initial Ink removal #2283

Merged
merged 28 commits into from
Jan 5, 2023
Merged

Initial Ink removal #2283

merged 28 commits into from
Jan 5, 2023

Conversation

penalosa
Copy link
Contributor

@penalosa penalosa commented Nov 23, 2022

This PR begins the process of removing Ink from places where it's not needed. Specifically it:

  • Removes Ink from dialogs.tsx, which is the majority usage
  • Renames files from .tsx to .ts where possible (in a separate commit to ease review)
  • Removes Ink from the whoami command

@changeset-bot
Copy link

changeset-bot bot commented Nov 23, 2022

⚠️ No Changeset found

Latest commit: 02429fe

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@penalosa penalosa requested a review from a team as a code owner November 23, 2022 22:52
@penalosa penalosa changed the title Penalosa/initial ink removal Initial Ink removal Nov 23, 2022
@penalosa penalosa requested a review from a team November 23, 2022 23:11
Copy link
Contributor

@GregBrimble GregBrimble left a comment

Choose a reason for hiding this comment

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

Haven't looked at anything else, but the Pages stuff is fine

Copy link
Contributor

@mrbbot mrbbot left a comment

Choose a reason for hiding this comment

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

Very nice! Glad we're making this change. 👍 I've added a few comments.

packages/wrangler/src/dialogs.ts Outdated Show resolved Hide resolved
packages/wrangler/src/d1/migrations/apply.tsx Show resolved Hide resolved
packages/wrangler/src/dialogs.ts Show resolved Hide resolved
packages/wrangler/src/dialogs.ts Show resolved Hide resolved
packages/wrangler/src/dialogs.ts Outdated Show resolved Hide resolved
packages/wrangler/src/dialogs.ts Outdated Show resolved Hide resolved
packages/wrangler/src/ui.ts Outdated Show resolved Hide resolved
packages/wrangler/src/user/user.ts Outdated Show resolved Hide resolved
packages/wrangler/src/ui.ts Outdated Show resolved Hide resolved
@penalosa penalosa requested a review from mrbbot November 24, 2022 17:25
Copy link
Contributor

@mrbbot mrbbot left a comment

Choose a reason for hiding this comment

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

Awesome! One tiny comment, then LGTM! 🎉

packages/wrangler/src/dialogs.ts Show resolved Hide resolved
@penalosa penalosa self-assigned this Nov 28, 2022
@penalosa
Copy link
Contributor Author

@rozenmd It would be great to get a review from a D1 perspective, if possible!

@penalosa penalosa added the blocked Blocked on other work label Nov 28, 2022
@penalosa
Copy link
Contributor Author

@JacobMGEvans did you have any comments?

@JacobMGEvans
Copy link
Contributor

@JacobMGEvans did you have any comments?

Nope.

@rozenmd
Copy link
Contributor

rozenmd commented Nov 28, 2022

Mind fixing the merge conflicts? I'll give the preview build a test drive tomorrow morning

@penalosa penalosa force-pushed the penalosa/initial-ink-removal branch from 854f515 to 97edf02 Compare November 29, 2022 14:14
@github-actions
Copy link
Contributor

github-actions bot commented Nov 29, 2022

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/runs/3847740985/npm-package-wrangler-2283

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

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

Or you can use npx with this latest build directly:

npx https://prerelease-registry.devprod.cloudflare.dev/runs/3847740985/npm-package-wrangler-2283 dev path/to/script.js
Additional artifacts:
npm install https://prerelease-registry.devprod.cloudflare.dev/runs/3847740985/npm-package-cloudflare-pages-shared-2283

Copy link
Contributor

@rozenmd rozenmd left a comment

Choose a reason for hiding this comment

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

Looks good from D1's side

@penalosa penalosa removed the blocked Blocked on other work label Dec 15, 2022
@codecov
Copy link

codecov bot commented Dec 15, 2022

Codecov Report

Merging #2283 (02429fe) into main (8986ccb) will increase coverage by 0.11%.
The diff coverage is 53.57%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2283      +/-   ##
==========================================
+ Coverage   72.13%   72.25%   +0.11%     
==========================================
  Files         156      156              
  Lines        9720     9687      -33     
  Branches     2546     2547       +1     
==========================================
- Hits         7012     6999      -13     
+ Misses       2708     2688      -20     
Impacted Files Coverage Δ
packages/wrangler/src/bundle-reporter.ts 100.00% <ø> (ø)
packages/wrangler/src/d1/delete.ts 34.78% <ø> (ø)
packages/wrangler/src/d1/migrations/apply.tsx 34.52% <0.00%> (ø)
packages/wrangler/src/d1/migrations/index.ts 100.00% <ø> (ø)
packages/wrangler/src/dev-registry.ts 67.44% <ø> (ø)
...ges/wrangler/src/dev/get-local-persistence-path.ts 66.66% <ø> (ø)
packages/wrangler/src/index.ts 83.73% <ø> (ø)
packages/wrangler/src/pages/build.ts 85.48% <ø> (ø)
packages/wrangler/src/pages/deployment-tails.ts 83.69% <ø> (ø)
packages/wrangler/src/pages/dev.ts 19.02% <ø> (ø)
... and 19 more

@penalosa penalosa requested review from mrbbot, JacobMGEvans, rozenmd and a team January 4, 2023 17:05
@penalosa
Copy link
Contributor Author

penalosa commented Jan 4, 2023

This should be ready for re-review! Of note, this fixes an issue with our confirm/select/prompt mocking—the mockSelect etc... functions didn't properly assert on their input (and whether they were called), and so most of init.test.ts has extraneous or erroneous calls to mockSelect/mockConfirm/mockPrompt.

Copy link
Contributor

@JacobMGEvans JacobMGEvans left a comment

Choose a reason for hiding this comment

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

It is looking good, just a few questions and comments.

packages/wrangler/src/user/user.ts Outdated Show resolved Hide resolved
packages/wrangler/src/whoami.ts Show resolved Hide resolved
packages/wrangler/src/whoami.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@mrbbot mrbbot left a comment

Choose a reason for hiding this comment

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

Nice! Added a few more comments...

fixtures/remix-pages-app/build/assets.json Outdated Show resolved Hide resolved
packages/wrangler/package.json Outdated Show resolved Hide resolved
packages/wrangler/src/__tests__/kv.test.ts Show resolved Hide resolved
packages/wrangler/src/__tests__/secret.test.ts Outdated Show resolved Hide resolved
packages/wrangler/src/__tests__/tail.test.ts Show resolved Hide resolved
@penalosa penalosa merged commit 95585ce into main Jan 5, 2023
@penalosa penalosa deleted the penalosa/initial-ink-removal branch January 5, 2023 15:18
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: Ensure existing tests fail if an expected prompt|select|confirm fn is never called
5 participants