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

Use "--omit=dev" internally on newer npm version #86

Commits on Oct 29, 2022

  1. Use --omit=dev internally on newer npm version

    Update the behaviour when the `--production` flag is used on the CLI of
    this project to, instead of just using '--production', do:
    1. get the version of npm being used,
    2. check the version against a version range,
    3. use '--production' for older npm version, or
    4. use '--omit=dev' for newer npm version.
    
    Two notes regarding point 2:
    1. The version range is probably incorrect as is. I based it on the
       GitHub issue with the idea to either let it evolve over time as
       reports come in, or adjust it after this commit if it's preferred
       that the range is (likely) correct before this is released.
    2. To perform the version range check I added a new runtime dependency,
       namely "semver". See: https://www.npmjs.com/package/semver
    
    Lastly, while I updated the tests, the tests as they are now are not
    ood. The current test suite assumes you're running them with a newer
    version of npm. It would be better if the tests are somehow run with a
    controlled version of npm instead, or better yet, with various versions
    of npm.
    ericcornelissen committed Oct 29, 2022
    Configuration menu
    Copy the full SHA
    3249da6 View commit details
    Browse the repository at this point in the history