New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

sync-version

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sync-version

Update version number with package.json

latest
Source
npmnpm
Version
1.1.0
Version published
Weekly downloads
77
37.5%
Maintainers
1
Weekly downloads
 
Created
Source

sync-version

A command line tool to sync version number with package.json.

Install

npm install -D sync-version

Usage

Usage:
  sync-version [--list] <files>...
  
Options:
  <files>    Sync version number with package.json inside <file>.
  -l --list  List current version.

Use it with package.json script:

"scripts": {
	"version": "sync-version bower.json && git add ."
}

How does it work?

The script will try finding the version number with

/\bversion["']?:\s*["']?([^\s'"]+)/
/^\/\/ @version\s+(\S+)/
/^\s*@version\s+(\S+)/

and update it.

Changelog

  • 1.1.0 (Sep 18, 2025)

    • Add: new regexp to match version number in usercss.
  • 1.0.1 (May 16, 2017)

    • Fix: crlf breaks the executable on linux. #1
  • 1.0.0 (Jan 17, 2017)

    • Change RegExp, shouldn't match "whatever_version".
    • Display package name on start.
    • Drop app-root-path. Find package.json along the ascension folders from cwd.
  • 0.2.0 (Nov 7, 2016)

    • Support userscript style // @version 0.1.0.
  • 0.1.1 (Apr 17, 2016)

    • Use app-root-path.
  • 0.1.0 (Apr 16, 2016)

    • First release.

Keywords

build tool

FAQs

Package last updated on 17 Sep 2025

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