question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Split in multiple npm packages (was "Change peerDependencies to optionalDependencies")

See original GitHub issue

Edit: see comments below

So, 3 packages, and make bootstrap depend on the other 2, bootstrap-css and bootstrap-js




jQuery and Popper.js are defined as peerDependencies: https://github.com/twbs/bootstrap/blob/v4.0.0-beta/package.json#L69

Bootstrap can be used without the JS part (think of reactstrap, React-Bootstrap, Angular UI Bootstrap, NG Bootstrap, BootstrapVue…)

Suggestion: switch to optionalDependencies so there is no warning when not installing jQuery and Popper.js.

$ yarn
...
warning "bootstrap@4.0.0-beta" has unmet peer dependency "jquery@>=3.0.0".
warning "bootstrap@4.0.0-beta" has unmet peer dependency "popper.js@^1.11.0".

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:9
  • Comments:33 (24 by maintainers)

github_iconTop GitHub Comments

21reactions
Johann-Scommented, Aug 19, 2017

We will split Bootstrap in different packages in release 4.3

9reactions
nathanosdevcommented, Oct 23, 2017

The intent of the issue is to split into multiple NPM packages, not to split the actual repo. Splitting the repo just came up as one approach to splitting the NPM package so I think it makes sense to leave this open.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Common npm mistakes - Medium
If you're authoring a module that has peer dependencies, be as loose as possible with your version requirement; don't just blindly use the ......
Read more >
How do I handle optional peer dependencies when publishing ...
So if you're just using that library for type information, you probably don't have to list it as a dependency or optionalDependency anymore....
Read more >
package.json - npm Docs
Changes to the package should come along with changes to the version. If you don't plan to publish your package, the name and...
Read more >
Difference between dependencies, devDependencies and ...
Peer Dependencies : In package.json file, there is an object ... that our package is compatible with a particular version of an npm...
Read more >
npm Peer Dependencies - Fathom
Semantic versioning generally defines the version of a package using three digits, major.minor.patch . Most normal or dev dependencies use one of two...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found