-
Notifications
You must be signed in to change notification settings - Fork 736
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
Wrangler and C3: Move the cli folder of C3 into @cloudflare/cli and make Wrangler and C3 depend on it #4189
Conversation
🦋 Changeset detectedLatest commit: bf67717 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
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 |
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/6625416151/npm-package-wrangler-4189 You can reference the automatically updated head of this PR with: npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/prs/6625416151/npm-package-wrangler-4189 Or you can use npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/6625416151/npm-package-wrangler-4189 dev path/to/script.js Additional artifacts:npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/6625416151/npm-package-cloudflare-pages-shared-4189 Note that these links will no longer work once the GitHub Actions artifact expires.
| Please ensure constraints are pinned, and |
Codecov Report
@@ Coverage Diff @@
## main #4189 +/- ##
=======================================
Coverage 75.36% 75.36%
=======================================
Files 223 223
Lines 12259 12259
Branches 3171 3171
=======================================
Hits 9239 9239
Misses 3020 3020 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes LGTM. I've been intending to revisit some of the naming in interactive.ts
for a while, which I'd still like to do at some point. I'm curious to hear more about your use case, perhaps we can chat some time.
@@ -0,0 +1,8 @@ | |||
import { describe, expect, test } from "vitest"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we want this to run in CI I think we'll have to add a workflow to .github/workflows
Sure! We also want to introduce some changes we did where we added a multiselect component, perhaps we can discuss those naming changes in that future PR and talk more about our interactivity use-cases. |
9d3131c
to
65a39a9
Compare
.github/workflows/cli.yml
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file shouldn't be needed—checks should run as part of the monorepo setup
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure! Just added it because of the suggestion above. Anyway I think that makes sense.
packages/cli/package.json
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we'll want to publish this to npm
(at least initially), so this should be set to private
packages/cli/tsconfig.json
Outdated
"compilerOptions": { | ||
"target": "ESNext", | ||
"module": "CommonJS", | ||
"moduleResolution": "node", | ||
"allowJs": false, | ||
"strict": true, | ||
"esModuleInterop": true, | ||
"outDir": "dist", | ||
"types": ["node"], | ||
"resolveJsonModule": true | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How many of these options are necessary given the base config of workers-tsconfig
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated to keep it barebones
Rebased |
d45e346
to
1a0bc84
Compare
Rebased again |
d741cd7
to
053fb2b
Compare
…ake Wrangler and C3 depend on it We want to start using @clack/core and C3-like components in Wrangler, so the logical next step is to make these components available to wrangler and C3. `./helpers/cli.ts` in C3 is now index.ts in @cloudflare/cli, didn't include openInBrowser,C3_DEFAULTS and WRANGLER_DEFAULTS. `./helpers/colors` in C3 is now colors.ts in @cloudflare/cli. `./helpers/interactive.ts` in C3 is now interactive.ts in @cloudflare/cli.
What this PR solves:
We want to start using @clack/core and C3-like components in Wrangler, so the logical next step is to make these components available to wrangler and C3.
openInBrowser
,C3_DEFAULTS
andWRANGLER_DEFAULTS
.Reviewer is to perform the following, as applicable:
Note for PR author:
We want to celebrate and highlight awesome PR review! If you think this PR received a particularly high-caliber review, please assign it the label
highlight pr review
so future reviewers can take inspiration and learn from it.