Codemirror 5 to 6 upgrade (#1386)

## Launch Checklist

- Resolves #891

This PR upgrades code mirror from version 5 to version 6.
It should not change any functionality dramatically.
The filter and other expressions have line numbers now as I was not able
to remove those without introducing a lot of code, which I preferred not
to.

Before:

<img width="571" height="933" alt="image"
src="https://github.com/user-attachments/assets/02f047ee-0857-4eb1-9431-2620099ea025"
/>


After:
<img width="571" height="933" alt="image"
src="https://github.com/user-attachments/assets/7cf60155-7cd9-4c06-915e-dec2ae8247fc"
/>



 - [x] Briefly describe the changes in this PR.
 - [x] Link to related issues.
- [x] Include before/after visuals or gifs if this PR includes visual
changes.
 - [x] Write tests for all new functionality.
 - [x] Add an entry to `CHANGELOG.md` under the `## main` section.

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
Harel M
2025-09-17 20:51:26 +03:00
committed by GitHub
parent c5608c3ee9
commit 1730e9cb1c
19 changed files with 3538 additions and 2314 deletions
+13 -6
View File
@@ -12,6 +12,8 @@
"i18n:refresh": "i18next 'src/**/*.{ts,tsx,js,jsx}'",
"lint": "eslint",
"test": "cypress run",
"test-unit": "vitest",
"test-unit-ci": "vitest run --coverage --reporter=json",
"cy:open": "cypress open",
"lint-css": "stylelint \"src/styles/*.scss\"",
"sort-styles": "jq 'sort_by(.id)' src/config/styles.json > tmp.json && mv tmp.json src/config/styles.json"
@@ -24,18 +26,22 @@
"license": "MIT",
"homepage": "https://github.com/maplibre/maputnik#readme",
"dependencies": {
"@codemirror/lang-json": "^6.0.2",
"@codemirror/lint": "^6.8.5",
"@codemirror/state": "^6.5.2",
"@codemirror/theme-one-dark": "^6.1.3",
"@codemirror/view": "^6.38.2",
"@dnd-kit/core": "^6.3.1",
"@dnd-kit/sortable": "^10.0.0",
"@dnd-kit/utilities": "^3.2.2",
"@mapbox/mapbox-gl-rtl-text": "^0.3.0",
"@maplibre/maplibre-gl-geocoder": "^1.9.0",
"@maplibre/maplibre-gl-inspect": "^1.7.1",
"@maplibre/maplibre-gl-style-spec": "^23.3.0",
"@prantlf/jsonlint": "^16.0.0",
"@maplibre/maplibre-gl-style-spec": "^24.1.0",
"array-move": "^4.0.0",
"buffer": "^6.0.3",
"classnames": "^2.5.1",
"codemirror": "^5.65.20",
"codemirror": "^6.0.2",
"color": "^5.0.2",
"detect-browser": "^5.3.0",
"downshift": "^9.0.10",
@@ -53,7 +59,7 @@
"lodash.get": "^4.4.2",
"lodash.isequal": "^4.5.0",
"lodash.throttle": "^4.1.1",
"maplibre-gl": "^5.7.1",
"maplibre-gl": "^5.7.2",
"maputnik-design": "github:maputnik/design#172b06c",
"ol": "^10.6.1",
"ol-mapbox-style": "^13.1.0",
@@ -118,9 +124,9 @@
"@types/react-color": "^3.0.13",
"@types/react-dom": "^19.1.9",
"@types/string-hash": "^1.1.3",
"@types/uuid": "^11.0.0",
"@types/wicg-file-system-access": "^2023.10.6",
"@vitejs/plugin-react": "^5.0.3",
"@vitest/coverage-v8": "^3.2.4",
"cors": "^2.8.5",
"cypress": "^15.2.0",
"cypress-plugin-tab": "^1.0.5",
@@ -141,6 +147,7 @@
"typescript-eslint": "^8.44.0",
"uuid": "^13.0.0",
"vite": "^7.1.5",
"vite-plugin-istanbul": "^7.2.0"
"vite-plugin-istanbul": "^7.2.0",
"vitest": "^3.2.4"
}
}