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 🙏

© 2025 – Pkg Stats / Ryan Hefner

ce-part-utils

v0.0.4

Published

Utilities for adding part and exportparts attributes to a custom HTML element, using classes, ids, tags and other element properties.

Readme

Custom Element Part Assigment Utilties

Overview

Utilities for adding part and exportparts attributes to custom HTML elements, using classes, ids, tags and other element properties.

Quick Start

import { assignClassAndIdToPart} from 'ce-part-utils';

const customElement = document.querySelector('custom-element');
assignClassAndIdToPart(customElement.shadowRoot);

Links

Demo:

https://catapart.github.io/ce-part-utils/

Documentation:

https://catapart.github.io/ce-part-utils/documentation

Automated Testing:

https://catapart.github.io/ce-part-utils/test-runner

Repo Notes

This section provides instructions for how to use the repo to develop the library.

Installation

Install the repo using a package manager:

npm install

Configuration

tsconfig.json

Default from vite build

vite.config

Defines custom inputs and outputs to exclude tests and create both es and umd modules

vite.config.tests.ts

Defines custom inputs and outputs to include tests and output to the test-runner directory

Scripts

dev

Use vite to begin a server with Hot Module Replacement, which will automatically reload any time a change in the source files is saved.

build

Use vite to transpile the source code into code chunks or library files. Files are output into dist directory by default.

preview

Use vite to serve the dist directory. Useful for non-library projects, where the dist directory will contain an index.html file, or other browse-able entry point.

test:build

Use vite to transpile all files with a .tests.[ts|js|tsx|jsx] extension into the test-runner subdirectory. Creates javascript files that can be served to the <test-runner> and <code-tests> components.

test

Runs the test:build script and then serves the library website using serve, to prevent module resolution issues that occur when running the dev script.

release

Use vite to transpile the source code and then use changesets to begin the publication procedure for the repo environment (github or gitlab).
If code script is run during CI/CD for the main branch, the library is published. Otherwise, the library is linted and compiled.

Publishing

Releasing with changesets

Github Steps
  1. Run changeset command: npx @changesets/cli | bun | pnpm changesets | yarn changesets
  2. Log version info: Add a message that describes the changes in this version
  3. Check in: Push changes to repo
  4. Merge: Merge branch into main
  5. Merge Automation Branch: Await repo automation's creation of a new pull request from a newly created branch. Accept the pull request, merging the branch into main.

After automation completes, the new version will be published to NPM.

Gitlab Steps

// TODO: Fix these steps

  1. Run changeset command: npx @changesets/cli | bun | pnpm changesets | yarn changesets
  2. Log version info: Add a message that describes the changes in this version
  3. Check in: Push changes to repo
  4. Merge: Merge branch into main
  5. Merge Automation Branch: Await repo automation's creation of a new pull request from a newly created branch. Accept the pull request, merging the branch into main.

After automation completes, the new version will be published to NPM.

Dependencies

Library Dependencies

none

Development Dependencies

typescript

Type checking

@changesets/cli

Publishing and version management

vite

Rapid development. Hot Module Reload and transpiliation

vite-plugin-dts

Create types for es and umd modules on build

@rollup/plugin-terser

Minification

@magnit-ce/test-runner

Automated tests

glob

Search for files that are tests

@web/dev-server

Serve project directory without module resolution conflicts between vite and test-runner

Warning - Non-production package

This project is being prepared for production, but is not ready to be used as a dependency for anything. There will be breaking changes and unrecoverable states. Do not use until this warning has been removed.

When the library reaches the 1.0.0 designation, that will be a production package. From that point, you can use the major version number (1 in 1.0.0) to recognize when breaking changes are introduced.