The npm blog has been discontinued.
Updates from the npm team are now published on the GitHub Blog and the GitHub Changelog.
Announcing npm for Atlassian Bitbucket Pipelines and an improved Bitbucket Connect add-on
The 283,000 (!) packages in the npm Registry are only useful if it’s easy for developers to integrate them into their projects and deploy their code, so we’re excited by any chance to streamline your workflow.
If you work with Bitbucket, starting today, it’s easier than ever to install and publish npm private packages — to either your npm account or your self-hosted npm Enterprise installation.
Bitbucket Pipelines is a new continuous integration service built into Bitbucket Cloud for end-to-end visibility, from coding to deployment. We’re excited that they’re launching with npm support.
Why?
- When it’s easier to work with packages, developers do. This integration helps split monolithic projects into multiple npm modules. More, smaller packages means code discovery and re-use, which saves you from reinventing the wheel.
- It’s all in one place. See pipeline information and work with npm right in Bitbucket commits, branches, and PRs, without context switching and waiting for feedback to see if you broke a build.
- You can automate tedious parts of the development workflow. (Did you write a test for that?…)
- It’s easy. To get started, just add a build configuration file into a Bitbucket repo.
How?…
Working with private packages in the npm registry
- Use the
bitbucket-pipelines.yml
supplied in this repository. - Set the
NPM_TOKEN
environment variable.- This token can be found in your local
~/.npmrc
, after you log in to the registry.
- This token can be found in your local
- Enable pipelines
Working with private packages in npm Enterprise
- Use the
bitbucket-pipelines.yml
supplied in this repository. - Set the
NPM_TOKEN
environment variable:- This token can be found in your local
~/.npmrc
, after you log in to the registry.
- This token can be found in your local
- Set
NPM_REGISTRY_URL
to the full URL of your private registry (with scheme). - Enable pipelines.
New in the Bitbucket Connect add-on: private packages
Alongside the new pipelines integration, the npm for Bitbucket add-on has been updated to support private modules.
This helps complete an elegant CI/CD workflow:
- Bitbucket Pipelines installs your private and public npm modules, ensuring that your build continues passing;
- npm for Bitbucket Cloud provides constant feedback, ensuring that an up-to-date version of your module has been published.
Get started by installing the add-on now.
Now what?
We have more exciting integrations and improvements in the … pipeline (sorry), but it helps to know what matters to you. Don’t be shy to share feedback in the comments or hit us up on Twitter.