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

feat(deps)!: upgrade Yarn v4 #323

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/.yarn/releases/** binary
/.yarn/plugins/** binary
13 changes: 12 additions & 1 deletion .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,32 @@ jobs:
check:
name: Check
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- run: echo "node_version=$(cat .github/nodejs.version)" >> $GITHUB_ENV
- name: "use node ${{ env.node_version }}"

- name: Enable Corepack
run: corepack enable

- name: "Set up Node.js ${{ env.node_version }}"
uses: actions/setup-node@v3
with:
node-version: "${{ env.node_version }}"

- name: Install dependencies
run: yarn install --frozen-lockfile

- name: Lint check
run: yarn lint

- name: Format check
run: yarn prettier

- name: Unit & Integration tests
run: yarn test

- name: Smoke & Acceptance tests
run: |
yarn build-storybook --quiet
Expand Down
11 changes: 9 additions & 2 deletions .github/workflows/nextjs_bundle_analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@ on:
push:
branches:
- main
- master
- develop
pull_request:
branches:
- main
- master
- develop
workflow_dispatch:

Expand All @@ -24,10 +26,15 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Set up node
- run: echo "node_version=$(cat .github/nodejs.version)" >> $GITHUB_ENV

- name: Enable Corepack
run: corepack enable

- name: "Set up Node.js ${{ env.node_version }}"
uses: actions/setup-node@v3
with:
node-version: "20.x"
node-version: "${{ env.node_version }}"

- name: Install dependencies
run: yarn install --frozen-lockfile
Expand Down
11 changes: 10 additions & 1 deletion .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,26 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- run: echo "node_version=$(cat .github/nodejs.version)" >> $GITHUB_ENV
- name: "use node ${{ env.node_version }}"

- name: Enable Corepack
run: corepack enable

- name: "Set up Node.js ${{ env.node_version }}"
uses: actions/setup-node@v3
with:
node-version: "${{ env.node_version }}"

- name: Install dependencies
run: yarn install --frozen-lockfile

- name: Install Playwright Browsers
run: yarn playwright install --with-deps

- name: Run Playwright tests
run: yarn playwright test

- uses: actions/upload-artifact@v3
if: always()
with:
Expand Down
13 changes: 12 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,19 @@ yarn-error.log*
.env.development.local
.env.test.local
.env.production.local

# playwright
/test-results/
/playwright-report/
/playwright/.cache/

/.npm-only-allow
# https://yarnpkg.com/getting-started/qa#which-files-should-be-gitignored
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions

/.npm-only-allow
1 change: 1 addition & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nodeLinker: node-modules
14 changes: 10 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,21 +72,27 @@ To get started with this boilerplate, follow these steps:
git clone https://github.com/<your_username)/next-enterprise.git
```

2. Install the dependencies:
2. Enable Corepack (required for Yarn@4)

```bash
corepack enable
```

3. Install the dependencies:

```bash
yarn install --frozen-lockfile
```

3. Run the development server:
4. Run the development server:

```bash
yarn dev
```

4. Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
5. Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.

5. This project uses a git hook to enforce [conventional commits](https://github.com/qoomon/git-conventional-commits). To install the git hook, run the following command in the root directory of the project:
6. This project uses a git hook to enforce [conventional commits](https://github.com/qoomon/git-conventional-commits). To install the git hook, run the following command in the root directory of the project:

```sh
brew install pre-commit
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -118,5 +118,5 @@
"engines": {
"node": ">=20.0.0"
},
"packageManager": "yarn@1.22.19"
"packageManager": "yarn@4.5.3"
}
Loading