Skip to content

Commit

Permalink
feat: yarn -> pnpm
Browse files Browse the repository at this point in the history
  • Loading branch information
johnsoncodehk committed Feb 15, 2022
1 parent d32311b commit ab1fafc
Show file tree
Hide file tree
Showing 15 changed files with 9,381 additions and 11,470 deletions.
13 changes: 6 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ jobs:
with:
node-version: ${{ matrix.node-version }}

# install yarn
- run: npm i -g yarn
# install pnpm
- run: npm i -g pnpm

# https://github.com/actions/cache/blob/main/examples.md#node---lerna
- name: Cache node_modules
Expand All @@ -30,9 +30,8 @@ jobs:
path: |
node_modules
*/*/node_modules
key: ${{ runner.os }}-node_modules-${{ hashFiles('**/yarn.lock') }}
key: ${{ runner.os }}-node_modules-${{ hashFiles('**/pnpm-lock.yaml') }}

- run: yarn
- run: yarn build
- run: yarn pretest
- run: yarn test
- run: pnpm i
- run: npm run build
- run: npm run test
7 changes: 4 additions & 3 deletions extensions/vscode-typescript-vue-plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,13 @@
},
"scripts": {
"vscode:prepublish": "npm run build && npm run esbuild -- --minify",
"build": "cd ../.. && yarn build",
"esbuild": "esbuild ../../node_modules/typescript-vue-plugin/out/index.js --bundle --outfile=out/index.js --format=cjs --platform=node --main-fields=module,main --tsconfig=../../tsconfig.build.json",
"build": "cd ../.. && npm run build",
"esbuild": "esbuild ./node_modules/typescript-vue-plugin/out/index.js --bundle --outfile=out/index.js --format=cjs --platform=node --main-fields=module,main --tsconfig=../../tsconfig.build.json",
"pack": "vsce package",
"release": "vsce publish --yarn"
"release": "vsce publish"
},
"devDependencies": {
"typescript-vue-plugin": "0.31.4",
"esbuild": "latest",
"vsce": "latest"
},
Expand Down
1,046 changes: 0 additions & 1,046 deletions extensions/vscode-typescript-vue-plugin/yarn.lock

This file was deleted.

12 changes: 7 additions & 5 deletions extensions/vscode-vue-language-features/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -641,14 +641,16 @@
},
"scripts": {
"vscode:prepublish": "npm run build && npm run esbuild-client-node -- --minify && npm run esbuild-server-node -- --minify && npm run esbuild-client-browser -- --minify",
"build": "cd ../.. && yarn build",
"esbuild-client-node": "esbuild ../../node_modules/@volar/client/out/nodeClientMain.js --bundle --outfile=out/client-node.js --external:vscode --format=cjs --platform=node --main-fields=module,main --tsconfig=../../tsconfig.build.json",
"esbuild-server-node": "esbuild ../../node_modules/@volar/server/out/index.js --bundle --outfile=out/server-node.js --external:vscode --format=cjs --platform=node --main-fields=module,main --tsconfig=../../tsconfig.build.json",
"esbuild-client-browser": "esbuild ../../node_modules/@volar/client/out/browserClientMain.js --bundle --outfile=out/client-browser.js --external:vscode --format=esm --platform=browser --tsconfig=../../tsconfig.build.json",
"build": "cd ../.. && npm run build",
"esbuild-client-node": "esbuild ./node_modules/@volar/client/out/nodeClientMain.js --bundle --outfile=out/client-node.js --external:vscode --format=cjs --platform=node --main-fields=module,main --tsconfig=../../tsconfig.build.json",
"esbuild-server-node": "esbuild ./node_modules/@volar/server/out/index.js --bundle --outfile=out/server-node.js --external:vscode --format=cjs --platform=node --main-fields=module,main --tsconfig=../../tsconfig.build.json",
"esbuild-client-browser": "esbuild ./node_modules/@volar/client/out/browserClientMain.js --bundle --outfile=out/client-browser.js --external:vscode --format=esm --platform=browser --tsconfig=../../tsconfig.build.json",
"pack": "vsce package",
"release": "vsce publish --yarn"
"release": "vsce publish"
},
"devDependencies": {
"@volar/client": "0.31.4",
"@volar/server": "0.31.4",
"esbuild": "latest",
"vsce": "latest"
}
Expand Down
1,043 changes: 0 additions & 1,043 deletions extensions/vscode-vue-language-features/yarn.lock

This file was deleted.

22 changes: 7 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,32 +1,24 @@
{
"private": true,
"scripts": {
"install": "yarn install:vue-language-features && yarn install:typescript-vue-plugin",
"install:vue-language-features": "cd extensions/vscode-vue-language-features && yarn",
"install:typescript-vue-plugin": "cd extensions/vscode-typescript-vue-plugin && yarn",
"build": "tsc -b tsconfig.build.json",
"watch": "tsc -b tsconfig.build.json -w",
"prerelease": "yarn build && yarn test",
"release": "lerna publish --exact --force-publish --yes && yarn release:vue-language-features && yarn release:typescript-vue-plugin",
"release:vue-language-features": "cd extensions/vscode-vue-language-features && yarn release",
"release:typescript-vue-plugin": "cd extensions/vscode-typescript-vue-plugin && yarn release",
"pretest": "cd packages/vscode-vue-languageservice/testCases && yarn",
"prerelease": "npm run build && npm run test",
"release": "lerna publish --exact --force-publish --yes && npm run release:vue-language-features && npm run release:typescript-vue-plugin",
"release:vue-language-features": "cd extensions/vscode-vue-language-features && npm run release",
"release:typescript-vue-plugin": "cd extensions/vscode-typescript-vue-plugin && npm run release",
"test": "jest",
"chrome": "yarn build && vscode-test-web --browserType=chromium --extensionDevelopmentPath=./extensions/vscode-vue-language-features ../volar-starter"
"chrome": "npm run build && vscode-test-web --browserType=chromium --extensionDevelopmentPath=./extensions/vscode-vue-language-features ../volar-starter"
},
"devDependencies": {
"@types/jest": "latest",
"@vscode/test-web": "latest",
"jest": "latest",
"lerna": "latest",
"ts-jest": "latest",
"typescript": "latest",
"vsce": "latest"
"typescript": "latest"
},
"resolutions": {
"to-vfile": "7.1.0"
},
"workspaces": [
"packages/*"
]
}
}
4 changes: 4 additions & 0 deletions packages/server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,17 @@
},
"dependencies": {
"@starptech/prettyhtml": "^0.10.0",
"@volar/html2pug": "0.31.4",
"@volar/shared": "0.31.4",
"@volar/vue-code-gen": "0.31.4",
"@vue/shared": "^3.2.27",
"prettier": "^1.16.4",
"pug-beautify": "^0.1.1",
"request-light": "^0.5.7",
"sass-formatter": "^0.7.2",
"upath": "^2.0.1",
"vscode-languageserver": "^8.0.0-next.6",
"vscode-languageserver-protocol": "^3.17.0-next.12",
"vscode-languageserver-textdocument": "^1.0.3",
"vscode-uri": "^3.0.3",
"vscode-vue-languageservice": "0.31.4"
Expand Down
4 changes: 4 additions & 0 deletions packages/vscode-vue-languageservice/src/sourceFile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ import { useSfcTemplateScript } from './use/useSfcTemplateScript';
import { SearchTexts } from './utils/string';
import { untrack } from './utils/untrack';

import type * as _0 from 'typescript/lib/tsserverlibrary'; // fix TS2742
import type * as _1 from 'vscode-html-languageservice'; // fix TS2742
import type * as _2 from 'vscode-languageserver-types'; // fix TS2742

export interface SourceFile extends ReturnType<typeof createSourceFile> { }

export function createSourceFile(
Expand Down
2 changes: 2 additions & 0 deletions packages/vscode-vue-languageservice/src/use/useSfcScript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import * as shared from '@volar/shared';
import { computed, Ref } from '@vue/reactivity';
import * as SourceMaps from '../utils/sourceMaps';

import type * as _0 from 'typescript/lib/tsserverlibrary'; // fix TS2742

export function useSfcScript(
vueUri: string,
vueDoc: Ref<TextDocument>,
Expand Down
2 changes: 2 additions & 0 deletions packages/vscode-vue-languageservice/src/use/useSfcTemplate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import { computed, Ref } from '@vue/reactivity';
import { LanguageServiceContext } from '../types';
import * as SourceMaps from '../utils/sourceMaps';

import type * as _0 from 'vscode-html-languageservice'; // fix TS2742

export function useSfcTemplate(
vueUri: string,
vueDoc: Ref<TextDocument>,
Expand Down
2 changes: 1 addition & 1 deletion packages/vscode-vue-languageservice/testCases/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"devDependencies": {
"vue": "^3.2.26"
"vue": "^3.2.27"
}
}
160 changes: 0 additions & 160 deletions packages/vscode-vue-languageservice/testCases/yarn.lock

This file was deleted.

Loading

0 comments on commit ab1fafc

Please sign in to comment.