Skip to content

Commit

Permalink
Fix vsce publish (#11122)
Browse files Browse the repository at this point in the history
### WHY are these changes introduced?

VS Code extension is failing to publish due to duplicate files. Fixes
#10654

### WHAT is this pull request doing?

To resolve this I have:
- [x] Updated dependencies
- [x] Ran `vsce ls` to see what files are included and updated
`.vscodeignore` to have the correct files
- [x] Ran `vsce package` and tested the built extension locally
- [x] Ran `vsce package` in CI to test that it builds correctly in CI
- [x] Removed test from GitHub action as there are no tests for the
extension
- [x] Removed unused `InitializeParams` code
  • Loading branch information
alex-page authored Nov 7, 2023
1 parent 4e82018 commit 636d133
Show file tree
Hide file tree
Showing 6 changed files with 68 additions and 149 deletions.
5 changes: 5 additions & 0 deletions .changeset/curly-balloons-raise.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'polaris-for-vscode': minor
---

Update dependencies and published files to fix vsce publish
3 changes: 0 additions & 3 deletions .github/workflows/publish-polaris-for-vscode.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,6 @@ jobs:
- name: Build extension
run: yarn build --filter=polaris-for-vscode

- name: Run Tests
run: yarn test --filter=polaris-for-vscode

- name: Publish extension in the marketplace
run: yarn workspace polaris-for-vscode vsce publish
env:
Expand Down
4 changes: 4 additions & 0 deletions polaris-for-vscode/.vscodeignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,7 @@ scripts
src
rollup.config.js
tsconfig.tsbuildinfo
node_modules

# Ignore parent directories
../**
11 changes: 5 additions & 6 deletions polaris-for-vscode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,15 @@
"clean": "rm -rf .turbo node_modules dist *.tsbuildinfo"
},
"dependencies": {
"vscode-languageclient": "^8.0.1",
"vscode-languageserver": "^8.0.1",
"vscode-languageserver-textdocument": "^1.0.4"
"vscode-languageclient": "^9.0.1",
"vscode-languageserver": "^9.0.1",
"vscode-languageserver-textdocument": "^1.0.11"
},
"devDependencies": {
"@shopify/polaris-tokens": "^8.1.0",
"@types/node": "14.x",
"@types/node": "16.x",
"@types/vscode": "^1.64.0",
"@vscode/test-electron": "^2.1.2",
"globby": "^11.1.0",
"vsce": "^2.7.0"
"vsce": "^2.15.0"
}
}
5 changes: 1 addition & 4 deletions polaris-for-vscode/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import {
TextDocumentSyncKind,
} from 'vscode-languageserver/node';
import type {
InitializeParams,
CompletionItem,
TextDocumentPositionParams,
InitializeResult,
Expand Down Expand Up @@ -99,9 +98,7 @@ const tokenGroupPatterns: TokenGroupPatterns = {
zIndex: /z-index/,
};

connection.onInitialize((params: InitializeParams) => {
const capabilities = params.capabilities;

connection.onInitialize(() => {
const result: InitializeResult = {
capabilities: {
textDocumentSync: TextDocumentSyncKind.Incremental,
Expand Down
Loading

0 comments on commit 636d133

Please sign in to comment.