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

@xn-sakina/vary

v1.4.0

Published

Changesets command shortcut sets

Downloads

9

Readme

@xn-sakina/vary

Changesets command shortcut sets

Install

  # pnpm v8
  pnpm add -D -w @xn-sakina/vary
  # pnpm v7
  pnpm add -DW @xn-sakina/vary

Usage

In monorepo root initial all changesets shortcut commands:

  pnpm vary init

Commands

command|alias|description :-:|:-:|:- clean:output|clean|Clean all pkgs build output (dist/build/es) init|i|Init changeset shortcut command sets push|p|Refresh changeset config file ignore field then run changeset command (All private: true packages will add to ignore) release|r|First build all pkgs(npm run build), then publish to npm release:only|ro|Only use changeset publish to npm release:quick|rq|First up pkgs version, then publish to npm vp|version-packages|Run changeset version command for up pkgs version sync|s|Sync all public packages to some registry napi-publish|np|Publish multi platforms pkgs to npm with napi

Example

Case 1: 3 steps normal publish

  # 1. Select will publish pkg and write changelog 
  pnpm push
  # 2. Upgrade pkgs version
  pnpm vp
  # 3. Build all pkgs output(auto `npm run build`) then publish to npm
  pnpm release

Case 2: 2 steps quick publish

  # 1. Select will publish pkg and write changelog 
  pnpm push
  # 2. Direct publish to npm, still not need build pkg
  pnpm release:quick

Case 3: only publish package

  # Only execute publish
  pnpm release:only

Sync packages

Sync command

  # Will auto sync all public packages to cnpm by default
  pnpm vary sync

Use process.env.VARY_SYNC_AGENTS to sync multi registries:

  # Sync to `cnpm` and `tnpm`
  VARY_SYNC_AGENTS=cnpm,tnpm pnpm vary sync

Sync Github actions

name: Sync packages

on:
  push:
    # An event will not be created when you create more than three tags at once.
    # https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#create
    tags:
      - '*'
  workflow_dispatch:

concurrency:
  group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
  cancel-in-progress: true

jobs:
  sync:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout 🛎️
        uses: actions/checkout@v3

      - name: Use Node.js ${{ matrix.node-version }}
        uses: actions/setup-node@v3
        with:
          node-version: 18.x
          registry-url: 'https://registry.npmjs.com/'

      - name: Sync dependencies
        run: |
          npm i -g cnpm @xn-sakina/vary
          vary sync

Napi publish

Manually publish napi packages without napi-build and build.rs

  pnpm vary napi-publish
  # or `pnpm vary np`

Publish root package:

  pnpm vary np --root

Publish wasm package:

  # for Node.js
  pnpm vary np --wasm
  # for web
  pnpm vary np --wasm-web

Wasm-opt:

  pnpm vary np --wasm-opt ./target/wasm/index.wasm

(Experiment) Publish wasm with using napi-rs (wasi):

  pnpm vary np --napi-wasm

License

MIT