File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3535 ruby-version : .ruby-version
3636 bundler-cache : true
3737
38+ - name : Install pnpm
39+ uses : pnpm/action-setup@8912a9102ac27614460f54aedde9e1e7f9aec20d # v6.0.5
40+ with :
41+ version : 11
42+
43+ - uses : actions/setup-node@v6
44+ with :
45+ node-version-file : .node-version
46+ cache : ' pnpm'
47+
3848 - name : Scan for security vulnerabilities in JavaScript dependencies
39- run : bin/yarn audit
49+ run : bin/pnpm audit
4050
4151 lint_rb :
4252 runs-on : ubuntu-latest
@@ -95,17 +105,17 @@ jobs:
95105 ruby-version : .ruby-version
96106 bundler-cache : true
97107
98- - uses : actions/setup-node@v6
108+ - name : Install pnpm
109+ uses : pnpm/action-setup@8912a9102ac27614460f54aedde9e1e7f9aec20d # v6.0.5
99110 with :
100- node- version-file : .node-version
111+ version : 11
101112
102- - uses : actions/cache@v5
113+ - uses : actions/setup-node@v6
103114 with :
104- path : ' **/node_modules '
105- key : ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
115+ node-version-file : .node-version
116+ cache : ' pnpm '
106117
107- - name : Install NPM modules
108- run : bin/yarn install
118+ - run : pnpm install --frozen-lockfile
109119
110120 - name : Build App
111121 run : bin/rails db:setup
Original file line number Diff line number Diff line change @@ -30,12 +30,12 @@ RUN apt-get update -qq && \
3030 rm -rf /var/lib/apt/lists /var/cache/apt/archives
3131
3232# Install JavaScript dependencies
33- ARG NODE_VERSION=24.11 .0
34- ARG YARN_VERSION=1.22.22
33+ ARG NODE_VERSION=24.16 .0
34+ ARG PNPM_VERSION=11.4.0
3535ENV PATH=/usr/local/node/bin:$PATH
3636RUN curl -sL https://github.com/nodenv/node-build/archive/master.tar.gz | tar xz -C /tmp/ && \
3737 /tmp/node-build-master/bin/node-build "${NODE_VERSION}" --verbose /usr/local/node && \
38- npm install -g yarn@$YARN_VERSION && \
38+ npm install -g pnpm@$PNPM_VERSION && \
3939 rm -rf /tmp/node-build-master
4040
4141# Install application gems
@@ -46,8 +46,8 @@ RUN bundle install && \
4646 bundle exec bootsnap precompile -j 1 --gemfile
4747
4848# Install node modules
49- COPY package.json yarn.lock ./
50- RUN yarn install --immutable
49+ COPY package.json pnpm*.yaml ./
50+ RUN pnpm install --frozen-lockfile
5151
5252# Copy application code
5353COPY . .
Original file line number Diff line number Diff line change 11web: env RUBY_DEBUG_OPEN=true bin/rails server
22worker: sleep 2 && env QUEUE=* bin/rails resque:work
3- js: yarn build --watch
4- css: yarn watch:css
3+ js: pnpm build --watch
4+ css: pnpm watch:css
Original file line number Diff line number Diff line change 1+ #!/usr/bin/env ruby
2+ APP_ROOT = File . expand_path ( '..' , __dir__ )
3+ Dir . chdir ( APP_ROOT ) do
4+ pnpm = ENV . fetch ( 'PATH' , '' ) . split ( File ::PATH_SEPARATOR )
5+ . reject { |dir | File . expand_path ( dir ) == __dir__ }
6+ . product ( %w[ pnpm pnpm.cmd pnpm.ps1 ] )
7+ . map { |dir , file | File . expand_path ( file , dir ) }
8+ . find { |file | File . executable? ( file ) }
9+
10+ if pnpm
11+ exec pnpm , *ARGV
12+ else
13+ $stderr. puts 'pnpm executable was not detected in the system.'
14+ $stderr. puts 'Install pnpm via https://pnpm.io/installation'
15+ exit 1
16+ end
17+ end
18+
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ FileUtils.chdir APP_ROOT do
1818 system ( 'bundle check' ) || system! ( 'bundle install' )
1919
2020 # Install JavaScript dependencies
21- system! 'bin/yarn '
21+ system! 'bin/pnpm '
2222
2323 # puts "\n== Copying sample files =="
2424 # unless File.exist?('config/database.yml')
Original file line number Diff line number Diff line change @@ -17,8 +17,8 @@ chdir APP_ROOT do
1717 system! 'gem install bundler --conservative'
1818 system ( 'bundle check' ) || system! ( 'bundle install' )
1919
20- # Install JavaScript dependencies if using Yarn
21- # system('bin/yarn ')
20+ # Install JavaScript dependencies if using pnpm
21+ # system('bin/pnpm ')
2222
2323 puts "\n == Updating database =="
2424 system! 'bin/rails db:migrate'
Load diff This file was deleted.
Original file line number Diff line number Diff line change 3030 "browserslist" : [
3131 " defaults"
3232 ],
33- "packageManager" : " yarn@1.22.22 +sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e " ,
33+ "packageManager" : " pnpm@11.4.0 +sha512.f0febc7e37552ab485494a914241b338e0b3580b93d54ce31f00933015880863129038a1b4ae4e414a0ee63ac35bf21197e990172c4a68256450b5636310968f " ,
3434 "scripts" : {
3535 "build" : " esbuild app/javascript/*.* --bundle --sourcemap --outdir=app/assets/builds --public-path=/assets" ,
3636 "build:css:compile" : " sass ./app/assets/stylesheets/application.bootstrap.scss:./app/assets/builds/application.css --no-source-map --load-path=node_modules" ,
3737 "build:css:prefix" : " postcss ./app/assets/builds/application.css --use=autoprefixer --output=./app/assets/builds/application.css" ,
38- "build:css" : " yarn build:css:compile && yarn build:css:prefix" ,
39- "watch:css" : " nodemon --watch ./app/assets/stylesheets/ --ext scss --exec \" yarn build:css\" "
38+ "build:css" : " pnpm build:css:compile && pnpm build:css:prefix" ,
39+ "watch:css" : " nodemon --watch ./app/assets/stylesheets/ --ext scss --exec \" pnpm build:css\" "
4040 }
4141}
You can’t perform that action at this time.
0 commit comments