@tpzdsp/next-toolkit 2.1.0 → 2.2.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.
Files changed (2) hide show
  1. package/README.md +23 -1
  2. package/package.json +7 -4
package/README.md CHANGED
@@ -559,10 +559,32 @@ import '@your-org/nextjs-library/src/assets/styles/globals.css';
559
559
  4. Add tests for your changes (`src/test/YourComponent.test.tsx`)
560
560
  5. Run the test suite (`pnpm test`)
561
561
  6. Test with yalc in a real Next.js app
562
- 7. Commit your changes (`git commit -m 'Add some amazing feature'`)
562
+ 7. Commit your changes following the [Angular commit message guidelines](https://github.com/angular/angular/blob/main/contributing-docs/commit-message-guidelines.md) the `commit-msg` hook enforces this via commitlint
563
563
  8. Push to the branch (`git push origin feature/amazing-feature`)
564
564
  9. Open a Pull Request
565
565
 
566
+ ### Commit Convention
567
+
568
+ We follow the [Angular commit message guidelines](https://github.com/angular/angular/blob/main/contributing-docs/commit-message-guidelines.md). Commits are validated by [commitlint](https://commitlint.io/) on every `git commit`. Allowed types come from `@commitlint/config-conventional`. Allowed scopes are defined in `commitlint.config.ts` — edit that file to add or remove scopes.
569
+
570
+ #### Smoke-testing the commit hook
571
+
572
+ Run these directly in the terminal to verify the hook is working after any changes to `commitlint.config.ts`:
573
+
574
+ ```bash
575
+ # Should be rejected — wrong type
576
+ printf 'feature(map): bad type\n\nBody text here explaining the change.' | pnpm commitlint
577
+
578
+ # Should be rejected — unknown scope
579
+ printf 'feat(unknown): bad scope\n\nBody text here explaining the change.' | pnpm commitlint
580
+
581
+ # Should be rejected — missing body
582
+ printf 'feat(map): missing body\n' | pnpm commitlint
583
+
584
+ # Should pass
585
+ printf 'feat(map): valid message\n\nThis explains what changed and why.' | pnpm commitlint
586
+ ```
587
+
566
588
  ### Code Style
567
589
 
568
590
  - Use TypeScript for all files
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tpzdsp/next-toolkit",
3
- "version": "2.1.0",
3
+ "version": "2.2.0",
4
4
  "description": "A reusable React component library for Next.js applications",
5
5
  "packageManager": "pnpm@11.5.3",
6
6
  "engines": {
@@ -9,17 +9,17 @@
9
9
  },
10
10
  "type": "module",
11
11
  "private": false,
12
- "homepage": "https://github.com/DSP3-apps/next-toolkit#readme",
12
+ "homepage": "https://github.com/agrimetrics/next-toolkit#readme",
13
13
  "author": "Mark Small",
14
14
  "publishConfig": {
15
15
  "access": "public"
16
16
  },
17
17
  "repository": {
18
18
  "type": "git",
19
- "url": "git+https://github.com/DSP3-apps/next-toolkit.git"
19
+ "url": "git+https://github.com/agrimetrics/next-toolkit.git"
20
20
  },
21
21
  "bugs": {
22
- "url": "https://github.com/DSP3-apps/next-toolkit/issues"
22
+ "url": "https://github.com/agrimetrics/next-toolkit/issues"
23
23
  },
24
24
  "main": "./src/index.ts",
25
25
  "module": "./src/index.ts",
@@ -127,6 +127,9 @@
127
127
  },
128
128
  "devDependencies": {
129
129
  "@better-fetch/fetch": "^1.1.21",
130
+ "@commitlint/cli": "^21.1.0",
131
+ "@commitlint/config-conventional": "^21.1.0",
132
+ "@commitlint/types": "^21.1.0",
130
133
  "@floating-ui/react": "^0.27.17",
131
134
  "@storybook/addon-docs": "10.3.5",
132
135
  "@storybook/addon-links": "10.3.5",