-
-
Notifications
You must be signed in to change notification settings - Fork 10.7k
fix(dev/config): skip package.json
resolution with custom server.entry
#13744
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
Conversation
🦋 Changeset detectedLatest commit: 233b0e0 The changes in this PR will be included in the next version bump. This PR includes changesets to release 11 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 |
Hi @markmals, Welcome, and thank you for contributing to React Router! Before we consider your pull request, we ask that you sign our Contributor License Agreement (CLA). We require this only once. You may review the CLA and sign it by adding your name to contributors.yml. Once the CLA is signed, the If you have already signed the CLA and received this response in error, or if you have any questions, please contact us at [email protected]. Thanks! - The Remix team |
package.json
resolution with custom server.entry
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.
Please rebase your branch onto latest dev
Thank you for signing the Contributor License Agreement. Let's get this merged! 🥳 |
@MichaelDeBoey done! Let me know if there's anything else I need to do. I couldn't figure out how to make this PR target dev instead of main in the GitHub UI |
After some trial and error (namely, running |
Hey @markmals I think this is pretty reasonable, thanks for adding it! Will you
|
@brookslybrand done! #13743 |
Also, not to be overly pedantic, but can we add a test to prevent a regression in the future? Sorry for all the hoops to jump through! |
I can definitely do that, but I would like some guidance on what kind of test this should be. I could add a Deno fixture to |
Hmm, I'm not 100% sure it's testable via our current test infra. I saw the |
Do you have thoughts, @brookslybrand? |
package.json
resolution with custom server.entry
package.json
resolution with custom server.entry
Since this is difficult to test and any regressions will be trivial to catch, and the existing package.json resolution logic didn't have any specific tests around it, I'm comfortable merging this fix without adding new tests. |
|
||
if (!packageJsonPath) { | ||
throw new Error( | ||
`Could not find package.json in ${rootDirectory} or any of its parent directories. Please add a package.json, or provide a custom entry.server.tsx/jsx file in your app directory.` |
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.
Now that this error can also be avoided by introducing a custom entry.server.tsx/jsx, I've expanded the error message to make this clear, similar to the error message following this one.
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.
Thanks for the PR!
🤖 Hello there, We just published version Thanks! |
🤖 Hello there, We just published version Thanks! |
Skip
package.json
file checks when a user-supplied entry.server file is present