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 <t.s.maeder@gmail.com>
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

Lines changed: 0 additions & 1 deletion
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

Lines changed: 0 additions & 18 deletions
This file was deleted.

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
dev-packages/*/bin/*.js text eol=lf

.github/workflows/ci-cd.yml

Lines changed: 15 additions & 21 deletions
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 3 additions & 3 deletions
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

Lines changed: 5 additions & 5 deletions
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

Lines changed: 6 additions & 6 deletions
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

Lines changed: 5 additions & 5 deletions
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

Lines changed: 6 additions & 5 deletions
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"

0 commit comments

Comments
 (0)