Skip to content

Commit 71fa2e6

Browse files
committed
feat: enable ESM support via dual-publishing
- 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.
1 parent dece9a9 commit 71fa2e6

File tree

18 files changed

+4794
-270
lines changed

18 files changed

+4794
-270
lines changed

.github/workflows/test.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,27 @@ jobs:
4646
key: ${{ runner.os }}-node-${{ matrix.node-version }}-${{ hashFiles('**/package-lock.json') }}
4747
- run: npm ci
4848
- run: npm run test
49+
packaging:
50+
runs-on: ubuntu-latest
51+
strategy:
52+
matrix:
53+
node-version:
54+
- 18.x
55+
- 20.x
56+
- 22.x
57+
- 24.x
58+
steps:
59+
- uses: actions/checkout@v1
60+
- uses: actions/setup-node@v1
61+
with:
62+
node-version: ${{ matrix.node-version }}
63+
- name: Cache npm
64+
uses: actions/cache@v4
65+
with:
66+
path: ~/.npm
67+
key: ${{ runner.os }}-node-${{ matrix.node-version }}-${{ hashFiles('**/package-lock.json') }}
68+
- run: npm ci
69+
- run: npm run test:packaging
4970
integration:
5071
needs: "unit"
5172
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)