@alessiofrittoli/type-utils 1.0.1 → 1.1.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.0.1
3
+ Version 1.1.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.0.1",
3
+ "version": "1.1.0",
4
4
  "description": "Lightweight TypeScript types utilities",
5
5
  "author": {
6
6
  "name": "Alessio Frittoli",
@@ -31,12 +31,12 @@
31
31
  "postinstall": "node scripts/postinstall/index.js"
32
32
  },
33
33
  "devDependencies": {
34
- "@eslint/js": "^9.15.0",
35
- "@types/node": "^22.10.0",
36
- "eslint": "^9.15.0",
37
- "globals": "^15.12.0",
34
+ "@eslint/js": "^9.17.0",
35
+ "@types/node": "^22.10.2",
36
+ "eslint": "^9.17.0",
37
+ "globals": "^15.14.0",
38
38
  "tsup": "^8.3.5",
39
39
  "typescript": "^5.7.2",
40
- "typescript-eslint": "^8.16.0"
40
+ "typescript-eslint": "^8.18.1"
41
41
  }
42
42
  }
@@ -7,6 +7,7 @@ const tsSetup = () => {
7
7
 
8
8
  const projectName = project.name.replace( '@alessiofrittoli/', '' )
9
9
  const projectRoot = process.env.INIT_CWD || process.cwd()
10
+ const typesFilename = `${ projectName }.d.ts`
10
11
 
11
12
  if ( projectRoot.endsWith( projectName ) ) {
12
13
  console.log( `Skip "postinstall" script. Running in ${ project.name }` )
@@ -17,7 +18,7 @@ const tsSetup = () => {
17
18
  process.exit( 1 )
18
19
  }
19
20
 
20
- const tsconfigPath = path.resolve( projectRoot, 'type-utils.d.ts' )
21
+ const tsconfigPath = path.resolve( projectRoot, typesFilename )
21
22
 
22
23
  const data = [
23
24
  `/// <reference types="${ project.name }" />`,
@@ -26,10 +27,10 @@ const tsSetup = () => {
26
27
 
27
28
  try {
28
29
  fs.writeFileSync( tsconfigPath, data )
29
- console.log( '"type-utils.d.ts" has been created at the root of your project.' )
30
+ console.log( `"${ typesFilename }" has been created at the root of your project.` )
30
31
  console.log( 'Please update your tsconfig.json to add this file in your "include" property of your tsconfig.json file.' )
31
32
  } catch ( error ) {
32
- console.error( 'An error occured while creating "type-utils.d.ts" at the root of your project. Some global types may not working as expect.', error )
33
+ console.error( `An error occured while creating "${ typesFilename }" at the root of your project. Some global types may not working as expect.`, error )
33
34
  process.exit( 1 )
34
35
  }
35
36