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
21 changes: 14 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,27 +20,34 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: pnpm/action-setup@v4

- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
cache: npm
cache: pnpm
cache-dependency-path: pnpm-lock.yaml

- run: npm ci
- run: pnpm install --frozen-lockfile

- name: Typecheck
run: npm run typecheck
run: pnpm run typecheck

- name: Lint
run: npm run lint
run: pnpm run lint

- name: Format check
run: npm run format:check
run: pnpm run format:check

- name: Test
run: npm run test:coverage
run: pnpm run test:coverage

- name: Build
run: npm run build
run: pnpm run build

- name: Verify packed package
if: matrix.node == 22
run: pnpm run package:check

- name: Upload coverage
if: matrix.node == 22
Expand Down
31 changes: 12 additions & 19 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,24 +13,20 @@ jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

- uses: actions/setup-node@v4
- uses: pnpm/action-setup@v4

- uses: actions/setup-node@v6
with:
node-version: 22
cache: npm
node-version: 24
registry-url: https://registry.npmjs.org
package-manager-cache: false

- run: npm ci

- name: Typecheck
run: npm run typecheck
- run: pnpm install --frozen-lockfile

- name: Lint
run: npm run lint

- name: Test
run: npm run test:run
- name: Verify release contract
run: pnpm run release:check

- name: Verify tag matches package.json version
run: |
Expand All @@ -41,10 +37,7 @@ jobs:
exit 1
fi

- name: Build
run: npm run build

- name: Publish to npm
run: npm publish --provenance --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
# Tag checkouts use a detached HEAD, so pnpm's branch check cannot apply;
# the explicit tag/package-version check above remains authoritative.
run: pnpm publish --access public --provenance --no-git-checks
5 changes: 1 addition & 4 deletions .husky/pre-push
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
npm run typecheck
npm run lint
npm run test:run
npm run build
pnpm run check
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Added

- Added packed-package verification for ESM, CommonJS, declarations, runtime dependencies, and side-effect safety.

### Changed

- Standardized package development, CI, and release workflows on pnpm 11.
- Adopted `@okyrychenko-dev/type-utils` as a direct runtime dependency for shared guards.
- Aligned package exports and validation tooling with the other maintained `@okyrychenko-dev` libraries.

### Removed

- Removed deprecated provider, resolved-store, and lifecycle aliases.
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ object when function-based access is useful.
## Installation

```bash
npm install @okyrychenko-dev/react-zustand-toolkit zustand
pnpm add @okyrychenko-dev/react-zustand-toolkit zustand
```

## Quick Start
Expand Down Expand Up @@ -464,10 +464,10 @@ including after a re-render.
## Development

```bash
npm install
npm run typecheck
npm run test:run
npm run build
pnpm install --frozen-lockfile
pnpm run check
pnpm run test:coverage
pnpm run package:check
```

## License
Expand Down
16 changes: 16 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,22 @@ export default [
"@typescript-eslint/no-invalid-void-type": "off",
},
},
{
...tseslint.configs.disableTypeChecked,
files: ["scripts/**/*.mjs", "scripts/**/*.ts"],
rules: {
...tseslint.configs.disableTypeChecked.rules,
"@typescript-eslint/explicit-function-return-type": "off",
"no-console": "off",
"no-undef": "off",
},
},
{
files: ["src/type-tests/**/*.type-test.ts"],
rules: {
"@typescript-eslint/no-meaningless-void-operator": "off",
},
},
prettier,
// curly must come AFTER prettier — eslint-config-prettier disables it otherwise
{
Expand Down
Loading
Loading