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

chore(gatsby-cli): bundle dependencies #27058

Merged
merged 5 commits into from
Oct 26, 2020

Conversation

pieh
Copy link
Contributor

@pieh pieh commented Sep 25, 2020

This PR bundles quite a bit of dependencies which cause problems for users (react, ink) when there are multiple version of those installed in node_modules hierarchy is not quite right


This is part of PR series:

  1. feat(gatsby-dev-cli): install deps if there are no gatsby deps but --forceInstall was used
  2. test(integration/gatsby-cli): use sandboxed directory to "globally" install gatsby-cli
  3. chore(gatsby-recipes): bundle dependencies
  4. chore(gatsby-cli): bundle dependencies (THIS PR)

[ch17886]

Copy link
Contributor

@laurieontech laurieontech left a comment

Choose a reason for hiding this comment

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

One comment for future proofing, this looks reasonable to me but admittedly should get a second set of eyes.

packages/gatsby-cli/.babelrc Outdated Show resolved Hide resolved
@sidharthachatterjee sidharthachatterjee added topic: cli Related to the Gatsby CLI and removed status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer labels Sep 28, 2020
@pieh pieh force-pushed the chore/bundle-cli-and-recipes/gatsby-recipes branch from 4bff535 to df712b4 Compare September 30, 2020 09:52
@pieh pieh force-pushed the chore/bundle-cli-and-recipes/gatsby-cli branch from 989cebd to 201268d Compare September 30, 2020 09:53
@pieh pieh force-pushed the chore/bundle-cli-and-recipes/gatsby-cli branch from 201268d to aec6f26 Compare October 4, 2020 20:04
@pieh pieh force-pushed the chore/bundle-cli-and-recipes/gatsby-recipes branch 2 times, most recently from 799f2f9 to dfe1502 Compare October 4, 2020 21:59
@pieh pieh force-pushed the chore/bundle-cli-and-recipes/gatsby-cli branch from aec6f26 to 754e428 Compare October 4, 2020 22:02
@pieh pieh force-pushed the chore/bundle-cli-and-recipes/gatsby-recipes branch from dfe1502 to 778e214 Compare October 5, 2020 08:50
@pieh pieh force-pushed the chore/bundle-cli-and-recipes/gatsby-cli branch from 754e428 to c3e0d74 Compare October 5, 2020 08:50
Comment on lines 1 to 7
{
"presets": [["babel-preset-gatsby-package"]]
"presets": [
[
"@babel/env",
{
"modules": false,
"shippedProposals": true,
"targets": { "node": "10.13.0" }
}
],
"@babel/preset-react"
],
"plugins": ["@babel/plugin-transform-runtime"],
"overrides": [
{
"test": ["**/*.ts", "**/*.tsx"],
"plugins": [["@babel/plugin-transform-typescript", { "isTSX": true }]]
}
]
}
Copy link
Contributor

Choose a reason for hiding this comment

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

could we move this inline into rollup config? So we use non-rollup-babel like all other packages?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Addressed in 4a1de69

packages/gatsby-cli/package.json Show resolved Hide resolved
packages/gatsby-cli/package.json Outdated Show resolved Hide resolved
packages/gatsby-cli/rollup.config.js Outdated Show resolved Hide resolved
packages/gatsby-cli/rollup.config.js Outdated Show resolved Hide resolved
@pieh pieh force-pushed the chore/bundle-cli-and-recipes/gatsby-recipes branch from 33729b8 to 95edecb Compare October 23, 2020 10:42
@pieh pieh force-pushed the chore/bundle-cli-and-recipes/gatsby-cli branch from c3e0d74 to 15f0f14 Compare October 23, 2020 10:42
@pieh pieh force-pushed the chore/bundle-cli-and-recipes/gatsby-recipes branch from 95edecb to 0d79ce8 Compare October 23, 2020 11:01
@pieh pieh force-pushed the chore/bundle-cli-and-recipes/gatsby-cli branch 2 times, most recently from b45b9e6 to f5e1b29 Compare October 23, 2020 11:11
wardpeet
wardpeet previously approved these changes Oct 23, 2020
Copy link
Contributor

@wardpeet wardpeet left a comment

Choose a reason for hiding this comment

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

Looks great!

@pieh pieh linked an issue Oct 23, 2020 that may be closed by this pull request
@pieh pieh force-pushed the chore/bundle-cli-and-recipes/gatsby-recipes branch from 0d79ce8 to 3c2effc Compare October 26, 2020 11:45
@pieh pieh requested review from a team as code owners October 26, 2020 11:45
@pieh pieh force-pushed the chore/bundle-cli-and-recipes/gatsby-cli branch from 28ab48e to e64a9cb Compare October 26, 2020 11:45
@delete-merged-branch delete-merged-branch bot deleted the branch master October 26, 2020 13:46
@pieh pieh changed the base branch from chore/bundle-cli-and-recipes/gatsby-recipes to master October 26, 2020 13:46
@pieh pieh dismissed wardpeet’s stale review October 26, 2020 13:46

The base branch was changed.

@pieh pieh force-pushed the chore/bundle-cli-and-recipes/gatsby-cli branch from e64a9cb to af4bcf4 Compare October 26, 2020 13:48
@pieh pieh merged commit 8543e52 into master Oct 26, 2020
@delete-merged-branch delete-merged-branch bot deleted the chore/bundle-cli-and-recipes/gatsby-cli branch October 26, 2020 14:25
@hoobdeebla hoobdeebla mentioned this pull request Nov 30, 2020
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: cli Related to the Gatsby CLI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

React 17 gatsby won't start
4 participants