Skip to content

Publishing to npm

Zibi Braniecki edited this page Jan 3, 2019 · 2 revisions

Individual Fluent packages are available on npm under their names. On this page, package-name is used as a placeholder for the actual name. In practice, it will be fluent, fluent-syntax, fluent-react etc.

Setup

To publish new versions, log in to npm with npm login.

Version numbers

For patch releases, where only the Z in X.Y.Z changes, choose Z as max(current Z of fluent-syntax (JS), current Z of fluent.syntax (Python)) + 1.

Publishing new versions

  1. Change the current directory.

    $ cd package-name
    
  2. Update package.json and CHANGELOG.md.

  3. Commit and push.

    $ git commit -m "package-name X.Y.X"
    $ git push
    
  4. Draft a new release on GitHub.

    • Use [email protected] for the tag name.
    • Use package-name X.Y.Z for the release title.
    • Copy the relevant part of the CHANGELOG.
    • Check the pre-release checkbox.
  5. Publish (still in the package-name directory).

    $ make dist
    $ npm publish
    
  6. (Only if publishing an older version from a branch) Add the latest tag to the latest mainline version. For instance, if publishing a 0.4.x version, make sure the newest 0.6.x version is tagged as latest:

    $  npm dist-tag add [email protected] latest
    
Clone this wiki locally