Skip to content

Commit

Permalink
Merge pull request #963 from yaacov/clean-legacy
Browse files Browse the repository at this point in the history
🐾 Remove legacy requirements
  • Loading branch information
yaacov authored Mar 4, 2024
2 parents f60a5ec + f425308 commit 65fe6d6
Show file tree
Hide file tree
Showing 81 changed files with 8,623 additions and 8,145 deletions.
12,928 changes: 6,635 additions & 6,293 deletions package-lock.json

Large diffs are not rendered by default.

9 changes: 7 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,15 @@
"private": true,
"repository": "https://github.com/kubev2v/forklift-console-plugin.git",
"workspaces": [
"packages/*"
"packages/eslint-plugin",
"packages/build",
"packages/webpack",
"packages/types",
"packages/common",
"packages/forklift-console-plugin"
],
"config": {
"libs": "-w @kubev2v/webpack -w @kubev2v/types -w @kubev2v/legacy -w @kubev2v/common -w @kubev2v/mocks"
"libs": "-w @kubev2v/webpack -w @kubev2v/types -w @kubev2v/common"
},
"scripts": {
"clean": "rm -rf ./dist ./coverage && npm run clean -ws --if-present",
Expand Down
7 changes: 3 additions & 4 deletions packages/common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,11 @@
"@patternfly/react-core": "4.276.6",
"@patternfly/react-table": "4.112.39",
"react": "^17.0.1",
"react-dom": "^17.0.1",
"react-i18next": "^11.7.3",
"react-query": "^3.39.2",
"react-router": "5.2.0",
"react-router-dom": "5.2.0"
"react-router": "5.3.x",
"react-router-dom": "5.3.x"
},
"devDependencies": {
"@storybook/addon-essentials": "^7.0.14",
Expand All @@ -51,8 +52,6 @@
"@storybook/testing-library": "^0.0.14-next.2",
"eslint-plugin-storybook": "^0.6.12",
"prop-types": "^15.8.1",
"react": "^17.0.1",
"react-dom": "^17.0.1",
"sass": "^1.63.3",
"storybook": "^7.0.14"
}
Expand Down
2 changes: 0 additions & 2 deletions packages/forklift-console-plugin/jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@ const moduleNameMapper = {
}),

// Mappings for monorepo packages
'@kubev2v/legacy/(.*)$': '<rootDir>/../legacy/dist/$1',
'@kubev2v/common/(.*)$': '<rootDir>/../common/dist/$1',
'@kubev2v/mocks/(.*)$': '<rootDir>/../mocks/dist/$1',
'@kubev2v/types/(.*)$': '<rootDir>/../types/dist/$1',
};

Expand Down

Large diffs are not rendered by default.

15 changes: 4 additions & 11 deletions packages/forklift-console-plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"i18n": "i18next \"./src/**/*.{js,jsx,ts,tsx}\" [-oc] -c ./i18next-parser.config.mjs",
"build": "NODE_ENV=production webpack",
"build:dev": "webpack --progress",
"start": "msw init ./dist --save; NODE_ENV=development webpack serve",
"start": "NODE_ENV=development webpack serve",
"lint": "eslint . && stylelint \"src/**/*.css\" --allow-empty-input",
"lint:fix": "eslint . --fix && stylelint \"src/**/*.css\" --allow-empty-input --fix",
"test": "TZ=UTC jest",
Expand All @@ -24,14 +24,11 @@
},
"dependencies": {
"@kubev2v/common": "*",
"@kubev2v/legacy": "*",
"@migtools/lib-ui": "8.4.1",
"@types/jsrsasign": "10.5.12",
"immer": "^10.0.3",
"jsonpath": "^1.1.1",
"jsrsasign": "11.1.0",
"luxon": "^3.3.0",
"msw": "^1.2.3",
"streamsaver": "^2.0.6",
"use-immer": "^0.9.0",
"uuid": "^9.0.1"
Expand All @@ -41,15 +38,14 @@
"@openshift/dynamic-plugin-sdk": "3.0.0",
"@patternfly/react-core": "4.276.6",
"@patternfly/react-table": "4.112.39",
"@patternfly/react-charts": "6.94.18",
"@patternfly/react-charts": "7.2.1",
"react-dom": "^17.0.1",
"react": "^17.0.1",
"react-i18next": "^11.7.3",
"react-router": "5.2.0",
"react-router-dom": "5.2.0"
"react-router": "5.3.x",
"react-router-dom": "5.3.x"
},
"devDependencies": {
"@kubev2v/mocks": "*",
"@kubev2v/types": "*",
"@kubev2v/webpack": "*",
"@openshift-console/dynamic-plugin-sdk-webpack": "0.0.9",
Expand All @@ -67,8 +63,5 @@
"webpack": "^5.79.0",
"webpack-cli": "^5.0.2",
"webpack-dev-server": "^4.15.1"
},
"msw": {
"workerDirectory": "dist"
}
}
3 changes: 0 additions & 3 deletions packages/forklift-console-plugin/plugin-extensions.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
import type { EncodedExtension } from '@openshift/dynamic-plugin-sdk';
import type { NavSection } from '@openshift-console/dynamic-plugin-sdk';

import { extensions as mockConsoleExtensions } from './src/__mock-console-extension/dynamic-plugin';
import { extensions as networkMapExtensions } from './src/modules/NetworkMaps/dynamic-plugin';
import { extensions as overviewExtensions } from './src/modules/Overview/dynamic-plugin';
import { extensions as planExtensions } from './src/modules/Plans/dynamic-plugin';
import { extensions as providerExtensions } from './src/modules/Providers/dynamic-plugin';
import { extensions as storageMapExtensions } from './src/modules/StorageMaps/dynamic-plugin';

const extensions: EncodedExtension[] = [
...mockConsoleExtensions,

{
type: 'console.navigation/section',
properties: {
Expand Down
5 changes: 0 additions & 5 deletions packages/forklift-console-plugin/plugin-metadata.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import type { ConsolePluginMetadata } from '@openshift-console/dynamic-plugin-sdk-webpack/lib/schema/plugin-package';

import { exposedModules as mockExtensionModules } from './src/__mock-console-extension/dynamic-plugin';
import { exposedModules as networkMapModules } from './src/modules/NetworkMaps/dynamic-plugin';
import { exposedModules as overviewModules } from './src/modules/Overview/dynamic-plugin';
import { exposedModules as planModules } from './src/modules/Plans/dynamic-plugin';
Expand All @@ -15,16 +14,12 @@ const pluginMetadata: ConsolePluginMetadata = {
description:
'Forklift is a suite of migration tools that facilitate the migration of VM workloads to KubeVirt.',
exposedModules: {
...mockExtensionModules,
...overviewModules,
...providerModules,
...planModules,
...networkMapModules,
...storageMapModules,
},
dependencies: {
'@console/pluginAPI': '>=4.11',
},
};

export default pluginMetadata;

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { ProviderModelGroupVersionKind } from '@kubev2v/types';
import { CellProps } from './CellProps';

export const ProviderLinkCell: React.FC<CellProps> = ({ data, fieldId }) => {
const provider = data.obj.spec.provider[fieldId];
const provider = data.obj?.spec?.provider?.[fieldId];
const { name, namespace } = provider || {};

if (!provider) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useEffect, useRef, useState } from 'react';
import { getInventoryApiUrl } from 'legacy/src/queries/helpers';
import { getInventoryApiUrl } from 'src/modules/Providers/utils';

import { consoleFetchJSON } from '@openshift-console/dynamic-plugin-sdk';

Expand Down
Loading

0 comments on commit 65fe6d6

Please sign in to comment.