You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

npm-auto-snapshot

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

npm-auto-snapshot

Bump your snapshot with the epoch. Keep snapshots out of production.

0.5.3
latest
Source
npmnpm
Version published
Weekly downloads
853
2.28%
Maintainers
1
Weekly downloads
 
Created
Source

npm-auto-snapshot

Build Status Coverage Status

This package was inspired by npm-snapshot but automates versioning and adds several features, including a version check for production builds.

It's very easy to use.

Unless your build is contained entirely within your js-package I recommend installing globally for use across multiple projects.

CLI

There are two cli commands available. Call them in a directory with the relevant package.json file, or pass the path to the package.json file.

>> npm_update_snapshot

This command updates the current version of a package.json file to x.y.z-SNAPSHOT.

Intended use

Run before build publishes development package version to npm.

requirements

The package.json's .version property must be of the format /d+.d+.d+-SNAPSHOT/

arguments

When called within the same directory as the package.json file you wish to modify, this command needs no arguments. Alternatively, you may pass a relative or absolute path to the package.json or its directory.

>> npm_check_no_snapshots

This command scans a package.json file for a version or dependencies ending in /-SNAPSHOT(.\d+)?$/ If any are found it throws an exception.

Intended use -

Run at the start of a build intended to produce production artifacts.

requirements

There should be no instances of -SNAPSHOT in any versions within the package.json.

Within another package

If used within another package, the following functions are exposed. They throw exceptions if they encounter errors.

snapshotUpdate:

NpmSnapshot = require('npm-auto-snapshot');

NpmSnapshot.snapshotUpdate('/path/to/the/package.json', console.log);

noSnapshotScan

NpmSnapshot = require('npm-auto-snapshot');

NpmSnapshot.noSnapshotScan('/path/to/the/package.json', console.log);

Keywords

jenkins

FAQs

Package last updated on 27 Jun 2017

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