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-dev-cli): wrap ignore pattern in quotes (build scripts) #14465

Merged

Conversation

pieh
Copy link
Contributor

@pieh pieh commented May 31, 2019

This is pretty confusing issue - before this change, something replaces ignore pattern with something else:

$ babel src --out-dir dist --ignore **/__tests__
entry [ '/Users/misiek/.nvm/versions/node/v10.9.0/bin/node',
  '/Users/misiek/dev/gatsby/packages/gatsby-dev-cli/node_modules/.bin/babel',
  'src',
  '--out-dir',
  'dist',
  '--ignore',
  'src/__tests__' ]

See src/__tests__ instead of **/__tests. In some cases this would cause broken releases - i.e. https://unpkg.com/gatsby-dev-cli@2.4.16/dist/watch.js - watch file is not the code there it's compiled tests (wat).

wrapping pattern in quotes (or using --ignore=pattern) fixes this:

$ babel src --out-dir dist --ignore "**/__tests__"
entry [ '/Users/misiek/.nvm/versions/node/v10.9.0/bin/node',
  '/Users/misiek/dev/gatsby/packages/gatsby-dev-cli/node_modules/.bin/babel',
  'src',
  '--out-dir',
  'dist',
  '--ignore',
  '**/__tests__' ]

so let's go with that

More things that are confusing - this seems to happen only with gatsby-dev-cli - most of our packages use same build script but it doesn't happen there 🤷‍♂

@pieh pieh requested a review from a team as a code owner May 31, 2019 16:38
Copy link
Contributor

@DSchau DSchau left a comment

Choose a reason for hiding this comment

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

🚀

@DSchau DSchau merged commit 126b8e5 into gatsbyjs:master May 31, 2019
@pieh pieh deleted the chore/gatsby-dev-cli/wrap-ignore-pattern branch May 31, 2019 18:03
@pieh pieh restored the chore/gatsby-dev-cli/wrap-ignore-pattern branch May 17, 2020 20:34
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.

2 participants