Skip to content
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 yarn 4 #2610

Merged
merged 28 commits into from
Aug 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
1a735e8
[chore]: Upgrade to yarn 4
heshan0131 Aug 20, 2024
3aea9a9
remove yarnPath for github action to run
heshan0131 Aug 21, 2024
55b7a55
use volta
heshan0131 Aug 21, 2024
9c939fd
run yarn install first
heshan0131 Aug 21, 2024
93a5b05
skip install puppeteer
heshan0131 Aug 21, 2024
a833d72
move fix-dependency script to bootstrap
heshan0131 Aug 21, 2024
07243b5
run bootstrap
heshan0131 Aug 21, 2024
324bf1f
run yarn install first
heshan0131 Aug 21, 2024
0f3b8c1
fix website build
heshan0131 Aug 21, 2024
cfabbc8
add yarn.lock and try again
heshan0131 Aug 21, 2024
621971f
netlify deploy fix attempt 1- run to clean yarn cache in yarn deploy …
heshan0131 Aug 21, 2024
60fc619
rebase and run yarn
heshan0131 Aug 21, 2024
21dc069
netlify deploy fix attempt 2 - set YARN_VERSION in env vaariables
heshan0131 Aug 21, 2024
74e19f3
update yarn version in submodules
heshan0131 Aug 21, 2024
bd0b56f
netlify deploy fix attempt 3: disable globale cache
heshan0131 Aug 22, 2024
ae37e2f
fix kepler-jupyter bindings package.json
heshan0131 Aug 22, 2024
c337c90
netlify deploy fix attempt 4: resolve examples/demo-app nodemodules
heshan0131 Aug 22, 2024
864e23b
netlify deploy fix attempt 5: resolve examples/demo-app node modules
heshan0131 Aug 22, 2024
088e150
netlify deploy fix attempt 6: calling install twice
heshan0131 Aug 22, 2024
3b1583f
netlify deploy fix attempt 7: try add @auth0/auth0-spa-js to website/…
heshan0131 Aug 22, 2024
9681566
netlify deploy fix attempt 8: attempt to rename maybe case sensitive …
heshan0131 Aug 22, 2024
9ce18ec
netlify deploy fix attempt 9: import auth0 somewhere else for debug
heshan0131 Aug 22, 2024
4e762f0
netlify deploy fix attempt 9: add resolve to netlify config
heshan0131 Aug 22, 2024
69b34d7
netlify deploy fix attempt 10: add react-router to root package.json …
heshan0131 Aug 22, 2024
470f53e
netlify deploy fix attempt 11: add yarnrc to website and demo-app
heshan0131 Aug 23, 2024
c53e5de
netlify deploy fix attempt 12: reorder install:examples script
heshan0131 Aug 23, 2024
3aea6cf
revert change to website webpack.config
heshan0131 Aug 23, 2024
dd59d25
update DEVELOPERS.md to include Volta
heshan0131 Aug 23, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions .github/workflows/build-publish-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,10 @@ jobs:
if: "!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]')"

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Use Node.js 12.x
uses: actions/setup-node@v3
with:
node-version: 18.x
registry-url: https://registry.npmjs.org/
# use Volta to manage yarn/node versions
- uses: volta-cli/action@v4

- name: Set up Python 3.9
uses: actions/setup-python@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/npmpublish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
node-version: 18
registry-url: https://registry.npmjs.org/
- run: npm install -g yarn
- run: yarn
- run: yarn bootstrap
- run: npm i -g npm@8.19.2
- run: npm --version && npm publish --workspaces --access public
env:
Expand Down
17 changes: 7 additions & 10 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,18 @@ jobs:
node-version: [18.x]

steps:
- uses: actions/checkout@v2.1.1

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- uses: actions/checkout@v4
# use Volta to manage yarn/node versions
- uses: volta-cli/action@v4

- name: Install XVFB
run: sudo apt-get install xvfb

- name: Install YARN
run: npm install -g yarn
- name: Install Dependencies
run: yarn install && yarn bootstrap

- name: Install Dependecies
run: yarn global add "puppeteer@19.11.1" && yarn
# - name: Install Puppeteer
# run: yarn dlx "puppeteer@23.1.0"

- name: Lint
run: yarn lint
Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ umd/

typedoc/

*/**/yarn.lock
examples/**/yarn.lock
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are the yarn4 gitignore recommendations that I have been following in the vis.gl repos https://github.com/visgl/luma.gl/blob/master/.gitignore#L33

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am trying different things to get netlify deployment works on this PR. So far I noticed if I don't have yarn.lock in the website and examples/demo-app folder, running yarn install in these two folders to build the website will fail with a 'issing yarn.lock' message

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes you should check in the yarn.lock file

!examples/demo-app/yarn.lock

yarn-error.log
*/**/package-lock.json
package-lock.json
Expand Down
4 changes: 4 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# https://yarnpkg.com/configuration/yarnrc
nodeLinker: node-modules
# Define the registry to use when fetching packages.
npmRegistryServer: 'https://registry.yarnpkg.com'
8 changes: 4 additions & 4 deletions babel-register.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,17 @@ require('@babel/polyfill');
var path = require('path');
var glob = require('glob');

// Requiring mapbox-gl here prevents polyfilling errors during tests.
// Requiring mapbox-gl here prevents polyfill errors during tests.
require('mapbox-gl');

// eslint-disable-next-line func-names
process.argv.slice(2).forEach(function(arg) {
process.argv.slice(2).forEach(function (arg) {
// eslint-disable-next-line func-names
glob(arg, function(er, files) {
glob(arg, function (er, files) {
if (er) throw er;

// eslint-disable-next-line func-names
files.forEach(function(file) {
files.forEach(function (file) {
require(path.resolve(process.cwd(), file));
});
});
Expand Down
1 change: 0 additions & 1 deletion bindings/kepler.gl-jupyter/js/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@ dist/
temp.*
babel/

yarn.lock
yarn-error.log
package-lock.json
17 changes: 10 additions & 7 deletions bindings/kepler.gl-jupyter/js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,27 +26,27 @@
"start": "NODE_ENV=development webpack --config ./webpack/dev.js --mode development --watch --progress",
"clean": "rimraf dist/ && rimraf ../keplergl/static/",
"cleanall": "npm run clean && rimraf node_modules/",
"prepublish": "NODE_OPTIONS=--openssl-legacy-provider yarn build && yarn build:lab",
"prepublishOnly": "NODE_OPTIONS=--openssl-legacy-provider yarn build && yarn build:lab",
"build": "NODE_OPTIONS=--openssl-legacy-provider npm run clean && npm run build:lab && webpack --config ./webpack/build.js && jupyter labextension build .",
"build:lab": "NODE_OPTIONS=--openssl-legacy-provider rimraf babel/ && mkdir babel && babel lib --out-dir babel",
"test": "echo \"Error: no test specified\" && exit 1",
"lint": "eslint lib webpack --fix",
"prettier": "prettier --config ./.prettierrc --print-width 80 --single-quote --write lib/**/*.js"
},
"devDependencies": {
"apache-arrow": "^13.0.0",
"@babel/cli": "7.4.4",
"@babel/core": "^7.12.1",
"@babel/plugin-transform-class-properties": "^7.12.1",
"@babel/plugin-transform-export-namespace-from": "^7.12.1",
"@babel/plugin-transform-optional-chaining": "^7.12.1",
"@babel/plugin-transform-modules-commonjs": "^7.12.1",
"@babel/plugin-transform-optional-chaining": "^7.12.1",
"@babel/plugin-transform-runtime": "^7.12.1",
"@babel/plugin-transform-typescript": "^7.16.8",
"@babel/preset-env": "^7.0.0",
"@babel/preset-react": "^7.0.0",
"@babel/preset-typescript": "^7.16.7",
"@jupyterlab/builder": "^4.0.0",
"apache-arrow": "^13.0.0",
"babel-eslint": "^9.0.0",
"babel-loader": "^8.0.0",
"babel-plugin-search-and-replace": "^1.0.0",
Expand Down Expand Up @@ -75,8 +75,8 @@
"@kepler.gl/components": "^3.0.0",
"@kepler.gl/processors": "^3.0.0",
"@kepler.gl/reducers": "^3.0.0",
"@kepler.gl/styles": "^3.0.0",
"@kepler.gl/schemas": "^3.0.0",
"@kepler.gl/styles": "^3.0.0",
"@loaders.gl/arrow": "^4.1.0",
"@loaders.gl/core": "^4.1.0",
"@loaders.gl/csv": "^4.1.0",
Expand Down Expand Up @@ -111,9 +111,12 @@
}
}
},
"packageManager": "yarn@1.22.17",
"engines": {
"node": ">=18"
},
"volta": {
"node": "18.18.2",
"yarn": "1.22.17"
}
"yarn": "4.4.0"
},
"packageManager": "yarn@4.4.0"
}
Loading
Loading