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

Stop installing dev dependencies when creating prototype #1803

Merged
merged 4 commits into from
Nov 24, 2022

Commits on Nov 23, 2022

  1. Refactor calls of npm install in cli into a function

    Reduce duplication of code and improve consistency.
    lfdebrux committed Nov 23, 2022
    Configuration menu
    Copy the full SHA
    e752352 View commit details
    Browse the repository at this point in the history
  2. Remove dev dependencies from published package

    Fixes issue #1799.
    
    We use npm shrinkwrap to try and improve security for users, however the
    shrinkwrap file includes dev dependencies, and a bug in npm [[1]] means
    that users are getting the dev dependencies whenever they create a new
    prototype.
    
    This commit changes the publishing process so that these dev
    dependencies are removed from package.json and npm-shrinkwrap.json,
    using the tool [clean-publish].
    
    [1]: npm/cli#4323
    
    [clean-publish]: https://github.com/shashkovdanil/clean-publish#readme
    lfdebrux committed Nov 23, 2022
    Configuration menu
    Copy the full SHA
    c5a0340 View commit details
    Browse the repository at this point in the history
  3. Stop installing dev dependencies when creating prototype

    The previous commit stopped publishing govuk-prototype-kit with dev
    dependencies; this commit stops any dev dependencies being installed
    when creating a new prototype with the cli tool.
    
    We take this belt-and-braces approach to handle older versions of the
    kit package, or potential future versions where we don't bother to
    modify `npm-shrinkwrap.json` because npm have fixed their bugs.
    lfdebrux committed Nov 23, 2022
    Configuration menu
    Copy the full SHA
    5756194 View commit details
    Browse the repository at this point in the history
  4. Update changelog

    lfdebrux committed Nov 23, 2022
    Configuration menu
    Copy the full SHA
    cb9a005 View commit details
    Browse the repository at this point in the history