Skip to content

Commit 94d1f3a

Browse files
lesbaaLes Moffat
and
Les Moffat
authored
RD-957 Update MapLibre to latest version (#200)
* RD-957 Update MapLibre to latest version * 3.3.0 * RD-957 Update changelog * RD-957 Use correct version in changelog --------- Co-authored-by: Les Moffat <les.moffat@maptiler.com>
1 parent ec6221f commit 94d1f3a

File tree

8 files changed

+34
-17
lines changed

8 files changed

+34
-17
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# MapTiler SDK Changelog
22

3+
## 3.3.0
4+
## ✨ Features and improvements
5+
- Maplibre-gl version bump to 5.5.0
6+
37
## 3.2.3
48
## ✨ Features and improvements
59
None

demos/src/02-sky-day.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import "@maptiler/sdk/style.css";
21
import { Map, MapStyle, config } from "../../src/index";
32
import { addPerformanceStats, setupMapTilerApiKey } from "./demo-utils";
43

demos/src/06-handling-webgl-errors.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import "@maptiler/sdk/style.css";
21
import { Map, config, getVersion, displayWebGLContextLostWarning } from "../../src/index";
32
import { addPerformanceStats, setupMapTilerApiKey } from "./demo-utils";
43

demos/src/demo-utils.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import "../../dist/maptiler-sdk.css";
12
import { SdkConfig } from "../../src/config";
23
import Stats from "stats.js";
34
/**

package-lock.json

Lines changed: 10 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@maptiler/sdk",
3-
"version": "3.2.3",
3+
"version": "3.3.0",
44
"description": "The Javascript & TypeScript map SDK tailored for MapTiler Cloud",
55
"author": "MapTiler",
66
"module": "dist/maptiler-sdk.mjs",
@@ -43,7 +43,7 @@
4343
"test:watch": "vitest watch -c vite.config-test.ts --dom",
4444
"test": "vitest run -c vite.config-test.ts --dom",
4545
"install:clean": "rm -rf build/ dist/ node_modules/ && npm ci",
46-
"dev": "vite -c vite.config-dev.ts",
46+
"dev": "npm run build-css && vite -c vite.config-dev.ts",
4747
"dev-umd": "npm run build-css && tsc && NODE_ENV=development vite build -w -c vite.config-umd.ts",
4848
"build-css": "mkdir -p dist build && node scripts/replace-path-with-content.js src/style/style_template.css dist/tmp_maptiler-sdk.css && cat node_modules/maplibre-gl/dist/maplibre-gl.css dist/tmp_maptiler-sdk.css > dist/maptiler-sdk.css && rm dist/tmp_maptiler-sdk.css && cp dist/maptiler-sdk.css build/maptiler-sdk.css",
4949
"build-umd": "tsc && NODE_ENV=production vite build -c vite.config-umd.ts",
@@ -84,7 +84,7 @@
8484
"@maptiler/client": "^2.3.2",
8585
"events": "^3.3.0",
8686
"js-base64": "^3.7.7",
87-
"maplibre-gl": "^5.3.1",
87+
"maplibre-gl": "^5.5.0",
8888
"uuid": "^11.0.5"
8989
}
9090
}

test/exports.test.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,22 @@ const expectedExports = Array.from(
139139
describe("Module Exports", async () => {
140140
const exportedModule = await import("../src/index");
141141

142+
console.info(
143+
"\x1b[1m%s\x1b[0m",
144+
`
145+
At present you will likely see an error above:
146+
147+
\`Error: Failed to load url <blob-filepath> (resolved id: <blob-filepath>). Does the file exist?\`
148+
149+
This is related to maplibre-gl and the way it handles CJS modules.
150+
It is caused by the call to \`enableRTL()\` in src/index.ts.
151+
152+
There is a planned future work to remove this (the API it relies on
153+
is deprecated in Maplibre). But, for now, we must tolerate some
154+
noise in this test...
155+
`,
156+
);
157+
142158
it("should match number of exptected exports with expected number of exports, logging any superfluous exports", () => {
143159
const actualExports = Object.keys(exportedModule);
144160
const superfluousExports = actualExports.filter((key) => !expectedExports.includes(key));

vite.config-dev.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,6 @@ const entrypoints = readdirSync(resolve(__dirname, 'demos/public')).filter((file
5050
}
5151
}, {})
5252

53-
// console.log('Demos being server from:', Object.values(entrypoints).map((entry) => entry).join('\n'));
54-
5553
export default defineConfig({
5654
mode: "development",
5755
root: "./demos",

0 commit comments

Comments
 (0)