Coder Social home page Coder Social logo

exactly's Introduction

Exactly

Exactly extends npm to shrinkwrap dependencies by their SHA1 hash. This ensures that package data downloaded by npm exactly matches the packages at the time of shrinkwrapping.

This project is intended as a proof of concept. It's hacky and the approach it takes in monkeypatching npm internals is fragile. This is a quick and dirty way to achieve this functionality to gain experience with it in practice.

Usage

Run exactly with the same commands and arguments as the npm binary.

Use npm during development. Then use exactly shrinkwrap and exactly install in production.

exactly shrinkwrap

Exactly will run npm shrinkwrap and add an exactlyHashes property to your npm-shrinkwrap.json.

# exactly shrinkwrap
npm info it worked if it ends with ok
npm info using [email protected]
npm info using [email protected]
wrote npm-shrinkwrap.json
added exactlyHashes to npm-shrinkwrap.json
{
  "qs": "ec1d1626b24278d99f0fdf4549e524e24eceeb26"
}
npm info ok

exactly install

Exactly will run npm install and check the hash of each package installed from npm or local directories. It will output an "npm info exactly" log line for each package it verifies.

# exactly install qs
npm info it worked if it ends with ok
npm info using [email protected]
npm info using [email protected]
npm info addNameTag [ 'qs', 'latest' ]
npm info exactly shasum matched: ec1d1626b24278d99f0fdf4549e524e24eceeb26
npm info lifecycle [email protected]~preinstall: [email protected]
npm info linkStuff [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~postinstall: [email protected]
/tmp/exactly
`-- [email protected]

npm info ok

exactly's People

Contributors

chromakode avatar

Watchers

James Cloos avatar  avatar

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.