Commit 586e6ea
fix types exposure in build process (#186)
* fix types exposure in build process
- ignore rollup dynamic files
- remove outdated copy script
- fix path of the generated type definition
- remove outdated index.d.ts that contain incoherent duplicated types (probably old type definition)
* move exposed definitions directly at the root of dist instead of dist/src
this fixes typescript error in userland
- restore path of the exposed type definition
* Add types field to package.json
Fixes the types exposure by pointing package.json 'types' field to the generated index.d.ts file. This ensures TypeScript consumers can find the type definitions.
* Extract version to src/version.ts module
Addresses CodeRabbit's concern about rootDir: 'src' constraint.
Instead of importing ../package.json directly from src/FieldArray.ts
(which violates the rootDir boundary), we now:
1. Create src/version.ts that imports package.json and exports version
2. Have FieldArray import from ./version instead
This keeps all TypeScript imports within the src/ directory and
generates cleaner .d.ts files that don't reference ../package.json.
---------
Co-authored-by: Erik Rasmussen <erik@mini.local>1 parent 34cb258 commit 586e6ea
File tree
7 files changed
+13
-80
lines changed- src
7 files changed
+13
-80
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
| 14 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
31 | | - | |
| 30 | + | |
32 | 31 | | |
33 | 32 | | |
34 | 33 | | |
| |||
53 | 52 | | |
54 | 53 | | |
55 | 54 | | |
56 | | - | |
57 | 55 | | |
58 | 56 | | |
59 | 57 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
125 | | - | |
| 125 | + | |
| 126 | + | |
126 | 127 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | | - | |
| 7 | + | |
9 | 8 | | |
10 | 9 | | |
11 | 10 | | |
| |||
45 | 44 | | |
46 | 45 | | |
47 | 46 | | |
48 | | - | |
| 47 | + | |
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
13 | | - | |
| 14 | + | |
0 commit comments