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.
@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.
- 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 installInstall dependencies and enable git hooks:
pnpm install
pre-commit installHooks 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 buildRun Biome with fixes:
pnpm run check:writeRun the full pre-commit suite against all files:
pre-commit run --all-filesThis repository uses GitHub Flow:
- Create a short-lived branch from
main. - Open a pull request for review.
- Merge the pull request into
mainafter CI passes. - Keep
mainreleasable.
Use a lightweight Conventional Commits format for commit messages:
<type>(optional-scope): <summary>
Common types:
feat: New featurefix: Bug fixdocs: Documentation-only changetest: Test changerefactor: Code change that does not alter behaviorchore: Maintenance, dependency, or metadata changeci: 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 buildPull 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.
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