🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@pafa/release

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

@pafa/release

release all packages and generate changelogs

npmnpm
Version
0.9.16
Version published
Weekly downloads
8
-46.67%
Maintainers
1
Weekly downloads
 
Created
Source

Paf Release

Intro

Paf Release is a tool used for publishing all packages, generating change logs, and checking commit messages, relying on pnpm.

Installation

pnpm add @pafa/release -D

Usage

Using Command

# Release all packages and generate changelogs
npx vr release

# Specify remote name
npx vr release -r TODO paf-release
# or
npx vr release --remote TODO paf-release

# Just generate changelogs
npx vr changelog

# Specify changelog filename
npx vr changelog -f changelog.md
# or
npx vr changelog --file changelog.md

# Lint commit message
npx vr lint-commit -p .git/COMMIT_EDITMSG

# Publish to npm, which can be called in the ci environment
npx vr publish

Configuration

release

ParamsInstructions
-r --remote <remote>Specify remote name
-s --skip-npm-publishSkip npm publish
-c --check-remote-versionCheck if the remote version of the npm package is the same as the one you want to publish locally, if so, stop execution.
-sc --skip-changelogSkip generate changelog
-sgt --skip-git-tagSkip git tag
-nt --npm-tag <npmTag>npm tag

changelog

ParamsInstructions
-f --file <filename>Specify changelog filename
--releaseCount <releaseCount>Release count

lint-commit

ParamsInstructions
-p --commitMessagePath <path>The path of the temporary file to which the git message is submitted. The git hook commit-msg will pass this parameter
-r --commitMessageRe <reg>Validate the regular of whether the commit message passes
-e --errorMessage <message>Validation failed to display error messages
-w --warningMessage <message>Validation failed to display warning messages

publish

ParamsInstructions
-c --check-remote-versionDetects whether the remote version of the npm package is the same as the package version to be published locally, and if it is, skip the release
-nt --npm-tag <npmTag>npm tag

Custom Handle

Example

import { release, changelog } from '@pafa/release'

// Do what you want to do...
release()

You can pass in a task that will be called before the publish after the package version is changed.

import { release, changelog } from '@pafa/release'

async function task() {
  await doSomething1()
  await doSomething2()
}

release({ task })

Types

interface PublishCommandOptions {
  preRelease?: boolean
  checkRemoteVersion?: boolean
  npmTag?: string
}
function publish({ preRelease, checkRemoteVersion, npmTag }: PublishCommandOptions): Promise<void>
function updateVersion(version: string): void
interface ReleaseCommandOptions {
  remote?: string
  skipNpmPublish?: boolean
  skipChangelog?: boolean
  skipGitTag?: boolean
  npmTag?: string
  task?(newVersion: string, oldVersion: string): Promise<void>
}
function release(options: ReleaseCommandOptions): Promise<void>

interface ChangelogCommandOptions {
  file?: string
  releaseCount?: number
}
function changelog({ releaseCount, file }?: ChangelogCommandOptions): Promise<void>

const COMMIT_MESSAGE_RE: RegExp
function isVersionCommitMessage(message: string): string | false | null
function getCommitMessage(commitMessagePath: string): string
interface CommitLintCommandOptions {
  commitMessagePath: string
  commitMessageRe?: string | RegExp
  errorMessage?: string
  warningMessage?: string
}
function commitLint(options: CommitLintCommandOptions): void

License

[MIT](TODO release/blob/main/LICENCE)

Keywords

paf

FAQs

Package last updated on 06 Jul 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