From f59b81fb1e44c189d576ec5cbdfc6a81634a845b Mon Sep 17 00:00:00 2001 From: Jonathan Lurie Date: Wed, 6 Mar 2024 15:21:25 +0100 Subject: [PATCH] FIX CJS issue due to QuickLRU --- CHANGELOG.md | 7 +++++++ package.json | 8 ++++---- rollup.config.js | 6 +++--- 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5b1c014..5193b33 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,13 @@ ### Bug Fixes ### Others +## 1.8.1 +### Bug Fixes +- The QuickLRU dependency is not CJS compatible to it is now fully bundled into the CJS bundle + +### Others +- Moved somes wrongly positioned deps into devDep + ## 1.8.0 ### New Features - Rework of the elevation API to be improve developper experience (new module `elevation`) diff --git a/package.json b/package.json index 9ca9c7e..36de5bc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@maptiler/client", - "version": "1.8.0", + "version": "1.8.1", "description": "Javascript & Typescript wrapper to MapTiler Cloud API", "module": "dist/maptiler-client.mjs", "types": "dist/maptiler-client.d.ts", @@ -71,11 +71,11 @@ "typedoc": "^0.25.2", "typedoc-plugin-markdown": "^3.16.0", "typescript": "^5.2.2", - "vitest": "^0.34.6" + "vitest": "^0.34.6", + "@rollup/pluginutils": "^5.0.5", + "@types/geojson": "^7946.0.10" }, "dependencies": { - "@rollup/pluginutils": "^5.0.5", - "@types/geojson": "^7946.0.10", "quick-lru": "^7.0.0" } } diff --git a/rollup.config.js b/rollup.config.js index 8c25482..6675957 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -25,7 +25,7 @@ const bundles = [ watch: { include: "src/**" }, - external: ["web-merc-projection", "quick-lru"] + external: ["quick-lru"] }, // CJS module, not minified + sourcemap @@ -48,7 +48,7 @@ const bundles = [ watch: { include: "src/**" }, - external: ["web-merc-projection", "quick-lru"] + external: [] // Decided to include QuickLRU to the CJS bundle because it is otherwise not CJS compatible }, // UMD module, not minified @@ -106,7 +106,7 @@ if (process.env.NODE_ENV === "production") { } ], input: "src/index.ts", - external: ["web-merc-projection", "quick-lru"], + external: ["quick-lru"], }, { plugins: [