Commit d82f3e5
authored
feat: enable ESM support via dual-publishing (#1750)
- Configure tsdown to build both CJS and ESM outputs.
- Update package.json exports to support both 'require' and 'import'.
- Fix type hygiene issues by using explicit 'export type'.
- Update protos/update.sh to generate ESM version of compiledFirestore and fix its imports for Node.js compatibility.
- Configure build aliases to handle relative paths to protos correctly in both CJS and ESM builds.
- Add packaging integration test to CI.
~Note: I enabled `esModuleInterop` in tsconfig.release.json to support default imports from CommonJS modules (like cors), which is required for proper ESM interop. This caused some chain-effect that required updating several unit tests and source files to use default imports for other CJS dependencies (e.g., fs, nock, jsonwebtoken) to align with the new compiler configuration.~ Fixed in #1751.1 parent 8bf94c2 commit d82f3e5
File tree
24 files changed
+4951
-308
lines changed- .github/workflows
- protos
- scripts
- bin-test
- src
- params
- v1
- providers
- v2
- providers
24 files changed
+4951
-308
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
| 19 | + | |
| 20 | + | |
23 | 21 | | |
24 | 22 | | |
25 | 23 | | |
26 | 24 | | |
27 | 25 | | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
28 | 47 | | |
29 | 48 | | |
30 | 49 | | |
| |||
35 | 54 | | |
36 | 55 | | |
37 | 56 | | |
38 | | - | |
39 | | - | |
| 57 | + | |
| 58 | + | |
40 | 59 | | |
41 | 60 | | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
| 61 | + | |
47 | 62 | | |
48 | 63 | | |
| 64 | + | |
49 | 65 | | |
50 | | - | |
| 66 | + | |
51 | 67 | | |
52 | 68 | | |
53 | 69 | | |
| |||
57 | 73 | | |
58 | 74 | | |
59 | 75 | | |
60 | | - | |
61 | | - | |
| 76 | + | |
| 77 | + | |
62 | 78 | | |
63 | 79 | | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
| 80 | + | |
69 | 81 | | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
70 | 86 | | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | | - | |
| 28 | + | |
| 29 | + | |
28 | 30 | | |
29 | 31 | | |
30 | 32 | | |
| |||
0 commit comments