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

[gatsby-plugin-netlify-cms] switch to require.resolve for modules hoisting #19860

Merged
merged 1 commit into from
Nov 29, 2019
Merged

Conversation

rwu823
Copy link
Contributor

@rwu823 rwu823 commented Nov 28, 2019

Description

image

This fix in mono-repo based project the node_modules hoist to project root.

@rwu823 rwu823 requested a review from a team as a code owner November 28, 2019 13:07
@pvdz
Copy link
Contributor

pvdz commented Nov 28, 2019

This is a non-trivial change. Any chance you could add a test for it?

Basically before it would be relative paths (foo/name/assetDir/assetName) and with this change absolute paths are passed through. This could have various subtle implications down the line.

(There's a number of reasons why this change is non-trivial. For example, white/blacklists could be doing a prefix check, those would break with this change.)

Is there an issue about this problem? Seems to me like this would affect many people.

Copy link
Contributor

@pvdz pvdz left a comment

Choose a reason for hiding this comment

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

(Non-trivial change without tests)

@pvdz
Copy link
Contributor

pvdz commented Nov 28, 2019

cc @erquhart

@rwu823
Copy link
Contributor Author

rwu823 commented Nov 28, 2019

@pvdz

I don't quite understand what you mean and about white/blacklists could be doing a prefix check. But if you don't do this fix how do you resolve the problem I mentioned above?

@pvdz
Copy link
Contributor

pvdz commented Nov 28, 2019

@rwu823 I definitely want to help to resolve that issue (can please you point me to the report, or file a new one in https://github.com/gatsbyjs/gatsby/issues/new?template=bug_report.md ?). I also want to make sure that the fix is not going to cause other problems and so I'm asking for a test :)

@erquhart
Copy link
Contributor

This was just added a day ago, looks like the right move. @erezrokah should sign off on it.

@erquhart erquhart requested a review from erezrokah November 28, 2019 14:49
@erezrokah
Copy link
Contributor

This looks much better. I'm good with it

@erezrokah
Copy link
Contributor

erezrokah commented Nov 28, 2019

@pvdz I had recently changed the plugin code to copy the relevant dependencies instead of letting Webpack do the bundling. This fix makes sure the dependencies are resolved from the correct location.

@rwu823 rwu823 requested a review from pvdz November 29, 2019 01:59
@pvdz pvdz merged commit 1eb1584 into gatsbyjs:master Nov 29, 2019
@gatsbot
Copy link

gatsbot bot commented Nov 29, 2019

Holy buckets, @rwu823 — we just merged your PR to Gatsby! 💪💜

Gatsby is built by awesome people like you. Let us say “thanks” in two ways:

  1. We’d like to send you some Gatsby swag. As a token of our appreciation, you can go to the Gatsby Swag Store and log in with your GitHub account to get a coupon code good for one free piece of swag. We’ve got Gatsby t-shirts, stickers, hats, scrunchies, and much more. (You can also unlock even more free swag with 5 contributions — wink wink nudge nudge.) See gatsby.dev/swag for details.
  2. We just invited you to join the Gatsby organization on GitHub. This will add you to our team of maintainers. Accept the invite by visiting https://github.com/orgs/gatsbyjs/invitation. By joining the team, you’ll be able to label issues, review pull requests, and merge approved pull requests.

If there’s anything we can do to help, please don’t hesitate to reach out to us: tweet at @gatsbyjs and we’ll come a-runnin’.

Thanks again!

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.

4 participants