@surface/publisher
TypeScript icon, indicating that this package has built-in type declarations

1.0.0-dev.202301061616 • Public • Published

@Surface/Publisher

Tool designed to handles workspaces bumping and publishing.

Install

   npm i @surface/publisher

Basic Usage

    publisher bump minor
    publisher publish --token=<your-registry-token>

How it works

By default, when running bump or publish, the tool will look for an packages.json in the current directory, if this file contains a workspaces property, it will be considered a workspace and the process will execute the bump or publish on the workspace packages.

Authentication

Registry and token can be provided through the cli or using a .npmrc file at package level, workspace level or user level. Notes that when providing registry or token through the cli will overwrites the .npmrc's values.

Currently only npm automation tokens are supported when publishing on the https://www.npmjs.com registry.

Commands

Bump

Usage: publisher bump [options] <version> [preid] [build]

Bump discovered packages or workspaces using provided custom version

Arguments:
  version                          An semantic version or an release type: major, minor, patch, premajor, preminor, prepatch, prerelease. Also can accept an glob prerelease '*-dev+123' to override just the prerelease part of the
                                   version. Useful for canary builds.
  preid                            The 'prerelease identifier' part of a semver. Like the "rc" in 1.2.0-rc.8+2022
  build                            The build part of a semver. Like the "2022" in 1.2.0-rc.8+2022

Options:
  --tag                    <n>     Tag used to compare local and remote packages
  --force                  [n]     Bump packages with no changes
  --independent            [n]     Ignore workspace root version and bump itself
  --synchronize            [n]     Synchronize dependencies between workspace packages after bumping
  --update-file-references [n]     Update file references when bumping
  --packages               <n...>  Packages or workspaces to include
  --registry               <n>     Registry from where packages will be unpublished
  --token                  <n>     Token used to authenticate
  --cwd                    <n>     Working dir
  --dry                    [n]     Enables dry run
  --log-level              <n>     Log level (default: info)
  --ignore-changes         <n...>  Files to ignore when detecting changes
  -h, --help                       display help for command

Changed

Usage: publisher changed [options]

List local packages that have changed compared to remote tagged package.

Options:
  --tag                    <n>     Dist tag used to compare local and remote packages
  --packages               <n...>  Packages or workspaces to include
  --registry               <n>     Registry from where packages will be unpublished
  --token                  <n>     Token used to authenticate
  --cwd                    <n>     Working dir
  --dry                    [n]     Enables dry run
  --log-level              <n>     Log level (default: info)
  --ignore-changes         <n...>  Files to ignore when detecting changes
  --include-private        <n>     Includes private packages
  --include-workspace-root [n]     Includes workspaces root
  -h, --help                       display help for command

Publish

Usage: publisher publish [options]

Publish packages or workspaces packages

Options:
  --tag                    <n>     Tag to publish
  --synchronize            [n]     Synchronize dependencies between workspace packages before publishing
  --canary                 [n]     Enables canary release
  --prerelease-type        <n>     An prerelease type: premajor, preminor, prepatch, prerelease. Used by canary
  --preid                  <n>     The 'prerelease identifier' part of a semver. Like the "rc" in 1.2.0-rc.8+2022. Used by canary
  --build                  <n>     The build part of a semver. Like the "2022" in 1.2.0-rc.8+2022. Used by canary
  --force                  [n]     Forces to publish unchanged packages. Used by canary
  --packages               <n...>  Packages or workspaces to include
  --registry               <n>     Registry from where packages will be unpublished
  --token                  <n>     Token used to authenticate
  --cwd                    <n>     Working dir
  --dry                    [n]     Enables dry run
  --log-level              <n>     Log level (default: info)
  --ignore-changes         <n...>  Files to ignore when detecting changes
  --include-private        <n>     Includes private packages
  --include-workspace-root [n]     Includes workspaces root
  -h, --help                       display help for command

Unpublish

Usage: publisher unpublish [options]

Unpublish packages or workspaces packages

Options:
  --packages               <n...>  Packages or workspaces to include
  --registry               <n>     Registry from where packages will be unpublished
  --token                  <n>     Token used to authenticate
  --cwd                    <n>     Working dir
  --dry                    [n]     Enables dry run
  --log-level              <n>     Log level (default: info)
  --include-private        <n>     Includes private packages
  --include-workspace-root [n]     Includes workspaces root
  -h, --help                       display help for command

Package Sidebar

Install

npm i @surface/publisher

Weekly Downloads

6

Version

1.0.0-dev.202301061616

License

MIT

Unpacked Size

62.3 kB

Total Files

24

Last publish

Collaborators

  • hitalloexiled