Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Move from yarn to npm #2807

Merged
merged 6 commits into from
Sep 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ const config = {
'packages/*/out/**',
'**/temp/**',
'**/dist/**',
'**/build/**',
'package-lock.json',
'packages/client/settingsViewer/**',
'**/scripts/ts-json-schema-generator.cjs',
],
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ jobs:
uses: actions/[email protected]
with:
node-version: ${{ matrix.node-version }}
cache: yarn
- run: yarn --frozen-lockfile
- run: yarn build
- run: xvfb-run -a yarn run test-client-integration
cache: npm
- run: npm i
- run: npm run build
- run: xvfb-run -a npm run test-client-integration
if: runner.os == 'Linux'
- run: yarn run test-client-integration
- run: npm run test-client-integration
if: runner.os != 'Linux'
# cspell:ignore xvfb
6 changes: 3 additions & 3 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: yarn
- run: yarn build
- run: yarn lint
- run: npm install
- run: npm run build
- run: npm run lint
6 changes: 3 additions & 3 deletions .github/workflows/manual-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ jobs:
ref: ${{ inputs.ref }}
- name: Install
run: |
yarn install
yarn build
npm install
npm run build

- name: Build Extension .vsix
run: yarn run package-extension
run: npm run package-extension
- name: Publish VSCE
run: >
find ./build -name "*.vsix" | xargs npx vsce publish --skip-duplicate -p ${{ secrets.VSCE_TOKEN }} --packagePath
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release-assets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ jobs:
ref: ${{ env.REF }}
- uses: actions/[email protected]
with:
cache: yarn
cache: npm
- name: Install
run: yarn
run: npm i
- name: Build Extension .vsix
run: yarn run package-extension
run: npm run package-extension
- run: zip code-spell-checker build/*

- name: Upload Assets
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
node-version: [16.x]
node-version: ["${{ vars.DEFAULT_NODE_VERSION }}"]

runs-on: ${{ matrix.os }}
steps:
Expand All @@ -24,18 +24,18 @@ jobs:
uses: actions/[email protected]
with:
node-version: ${{ matrix.node-version }}
cache: yarn
- run: yarn --frozen-lockfile
- run: yarn build
- run: yarn test
cache: npm
- run: npm ci
- run: npm run build
- run: npm run test
# Ensure the repository is clean after build & test
- run: git --no-pager diff --compact-summary --exit-code

test-vsce-build:
strategy:
matrix:
os: [ubuntu-latest]
node-version: [16.x]
node-version: ["${{ vars.DEFAULT_NODE_VERSION }}"]

runs-on: ${{ matrix.os }}
steps:
Expand All @@ -45,6 +45,6 @@ jobs:
uses: actions/[email protected]
with:
node-version: ${{ matrix.node-version }}
cache: yarn
- run: yarn --frozen-lockfile
- run: yarn test-vsce-build
cache: npm
- run: npm ci
- run: npm run test-vsce-build
19 changes: 11 additions & 8 deletions .github/workflows/update-dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- main
paths:
- "**/package.json"
- "**/yarn.lock"
- "**/package-lock.json"
workflow_dispatch:
schedule:
- cron: "0 12 * * 0"
Expand All @@ -23,15 +23,18 @@ jobs:
uses: actions/checkout@v4
with:
ref: ${{ env.REF_BRANCH }}
- name: Info
run: |
npm -v
node -v
- name: Update
run: |
yarn
yarn build
yarn build:readme
yarn lint
yarn upgrade
yarn package-json-dependency-updater --update
yarn
npm i
npm run build
npm run build:readme
npm run lint
npm run update-packages
npm i

- name: Gen Body
run: |
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ node_modules
.vscode-test

/temp
/build
modules/dist/
modules/*/dist/
packages/*/dist/
Expand Down
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ packages/*/out/**
packages/client/settingsViewer/
samples/php/**/vendor
**/scripts/ts-json-schema-generator.cjs
package-lock.json
4 changes: 0 additions & 4 deletions .yarnrc

This file was deleted.

2 changes: 1 addition & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"clean": "shx rm -rf _site",
"build-production": "echo Skip Docs",
"test": "echo Skip Docs",
"gen-docs": "yarn gen-config-docs && yarn gen-command-docs && yarn run lint",
"gen-docs": "npm run gen-config-docs && npm run gen-command-docs && npm run lint",
"gen-config-docs": "node _scripts/extract-config.mjs > _includes/generated-docs/configuration.md",
"gen-command-docs": "node _scripts/extract-commands.js > _includes/generated-docs/commands.md",
"lint": "prettier -w \"**/*.{md,markdown,yaml,yml,json,html,htm,js}\"",
Expand Down
Loading