Skip to content

Commit

Permalink
Merge pull request #641 from mbektas/fix-default-working-dir-persist
Browse files Browse the repository at this point in the history
Fix default working directory setting persistence issue, support jupyterlab alpha / beta versions
  • Loading branch information
mbektas authored Apr 23, 2023
2 parents e2ff9f0 + 8d9870d commit cf2c8ae
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 30 deletions.
13 changes: 0 additions & 13 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,6 @@
"NODE_ENV": "development"
}
},
{
"name": "Debug without webpack",
"type": "node",
"request": "launch",
"cwd": "${workspaceFolder}",
"runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron",
"args" : ["."],
"outputCapture": "std",
"preLaunchTask": "npm: build:no-pack",
"env": {
"NODE_ENV": "development"
}
},
{
"name": "Debug without build",
"type": "node",
Expand Down
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
"watch:assets": "node ./scripts/extract.js && node ./scripts/copyassets.js watch",
"watch": "concurrently \"yarn watch:tsc\" \"yarn watch:assets\" ",
"build": "tsc && yarn bundle:preload && node ./scripts/extract.js && node ./scripts/copyassets.js",
"build:no-pack": "tsc && yarn bundle:preload && node ./scripts/extract.js && node ./scripts/copyassets.js",
"build:all": "yarn clean && yarn build && yarn start",
"bundle:preload": "webpack --config webpack.preload.js",
"extract": "node scripts/extract.js",
Expand Down Expand Up @@ -166,7 +165,7 @@
"@typescript-eslint/eslint-plugin": "~5.28.0",
"@typescript-eslint/parser": "~5.28.0",
"css-loader": "~5.1.1",
"electron": "^23.1.4",
"electron": "^24.1.2",
"electron-builder": "^23.6.0",
"electron-notarize": "^1.2.2",
"eslint": "~8.17.0",
Expand Down Expand Up @@ -202,7 +201,7 @@
"fix-path": "^3.0.0",
"js-yaml": "^4.1.0",
"node-fetch": "^2.6.7",
"semver": "^7.3.4",
"semver": "^7.5.0",
"update-electron-app": "^2.0.1",
"which": "^2.0.2",
"winreg": "^1.2.4",
Expand Down
12 changes: 8 additions & 4 deletions src/main/registry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -778,10 +778,14 @@ export class Registry implements IRegistry, IDisposable {
): boolean {
return requirements.every((req, index, reqSelf) => {
try {
return semver.satisfies(
environment.versions[req.name],
req.versionRange
);
const version = environment.versions[req.name];
// remove alpha / beta suffixes
const versionWithoutSuffix = `${semver.major(version, {
loose: true
})}.${semver.minor(version, {
loose: true
})}.${semver.patch(version, { loose: true })}`;
return semver.satisfies(versionWithoutSuffix, req.versionRange);
} catch (e) {
return false;
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/sessionwindow/sessionwindow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@ export class SessionWindow implements IDisposable {

this._showProgressView('Creating new session');

const sessionConfig = new SessionConfig();
const sessionConfig = SessionConfig.createLocal();
this._sessionConfig = sessionConfig;
this._wsSettings = new WorkspaceSettings(
sessionConfig.workingDirectory
Expand Down
1 change: 1 addition & 0 deletions src/main/settingsdialog/settingsdialog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ export class SettingsDialog {
}
.footer-row {
height: 50px;
min-height: 50px;
overflow-y: hidden;
display: flex;
flex-direction: row;
Expand Down
25 changes: 16 additions & 9 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -388,10 +388,10 @@
resolved "https://registry.yarnpkg.com/@types/node/-/node-14.18.36.tgz#c414052cb9d43fab67d679d5f3c641be911f5835"
integrity sha512-FXKWbsJ6a1hIrRxv+FoukuHnGTgEzKYGi7kilfMae96AL9UNkPFNWJEEYWzdRI9ooIkbr4AKldyuSTLql06vLQ==

"@types/node@^16.11.26":
version "16.18.12"
resolved "https://registry.yarnpkg.com/@types/node/-/node-16.18.12.tgz#e3bfea80e31523fde4292a6118f19ffa24fd6f65"
integrity sha512-vzLe5NaNMjIE3mcddFVGlAXN1LEWueUsMsOJWaT6wWMJGyljHAWHznqfnKUQWGzu7TLPrGvWdNAsvQYW+C0xtw==
"@types/node@^18.11.18":
version "18.15.12"
resolved "https://registry.yarnpkg.com/@types/node/-/node-18.15.12.tgz#833756634e78c829e1254db006468dadbb0c696b"
integrity sha512-Wha1UwsB3CYdqUm2PPzh/1gujGCNtWVUYF0mB00fJFoR4gTyWTDPjSm+zBF787Ahw8vSGgBja90MkgFwvB86Dg==

"@types/normalize-package-data@^2.4.0":
version "2.4.1"
Expand Down Expand Up @@ -1547,13 +1547,13 @@ electron-to-chromium@^1.4.284:
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.286.tgz#0e039de59135f44ab9a8ec9025e53a9135eba11f"
integrity sha512-Vp3CVhmYpgf4iXNKAucoQUDcCrBQX3XLBtwgFqP9BUXuucgvAV9zWp1kYU7LL9j4++s9O+12cb3wMtN4SJy6UQ==

electron@^23.1.4:
version "23.1.4"
resolved "https://registry.yarnpkg.com/electron/-/electron-23.1.4.tgz#8e386a6e2d4f1028c77b5a0926abc8a23509db53"
integrity sha512-3Z6CpAPdhv6haYX9DTO7k0l6uAUreZM3/EngQYqGN3Gz7Fp0DPb/egt8BwR3ClG/jTlQM+PQ+5WkTK0eMjm07A==
electron@^24.1.2:
version "24.1.2"
resolved "https://registry.yarnpkg.com/electron/-/electron-24.1.2.tgz#8dd0b4928a08236be4791d39535d1d35cc05f04b"
integrity sha512-V0isWbyLYiXrSCcB4lrSVhS/U56NFGfuqHyc+yEPkyhhvY+h4F85cYGdEiZlXp6XjHT+/CLHmw0ltK54g9lvDw==
dependencies:
"@electron/get" "^2.0.0"
"@types/node" "^16.11.26"
"@types/node" "^18.11.18"
extract-zip "^2.0.1"

emoji-regex@^8.0.0:
Expand Down Expand Up @@ -3675,6 +3675,13 @@ semver@^7.3.2, semver@^7.3.4, semver@^7.3.7:
dependencies:
lru-cache "^6.0.0"

semver@^7.5.0:
version "7.5.0"
resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.0.tgz#ed8c5dc8efb6c629c88b23d41dc9bf40c1d96cd0"
integrity sha512-+XC0AD/R7Q2mPSRuy2Id0+CGTZ98+8f+KvwirxOKIEyid+XSx6HbC63p+O4IndTHuX5Z+JxQ0TghCkO5Cg/2HA==
dependencies:
lru-cache "^6.0.0"

semver@~7.0.0:
version "7.0.0"
resolved "https://registry.yarnpkg.com/semver/-/semver-7.0.0.tgz#5f3ca35761e47e05b206c6daff2cf814f0316b8e"
Expand Down

0 comments on commit cf2c8ae

Please sign in to comment.