Skip to content

Commit 78590ca

Browse files
committed
get jest to run
1 parent e35581b commit 78590ca

File tree

15 files changed

+48
-29
lines changed

15 files changed

+48
-29
lines changed

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"devDependencies": {
44
"@typescript-eslint/eslint-plugin": "^3.10.1",
55
"@typescript-eslint/parser": "^3.10.1",
6-
"bash-language-server": "^1.6.1",
6+
"bash-language-server": "^1.17.0",
77
"dictionary-en": "^3.0.0",
88
"dockerfile-language-server-nodejs": "^0.0.22",
99
"eslint": "^7.5.0",
@@ -24,7 +24,8 @@
2424
"vscode-css-languageserver-bin": "^1.4.0",
2525
"vscode-html-languageserver-bin": "^1.4.0",
2626
"vscode-json-languageserver-bin": "^1.0.1",
27-
"yaml-language-server": "^0.11.1"
27+
"yaml-language-server": "^0.12.0",
28+
"vscode-json-languageservice": "^3.9.1 <3.10.0"
2829
},
2930
"husky": {
3031
"hooks": {}

packages/jupyterlab-go-to-definition/jest.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const reuseFromUpstream = [
1010
];
1111

1212
let local = {
13-
globals: { 'ts-jest': { tsConfig: 'tsconfig.json' } },
13+
globals: { 'ts-jest': { tsconfig: 'tsconfig.json' } },
1414
testRegex: `.*\.spec\.tsx?$`,
1515
transform: {
1616
'\\.(ts|tsx)?$': 'ts-jest',

packages/jupyterlab-go-to-definition/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
"@jupyterlab/apputils": "~2.2.0",
5151
"@jupyterlab/codeeditor": "~2.2.0",
5252
"@jupyterlab/codemirror": "~2.2.0",
53-
"@jupyterlab/coreutils": "~4.0.0",
53+
"@jupyterlab/coreutils": "~4.2.0",
5454
"@jupyterlab/docmanager": "~2.2.0",
5555
"@jupyterlab/docregistry": "~2.2.0",
5656
"@jupyterlab/fileeditor": "~2.2.0",
@@ -65,11 +65,11 @@
6565
"@types/chai": "^4.1.7",
6666
"@types/jest": "^23.3.11",
6767
"chai": "^4.2.0",
68-
"jest": "^24.7.1",
68+
"jest": "^26.0.0",
6969
"jest-junit": "^8.0.0",
7070
"rimraf": "^2.6.1",
71-
"ts-jest": "^24.0.2",
72-
"typescript": "~3.9.5",
71+
"ts-jest": "^26.4.3",
72+
"typescript": "~4.0.2",
7373
"@babel/preset-env": "^7.4.3"
7474
},
7575
"jupyterlab": {

packages/jupyterlab-lsp/jest.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const reuseFromUpstream = [
1010
];
1111

1212
let local = {
13-
globals: { 'ts-jest': { tsConfig: 'tsconfig.json' } },
13+
globals: { 'ts-jest': { tsconfig: 'tsconfig.json' } },
1414
testRegex: `.*\.spec\.tsx?$`,
1515
transform: {
1616
'\\.(ts|tsx)?$': 'ts-jest',

packages/jupyterlab-lsp/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,13 +76,13 @@
7676
"chai": "^4.2.0",
7777
"codemirror": "*",
7878
"events": "^3.0.0",
79-
"jest": "^24.7.1",
79+
"jest": "^26.0.0",
8080
"jest-junit": "^8.0.0",
8181
"json-schema-to-typescript": "^8.0.0",
8282
"react": "*",
8383
"rimraf": "~2.6.2",
84-
"ts-jest": "^24.0.2",
85-
"typescript": "~3.9.5"
84+
"ts-jest": "^26.4.3",
85+
"typescript": "~4.0.2"
8686
},
8787
"peerDependencies": {
8888
"@jupyterlab/application": "~2.2.0",

packages/jupyterlab-lsp/src/editor_integration/codemirror.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import {
1515
} from '../positioning';
1616
import * as lsProtocol from 'vscode-languageserver-protocol';
1717
import { PositionConverter } from '../converter';
18-
import { DefaultMap } from '../utils';
18+
import { DefaultMap, uris_equal } from '../utils';
1919
import { CodeEditor } from '@jupyterlab/codeeditor';
2020
import {
2121
CodeMirrorHandler,
@@ -279,10 +279,7 @@ export abstract class CodeMirrorIntegration
279279
for (let change of changes) {
280280
let uri = change.textDocument.uri;
281281

282-
if (
283-
decodeURI(uri) !== decodeURI(current_uri) &&
284-
decodeURI(uri) !== '/' + decodeURI(current_uri)
285-
) {
282+
if (!uris_equal(uri, current_uri)) {
286283
errors.push(
287284
'Workspace-wide edits not implemented (' +
288285
decodeURI(uri) +

packages/jupyterlab-lsp/src/editor_integration/feature.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ describe('Feature', () => {
118118

119119
let outcome = await feature.do_apply_edit({
120120
changes: {
121-
['file://' + environment.document_options.path]: [
121+
['file:///' + environment.document_options.path]: [
122122
{
123123
range: {
124124
start: { line: 0, character: 0 },
@@ -145,7 +145,7 @@ describe('Feature', () => {
145145

146146
let outcome = await feature.do_apply_edit({
147147
changes: {
148-
['file://' + environment.document_options.path]: []
148+
['file:///' + environment.document_options.path]: []
149149
}
150150
});
151151
let raw_value = environment.ce_editor.doc.getValue();
@@ -162,7 +162,7 @@ describe('Feature', () => {
162162

163163
let result = await feature.do_apply_edit({
164164
changes: {
165-
['file://' + environment.document_options.path]: js_partial_edits
165+
['file:///' + environment.document_options.path]: js_partial_edits
166166
}
167167
});
168168
let raw_value = environment.ce_editor.doc.getValue();

packages/jupyterlab-lsp/src/features/completion/completion.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,10 @@ import { ILSPCompletionThemeManager } from '@krassowski/completion-theme/lib/typ
2222

2323
export class CompletionCM extends CodeMirrorIntegration {
2424
private _completionCharacters: string[];
25-
settings: FeatureSettings<LSPCompletionSettings>;
25+
26+
get settings() {
27+
return super.settings as FeatureSettings<LSPCompletionSettings>;
28+
}
2629

2730
get completionCharacters() {
2831
if (

packages/jupyterlab-lsp/src/features/diagnostics/diagnostics.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,9 +265,12 @@ export const diagnostics_databases = new WeakMap<
265265
>();
266266

267267
export class DiagnosticsCM extends CodeMirrorIntegration {
268-
settings: FeatureSettings<LSPDiagnosticsSettings>;
269268
private last_response: lsProtocol.PublishDiagnosticsParams;
270269

270+
get settings() {
271+
return super.settings as FeatureSettings<LSPDiagnosticsSettings>;
272+
}
273+
271274
register(): void {
272275
this.connection_handlers.set('diagnostic', this.handleDiagnostic);
273276
this.wrapper_handlers.set('focusin', this.switchDiagnosticsPanelSource);

packages/jupyterlab-lsp/src/features/hover.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,6 @@ export class HoverCM extends CodeMirrorIntegration {
8181
private last_hover_response: lsProtocol.Hover;
8282
protected hover_marker: CodeMirror.TextMarker;
8383
private virtual_position: IVirtualPosition;
84-
lab_integration: HoverLabIntegration;
85-
settings: FeatureSettings<LSPHoverSettings>;
8684
protected cache: ResponseCache;
8785

8886
private debounced_get_hover: Throttler<Promise<lsProtocol.Hover>>;
@@ -92,6 +90,14 @@ export class HoverCM extends CodeMirrorIntegration {
9290
return this.settings.composite.modifierKey;
9391
}
9492

93+
get lab_integration() {
94+
return super.lab_integration as HoverLabIntegration;
95+
}
96+
97+
get settings() {
98+
return super.settings as FeatureSettings<LSPHoverSettings>;
99+
}
100+
95101
protected restore_from_cache(
96102
document: VirtualDocument,
97103
virtual_position: IVirtualPosition

0 commit comments

Comments
 (0)