Skip to content

Commit 14b9c25

Browse files
feat(enhanced): add include/exclude filtering support to share plugin
- add include/exclude properties to share plugin schema - update share plugin to pass through include/exclude filters to underlying plugins - generate updated typescript definitions and validation schemas - support version and request filtering for both include and exclude - part of pr4: basic share filtering - include/exclude by version
1 parent 2840932 commit 14b9c25

File tree

5 files changed

+847
-298
lines changed

5 files changed

+847
-298
lines changed

packages/enhanced/src/declarations/plugins/sharing/SharePlugin.d.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,4 +87,22 @@ export interface SharedConfig {
8787
* The actual request to use for importing the module. Defaults to the property name.
8888
*/
8989
request?: string;
90+
/**
91+
* Filter for the shared module.
92+
*/
93+
exclude?: IncludeExcludeOptions;
94+
/**
95+
* Filter for the shared module.
96+
*/
97+
include?: IncludeExcludeOptions;
98+
/**
99+
* Node modules reconstructed lookup.
100+
*/
101+
nodeModulesReconstructedLookup?: boolean;
102+
}
103+
104+
export interface IncludeExcludeOptions {
105+
request?: string | RegExp;
106+
version?: string;
107+
fallbackVersion?: string;
90108
}

packages/enhanced/src/lib/sharing/SharePlugin.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ class SharePlugin {
5555
issuerLayer: options.issuerLayer,
5656
layer: options.layer,
5757
request: options.request || key,
58+
include: options.include,
59+
exclude: options.exclude,
5860
},
5961
}),
6062
);
@@ -71,6 +73,8 @@ class SharePlugin {
7173
singleton: options.singleton,
7274
layer: options.layer,
7375
request: options.request || options.import || key,
76+
include: options.include,
77+
exclude: options.exclude,
7478
},
7579
}));
7680

0 commit comments

Comments
 (0)