Skip to content

Commit 90cc5a0

Browse files
committed
Migrate to pnpm
1 parent 677f1ee commit 90cc5a0

File tree

5 files changed

+14
-22
lines changed

5 files changed

+14
-22
lines changed

.github/workflows/javascript.yml

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ permissions:
1111

1212
jobs:
1313
test:
14-
name: Tests
14+
name: JavaScript Tests
1515
runs-on: ubuntu-latest
1616
steps:
1717
- uses: actions/checkout@v4
@@ -20,22 +20,12 @@ jobs:
2020
with:
2121
ruby-version: '3.3'
2222
bundler-cache: true
23+
- uses: pnpm/action-setup@v4
2324
- name: Set up Node
2425
uses: actions/setup-node@v4
2526
with:
2627
node-version: '18'
27-
- name: Get yarn cache directory path
28-
id: yarn-cache-dir-path
29-
run:
30-
echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
31-
- uses: actions/cache@v4
32-
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
33-
with:
34-
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
35-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
36-
restore-keys: |
37-
${{ runner.os }}-yarn-
38-
- name: Yarn
39-
run: yarn
28+
- name: Install node dependencies
29+
run: pnpm install
4030
- name: Run tests
4131
run: bundle exec rake test:js

.github/workflows/ruby.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ permissions:
1111

1212
jobs:
1313
test:
14-
name: Tests
14+
name: Ruby Tests
1515
runs-on: ubuntu-latest
1616
strategy:
1717
matrix:

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ test/log
1414
.byebug_history
1515

1616
node_modules
17-
yarn-error.log
1817

1918
!.babelrc
19+
20+
pnpm-lock.yaml

Rakefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ end
5555

5656
desc %(Regenerate JavaScript files)
5757
task :regenerate_javascript do
58-
run_yarn_script 'build'
58+
run_pnpm_script 'build'
5959
end
6060

6161
desc %(Commit JavaScript files)
@@ -99,15 +99,15 @@ def which(cmd)
9999
end
100100

101101
def run_headless_tests
102-
run_yarn_script 'test', "#{test_url}?autostart=false" do
102+
run_pnpm_script 'test', "#{test_url}?autostart=false" do
103103
Process.kill 'INT', @server
104104
end
105105
end
106106

107-
def run_yarn_script(script, options = '')
107+
def run_pnpm_script(script, options = '')
108108
require 'English'
109109

110-
system "yarn #{script} #{options}"
110+
system "pnpm #{script} #{options}"
111111
exit_code = $CHILD_STATUS.exitstatus
112112

113113
yield if block_given?

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,10 @@
3939
"main": "dist/simple-form.js",
4040
"module": "dist/simple-form.esm.js",
4141
"engines": {
42-
"node": ">=12.0.0",
43-
"yarn": ">=1.19.0"
42+
"node": ">= 18.12",
43+
"pnpm": "^9.12.1"
4444
},
45+
"packageManager": "pnpm@^9.12.1",
4546
"browserslist": [
4647
">= 1%",
4748
"last 1 major version",

0 commit comments

Comments
 (0)