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

build-version

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

build-version - npm Package Compare versions

Comparing version 0.2.1 to 0.2.2

11

index.js
'use strict';
const path = require('path');
const { exec } = require('child_process');

@@ -77,7 +78,9 @@ const username = require('username');

const config = Object.assign({}, option);
return getTagVersion({ cwd : config.cwd })
const cwd = path.resolve(config.cwd || '');
return getTagVersion({ cwd })
.catch(() => {
return headHash({
short : true,
cwd : config.cwd
cwd
});

@@ -87,6 +90,6 @@ })

(version) => {
return suffix(version, { cwd : config.cwd });
return suffix(version, { cwd });
},
() => {
return readPkgUp({ cwd : config.cwd }).then((data) => {
return readPkgUp({ cwd }).then((data) => {
if (data && data.pkg && data.pkg.version) {

@@ -93,0 +96,0 @@ return data.pkg.version;

{
"name": "build-version",
"version": "0.2.1",
"version": "0.2.2",
"description": "Get a version for your build.",

@@ -5,0 +5,0 @@ "homepage": "https://github.com/sholladay/build-version",

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