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

Add messaging for CLI pages command being in Beta #661

Merged
merged 1 commit into from
Mar 25, 2022

Conversation

JacobMGEvans
Copy link
Contributor

Adding "Beta" messaging around the CLI command for Pages.

Explicitly specifying the command is Beta, not to be confused with Pages itself which is production ready, the messaging could need additional tweaking to prevent any confusion between Pages and npx wrangler pages <command>

@nevikashah

resolves #642

@changeset-bot
Copy link

changeset-bot bot commented Mar 21, 2022

🦋 Changeset detected

Latest commit: eb18517

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

github-actions bot commented Mar 21, 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.developers.workers.dev/runs/2035403003/npm-package-wrangler-661

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

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

Or you can use npx with this latest build directly:

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

@JacobMGEvans JacobMGEvans force-pushed the jacobmgevans/wrangler-pages-beta branch from 84745ef to aa4072f Compare March 21, 2022 21:00
@JacobMGEvans JacobMGEvans added pages Relating to Pages polish Small improvements to the experience labels Mar 21, 2022
@JacobMGEvans JacobMGEvans force-pushed the jacobmgevans/wrangler-pages-beta branch from aa4072f to 4013901 Compare March 21, 2022 21:43
@threepointone threepointone changed the title CLI in Beta Add messaging for CLI pages command being in Beta Mar 22, 2022
.command(subHelp)
.epilog(
chalk.yellow(
"'wrangler pages <command>' is a Beta command. Please report any issues to https://github.com/cloudflare/wrangler2/issues/new/choose"
Copy link
Contributor

Choose a reason for hiding this comment

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

will this message show for every pages command?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes. It run anytime the command is utilized.

If that is too often, alternatively, it could be added in the help message.

Copy link
Member

Choose a reason for hiding this comment

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

Doesn't seem to when I'm testing?

npx wrangler pages --help

'wrangler pages <command>' is a Beta command. Please report any issues to https://github.com/cloudflare/wrangler2/issues/new/choose

npx wrangler pages dev --help

No warning message.

npx wrangler pages dev <dir>

No warning message.

Copy link
Contributor

Choose a reason for hiding this comment

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

good catch, retracting my stamp

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will add more comprehensive testing around it, and fix that.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

unit testing subcommands was not feasible, but the tests in examples showed it working as expected on subcommand usage.

Screenshots added to PR

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.

Lgtm, one nit.

packages/wrangler/src/__tests__/pages.test.ts Outdated Show resolved Hide resolved
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.

the message should show for all pages subcommands

@JacobMGEvans
Copy link
Contributor Author

Wrangler Pages command, --help flag and subcommands showing beta message
Wrangler Pages command, --help flag and subcommands showing beta message 2022-03-23 at 3 03 53 PM

Wrangler Pages command, --help flag and subcommands showing beta message  2022-03-23 at 3 06 05 PM

@JacobMGEvans JacobMGEvans force-pushed the jacobmgevans/wrangler-pages-beta branch from 4013901 to 2705611 Compare March 23, 2022 20:22
@JacobMGEvans JacobMGEvans force-pushed the jacobmgevans/wrangler-pages-beta branch from 2705611 to f8391e9 Compare March 23, 2022 20:25
Copy link
Contributor

@petebacondarwin petebacondarwin left a comment

Choose a reason for hiding this comment

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

Nice work @JacobMGEvans - just a few requests, please.

packages/wrangler/src/__tests__/pages.test.ts Outdated Show resolved Hide resolved
"pages",
"⚡️ Configure Cloudflare Pages",
async (pagesYargs) => {
await pages(pagesYargs.command(subHelp).epilogue(pagesBetaWarning));
Copy link
Contributor

Choose a reason for hiding this comment

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

Ooh - epilogue!

packages/wrangler/src/pages.tsx Outdated Show resolved Hide resolved
@JacobMGEvans JacobMGEvans force-pushed the jacobmgevans/wrangler-pages-beta branch from f8391e9 to bb9a72f Compare March 24, 2022 16:11
@JacobMGEvans JacobMGEvans force-pushed the jacobmgevans/wrangler-pages-beta branch from bb9a72f to eb18517 Compare March 24, 2022 16:14
@petebacondarwin
Copy link
Contributor

Looks like legitimate CI failures.

@JacobMGEvans JacobMGEvans force-pushed the jacobmgevans/wrangler-pages-beta branch from eb18517 to 2edcba0 Compare March 24, 2022 21:35
@JacobMGEvans JacobMGEvans merged commit 6967086 into main Mar 25, 2022
@JacobMGEvans JacobMGEvans deleted the jacobmgevans/wrangler-pages-beta branch March 25, 2022 14:49
@github-actions github-actions bot mentioned this pull request Mar 25, 2022
threepointone added a commit that referenced this pull request Mar 29, 2022
In #661, we wrote a test, but didn't actually test if the error gets thrown. Being explicit about the thrown error shows that the  error doesn't get thrown, and the warning doesn't get logged.
threepointone added a commit that referenced this pull request Mar 31, 2022
* bug: `wrangler pages functions` does not log a beta warning

In #661, we wrote a test, but didn't actually test if the error gets thrown. Being explicit about the thrown error shows that the  error doesn't get thrown, and the warning doesn't get logged.

* Added option to Pages subcommand Function to trigger error message and check for beta message

Co-authored-by: Jacob M-G Evans <jacobmgevans@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pages Relating to Pages polish Small improvements to the experience
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Mark wrangler pages as beta
4 participants