Skip to content

Commit 0036769

Browse files
authored
Use npm instead of yarn to build Theia (eclipse-theia#14481)
Fixes eclipse-theia#13948 Contributed on behalf of STMicroelectronics Signed-off-by: Thomas Mäder <[email protected]>
1 parent 11ea9e6 commit 0036769

File tree

82 files changed

+31872
-14338
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+31872
-14338
lines changed

.editorconfig

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
root = true
22

33
[*]
4-
insert_final_newline = true
54
end_of_line = lf
65
indent_style = space
76

.eslintrc.js

-18
This file was deleted.

.gitattributes

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
dev-packages/*/bin/*.js text eol=lf

.github/workflows/ci-cd.yml

+15-21
Original file line numberDiff line numberDiff line change
@@ -34,16 +34,16 @@ jobs:
3434
- name: Install and Build
3535
shell: bash
3636
run: |
37-
yarn global add node-gyp
38-
yarn --skip-integrity-check --network-timeout 100000
37+
npm install -g node-gyp
38+
npm ci
3939
./scripts/check_git_status.sh
4040
env:
4141
NODE_OPTIONS: --max_old_space_size=4096
4242
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # https://github.com/microsoft/vscode-ripgrep/issues/9
4343

4444
- name: Lint
4545
run: |
46-
yarn lint
46+
npm run lint
4747
4848
build:
4949
name: Build and Test (${{ matrix.os }}, node-${{ matrix.node }})
@@ -72,44 +72,38 @@ jobs:
7272
with:
7373
python-version: '3.11'
7474

75-
- name: Install
75+
- name: Build
7676
shell: bash
7777
run: |
78-
yarn global add node-gyp
79-
yarn --skip-integrity-check --network-timeout 100000
78+
npm install -g node-gyp
79+
npm ci
80+
npm run build
81+
git status
8082
./scripts/check_git_status.sh
8183
env:
8284
NODE_OPTIONS: --max_old_space_size=4096
8385
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # https://github.com/microsoft/vscode-ripgrep/issues/9
8486

87+
8588
- name: Download Plugins
8689
if: runner.os == 'Linux'
8790
shell: bash
8891
run: |
89-
yarn -s download:plugins --rate-limit 3
90-
91-
- name: Build
92-
shell: bash
93-
run: |
94-
yarn build:examples
95-
./scripts/check_git_status.sh
96-
env:
97-
NODE_OPTIONS: --max_old_space_size=4096
98-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # https://github.com/microsoft/vscode-ripgrep/issues/9
99-
92+
npm run download:plugins -- --rate-limit 3
93+
10094
- name: Test (headless)
10195
if: matrix.tests != 'skip'
10296
shell: bash
10397
run: |
104-
yarn browser rebuild
105-
yarn test:theia
98+
npm run rebuild:browser
99+
npm run test:theia
106100
107101
- name: Test (browser)
108102
if: matrix.tests != 'skip' && runner.os == 'Linux'
109103
run: |
110-
xvfb-run -a yarn browser test
104+
xvfb-run -a npm run test:browser
111105
112106
- name: Test (electron)
113107
if: matrix.tests != 'skip' && runner.os == 'Linux'
114108
run: |
115-
xvfb-run -a yarn electron test
109+
xvfb-run -a npm run test:electron

.github/workflows/license-check.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,4 @@ jobs:
4848
if: matrix.tests != 'skip'
4949
shell: bash
5050
run: |
51-
yarn license:check
51+
npm run license:check

.github/workflows/native-dependencies.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -27,21 +27,21 @@ jobs:
2727
- name: Install and Build
2828
shell: bash
2929
run: |
30-
yarn --skip-integrity-check --network-timeout 100000
30+
npm ci
3131
env:
3232
NODE_OPTIONS: --max_old_space_size=4096
3333
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # https://github.com/microsoft/vscode-ripgrep/issues/9
3434

3535
- name: Build Browser App
3636
shell: bash
3737
run: |
38-
yarn browser build
38+
npm run build:browser
3939
env:
4040
NODE_OPTIONS: --max_old_space_size=4096
4141

4242
- name: Zip Native Dependencies
4343
shell: bash
44-
run: yarn zip:native:dependencies
44+
run: npm run zip:native:dependencies
4545

4646
- name: Upload Artifacts
4747
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3

.github/workflows/performance-tests.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -28,20 +28,20 @@ jobs:
2828
- name: Build
2929
shell: bash
3030
run: |
31-
yarn global add node-gyp
32-
yarn --skip-integrity-check --network-timeout 100000 --ignore-engines
33-
yarn build:examples
31+
npm install -g node-gyp
32+
npm ci
33+
npm run build
3434
env:
3535
NODE_OPTIONS: --max_old_space_size=4096
3636
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # https://github.com/microsoft/vscode-ripgrep/issues/9
3737

3838
- name: Performance (browser)
3939
shell: bash
40-
run: yarn performance:startup:browser
40+
run: npm run performance:startup:browser
4141

4242
- name: Performance (Electron)
4343
shell: bash
44-
run: xvfb-run yarn performance:startup:electron
44+
run: xvfb-run npm run performance:startup:electron
4545

4646
- name: Analyze performance results
4747
uses: benchmark-action/github-action-benchmark@fd31771ce86cc65eab85653da103f71ab1b4479c # v1.9.0

.github/workflows/playwright.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -42,22 +42,22 @@ jobs:
4242
- name: Build Browser
4343
shell: bash
4444
run: |
45-
yarn global add node-gyp
46-
yarn --skip-integrity-check --network-timeout 100000
47-
yarn download:plugins
48-
yarn browser build
45+
npm install -g node-gyp
46+
npm ci
47+
npm run build:browser
48+
npm run download:plugins
4949
env:
5050
NODE_OPTIONS: --max_old_space_size=4096
5151
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # https://github.com/microsoft/vscode-ripgrep/issues/9
5252

5353
- name: Build Playwright
5454
shell: bash
5555
run: |
56-
yarn --cwd examples/playwright build
56+
cd examples/playwright && npm run build
5757
5858
- name: Test (playwright)
5959
shell: bash
60-
run: yarn --cwd examples/playwright ui-tests-ci
60+
run: cd examples/playwright && npm run ui-tests-ci
6161

6262
- name: Archive test results
6363
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 #v4

.github/workflows/production-smoke-test.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -34,18 +34,18 @@ jobs:
3434
- name: Build Browser Example Application for Production
3535
shell: bash
3636
run: |
37-
yarn global add node-gyp
38-
yarn --skip-integrity-check --network-timeout 100000
39-
yarn browser build:production
37+
npm install -g node-gyp
38+
npm ci
39+
cd examples/browser && npm run build:production
4040
env:
4141
NODE_OPTIONS: --max_old_space_size=4096
4242
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # https://github.com/microsoft/vscode-ripgrep/issues/9
4343

4444
- name: Build Playwright
4545
shell: bash
4646
run: |
47-
yarn --cwd examples/playwright build
47+
cd examples/playwright && npm run build
4848
4949
- name: Run Smoke Test (examples/playwright/src/tests/theia-app)
5050
shell: bash
51-
run: yarn test:playwright theia-app
51+
run: npm run test:playwright -- theia-app

.github/workflows/publish-gh-pages.yml

+6-5
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
runs-on: ubuntu-22.04
1414

1515
# The current approach is silly. We should be smarter and use `actions/upload-artifact` and `actions/download-artifact` instead of rebuilding
16-
# everything from scratch again. (git checkout, Node.js install, yarn, etc.) It was not possible to share artifacts on Travis CI without an
16+
# everything from scratch again. (git checkout, Node.js install, npm, etc.) It was not possible to share artifacts on Travis CI without an
1717
# external storage (such as S3), so we did rebuild everything before the npm publish. We should overcome this limitation with GH Actions.
1818

1919
steps:
@@ -35,15 +35,16 @@ jobs:
3535

3636
- name: Pre-npm-Publish
3737
run: |
38-
yarn global add node-gyp
39-
yarn --skip-integrity-check --network-timeout 100000
38+
npm install -g node-gyp
39+
npm ci
40+
npm run build
4041
env:
4142
NODE_OPTIONS: --max_old_space_size=4096
4243
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # https://github.com/microsoft/vscode-ripgrep/issues/9
4344

4445
- name: Pre-docs-Publish
4546
run: |
46-
yarn docs
47+
npm run docs
4748
env:
4849
NODE_OPTIONS: --max_old_space_size=14336
4950

@@ -61,7 +62,7 @@ jobs:
6162
retry_wait_seconds: 30
6263
max_attempts: 3
6364
retry_on: error
64-
command: yarn publish:next
65+
command: npm run publish:next
6566
on_retry_command: git reset --hard
6667
env:
6768
NPM_CONFIG_PROVENANCE: "true"

.github/workflows/publish-next.yml

+4-3
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,17 @@ jobs:
3232
- name: Install
3333
shell: bash
3434
run: |
35-
yarn global add node-gyp
36-
yarn --skip-integrity-check --network-timeout 100000
35+
npm install -g node-gyp
36+
npm ci
37+
npm run build
3738
env:
3839
NODE_OPTIONS: --max_old_space_size=4096
3940
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # https://github.com/microsoft/vscode-ripgrep/issues/9
4041

4142
- name: Publish NPM
4243
shell: bash
4344
run: |
44-
yarn publish:next
45+
npm run publish:next
4546
env:
4647
NPM_CONFIG_PROVENANCE: "true"
4748
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}

.github/workflows/publish-release.yml

+5-4
Original file line numberDiff line numberDiff line change
@@ -38,17 +38,18 @@ jobs:
3838
- name: Install
3939
shell: bash
4040
run: |
41-
yarn global add node-gyp
42-
yarn --skip-integrity-check --network-timeout 100000
41+
npm install -g node-gyp
42+
npm ci
43+
npm run build
4344
env:
4445
NODE_OPTIONS: --max_old_space_size=4096
4546
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # https://github.com/microsoft/vscode-ripgrep/issues/9
4647

4748
- name: Publish NPM
4849
shell: bash
4950
run: |
50-
yarn publish:latest -- ${{ inputs.release_type }}
51-
yarn publish:check
51+
npm run publish:latest -- ${{ inputs.release_type }}
52+
npm run publish:check
5253
env:
5354
NPM_CONFIG_PROVENANCE: "true" # enable provenance check
5455
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}

.github/workflows/translation.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,9 @@ jobs:
2626
- name: Install and Build
2727
shell: bash
2828
run: |
29-
yarn global add node-gyp
30-
yarn --skip-integrity-check --network-timeout 100000
29+
npm install -g node-gyp
30+
npm ci
31+
npm run build
3132
env:
3233
NODE_OPTIONS: --max_old_space_size=4096
3334
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # https://github.com/microsoft/vscode-ripgrep/issues/9

.gitpod.dockerfile

+1-2
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,5 @@ ENV NODE_VERSION="18.17.0"
2121
RUN bash -c ". .nvm/nvm.sh \
2222
&& nvm install $NODE_VERSION \
2323
&& nvm use $NODE_VERSION \
24-
&& nvm alias default $NODE_VERSION \
25-
&& npm install -g yarn"
24+
&& nvm alias default $NODE_VERSION
2625
ENV PATH=$HOME/.nvm/versions/node/v${NODE_VERSION}/bin:$PATH

.gitpod.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ ports:
1212
- port: 9339 # Node.js debug port
1313
onOpen: ignore
1414
tasks:
15-
- init: yarn --network-timeout 100000 && yarn browser build && yarn download:plugins
15+
- init: npm ci && npm run build && npm run download:plugins
1616
command: >
1717
jwm &
18-
yarn browser start ../.. --hostname=0.0.0.0
18+
npm run start:browser ../.. --hostname=0.0.0.0
1919
vscode:
2020
extensions:
2121
- dbaeumer.vscode-eslint

.vscode/settings.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"lcov.watch": [
3232
{
3333
"pattern": "**/*.spec.ts",
34-
"command": "yarn test:theia"
34+
"command": "npm run test:theia"
3535
}
3636
],
3737
"editor.insertSpaces": true,

.yarnrc

-1
This file was deleted.

configs/base.eslintrc.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,10 @@
1212
"@typescript-eslint",
1313
"@typescript-eslint/tslint",
1414
"import",
15-
"no-null"
15+
"no-null",
16+
"eslint-plugin-deprecation",
17+
"eslint-plugin-react",
18+
"eslint-plugin-no-unsanitized"
1619
],
1720
"env": {
1821
"browser": true,

dependency-check-baseline.json

+1-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
11
{
2-
"npm/npmjs/-/advanced-mark.js/2.6.0": "Manually approved",
3-
"npm/npmjs/-/inversify/6.1.3": "Manually approved",
4-
"npm/npmjs/@inversifyjs/common/1.3.2": "Manually approved",
5-
"npm/npmjs/@inversifyjs/core/1.3.3": "Manually approved",
6-
"npm/npmjs/@inversifyjs/reflect-metadata-utils/0.2.2": "Manually approved"
2+
73
}

0 commit comments

Comments
 (0)