![require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages](https://cdn.sanity.io/images/cgdhsj6q/production/be8ab80c8efa5907bc341c6fefe9aa20d239d890-1600x1097.png?w=400&fit=max&auto=format)
Security News
require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
Minimalist publishing tool for GitHub and npm. Generates a changelog, makes a GitHub release of it, and publishes the package to npm.
Set GITHUB_TOKEN
and NPM_TOKEN
as environment variables.
To create a release on GitHub and publish the package to npm:
npx aspublish
May also obtain just the next version that will be created, if necessary:
npx aspublish --version
The returned version is empty if no release has been triggered.
Note that npm postversion
etc. scripts will also run normally, and that the version number in package.json
is irrelevant (may just be 0.0.0
).
Prefix either the commit subject or body:
Prefix | Release type | Pre 1.0.0 | Post 1.0.0 |
---|---|---|---|
breaking: | Major | 0.1.0 -> 0.2.0 | 1.0.0 -> 2.0.0 |
feat: | Minor | 0.1.0 -> 0.1.1 | 1.0.0 -> 1.1.0 |
fix: | Patch | 0.1.0 -> 0.1.1 | 1.0.0 -> 1.0.1 |
Except a few aliases and abbreviations, other prefixes will not trigger a new version / release.
As a step during GitHub Actions:
- name: Make release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
VERSION=$(npx aspublish --version)
if [ -z "$VERSION" ]; then
echo "Changes do not trigger a release"
else
echo "Publishing new version: $VERSION"
npx aspublish
fi
Or, if obtaining the version upfront is not necessary:
- name: Make release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npx aspublish
See this repository's publish.yml for a complete configuration (replace node bin/aspublish.js
with npx aspublish
).
FAQs
Minimalist publishing tool for GitHub and npm.
We found that aspublish demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.