Skip to content

Commit

Permalink
tech: update yarn to 4 (#7165)
Browse files Browse the repository at this point in the history
Обновляем yarn до v4, используем corepack
  • Loading branch information
SevereCloud authored Jul 11, 2024
1 parent 138bc01 commit 3c43a5e
Show file tree
Hide file tree
Showing 20 changed files with 5,825 additions and 6,664 deletions.
3 changes: 3 additions & 0 deletions .github/actions/get-playwright-docker-image/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ outputs:
runs:
using: composite
steps:
- name: Enable Corepack
run: corepack enable
shell: bash
- name: Setup NodeJS
uses: actions/setup-node@v4
with:
Expand Down
3 changes: 3 additions & 0 deletions .github/actions/publish-workflow-1-setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ description: It setting up the repository environment for publish
runs:
using: composite
steps:
- name: Enable Corepack
run: corepack enable
shell: bash
- name: Setup NodeJS
uses: actions/setup-node@v4
with:
Expand Down
3 changes: 3 additions & 0 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ description: It setting up the repository environment
runs:
using: composite
steps:
- name: Enable Corepack
run: corepack enable
shell: bash
- name: Setup NodeJS
uses: actions/setup-node@v4
with:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/dedupe_deps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Enable Corepack
run: corepack enable
shell: bash

- name: Setup NodeJS
uses: actions/setup-node@v4
with:
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/deploy_docs_on_branch_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Enable Corepack
run: corepack enable
shell: bash

- name: Setup NodeJS
uses: actions/setup-node@v4
with:
Expand Down Expand Up @@ -88,6 +92,10 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Enable Corepack
run: corepack enable
shell: bash

- name: Setup NodeJS
uses: actions/setup-node@v4
with:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/deprecate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ jobs:
deprecate:
runs-on: ubuntu-latest
steps:
- name: Enable Corepack
run: corepack enable
shell: bash

- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/pr_close.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ jobs:
with:
token: ${{ secrets.DEVTOOLS_GITHUB_TOKEN }}

- name: Enable Corepack
run: corepack enable
shell: bash

- name: Setup NodeJS
uses: actions/setup-node@v4
with:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/pull_request_common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Enable Corepack
run: corepack enable
shell: bash

- name: Setup NodeJS
uses: actions/setup-node@v4
with:
Expand Down
20 changes: 20 additions & 0 deletions .github/workflows/pull_request_packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Enable Corepack
run: corepack enable
shell: bash

- name: Setup NodeJS
uses: actions/setup-node@v4
with:
Expand Down Expand Up @@ -102,6 +106,10 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Enable Corepack
run: corepack enable
shell: bash

- name: Setup NodeJS
uses: actions/setup-node@v4
with:
Expand Down Expand Up @@ -152,6 +160,10 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Enable Corepack
run: corepack enable
shell: bash

- name: Setup NodeJS
uses: actions/setup-node@v4
with:
Expand Down Expand Up @@ -180,6 +192,10 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Enable Corepack
run: corepack enable
shell: bash

- name: Setup NodeJS
uses: actions/setup-node@v4
with:
Expand Down Expand Up @@ -207,6 +223,10 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Enable Corepack
run: corepack enable
shell: bash

- name: Setup NodeJS
uses: actions/setup-node@v4
with:
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/reusable_workflow_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ jobs:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.ref }}

- name: Enable Corepack
run: corepack enable
shell: bash

- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/reusable_workflow_test_e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ jobs:
- name: Checkout LFS objects
run: git lfs pull

- name: Enable Corepack
run: corepack enable
shell: bash

- name: Setup NodeJS
uses: actions/setup-node@v4
with:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/update_screens.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ jobs:
- name: Checkout LFS objects
run: git lfs pull

- name: Enable Corepack
run: corepack enable
shell: bash

- name: Setup NodeJS
uses: actions/setup-node@v4
with:
Expand Down
28 changes: 0 additions & 28 deletions .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs

This file was deleted.

874 changes: 0 additions & 874 deletions .yarn/releases/yarn-3.6.3.cjs

This file was deleted.

8 changes: 2 additions & 6 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,8 @@ npmPublishAccess: public

npmRegistryServer: 'https://registry.npmjs.org'

plugins:
- path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs
spec: '@yarnpkg/plugin-workspace-tools'

yarnPath: .yarn/releases/yarn-3.6.3.cjs

# specially for @vkontakte/floating-ui-react-dom package
# to use published version instead of workspace by default
enableTransparentWorkspaces: false

compressionLevel: mixed
5 changes: 3 additions & 2 deletions docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@
### Быстрый старт

1. Склонировать репозиторий и перейти в созданную директорию.
2. Установить зависимости: `yarn install`.
3. Поднять локально документацию с лайврелоадом: `yarn docs:styleguide`. Свойства и методы компонента в режиме разработки по умолчанию не генерируются; если они вам нужны, используйте команду `yarn docs:styleguide:props`.
2. Включить [corepack](https://nodejs.org/api/corepack.html): `corepack enable`
3. Установить зависимости: `yarn install`.
4. Поднять локально документацию с лайврелоадом: `yarn docs:styleguide`. Свойства и методы компонента в режиме разработки по умолчанию не генерируются; если они вам нужны, используйте команду `yarn docs:styleguide:props`.

Документация будет доступна на `http://localhost:6060`. В ней ведётся вся разработка. Для удобства можно сразу перейти на страницу разрабатываемого компонента (`http://localhost:6060/#/UsersStack`)

Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,10 @@
"docs:styleguide:build": "yarn workspace @project-docs/styleguide run build",
"docs:storybook": "yarn workspace @vkontakte/vkui storybook",
"docs:storybook:build": "yarn workspace @vkontakte/vkui storybook:build",
"build": "yarn workspaces foreach run build",
"build": "yarn workspaces foreach -A run build",
"build:vkui": "yarn workspace @vkontakte/vkui run build",
"test": "yarn workspaces foreach run test",
"test:ci": "yarn workspaces foreach run test:ci",
"test": "yarn workspaces foreach -A run test",
"test:ci": "yarn workspaces foreach -A run test:ci",
"test:e2e": "yarn workspace @vkontakte/vkui run test:e2e",
"test:e2e-update": "yarn workspace @vkontakte/vkui run test:e2e-update",
"test:e2e:ci": "yarn workspace @vkontakte/vkui run test:e2e:ci",
Expand Down Expand Up @@ -135,7 +135,7 @@
"prettier --check"
]
},
"packageManager": "yarn@3.6.3",
"packageManager": "yarn@4.3.1",
"workspaces": {
"packages": [
"styleguide",
Expand Down
1 change: 0 additions & 1 deletion packages/vkui-floating-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@
"@types/jest": "^29.5.12",
"jest": "^29.7.0"
},
"packageManager": "[email protected]",
"publishConfig": {
"provenance": true
}
Expand Down
1 change: 1 addition & 0 deletions packages/vkui/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ services:
user: root
working_dir: /repo/packages/vkui
command: sh -c "
corepack enable &&
YARN_ENABLE_SCRIPTS=false yarn install --immutable &&
yarn run test:e2e:ci ${UPDATE_SNAPSHOTS_FLAG:-}
"
Expand Down
Loading

0 comments on commit 3c43a5e

Please sign in to comment.