@mxpicture/http-status-codes 0.1.5 → 0.1.11
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 +12 -2
- package/package.json +5 -7
package/README.md
CHANGED
|
@@ -11,13 +11,13 @@ Usage (after npm publish or local link):
|
|
|
11
11
|
ESM:
|
|
12
12
|
|
|
13
13
|
```js
|
|
14
|
-
import {
|
|
14
|
+
import { StatusCodes } from "http-status-codes-lib";
|
|
15
15
|
```
|
|
16
16
|
|
|
17
17
|
CommonJS:
|
|
18
18
|
|
|
19
19
|
```js
|
|
20
|
-
const {
|
|
20
|
+
const { StatusCodes } = require("http-status-codes-lib");
|
|
21
21
|
```
|
|
22
22
|
|
|
23
23
|
Build:
|
|
@@ -26,3 +26,13 @@ Build:
|
|
|
26
26
|
npm install
|
|
27
27
|
npm run build
|
|
28
28
|
```
|
|
29
|
+
|
|
30
|
+
## Setup husky
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
npm install --save-dev @commitlint/config-conventional @commitlint/cli husky commitizen cz-conventional-changelog husky
|
|
34
|
+
npx husky-init
|
|
35
|
+
npm i
|
|
36
|
+
npm run prepare
|
|
37
|
+
npx husky add .husky/commit-msg 'npx --no -- commitlint --edit "$1"'
|
|
38
|
+
```
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mxpicture/http-status-codes",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.11",
|
|
4
4
|
"description": "Http Status Codes, publishing both CommonJS and ESM builds",
|
|
5
5
|
"author": "MXPicture",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
|
9
|
-
"url": "git+https://github.com/MXPicture/
|
|
9
|
+
"url": "git+https://github.com/MXPicture/npm-http-status-codes"
|
|
10
10
|
},
|
|
11
11
|
"main": "dist/cjs/index.js",
|
|
12
12
|
"module": "dist/esm/index.js",
|
|
@@ -23,20 +23,18 @@
|
|
|
23
23
|
"dist/"
|
|
24
24
|
],
|
|
25
25
|
"engines": {
|
|
26
|
-
"node": "
|
|
26
|
+
"node": ">=22"
|
|
27
27
|
},
|
|
28
28
|
"scripts": {
|
|
29
29
|
"commit": "git-cz",
|
|
30
|
-
"
|
|
30
|
+
"postinstall": "husky install",
|
|
31
31
|
"clean": "rm -rf dist .tsbuildinfo",
|
|
32
32
|
"build:types": "tsc -p tsconfig.types.json",
|
|
33
33
|
"build:cjs": "tsc -p tsconfig.cjs.json",
|
|
34
34
|
"build:esm": "tsc -p tsconfig.esm.json",
|
|
35
35
|
"build": "npm run clean && npm run build:types && npm run build:cjs && npm run build:esm",
|
|
36
36
|
"lint": "eslint \"src/**/*.{ts,tsx}\" --ext .ts,.tsx",
|
|
37
|
-
"update": "ncu -u && npm install"
|
|
38
|
-
"build_publish": "npm run build && npm version patch -no-git-tag-version && npm publish --access public",
|
|
39
|
-
"update_build_publish": "npm run update && npm run build_publish"
|
|
37
|
+
"update": "ncu -u && npm install"
|
|
40
38
|
},
|
|
41
39
|
"config": {
|
|
42
40
|
"commitizen": {
|