Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 16 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -252,15 +252,8 @@ jobs:
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
permissions:
contents: write
pull-requests: write
id-token: write
steps:
- uses: googleapis/release-please-action@v4
id: release
with:
token: ${{ secrets.GITHUB_TOKEN }}
skip-github-pull-request: true

- uses: actions/checkout@v4
with:
fetch-depth: 0
Expand All @@ -287,15 +280,26 @@ jobs:
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Publish to npm (stable)
if: steps.release.outputs.release_created == 'true'
- name: Check if version exists on npm
id: check
run: |
CURRENT_VERSION=$(node -p "require('./package.json').version")
echo "Publishing stable version: $CURRENT_VERSION"
echo "version=$CURRENT_VERSION" >> $GITHUB_OUTPUT
if npm view @mrmeaow/tsinject@$CURRENT_VERSION version &>/dev/null; then
echo "exists=true" >> $GITHUB_OUTPUT
else
echo "exists=false" >> $GITHUB_OUTPUT
fi

- name: Publish to npm (stable)
if: steps.check.outputs.exists == 'false'
run: |
echo "Publishing @mrmeaow/tsinject@${{ steps.check.outputs.version }} to npm"
npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Publish to JSR (stable)
if: steps.release.outputs.release_created == 'true'
run: npx jsr publish --allow-dirty
run: |
echo "Publishing @mrmeaow/tsinject@${{ steps.check.outputs.version }} to JSR"
npx jsr publish --allow-dirty
4 changes: 1 addition & 3 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
{
".": "0.2.0-dev.0"
}
{ ".": "1.0.0" }
22 changes: 10 additions & 12 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,32 +5,30 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.2.0-dev.0] - 2026-04-10
## [1.0.0] - 2026-04-10

### Added
- Initial implementation of tsinject DI container (renamed from tsneedle)
- Token system with branded types
- Container with registration methods (registerClass, registerFactory, registerValue, registerSingleton)
- Token system with branded types for compile-time safety
- Container with registration methods (registerClass, registerFactory, registerValue, registerAlias)
- Lifecycle management (Transient, Singleton, Scoped)
- Sync and async resolution
- Sync and async resolution with full context injection
- Circular dependency detection
- Decorators: @injectable, @singleton, @scoped, @inject, @optional, @lazy, @postConstruct, @preDestroy
- Metadata registry for decorator storage
- Hierarchical container scoping
- Module loading (defineModule, container.load)
- Metadata registry for decorator storage via Symbol.metadata
- Hierarchical container scoping with parent-child relationships
- Module loading (defineModule, container.load) with imports
- Container disposal with lifecycle hooks
- Optional reflect-metadata integration
- commitlint with conventional commits
- husky for git hooks
- GitHub Actions CI pipeline
- GitHub Actions CI pipeline with multi-node testing
- Multi-channel releases (dev, next, stable)

### Features
- Zero runtime dependencies (core)
- ESM + CJS dual module format
- TypeScript 5.2+ Stage 3 decorators
- Strong type safety with branded tokens
- Scoped package name: @mrmeaow/tsinject
- Scoped package: @mrmeaow/tsinject

[0.2.0-dev.0]: https://github.com/mrmeaow/tsinject/releases/tag/v0.2.0-dev.0
[Unreleased]: https://github.com/mrmeaow/tsinject/compare/v0.2.0-dev.0...HEAD
[1.0.0]: https://github.com/mrmeaow/tsinject/releases/tag/v1.0.0
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<a href="https://www.npmjs.com/package/tsinject"><img src="https://img.shields.io/npm/v/@mrmeaow/tsinject.svg" alt="npm version" /></a>
<a href="https://jsr.io/@mrmeaow/tsinject"><img src="https://img.shields.io/jsr/v/@mrmeaow/tsinject" alt="JSR version" /></a>
<a href="https://github.com/mrmeaow/tsinject/actions/workflows/ci.yml"><img src="https://github.com/mrmeaow/tsinject/actions/workflows/ci.yml/badge.svg" alt="CI status" /></a>
<a href="https://coveralls.io/github/mrmeaow/tsinject?branch=main"><img src="https://coveralls.io/repos/github/mrmeaow/tsinject/badge.svg?branch=main" alt="Coverage" /></a>
<a href="https://github.com/mrmeaow/tsinject/actions"><img src="https://img.shields.io/badge/coverage-48%25-yellow" alt="Coverage" /></a>
</p>

A sharp, modern, lightweight dependency injection container for TypeScript. Zero runtime dependencies, ESM + CJS support, and strong type safety.
Expand Down
115 changes: 0 additions & 115 deletions V1_RELEASE_PLAN.md

This file was deleted.

6 changes: 2 additions & 4 deletions jsr.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
{
"name": "@mrmeaow/tsinject",
"version": "0.2.1-dev.0",
"version": "1.0.1",
"exports": "./dist/index.js",
"publish": {
"include": ["dist", "LICENSE", "README.md"]
}
"publish": { "include": ["dist", "LICENSE", "README.md"] }
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@mrmeaow/tsinject",
"version": "0.2.0-dev.0",
"version": "1.0.0",
"description": "A sharp, modern, lightweight dependency injection container for TypeScript — ESM + CJS, zero dependencies, runtime-agnostic",
"type": "module",
"main": "./dist/index.cjs",
Expand Down
Loading