Skip to content

Commit

Permalink
v2.14.1 (#12661)
Browse files Browse the repository at this point in the history
* Forbid class fields to fix transpilation errors with Vite/ESBuild (#12658)

* forbid class fields to fix transpilation errors with vite/esbuild

* fix flow

* v2.14.1 version bump + changelog update
  • Loading branch information
mourner committed Apr 14, 2023
1 parent 9980ee9 commit 2d2e98a
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@
"no-duplicate-imports": "off",
"import/no-duplicates": "error",

// prevent issues with esbuild/vite https://github.com/mapbox/mapbox-gl-js/issues/12656
"no-restricted-syntax": ["error", "ClassProperty[value]"],

// ensure compatibility with Node's native ESM
"import/extensions": ["error", {
"js": "always",
Expand Down
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
## 2.14.1

### Bug fixes 🐞

* Fix a bug where certain bundling configurations involving Vite or ESBuild could produce a broken build. [#12658](https://github.com/mapbox/mapbox-gl-js/pull/12658)

## 2.14.0

### Features ✨ and improvements 🏁

* Support `referrerPolicy` option for the `transformRequest` function when using fetch ([#12590](https://github.com/mapbox/mapbox-gl-js/pull/12590)) (h/t [robertcepa](https://github.com/robertcepa))

## Bug fixes 🐞
### Bug fixes 🐞

* Enable anisotropic filtering on tiles beyond 20 degrees pitch to prevent it from compromising image crispness on flat or low-tilted maps. ([#12577](https://github.com/mapbox/mapbox-gl-js/pull/12577))
* Fix LngLatBounds.extend() with literal LngLat object. ([#12605](https://github.com/mapbox/mapbox-gl-js/pull/12605))
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "mapbox-gl",
"description": "A WebGL interactive maps library",
"version": "2.14.0",
"version": "2.14.1",
"main": "dist/mapbox-gl.js",
"style": "dist/mapbox-gl.css",
"license": "SEE LICENSE IN LICENSE.txt",
Expand Down
2 changes: 1 addition & 1 deletion src/style/style_layer/line_style_layer.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import type {TilespaceQueryGeometry} from '../query_geometry.js';
import type {IVectorTileFeature} from '@mapbox/vector-tile';

class LineFloorwidthProperty extends DataDrivenProperty<number> {
useIntegerZoom = true;
useIntegerZoom: ?boolean;

possiblyEvaluate(value, parameters) {
parameters = new EvaluationParameters(Math.floor(parameters.zoom), {
Expand Down
3 changes: 2 additions & 1 deletion test/unit/util/util.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,14 @@ test('util', (t) => {
this.name = 'Tom';
}

ontimer = () => {
ontimer() {
t.equal(this.name, 'Tom');
t.end();
}
}

const my = new MyClass();
// $FlowFixMe[method-unbinding]
setTimeout(my.ontimer, 0);
});

Expand Down

0 comments on commit 2d2e98a

Please sign in to comment.