Skip to content

Commit f38e58c

Browse files
committed
Refactor dynamic module import transform code
1 parent 2e67298 commit f38e58c

File tree

8 files changed

+388
-162
lines changed

8 files changed

+388
-162
lines changed

frontend/packages/console-app/src/components/data-view/ConsoleDataView.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ import {
99
import { Bullseye, Pagination, Tooltip } from '@patternfly/react-core';
1010
import {
1111
DataView,
12+
DataViewFilters,
1213
DataViewState,
1314
DataViewTable,
1415
DataViewToolbar,
1516
} from '@patternfly/react-data-view';
16-
import DataViewFilters from '@patternfly/react-data-view/dist/esm/DataViewFilters';
1717
import { ColumnsIcon, UndoIcon } from '@patternfly/react-icons';
1818
import { css } from '@patternfly/react-styles';
1919
import { InnerScrollContainer, Tbody, Td, Tr } from '@patternfly/react-table';

frontend/packages/console-dynamic-plugin-sdk/CHANGELOG-webpack.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@ For current development version of Console, use `4.x.0-prerelease.n` packages.
1010
For older 1.x plugin SDK packages, refer to "OpenShift Console Versions vs SDK Versions" compatibility
1111
table in [Console dynamic plugins README](./README.md).
1212

13+
## 4.22.0-prerelease.3 - TBD
14+
15+
- **Breaking**: `ConsoleRemotePlugin` shared dynamic module option `transformImports` renamed to `moduleFilter` ([CONSOLE-5065], [#16224])
16+
- Update the default list of PatternFly packages that support dynamic modules ([CONSOLE-5065], [#16182])
17+
- Add support for `dist/dynamic-modules.json` when resolving dynamic module maps ([CONSOLE-5065], [#16224])
18+
1319
## 4.22.0-prerelease.2 - 2026-03-26
1420

1521
- **Deprecated**: `loadPluginEntry` callback is deprecated in favor of `__load_plugin_entry__`. Migrate by
@@ -110,6 +116,7 @@ table in [Console dynamic plugins README](./README.md).
110116
[CONSOLE-4400]: https://issues.redhat.com/browse/CONSOLE-4400
111117
[CONSOLE-4623]: https://issues.redhat.com/browse/CONSOLE-4623
112118
[CONSOLE-5050]: https://issues.redhat.com/browse/CONSOLE-5050
119+
[CONSOLE-5065]: https://issues.redhat.com/browse/CONSOLE-5065
113120
[CONSOLE-5135]: https://issues.redhat.com/browse/CONSOLE-5135
114121
[OCPBUGS-30762]: https://issues.redhat.com/browse/OCPBUGS-30762
115122
[OCPBUGS-30824]: https://issues.redhat.com/browse/OCPBUGS-30824
@@ -145,3 +152,5 @@ table in [Console dynamic plugins README](./README.md).
145152
[#15934]: https://github.com/openshift/console/pull/15934
146153
[#15945]: https://github.com/openshift/console/pull/15945
147154
[#16178]: https://github.com/openshift/console/pull/16178
155+
[#16182]: https://github.com/openshift/console/pull/16182
156+
[#16224]: https://github.com/openshift/console/pull/16224

frontend/packages/console-dynamic-plugin-sdk/src/shared-modules/shared-modules-meta.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,11 @@ type SharedModuleMetadata = Partial<{
1717
*/
1818
allowFallback: boolean;
1919

20-
/** A message describing the deprecation, if the module is deprecated. */
20+
/**
21+
* A message describing the deprecation, if the module has been deprecated.
22+
*
23+
* @default false
24+
*/
2125
deprecated: string | false;
2226
}>;
2327

frontend/packages/console-dynamic-plugin-sdk/src/utils/dynamic-module-parser.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ export type DynamicModuleMap = { [exportName: string]: string };
5353
*/
5454
export const getDynamicModuleMap = (
5555
basePath: string,
56+
dynamicModuleDir = 'dist/dynamic',
5657
indexModule = 'dist/esm/index.js',
5758
resolutionField = 'module',
5859
tsCompilerOptions = defaultCompilerOptions,
@@ -68,7 +69,7 @@ export const getDynamicModuleMap = (
6869
}
6970

7071
const dynamicModulePathToPkgDir = glob
71-
.sync(`${basePath}/dist/dynamic/**/package.json`)
72+
.sync(`${basePath}/${dynamicModuleDir}/**/package.json`)
7273
.reduce<Record<string, string>>((acc, pkgFile) => {
7374
// eslint-disable-next-line
7475
const pkg = require(pkgFile);

0 commit comments

Comments
 (0)