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

Update dependencies to be compatible with JupyterLab 4.x #227

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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,12 @@ jobs:
/home/runner/.cache/Cypress
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
- name: Install
run: yarn install --frozen-lockfile
run: |
corepack prepare [email protected] --activate
yarn set version 3.5.0
yarn --version
yarn install
# --frozen-lockfile

lint:
name: Lint
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ coverage
.env.test.local
.env.production.local

.yarn
npm-debug.log*
yarn-debug.log*
yarn-error.log*
Expand Down
3 changes: 3 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
enableImmutableInstalls: false
nodeLinker: node-modules

12 changes: 6 additions & 6 deletions examples/create-react-app-with-typescript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
"private": true,
"dependencies": {
"@elyra/pipeline-editor": "latest",
"react": "latest",
"react-dom": "latest",
"react-scripts": "latest"
"react": "^18.2.0",
"react-dom": "^18.0.9",
"react-scripts": "^4.0.3"
},
"devDependencies": {
"@types/react": "latest",
"@types/react-dom": "latest",
"typescript": "latest"
"@types/react": "18.0.26",
"@types/react-dom": "^18.0.9",
"typescript": "^4.0.3"
},
"scripts": {
"start": "react-scripts start",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
Expand Down
4 changes: 2 additions & 2 deletions examples/create-react-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"private": true,
"dependencies": {
"@elyra/pipeline-editor": "latest",
"react": "latest",
"react-dom": "latest",
"react": "^18.2.0",
"react-dom": "^18.0.9",
"react-scripts": "latest"
},
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion examples/create-react-app/public/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
Expand Down
1 change: 0 additions & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"packages": ["packages/*"],
"npmClient": "yarn",
"useWorkspaces": true,
"version": "1.12.1"
}
40 changes: 20 additions & 20 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,34 +16,35 @@
"@storybook/addon-links": "^6.4.9",
"@storybook/react": "^6.4.9",
"@testing-library/cypress": "^7.0.4",
"@types/jest": "^26.0.20",
"@typescript-eslint/eslint-plugin": "^4.5.0",
"@typescript-eslint/parser": "^4.5.0",
"@types/jest": "^29.2.0",
"@typescript-eslint/eslint-plugin": "^5.55.0",
"@typescript-eslint/parser": "^5.55.0",
"babel-eslint": "^10.0.0",
"babel-loader": "^8.2.2",
"core-js": "^3.9.1",
"cypress": "^9.2.1",
"eslint": "^7.11.0",
"eslint-config-react-app": "^6.0.0",
"eslint-plugin-cypress": "^2.11.2",
"eslint-plugin-cypress": "^2.15.1",
"eslint-plugin-flowtype": "^5.2.0",
"eslint-plugin-header": "^3.1.0",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-jest": "^24.1.0",
"eslint-plugin-header": "^3.1.1",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-jest": "^27.6.0",
"eslint-plugin-jest-dom": "^3.6.5",
"eslint-plugin-jsx-a11y": "^6.3.1",
"eslint-plugin-react": "^7.21.5",
"eslint-plugin-react-hooks": "^4.2.0",
"eslint-plugin-react": "^7.33.2",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-testing-library": "^3.10.1",
"husky": "^3.1.0",
"jest": "^26.6.3",
"lerna": "^3.22.1",
"lint-staged": "^9.4.3",
"microbundle": "^0.13.0",
"prettier": "^2.2.1",
"start-server-and-test": "^1.12.0",
"ts-jest": "^26.5.1",
"typescript": "4.1.3"
"husky": "^8.0.3",
"jest": "^29.7.0",
"lerna": "^8.0.1",
"lint-staged": "^15.2.0",
"microbundle": "^0.15.1",
"prettier": "^3.1.1",
"rimraf": "~5.0.5",
"start-server-and-test": "^2.0.3",
"ts-jest": "^29.1.1",
"typescript": "5.1.6"
},
"husky": {
"hooks": {
Expand All @@ -57,7 +58,7 @@
]
},
"scripts": {
"clean": "lerna run clean; rm -rf node_modules",
"clean": "lerna run clean; rimraf node_modules",
"build": "lerna run build",
"link-all": "lerna run link",
"watch": "FORCE_COLOR=true lerna run watch --parallel --stream",
Expand All @@ -75,7 +76,6 @@
"format:check": "prettier --ignore-path .gitignore --check \"**/*.{tsx,ts,js,css,html,json}\"",
"preinstall": "npx force-resolutions -y"
},
"dependencies": {},
"resolutions": {
"immer": "9.0.7",
"prismjs": "1.25.0",
Expand Down
18 changes: 9 additions & 9 deletions packages/pipeline-editor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"dist"
],
"scripts": {
"clean": "rm -rf node_modules; rm -rf dist; yarn unlink || true",
"clean": "rimraf node_modules; rimraf dist; yarn unlink || true",
"build": "microbundle --css inline -f cjs",
"watch": "microbundle --css inline -o dist/index.js --no-pkg-main -f modern --watch --no-compress",
"link": "yarn link"
Expand All @@ -32,22 +32,22 @@
"downshift": "^6.1.2",
"immer": "^9.0.7",
"nanoid": "^3.1.20",
"react-dom": "^17.0.1",
"react-intl": "^5.0.0",
"react-dom": "^18.0.9",
"react-intl": "^6.5.5",
"react-redux": "^7.0.0",
"redux": "^4.0.5",
"styled-components": "^5.2.1"
"styled-components": "^6.0.7"
},
"devDependencies": {
"@testing-library/jest-dom": "^5.11.9",
"@testing-library/react": "^11.2.5",
"@testing-library/react": "^13.4.0",
"@testing-library/user-event": "^12.8.0",
"@types/react": "^17.0.1",
"@types/react-dom": "^17.0.0",
"@types/react": "^18.0.26",
"@types/react-dom": "^18.0.9",
"@types/react-intl": "^3.0.0",
"@types/react-redux": "^7.1.16",
"@types/styled-components": "^5.1.7",
"react": "^17.0.1"
"@types/styled-components": "^5.1.26",
"react": "^18.2.0"
},
"peerDependencies": {
"react": ">=17.0.0"
Expand Down
54 changes: 27 additions & 27 deletions packages/pipeline-editor/src/NodeTooltip/utils.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,139 +19,139 @@ import { hasValue, toPrettyString } from "./utils";
describe("toPrettyString", () => {
it("returns the same string for a string", () => {
const result = toPrettyString("hello world");
expect(result).toEqual("hello world");
expect(result).toBe("hello world");
});

it("returns a string for a number", () => {
const result = toPrettyString(42);
expect(result).toEqual("42");
expect(result).toBe("42");
});

it("returns a string for a simple string array", () => {
const result = toPrettyString(["one", "two", "three"]);
expect(result).toEqual("one\ntwo\nthree");
expect(result).toBe("one\ntwo\nthree");
});

it("returns a string for a simple array with numbers", () => {
const result = toPrettyString([1, 2, 3]);
expect(result).toEqual("1\n2\n3");
expect(result).toBe("1\n2\n3");
});

it("returns a string for a simple array with null holes", () => {
const result = toPrettyString([null, null, null]);
expect(result).toEqual("null\nnull\nnull");
expect(result).toBe("null\nnull\nnull");
});

it("returns a string for a simple array with undefined holes", () => {
const result = toPrettyString([undefined, undefined, undefined]);
expect(result).toEqual("undefined\nundefined\nundefined");
expect(result).toBe("undefined\nundefined\nundefined");
});

it("returns an empty string for an empty array", () => {
const result = toPrettyString([]);
expect(result).toEqual("");
expect(result).toBe("");
});

it("returns a string for a sparse array", () => {
// eslint-disable-next-line no-sparse-arrays
const result = toPrettyString(["one", , , "two", , "three"]);
expect(result).toEqual("one\n\n\ntwo\n\nthree");
expect(result).toBe("one\n\n\ntwo\n\nthree");
});

it("returns 'Yes' for a true boolean", () => {
const result = toPrettyString(true);
expect(result).toEqual("Yes");
expect(result).toBe("Yes");
});

it("returns 'No' for a false boolean", () => {
const result = toPrettyString(false);
expect(result).toEqual("No");
expect(result).toBe("No");
});

it("returns a string for undefined", () => {
const result = toPrettyString(undefined);
expect(result).toEqual("undefined");
expect(result).toBe("undefined");
});

it("returns a string for null", () => {
const result = toPrettyString(null);
expect(result).toEqual("null");
expect(result).toBe("null");
});

it("returns a string for NaN", () => {
const result = toPrettyString(NaN);
expect(result).toEqual("NaN");
expect(result).toBe("NaN");
});

it("returns a string for an object", () => {
const result = toPrettyString({ one: 1, two: 2, three: 3 });
expect(result).toEqual("one: 1\ntwo: 2\nthree: 3");
expect(result).toBe("one: 1\ntwo: 2\nthree: 3");
});

it("returns a string for an error", () => {
const result = toPrettyString(new Error("this is an error"));
expect(result).toEqual("Error: this is an error");
expect(result).toBe("Error: this is an error");
});
});

describe("hasValue", () => {
it("returns true for a true value", () => {
const result = hasValue(true);
expect(result).toEqual(true);
expect(result).toBe(true);
});

it("returns true for a false value", () => {
const result = hasValue(true);
expect(result).toEqual(true);
expect(result).toBe(true);
});

it("returns true for a string", () => {
const result = hasValue("hello");
expect(result).toEqual(true);
expect(result).toBe(true);
});

it("returns true for an array", () => {
const result = hasValue(["one", "two", "three"]);
expect(result).toEqual(true);
expect(result).toBe(true);
});

it("returns true for an object", () => {
const result = hasValue({ one: 1, two: 2, three: 3 });
expect(result).toEqual(true);
expect(result).toBe(true);
});

it("returns true for a number", () => {
const result = hasValue(42);
expect(result).toEqual(true);
expect(result).toBe(true);
});

it("returns true for zero", () => {
const result = hasValue(0);
expect(result).toEqual(true);
expect(result).toBe(true);
});

it("returns true for NaN", () => {
const result = hasValue(NaN);
expect(result).toEqual(true);
expect(result).toBe(true);
});

it("returns false for an empty string", () => {
const result = hasValue("");
expect(result).toEqual(false);
expect(result).toBe(false);
});

it("returns false for an empty array", () => {
const result = hasValue([]);
expect(result).toEqual(false);
expect(result).toBe(false);
});

it("returns false for a null value", () => {
const result = hasValue(null);
expect(result).toEqual(false);
expect(result).toBe(false);
});

it("returns false for an undefined value", () => {
const result = hasValue(undefined);
expect(result).toEqual(false);
expect(result).toBe(false);
});
});
2 changes: 1 addition & 1 deletion packages/pipeline-editor/src/PipelineEditor/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ const PipelineEditor = forwardRef(
} else {
controller.current.resetStyles();
}
// don't call to persist change because it will cause an infinate loop
// don't call to persist change because it will cause an infinity loop
} catch (e) {
onError?.(e);
}
Expand Down
2 changes: 1 addition & 1 deletion packages/pipeline-services/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"dist"
],
"scripts": {
"clean": "rm -rf node_modules; rm -rf dist; yarn unlink || true",
"clean": "rimraf node_modules; rimraf dist; yarn unlink || true",
"build": "tsc",
"watch": "tsc -w --preserveWatchOutput",
"test": "jest",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ it("should update old op name to new op name", () => {
};

const actual = migrate(v4);
expect(actual.pipelines[0].nodes[0].op).toEqual(
expect(actual.pipelines[0].nodes[0].op).toBe(
"run_notebook_using_papermill_Runnotebookusingpapermill"
);
});
Expand All @@ -66,7 +66,7 @@ it("should not update op name if already new op name", () => {
};

const actual = migrate(v4);
expect(actual.pipelines[0].nodes[0].op).toEqual(
expect(actual.pipelines[0].nodes[0].op).toBe(
"filter_text_using_shell_and_grep_Filtertext"
);
});
Expand All @@ -91,7 +91,7 @@ it("should not update op name if not in update list", () => {
};

const actual = migrate(v4);
expect(actual.pipelines[0].nodes[0].op).toEqual("some_op_name");
expect(actual.pipelines[0].nodes[0].op).toBe("some_op_name");
});

it("should not error if op not set", () => {
Expand Down
Loading
Loading