Compare commits

..

1 Commits

Author SHA1 Message Date
dependabot[bot] 95994dad16 chore(deps-dev): Bump vite from 7.3.2 to 8.2.1
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 7.3.2 to 8.2.1.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v8.2.1/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-version: 8.2.1
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-08-14 14:04:19 +00:00
12 changed files with 646 additions and 540 deletions
+3 -3
View File
@@ -42,7 +42,7 @@ jobs:
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@ff2f1c621b7f889edc0d3c761ac2e6a3f8cdb0dd # v4.37.7
uses: github/codeql-action/init@d1ba80a13dd99fba24a470575428917156a28b43 # v4.37.5
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -53,7 +53,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@ff2f1c621b7f889edc0d3c761ac2e6a3f8cdb0dd # v4.37.7
uses: github/codeql-action/autobuild@f205ea1c3313d32999d8d6a48b4f6530d4437b38 # v4.37.4
# ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
@@ -67,4 +67,4 @@ jobs:
# make release
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@ff2f1c621b7f889edc0d3c761ac2e6a3f8cdb0dd # v4.37.7
uses: github/codeql-action/analyze@5595ccaf912efad79be6eef63a5619ff05969be3 # v4.37.6
-4
View File
@@ -2,13 +2,9 @@
### ✨ Features and improvements
- Replace Cypress with Playwright for end-to-end tests and Vitest browser mode (Playwright provider) for component tests; drop the `@shellygo/cypress-test-utils` helper in favour of a `MaputnikDriver` page object
- Upgrade to MapLibre GL JS 6 and Vite 8, and update the remaining dependencies
- Serve the RTL text plugin from `@mapbox/mapbox-gl-rtl-text` instead of a pinned CDN URL, so its version is tracked in `package.json`
- Exported HTML now loads MapLibre GL JS as an ES module, since v6 no longer ships a UMD bundle
- _...Add new stuff here..._
### 🐞 Bug fixes
- The map's data listener now fires on tile loads again, so source and vector layer field autocompletion is populated
- _...Add new stuff here..._
## 3.1.0
+613 -473
View File
File diff suppressed because it is too large Load Diff
+14 -14
View File
@@ -30,13 +30,13 @@
"@codemirror/lint": "^6.9.7",
"@codemirror/state": "^6.7.1",
"@codemirror/theme-one-dark": "^6.1.3",
"@codemirror/view": "^6.43.9",
"@codemirror/view": "^6.43.8",
"@dnd-kit/core": "^6.3.1",
"@dnd-kit/sortable": "^10.0.0",
"@dnd-kit/utilities": "^3.2.2",
"@mapbox/mapbox-gl-rtl-text": "^0.4.0",
"@maplibre/maplibre-gl-geocoder": "^1.9.4",
"@maplibre/maplibre-gl-inspect": "^1.9.0",
"@maplibre/maplibre-gl-inspect": "^1.8.2",
"@maplibre/maplibre-gl-style-spec": "^26.2.1",
"array-move": "^4.0.0",
"buffer": "^6.0.3",
@@ -59,20 +59,20 @@
"lodash.get": "^4.4.2",
"lodash.isequal": "^4.5.0",
"lodash.throttle": "^4.1.1",
"maplibre-gl": "^6.4.1",
"maplibre-gl": "^5.24.0",
"maputnik-design": "github:maputnik/design#172b06c",
"ol": "^10.10.0",
"ol-mapbox-style": "^13.4.2",
"pmtiles": "^4.5.0",
"prop-types": "^15.8.1",
"react": "^19.2.8",
"react": "^19.2.7",
"react-accessible-accordion": "^5.0.1",
"react-aria-menubutton": "^8.0.0",
"react-aria-modal": "^5.0.2",
"react-collapse": "^5.1.1",
"react-color": "^2.19.3",
"react-dom": "^19.2.8",
"react-i18next": "^17.0.11",
"react-dom": "^19.2.7",
"react-i18next": "^17.0.8",
"react-icons": "^5.7.0",
"react-markdown": "^10.1.0",
"reconnecting-websocket": "^4.4.0",
@@ -115,22 +115,22 @@
"@types/lodash.isequal": "^4.5.8",
"@types/lodash.throttle": "^4.1.9",
"@types/randomcolor": "^0.5.9",
"@types/react": "^19.2.18",
"@types/react": "^19.2.17",
"@types/react-aria-menubutton": "^6.2.14",
"@types/react-aria-modal": "^5.0.0",
"@types/react-collapse": "^5.0.4",
"@types/react-color": "^3.0.13",
"@types/react-dom": "^19.2.4",
"@types/react-dom": "^19.2.3",
"@types/string-hash": "^1.1.3",
"@types/wicg-file-system-access": "^2023.10.7",
"@vitejs/plugin-react": "^6.0.5",
"@vitest/coverage-v8": "^4.1.11",
"@vitejs/plugin-react": "5.2",
"@vitest/coverage-v8": "^4.1.10",
"cors": "^2.8.6",
"eslint": "^10.8.1",
"eslint-plugin-react": "^7.37.5",
"eslint-plugin-react-hooks": "^7.1.1",
"eslint-plugin-react-refresh": "^0.5.4",
"i18next-cli": "^1.71.0",
"eslint-plugin-react-refresh": "^0.5.3",
"i18next-cli": "^1.69.0",
"istanbul": "^0.4.5",
"istanbul-lib-coverage": "^3.2.2",
"nyc": "^18.0.0",
@@ -142,9 +142,9 @@
"stylelint-scss": "^7.2.0",
"typescript": "^6.0.3",
"typescript-eslint": "^8.67.0",
"uuid": "^14.0.2",
"uuid": "^14.0.1",
"vite": "^8.2.1",
"vite-plugin-istanbul": "^9.0.1",
"vitest": "^4.1.11"
"vitest": "^4.1.10"
}
}
+2 -1
View File
@@ -1,6 +1,7 @@
import React from "react";
import Color from "color";
import {ChromePicker, type ColorResult} from "react-color";
import ChromePicker from "react-color/lib/components/chrome/Chrome";
import {type ColorResult} from "react-color";
import lodash from "lodash";
function formatColor(color: ColorResult): string {
+3 -4
View File
@@ -1,7 +1,6 @@
import React from "react";
import {createRoot} from "react-dom/client";
import * as MapLibreGl from "maplibre-gl";
import {type LayerSpecification, type LngLat, type Map, type MapOptions, type SourceSpecification, type StyleSpecification} from "maplibre-gl";
import MapLibreGl, {type LayerSpecification, type LngLat, type Map, type MapOptions, type SourceSpecification, type StyleSpecification} from "maplibre-gl";
import MaplibreInspect from "@maplibre/maplibre-gl-inspect";
import colors from "@maplibre/maplibre-gl-inspect/lib/colors";
import { FeatureLayerPopup as MapMaplibreGlLayerPopup } from "./MapMaplibreGlLayerPopup";
@@ -11,7 +10,7 @@ import { ZoomControl } from "../libs/zoomcontrol";
import { type HighlightedLayer, colorHighlightedLayer } from "../libs/highlight";
import "maplibre-gl/dist/maplibre-gl.css";
import "../maplibregl.css";
import "../libs/maplibre-init";
import "../libs/maplibre-rtl";
import MaplibreGeocoder, { type MaplibreGeocoderApi, type MaplibreGeocoderApiConfig } from "@maplibre/maplibre-gl-geocoder";
import "@maplibre/maplibre-gl-geocoder/dist/maplibre-gl-geocoder.css";
import { withTranslation, type WithTranslation } from "react-i18next";
@@ -239,7 +238,7 @@ class MapMaplibreGlInternal extends React.Component<MapMaplibreGlInternalProps,
});
map.on("data", e => {
if(e.dataType !== "source" || !e.tile) return;
if(e.dataType !== "tile") return;
this.props.onDataChange!({
map: this.state.map
});
+3 -3
View File
@@ -59,6 +59,7 @@ class ModalExportInternal extends React.Component<ModalExportInternalProps> {
<meta charset="utf-8" />
<title>${htmlTitle}</title>
<meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no" />
<script src="https://unpkg.com/maplibre-gl@${MAPLIBRE_GL_VERSION}/dist/maplibre-gl.js"></script>
<link href="https://unpkg.com/maplibre-gl@${MAPLIBRE_GL_VERSION}/dist/maplibre-gl.css" rel="stylesheet" />
<style>
body { margin: 0; padding: 0; }
@@ -67,9 +68,8 @@ class ModalExportInternal extends React.Component<ModalExportInternalProps> {
</head>
<body>
<div id="map"></div>
<script type="module">
import {Map} from 'https://unpkg.com/maplibre-gl@${MAPLIBRE_GL_VERSION}/dist/maplibre-gl.mjs';
const map = new Map({
<script>
const map = new maplibregl.Map({
container: 'map',
style: ${tokenStyle},
});
-15
View File
@@ -1,15 +0,0 @@
import { setRTLTextPlugin, setWorkerUrl } from "maplibre-gl";
// maplibre-gl v6 is ESM only and cannot locate its worker through a bundler's
// module graph, so every consumer has to point it at the worker once.
// `?worker&url` (rather than plain `?url`) routes the file through Vite's worker
// pipeline, which emits a self-contained chunk including its `maplibre-gl-shared`
// sibling. See https://maplibre.org/maplibre-gl-js/docs/#vite
import workerUrl from "maplibre-gl/dist/maplibre-gl-worker.mjs?worker&url";
// Order matters: registering the RTL plugin spins up the worker pool, so the
// worker URL has to be in place before it.
setWorkerUrl(workerUrl);
// Served out of @mapbox/mapbox-gl-rtl-text via `publicDir` in vite.config.ts, so
// the version comes from package.json rather than a pinned CDN URL.
setRTLTextPlugin(`${import.meta.env.BASE_URL}mapbox-gl-rtl-text.js`, false);
+3
View File
@@ -0,0 +1,3 @@
import MapLibreGl from "maplibre-gl";
MapLibreGl.setRTLTextPlugin("https://unpkg.com/@mapbox/mapbox-gl-rtl-text@0.2.3/mapbox-gl-rtl-text.min.js", false);
+2
View File
@@ -32,6 +32,8 @@ export class ZoomControl {
addEventListeners (){
this._map!.on("render", () => this.updateZoomLevel());
this._map!.on("zoomIn", () => this.updateZoomLevel());
this._map!.on("zoomOut", () => this.updateZoomLevel());
}
onRemove() {
+1 -1
View File
@@ -3,7 +3,7 @@
"target": "ES2020",
"useDefineForClassFields": true,
"lib": ["ES2020", "DOM", "DOM.Iterable"],
"types": ["geojson", "@types/wicg-file-system-access", "node", "vite/client"],
"types": ["geojson", "@types/wicg-file-system-access", "node"],
"module": "ESNext",
"skipLibCheck": true,
+2 -22
View File
@@ -1,29 +1,13 @@
import path from "node:path";
import { createRequire } from "node:module";
import react from "@vitejs/plugin-react";
import { defineConfig } from "vite";
import istanbul from "vite-plugin-istanbul";
// maplibre fetches the RTL text plugin from this URL inside its worker and evals
// it. Serving @mapbox/mapbox-gl-rtl-text's dist directory (which holds just the
// prebuilt UMD bundle) keeps the plugin's version in package.json rather than
// pinned in a CDN link. Its ESM entry is not usable here: it imports a bare .wasm
// file that Vite would emit as a URL instead of an init function.
const require = createRequire(import.meta.url);
const publicDir = path.join(
path.dirname(require.resolve("@mapbox/mapbox-gl-rtl-text")),
"../dist"
);
export default defineConfig(({ mode }) => ({
server: {
port: 8888,
},
build: {
sourcemap: true,
rolldownOptions: {
checks: { invalidAnnotation: false },
},
sourcemap: true
},
plugins: [
react(),
@@ -33,12 +17,8 @@ export default defineConfig(({ mode }) => ({
forceBuildInstrument: true, // Instrument the source so e2e runs can collect coverage
}),
],
optimizeDeps: {
exclude: ["maplibre-gl/dist/maplibre-gl-worker.mjs"],
},
publicDir,
base: mode === "desktop" ? "/" : "/maputnik/",
define: {
global: "globalThis"
global: "window"
},
}));