[#6164] move from yarn to plain npm · fastruby/casa@eb2201e · GitHub
Skip to content

Commit eb2201e

Browse files
author
Raushan Kumar Raman
committed
[rubyforgood#6164] move from yarn to plain npm
1 parent 479eac6 commit eb2201e

23 files changed

Lines changed: 101 additions & 90 deletions

‎.dockerignore‎

Lines changed: 3 additions & 3 deletions

‎.github/labeler.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ erb:
2020

2121
javascript:
2222
- changed-files:
23-
- any-glob-to-any-file: ["**/*.js", "package*.json", "yarn.lock"]
23+
- any-glob-to-any-file: ["**/*.js", "package*.json", "package-lock.json"]
2424

2525
Tests! 🎉💖👏:
2626
- changed-files:
2727
- any-glob-to-any-file: ["app/javascript/__tests__/**.test.js", "spec/**/*_spec.rb"]
2828

2929
dependencies:
3030
- changed-files:
31-
- any-glob-to-any-file: ["Gemfile*", "package*.json", "yarn.lock"]
31+
- any-glob-to-any-file: ["Gemfile*", "package*.json", "package-lock.json"]

‎.github/workflows/ci.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
uses: actions/setup-node@v4
2828
with:
2929
node-version-file: '.nvmrc'
30-
cache: "yarn"
30+
cache: "npm"
3131

3232
rspec_parallel:
3333
needs: [preparation]
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: npm lint
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- '**/*.js'
9+
- '**/*.json'
10+
- '**/*.jsx'
11+
- 'package.lock.json'
12+
- '.github/workflows/*.yml'
13+
pull_request:
14+
branches:
15+
- main
16+
paths:
17+
- '**/*.js'
18+
- '**/*.json'
19+
- '**/*.jsx'
20+
- 'package.lock.json'
21+
- '.github/workflows/*.yml'
22+
23+
jobs:
24+
npm_lint:
25+
runs-on: ubuntu-latest
26+
27+
steps:
28+
- uses: actions/checkout@v4
29+
30+
- uses: actions/setup-node@v4
31+
with:
32+
node-version-file: '.nvmrc'
33+
34+
- run: npm ci
35+
- run: npm run lint
36+
- run: npm run test

‎.github/workflows/rspec.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ jobs:
4747
uses: actions/setup-node@v4
4848
with:
4949
node-version-file: '.nvmrc'
50-
cache: "yarn"
51-
- run: yarn
50+
cache: "npm"
51+
- run: npm ci
5252

5353
- name: Install PostgreSQL client
5454
run: |

‎.github/workflows/rspec_parallel.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ jobs:
6262
uses: actions/setup-node@v4
6363
with:
6464
node-version-file: '.nvmrc'
65-
cache: "yarn"
66-
- run: yarn
65+
cache: "npm"
66+
- run: npm ci
6767

6868
- name: Install PostgreSQL client
6969
run: |

‎.tool-versions‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
ruby 3.3.6
2-
yarn 1.22.22
2+
npm 11.0.0
33
nodejs 22.11.0

‎Dockerfile‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ RUN apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/m
3131
WORKDIR $RAILS_ROOT
3232

3333
COPY . .
34-
RUN npm install --global yarn
35-
RUN yarn install
36-
RUN yarn build && yarn build:css
34+
RUN npm install --global npm
35+
RUN npm install
36+
RUN npm run build && npm run build:css
3737

3838
COPY --from=builder /usr/local/bundle/ /usr/local/bundle/
3939

‎Procfile.dev‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
web: bin/rails server -p 3000 -b 0.0.0.0
2-
js: yarn build --watch
3-
css: yarn build:css --watch
2+
js: npm run build --watch
3+
css: npm run build:css --watch

‎README.md‎

Lines changed: 3 additions & 4 deletions

0 commit comments

Comments
 (0)