Skip to content

Commit 16b8b0a

Browse files
committed
docs: update README with module support and CHANGELOG for v0.6.3-0.6.4
- Add ESM/CommonJS usage examples - Add webpack configuration guide - Update documentation section with docs:serve command - Add CHANGELOG entries for v0.6.3 and v0.6.4
1 parent 78198c3 commit 16b8b0a

File tree

2 files changed

+47
-1
lines changed

2 files changed

+47
-1
lines changed

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [0.6.4] - 2025-01-13
11+
12+
### Added
13+
- Enhanced webpack compatibility for client-side usage
14+
- Improved TypeScript type definitions
15+
- Additional documentation for module usage patterns
16+
17+
## [0.6.3] - 2025-01-05
18+
19+
### Changed
20+
- Updated dependency versions for better compatibility
21+
- Improved error handling in key management functions
22+
1023
## [0.6.2] - 2024-12-29
1124

1225
### Changed

README.md

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,35 @@ const isValid = await isDelegationValid(delegation);
180180
const expiry = getDelegationExpiry(delegation);
181181
```
182182

183+
## Module Support
184+
185+
This package supports both ESM and CommonJS usage:
186+
187+
### ESM (recommended)
188+
```typescript
189+
import { generateKeyPairWithSeed } from 'nostr-nsec-seedphrase';
190+
```
191+
192+
### CommonJS
193+
```javascript
194+
const { generateKeyPairWithSeed } = require('nostr-nsec-seedphrase');
195+
```
196+
197+
### Webpack Usage
198+
The package is fully compatible with webpack for client-side applications. Add to your webpack config:
199+
200+
```javascript
201+
module.exports = {
202+
resolve: {
203+
fallback: {
204+
"crypto": require.resolve("crypto-browserify"),
205+
"stream": require.resolve("stream-browserify"),
206+
"buffer": require.resolve("buffer/")
207+
}
208+
}
209+
};
210+
```
211+
183212
## Documentation
184213

185214
The library includes comprehensive TypeScript types and JSDoc documentation. You can:
@@ -189,7 +218,11 @@ The library includes comprehensive TypeScript types and JSDoc documentation. You
189218
```bash
190219
npm run docs
191220
```
192-
3. Access the generated documentation in the `docs` directory
221+
3. View the generated documentation locally:
222+
```bash
223+
npm run docs:serve
224+
```
225+
4. Access the generated documentation in the `docs` directory
193226

194227
### Key Format Utilities
195228

0 commit comments

Comments
 (0)