A pnpm addon for simple-release.
# pnpm
pnpm add @simple-release/pnpm
# yarn
yarn add @simple-release/pnpm
# npm
npm i @simple-release/pnpmimport { Releaser } from '@simple-release/core'
import { PnpmProject } from '@simple-release/pnpm'
await new Releaser({
project: new PnpmProject()
})
.bump()
.commit()
.tag()
.push()
.publish()
.run()Workspaces example:
import { Releaser } from '@simple-release/core'
import { PnpmWorkspacesProject } from '@simple-release/pnpm'
await new Releaser({
project: new PnpmWorkspacesProject({
mode: 'independent'
})
})
.bump()
.commit()
.tag()
.push()
.publish()
.run()PnpmWorkspacesProject will read workspaces from the pnpm-workspace.yaml in the root of the project.
Path to the package.json manifest file. Defaults to 'package.json'.
Path to the changelog file. Defaults to 'CHANGELOG.md'.
Function to compose the main manifest with secondaries. It can be needed if you have some secondary manifests where version also should be updated. Optional.
import { ComposedProjectManifest } from '@simple-release/core'
import { PnpmProject } from '@simple-release/pnpm'
new PnpmProject({
compose: main => new ComposedProjectManifest(main, [
new SomeManifest(/* ... */)
])
})Mode to determine how to bump versions in the monorepo. Required.
independent- each package can have its own version.fixed- all packages have the same version.
Path to the monorepo root. Defaults to the current working directory.
Path to the changelog file. Defaults to 'CHANGELOG.md'.
Function to compose the main manifest with secondaries. It can be needed if you have some secondary manifests where version also should be updated. Will be called for each manifest in monorepo. Optional.
import { ComposedProjectManifest } from '@simple-release/core'
import { PnpmWorkspacesProject } from '@simple-release/pnpm'
new PnpmWorkspacesProject({
compose: (main, isRoot) => (
isRoot
? main
: new ComposedProjectManifest(main, [
new SomeManifest(/* ... */)
])
)
})Function to format scope name from the package name. By default, scope part of the package name will dropped (@scope/pkg-name -> pkg-name).
Function to format tag prefix from scope name. By default, tag prefix will be the scope name with @ sign (pkg-name -> pkg-name@) for independent mode and empty string for fixed mode.
Publish options for PnpmProject and PnpmWorkspacesProject.
If true, skip publishing. Optional.
Access level for the package. Optional.
String or function to format tag name. Function accepts version string and prerelease versions. Optional.
One-time password for publishing. Optional.
Whether to run git checks before publishing. Defaults to true.
Environment variables to set before publishing. Defaults to process.env.