From b229c1a8c7cf9952eddd7a0fc89bab27173490d3 Mon Sep 17 00:00:00 2001 From: Brandon Liu Date: Mon, 5 Feb 2024 15:57:30 +0800 Subject: [PATCH] =?UTF-8?q?Remove=20prefetch=20boolean=20from=20JS=20sourc?= =?UTF-8?q?es=20-=20no=20reason=20to=20ever=20not=20use=20i=E2=80=A6=20(#3?= =?UTF-8?q?53)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Remove prefetch boolean from JS sources - no reason to ever not use it * JS optimization for header fetches on etag invalidation [#90] * If promises are shared between requests, only the first invalidation makes the header request. * If promises are not shared, simply delete the key. * JS 3.0.3 [#90] * update CHANGELOG --- js/CHANGELOG.md | 12 +++++- js/examples/leaflet.html | 2 +- js/examples/maplibre.html | 2 +- js/examples/maplibre_raster_dem.html | 2 +- js/index.ts | 64 +++++++++++++++------------- js/package-lock.json | 4 +- js/package.json | 2 +- js/test/v3.test.ts | 10 ++--- 8 files changed, 55 insertions(+), 43 deletions(-) diff --git a/js/CHANGELOG.md b/js/CHANGELOG.md index 19f63ac..0522d5c 100644 --- a/js/CHANGELOG.md +++ b/js/CHANGELOG.md @@ -1,4 +1,14 @@ -3.0.1-alpha.2 +3.0.3 + +* Deprecate `prefetch`-ing the first 16 kb as an option, always true +* Optimize invalidation when etag changes when promises are shared between tile requests. [#90] + +3.0.2 + +* Fix name of script includes (IIFE) name from `index.js` to `pmtiles.js` +* Fix name of ES6 module from `index.mjs` to `index.js`, which fixes bundlers detecting TypeScript types (index.d.ts) + +3.0.1 * FileApiSource renamed to FileSource * package.json defines **ES6 module only** (no CommonJS), fixing issues related to named imports [#317, #248] diff --git a/js/examples/leaflet.html b/js/examples/leaflet.html index 218e8a1..148ee43 100644 --- a/js/examples/leaflet.html +++ b/js/examples/leaflet.html @@ -4,7 +4,7 @@ - +