Skip to content

Commit

Permalink
FIX CJS issue due to QuickLRU
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanlurie committed Mar 6, 2024
1 parent 8e2efa9 commit f59b81f
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 7 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`)
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down Expand Up @@ -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"
}
}
6 changes: 3 additions & 3 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const bundles = [
watch: {
include: "src/**"
},
external: ["web-merc-projection", "quick-lru"]
external: ["quick-lru"]
},

// CJS module, not minified + sourcemap
Expand All @@ -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
Expand Down Expand Up @@ -106,7 +106,7 @@ if (process.env.NODE_ENV === "production") {
}
],
input: "src/index.ts",
external: ["web-merc-projection", "quick-lru"],
external: ["quick-lru"],
},
{
plugins: [
Expand Down

0 comments on commit f59b81f

Please sign in to comment.