Socket
Socket
Sign inDemoInstall

@adam_baldwin/module-fs-changes

Package Overview
Dependencies
35
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @adam_baldwin/module-fs-changes

Use Docker to get file system changes when npm installing a module


Version published
Weekly downloads
4
increased by100%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

Overview

Executes npm i module_name in a docker container and returns file system changes

Example Usage

var Docker = require('dockerode');
var docker = new Docker({socketPath: '/var/run/docker.sock'});
var getChanges = require('./index.js');

getChanges(docker, 'node', 'helmet', function (err, changes) {
    console.log(changes);
});

Returned changes object includes the following keys, which are each an array of files that were added, modified or deleted.

  • modified
  • added
  • deleted

Options

getChanges requires the following options

  • docker - connection to dockerode
  • image - name of the image that you want to run npm i module against
  • module_name - can be a module_name or module_name@version
  • callback - function with the signature (err, changes)

scripts

To clean up after ourselves we have a scripts/cleanup.sh that will remove images that are lingering. May or may not be useful.

FAQs

Last updated on 07 Jun 2015

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc