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

Upgrade to Yarn 4 #8061

Merged
merged 14 commits into from
Sep 11, 2024
89 changes: 55 additions & 34 deletions .gitignore
Copy link
Member Author

Choose a reason for hiding this comment

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

I slightly grouped some of the more obvious ignored files. Only moved stuff around.

Original file line number Diff line number Diff line change
Expand Up @@ -9,29 +9,57 @@ velocity.log
dist/*
lib_managed/
src_managed/
project/boot/
project/plugins/project/
RUNNING_PID
.cache
.classpath
.project
.settings/
.target/
logs/
./data/
.history
target/
binarydata/
userBinaryData/
binaryData
tracingData/
.eslintcache
*.vscode
.bsp
.env
.bloop
.metals
metals.sbt


# Webknossos
backup/
./data/
fossildb-dev/
binaryData
binarydata/
boot/
conf/application.conf-e
dev-db/
docker-compose.override.yml
fossildb-dev/
!frontend/javascripts/test/snapshots/type-check/.gitkeep
!frontend/javascripts/test/snapshots/debug-htmls/.gitkeep
frontend/javascripts/test/snapshots/debug-htmls/*
frontend/javascripts/test/snapshots/type-check/*
logs/
project/boot/
project/plugins/project/
public-test/test-bundle
public/bundle
public/commit.txt
public/docs
public/docs/frontend-api
public/test-bundle
src/main/scala/rebel.xml
target/
temp-webknossos-schema**
tracingData/
userBinaryData/

# IntelliJ
.idea/
.tmp/
*.iml
.idea_modules/

node_modules/
*.db
*.class
Expand All @@ -42,41 +70,34 @@ node_modules/
lifttemplate.iml
lifttemplate.ipr
lifttemplate.iws
src/main/scala/rebel.xml
*.obj
*.zip
*.skp
*.mtl
public/bundle
public/test-bundle
public-test/test-bundle
public/docs
public/commit.txt
/knowledge
conf/github.conf
tmp/
errorShots/
flow-coverage/
public/docs/frontend-api
dev-db/
docker-compose.override.yml
frontend/javascripts/test/snapshots/debug-htmls/*
!frontend/javascripts/test/snapshots/debug-htmls/.gitkeep
frontend/javascripts/test/snapshots/type-check/*
!frontend/javascripts/test/snapshots/type-check/.gitkeep
.eslintcache


# Sublime
*.sublime-project
*.sublime-workspace
**/screenshots/*.diff.png
**/screenshots/*.new.png

# Testing
.nyc_output
coverage
coverage-ts
*.vscode
.bsp
temp-webknossos-schema**
conf/application.conf-e
.env
.bloop
.metals
metals.sbt
**/screenshots/*.diff.png
**/screenshots/*.new.png

# Yarn
Copy link
Member Author

Choose a reason for hiding this comment

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

Added a new yarn group as described in their docs: https://yarnpkg.com/getting-started/qa#which-files-should-be-gitignored

.yarn/*
!.yarn/cache
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
tools/proxy/.yarn/install-state.gz
Copy link
Member

Choose a reason for hiding this comment

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

why not add a wildcard à la tools/proxy.yarn/*?

Copy link
Member Author

Choose a reason for hiding this comment

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

Good idea.

1 change: 1 addition & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nodeLinker: node-modules
Copy link
Member

Choose a reason for hiding this comment

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

out of curiousity: did you try other linkers? we don't need to switch in this pr, but I'm wondering if it's complicated.

Copy link
Member Author

Choose a reason for hiding this comment

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

Not yet. I wasn't sure how this works together with webpack/esbuild.

1 change: 1 addition & 0 deletions CHANGELOG.unreleased.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ For upgrade instructions, please check the [migration guide](MIGRATIONS.released

### Changed
- For self-hosted versions, the text in the data set upload view was updated to recommend switching to webknossos.org. [#7996](https://github.com/scalableminds/webknossos/pull/7996)
- Updated frontend package management to yarn version 4. [8061](https://github.com/scalableminds/webknossos/pull/8061)

### Fixed

Expand Down
10 changes: 2 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@
"webpack-cli": "^5.1.4",
"webpack-dev-server": "^5.0.2"
},
"optionalDependencies": {},
"scripts": {
"start": "node tools/proxy/proxy.js",
"build": "node --max-old-space-size=4096 node_modules/.bin/webpack --env production",
Expand Down Expand Up @@ -213,12 +212,6 @@
"url-join": "^4.0.0",
"worker-loader": "^3.0.8"
},
"resolutions": {
"**/mini-store": "^1.1.0",
"**/redux": "3.7.2",
"**/rc-resize-observer": "^1.4.0",
"**/rc-util": "^5.39.1"
},
Comment on lines -216 to -221
Copy link
Member

Choose a reason for hiding this comment

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

are resolutions not supported, anymore? I'm wondering whether the reasons, why we added these initially, are really obsolete now.

Copy link
Member Author

Choose a reason for hiding this comment

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

They were outremoved. I already removed redux, rc-* on the react-18 branch, leaving only mini-store. I cannot find a reference to mini-store either... So this should be fine.

"ava": {
"files": [
"./public-test/test-bundle/**/*.{js,jsx}"
Expand All @@ -241,5 +234,6 @@
"frontend/javascripts/test/**/*.*"
],
"reporter": "lcov"
}
},
"packageManager": "[email protected]"
}
Loading