Skip to content

Commit 7c1aa05

Browse files
committed
Prepare 0.2.1 release - works JLab3.0 and fixes windows path issue
1 parent c6cfa76 commit 7c1aa05

File tree

7 files changed

+4756
-1042
lines changed

7 files changed

+4756
-1042
lines changed

jupyterlab_gitplus/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ def _jupyter_server_extension_paths():
44
}]
55

66

7-
__version__ = "0.1.15"
7+
__version__ = "0.2.1"

package-lock.json

Lines changed: 4698 additions & 1018 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 42 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
"author": "Amit Rathi",
1616
"files": [
1717
"lib/**/*.{d.ts,eot,gif,html,jpg,js,js.map,json,png,svg,woff2,ttf}",
18-
"style/**/*.{css,eot,gif,html,jpg,json,png,svg,woff2,ttf}"
18+
"style/**/*.{css,eot,gif,html,jpg,json,png,svg,woff2,ttf}",
19+
"style/index.js"
1920
],
2021
"main": "lib/index.js",
2122
"types": "lib/index.d.ts",
@@ -25,29 +26,53 @@
2526
"url": "https://github.com/ReviewNB/jupyterlab-gitplus.git"
2627
},
2728
"scripts": {
28-
"build": "tsc",
29-
"clean": "rimraf lib tsconfig.tsbuildinfo",
29+
"build": "jlpm run build:lib && jlpm run build:labextension:dev",
30+
"build:labextension": "jupyter labextension build .",
31+
"build:labextension:dev": "jupyter labextension build --development True .",
32+
"build:lib": "tsc",
33+
"build:prod": "jlpm run clean && jlpm run build:lib && jlpm run build:labextension",
34+
"clean": "jlpm run clean:lib",
35+
"clean:all": "jlpm run clean:lib && jlpm run clean:labextension",
36+
"clean:labextension": "rimraf jupyterlab_gitplus/labextension",
37+
"clean:lib": "rimraf lib tsconfig.tsbuildinfo",
38+
"eslint": "eslint . --ext .ts,.tsx --fix",
39+
"eslint:check": "eslint . --ext .ts,.tsx",
40+
"install:extension": "jlpm run build",
3041
"prepare": "jlpm run clean && jlpm run build",
31-
"watch": "tsc -w"
42+
"watch": "run-p watch:src watch:labextension",
43+
"watch:labextension": "jupyter labextension watch .",
44+
"watch:src": "tsc -w"
3245
},
3346
"dependencies": {
34-
"@jupyterlab/application": "^2.0.0",
35-
"@jupyterlab/apputils": "^2.0.0",
36-
"@jupyterlab/docregistry": "^2.0.0",
37-
"@jupyterlab/fileeditor": "^2.0.0",
38-
"@jupyterlab/mainmenu": "^2.0.0",
39-
"@jupyterlab/notebook": "^2.0.0",
40-
"@lumino/disposable": "^1.3.5",
47+
"@jupyterlab/application": "^3.0.11",
48+
"@jupyterlab/apputils": "^3.0.9",
49+
"@jupyterlab/docregistry": "^3.0.11",
50+
"@jupyterlab/fileeditor": "^3.0.11",
51+
"@jupyterlab/mainmenu": "^3.0.9",
52+
"@jupyterlab/notebook": "^3.0.11",
53+
"@lumino/disposable": "^1.4.3",
4154
"axios": "^0.19.2"
4255
},
4356
"devDependencies": {
44-
"rimraf": "^2.6.1",
45-
"typescript": "~3.7.0"
57+
"@jupyterlab/builder": "^3.0.0",
58+
"@typescript-eslint/eslint-plugin": "^4.8.1",
59+
"@typescript-eslint/parser": "^4.8.1",
60+
"eslint": "^7.14.0",
61+
"eslint-config-prettier": "^6.15.0",
62+
"eslint-plugin-prettier": "^3.1.4",
63+
"mkdirp": "^1.0.3",
64+
"npm-run-all": "^4.1.5",
65+
"prettier": "^2.1.1",
66+
"rimraf": "^3.0.2",
67+
"typescript": "~4.1.3"
4668
},
4769
"sideEffects": [
48-
"style/*.css"
70+
"style/*.css",
71+
"style/index.js"
4972
],
5073
"jupyterlab": {
51-
"extension": true
52-
}
53-
}
74+
"extension": true,
75+
"outputDir": "jupyterlab_gitplus/labextension"
76+
},
77+
"styleModule": "style/index.js"
78+
}

src/index.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -296,12 +296,16 @@ export function show_spinner() {
296296

297297
function get_open_files(editorTracker: IEditorTracker, notebookTracker: INotebookTracker, base_dir: string) {
298298
let result: string[] = []
299+
let separator: string = '/'
300+
if (base_dir.includes('\\')) {
301+
separator = '\\'
302+
}
299303

300304
notebookTracker.forEach(notebook => {
301-
result.push(base_dir + '/' + notebook.context.path);
305+
result.push(base_dir + separator + notebook.context.path);
302306
});
303307
editorTracker.forEach(editor => {
304-
result.push(base_dir + '/' + editor.context.path);
308+
result.push(base_dir + separator + editor.context.path);
305309
});
306310

307311
return result;

src/ui_elements.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,9 @@ export class DropDown extends Widget {
7474
options: string[][] = [],
7575
label: string = "",
7676
styles: {} = {}) {
77-
let body_style, label_style, select_style = {};
77+
let body_style = {};
78+
let label_style = {};
79+
let select_style = {};
7880

7981
if ("body_style" in styles) {
8082
body_style = styles["body_style"];
@@ -150,6 +152,7 @@ export class CommitPRMessageDialog extends Widget {
150152
return textarea.value;
151153
}
152154
}
155+
return '';
153156
}
154157

155158
public getPRTitle(): string {
@@ -159,6 +162,7 @@ export class CommitPRMessageDialog extends Widget {
159162
return textarea.value;
160163
}
161164
}
165+
return '';
162166
}
163167
}
164168

@@ -180,6 +184,7 @@ export class CommitMessageDialog extends Widget {
180184
return textarea.value;
181185
}
182186
}
187+
return '';
183188
}
184189
}
185190

tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"outDir": "lib",
1717
"rootDir": "src",
1818
"strict": true,
19-
"strictNullChecks": false,
19+
"strictNullChecks": true,
2020
"target": "es2017",
2121
"types": []
2222
},

yarn.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1015,8 +1015,8 @@ popper.js@^1.14.4, popper.js@^1.15.0:
10151015
resolved "https://registry.yarnpkg.com/popper.js/-/popper.js-1.16.1.tgz#2a223cb3dc7b6213d740e40372be40de43e65b1b"
10161016
integrity sha512-Wb4p1J4zyFTbM+u6WuO4XstYx4Ky9Cewe4DWrel7B0w6VVICvPwdOpotjzcf6eD8TsckVnIMNONQyPIUFOUbCQ==
10171017

1018-
postcss@^7.0.5:
1019-
version "7.0.27"
1018+
postcss@^7.0.36:
1019+
version "7.0.36"
10201020
resolved "https://registry.yarnpkg.com/postcss/-/postcss-7.0.27.tgz#cc67cdc6b0daa375105b7c424a85567345fc54d9"
10211021
integrity sha512-WuQETPMcW9Uf1/22HWUWP9lgsIC+KEHg2kozMflKjbeUtw9ujvFX6QmIfozaErDkmLWS9WEnEdEe6Uo9/BNTdQ==
10221022
dependencies:

0 commit comments

Comments
 (0)