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(gatsby-recipes): fix for when recipes have multiple NPMPackageJSON resources #26281

Merged
merged 3 commits into from
Aug 7, 2020

Conversation

KyleAMathews
Copy link
Contributor

@KyleAMathews KyleAMathews commented Aug 6, 2020

Also threw in improvement to install output

Screen Shot 2020-08-06 at 3 07 12 PM

@KyleAMathews KyleAMathews requested a review from a team as a code owner August 6, 2020 22:08
@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Aug 6, 2020
@KyleAMathews KyleAMathews added topic: recipes and removed status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer labels Aug 6, 2020
@gatsby-cloud
Copy link

gatsby-cloud bot commented Aug 6, 2020

Gatsby Cloud Build Report

using-styled-components

🎉 Your build was successful! See the Deploy preview here.

Build Details

View the build logs here.

🕐 Build time: 21s

Performance

Lighthouse report

Metric Score
Performance 💚 100
Accessibility 💚 90
Best Practices 💚 100
SEO 💚 90

🔗 View full report

@gatsby-cloud-staging
Copy link

gatsby-cloud-staging bot commented Aug 6, 2020

Gatsby Cloud Build Report

gatsby-master

🎉 Your build was successful! See the Deploy preview here.

Build Details

View the build logs here.

🕐 Build time: 1m

Performance

Lighthouse report

Metric Score
Performance 💚 93
Accessibility 🔶 87
Best Practices 💚 93
SEO 🔶 73

🔗 View full report

@gatsby-cloud
Copy link

gatsby-cloud bot commented Aug 6, 2020

Gatsby Cloud Build Report

client-only-paths

🎉 Your build was successful! See the Deploy preview here.

Build Details

View the build logs here.

🕐 Build time: 22s

Performance

Lighthouse report

Metric Score
Performance 💚 100
Accessibility 🔶 85
Best Practices 💚 100
SEO 🔶 70

🔗 View full report

@gatsby-cloud
Copy link

gatsby-cloud bot commented Aug 6, 2020

Gatsby Cloud Build Report

using-reach-skip-nav

🎉 Your build was successful! See the Deploy preview here.

Build Details

View the build logs here.

🕐 Build time: 23s

Performance

Lighthouse report

Metric Score
Performance 💚 100
Accessibility 💚 100
Best Practices 💚 100
SEO 🔶 82

🔗 View full report

@gatsby-cloud-staging
Copy link

gatsby-cloud-staging bot commented Aug 6, 2020

Gatsby Cloud Build Report

gatsby

🎉 Your build was successful! See the Deploy preview here.

Build Details

View the build logs here.

🕐 Build time: 5m

Performance

Lighthouse report

Metric Score
Performance 💚 93
Accessibility 💚 100
Best Practices 💚 100
SEO 🔶 76

🔗 View full report

@gatsby-cloud
Copy link

gatsby-cloud bot commented Aug 6, 2020

Gatsby Cloud Build Report

gatsby

🎉 Your build was successful! See the Deploy preview here.

Build Details

View the build logs here.

🕐 Build time: 23m

@KyleAMathews KyleAMathews changed the title fix(gatsby-recipes): fix for when recipes have muiltiple NPMPackageJSON resources fix(gatsby-recipes): fix for when recipes have multiple NPMPackageJSON resources Aug 7, 2020
@@ -5,6 +5,63 @@ const getDiff = require(`../utils/get-diff`)

const resourceSchema = require(`../resource-schema`)

class Deferred {
Copy link
Contributor

Choose a reason for hiding this comment

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

This class is cool and seems useful. Is it or could it be used elsewhere?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

possibly! I copied it off stackoverflow haha — we'll probably migrate this whole bit of code that handles writing to a single shared resource (in this case to package.json) to its own library.

Copy link
Contributor

@johno johno left a comment

Choose a reason for hiding this comment

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

🚗

@@ -173,8 +173,14 @@ const handleResource = (resourceName, context, props) => {
resolve(cachedValue)
updateResource(cachedValue)
} else {
// if (fn == `create`) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we remove these comments and use debug directly? That way we can toggle them on and off.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah... probably — not too worried about having really clean code still 🤷

@KyleAMathews KyleAMathews merged commit 1e74b7c into master Aug 7, 2020
@KyleAMathews KyleAMathews deleted the batch-package.json branch August 7, 2020 16:03
pragmaticpat pushed a commit to pragmaticpat/gatsby that referenced this pull request Apr 28, 2022
…N resources (gatsbyjs#26281)

* fix(gatsby-recipes): restrict changes to package.json to one at a time

* Add message for npmpackagejson + make install output denser

* update snapshots
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.

3 participants