Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@adam_baldwin/module-fs-changes

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

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

  • 1.0.1
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
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

Package last updated on 07 Jun 2015

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc