Commit fea85b5
authored
fix: types with ipjs build (#165)
Currently, the published package.json has `"types": "dist/src/index.d.ts"` and should be `"types": "src/index.d.ts",` according to where the types really are.
The problem here is that we need to both:
- have type paths correct in the dist folder
- have type paths correct for local dev in src
Given the path will change, we need to guarantee this is updated in the build `package.json`. Using an approach like `multiformats` and `uint8arrays` having a `types` folder which is moved to `dist` is not possible because of the inline `d.ts` files in this repo, which will be inside `dist` folder as `dist/src/*.d.ts`, breaking the imports from the types around it.
With the above in mind, this PR adds a postbuild script where the package.json is changed in post build to have `dist` removed.1 parent 2ea467f commit fea85b5
File tree
4 files changed
+5
-1
lines changed- packages
- ipfs-unixfs-exporter
- ipfs-unixfs-importer
- ipfs-unixfs
4 files changed
+5
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| |||
0 commit comments