@alessiofrittoli/type-utils 1.5.0 → 1.6.1

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 CHANGED
@@ -1,26 +1,43 @@
1
1
  # Type Utils ❇️
2
2
 
3
- Version 1.5.0
3
+ [![NPM Latest Version][version-badge]][npm-url] [![Socket Status][socket-badge]][socket-url] [![NPM Monthly Downloads][downloads-badge]][npm-url] [![Dependencies][deps-badge]][deps-url]
4
+
5
+ [![GitHub Sponsor][sponsor-badge]][sponsor-url]
6
+
7
+ [version-badge]: https://img.shields.io/npm/v/%40alessiofrittoli%2Ftype-utils
8
+ [npm-url]: https://npmjs.org/package/%40alessiofrittoli%2Ftype-utils
9
+ [socket-badge]: https://socket.dev/api/badge/npm/package/@alessiofrittoli/type-utils
10
+ [socket-url]: https://socket.dev/npm/package/@alessiofrittoli/type-utils/overview
11
+ [downloads-badge]: https://img.shields.io/npm/dm/%40alessiofrittoli%2Ftype-utils.svg
12
+ [deps-badge]: https://img.shields.io/librariesio/release/npm/%40alessiofrittoli%2Ftype-utils
13
+ [deps-url]: https://libraries.io/npm/%40alessiofrittoli%2Ftype-utils
14
+
15
+ [sponsor-badge]: https://img.shields.io/static/v1?label=Fund%20this%20package&message=%E2%9D%A4&logo=GitHub&color=%23DB61A2
16
+ [sponsor-url]: https://github.com/sponsors/alessiofrittoli
4
17
 
5
18
  ## Lightweight TypeScript types utilities
6
19
 
7
20
  ### Table of Contents
8
21
 
9
- - [Getting started](#gettingstarted)
22
+ - [Getting started](#getting-started)
10
23
  - [Utility types](https://github.com/alessiofrittoli/type-utils/blob/master/docs/utils/README.md)
11
- - [ValueOf](https://github.com/alessiofrittoli/type-utils/blob/master/docs/utils/README.md#valueof)
12
- - [ValueOfKey](https://github.com/alessiofrittoli/type-utils/blob/master/docs/utils/README.md#valueofkey)
13
- - [OptionalKey](https://github.com/alessiofrittoli/type-utils/blob/master/docs/utils/README.md#optionalkey)
14
- - [Writeable](https://github.com/alessiofrittoli/type-utils/blob/master/docs/utils/README.md#writeable)
15
- - [RenameKey](https://github.com/alessiofrittoli/type-utils/blob/master/docs/utils/README.md#renamekey)
16
- - [ArgumentTypes](https://github.com/alessiofrittoli/type-utils/blob/master/docs/utils/README.md#argumenttypes)
24
+ - [ValueOf](https://github.com/alessiofrittoli/type-utils/blob/master/docs/utils/README.md#valueof)
25
+ - [ValueOfKey](https://github.com/alessiofrittoli/type-utils/blob/master/docs/utils/README.md#valueofkey)
26
+ - [OptionalKey](https://github.com/alessiofrittoli/type-utils/blob/master/docs/utils/README.md#optionalkey)
27
+ - [Writeable](https://github.com/alessiofrittoli/type-utils/blob/master/docs/utils/README.md#writeable)
28
+ - [RenameKey](https://github.com/alessiofrittoli/type-utils/blob/master/docs/utils/README.md#renamekey)
29
+ - [ArgumentTypes](https://github.com/alessiofrittoli/type-utils/blob/master/docs/utils/README.md#argumenttypes)
17
30
  - [Extenders types](https://github.com/alessiofrittoli/type-utils/blob/master/docs/extenders/README.md)
18
- - [JSON](https://github.com/alessiofrittoli/type-utils/blob/master/docs/extenders/README.md#json)
19
- - [JSON.stringify\<T\>()](https://github.com/alessiofrittoli/type-utils/blob/master/docs/extenders/README.md#jsonstringifyt)
20
- - [JSON.parse\<T\>()](https://github.com/alessiofrittoli/type-utils/blob/master/docs/extenders/README.md#jsonparset)
21
- - [Body](https://github.com/alessiofrittoli/type-utils/blob/master/docs/extenders/README.md#body)
22
- - [Body.json\<T\>()](https://github.com/alessiofrittoli/type-utils/blob/master/docs/extenders/README.md#bodyjsont)
23
- - [ESLint](#eslint)
31
+ - [JSON](https://github.com/alessiofrittoli/type-utils/blob/master/docs/extenders/README.md#json)
32
+ - [JSON.stringify\<T\>()](https://github.com/alessiofrittoli/type-utils/blob/master/docs/extenders/README.md#jsonstringifyt)
33
+ - [JSON.parse\<T\>()](https://github.com/alessiofrittoli/type-utils/blob/master/docs/extenders/README.md#jsonparset)
34
+ - [Body](https://github.com/alessiofrittoli/type-utils/blob/master/docs/extenders/README.md#body)
35
+ - [Body.json\<T\>()](https://github.com/alessiofrittoli/type-utils/blob/master/docs/extenders/README.md#bodyjsont)
36
+ - [Development](#development)
37
+ - [Install depenendencies](#install-depenendencies)
38
+ - [Build the source code](#build-the-source-code)
39
+ - [ESLint](#eslint)
40
+ - [Contributing](#contributing)
24
41
  - [Security](#security)
25
42
  - [Credits](#made-with-)
26
43
 
@@ -48,10 +65,10 @@ If that fail, please, make sure to add `alessiofrittoli-env.d.ts` in the array o
48
65
 
49
66
  ```json
50
67
  {
51
- "compilerOptions": {
52
- ...
53
- },
54
- "include": [ ..., "alessiofrittoli-env.d.ts" ],
68
+ "compilerOptions": {
69
+ ...
70
+ },
71
+ "include": [ ..., "alessiofrittoli-env.d.ts" ],
55
72
  }
56
73
  ```
57
74
 
@@ -65,7 +82,29 @@ node node_modules/@alessiofrittoli/type-utils/scripts/postinstall/index.js
65
82
 
66
83
  ---
67
84
 
68
- ### [ESLint](https://www.npmjs.com/package/eslint)
85
+ ### Development
86
+
87
+ #### Install depenendencies
88
+
89
+ ```bash
90
+ npm install
91
+ ```
92
+
93
+ or using `pnpm`
94
+
95
+ ```bash
96
+ pnpm i
97
+ ```
98
+
99
+ #### Build the source code
100
+
101
+ Run the following command to test and build code for distribution.
102
+
103
+ ```bash
104
+ pnpm build
105
+ ```
106
+
107
+ #### [ESLint](https://www.npmjs.com/package/eslint)
69
108
 
70
109
  warnings / errors check.
71
110
 
@@ -77,9 +116,14 @@ pnpm lint
77
116
 
78
117
  ### Contributing
79
118
 
80
- Contributions are truly welcome!\
119
+ Contributions are truly welcome!
120
+
81
121
  Please refer to the [Contributing Doc](./CONTRIBUTING.md) for more information on how to start contributing to this project.
82
122
 
123
+ Help keep this project up to date with [GitHub Sponsor][sponsor-url].
124
+
125
+ [![GitHub Sponsor][sponsor-badge]][sponsor-url]
126
+
83
127
  ---
84
128
 
85
129
  ### Security
@@ -89,30 +133,30 @@ If you believe you have found a security vulnerability, we encourage you to **_r
89
133
  ### Made with ☕
90
134
 
91
135
  <table style='display:flex;gap:20px;'>
92
- <tbody>
93
- <tr>
94
- <td>
95
- <img src='https://avatars.githubusercontent.com/u/35973186' style='width:60px;border-radius:50%;object-fit:contain;'>
96
- </td>
97
- <td>
98
- <table style='display:flex;gap:2px;flex-direction:column;'>
99
- <tbody>
100
- <tr>
101
- <td>
102
- <a href='https://github.com/alessiofrittoli' target='_blank' rel='noopener'>Alessio Frittoli</a>
103
- </td>
104
- </tr>
105
- <tr>
106
- <td>
107
- <small>
108
- <a href='https://alessiofrittoli.it' target='_blank' rel='noopener'>https://alessiofrittoli.it</a> |
109
- <a href='mailto:info@alessiofrittoli.it' target='_blank' rel='noopener'>info@alessiofrittoli.it</a>
110
- </small>
111
- </td>
112
- </tr>
113
- </tbody>
114
- </table>
115
- </td>
116
- </tr>
117
- </tbody>
118
- </table>
136
+ <tbody>
137
+ <tr>
138
+ <td>
139
+ <img alt="avatar" src='https://avatars.githubusercontent.com/u/35973186' style='width:60px;border-radius:50%;object-fit:contain;'>
140
+ </td>
141
+ <td>
142
+ <table style='display:flex;gap:2px;flex-direction:column;'>
143
+ <tbody>
144
+ <tr>
145
+ <td>
146
+ <a href='https://github.com/alessiofrittoli' target='_blank' rel='noopener'>Alessio Frittoli</a>
147
+ </td>
148
+ </tr>
149
+ <tr>
150
+ <td>
151
+ <small>
152
+ <a href='https://alessiofrittoli.it' target='_blank' rel='noopener'>https://alessiofrittoli.it</a> |
153
+ <a href='mailto:info@alessiofrittoli.it' target='_blank' rel='noopener'>info@alessiofrittoli.it</a>
154
+ </small>
155
+ </td>
156
+ </tr>
157
+ </tbody>
158
+ </table>
159
+ </td>
160
+ </tr>
161
+ </tbody>
162
+ </table>
package/dist/index.js CHANGED
@@ -1 +1,2 @@
1
- 'use strict';
1
+ 'use strict';//# sourceMappingURL=index.js.map
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"index.js"}
package/dist/index.mjs CHANGED
@@ -0,0 +1,2 @@
1
+ //# sourceMappingURL=index.mjs.map
2
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"index.mjs"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alessiofrittoli/type-utils",
3
- "version": "1.5.0",
3
+ "version": "1.6.1",
4
4
  "description": "Lightweight TypeScript types utilities",
5
5
  "author": {
6
6
  "name": "Alessio Frittoli",
@@ -8,8 +8,15 @@
8
8
  "url": "https://alessiofrittoli.it"
9
9
  },
10
10
  "license": "MIT",
11
+ "funding": [
12
+ {
13
+ "type": "github",
14
+ "url": "https://github.com/sponsors/alessiofrittoli"
15
+ }
16
+ ],
11
17
  "keywords": [
12
- "typescript"
18
+ "typescript",
19
+ "type-utils"
13
20
  ],
14
21
  "homepage": "https://github.com/alessiofrittoli/type-utils#readme",
15
22
  "bugs": {
@@ -25,7 +32,7 @@
25
32
  "types": "./dist/index.d.ts",
26
33
  "files": [
27
34
  "dist",
28
- "scripts"
35
+ "scripts/postinstall"
29
36
  ],
30
37
  "scripts": {
31
38
  "build": "pnpm lint && tsup",
@@ -35,16 +42,21 @@
35
42
  "postinstall": "node scripts/postinstall/index.js"
36
43
  },
37
44
  "devDependencies": {
38
- "@eslint/js": "^9.17.0",
39
- "@types/node": "^22.10.2",
40
- "eslint": "^9.17.0",
41
- "globals": "^15.14.0",
42
- "tsup": "^8.3.5",
43
- "typescript": "^5.7.2",
44
- "typescript-eslint": "^8.18.2"
45
+ "@eslint/js": "^9.22.0",
46
+ "@types/node": "^22.13.10",
47
+ "eslint": "^9.22.0",
48
+ "globals": "^16.0.0",
49
+ "tsup": "^8.4.0",
50
+ "typescript": "^5.8.2",
51
+ "typescript-eslint": "^8.26.1"
45
52
  },
46
53
  "dependencies": {
47
- "@alessiofrittoli/chain-functions": "^2.0.0",
48
- "@alessiofrittoli/node-scripts": "2.2.1"
54
+ "@alessiofrittoli/chain-functions": "^2.0.1",
55
+ "@alessiofrittoli/node-scripts": "2.3.1"
56
+ },
57
+ "pnpm": {
58
+ "onlyBuiltDependencies": [
59
+ "esbuild"
60
+ ]
49
61
  }
50
62
  }
@@ -1,2 +0,0 @@
1
- require( '@alessiofrittoli/node-scripts/publish' )
2
- .publish()