Skip to content

Commit e93d7d9

Browse files
authored
Fix table view (#197)
* Update @types/vscode * Fix a type error * Pass correct localResourceRoots Fix #196. * Update vscode engine version to 1.61.0 * Use Node.js 14.x with GitHub Actions
1 parent 764c6c1 commit e93d7d9

File tree

6 files changed

+32
-16
lines changed

6 files changed

+32
-16
lines changed

.github/workflows/ci.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ jobs:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- uses: actions/checkout@v2
13-
- name: Setup Node.js 10.x
14-
uses: actions/setup-node@v1
13+
- name: Setup Node.js 14.x
14+
uses: actions/setup-node@v2
1515
with:
16-
node-version: 10.x
16+
node-version: '14'
1717
- name: Install
1818
run: |
1919
npm install

.github/workflows/publish.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ jobs:
88
runs-on: ubuntu-latest
99
steps:
1010
- uses: actions/checkout@v2
11-
- name: Setup Node.js 10.x
12-
uses: actions/setup-node@v1
11+
- name: Setup Node.js 14.x
12+
uses: actions/setup-node@v2
1313
with:
14-
node-version: 10.x
14+
node-version: '14'
1515
- name: Install vsce and ovsx
1616
run: npm install --global vsce ovsx
1717
- name: Install

package-lock.json

+21-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"type": "git"
1111
},
1212
"engines": {
13-
"vscode": "^1.30.0"
13+
"vscode": "^1.61.0"
1414
},
1515
"categories": [
1616
"Other"
@@ -449,7 +449,7 @@
449449
"@types/jest": "^26.0.0",
450450
"@types/node": "^7.10.14",
451451
"@types/sqlite3": "^3.1.7",
452-
"@types/vscode": "1.30.0",
452+
"@types/vscode": "^1.61.0",
453453
"jest": "^26.0.0",
454454
"sqlite3": "^4.2.0",
455455
"ts-jest": "^26.0.0",

src/explorer/explorerTreeProvider.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export class ExplorerTreeProvider implements TreeDataProvider<Schema.Item> {
1717
}
1818

1919
refresh(): void {
20-
this._onDidChangeTreeData.fire();
20+
this._onDidChangeTreeData.fire(undefined);
2121
}
2222

2323
addToTree(database: Schema.Database) {

src/resultview/customview.ts

+2-4
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ export interface Message {
88
}
99

1010
export class CustomView extends EventEmitter implements Disposable {
11-
private resourceScheme = 'vscode-resource';
12-
1311
private disposable?: Disposable;
1412

1513
private resourcesPath: string;
@@ -36,7 +34,7 @@ export class CustomView extends EventEmitter implements Disposable {
3634
<body>
3735
<div id="root"></div>
3836
<script>const RECORDS_PER_PAGE=${recordsPerPage || 20}</script>
39-
<script src="${(this.panel!.webview as any).asWebviewUri(Uri.file(jsPath)).toString()}"></script>
37+
<script src="${this.panel!.webview.asWebviewUri(Uri.file(jsPath)).toString()}"></script>
4038
</body>
4139
</html>
4240
`;
@@ -63,7 +61,7 @@ export class CustomView extends EventEmitter implements Disposable {
6361
let options = {
6462
enableScripts: true,
6563
retainContextWhenHidden: true,
66-
localResourceRoots: [Uri.file(this.resourcesPath).with({scheme: this.resourceScheme})]
64+
localResourceRoots: [Uri.file(this.resourcesPath)]
6765
};
6866

6967
this.panel = window.createWebviewPanel(this.type, this.title, ViewColumn.Two,

0 commit comments

Comments
 (0)