zod-codegen 1.0.1 → 1.0.2

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.
@@ -16,7 +16,7 @@ jobs:
16
16
  runs-on: ${{ matrix.os }}
17
17
  strategy:
18
18
  matrix:
19
- node-version: [20, 22, 24]
19
+ node-version: ['24.11.1']
20
20
  os: [ubuntu-latest]
21
21
 
22
22
  steps:
@@ -50,7 +50,7 @@ jobs:
50
50
  run: npm run test:coverage
51
51
 
52
52
  - name: Upload coverage to Codecov
53
- if: matrix.node-version == 20 && matrix.os == 'ubuntu-latest'
53
+ if: matrix.node-version == '24.11.1' && matrix.os == 'ubuntu-latest'
54
54
  uses: codecov/codecov-action@v5
55
55
  with:
56
56
  token: ${{ secrets.CODECOV_TOKEN }}
@@ -69,7 +69,7 @@ jobs:
69
69
  - name: Setup Node.js
70
70
  uses: actions/setup-node@v5
71
71
  with:
72
- node-version: 20
72
+ node-version: '24.11.1'
73
73
  cache: 'npm'
74
74
 
75
75
  - name: Install dependencies
@@ -90,7 +90,7 @@ jobs:
90
90
  - name: Setup Node.js
91
91
  uses: actions/setup-node@v5
92
92
  with:
93
- node-version: 22
93
+ node-version: '24.11.1'
94
94
  cache: 'npm'
95
95
 
96
96
  - name: Install dependencies
@@ -128,7 +128,7 @@ jobs:
128
128
  - name: Setup Node.js
129
129
  uses: actions/setup-node@v5
130
130
  with:
131
- node-version: 22
131
+ node-version: '24.11.1'
132
132
  cache: 'npm'
133
133
 
134
134
  - name: Install dependencies
@@ -28,7 +28,7 @@ jobs:
28
28
  - name: Setup Node.js
29
29
  uses: actions/setup-node@v5
30
30
  with:
31
- node-version: 22
31
+ node-version: '24.11.1'
32
32
  cache: 'npm'
33
33
  registry-url: 'https://registry.npmjs.org'
34
34
 
package/.nvmrc CHANGED
@@ -1 +1 @@
1
- 20.18.0
1
+ 24.11.1
package/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## <small>1.0.2 (2025-11-12)</small>
2
+
3
+ - Merge pull request #25 from julienandreu/refactor/modernize-typescript-strict-mode ([9614fbd](https://github.com/julienandreu/zod-codegen/commit/9614fbd)), closes [#25](https://github.com/julienandreu/zod-codegen/issues/25)
4
+ - chore: update package-lock.json and pin Node.js to 24.11.1 in CI ([b165b43](https://github.com/julienandreu/zod-codegen/commit/b165b43))
5
+ - ci: update workflows to use Node.js 24 only ([1b56ad8](https://github.com/julienandreu/zod-codegen/commit/1b56ad8))
6
+ - refactor: modernize TypeScript to strict mode and fix all linting errors ([0dc2911](https://github.com/julienandreu/zod-codegen/commit/0dc2911))
7
+
1
8
  ## <small>1.0.1 (2025-09-16)</small>
2
9
 
3
10
  - Merge pull request #10 from julienandreu/dependabot/npm_and_yarn/eslint-config-prettier-10.1.8 ([d9b786c](https://github.com/julienandreu/zod-codegen/commit/d9b786c)), closes [#10](https://github.com/julienandreu/zod-codegen/issues/10)
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "zod-codegen",
3
- "version": "0.1.0-alpha.1",
4
- "description": "Zod code generator"
3
+ "version": "1.0.1",
4
+ "description": "A powerful TypeScript code generator that creates Zod schemas and type-safe clients from OpenAPI specifications"
5
5
  }
@@ -23,7 +23,7 @@ export class Generator {
23
23
  }
24
24
  async run() {
25
25
  try {
26
- const rawSource = this.readFile();
26
+ const rawSource = await this.readFile();
27
27
  const openApiSpec = this.parseFile(rawSource);
28
28
  const generatedCode = this.generateCode(openApiSpec);
29
29
  this.writeFile(generatedCode);
@@ -40,8 +40,8 @@ export class Generator {
40
40
  return Promise.resolve(1);
41
41
  }
42
42
  }
43
- readFile() {
44
- return this.fileReader.readFile(this.inputPath);
43
+ async readFile() {
44
+ return await this.fileReader.readFile(this.inputPath);
45
45
  }
46
46
  parseFile(source) {
47
47
  return this.fileParser.parse(source);
@@ -131,7 +131,6 @@ export class FetchHttpClient {
131
131
  }
132
132
  try {
133
133
  const text = await response.text();
134
- // eslint-disable-next-line @typescript-eslint/no-unsafe-return
135
134
  return text ? JSON.parse(text) : {};
136
135
  }
137
136
  catch {