-
-
Notifications
You must be signed in to change notification settings - Fork 38
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
Improve: make peer checks more tolerant #118
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
github-actions
bot
added
@roots/bud-server
dependencies
Pull requests that update a dependency file
labels
Jun 9, 2021
github-actions
bot
added
@roots/bud-dashboard
@roots/bud-emotion
@roots/bud-entrypoints
@roots/bud-esbuild
@roots/bud-extensions
@roots/bud-hooks
@roots/bud-imagemin
@roots/bud-library
@roots/bud-mdx
@roots/bud-preset-recommend
@roots/bud-prettier
@roots/bud-purgecss
@roots/bud-stylelint
@roots/bud-terser
@roots/bud-wordpress-dependencies
@roots/bud-wordpress-externals
@roots/bud-wordpress-manifests
@roots/critical-css-webpack-plugin
@roots/dependencies
@roots/entrypoints-webpack-plugin
@roots/filesystem
@roots/ink-prettier
@roots/ink-use-style
@roots/merged-manifest-webpack-plugin
@roots/wordpress-dependencies-webpack-plugin
@roots/wordpress-externals-webpack-plugin
labels
Jun 11, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
dependencies
Pull requests that update a dependency file
docs
examples
@roots/bud
@roots/bud-api
@roots/bud-babel
@roots/bud-build
@roots/bud-cache
@roots/bud-cli
@roots/bud-compiler
@roots/bud-criticalcss
@roots/bud-dashboard
@roots/bud-emotion
@roots/bud-entrypoints
@roots/bud-esbuild
@roots/bud-eslint
@roots/bud-extensions
@roots/bud-framework
@roots/bud-hooks
@roots/bud-imagemin
@roots/bud-library
@roots/bud-mdx
@roots/bud-postcss
@roots/bud-preset-recommend
@roots/bud-prettier
@roots/bud-purgecss
@roots/bud-react
@roots/bud-sass
@roots/bud-server
@roots/bud-stylelint
@roots/bud-tailwindcss
@roots/bud-terser
@roots/bud-typescript
@roots/bud-vue
@roots/bud-wordpress-dependencies
@roots/bud-wordpress-externals
@roots/bud-wordpress-manifests
@roots/container
@roots/critical-css-webpack-plugin
@roots/dependencies
@roots/entrypoints-webpack-plugin
@roots/filesystem
@roots/ink-prettier
@roots/ink-use-style
@roots/merged-manifest-webpack-plugin
@roots/sage
@roots/wordpress-dependencies-webpack-plugin
@roots/wordpress-externals-webpack-plugin
test
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Type of change
Dependencies added
Details
Some people were having trouble with tailwindcss and eventually we figured out it was because tailwindcss was installed as a non dev dep, and
@roots/bud-tailwindcss
would exit early if it didn't see it indevDependencies
specifically. There is similar behavior from most of the extensions that require additional packages to be installed as peers.I don't really think it should matter to bud how the project structures its dependencies and so I wanted to check in both places before early exit. This requires a lot of annoying typing:
This change addresses that with a
bud.discovery.hasPeerDependencies
. It takes a package name and returns a boolean if the dependency is found in either the project level devDependencies or dependencies.This change also makes the
@roots/sage
preset a lot more flexible in terms of how it can be imported/required (aligning it with most of the other extensions).