Skip to content

Commit 35d0dd4

Browse files
Merge branch 'main' into docs-overview
2 parents bfc4b81 + 347f9fa commit 35d0dd4

File tree

71 files changed

+1193
-974
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+1193
-974
lines changed

.github/workflows/test-all.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
with:
2424
node-version-file: '.nvmrc'
2525
- run: npm ci
26-
- run: npm run lint
26+
- run: npm run lint -- --max-warnings 0
2727
if: '!cancelled()'
2828
- run: npm run lint-css
2929
if: '!cancelled()'
@@ -215,7 +215,7 @@ jobs:
215215
COVERAGE_FORMAT: "lcov"
216216

217217
- name: Upload coverage reports to Codecov
218-
uses: codecov/codecov-action@1af58845a975a7985b0beb0cbe6fbbb71a41dbad # v5.5.3
218+
uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v6.0.0
219219
with:
220220
files: ${{ github.workspace }}/coverage-merged/coverage-final.json
221221
verbose: true

.stylelintrc.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
"function-no-unknown": [true, {
1414
"ignoreFunctions": ["svg-load", "svg-inline"]
1515
}],
16-
"function-disallowed-list": ["/^rgb\\((?!\\d+,\\s*\\d+,\\s*\\d+\\))/"]
16+
"function-disallowed-list": ["/^rgb\\((?!\\d+,\\s*\\d+,\\s*\\d+\\))/"],
17+
"alpha-value-notation": "number"
1718
},
1819
"ignoreFiles": [
1920
"dist/**/*.css"

CHANGELOG.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,26 @@
11
## main
22
### ✨ Features and improvements
33
- _...Add new stuff here..._
4+
5+
### 🐞 Bug fixes
6+
- _...Add new stuff here..._
7+
8+
## 5.23.0
9+
10+
### ✨ Features and improvements
11+
412
- Add `touchZoomRotate.setZoomRate()` and `touchZoomRotate.setZoomThreshold()` to customize touch zoom speed and pinch sensitivity ([#7271](https://github.com/maplibre/maplibre-gl-js/issues/7271))
13+
- Improve ability to communicate with imported scripts in workers and use `makeRequest` in workres as well ([#7451](https://github.com/maplibre/maplibre-gl-js/issues/7451)) (by [@HarelM](https://github.com/HarelM))
14+
- Allow `opacity` and `opacityWhenCovered` in `Marker` and `MarkerOptions` to accept `number` in addition to `string`, and add `maplibregl-marker-covered` CSS class to `Marker` element when covered by 3D terrain or a globe ([#7433](https://github.com/maplibre/maplibre-gl-js/issues/7433)) (by [@YuChunTsao](https://github.com/YuChunTsao))
15+
- perf: add a bench for terrain rendering and fix `_demMatrixCache` lookup being wasted cycles by actually using the cache ([#7400](https://github.com/maplibre/maplibre-gl-js/pull/7400)) (by [@CommanderStorm](https://github.com/CommanderStorm))
516

617
### 🐞 Bug fixes
18+
719
- Fix polygon text label placement drifting far from center for convex polygons at high zoom due to coordinate rounding in geojson-vt ([#7380](https://github.com/maplibre/maplibre-gl-js/pull/7380)) (by [@CommanderStorm](https://github.com/CommanderStorm))
8-
- _...Add new stuff here..._
20+
- Ensure that a successful ArrayBuffer response from a custom protocol that is null/undefined is set to an empty ArrayBuffer ([#7427](https://github.com/maplibre/maplibre-gl-js/pull/7427)) (by [@neodescis](https://github.com/neodescis))
21+
- Fix error in `_contextRestored` when map was initialized without a style ([#7432](https://github.com/maplibre/maplibre-gl-js/issues/7432)) (by [@mvanhorn](https://github.com/mvanhorn))
22+
- Fix issue with the cache used for zoomLevelsToOverscale feature ([#7450](https://github.com/maplibre/maplibre-gl-js/issues/7450)) (by [@HarelM](https://github.com/HarelM))
23+
- Update stylelint and fix old issues with the CSS (mainly change rgb to use spaces) ([#7365](https://github.com/maplibre/maplibre-gl-js/issues/7365)) (by [@HarelM](https://github.com/HarelM))
924

1025
## 5.22.0
1126

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
export default {
2+
meta: {
3+
type: 'suggestion',
4+
docs: {
5+
description: 'Prefer type aliases over interfaces for plain data shapes (no methods, no inheritance)',
6+
},
7+
messages: {
8+
preferType: 'Use a type alias instead of an interface for plain data shapes.',
9+
},
10+
schema: [],
11+
},
12+
create(context) {
13+
return {
14+
TSInterfaceDeclaration(node) {
15+
if (node.extends && node.extends.length > 0) {
16+
return;
17+
}
18+
19+
const hasBehavior = node.body.body.some(
20+
(member) =>
21+
member.type === 'TSMethodSignature' ||
22+
member.type === 'TSCallSignatureDeclaration' ||
23+
member.type === 'TSConstructSignatureDeclaration' ||
24+
(member.type === 'TSPropertySignature' &&
25+
(member.typeAnnotation?.typeAnnotation?.type === 'TSFunctionType' ||
26+
member.typeAnnotation?.typeAnnotation?.type === 'TSTypeQuery'))
27+
);
28+
29+
if (!hasBehavior) {
30+
context.report({
31+
node: node.id,
32+
messageId: 'preferType',
33+
});
34+
}
35+
},
36+
};
37+
},
38+
};

eslint.config.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,11 @@ import globals from 'globals';
66
import tsParser from '@typescript-eslint/parser';
77
import react from 'eslint-plugin-react';
88
import html from 'eslint-plugin-html';
9+
import preferTypeForDataShapes from './build/eslint-rules/prefer-type-for-data-shapes.js';
910

1011
export default [
1112
{
12-
ignores: ['build/*.js', 'build/rollup/**', 'staging/**', 'coverage/**', 'node_modules/**', 'docs/**', 'dist/**', 'site/**']
13+
ignores: ['build/*.js', 'build/rollup/**', 'staging/**', 'coverage/**', 'node_modules/**', 'docs/**', 'dist/**', 'site/**', '**/*_generated.js']
1314
},
1415
{
1516
ignores: ['test/bench/**'],
@@ -19,6 +20,7 @@ export default [
1920
'@stylistic': stylisticTs,
2021
tsdoc,
2122
vitest,
23+
'local': {rules: {'prefer-type-for-data-shapes': preferTypeForDataShapes}},
2224
},
2325

2426
linterOptions: {
@@ -40,6 +42,7 @@ export default [
4042
projectService: {
4143
allowDefaultProject: [
4244
'build/generate-*.ts',
45+
'build/eslint-rules/*.js',
4346
'test/build/*.ts',
4447
'eslint.config.js',
4548
'postcss.config.js',
@@ -66,6 +69,7 @@ export default [
6669
'@typescript-eslint/prefer-includes': 'error',
6770
'@typescript-eslint/prefer-string-starts-ends-with': 'error',
6871
'@typescript-eslint/array-type': ['error', {default: 'array-simple'}],
72+
'local/prefer-type-for-data-shapes': 'error',
6973

7074
'prefer-object-spread': 'error',
7175
'prefer-object-has-own': 'error',

0 commit comments

Comments
 (0)