Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate Elyra extensions to support JupyterLab 4.x #3201

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 9 additions & 2 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,16 @@
"rules": {
"react/prop-types": "off",
"func-style": "error",
"@typescript-eslint/interface-name-prefix": [
"@typescript-eslint/naming-convention": [
"error",
{ "prefixWithI": "always" }
{
"selector": "interface",
"format": ["PascalCase"],
"custom": {
"regex": "^I[A-Z]",
"match": true
}
}
],
"@typescript-eslint/no-unused-vars": ["warn", { "args": "none" }],
"@typescript-eslint/no-use-before-define": "off",
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,12 @@ jobs:
/home/runner/.cache/Cypress
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
- name: Install
run: yarn install --frozen-lockfile && tsc -v
run: |
corepack prepare [email protected] --activate
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line is causing build failure, maybe it's best to use a stable version of yarn

yarn set version 3.5.0
yarn --version
yarn install && tsc -v
# --frozen-lockfile

lint-server:
name: Lint Server
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -90,3 +90,5 @@ tsconfig.tsbuildinfo
node_modules

.vscode/

.yarn/
4 changes: 4 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
enableImmutableInstalls: false
nodeLinker: node-modules

yarnPath: .yarn/releases/yarn-3.5.0.cjs
2 changes: 1 addition & 1 deletion elyra/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
__version__ = "3.16.0.dev0"
__version__ = "4.0.0.dev0"
8 changes: 4 additions & 4 deletions etc/scripts/generate-make-graph.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ make.stdout.on('data', (data: Buffer) => {
graph.push({
type: 'target',
name,
depth: depthString.length / 2
depth: depthString.length / 2,
});
continue;
}
Expand All @@ -79,7 +79,7 @@ make.stdout.on('data', (data: Buffer) => {
depth = depthString.length / 2;
graph.push({
type: 'end',
depth
depth,
});
depth = undefined;
continue;
Expand All @@ -89,7 +89,7 @@ make.stdout.on('data', (data: Buffer) => {
graph.push({
type: 'code',
value: msg.toString(),
depth
depth,
});
continue;
}
Expand All @@ -107,7 +107,7 @@ const printGraph = (): void => {
const spacer = ' '.repeat(cellWidth - g.name.length - 2);
console.log(`${padLeft}┌${bar}┐${padRight}`);
console.log(
`${padLeft}│ ${chalk.cyan.bold(g.name)}${spacer} |${padRight}`
`${padLeft}│ ${chalk.cyan.bold(g.name)}${spacer} |${padRight}`,
);
continue;
}
Expand Down
3 changes: 1 addition & 2 deletions lerna.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"version": "3.16.0-dev",
"version": "4.0.0-dev",
"npmClient": "yarn",
"useWorkspaces": true,
"command": {
"publish": {
"ignoreChanges": ["ignored-file", "*.md"],
Expand Down
81 changes: 42 additions & 39 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "elyra",
"version": "3.16.0-dev",
"version": "4.0.0-dev",
"private": true,
"workspaces": {
"packages": [
Expand Down Expand Up @@ -30,56 +30,59 @@
}
},
"resolutions": {
"@types/react": "^17.0.0",
"@types/react-dom": "^17.0.0",
"@types/react-intl": "^3.0.0",
"ansi-html": "^0.0.8",
"ejs": "^3.1.7",
"@types/react": "^18.0.26",
"@types/react-dom": "^18.0.9",
"ansi-html": "^0.0.9",
"ejs": "^3.1.9",
"cypress": "^6.2.0",
"glob-parent": "^5.1.2",
"node-forge": "^1.3.0",
"react": "^17.0.1",
"react-dev-utils": "^12.0.0",
"react-dom": "^17.0.1",
"react-intl": "^3.0.0",
"trim-newlines": "^3.0.1"
"react": "^18.2.0",
"react-dev-utils": "^12.0.1",
"react-dom": "^18.0.9",
"react-intl": "^6.5.5",
"trim-newlines": "^5.0.0",
"yjs": "^13.5.40"
},
"devDependencies": {
"@4tw/cypress-drag-drop": "^1.3.1",
"@cypress/webpack-preprocessor": "^5.5.0",
"@jupyterlab/testutils": "^3.4.6",
"@jupyterlab/testutils": "^4.0.6",
"@testing-library/cypress": "^7.0.4",
"@types/jest": "^26.0.20",
"@types/lodash": "^4.14.170",
"@types/node": "^15.0.1",
"@types/react": "^17.0.0",
"@types/react-dom": "~17.0.0",
"@types/react-intl": "^3.0.0",
"@typescript-eslint/eslint-plugin": "~2.23.0",
"@typescript-eslint/parser": "~2.23.0",
"@types/react": "^18.0.26",
"@types/react-dom": "~18.0.9",
"@typescript-eslint/eslint-plugin": "~6.13.2",
"@typescript-eslint/parser": "~6.13.2",
"cypress": "^6.2.0",
"eslint": "^6.5.0",
"eslint-config-prettier": "^6.9.0",
"eslint-plugin-cypress": "^2.11.2",
"eslint-plugin-header": "^3.0.0",
"eslint-plugin-import": "^2.20.2",
"eslint-plugin-mocha": "^9.0.0",
"eslint-plugin-prettier": "^3.1.2",
"eslint-plugin-react": "^7.18.3",
"eslint-plugin-react-hooks": "^4.1.2",
"husky": "^2.3.0",
"jest": "^26.6.3",
"eslint": "~8.55.0",
"eslint-config-prettier": "~9.1.0",
"eslint-plugin-cypress": "^2.15.1",
"eslint-plugin-header": "^3.1.1",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-jest": "~27.6.0",
"eslint-plugin-mocha": "^10.2.0",
"eslint-plugin-prettier": "~5.0.1",
"eslint-plugin-react": "~7.33.2",
"eslint-plugin-react-hooks": "^4.6.0",
"husky": "^8.0.3",
"jest": "^29.7.0",
"jest-raw-loader": "^1.0.1",
"lerna": "^5.5.0",
"lint-staged": "^9.5.0",
"lerna": "^8.0.1",
"lint-staged": "^15.2.0",
"npm-run-all": "^4.1.5",
"prettier": "^1.19.1",
"rimraf": "~3.0.2",
"start-server-and-test": "^1.12.1",
"ts-jest": "^26.4.4",
"ts-loader": "^6.2.2",
"ts-node": "^9.1.1",
"typescript": "~4.1.3",
"webpack": "^5.0.0"
}
"prettier": "^3.1.1",
"rimraf": "~5.0.5",
"start-server-and-test": "^2.0.3",
"ts-jest": "^29.1.1",
"ts-loader": "^9.5.1",
"ts-node": "^10.9.2",
"typedoc": "~0.24.7",
"typedoc-plugin-mdn-links": "^3.0.3",
"typescript": "~5.1.6",
"webpack": "^5.76.1"
},
"packageManager": "[email protected]"
}
56 changes: 28 additions & 28 deletions packages/code-snippet/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@elyra/code-snippet-extension",
"version": "3.16.0-dev",
"version": "4.0.0-dev",
"description": "JupyterLab extension - Reusable code snippets for your Notebook and Python Scripts",
"keywords": [
"jupyter",
Expand Down Expand Up @@ -43,35 +43,35 @@
"unlink:dev": "yarn unlink @jupyterlab/builder"
},
"dependencies": {
"@elyra/metadata-common": "3.16.0-dev",
"@elyra/services": "3.16.0-dev",
"@elyra/ui-components": "3.16.0-dev",
"@jupyterlab/application": "^3.4.6",
"@jupyterlab/apputils": "^3.4.6",
"@jupyterlab/builder": "^3.4.6",
"@jupyterlab/cells": "^3.4.6",
"@jupyterlab/codeeditor": "^3.4.6",
"@jupyterlab/coreutils": "^5.4.6",
"@jupyterlab/docmanager": "^3.4.6",
"@jupyterlab/docregistry": "^3.4.6",
"@jupyterlab/fileeditor": "^3.4.6",
"@jupyterlab/mainmenu": "^3.4.6",
"@jupyterlab/markdownviewer": "^3.4.6",
"@jupyterlab/notebook": "^3.4.6",
"@jupyterlab/ui-components": "^3.4.6",
"@lumino/algorithm": "^1.3.3",
"@lumino/coreutils": "^1.5.6",
"@lumino/messaging": "^1.4.3",
"@lumino/signaling": "^1.4.3",
"@lumino/widgets": "^1.19.0",
"react": "^17.0.1",
"react-dom": "^17.0.1"
"@elyra/metadata-common": "4.0.0-dev",
"@elyra/services": "4.0.0-dev",
"@elyra/ui-components": "4.0.0-dev",
"@jupyterlab/application": "^4.0.6",
"@jupyterlab/apputils": "^4.1.6",
"@jupyterlab/builder": "^4.0.6",
"@jupyterlab/cells": "^4.0.6",
"@jupyterlab/codeeditor": "^4.0.6",
"@jupyterlab/coreutils": "^6.0.6",
"@jupyterlab/docmanager": "^4.0.6",
"@jupyterlab/docregistry": "^4.0.6",
"@jupyterlab/fileeditor": "^4.0.6",
"@jupyterlab/mainmenu": "^4.0.6",
"@jupyterlab/markdownviewer": "^4.0.6",
"@jupyterlab/notebook": "^4.0.6",
"@jupyterlab/ui-components": "^4.0.6",
"@lumino/algorithm": "*",
"@lumino/coreutils": "^2.1.2",
"@lumino/messaging": "^2.0.1",
"@lumino/signaling": "^2.1.2",
"@lumino/widgets": "^2.3.1",
"react": "^18.2.0",
"react-dom": "^18.0.9"
},
"devDependencies": {
"@types/react": "^17.0.0",
"@types/react-dom": "^17.0.0",
"rimraf": "^3.0.2",
"typescript": "~4.1.3"
"@types/react": "^18.0.26",
"@types/react-dom": "^18.0.9",
"rimraf": "~5.0.5",
"typescript": "~5.1.6"
},
"publishConfig": {
"access": "public"
Expand Down
4 changes: 2 additions & 2 deletions packages/code-snippet/src/CodeSnippetService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,13 @@ export class CodeSnippetService {
static deleteCodeSnippet(codeSnippet: IMetadata): Promise<boolean> {
return showDialog({
title: `Delete snippet '${codeSnippet.display_name}'?`,
buttons: [Dialog.cancelButton(), Dialog.okButton()]
buttons: [Dialog.cancelButton(), Dialog.okButton()],
}).then((result: any) => {
// Do nothing if the cancel button is pressed
if (result.button.accept) {
return MetadataService.deleteMetadata(
CODE_SNIPPET_SCHEMASPACE,
codeSnippet.name
codeSnippet.name,
).then(() => true);
} else {
return false;
Expand Down