GithubHelp home page GithubHelp logo

arcanemagus / check-peer-deps Goto Github PK

View Code? Open in Web Editor NEW
7.0 2.0 4.0 742 KB

Verifies that the peerDependency requirements of all top level dependencies are satisfied.

License: MIT License

JavaScript 100.00%

check-peer-deps's Introduction

check-peer-deps

Greenkeeper badge

Verifies that the peerDependency requirements of all top level dependencies are satisfied.

Installation

You can install this on your system with:

npm i -g check-peer-deps

Please note that this utility requires npm to be available.

Usage

Simply change into the directory of the project you wish to check the peerDependencies of and run the program.

> cd foobar
> check-peer-deps

If the minimum versions of all your top level peerDependencies are satisfied then there will be no output, otherwise you will see something similar to this:

  > check-peer-deps
  A dependency satisfying eslint-config-airbnb-base's peerDependency of 'eslint@^4.9.0' was not found!
  Current: eslint@^4.6.0
  Package dependencies can satisfy the peerDependency? Yes

This tells you that eslint-config-airbnb-base is requiring eslint@^4.9.0 as a peerDependency, but the project currently only specifies eslint@^4.6.0, allowing a potential issue to arise if [email protected] was installed and not updated before installing. The output also tells you that although the minimum allowed version is too low, the maximum allowed version does satisfy the peerDependencies requirement.

If you use resolutions section in your package.json file in order to resolve some unmet peer dependencies and want the program to take it into the account run it with include-resolutions option:

> check-peer-deps --include-resolutions=true

Read more about resolutions: https://yarnpkg.com/lang/en/docs/selective-version-resolutions/

check-peer-deps's People

Contributors

arcanemagus avatar greenkeeper[bot] avatar greenkeeperio-bot avatar oidualc avatar renovate-bot avatar semantic-release-bot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

check-peer-deps's Issues

Add arguments controlling the flags

The code has the following flags, arguments should be supported controlling them:

  • DEBUG: Enable debug output.
  • INCLUDE_DEV: Include development packages when checking whether a peerDependency has been satisfied.
  • MAX_RETRIES: Maximum allowed retries for npm commands

Check peerDeps for latest version

The issue is that if an older version of a dependency is installed locally it will use that to check the peerDependencies, leaving you exposed to issues if a newer version is available but hasn't been installed yet.

For example if this is what is currently installed:

And package.json has the following:

{
  "eslint": "^4.6.0",
  "eslint-config-airbnb-base": "^12.0.0",
  "eslint-plugin-import": "^2.7.0",
}

Although eslint@^4.6.0 satisfies the peerDependency of [email protected], the current version (which is allowed by the range!) now requires eslint@^4.9.0.

Flipping the default value of USE_LOCAL_PEERDEPS would be a quick partial fix, but as that always uses the latest version available on npm it wouldn't account for when the latest version isn't allowed by the package's range.

The automated release is failing 🚨

🚨 The automated release from the master branch failed. 🚨

I recommend you give this issue a high priority, so other packages depending on you could benefit from your bug fixes and new features.

You can find below the list of errors reported by semantic-release. Each one of them has to be resolved in order to automatically publish your package. I’m sure you can resolve this πŸ’ͺ.

Errors are usually caused by a misconfiguration or an authentication problem. With each error reported below you will find explanation and guidance to help you to resolve it.

Once all the errors are resolved, semantic-release will release your package the next time you push a commit to the master branch. You can also manually restart the failed CI job that runs semantic-release.

If you are not sure how to resolve this, here is some links that can help you:

If those don’t help, or if this issue is reporting something you think isn’t right, you can always ask the humans behind semantic-release.


Invalid npm token.

The npm token configured in the NPM_TOKEN environment variable must be a valid token allowing to publish to the registry https://registry.npmjs.org/.

If you are using Two-Factor Authentication, make configure the auth-only level is supported. semantic-release cannot publish with the default auth-and-writes level.

Please make sure to set the NPM_TOKEN environment variable in your CI with the exact value of the npm token.


Good luck with your project ✨

Your semantic-release bot πŸ“¦πŸš€

Handle npm view failures

npm view can fail, this needs to be handled:

(node:8720) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                   npm update check failed                   β”‚
β”‚             Try running with sudo or get access             β”‚
β”‚            to the local update config store via             β”‚
β”‚ sudo chown -R $USER:$(id -gn $USER) C:\Users\abneyl\.config β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
(node:8720) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Rate-Limited

These updates are currently rate-limited. Click on a checkbox below to force their creation now.

  • fix(deps): update dependency command-line-args to v6

Edited/Blocked

These updates have been manually edited so Renovate will no longer make changes. To discard all commits and start over, click on a checkbox.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

circleci
.circleci/config.yml
  • circleci/node 8
npm
package.json
  • command-line-args ^5.0.2
  • command-line-usage ^5.0.4
  • semver ^6.0.0
  • @commitlint/cli ^7.0.0
  • @commitlint/config-conventional ^7.0.0
  • @commitlint/travis-cli ^7.0.0
  • @semantic-release/changelog ^3.0.0
  • @semantic-release/git ^7.0.0
  • @semantic-release/github ^5.0.0
  • @semantic-release/npm ^5.0.0
  • eslint ^5.0.0
  • eslint-config-airbnb-base ^13.0.0
  • eslint-plugin-import ^2.13.0
  • husky ^0.14.3
  • jest ^24.0.0
  • semantic-release ~15.14.0
  • node >=8.0.0
travis
.travis.yml

  • Check this box to trigger a request for Renovate to run again on this repository

Stop shelling out to NPM

Write the code to query the NPM repository directly instead of shelling out to NPM to get the current version list.

The automated release is failing 🚨

🚨 The automated release from the master branch failed. 🚨

I recommend you give this issue a high priority, so other packages depending on you could benefit from your bug fixes and new features.

You can find below the list of errors reported by semantic-release. Each one of them has to be resolved in order to automatically publish your package. I’m sure you can resolve this πŸ’ͺ.

Errors are usually caused by a misconfiguration or an authentication problem. With each error reported below you will find explanation and guidance to help you to resolve it.

Once all the errors are resolved, semantic-release will release your package the next time you push a commit to the master branch. You can also manually restart the failed CI job that runs semantic-release.

If you are not sure how to resolve this, here is some links that can help you:

If those don’t help, or if this issue is reporting something you think isn’t right, you can always ask the humans behind semantic-release.


The push permission to the Git repository is required.

semantic-release cannot push the version tag to the branch master on remote Git repository.

Please refer to the authentication configuration documentation to configure the Git credentials on your CI environment.


Good luck with your project ✨

Your semantic-release bot πŸ“¦πŸš€

Use a simpler execution library

Versions

name version
check-peer-deps 1.1.0
npm 5.6.0
yarn 1.3.2
node v9.3.0

console log

$ check-peer-deps 
[consistent-env] Unable to determine environment Error: Process execution timed out
    at Timeout._onTimeout (/home/beenotung/.config/yarn/global/node_modules/consistent-env/lib/helpers.js:60:14)
    at ontimeout (timers.js:466:11)
    at tryOnTimeout (timers.js:304:5)
    at Timer.listOnTimeout (timers.js:264:5)
[consistent-env] Unable to determine environment Error: Process execution timed out
    at Timeout._onTimeout (/home/beenotung/.config/yarn/global/node_modules/consistent-env/lib/helpers.js:60:14)
    at ontimeout (timers.js:466:11)
    at tryOnTimeout (timers.js:304:5)
    at Timer.listOnTimeout (timers.js:264:5)
[consistent-env] Unable to determine environment Error: Process execution timed out
    at Timeout._onTimeout (/home/beenotung/.config/yarn/global/node_modules/consistent-env/lib/helpers.js:60:14)
    at ontimeout (timers.js:466:11)
    at tryOnTimeout (timers.js:304:5)
    at Timer.listOnTimeout (timers.js:264:5)
[consistent-env] Unable to determine environment Error: Process execution timed out
    at Timeout._onTimeout (/home/beenotung/.config/yarn/global/node_modules/consistent-env/lib/helpers.js:60:14)
    at ontimeout (timers.js:466:11)
    at tryOnTimeout (timers.js:304:5)
    at Timer.listOnTimeout (timers.js:264:5)
[consistent-env] Unable to determine environment Error: Process execution timed out
    at Timeout._onTimeout (/home/beenotung/.config/yarn/global/node_modules/consistent-env/lib/helpers.js:60:14)
    at ontimeout (timers.js:466:11)
    at tryOnTimeout (timers.js:304:5)
    at Timer.listOnTimeout (timers.js:264:5)
[consistent-env] Unable to determine environment Error: Process execution timed out
    at Timeout._onTimeout (/home/beenotung/.config/yarn/global/node_modules/consistent-env/lib/helpers.js:60:14)
    at ontimeout (timers.js:466:11)
    at tryOnTimeout (timers.js:304:5)
    at Timer.listOnTimeout (timers.js:264:5)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.