Upgrade to Yarn Berry

This commit is contained in:
Sebastian Serth
2023-10-31 11:14:58 +01:00
parent 8097d20be6
commit 3176832258
7 changed files with 7263 additions and 4705 deletions

View File

@ -32,6 +32,8 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: 18
- name: Enable Corepack
run: corepack enable
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
@ -50,7 +52,7 @@ jobs:
restore-keys: |
${{ runner.os }}-yarn-
- name: Install yarn packages
run: yarn install --pure-lockfile
run: yarn install --immutable
- name: Prepare config files
run: |

9
.gitignore vendored
View File

@ -46,6 +46,15 @@ node_modules/
/yarn-error.log
yarn-debug.log*
.yarn-integrity
# Ignore more Yarn files per documentation:
# https://yarnpkg.com/getting-started/qa#which-files-should-be-gitignored
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
# Ignore uploaded files in development
/storage

1
.yarnrc.yml Normal file
View File

@ -0,0 +1 @@
nodeLinker: node-modules

View File

@ -2,6 +2,9 @@
ENV["RAILS_ENV"] ||= "development"
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile", __FILE__)
# Enable the `package_json` gem to allow the use scripts defined in `package.json`.
# See https://github.com/shakacode/shakapacker/issues/371
ENV["SHAKAPACKER_USE_PACKAGE_JSON_GEM"] ||= "true"
require "bundler/setup"
require "shakapacker"

View File

@ -2,6 +2,9 @@
ENV["RAILS_ENV"] ||= "development"
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile", __FILE__)
# Enable the `package_json` gem to allow the use scripts defined in `package.json`.
# See https://github.com/shakacode/shakapacker/issues/371
ENV["SHAKAPACKER_USE_PACKAGE_JSON_GEM"] ||= "true"
require "bundler/setup"
require "shakapacker"

View File

@ -71,5 +71,6 @@
"scripts": {
"webpack": "./bin/shakapacker",
"webpack-dev-server": "./bin/shakapacker-dev-server"
}
},
"packageManager": "yarn@4.0.1"
}

11945
yarn.lock

File diff suppressed because it is too large Load Diff