Skip to content

Commit

Permalink
upgrade mapbox-gl-supported to v2.0.0 (#10237)
Browse files Browse the repository at this point in the history
  • Loading branch information
mourner authored Dec 22, 2020
1 parent 28a029e commit a59c125
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 11 deletions.
13 changes: 10 additions & 3 deletions flow-typed/mapbox-gl-supported.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
// @flow
'use strict';
declare module "@mapbox/mapbox-gl-supported" {
declare type isSupported = {
(options?: {failIfMajorPerformanceCaveat: boolean}): boolean,
declare type SupportedOptions = {failIfMajorPerformanceCaveat: boolean};

declare type SupportedFn = {
(options?: SupportedOptions): boolean,
webGLContextAttributes: WebGLContextAttributes
};
declare module.exports: isSupported;
declare function notSupportedReason(options?: SupportedOptions): ?string;

declare module.exports: {
supported: SupportedFn;
notSupportedReason: typeof notSupportedReason;
}
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"@mapbox/geojson-rewind": "^0.5.0",
"@mapbox/geojson-types": "^1.0.2",
"@mapbox/jsonlint-lines-primitives": "^2.0.2",
"@mapbox/mapbox-gl-supported": "^1.5.0",
"@mapbox/mapbox-gl-supported": "^2.0.0",
"@mapbox/point-geometry": "^0.1.0",
"@mapbox/tiny-sdf": "^1.1.1",
"@mapbox/unitbezier": "^0.0.0",
Expand Down
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// @flow

import assert from 'assert';
import supported from '@mapbox/mapbox-gl-supported';
import {supported} from '@mapbox/mapbox-gl-supported';

import {version} from '../package.json';
import Map from './ui/map';
Expand Down
4 changes: 2 additions & 2 deletions src/ui/map.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import LngLatBounds from '../geo/lng_lat_bounds';
import Point from '@mapbox/point-geometry';
import AttributionControl from './control/attribution_control';
import LogoControl from './control/logo_control';
import isSupported from '@mapbox/mapbox-gl-supported';
import {supported} from '@mapbox/mapbox-gl-supported';
import {RGBAImage} from '../util/image';
import {Event, ErrorEvent} from '../util/evented';
import {MapMouseEvent} from './events';
Expand Down Expand Up @@ -2364,7 +2364,7 @@ class Map extends Camera {
}

_setupPainter() {
const attributes = extend({}, isSupported.webGLContextAttributes, {
const attributes = extend({}, supported.webGLContextAttributes, {
failIfMajorPerformanceCaveat: this._failIfMajorPerformanceCaveat,
preserveDrawingBuffer: this._preserveDrawingBuffer,
antialias: this._antialias || false
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1076,10 +1076,10 @@
resolved "https://registry.yarnpkg.com/@mapbox/mapbox-gl-rtl-text/-/mapbox-gl-rtl-text-0.2.3.tgz#a26ecfb3f0061456d93ee8570dd9587d226ea8bd"
integrity sha512-RaCYfnxULUUUxNwcUimV9C/o2295ktTyLEUzD/+VWkqXqvaVfFcZ5slytGzb2Sd/Jj4MlbxD0DCZbfa6CzcmMw==

"@mapbox/mapbox-gl-supported@^1.5.0":
version "1.5.0"
resolved "https://registry.yarnpkg.com/@mapbox/mapbox-gl-supported/-/mapbox-gl-supported-1.5.0.tgz#f60b6a55a5d8e5ee908347d2ce4250b15103dc8e"
integrity sha512-/PT1P6DNf7vjEEiPkVIRJkvibbqWtqnyGaBz3nfRdcxclNSnSdaLU5tfAgcD7I8Yt5i+L19s406YLl1koLnLbg==
"@mapbox/mapbox-gl-supported@^2.0.0":
version "2.0.0"
resolved "https://registry.yarnpkg.com/@mapbox/mapbox-gl-supported/-/mapbox-gl-supported-2.0.0.tgz#bb133cd91e562c006713fbc83f21e4b6f711a388"
integrity sha512-zu4udqYiBrKMQKwpKJ4hhPON7tz0QR/JZ3iGpHnNWFmH3Sv/ysxlICATUtGCFpsyJf2v1WpFhlzaZ3GhhKmPMA==

"@mapbox/mvt-fixtures@^3.6.0":
version "3.6.0"
Expand Down

0 comments on commit a59c125

Please sign in to comment.