Skip to content

Commit

Permalink
ci: add pkg.pr.new
Browse files Browse the repository at this point in the history
  • Loading branch information
johnsoncodehk committed Aug 16, 2024
1 parent 129ed26 commit 99475dc
Show file tree
Hide file tree
Showing 23 changed files with 426 additions and 75 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/pkg.pr.new.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Publish Any Commit
on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- run: corepack enable
- uses: actions/setup-node@v4
with:
node-version: 20
cache: "pnpm"

- name: Install dependencies
run: pnpm install

- name: Build
run: pnpm build

- run: pnpx pkg-pr-new publish './packages/*'
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
"@lerna-lite/publish": "latest",
"@tsslint/cli": "latest",
"@tsslint/config": "latest",
"@volar/language-service": "~2.4.0-alpha.12",
"@volar/language-service": "https://pkg.pr.new/volarjs/volar.js/@volar/language-service@5a17cea",
"pkg-pr-new": "latest",
"typescript": "latest",
"vitest": "latest"
},
Expand Down
5 changes: 4 additions & 1 deletion packages/css/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,10 @@ export function create({
},
codeActionProvider: {},
definitionProvider: true,
diagnosticProvider: {},
diagnosticProvider: {
interFileDependencies: false,
workspaceDiagnostics: false,
},
hoverProvider: true,
referencesProvider: true,
documentHighlightProvider: true,
Expand Down
2 changes: 1 addition & 1 deletion packages/css/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"@types/node": "latest"
},
"peerDependencies": {
"@volar/language-service": "~2.4.0-alpha.12"
"@volar/language-service": "https://pkg.pr.new/volarjs/volar.js/@volar/language-service@5a17cea"
},
"peerDependenciesMeta": {
"@volar/language-service": {
Expand Down
2 changes: 1 addition & 1 deletion packages/emmet/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"@types/node": "latest"
},
"peerDependencies": {
"@volar/language-service": "~2.4.0-alpha.12"
"@volar/language-service": "https://pkg.pr.new/volarjs/volar.js/@volar/language-service@5a17cea"
},
"peerDependenciesMeta": {
"@volar/language-service": {
Expand Down
2 changes: 1 addition & 1 deletion packages/html/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"@types/node": "latest"
},
"peerDependencies": {
"@volar/language-service": "~2.4.0-alpha.12"
"@volar/language-service": "https://pkg.pr.new/volarjs/volar.js/@volar/language-service@5a17cea"
},
"peerDependenciesMeta": {
"@volar/language-service": {
Expand Down
5 changes: 4 additions & 1 deletion packages/json/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,10 @@ export function create({
resolveProvider: true,
},
definitionProvider: true,
diagnosticProvider: {},
diagnosticProvider: {
interFileDependencies: false,
workspaceDiagnostics: false,
},
hoverProvider: true,
documentLinkProvider: {},
documentSymbolProvider: true,
Expand Down
2 changes: 1 addition & 1 deletion packages/json/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"vscode-languageserver-textdocument": "^1.0.11"
},
"peerDependencies": {
"@volar/language-service": "~2.4.0-alpha.12"
"@volar/language-service": "https://pkg.pr.new/volarjs/volar.js/@volar/language-service@5a17cea"
},
"peerDependenciesMeta": {
"@volar/language-service": {
Expand Down
5 changes: 4 additions & 1 deletion packages/markdown/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,10 @@ export function create({
triggerCharacters: ['.', '/', '#'],
},
definitionProvider: true,
diagnosticProvider: {},
diagnosticProvider: {
interFileDependencies: false,
workspaceDiagnostics: false,
},
documentHighlightProvider: true,
documentLinkProvider: {
resolveProvider: true,
Expand Down
2 changes: 1 addition & 1 deletion packages/markdown/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"vscode-languageserver-textdocument": "^1.0.11"
},
"peerDependencies": {
"@volar/language-service": "~2.4.0-alpha.12"
"@volar/language-service": "https://pkg.pr.new/volarjs/volar.js/@volar/language-service@5a17cea"
},
"peerDependenciesMeta": {
"@volar/language-service": {
Expand Down
2 changes: 1 addition & 1 deletion packages/prettier/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"prettier": "^3.3.2"
},
"peerDependencies": {
"@volar/language-service": "~2.4.0-alpha.12",
"@volar/language-service": "https://pkg.pr.new/volarjs/volar.js/@volar/language-service@5a17cea",
"prettier": "^2.2 || ^3.0"
},
"peerDependenciesMeta": {
Expand Down
2 changes: 1 addition & 1 deletion packages/prettyhtml/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"@starptech/prettyhtml": "^0.10.0"
},
"peerDependencies": {
"@volar/language-service": "~2.4.0-alpha.12"
"@volar/language-service": "https://pkg.pr.new/volarjs/volar.js/@volar/language-service@5a17cea"
},
"peerDependenciesMeta": {
"@volar/language-service": {
Expand Down
2 changes: 1 addition & 1 deletion packages/pug-beautify/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"@johnsoncodehk/pug-beautify": "^0.2.2"
},
"peerDependencies": {
"@volar/language-service": "~2.4.0-alpha.12"
"@volar/language-service": "https://pkg.pr.new/volarjs/volar.js/@volar/language-service@5a17cea"
},
"peerDependenciesMeta": {
"@volar/language-service": {
Expand Down
5 changes: 4 additions & 1 deletion packages/pug/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,10 @@ export function create({
completionProvider: {
triggerCharacters: ['.', ':'],
},
diagnosticProvider: {},
diagnosticProvider: {
interFileDependencies: false,
workspaceDiagnostics: false,
},
hoverProvider: true,
documentHighlightProvider: true,
documentLinkProvider: {},
Expand Down
2 changes: 1 addition & 1 deletion packages/pug/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"url": "https://github.com/johnsoncodehk"
},
"dependencies": {
"@volar/language-service": "~2.4.0-alpha.12",
"@volar/language-service": "https://pkg.pr.new/volarjs/volar.js/@volar/language-service@5a17cea",
"muggle-string": "^0.4.1",
"pug-lexer": "^5.0.1",
"pug-parser": "^6.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/sass-formatter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"sass-formatter": "^0.7.9"
},
"peerDependencies": {
"@volar/language-service": "~2.4.0-alpha.12"
"@volar/language-service": "https://pkg.pr.new/volarjs/volar.js/@volar/language-service@5a17cea"
},
"peerDependenciesMeta": {
"@volar/language-service": {
Expand Down
2 changes: 1 addition & 1 deletion packages/typescript-twoslash-queries/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"volar-service-typescript": "0.0.59"
},
"peerDependencies": {
"@volar/language-service": "~2.4.0-alpha.12"
"@volar/language-service": "https://pkg.pr.new/volarjs/volar.js/@volar/language-service@5a17cea"
},
"peerDependenciesMeta": {
"@volar/language-service": {
Expand Down
16 changes: 9 additions & 7 deletions packages/typescript/lib/plugins/semantic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,10 @@ export function create(
callHierarchyProvider: true,
definitionProvider: true,
typeDefinitionProvider: true,
diagnosticProvider: {},
diagnosticProvider: {
interFileDependencies: true,
workspaceDiagnostics: false,
},
hoverProvider: true,
implementationProvider: true,
referencesProvider: true,
Expand Down Expand Up @@ -682,12 +685,11 @@ export function create(
return entries.map(entry => convertDocumentSpantoLocationLink(entry, ctx));
},

provideDiagnostics(document, token) {
return provideDiagnosticsWorker(document, token, 'syntactic');
},

provideSemanticDiagnostics(document, token) {
return provideDiagnosticsWorker(document, token, 'semantic');
async provideDiagnostics(document, token) {
return [
...await provideDiagnosticsWorker(document, token, 'syntactic') ?? [],
...await provideDiagnosticsWorker(document, token, 'semantic') ?? [],
];
},

async provideHover(document, position, token) {
Expand Down
4 changes: 2 additions & 2 deletions packages/typescript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"devDependencies": {
"@types/path-browserify": "latest",
"@types/semver": "latest",
"@volar/typescript": "~2.4.0-alpha.12"
"@volar/typescript": "https://pkg.pr.new/volarjs/volar.js/@volar/typescript@5a17cea"
},
"dependencies": {
"path-browserify": "^1.0.1",
Expand All @@ -37,7 +37,7 @@
"vscode-uri": "^3.0.8"
},
"peerDependencies": {
"@volar/language-service": "~2.4.0-alpha.12"
"@volar/language-service": "https://pkg.pr.new/volarjs/volar.js/@volar/language-service@5a17cea"
},
"peerDependenciesMeta": {
"@volar/language-service": {
Expand Down
2 changes: 1 addition & 1 deletion packages/vetur/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"vscode-uri": "^3.0.8"
},
"peerDependencies": {
"@volar/language-service": "~2.4.0-alpha.12"
"@volar/language-service": "https://pkg.pr.new/volarjs/volar.js/@volar/language-service@5a17cea"
},
"peerDependenciesMeta": {
"@volar/language-service": {
Expand Down
5 changes: 4 additions & 1 deletion packages/yaml/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,10 @@ export function create({
triggerCharacters: [' ', ':'],
},
definitionProvider: true,
diagnosticProvider: {},
diagnosticProvider: {
interFileDependencies: false,
workspaceDiagnostics: false,
},
documentOnTypeFormattingProvider: {
triggerCharacters: ['\n']
},
Expand Down
2 changes: 1 addition & 1 deletion packages/yaml/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"vscode-languageserver-textdocument": "^1.0.11"
},
"peerDependencies": {
"@volar/language-service": "~2.4.0-alpha.12"
"@volar/language-service": "https://pkg.pr.new/volarjs/volar.js/@volar/language-service@5a17cea"
},
"peerDependenciesMeta": {
"@volar/language-service": {
Expand Down
Loading

0 comments on commit 99475dc

Please sign in to comment.