Skip to content

About

Personal-use TypeScript libraries, managed as a pnpm workspaces monorepo.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

ts-packages monorepo

Note

This repository is for personal use. The packages are maintained for the author's own projects, and no support or compatibility guarantees are provided.

This repository is a pnpm workspaces monorepo for small TypeScript libraries, with tasks orchestrated by Turborepo.

Packages

  • @iwstkhr/ts-memoize: A small TypeScript memoization helper for caching the most recent function call.
  • @iwstkhr/svg-to-png: A small browser TypeScript helper for rendering SVG images to PNG.

Requirements

  • Node.js 24.21.0, pnpm 12.4.2, and pre-commit 4.6.2, specified in mise.toml

Use mise to install the specified tools:

mise install

Development

Install dependencies and enable git hooks:

pnpm install
pre-commit install

Hooks are defined in .pre-commit-config.yaml and run on commit (YAML checks, actionlint, Biome, gitleaks, markdownlint, shellcheck).

Run all checks:

pnpm run check
pnpm run typecheck
pnpm test
pnpm run build

Run Biome with fixes:

pnpm run check:write

Run the full pre-commit suite against all files:

pre-commit run --all-files

Contributing

This repository uses GitHub Flow:

  • Create a short-lived branch from main.
  • Open a pull request for review.
  • Merge the pull request into main after CI passes.
  • Keep main releasable.

Use a lightweight Conventional Commits format for commit messages:

<type>(optional-scope): <summary>

Common types:

  • feat: New feature
  • fix: Bug fix
  • docs: Documentation-only change
  • test: Test change
  • refactor: Code change that does not alter behavior
  • chore: Maintenance, dependency, or metadata change
  • ci: CI configuration change

Examples:

feat(ts-memoize): add cache reset support
fix(svg-to-png): handle invalid SVG input
docs: update contributing instructions

Before opening a pull request, make sure the following checks pass:

pre-commit run --all-files
pnpm run check
pnpm run typecheck
pnpm test
pnpm run build

CI

Pull requests and pushes to main run the repo - Check GitHub Actions workflow:

  • Biome
  • Type checking
  • Tests
  • Build

Failures are reported to Slack with the slack-notify.yml reusable workflow from shared-config, using the SLACK_BOT_TOKEN and SLACK_CHANNEL_ID repository secrets. The repo - Pre-commit workflow reports its failures the same way.

Publishing

Packages are published to GitHub Packages, not the public npm registry.

Publishing runs from .github/workflows/publish.yml after the repo - Check workflow succeeds on main. The workflow can also be started manually from GitHub Actions.

The workflow reports to Slack when it publishes new versions, when publishing or tagging fails, and on every manual run.

The workflow skips package versions that are already published. To release changes to a package, update its version in packages/<package>/package.json and keep pnpm-lock.yaml in sync. Version bumps are not enforced by the repository's pre-commit hooks.

Before publishing each new version, the package's prepublishOnly script runs Biome, type checking, tests, and the build.

Published package versions are tagged with each package basename and version:

ts-memoize-v0.1.0
svg-to-png-v0.1.0

About

Personal-use TypeScript libraries, managed as a pnpm workspaces monorepo.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages