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

daily-version

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

daily-version

Get the current date formatted as a version. Automatically add the time if you already released a version today.

latest
Source
npmnpm
Version
2.0.0
Version published
Weekly downloads
1.1K
-20.99%
Maintainers
1
Weekly downloads
 
Created
Source

daily-version

Get the current date formatted as a version. Automatically add the time if there’s already a git tag for today’s version.

daily-version can be used to version your daily/nightly builds while still allowing multiple versions each day.

Based on utc-version, uses git to determine whether to use the short version (e.g. 20.12.31 or the long version 20.12.31.2330 if a tag of the first version already exists)

It also exists as a GitHub Action: fregante/daily-version-action.

Install

npm install daily-version

API

dailyVersion(prefix?)

Returns a string

const dailyVersion = require('daily-version');

dailyVersion();
// -> 17.8.29

// If 17.8.29 already exists and you call it
dailyVersion();
// -> 17.8.29.1451
// Detects the existing tag, and includes generates a sub-version based on the hours/seconds

dailyVersion('v');
// -> v17.8.29.1451
// Lets you specify any prefix

prefix

Type: string
Optional

CLI

$ daily-version prefix

Outputs the version to stdout.

$ daily-version
17.8.29

$ git tag $(daily-version)
# Creates a tag named 17.8.29

$ daily-version
17.8.29.1451
# Detects the existing tag, and includes generates a sub-version based on the hours/seconds

$ daily-version v
v17.8.29.1451
# Lets you specify any prefix

prefix

Optional

GitHub Actions

There's also an equivalent GitHub Action that makes it super easy: daily-version-action

License

MIT © Federico Brigante

Keywords

version

FAQs

Package last updated on 31 May 2020

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