1.1.7 • Published 4 months ago

@eljs/release v1.1.7

Weekly downloads
1
License
MIT
Repository
github
Last release
4 months ago

@eljs/release

Release npm package easily.

Installation

$ pnpm add @eljs/release -D
// or
$ yarn add @eljs/release -D
// ro
$ npm i @eljs/release -D
{
  "scripts": {
+   "release": "release"
  },
  "devDependencies": {
+   "@eljs/release": "^1.0.0"
  }
}

Usage

$ npm run release [version]
// or
$ npx @eljs/release [version]
Usage: release [options] [version]

Arguments:
  version                              Specify the bump version

Options:
  -v, --version                        Output the current version
  --cwd <cwd>                          Specify the working directory
  --git.independent                    Generate git tag independent
  --no-git.requireClean                Skip git working tree clean check
  --no-git.changelog                   Skip changelog generation
  --no-git.commit                      Skip git commit
  --no-git.push                        Skip git push
  --git.requireBranch <requireBranch>  Require that the release is on a particular branch
  --npm.prerelease                     Specify the release type as prerelease  --npm.canary                         Specify the release type as canary
  --npm.syncCnpm                       Sync to cnpm when release done
  --no-npm.requireOwner                Skip npm owner check
  --no-npm.confirm                      Skip confirm bump version
  --npm.prereleaseId <prereleaseId>    Specify the prereleaseId
  --no-github.release                  Skip the github release step
  -h, --help                           display help for command

Configuration

Create a release.config.ts file in the project root.

export interface Config {
  /**
   * Working directory
   * @default process.cwd()
   */
  cwd?: string
  /**
   * Git config
   */
  git?: {
    /**
     * Whether to require git working tree clean
     * @default true
     */
    requireClean?: boolean
    /**
     * Require that the release is on a particular branch
     */
    requireBranch?: string
    /**
     * Changelog config
     * @default { filename: 'CHANGELOG.md', preset: '@eljs/conventional-changelog-preset' }
     */
    changelog?:
      | false
      | {
          /**
           * Changelog file name
           * @default CHANGELOG.md
           */
          filename?: string
          /**
           * Placeholder for when no changes have been made
           * @default '**Note:** No changes, only version bump.'
           */
          placeholder?: string
          /**
           * Preset of conventional-changelog
           * @link https://github.com/conventional-changelog/conventional-changelog/blob/master/packages/conventional-changelog/README.md#presets
           */
          preset?: string
        }
    /**
     * Whether to generate independent git tags
     * @default false
     */
    independent?: boolean
    /**
     * Whether to commit changes
     * @default true
     */
    commit?: boolean
    /**
     * Commit message
     * @default "chore: bump version v${version}"
     */
    commitMessage?: string
    /**
     * Git commit arguments
     */
    commitArgs?: string[] | string
    /**
     * Whether to push remote
     * @default true
     */
    push?: boolean
    /**
     * Git push arguments
     * @default ['--follow-tags']
     */
    pushArgs?: string[] | string
  }
  /**
   * Npm config
   */
  npm?: {
    /**
     * Whether to require npm owner
     * @default true
     */
    requireOwner?: boolean
    /**
     * Whether to use prerelease type
     */
    prerelease?: boolean
    /**
     * Prerelease id
     */
    prereleaseId?: 'alpha' | 'beta' | 'rc'
    /**
     * Whether to use canary version
     * @default false
     */
    canary?: boolean
    /**
     * Whether to confirm the increment version
     * @default true
     */
    confirm?: boolean
    /**
     * Npm publish arguments
     */
    publishArgs?: string | string[]
    /**
     * Whether to sync cnpm
     * @default false
     */
    syncCnpm?: boolean
  }
  /**
   * Github config
   */
  github?: {
    /**
     * Whether to create a github release
     * @default true
     */
    release?: boolean
  }
  /**
   * Preset definitions
   */
  presets?: PluginDeclaration[]
  /**
   * Plugin definitions
   */
  plugins?: PluginDeclaration[]
}
0.32.0

8 months ago

1.1.1

6 months ago

1.1.0

7 months ago

1.1.7

4 months ago

1.1.6

4 months ago

1.1.5

5 months ago

1.1.4

5 months ago

1.1.3

6 months ago

1.1.2

6 months ago

0.33.3

7 months ago

0.33.2

7 months ago

0.33.1

7 months ago

0.33.0

7 months ago

1.0.0

7 months ago

1.0.0-next.11

7 months ago

1.0.0-next.10

7 months ago

1.0.0-next.0

7 months ago

1.0.0-next.1

7 months ago

1.0.0-next.2

7 months ago

0.30.0

12 months ago

1.0.0-beta.10

7 months ago

1.0.0-next.3

7 months ago

1.0.0-next.4

7 months ago

1.0.0-next.5

7 months ago

1.0.0-next.6

7 months ago

1.0.0-next.7

7 months ago

1.0.0-next.8

7 months ago

1.0.0-next.9

7 months ago

1.0.0-beta.2

7 months ago

1.0.0-beta.3

7 months ago

0.31.0

12 months ago

1.0.0-beta.4

7 months ago

1.0.0-beta.5

7 months ago

1.0.0-beta.0

7 months ago

1.0.0-beta.1

7 months ago

1.0.0-beta.6

7 months ago

1.0.0-beta.7

7 months ago

1.0.0-beta.8

7 months ago

1.0.0-beta.9

7 months ago

0.29.0

12 months ago

0.29.1

12 months ago

0.28.0

12 months ago

0.20.0

1 year ago

0.19.0

1 year ago

0.27.0

1 year ago

0.25.2

1 year ago

0.25.1

1 year ago

0.23.1

1 year ago

0.23.0

1 year ago

0.21.1

1 year ago

0.21.0

1 year ago

0.26.3

1 year ago

0.26.2

1 year ago

0.26.1

1 year ago

0.26.0

1 year ago

0.24.0

1 year ago

0.22.0

1 year ago

0.15.0

2 years ago

0.15.1

2 years ago

0.17.0

2 years ago

0.15.2-beta.0

2 years ago

0.14.0

2 years ago

0.14.1

2 years ago

0.16.0

2 years ago

0.16.1

2 years ago

0.18.0

2 years ago

0.12.0-beta.3

2 years ago

0.12.0-beta.2

2 years ago

0.11.4-beta.0

2 years ago

0.13.0

2 years ago

0.11.3

3 years ago

0.12.0-beta.1

2 years ago

0.12.0-beta.0

2 years ago

0.12.0

2 years ago

0.9.3-beta.0

3 years ago

0.11.0

3 years ago

0.11.1

3 years ago

0.11.2

3 years ago

0.9.3-beta.1

3 years ago

0.9.3-beta.2

3 years ago

0.9.3

3 years ago

0.10.0-beta.0

3 years ago

0.10.0-beta.1

3 years ago

0.10.0

3 years ago

0.7.5

3 years ago

0.8.0-beta.7

3 years ago

0.8.0-beta.5

3 years ago

0.8.0-beta.6

3 years ago

0.8.0-beta.0

3 years ago

0.8.0-beta.3

3 years ago

0.8.0-beta.4

3 years ago

0.8.0-beta.1

3 years ago

0.8.0-beta.2

3 years ago

0.9.0

3 years ago

0.8.0

3 years ago

0.9.2

3 years ago

0.9.2-beta.5

3 years ago

0.7.4

3 years ago

0.9.2-beta.4

3 years ago

0.9.1

3 years ago

0.9.2-beta.3

3 years ago

0.9.2-beta.2

3 years ago

0.9.2-beta.1

3 years ago

0.9.2-beta.0

3 years ago

0.7.3

3 years ago

0.7.2

4 years ago

0.7.1

4 years ago

0.7.0

4 years ago

0.5.0

4 years ago

0.4.1

4 years ago

0.4.0

4 years ago

0.5.2

4 years ago

0.6.0

4 years ago

0.5.1

4 years ago

0.4.2

4 years ago

0.3.0

4 years ago

0.3.1

4 years ago

0.2.0

5 years ago

0.1.6

5 years ago

0.1.5

5 years ago

0.1.4

5 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago