From 2bcb9d6aef258339af6eb84d1b1beefc32affeae Mon Sep 17 00:00:00 2001 From: Brandon Liu Date: Sun, 28 Jul 2024 21:50:06 +0800 Subject: [PATCH] Change to tsup for bundling [#158,#161,#162] (#163) * Change to tsup for bundling [#158,#161,#162] * change default export for theme.ts to named export * update vector-tile, pbf and point-geometry dependencies [#162] * 4.0.0 --- .github/workflows/node.js.yml | 2 +- CHANGELOG.md | 7 + benchmark/index.html | 2 +- examples/comparison.html | 3 +- examples/fonts.html | 2 +- examples/inset.html | 2 +- examples/labels.html | 2 +- examples/leaflet.html | 2 +- examples/multi_source.html | 2 +- examples/pmtiles.html | 2 +- examples/pmtiles_headers.html | 2 +- examples/sandwich.html | 2 +- examples/sprites.html | 2 +- examples/static.html | 2 +- package-lock.json | 4828 ++++++++++++++++++++++++++++----- package.json | 40 +- src/default_style/themes.ts | 4 +- src/frontends/leaflet.ts | 2 +- src/frontends/static.ts | 2 +- tsup.config.ts | 42 + 20 files changed, 4232 insertions(+), 720 deletions(-) create mode 100644 tsup.config.ts diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 50081433..4eeb3663 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -17,6 +17,6 @@ jobs: node-version: 18.x - run: python .github/check_examples.py - run: npm ci - - run: npm run build-tsc + - run: npm run build - run: npm test - run: npm run check \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 16c1d12e..6c9acc2c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +# 4.0.0 +* switch to tsup for generating ESM, CJS and IIFE modules [#158, #161, #162]. +* should fix import issues related to typescript. +* generate ESM and CJS builds unbundled. iife is still unbundled. +* remove use of default exports: theme.ts exports `theme` +* bump internal dependencies. + # 3.1.2 * Fix pmtiles URL detection on relative paths [#152] diff --git a/benchmark/index.html b/benchmark/index.html index 317da75c..d265b6e4 100644 --- a/benchmark/index.html +++ b/benchmark/index.html @@ -6,7 +6,7 @@ - +