Skip to content

Commit f046f1d

Browse files
authored
fix: replace yarn with npm due to issues with @isaacs/cliui (#209)
* fix: replace yarn with npm due to issues with `@isaacs/cliui` * chore: escape `npm run <script>` arguments * chore: fix linting issues
1 parent 92352ac commit f046f1d

File tree

16 files changed

+55703
-19057
lines changed

16 files changed

+55703
-19057
lines changed

.github/actions/setup-project/action.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ inputs:
99
with-fixture:
1010
description: If the setup should install the test/fixture files
1111
type: boolean
12-
12+
1313
without-cache:
14-
description: If the Yarn cache should not be used
14+
description: If the Node package cache should not be used
1515
type: boolean
1616

1717
runs:
@@ -22,10 +22,10 @@ runs:
2222
uses: actions/setup-node@v3
2323
with:
2424
node-version: ${{ inputs.node-version }}
25-
cache: yarn
25+
cache: npm
2626
cache-dependency-path: |
27-
yarn.lock
28-
test/fixture/yarn.lock
27+
package-lock.json
28+
test/fixture/package-lock.json
2929
3030
- name: 🏗 Setup Node without cache
3131
if: ${{ inputs.without-cache == 'true' }}
@@ -34,11 +34,11 @@ runs:
3434
node-version: ${{ inputs.node-version }}
3535

3636
- name: 📦 Install dependencies
37-
run: yarn install --frozen-lockfile
37+
run: npm ci
3838
shell: bash
3939

4040
- name: 📦 Install fixture
4141
if: ${{ inputs.with-fixture == 'true' }}
42-
run: yarn install --frozen-lockfile
42+
run: npm ci
4343
working-directory: test/fixture
4444
shell: bash

.github/workflows/publish.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
uses: ./.github/actions/setup-project
1818

1919
- name: 🎁 Package extension
20-
run: yarn vsce package --yarn
20+
run: npx vsce package --npm
2121
env:
2222
VSCODE_EXPO_TELEMETRY_KEY: ${{ secrets.TELEMETRY_KEY }}
2323

@@ -37,7 +37,7 @@ jobs:
3737
uses: ./.github/actions/setup-project
3838

3939
- name: 🚀 Publish to marketplace
40-
run: yarn vsce publish --yarn
40+
run: npx vsce publish --npm
4141
env:
4242
VSCODE_EXPO_TELEMETRY_KEY: ${{ secrets.TELEMETRY_KEY }}
4343
VSCE_PAT: ${{ secrets.VSCE_TOKEN }}
@@ -52,7 +52,7 @@ jobs:
5252
uses: ./.github/actions/setup-project
5353

5454
- name: 🎁 Package extension
55-
run: yarn vsce package --yarn --out ./vscode-expo.vsix
55+
run: npx vsce package --npm --out ./vscode-expo.vsix
5656
env:
5757
VSCODE_EXPO_TELEMETRY_KEY: ${{ secrets.TELEMETRY_KEY }}
5858

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
uses: ./.github/actions/setup-project
3030

3131
- name: 📋 Dry-running release
32-
run: yarn semantic-release --dry-run
32+
run: npx semantic-release --dry-run
3333
env:
3434
GITHUB_TOKEN: ${{ github.token }}
3535

@@ -46,7 +46,7 @@ jobs:
4646
uses: ./.github/actions/setup-project
4747

4848
- name: 📋 Release code
49-
run: yarn semantic-release
49+
run: npx semantic-release
5050
env:
5151
GITHUB_TOKEN: ${{ secrets.EXPOBOT_GITHUB_TOKEN }}
5252
GIT_AUTHOR_NAME: Expo CI

.github/workflows/test.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
uses: ./.github/actions/setup-project
2323

2424
- name: ✅ Lint project
25-
run: yarn lint --max-warnings 0
25+
run: npm run lint -- --max-warnings 0
2626

2727
scripts:
2828
runs-on: ubuntu-latest
@@ -34,7 +34,7 @@ jobs:
3434
uses: ./.github/actions/setup-project
3535

3636
- name: ✅ Test scripts
37-
run: yarn test:scripts
37+
run: npm run test:scripts
3838

3939
bundled:
4040
# This extension is bundled before publishing to the stores,
@@ -51,18 +51,18 @@ jobs:
5151
with-fixture: true
5252

5353
- name: 👷 Build tests
54-
run: yarn build
54+
run: npm run build
5555

5656
- name: 📦 Bundle extension
57-
run: yarn build:production
57+
run: npm run build:production
5858

5959
# When bundled, these dependencies aren't available in normal environments.
6060
# This kind-of fakes such environments, while keeping the required dev packages.
6161
- name: 🧹 Remove bundled dependencies
6262
run: rm -rf node_modules/sucrase
6363

6464
- name: 🧪 Test project
65-
run: xvfb-run -a yarn test:vscode
65+
run: xvfb-run -a npm run test:vscode
6666
env:
6767
VSCODE_VERSION: stable
6868

@@ -83,7 +83,7 @@ jobs:
8383
with-fixture: true
8484

8585
- name: 👷 Build project
86-
run: yarn build
86+
run: npm run build
8787

8888
# This handles the "oldest" vscode version by looking up our "oldest supported version"
8989
- name: 🕵️ Set vscode version
@@ -99,8 +99,8 @@ jobs:
9999
100100
- name: 🧪 Test project (Linux)
101101
if: ${{ runner.os == 'Linux' }}
102-
run: xvfb-run -a yarn test:vscode
102+
run: xvfb-run -a npm run test:vscode
103103

104104
- name: 🧪 Test project (MacOS/Windows)
105105
if: ${{ runner.os != 'Linux' }}
106-
run: yarn test:vscode
106+
run: npm run test:vscode

.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ lerna-debug.log*
1313
yarn-debug.log*
1414
yarn-error.log*
1515
yarn.lock
16-
package-lock.json
17-
!/yarn.lock
1816

1917
# test fixtures
2018
!/test/fixture/yarn.lock

.vscode/tasks.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
{
2626
"label": "install-fixtures",
2727
"type": "shell",
28-
"command": "yarn install --frozen-lockfile --cwd ${workspaceFolder}/test/fixture",
28+
"command": "npm install --cwd ${workspaceFolder}/test/fixture",
2929
"presentation": {
3030
"reveal": "never"
3131
}
@@ -53,7 +53,7 @@
5353
{
5454
"label": "build-extension",
5555
"type": "shell",
56-
"command": "yarn vsce package",
56+
"command": "npx vsce package",
5757
"group": "build"
5858
},
5959
{

.yarnrc

Lines changed: 0 additions & 1 deletion
This file was deleted.

CONTRIBUTING.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
1. [Fork](https://help.github.com/articles/fork-a-repo/) this repository to your own GitHub account and then [clone](https://help.github.com/articles/cloning-a-repository/) it to your local device. (`git remote add upstream [email protected]:expo/vscode-expo.git` 😉)
66
2. Make sure you have the following packages globally installed on your system:
77
- [node](https://nodejs.org/) (active Node LTS or higher is recommended)
8-
- [yarn](https://yarnpkg.com/)
9-
3. Install the Node packages (`yarn install`)
8+
- [npm](https://npmjs.com/)
9+
3. Install the Node packages (`npm install`)
1010

1111
## 🚗 Start the plugin in development mode
1212

@@ -47,9 +47,9 @@ refactor: update loading icon
4747

4848
To help keep CI green, please make sure of the following:
4949

50-
- Run `yarn lint --fix` to fix the formatting of the code. Ensure that `yarn lint` succeeds without errors or warnings.
51-
- Run `yarn build` to ensure the build runs correctly and without errors or warnings.
52-
- Run `yarn build:production` to ensure the build runs correctly and without errors or warnings, in production mode.
50+
- Run `npm run lint -- --fix` to fix the formatting of the code. Ensure that `npm run lint` succeeds without errors or warnings.
51+
- Run `npm run build` to ensure the build runs correctly and without errors or warnings.
52+
- Run `npm run build:production` to ensure the build runs correctly and without errors or warnings, in production mode.
5353

5454
## 🚀 Releasing a new version
5555

0 commit comments

Comments
 (0)