Skip to content

Commit 6a4b5ba

Browse files
authored
Migrate frontend to yarn 4 (#71)
### Description Since we are no longer tracking `frontend/.yarn/`, and [yarnrc.yml](https://github.com/Kryha/KREAd/blob/develop/frontend/.yarnrc.yml) points to it, yarn breaks. Coincidentally, [yarn 4](https://yarnpkg.com/blog/release/4.0) just landed and it seems to solve the issue with Corepack: > "...we used to recommend using the [yarnPath](https://yarnpkg.com/configuration/yarnrc#yarnPath) setting pointing to a checked-in binary, but this pattern increased friction more than we liked - many people didn't like the idea of adding a binary to their repository, however small. We listened, and worked conjointely with Node.js on a project called [Corepack](https://nodejs.org/api/corepack.html). Corepack is a tool shipped with Node.js 16+ that will automatically select the right package manager version to run depending on the project you're working on" ### Acceptance Criteria - [x] yarn does not depend on `/frontend/.yarn` - [x] QAd
1 parent df362cf commit 6a4b5ba

File tree

3 files changed

+10225
-15138
lines changed

3 files changed

+10225
-15138
lines changed

frontend/.yarnrc.yml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
1-
nodeLinker: node-modules
1+
compressionLevel: mixed
2+
3+
enableGlobalCache: false
4+
25
nmHoistingLimits: workspaces
36

7+
nodeLinker: node-modules
8+
9+
# TODO: remove azure dependency
410
npmScopes:
511
kryha:
612
npmRegistryServer: "https://pkgs.dev.azure.com/Kryha-io/_packaging/Kryha-io/npm/registry"
713

8-
plugins:
9-
- path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.js
10-
spec: "@yarnpkg/plugin-workspace-tools"
11-
12-
yarnPath: .yarn/releases/yarn-3.1.1.cjs
14+
# using package.json's packageManager instead of yarnPath
15+
# yarnPath: .yarn/releases/yarn-4.0.0.cjs

frontend/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,5 +98,6 @@
9898
"vite": "^3.0.7",
9999
"vite-plugin-svgr": "^2.2.1",
100100
"vite-tsconfig-paths": "^3.5.0"
101-
}
101+
},
102+
"packageManager": "[email protected]"
102103
}

0 commit comments

Comments
 (0)