Skip to content

Commit 32c5d8d

Browse files
Pessimistresschrisgervangclaude
authored
chore: fix website build (#10049)
* fix website build * fix(examples): update collision-filter example for turf v7 Replace deprecated `lineDistance` with `length` to fix breaking change from @turf/turf v7 upgrade. Also update example's package.json to use turf v7 for consistency. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Chris Gervang <chrisgervang@users.noreply.github.com> Co-authored-by: Chris Gervang <chris.gervang@joby.aero> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 5293ef4 commit 32c5d8d

File tree

7 files changed

+4904
-4309
lines changed

7 files changed

+4904
-4309
lines changed

examples/website/collision-filter/calculate-labels.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// SPDX-License-Identifier: MIT
33
// Copyright (c) vis.gl contributors
44

5-
import {geomEach, along, rhumbBearing, lineDistance, lineString, booleanEqual} from '@turf/turf';
5+
import {geomEach, along, rhumbBearing, length, lineString, booleanEqual} from '@turf/turf';
66
import type {FeatureCollection, Geometry, Feature, LineString} from 'geojson';
77

88
export type Label<FeatureProperties> = {
@@ -31,7 +31,7 @@ export function calculateLabels<FeatureProperties>(
3131
// 1 2 3 <- depth 2
3232
// 1 2 3 4 5 6 7 <- depth 3
3333
const feature = lineString(coordinates, properties);
34-
const lineLength = Math.floor(lineDistance(feature));
34+
const lineLength = Math.floor(length(feature));
3535
let delta = lineLength / 2; // Spacing between points at level
3636
let depth = 1;
3737
while (delta > pointSpacing) {

examples/website/collision-filter/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"build": "vite build"
1010
},
1111
"dependencies": {
12-
"@turf/turf": "6.5.0",
12+
"@turf/turf": "^7.0.0",
1313
"@types/react": "^18.0.0",
1414
"@types/react-dom": "^18.0.0",
1515
"deck.gl": "^9.0.0",

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@
4646
"@luma.gl/webgpu": "^9.2.6",
4747
"@math.gl/proj4": "^4.1.0",
4848
"@probe.gl/bench": "^4.1.1",
49-
"@vis.gl/dev-tools": "1.0.1",
50-
"@vis.gl/ts-plugins": "1.0.1",
49+
"@vis.gl/dev-tools": "1.0.2",
50+
"@vis.gl/ts-plugins": "1.0.2",
5151
"jsdom": "^20.0.0",
5252
"pre-commit": "^1.2.2",
5353
"puppeteer": "^24.26.1",

website/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"@material-ui/icons": "^4.9.1",
2626
"@material-ui/lab": "^4.0.0-alpha.57",
2727
"@monaco-editor/react": "^4.4.6",
28-
"@turf/turf": "^6.5.0",
28+
"@turf/turf": "^7.3.0",
2929
"@vis.gl/react-maplibre": "^1.0.0-alpha.5",
3030
"d3-color": "^3.1.0",
3131
"d3-hierarchy": "^2.0.0",
@@ -45,6 +45,7 @@
4545
"zustand": "^5.0.5"
4646
},
4747
"devDependencies": {
48+
"@babel/cli": "^7.28.6",
4849
"@docusaurus/core": "^3.6.3",
4950
"@docusaurus/plugin-content-docs": "^3.6.3",
5051
"@docusaurus/preset-classic": "^3.6.3",

website/scripts/build.sh

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,7 @@ case $MODE in
2929
esac
3030

3131
# transpile workers
32-
(
33-
cd ..
34-
BABEL_ENV=es5 npx babel ./website/static/workers --out-dir ./website/$OUTPUT_DIR/workers
35-
)
32+
BABEL_ENV=es5 npx babel ./static/workers --out-dir ./$OUTPUT_DIR/workers
3633

3734
# build gallery (scripting) examples
3835
(

website/yarn.lock

Lines changed: 4888 additions & 4291 deletions
Large diffs are not rendered by default.

yarn.lock

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2453,10 +2453,10 @@
24532453
dependencies:
24542454
"@vaadin/vaadin-development-mode-detector" "^2.0.0"
24552455

2456-
"@vis.gl/dev-tools@1.0.1":
2457-
version "1.0.1"
2458-
resolved "https://registry.yarnpkg.com/@vis.gl/dev-tools/-/dev-tools-1.0.1.tgz#72d43ec5d75d10ee54ed679a52db6edb73019622"
2459-
integrity sha512-ENI973W2KMTxDdCfLGSMdVSjQczbi1ju350iwFpeBdeDjWDgqOjzYD5SIcNWhzGlgKTY7r55H1h7M1vpiyisSA==
2456+
"@vis.gl/dev-tools@1.0.2":
2457+
version "1.0.2"
2458+
resolved "https://registry.yarnpkg.com/@vis.gl/dev-tools/-/dev-tools-1.0.2.tgz#f8d3a2c2c55c949a8627bd17d651e044ba720ad6"
2459+
integrity sha512-ONqqiTm6+4ufHIXWmO80T/LKb3afoz0CZQA6nTBA2lQGSg3/Lc6jAL8dfkQi1mpL8w2UqMT9u2VgCIuh4Ys/3g==
24602460
dependencies:
24612461
"@esbuild-plugins/node-globals-polyfill" "^0.2.0"
24622462
"@esbuild-plugins/node-modules-polyfill" "^0.2.0"
@@ -2488,10 +2488,10 @@
24882488
typescript-eslint "^7.7.0"
24892489
vite "^4.5.0"
24902490

2491-
"@vis.gl/ts-plugins@1.0.1":
2492-
version "1.0.1"
2493-
resolved "https://registry.yarnpkg.com/@vis.gl/ts-plugins/-/ts-plugins-1.0.1.tgz#7ba0c1ec653fe3137409f59861741f7d9fe13a78"
2494-
integrity sha512-jYDWlMrhazn1j2+AG1L3SdgrAmPeeOXpv2eTzf1XXEO8LIrs7+UFUVkwgecrDTOFkyNlstU3GP70x07arv+Elg==
2491+
"@vis.gl/ts-plugins@1.0.2":
2492+
version "1.0.2"
2493+
resolved "https://registry.yarnpkg.com/@vis.gl/ts-plugins/-/ts-plugins-1.0.2.tgz#dc8526e1711b844db19e693bac89678f57869b85"
2494+
integrity sha512-OQRgHuCkW9B3YcxueOvRgcCqR2IqlnITWEePGcWM8v8rfI4ioHZanfACZA9KNUg+I7CooFlKzDQczoc2fQ8o/A==
24952495
dependencies:
24962496
"@luma.gl/constants" "^9.0.0"
24972497
minimatch "^3.0.0"

0 commit comments

Comments
 (0)