-
-
Notifications
You must be signed in to change notification settings - Fork 135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: upgrade to React 19, yarn 4, Cesium 1.126.0 and TS #693
base: main
Are you sure you want to change the base?
Changes from 9 commits
375715f
2415ade
4503b69
d5591fe
57632b4
903fa65
06736c7
d7b9ed7
fcb3032
4d4669a
20d3fa0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -1,74 +1,100 @@ | ||||||||||||
name: ci | ||||||||||||
|
||||||||||||
on: | ||||||||||||
push: | ||||||||||||
branches: | ||||||||||||
- main | ||||||||||||
pull_request: | ||||||||||||
|
||||||||||||
jobs: | ||||||||||||
ci: | ||||||||||||
name: CI | ||||||||||||
runs-on: ubuntu-latest | ||||||||||||
steps: | ||||||||||||
- uses: actions/setup-node@v3 | ||||||||||||
- name: Checkout | ||||||||||||
uses: actions/checkout@v4 | ||||||||||||
|
||||||||||||
- name: Setup Node.js | ||||||||||||
uses: actions/setup-node@v4 | ||||||||||||
with: | ||||||||||||
node-version: lts/* | ||||||||||||
- name: Checkout | ||||||||||||
uses: actions/checkout@v3 | ||||||||||||
- name: Get yarn cache directory path | ||||||||||||
id: yarn-cache-dir-path | ||||||||||||
run: echo "::set-output name=dir::$(yarn cache dir)" | ||||||||||||
- uses: actions/cache@v3 | ||||||||||||
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) | ||||||||||||
|
||||||||||||
- name: Enable Corepack | ||||||||||||
run: corepack enable | ||||||||||||
|
||||||||||||
# Yarn 4 uses .yarn/cache instead of a global cache directory | ||||||||||||
- name: Cache Yarn dependencies | ||||||||||||
uses: actions/cache@v4 | ||||||||||||
with: | ||||||||||||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | ||||||||||||
path: | | ||||||||||||
.yarn/cache | ||||||||||||
.yarn/unplugged | ||||||||||||
.yarn/install-state.gz | ||||||||||||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | ||||||||||||
restore-keys: | | ||||||||||||
${{ runner.os }}-yarn- | ||||||||||||
- name: Install | ||||||||||||
run: yarn install --frozen-lockfile | ||||||||||||
|
||||||||||||
- name: Install dependencies | ||||||||||||
run: yarn install --immutable | ||||||||||||
|
||||||||||||
- name: Lint | ||||||||||||
run: yarn run lint | ||||||||||||
|
||||||||||||
- name: Test | ||||||||||||
run: yarn run test | ||||||||||||
|
||||||||||||
- name: Codecov | ||||||||||||
uses: codecov/codecov-action@v3 | ||||||||||||
|
||||||||||||
- name: Build | ||||||||||||
run: yarn run build | ||||||||||||
|
||||||||||||
- name: Upload artifacts | ||||||||||||
uses: actions/upload-artifact@v3 | ||||||||||||
uses: actions/upload-artifact@v4 | ||||||||||||
with: | ||||||||||||
name: dist | ||||||||||||
path: dist/**/* | ||||||||||||
|
||||||||||||
docs: | ||||||||||||
name: Build docs | ||||||||||||
runs-on: ubuntu-latest | ||||||||||||
needs: ci | ||||||||||||
if: ${{ github.event_name == 'push' }} | ||||||||||||
steps: | ||||||||||||
- uses: actions/setup-node@v3 | ||||||||||||
- name: Checkout | ||||||||||||
uses: actions/checkout@v4 | ||||||||||||
|
||||||||||||
- name: Setup Node.js | ||||||||||||
uses: actions/setup-node@v4 | ||||||||||||
with: | ||||||||||||
node-version: lts/* | ||||||||||||
- name: Checkout | ||||||||||||
uses: actions/checkout@v3 | ||||||||||||
- name: Get yarn cache directory path | ||||||||||||
id: yarn-cache-dir-path | ||||||||||||
run: echo "::set-output name=dir::$(yarn cache dir)" | ||||||||||||
- uses: actions/cache@v3 | ||||||||||||
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) | ||||||||||||
|
||||||||||||
- name: Enable Corepack | ||||||||||||
run: corepack enable | ||||||||||||
|
||||||||||||
- name: Cache Yarn dependencies | ||||||||||||
uses: actions/cache@v4 | ||||||||||||
with: | ||||||||||||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | ||||||||||||
path: | | ||||||||||||
.yarn/cache | ||||||||||||
.yarn/unplugged | ||||||||||||
.yarn/install-state.gz | ||||||||||||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | ||||||||||||
restore-keys: | | ||||||||||||
${{ runner.os }}-yarn- | ||||||||||||
- name: Install | ||||||||||||
run: yarn install --frozen-lockfile | ||||||||||||
|
||||||||||||
- name: Install dependencies | ||||||||||||
run: yarn install --immutable | ||||||||||||
|
||||||||||||
- name: Install Docs | ||||||||||||
run: (cd docs && yarn install --frozen-lockfile) | ||||||||||||
run: (cd docs && yarn install --immutable) | ||||||||||||
|
||||||||||||
- name: Build docs | ||||||||||||
run: yarn run docs:build | ||||||||||||
|
||||||||||||
- name: Deploy docs | ||||||||||||
uses: peaceiris/actions-gh-pages@v3 | ||||||||||||
Comment on lines
95
to
96
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Update gh-pages action version. The gh-pages action version is outdated. - uses: peaceiris/actions-gh-pages@v3
+ uses: peaceiris/actions-gh-pages@v4 📝 Committable suggestion
Suggested change
🧰 Tools🪛 actionlint (1.7.4)96-96: the runner of "peaceiris/actions-gh-pages@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue (action) |
||||||||||||
with: | ||||||||||||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||||||||||||
publish_dir: ./docs/build | ||||||||||||
cname: resium.reearth.io | ||||||||||||
cname: resium.reearth.io |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
nodeLinker: node-modules |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,40 +40,44 @@ | |
}, | ||
"peerDependencies": { | ||
"cesium": "1.x", | ||
"react": ">=18.2.0", | ||
"react-dom": ">=18.2.0" | ||
"react": ">=18.2.0 <20", | ||
"react-dom": ">=18.2.0 <20" | ||
}, | ||
"devDependencies": { | ||
"@storybook/addon-essentials": "8.0.5", | ||
"@storybook/addon-storysource": "8.0.5", | ||
"@storybook/addons": "7.6.17", | ||
"@storybook/builder-vite": "8.0.5", | ||
"@storybook/react": "8.0.5", | ||
"@storybook/react-vite": "8.0.5", | ||
"@storybook/theming": "8.0.5", | ||
"@testing-library/jest-dom": "6.4.2", | ||
"@testing-library/react": "14.2.2", | ||
"@types/node": "20.12.2", | ||
"@types/react": "18.2.73", | ||
"@vitejs/plugin-react": "4.2.1", | ||
"c8": "9.1.0", | ||
"cesium": "1.116.0", | ||
"@storybook/addon-essentials": "8.5.3", | ||
"@storybook/addon-storysource": "8.5.3", | ||
"@storybook/addons": "7.6.20", | ||
"@storybook/builder-vite": "8.5.3", | ||
"@storybook/react": "8.5.3", | ||
"@storybook/react-vite": "8.5.3", | ||
"@storybook/theming": "8.5.3", | ||
"@testing-library/dom": "10.4.0", | ||
"@testing-library/jest-dom": "6.6.3", | ||
"@testing-library/react": "16.2.0", | ||
"@types/jsdom": "21.1.7", | ||
"@types/node": "22.13.1", | ||
"@types/react": "19.0.8", | ||
"@types/react-dom": "^19.0.3", | ||
"@vitejs/plugin-react": "4.3.4", | ||
"c8": "10.1.3", | ||
"cesium": "1.126.0", | ||
"eslint": "8.57.0", | ||
"eslint-config-reearth": "0.3.0", | ||
"globby": "14.0.1", | ||
"jsdom": "24.0.0", | ||
"npm-run-all2": "5.0.0", | ||
"jsdom": "26.0.0", | ||
"npm-run-all2": "7.0.2", | ||
"prettier": "3.2.5", | ||
"react": "18.2.0", | ||
"react-dom": "18.2.0", | ||
"storybook": "8.0.5", | ||
"react": "19.0.0", | ||
"react-dom": "19.0.0", | ||
"storybook": "8.5.3", | ||
"ts-expect": "1.3.0", | ||
"ts-node": "10.9.2", | ||
"typescript": "5.4.3", | ||
"vite": "5.2.7", | ||
"vite-plugin-cesium": "1.2.22", | ||
"vite-plugin-dts": "3.8.1", | ||
"vitest": "1.4.0", | ||
"vite": "6.1.0", | ||
"vite-plugin-cesium": "1.2.23", | ||
"vite-plugin-dts": "4.5.0", | ||
"vitest": "3.0.5", | ||
"web-streams-polyfill": "4.0.0" | ||
} | ||
}, | ||
"packageManager": "[email protected]" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,6 +46,7 @@ const cesiumProps = [ | |
"resolutionScale", | ||
"allowDataSourcesToSuspendAnimation", | ||
"trackedEntity", | ||
"ellipsoid", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Verification agent 🧩 Analysis chainLGTM! Added ellipsoid support consistently with CesiumWidget. The addition of Let's verify the ellipsoid property is consistently implemented across components: 🏁 Script executed: #!/bin/bash
# Search for ellipsoid property usage across components
rg -l 'ellipsoid.*cesiumProps' src/ Length of output: 37 Let's gather more context to verify that the ellipsoid property has been added consistently. We need to inspect the context around the cesiumProps array in both Viewer.ts and CesiumWidget.ts to confirm the ellipsoid entry is present. Please run the following verification shell script: This script will print out the surrounding lines of the cesiumProps arrays in both files so we can verify that the ellipsoid property is included consistently. 🏁 Script executed: #!/bin/bash
echo "=== Viewer.ts: cesiumProps context ==="
rg -C 5 'cesiumProps' src/Viewer/Viewer.ts
echo "=== CesiumWidget.ts: cesiumProps context ==="
rg -C 5 'cesiumProps' src/CesiumWidget.ts Length of output: 1103 Let's gather more context by inspecting the full definition of cesiumProps in Viewer.ts and searching for similar definitions elsewhere (which should include the cesiumProps implementation in CesiumWidget if available). Please run the following verification shell script: 🏁 Script executed: #!/bin/bash
echo "=== Full definition of cesiumProps in Viewer.ts ==="
sed -n '/const cesiumProps = \[/,/\]/p' src/Viewer/Viewer.ts
echo "=== Searching for all cesiumProps definitions in the repository ==="
rg -l 'const cesiumProps = \[' . Length of output: 2903 Let's verify if the ellipsoid property is consistently included in the CesiumWidget component. Please run the following script to inspect the full definition of cesiumProps in CesiumWidget.ts: 🏁 Script executed: #!/bin/bash
echo "=== Full definition of cesiumProps in CesiumWidget.ts ==="
sed -n '/const cesiumProps = \[/,/\]/p' src/CesiumWidget/CesiumWidget.ts Length of output: 357 Ellipsoid Property Inconsistency Found
It appears that while the Viewer was updated to support the ellipsoid property, the same was not applied to CesiumWidget. Please confirm whether ellipsoid support is intended in both components. If consistency across components is required, then CesiumWidget.ts should be updated accordingly. |
||
"selectedEntity", | ||
"shadows", | ||
"useBrowserRecommendedResolution", | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Update codecov action version.
The codecov action version is outdated.
📝 Committable suggestion
🧰 Tools
🪛 actionlint (1.7.4)
47-47: the runner of "codecov/codecov-action@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)