From 066a08e1106cde4fcb81afbab4fa58fe825ddf67 Mon Sep 17 00:00:00 2001 From: "Mr. Meaow" <0306mahabub@gmail.com> Date: Fri, 10 Apr 2026 14:00:19 +0600 Subject: [PATCH 1/2] release: v1.0.0 stable - Update package to version 1.0.0 - Fix CI to publish on every push to main (no release-please gate) - Fix coverage badge (showing 48% until Coveralls is configured) - Update CHANGELOG.md for v1.0.0 release - Ready for npm and JSR publishing Co-authored-by: Qwen-Coder --- .github/workflows/ci.yml | 28 ++++++++++++++++------------ .release-please-manifest.json | 4 +--- CHANGELOG.md | 22 ++++++++++------------ README.md | 2 +- jsr.json | 2 +- package.json | 2 +- 6 files changed, 30 insertions(+), 30 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0ec85fd..5c0151c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 @@ -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 diff --git a/.release-please-manifest.json b/.release-please-manifest.json index c2b929b..484cfe6 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1 @@ -{ - ".": "0.2.0-dev.0" -} +{ ".": "1.0.0" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 5e58b5b..66e50bf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,24 +5,23 @@ 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 @@ -30,7 +29,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - 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 diff --git a/README.md b/README.md index f42965d..a67bef3 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ npm version JSR version CI status - Coverage + Coverage

A sharp, modern, lightweight dependency injection container for TypeScript. Zero runtime dependencies, ESM + CJS support, and strong type safety. diff --git a/jsr.json b/jsr.json index 327f236..62d7c40 100644 --- a/jsr.json +++ b/jsr.json @@ -1,6 +1,6 @@ { "name": "@mrmeaow/tsinject", - "version": "0.2.0-dev.0", + "version": "1.0.0", "exports": "./dist/index.js", "publish": { "include": ["dist", "LICENSE", "README.md"] diff --git a/package.json b/package.json index ff2951c..b3206e7 100644 --- a/package.json +++ b/package.json @@ -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", From cb5e4c67786125bbe2f4edd5e6a95e2fbc44a87b Mon Sep 17 00:00:00 2001 From: "Mr. Meaow" <0306mahabub@gmail.com> Date: Fri, 10 Apr 2026 14:58:14 +0600 Subject: [PATCH 2/2] style: fix lint formatting Co-authored-by: Qwen-Coder --- jsr.json | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/jsr.json b/jsr.json index d71d8bb..04f8acb 100644 --- a/jsr.json +++ b/jsr.json @@ -1 +1,6 @@ -{ "name": "@mrmeaow/tsinject", "version": "1.0.1", "exports": "./dist/index.js", "publish": { "include": ["dist", "LICENSE", "README.md"] } } +{ + "name": "@mrmeaow/tsinject", + "version": "1.0.1", + "exports": "./dist/index.js", + "publish": { "include": ["dist", "LICENSE", "README.md"] } +}