Releases: flex-development/dist-tag
Releases · flex-development/dist-tag
[email protected]
[email protected] (2022-08-07)
⚠ BREAKING CHANGES
- node: reimplement tag lookup given new
Options
- options:
Options.prefix?
->Options.delimiter?
- options:
Options.version?
->Options.target?
- options: drop
Options.map
- options: drop
Options.skip
📦 Build
- cli: distribute cli as bundle (504dc86)
📝 Documentation
✨ Features
⚡ Refactors
[email protected]
[email protected] (2022-08-05)
⚠ BREAKING CHANGES
- node: reimplement tag lookup given new
Options
- options:
tagPrefix?
->prefix?
- options:
version?
->target?
- options: drop
delimiter
- options: drop
map
- options: drop
skip
🤖 Continuous Integration
- workflows: allow @dependabot to modify lock file during
ci
runs (89449a0) - workflows: skip integrity checks for @dependabot (200affb)
📝 Documentation
✨ Features
🏡 Housekeeping
- cleanup @dependabot config (865092a)
- prevent prettier from formatting markdown (b39244a)
- refactor project architecture (d8912bf)
⚡ Refactors
[email protected] (🎂 First Release)
Overview
Assuming a distribution (dist) tag is included in package version or release tag (e.g 3.13.98-dev.640
, [email protected]
), dtag
helps maintainers lookup and interpolate distribution tags.
Lookups
Basic
import dtag from '@flex-development/dtag'
/**
* @file Examples - Lookup
* @module dtag/docs/examples/lookup
*/
dtag({ version: '3.13.98-dev.640' }) // => 'dev'
Interpolation
import dtag from '@flex-development/dtag'
/**
* @file Examples - Interpolated Lookup
* @module dtag/docs/examples/lookup-map
*/
dtag({ map: { rc: 'next' }, version: 'v3.0.0-rc' }) // => 'next'
Monorepos
import dtag from '@flex-development/dtag'
/**
* @file Examples - Lookup Monorepo
* @module dtag/docs/examples/lookup-monorepo
*/
const tagPrefix: string = 'foo@'
dtag({ tagPrefix, version: '[email protected]' }) // => 'beta'
dtag({
map: { rc: 'next' },
tagPrefix,
version: '[email protected]'
}) // => 'beta'
Options
/**
* `dtag` options.
*/
export interface DistTagOptions {
/**
* Prerelease delimiter (e.g `-` before `alpha` in `[email protected]`).
*
* @default '-'
*/
delimiter?: string
/**
* Distribution (dist) tag map. If a dist tag is found in `version` and `map`
* is a non-empty object, the tag returned will be plucked from `map`.
*
* @default {}
*/
map?: Record<string, string>
/**
* Skip distribution tag lookup.
*/
skip?: boolean
/**
* Git tag prefix.
*
* @default 'v'
*/
tagPrefix?: string
/**
* Package version (with or without `tagPrefix`).
*
* @default null
*/
version?: any
}