Skip to content

Commit b910260

Browse files
authored
Merge pull request #51 from authorizerdev/chore-v2
Chore v2
2 parents 6a39f3d + 1c8b698 commit b910260

49 files changed

Lines changed: 8292 additions & 23296 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/release.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*.*.*"
7+
8+
jobs:
9+
release:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
14+
- name: Setup Node.js
15+
uses: actions/setup-node@v4
16+
with:
17+
node-version: "18"
18+
registry-url: "https://registry.npmjs.org"
19+
20+
- name: Install dependencies
21+
run: make install
22+
23+
- name: Build
24+
run: make build
25+
26+
- name: Publish to npm
27+
run: |
28+
if [[ "${{ github.ref }}" =~ -rc\.[0-9]+$ ]]; then
29+
make publish-rc
30+
else
31+
make publish
32+
fi
33+
env:
34+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

CHANGELOG.md

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [2.0.0-rc.1] - 2025-12-30
9+
10+
### 🚀 Major Changes
11+
12+
#### Build System Migration
13+
- **BREAKING**: Migrated from `tsdx` to `tsup` for faster builds and better TypeScript support
14+
- Updated build output format:
15+
- CJS: `dist/index.cjs` (was `dist/index.js`)
16+
- ESM: `dist/index.mjs` (was `dist/authorizer-react.esm.js`)
17+
- Types: `dist/index.d.ts`
18+
- Added modern `exports` field in package.json for better module resolution
19+
20+
#### Dependencies Update
21+
- **BREAKING**: Updated `@authorizerdev/authorizer-js` from `^2.0.3` to `3.0.0-rc.1`
22+
- Updated React from `^18.2.0` to `^18.3.1` (dev dependency)
23+
- Updated TypeScript from `^5.2.2` to `^5.7.2`
24+
- Updated Storybook from `^8.2.7` to `8.4.0` (pinned versions)
25+
- Updated all other dev dependencies to latest stable versions
26+
- **BREAKING**: Minimum Node.js version increased from `>=10` to `>=18`
27+
28+
#### Type System Updates
29+
- **BREAKING**: Updated type imports to match authorizer-js v3:
30+
- `SignupInput``SignUpRequest`
31+
- `LoginInput``LoginRequest`
32+
- `VerifyOtpInput``VerifyOTPRequest`
33+
- `MagicLinkLoginInput``MagicLinkLoginRequest`
34+
- Fixed token type handling to use full `AuthResponse` instead of partial objects
35+
- Added null safety checks for `expires_in` field
36+
37+
#### Code Modernization
38+
- Removed unused React imports (using new JSX transform)
39+
- Updated all components to use modern React patterns
40+
- Fixed TypeScript strict mode compliance
41+
- Improved type safety throughout the codebase
42+
43+
### ✨ New Features
44+
- Added `type-check` script for TypeScript validation
45+
- Improved ESLint configuration with React and TypeScript support
46+
- Better error handling and type safety
47+
48+
### 🔧 Technical Improvements
49+
- Faster build times with tsup (esbuild-based)
50+
- Better tree-shaking and code splitting
51+
- Improved source maps
52+
- Modern module resolution with package.json exports
53+
54+
### 📝 Migration Guide
55+
56+
If you're upgrading from v1.x:
57+
58+
1. **Update your imports** (if using types directly):
59+
```typescript
60+
// Old
61+
import { SignupInput, LoginInput } from '@authorizerdev/authorizer-js';
62+
63+
// New
64+
import { SignUpRequest, LoginRequest } from '@authorizerdev/authorizer-js';
65+
```
66+
67+
2. **Ensure Node.js >= 18** is installed
68+
69+
3. **Rebuild your project** after updating the package
70+
71+
### ⚠️ Breaking Changes
72+
- Build output file names changed (CJS/ESM)
73+
- Type names updated to match authorizer-js v3
74+
- Minimum Node.js version is now 18+
75+
- Some internal APIs may have changed
76+
77+
---
78+
79+
## [1.3.3] - Previous Release
80+
81+
Previous stable release before major v2.0.0 update.
82+

0 commit comments

Comments
 (0)