8 Matching Annotations
  1. Dec 2019
    1. For React components projects, it's expected that they will not have a direct dependency on React/React DOM/prop-types, but instead have them as peer dependencies.
    1. peerDeps can't be disabled. If someone wants to create a neutrino-preset-preact based on the react preset, they won't be able to get rid of the warnings.
    1. The one thing I did have to change to get them to work, was adding the neutrino peerDependency additionally as a devDependency, since apparently that's the recommended way to ensure it's installed. OAO's behaviour of automatically installing peer dependencies does not occur in {npm, yarn, lerna} by design (see lerna/lerna#691, npm/npm#11213 and https://docs.npmjs.com/files/package.json#peerdependencies).
  2. Nov 2019
    1. Peer Dependencies react-hooks-testing-library does not come bundled with a version of react or react-test-renderer to allow you to install the specific version you want to test against.
    1. This package does not include Mocha - I have set Mocha as peer dependency on purpose, so I don't lock consumer to a specific Mocha version but most importantly, I don't have to update this package when Mocha is updated, and all the new features will be available automatically from your local Mocha package.
  3. Nov 2018
    1. As a package manager, a large part of npm's job when installing your dependencies is managing their versions. But its usual model, with a "dependencies" hash in package.json, clearly falls down for plugins. Most plugins never actually depend on their host package, i.e. grunt plugins never do require("grunt"), so even if plugins did put down their host package as a dependency, the downloaded copy would never be used. So we'd be back to square one, with your application possibly plugging in the plugin to a host package that it's incompatible with.

      in other words, a peer dependency enables a kind of reverse dependency. so a plugin to appA can this way 'require' that appA would be of a specific version, not as its own dependency but rather as a neighbour or parent package.