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

fix: warn if the site.entry-point configuration is found during publishing #293

Merged

Conversation

petebacondarwin
Copy link
Contributor

@petebacondarwin petebacondarwin commented Jan 24, 2022

Is it enough to log a warning? Or should we throw a new DeprecationError()?

Fixes #282

@changeset-bot
Copy link

changeset-bot bot commented Jan 24, 2022

🦋 Changeset detected

Latest commit: 6be9e85

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

@threepointone
Copy link
Contributor

This should probably have a deprecation error, unless we already throw if we don't find an entry point?

@petebacondarwin
Copy link
Contributor Author

Currently we throw if there is neither a command line script nor a configured build.upload.main property...

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.

one note, but looks good! we can iterate if needed.

packages/wrangler/src/publish.ts Outdated Show resolved Hide resolved
@petebacondarwin
Copy link
Contributor Author

I realised that the current flow might be a bit weird for those who have not set up other means for specifying entry-points. They will only receive an error "missing main file". 😢
I'll update this...

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.

I appreciate the tests here deeply, thank you!

packages/wrangler/src/index.tsx Outdated Show resolved Hide resolved
packages/wrangler/src/publish.ts Outdated Show resolved Hide resolved
packages/wrangler/src/publish.ts Outdated Show resolved Hide resolved
@petebacondarwin petebacondarwin force-pushed the deprecate-sites-entry-point branch 2 times, most recently from fe20aed to cf70bd0 Compare January 25, 2022 12:07
…lishing

Also updates the message and adds a test for the error when there is no entry-point specified.

Fixes cloudflare#282
@petebacondarwin petebacondarwin merged commit 71b0fab into cloudflare:main Jan 25, 2022
@petebacondarwin petebacondarwin deleted the deprecate-sites-entry-point branch January 25, 2022 12:32
@github-actions github-actions bot mentioned this pull request Jan 25, 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
2 participants