@alessiofrittoli/type-utils 1.3.0 → 1.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  # Type Utils ❇️
2
2
 
3
- Version 1.3.0
3
+ Version 1.5.0
4
4
 
5
5
  ## Lightweight TypeScript types utilities
6
6
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alessiofrittoli/type-utils",
3
- "version": "1.3.0",
3
+ "version": "1.5.0",
4
4
  "description": "Lightweight TypeScript types utilities",
5
5
  "author": {
6
6
  "name": "Alessio Frittoli",
@@ -21,6 +21,7 @@
21
21
  "url": "git+https://github.com/alessiofrittoli/type-utils.git"
22
22
  },
23
23
  "main": "./dist/index.js",
24
+ "module": "./dist/index.mjs",
24
25
  "types": "./dist/index.d.ts",
25
26
  "files": [
26
27
  "dist",
@@ -28,7 +29,9 @@
28
29
  ],
29
30
  "scripts": {
30
31
  "build": "pnpm lint && tsup",
32
+ "build:watch": "tsup --watch",
31
33
  "lint": "eslint",
34
+ "release": "node scripts/publish.js --verbose --npm",
32
35
  "postinstall": "node scripts/postinstall/index.js"
33
36
  },
34
37
  "devDependencies": {
@@ -38,10 +41,10 @@
38
41
  "globals": "^15.14.0",
39
42
  "tsup": "^8.3.5",
40
43
  "typescript": "^5.7.2",
41
- "typescript-eslint": "^8.18.1"
44
+ "typescript-eslint": "^8.18.2"
42
45
  },
43
46
  "dependencies": {
44
- "@alessiofrittoli/chain-functions": "^1.0.1",
45
- "@alessiofrittoli/post-install-scripts": "0.2.0"
47
+ "@alessiofrittoli/chain-functions": "^2.0.0",
48
+ "@alessiofrittoli/node-scripts": "2.2.1"
46
49
  }
47
50
  }
@@ -1,14 +1,16 @@
1
- const Chain = require( '@alessiofrittoli/chain-functions' )
1
+ const { Chain } = require( '@alessiofrittoli/chain-functions' )
2
2
  const tsSetup = require( './ts-setup.js' )
3
+ const project = require( '../../package.json' )
3
4
 
4
5
  /** @type {import( '@alessiofrittoli/chain-functions/types' ).LastChainLink<() => void | Promise<void>>} */
5
6
  const lastChainLink = () => () => {
6
- console.log( 'Post-install done.' )
7
+ console.log( {
8
+ package: project.name,
9
+ message: 'Post-Install done'
10
+ } )
7
11
  }
8
12
 
9
13
  /** @type {import( '@alessiofrittoli/chain-functions/types' ).ChainFactory<() => void | Promise<void>>} */
10
14
  const chain = [ tsSetup, lastChainLink ]
11
15
 
12
- ;( async () => {
13
- await Chain.functions( chain )()
14
- } )()
16
+ Chain.functions( chain )()
@@ -1,15 +1,12 @@
1
+ const { addTypesReference } = require( '@alessiofrittoli/node-scripts/postinstall' )
1
2
  const project = require( '../../package.json' )
2
- const { addTypesReference } = require( '@alessiofrittoli/post-install-scripts' )
3
-
4
3
 
5
4
  /** @type {import( '@alessiofrittoli/chain-functions/types' ).ChainLink<() => void | Promise<void>>} */
6
5
  const tsSetup = next => () => {
7
6
 
8
- /** @type {import( '@alessiofrittoli/post-install-scripts/types' ).AddTypesReferenceOptions} */
9
- const options = {
10
- projectName: project.name,
11
- }
12
- addTypesReference( options )
7
+ addTypesReference( {
8
+ name: project.name,
9
+ } )
13
10
 
14
11
  return next()
15
12
  }
@@ -0,0 +1,2 @@
1
+ require( '@alessiofrittoli/node-scripts/publish' )
2
+ .publish()