Upgrade to Yarn Berry
This commit is contained in:
4
.github/workflows/ci.yml
vendored
4
.github/workflows/ci.yml
vendored
@ -32,6 +32,8 @@ jobs:
|
|||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: 18
|
node-version: 18
|
||||||
|
- name: Enable Corepack
|
||||||
|
run: corepack enable
|
||||||
- name: Get yarn cache directory path
|
- name: Get yarn cache directory path
|
||||||
id: yarn-cache-dir-path
|
id: yarn-cache-dir-path
|
||||||
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
|
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
|
||||||
@ -50,7 +52,7 @@ jobs:
|
|||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-yarn-
|
${{ runner.os }}-yarn-
|
||||||
- name: Install yarn packages
|
- name: Install yarn packages
|
||||||
run: yarn install --pure-lockfile
|
run: yarn install --immutable
|
||||||
|
|
||||||
- name: Prepare config files
|
- name: Prepare config files
|
||||||
run: |
|
run: |
|
||||||
|
9
.gitignore
vendored
9
.gitignore
vendored
@ -46,6 +46,15 @@ node_modules/
|
|||||||
/yarn-error.log
|
/yarn-error.log
|
||||||
yarn-debug.log*
|
yarn-debug.log*
|
||||||
.yarn-integrity
|
.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
|
# Ignore uploaded files in development
|
||||||
/storage
|
/storage
|
||||||
|
1
.yarnrc.yml
Normal file
1
.yarnrc.yml
Normal file
@ -0,0 +1 @@
|
|||||||
|
nodeLinker: node-modules
|
@ -2,6 +2,9 @@
|
|||||||
|
|
||||||
ENV["RAILS_ENV"] ||= "development"
|
ENV["RAILS_ENV"] ||= "development"
|
||||||
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile", __FILE__)
|
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 "bundler/setup"
|
||||||
require "shakapacker"
|
require "shakapacker"
|
||||||
|
@ -2,6 +2,9 @@
|
|||||||
|
|
||||||
ENV["RAILS_ENV"] ||= "development"
|
ENV["RAILS_ENV"] ||= "development"
|
||||||
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile", __FILE__)
|
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 "bundler/setup"
|
||||||
require "shakapacker"
|
require "shakapacker"
|
||||||
|
@ -71,5 +71,6 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"webpack": "./bin/shakapacker",
|
"webpack": "./bin/shakapacker",
|
||||||
"webpack-dev-server": "./bin/shakapacker-dev-server"
|
"webpack-dev-server": "./bin/shakapacker-dev-server"
|
||||||
}
|
},
|
||||||
|
"packageManager": "yarn@4.0.1"
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user