Skip to content

Commit

Permalink
Switch to using npm over yarn
Browse files Browse the repository at this point in the history
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
  • Loading branch information
jansav committed Feb 14, 2023
1 parent 949580e commit aacf954
Show file tree
Hide file tree
Showing 28 changed files with 10,365 additions and 36,524 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/check-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ jobs:

- name: Generate Extensions API Reference using typedocs
run: |
yarn install
yarn run build:docs
npm install
npm run build:docs
- name: Verify that the markdown is valid
run: |
yarn run mkdocs:verify
npm run mkdocs:verify
10 changes: 5 additions & 5 deletions .github/workflows/daily-alpha.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ jobs:

- name: Install deps
run: |
yarn install
npm install
sudo apt-get install -y ripgrep
cd packages/bump-version-for-cron && yarn build
cd packages/bump-version-for-cron && npm run build
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Bump version
Expand Down Expand Up @@ -85,14 +85,14 @@ jobs:
- name: Build package
shell: bash
run: |
yarn install --frozen-lockfile
yarn run build
npm ci
npm run build
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Release to GitHub NPM registry
run: |
npm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}"
yarn lerna \
npx lerna \
publish from-package \
--no-push \
--no-git-tag-version \
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
node-version: ${{ matrix.node-version }}

- name: Install deps
run: yarn install
run: npm install

- name: Lint
run: yarn run lint
run: npm run lint
10 changes: 5 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ jobs:

- name: Generate Extensions API Reference using typedocs
run: |
yarn install
yarn run build:docs
npm install
npm run build:docs
- name: Verify that the markdown is valid
run: |
yarn run mkdocs:verify
npm run mkdocs:verify
build:
name: Deploy docs
Expand Down Expand Up @@ -77,8 +77,8 @@ jobs:

- name: Generate Extensions API Reference using typedocs
run: |
yarn install --frozen-lockfile
yarn build:docs
npm ci
npm run build:docs
- name: mkdocs deploy master
if: contains(github.ref, 'refs/heads/master')
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/mkdocs-manual.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ jobs:

- name: Generate Extensions API Reference using typedocs
run: |
yarn install
yarn typedocs-extensions-api
npm install
npm run typedocs-extensions-api
- name: Checkout master branch from lens
uses: actions/checkout@v3
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/publish-release-npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,16 @@ jobs:

- name: Generate NPM packages
run: |
yarn install --frozen-lockfile
yarn run build
npm ci
npm run build
- name: Publish NPM packages
run: |
npm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}"
VERSION=$(cat lerna.json | jq '.version' --raw-output)
echo ${VERSION}
DIST_TAG=$(node packages/semver/dist/index.js --prerelease 0 ${VERSION})
yarn lerna \
npx lerna \
publish from-package \
--no-push \
--no-git-tag-version \
Expand Down
24 changes: 12 additions & 12 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,28 +32,28 @@ jobs:
with:
node-version: ${{ matrix.node-version }}

- name: Get yarn cache directory path
id: yarn-cache-dir-path
- name: Get npm cache directory path
id: npm-cache-dir-path
shell: bash
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
run: echo "dir=$(npm config get cache)" >> $GITHUB_OUTPUT

- uses: actions/cache@v3
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
id: npm-cache # use this to check for `cache-hit` (`steps.npm-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
path: ${{ steps.npm-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-yarn-
${{ runner.os }}-npm-
- uses: nick-fields/retry@v2
name: Install dependencies
with:
timeout_minutes: 20
max_attempts: 3
retry_on: error
command: yarn install --frozen-lockfile
command: npm ci

- run: yarn run test:unit
- run: npm run test:unit
name: Run tests
if: ${{ matrix.type == 'unit' }}

Expand All @@ -64,15 +64,15 @@ jobs:
minikube-version: latest
if: ${{ runner.os == 'Linux' && matrix.type == 'smoke' }}

- run: xvfb-run --auto-servernum --server-args='-screen 0, 1600x900x24' yarn run test:integration
- run: xvfb-run --auto-servernum --server-args='-screen 0, 1600x900x24' npm run test:integration
name: Run Linux integration tests
if: ${{ runner.os == 'Linux' && matrix.type == 'smoke' }}

- run: yarn run test:integration
- run: npm run test:integration
name: Run macOS integration tests
shell: bash
if: ${{ runner.os == 'macOS' && matrix.type == 'smoke' }}

- run: yarn run test:integration
- run: npm run test:integration
name: Run Windows integration tests
if: ${{ runner.os == 'Windows' && matrix.type == 'smoke' }}
3 changes: 0 additions & 3 deletions .yarnrc

This file was deleted.

2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"packages/*"
],
"version": "6.4.0-beta.13",
"npmClient": "yarn",
"npmClient": "npm",
"npmClientArgs": [
"--network-timeout=100000"
]
Expand Down

0 comments on commit aacf954

Please sign in to comment.