npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

from-changelog-to-npm

v1.0.0

Published

Write your Changelog and let the watcher create the Release and NPM package automatically!

Downloads

2

Readme

 

From Changelog to NPM

Create tokens in your account, include the watcher in your .gitlab-ci.yml and :rocket:.

Just follow the Keep a Changelog format, and add a new release in your CHANGELOG.md. The watcher will update the version in your package(-lock).json, create a tag, a release and publish your package to NPM.

Default pipeline

 

Update [Unreleased] section in CHANGELOG.md

 

New Release in CHANGELOG.md

 

Changes

All details of changes to this project will be documented in this file.

 

Installation & Usage

:key: Create NPM Token to grant publish access:

Click Create Token, select Read and Publish then click Create Token ( :memo: keep the token for the last part).


:key: Create Gitlab token to grand git access:

Fill the form with these values:

| Field | Value | | ----------- | ----------- | | Name | GITLAB_CI_TOKEN | | Scopes > api | :ballot_box_with_check: |

then click Create personal access token ( :memo: keep the token for the last part).


:abc: Add tokens in Environment variables:

Go to your Project > Settings > Continuous Integration/Continuous Delivery, and expand Variables block.

Click Add variable

| Field | Value | | ----------- | ----------- | | Key | NPM_PUBLISH_TOKEN | | Value | :key: [paste your NPM token here] | | Mask variable | :ballot_box_with_check: (mask token in log) |

Click Add variable

| Field | Value | | ----------- | ----------- | | Key | GITLAB_CI_TOKEN | | Value | :key: [paste your gitlab token here] | | Mask variable | :ballot_box_with_check: (mask token in log) |

Great, your Environment is ready!

The watcher can now access tokens to create Release and publish to NPM for you.

Include the watcher in your .gitlab-ci.yml and add the Release stage where you want (after your tests, for example):

.gitlab-ci.yml

include: 'https://gitlab.com/guillew/from-changelog-to-npm/raw/v1.0.0/watch.yml'

stages:
  - Release

That's All Folks!

Now edit your CHANGELOG.md and add a new Release following the Keep a Changelog format.

:information_source: Pro tips: no need to add date for your release... it's automatic too ! :wink: - YYYY-MM-DD will be added if not set.

## [1.0.0]
### Added
- "From Changelog to NPM" watcher

 

Example

.gitlab-ci.yml

include: 'https://gitlab.com/guillew/from-changelog-to-npm/raw/v1.0.0/watch.yml'

stages:
  - test
  - coverage
  - Release

Test job:
  image: alpine
  script:
    - echo "Hello"

Coverage job:
  stage: coverage
  image: alpine
  script:
    - echo "world !"

CHANGELOG.md

# Changelog
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
- You MUST keep the [Unreleased] section to make it work!

## [1.0.0] - 2020-08-16
### Added
- I now use "From Changelog to NPM" pipeline!

 

Contribution

Any help or feedback are really welcome, no matter how great or small!

Please make sure to read the Contributing Guide before making a pull request.

 

License

GPL-3.0