Skip to content

Commit

Permalink
Upgrade deck.gl to 8.8 (#615)
Browse files Browse the repository at this point in the history
* Upgrade `deck.gl` to 8.8

* Fix tests.

* Lint.

* Add base.

* chore: run pnpm meta-updater for monorepo

* Remove opts.

* upgrade probe.gl

* Try again!

* chore: relock dependencies

Co-authored-by: Trevor Manz <[email protected]>
  • Loading branch information
ilan-gold and manzt authored Aug 25, 2022
1 parent 064dd83 commit 4779f89
Show file tree
Hide file tree
Showing 19 changed files with 1,226 additions and 950 deletions.
4 changes: 2 additions & 2 deletions .meta-updater/main.mjs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import * as fs from 'node:fs';
import * as path from 'node:path';

const DECK_VERSION = '8.6.7';
const LUMAGL_VERSION = '8.5.13';
const DECK_VERSION = '~8.8.6';
const LUMAGL_VERSION = '~8.5.16';
const MATHGL_VERSION = '^3.5.7';
const REACT_VERSION = '^16.8.0 || ^17.0.0';

Expand Down
1 change: 0 additions & 1 deletion .npmrc
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
auto-install-peers = true
strict-peer-dependencies = false
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
### Added

### Changed
- Upgrade deck.gl to 8.8
- Replace `postversion` script with `version` script for CI release.
- Remove `package-lock.json` from root (since we use pnpm)

Expand Down
24 changes: 12 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,22 @@
"version": "pnpm meta-updater && ./version.sh && git add ."
},
"dependencies": {
"@deck.gl/core": "8.6.7",
"@deck.gl/geo-layers": "8.6.7",
"@deck.gl/layers": "8.6.7",
"@deck.gl/react": "8.6.7",
"@luma.gl/constants": "8.5.13",
"@luma.gl/core": "8.5.13",
"@luma.gl/engine": "8.5.13",
"@luma.gl/webgl": "8.5.13"
"@deck.gl/core": "~8.8.6",
"@deck.gl/geo-layers": "~8.8.6",
"@deck.gl/layers": "~8.8.6",
"@deck.gl/react": "~8.8.6",
"@luma.gl/constants": "~8.5.16",
"@luma.gl/core": "~8.5.16",
"@luma.gl/shadertools": "~8.5.16",
"@luma.gl/webgl": "~8.5.16"
},
"devDependencies": {
"@deck.gl/extensions": "8.6.7",
"@deck.gl/mesh-layers": "8.6.7",
"@deck.gl/test-utils": "8.6.7",
"@deck.gl/extensions": "~8.8.6",
"@deck.gl/mesh-layers": "~8.8.6",
"@deck.gl/test-utils": "~8.8.6",
"@esbuild-plugins/node-globals-polyfill": "^0.1.1",
"@esbuild-plugins/node-modules-polyfill": "^0.1.4",
"@luma.gl/test-utils": "8.5.13",
"@luma.gl/test-utils": "~8.5.16",
"@pnpm/types": "^8.4.0",
"@probe.gl/test-utils": "^3.5.0",
"@typescript-eslint/eslint-plugin": "^5.25.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/constants/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"build": "unbuild"
},
"dependencies": {
"@luma.gl/constants": "8.5.13"
"@luma.gl/constants": "~8.5.16"
},
"unbuild": {
"entries": [
Expand Down
2 changes: 1 addition & 1 deletion packages/extensions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"prepare": "node prepare.mjs"
},
"peerDependencies": {
"@deck.gl/core": "8.6.7"
"@deck.gl/core": "~8.8.6"
},
"dependencies": {
"@vivjs/constants": "workspace:*"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const _AFTER_RENDER = '';
const AdditiveBlendExtension = class extends BaseExtension {
constructor(args) {
super(args);
this.opts.rendering = { _BEFORE_RENDER, _RENDER, _AFTER_RENDER };
this.rendering = { _BEFORE_RENDER, _RENDER, _AFTER_RENDER };
}
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ const defaultProps = {
* @property {string=} colormap String indicating a colormap (default: 'viridis'). The full list of options is here: https://github.com/glslify/glsl-colormap#glsl-colormap
* */
const BaseExtension = class extends LayerExtension {
constructor(...args) {
super(args);
// After deck.gl 8.8, it does not seem like this is always initialized.
this.opts = this.opts || {};
}

getShaders() {
const name = this?.props?.colormap || defaultProps.colormap.value;
const apply_cmap = cmaps[name];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const _AFTER_RENDER = `\
const MaximumIntensityProjectionExtension = class extends BaseExtension {
constructor(args) {
super(args);
this.opts.rendering = { _BEFORE_RENDER, _RENDER, _AFTER_RENDER };
this.rendering = { _BEFORE_RENDER, _RENDER, _AFTER_RENDER };
}
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const _AFTER_RENDER = `\
const MinimumIntensityProjectionExtension = class extends BaseExtension {
constructor(args) {
super(args);
this.opts.rendering = { _BEFORE_RENDER, _RENDER, _AFTER_RENDER };
this.rendering = { _BEFORE_RENDER, _RENDER, _AFTER_RENDER };
}
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const _AFTER_RENDER = ``;
const AdditiveBlendExtension = class extends BaseExtension {
constructor(args) {
super(args);
this.opts.rendering = { _BEFORE_RENDER, _RENDER, _AFTER_RENDER };
this.rendering = { _BEFORE_RENDER, _RENDER, _AFTER_RENDER };
}
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ const defaultProps = {
* @property {Array<Array<number>>=} colors Array of colors to map channels to (RGB).
* */
const BaseExtension = class extends LayerExtension {
constructor(...args) {
super(args);
// After deck.gl 8.8, it does not seem like this is always initialized.
this.opts = this.opts || {};
}

draw() {
const { colors, channelsVisible } = this.props;
const paddedColors = padColors({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const _AFTER_RENDER = `\
const MaximumIntensityProjectionExtension = class extends BaseExtension {
constructor(args) {
super(args);
this.opts.rendering = { _BEFORE_RENDER, _RENDER, _AFTER_RENDER };
this.rendering = { _BEFORE_RENDER, _RENDER, _AFTER_RENDER };
}
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const _AFTER_RENDER = `\
const MinimumIntensityProjectionExtension = class extends BaseExtension {
constructor(args) {
super(args);
this.opts.rendering = { _BEFORE_RENDER, _RENDER, _AFTER_RENDER };
this.rendering = { _BEFORE_RENDER, _RENDER, _AFTER_RENDER };
}
};

Expand Down
14 changes: 7 additions & 7 deletions packages/layers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@
"test": "node ../../scripts/bundle-test.mjs tests/index.spec.js | tape-run | tap-spec"
},
"peerDependencies": {
"@deck.gl/core": "8.6.7",
"@deck.gl/geo-layers": "8.6.7",
"@deck.gl/layers": "8.6.7",
"@luma.gl/constants": "8.5.13",
"@luma.gl/core": "8.5.13",
"@luma.gl/engine": "8.5.13",
"@luma.gl/webgl": "8.5.13"
"@deck.gl/core": "~8.8.6",
"@deck.gl/geo-layers": "~8.8.6",
"@deck.gl/layers": "~8.8.6",
"@luma.gl/constants": "~8.5.16",
"@luma.gl/core": "~8.5.16",
"@luma.gl/engine": "~8.5.16",
"@luma.gl/webgl": "~8.5.16"
},
"dependencies": {
"@math.gl/core": "^3.5.7",
Expand Down
2 changes: 1 addition & 1 deletion packages/layers/src/xr-3d-layer/xr-3d-layer.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ function getRenderingAttrs() {
function getRenderingFromExtensions(extensions) {
let rendering = {};
extensions.forEach(extension => {
rendering = extension.opts.rendering;
rendering = extension.rendering;
});
if (!rendering._RENDER) {
throw new Error(
Expand Down
2 changes: 1 addition & 1 deletion packages/viewers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"build": "unbuild"
},
"peerDependencies": {
"@deck.gl/react": "8.6.7",
"@deck.gl/react": "~8.8.6",
"react": "^16.8.0 || ^17.0.0"
},
"dependencies": {
Expand Down
4 changes: 2 additions & 2 deletions packages/views/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
"test": "esno tests/index.spec.js | tap-spec"
},
"peerDependencies": {
"@deck.gl/core": "8.6.7",
"@deck.gl/layers": "8.6.7"
"@deck.gl/core": "~8.8.6",
"@deck.gl/layers": "~8.8.6"
},
"dependencies": {
"@math.gl/core": "^3.5.7",
Expand Down
Loading

0 comments on commit 4779f89

Please sign in to comment.