Skip to content
This repository was archived by the owner on Oct 3, 2024. It is now read-only.

Commit 49a65c0

Browse files
Migrate from Yarn to NPM (#252)
1 parent 2319b07 commit 49a65c0

File tree

12 files changed

+7139
-5085
lines changed

12 files changed

+7139
-5085
lines changed

.cirrus.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,11 @@ plugin_qa_task:
3535
script:
3636
- curl -urepox-qa-deployer:${REPOX_QA_DEPLOYER_API_KEY} https://repox.jfrog.io/artifactory/api/npm/auth > .npmrc
3737
- init_git_submodules -r
38-
- yarn
39-
- yarn typecheck
40-
- yarn build
38+
- npm install
39+
- npm run typecheck
40+
- npm run build
4141
- ./scripts/test-ci.sh
42-
- yarn prettier --list-different "{src,tests}/**/*.{js,ts}"
43-
- yarn lint
44-
- yarn ruling
42+
- npm run check-format
43+
- npm run lint
44+
- npm run ruling
4545
- ./scripts/analyze_and_publish.sh

.cirrus/nodejs-10.Dockerfile

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,6 @@ RUN wget -U "nodejs" -q -O nodejs.tar.xz https://nodejs.org/dist/${NODE_VERSION
99
&& rm nodejs.tar.xz \
1010
&& ln -s /usr/local/bin/node /usr/local/bin/nodejs
1111

12-
ENV YARN_VERSION 1.22.5
13-
14-
RUN curl -fsSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz" \
15-
&& mkdir -p /opt \
16-
&& tar -xzf yarn-v$YARN_VERSION.tar.gz -C /opt/ \
17-
&& ln -s /opt/yarn-v$YARN_VERSION/bin/yarn /usr/local/bin/yarn \
18-
&& ln -s /opt/yarn-v$YARN_VERSION/bin/yarnpkg /usr/local/bin/yarnpkg \
19-
&& rm yarn-v$YARN_VERSION.tar.gz
2012

2113
RUN curl "https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-4.3.0.2102.zip" -o /tmp/sonar-scanner.zip \
2214
&& unzip -d /opt /tmp/sonar-scanner.zip \

.cirrus/nodejs-12.Dockerfile

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,6 @@ RUN wget -U "nodejs" -q -O nodejs.tar.xz https://nodejs.org/dist/${NODE_VERSION
99
&& rm nodejs.tar.xz \
1010
&& ln -s /usr/local/bin/node /usr/local/bin/nodejs
1111

12-
ENV YARN_VERSION 1.22.5
13-
14-
RUN curl -fsSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz" \
15-
&& mkdir -p /opt \
16-
&& tar -xzf yarn-v$YARN_VERSION.tar.gz -C /opt/ \
17-
&& ln -s /opt/yarn-v$YARN_VERSION/bin/yarn /usr/local/bin/yarn \
18-
&& ln -s /opt/yarn-v$YARN_VERSION/bin/yarnpkg /usr/local/bin/yarnpkg \
19-
&& rm yarn-v$YARN_VERSION.tar.gz
20-
2112
RUN curl "https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-4.3.0.2102.zip" -o /tmp/sonar-scanner.zip \
2213
&& unzip -d /opt /tmp/sonar-scanner.zip \
2314
&& mv /opt/sonar-scanner-4.3.0.2102 /opt/sonar-scanner \

.cirrus/nodejs-14.Dockerfile

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,6 @@ RUN wget -U "nodejs" -q -O nodejs.tar.xz https://nodejs.org/dist/${NODE_VERSION
99
&& rm nodejs.tar.xz \
1010
&& ln -s /usr/local/bin/node /usr/local/bin/nodejs
1111

12-
ENV YARN_VERSION 1.22.5
13-
14-
RUN curl -fsSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz" \
15-
&& mkdir -p /opt \
16-
&& tar -xzf yarn-v$YARN_VERSION.tar.gz -C /opt/ \
17-
&& ln -s /opt/yarn-v$YARN_VERSION/bin/yarn /usr/local/bin/yarn \
18-
&& ln -s /opt/yarn-v$YARN_VERSION/bin/yarnpkg /usr/local/bin/yarnpkg \
19-
&& rm yarn-v$YARN_VERSION.tar.gz
20-
2112
RUN curl "https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-4.3.0.2102.zip" -o /tmp/sonar-scanner.zip \
2213
&& unzip -d /opt /tmp/sonar-scanner.zip \
2314
&& mv /opt/sonar-scanner-4.3.0.2102 /opt/sonar-scanner \

.cirrus/nodejs-15.Dockerfile

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,6 @@ RUN wget -U "nodejs" -q -O nodejs.tar.xz https://nodejs.org/dist/${NODE_VERSION
99
&& rm nodejs.tar.xz \
1010
&& ln -s /usr/local/bin/node /usr/local/bin/nodejs
1111

12-
ENV YARN_VERSION 1.22.5
13-
14-
RUN curl -fsSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz" \
15-
&& mkdir -p /opt \
16-
&& tar -xzf yarn-v$YARN_VERSION.tar.gz -C /opt/ \
17-
&& ln -s /opt/yarn-v$YARN_VERSION/bin/yarn /usr/local/bin/yarn \
18-
&& ln -s /opt/yarn-v$YARN_VERSION/bin/yarnpkg /usr/local/bin/yarnpkg \
19-
&& rm yarn-v$YARN_VERSION.tar.gz
20-
2112
RUN curl "https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-4.3.0.2102.zip" -o /tmp/sonar-scanner.zip \
2213
&& unzip -d /opt /tmp/sonar-scanner.zip \
2314
&& mv /opt/sonar-scanner-4.3.0.2102 /opt/sonar-scanner \

.gitignore

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
logs
33
*.log
44
npm-debug.log*
5-
yarn-debug.log*
6-
yarn-error.log*
75

86
# Coverage directory used by tools like istanbul
97
coverage
@@ -23,9 +21,6 @@ node_modules/
2321
# Output of 'npm pack'
2422
*.tgz
2523

26-
# Yarn Integrity file
27-
.yarn-integrity
28-
2924
# sonar-scanner
3025
.sonar
3126
.sonarlint

.npmignore

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
yarn-debug.log*
2-
yarn-error.log*
3-
.yarn-integrity
4-
5-
61
.npm
72
.eslintcache/
83
*.tgz
@@ -32,7 +27,5 @@ sonar-project.properties
3227
test-report.xml
3328
tsconfig.json
3429
tsconfig-src.json
35-
yarn.lock
36-
3730
.cirrus/
3831
.cirrus.yml

docs/CONTRIBUTING.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,19 @@ Report bugs and suggest improvements. If something doesn't work well for you or
2020
To run unit tests:
2121

2222
```
23-
yarn test
23+
npm run test
2424
```
2525

2626
To run unit tests in watch mode:
2727

2828
```
29-
yarn test --watch
29+
npm run test -- --watch
3030
```
3131

3232
And finally to run unit tests with coverage:
3333

3434
```
35-
yarn test --coverage
35+
npm run test -- --coverage
3636
```
3737

3838
## <a name="ruling"></a>Ruling
@@ -48,10 +48,10 @@ git submodule update --init --recursive
4848
To run the ruling test:
4949

5050
```sh
51-
yarn ruling
52-
yarn ruling --rule <rule-file-name> # to run ruling for a single rule
53-
yarn ruling --update # to update the snapshots
54-
yarn ruling --rule <rule-file-name> --update # it is possible to combine both options
51+
npm run ruling
52+
npm run ruling -- --rule <rule-file-name> # to run ruling for a single rule
53+
npm run ruling -- --update # to update the snapshots
54+
npm run ruling -- --rule <rule-file-name> --update # it is possible to combine both options
5555
```
5656

5757
## Code Style

0 commit comments

Comments
 (0)