@commercengine/storefront-sdk 0.4.8 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +52 -1
- package/package.json +6 -2
package/README.md
CHANGED
|
@@ -407,6 +407,57 @@ The SDK implements CommerceEngine API best practices automatically:
|
|
|
407
407
|
- ✅ **Timeout handling** with configurable limits
|
|
408
408
|
- ✅ **Memory leak prevention** with proper cleanup
|
|
409
409
|
|
|
410
|
+
## Contributing
|
|
411
|
+
|
|
412
|
+
### Version Management with Changeset
|
|
413
|
+
|
|
414
|
+
This project uses [Changeset](https://github.com/changesets/changesets) for version management and publishing. Here's how to contribute:
|
|
415
|
+
|
|
416
|
+
#### Creating Changes
|
|
417
|
+
|
|
418
|
+
When you make changes to the SDK, create a changeset to document them:
|
|
419
|
+
|
|
420
|
+
```bash
|
|
421
|
+
pnpm changeset
|
|
422
|
+
```
|
|
423
|
+
|
|
424
|
+
This will prompt you to:
|
|
425
|
+
- Select the type of change (patch/minor/major)
|
|
426
|
+
- Write a summary of what changed
|
|
427
|
+
- Create a markdown file in the `.changeset/` folder
|
|
428
|
+
|
|
429
|
+
#### Version Types
|
|
430
|
+
|
|
431
|
+
- **Patch** (0.0.x): Bug fixes, documentation updates, internal refactoring
|
|
432
|
+
- **Minor** (0.x.0): New features, new API endpoints, backwards-compatible changes
|
|
433
|
+
- **Major** (x.0.0): Breaking changes, API modifications that affect existing code
|
|
434
|
+
|
|
435
|
+
#### Release Process
|
|
436
|
+
|
|
437
|
+
1. **During Development**: Create changesets for your changes
|
|
438
|
+
```bash
|
|
439
|
+
pnpm changeset
|
|
440
|
+
```
|
|
441
|
+
|
|
442
|
+
2. **Before Release**: Consume changesets and update versions
|
|
443
|
+
```bash
|
|
444
|
+
pnpm version
|
|
445
|
+
```
|
|
446
|
+
This updates `package.json`, generates/updates `CHANGELOG.md`, and removes consumed changesets.
|
|
447
|
+
|
|
448
|
+
3. **Publishing**: Build and publish to npm
|
|
449
|
+
```bash
|
|
450
|
+
pnpm release
|
|
451
|
+
```
|
|
452
|
+
|
|
453
|
+
#### Available Scripts
|
|
454
|
+
|
|
455
|
+
- `pnpm changeset` - Create a new changeset
|
|
456
|
+
- `pnpm version` - Consume changesets and bump version
|
|
457
|
+
- `pnpm release` - Build and publish to npm
|
|
458
|
+
|
|
459
|
+
The changeset workflow ensures proper semantic versioning, comprehensive changelogs, and coordinated releases.
|
|
460
|
+
|
|
410
461
|
## License
|
|
411
462
|
|
|
412
|
-
|
|
463
|
+
All Rights Reserved
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commercengine/storefront-sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "TypeScript SDK for the Storefront API",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
"author": "Commerce Engine",
|
|
27
27
|
"license": "All rights reserved",
|
|
28
28
|
"devDependencies": {
|
|
29
|
+
"@changesets/cli": "^2.29.6",
|
|
29
30
|
"@types/node": "^24.3.0",
|
|
30
31
|
"openapi-typescript": "^7.9.1",
|
|
31
32
|
"rimraf": "^6.0.1",
|
|
@@ -43,6 +44,9 @@
|
|
|
43
44
|
"build": "tsup",
|
|
44
45
|
"generate-types": "openapi-typescript https://openapi.commercengine.io/ce-storefront.json --output src/types/storefront.d.ts",
|
|
45
46
|
"generate-typed-exports": "python3 src/types/generate-typed-exports.py --input src/types/storefront.d.ts --output src/types/storefront-api-types.ts",
|
|
46
|
-
"clean": "rimraf dist"
|
|
47
|
+
"clean": "rimraf dist",
|
|
48
|
+
"changeset": "changeset",
|
|
49
|
+
"version": "changeset version && pnpm install --lockfile-only",
|
|
50
|
+
"release": "pnpm run build && changeset publish"
|
|
47
51
|
}
|
|
48
52
|
}
|