@appshell/react 1.0.0-alpha.10 → 1.0.0-alpha.101
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +36 -49
- package/dist/main.js +1 -1
- package/dist/types/config/src/axios.d.ts +0 -1
- package/dist/types/config/src/configmap.d.ts +0 -1
- package/dist/types/config/src/context.d.ts +8 -5
- package/dist/types/config/src/credentials.d.ts +35 -3
- package/dist/types/config/src/generate.manifest.d.ts +30 -2
- package/dist/types/config/src/index.d.ts +9 -10
- package/dist/types/config/src/loader.d.ts +18 -0
- package/dist/types/config/src/mappers/appshell.config.d.ts +9 -3
- package/dist/types/config/src/outdated.d.ts +0 -1
- package/dist/types/config/src/package-name.d.ts +20 -0
- package/dist/types/config/src/publish.d.ts +109 -7
- package/dist/types/config/src/sync.d.ts +0 -1
- package/dist/types/config/src/tls.d.ts +11 -0
- package/dist/types/config/src/types.d.ts +184 -31
- package/dist/types/config/src/utils/blur.d.ts +0 -1
- package/dist/types/config/src/utils/compare.d.ts +0 -1
- package/dist/types/config/src/utils/config.d.ts +15 -1
- package/dist/types/config/src/utils/copy.d.ts +0 -1
- package/dist/types/config/src/utils/dump.d.ts +10 -0
- package/dist/types/config/src/utils/index.d.ts +2 -5
- package/dist/types/config/src/utils/list.d.ts +0 -1
- package/dist/types/config/src/utils/load.d.ts +0 -1
- package/dist/types/config/src/validators/AppshellTemplateValidator.d.ts +0 -1
- package/dist/types/config/src/validators/index.d.ts +0 -3
- package/dist/types/loader/src/index.d.ts +0 -1
- package/dist/types/loader/src/loadAppshellComponent.d.ts +13 -14
- package/dist/types/loader/src/remoteLoader.d.ts +2 -3
- package/dist/types/loader/src/resolvers.d.ts +4 -12
- package/dist/types/loader/src/types.d.ts +0 -1
- package/dist/types/react/src/components/LoadingError.d.ts +0 -1
- package/dist/types/react/src/components/RemoteSlot.d.ts +28 -0
- package/dist/types/react/src/contexts/RemoteContext.d.ts +2 -4
- package/dist/types/react/src/hooks/useRemote.d.ts +1 -2
- package/dist/types/react/src/index.d.ts +2 -9
- package/dist/types/react/src/resources/jsonResource.d.ts +0 -1
- package/dist/types/react/src/types.d.ts +0 -1
- package/dist/types/runtime/src/errors.d.ts +32 -0
- package/dist/types/runtime/src/identity.d.ts +47 -0
- package/dist/types/runtime/src/index.d.ts +6 -0
- package/dist/types/runtime/src/store.d.ts +25 -0
- package/dist/types/runtime/src/types.d.ts +9 -0
- package/dist/types/runtime/src/wire.d.ts +58 -0
- package/package.json +14 -4
- package/CHANGELOG.md +0 -207
- package/__tests__/AppshellComponent.spec.tsx +0 -53
- package/__tests__/LoadingError.spec.tsx +0 -14
- package/__tests__/ManifestContext.spec.tsx +0 -50
- package/__tests__/ReactHost.spec.tsx +0 -136
- package/__tests__/__snapshots__/AppshellComponent.spec.tsx.snap +0 -9
- package/__tests__/__snapshots__/LoadingError.spec.tsx.snap +0 -88
- package/__tests__/__snapshots__/ReactHost.spec.tsx.snap +0 -11
- package/__tests__/fixtures/Manifest.ts +0 -16
- package/__tests__/fixtures/TestComponent.tsx +0 -5
- package/__tests__/fixtures/TestGlobalConfig.ts +0 -8
- package/__tests__/jsonResource.spec.ts +0 -27
- package/__tests__/useRemote.spec.tsx +0 -36
- package/__tests__/utils/waitForResource.ts +0 -15
- package/dist/types/config/src/axios.d.ts.map +0 -1
- package/dist/types/config/src/configmap.d.ts.map +0 -1
- package/dist/types/config/src/context.d.ts.map +0 -1
- package/dist/types/config/src/credentials.d.ts.map +0 -1
- package/dist/types/config/src/deregister.d.ts +0 -3
- package/dist/types/config/src/deregister.d.ts.map +0 -1
- package/dist/types/config/src/generate.env.d.ts +0 -3
- package/dist/types/config/src/generate.env.d.ts.map +0 -1
- package/dist/types/config/src/generate.global-config.d.ts +0 -10
- package/dist/types/config/src/generate.global-config.d.ts.map +0 -1
- package/dist/types/config/src/generate.manifest.d.ts.map +0 -1
- package/dist/types/config/src/index.d.ts.map +0 -1
- package/dist/types/config/src/mappers/appshell.config.d.ts.map +0 -1
- package/dist/types/config/src/outdated.d.ts.map +0 -1
- package/dist/types/config/src/publish.d.ts.map +0 -1
- package/dist/types/config/src/register.d.ts +0 -4
- package/dist/types/config/src/register.d.ts.map +0 -1
- package/dist/types/config/src/sync.d.ts.map +0 -1
- package/dist/types/config/src/types.d.ts.map +0 -1
- package/dist/types/config/src/utils/blur.d.ts.map +0 -1
- package/dist/types/config/src/utils/compare.d.ts.map +0 -1
- package/dist/types/config/src/utils/config.d.ts.map +0 -1
- package/dist/types/config/src/utils/copy.d.ts.map +0 -1
- package/dist/types/config/src/utils/index.d.ts.map +0 -1
- package/dist/types/config/src/utils/isValidUrl.d.ts +0 -3
- package/dist/types/config/src/utils/isValidUrl.d.ts.map +0 -1
- package/dist/types/config/src/utils/list.d.ts.map +0 -1
- package/dist/types/config/src/utils/load.d.ts.map +0 -1
- package/dist/types/config/src/utils/loadJson.d.ts +0 -10
- package/dist/types/config/src/utils/loadJson.d.ts.map +0 -1
- package/dist/types/config/src/utils/merge.d.ts +0 -4
- package/dist/types/config/src/utils/merge.d.ts.map +0 -1
- package/dist/types/config/src/validators/AppshellGlobalConfigValidator.d.ts +0 -4
- package/dist/types/config/src/validators/AppshellGlobalConfigValidator.d.ts.map +0 -1
- package/dist/types/config/src/validators/AppshellManifestValidator.d.ts +0 -4
- package/dist/types/config/src/validators/AppshellManifestValidator.d.ts.map +0 -1
- package/dist/types/config/src/validators/AppshellTemplateValidator.d.ts.map +0 -1
- package/dist/types/config/src/validators/index.d.ts.map +0 -1
- package/dist/types/loader/src/fetchDynamicScript.d.ts +0 -3
- package/dist/types/loader/src/fetchDynamicScript.d.ts.map +0 -1
- package/dist/types/loader/src/index.d.ts.map +0 -1
- package/dist/types/loader/src/loadAppshellComponent.d.ts.map +0 -1
- package/dist/types/loader/src/remoteLoader.d.ts.map +0 -1
- package/dist/types/loader/src/resolvers.d.ts.map +0 -1
- package/dist/types/loader/src/types.d.ts.map +0 -1
- package/dist/types/react/src/components/AppshellComponent.d.ts +0 -30
- package/dist/types/react/src/components/AppshellComponent.d.ts.map +0 -1
- package/dist/types/react/src/components/LoadingError.d.ts.map +0 -1
- package/dist/types/react/src/components/ReactHost.d.ts +0 -9
- package/dist/types/react/src/components/ReactHost.d.ts.map +0 -1
- package/dist/types/react/src/contexts/GlobalConfigContext.d.ts +0 -11
- package/dist/types/react/src/contexts/GlobalConfigContext.d.ts.map +0 -1
- package/dist/types/react/src/contexts/ManifestContext.d.ts +0 -12
- package/dist/types/react/src/contexts/ManifestContext.d.ts.map +0 -1
- package/dist/types/react/src/contexts/MetadataContext.d.ts +0 -11
- package/dist/types/react/src/contexts/MetadataContext.d.ts.map +0 -1
- package/dist/types/react/src/contexts/RemoteContext.d.ts.map +0 -1
- package/dist/types/react/src/hooks/useGlobalConfig.d.ts +0 -4
- package/dist/types/react/src/hooks/useGlobalConfig.d.ts.map +0 -1
- package/dist/types/react/src/hooks/useManifest.d.ts +0 -4
- package/dist/types/react/src/hooks/useManifest.d.ts.map +0 -1
- package/dist/types/react/src/hooks/useMetadata.d.ts +0 -4
- package/dist/types/react/src/hooks/useMetadata.d.ts.map +0 -1
- package/dist/types/react/src/hooks/useRemote.d.ts.map +0 -1
- package/dist/types/react/src/index.d.ts.map +0 -1
- package/dist/types/react/src/resources/jsonResource.d.ts.map +0 -1
- package/dist/types/react/src/types.d.ts.map +0 -1
- package/src/components/AppshellComponent.tsx +0 -82
- package/src/components/LoadingError.tsx +0 -15
- package/src/components/ReactHost.tsx +0 -55
- package/src/contexts/GlobalConfigContext.tsx +0 -17
- package/src/contexts/ManifestContext.tsx +0 -40
- package/src/contexts/MetadataContext.tsx +0 -17
- package/src/contexts/RemoteContext.tsx +0 -22
- package/src/hooks/useGlobalConfig.ts +0 -7
- package/src/hooks/useManifest.ts +0 -7
- package/src/hooks/useMetadata.ts +0 -6
- package/src/hooks/useRemote.ts +0 -7
- package/src/index.ts +0 -11
- package/src/resources/jsonResource.ts +0 -35
- package/src/types.ts +0 -3
- package/tsconfig.json +0 -7
- package/webpack.config.js +0 -42
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import { AppshellRemote } from '@appshell/config';
|
|
2
2
|
import type { FC, ReactNode } from 'react';
|
|
3
|
-
import React from 'react';
|
|
4
3
|
interface RemoteProviderProps {
|
|
5
4
|
remote?: AppshellRemote;
|
|
6
5
|
children: ReactNode;
|
|
7
6
|
}
|
|
8
|
-
export declare const RemoteContext:
|
|
7
|
+
export declare const RemoteContext: import("react").Context<AppshellRemote | undefined>;
|
|
9
8
|
export declare const RemoteProvider: FC<RemoteProviderProps>;
|
|
10
|
-
export declare const RemoteConsumer:
|
|
9
|
+
export declare const RemoteConsumer: import("react").Consumer<AppshellRemote | undefined>;
|
|
11
10
|
export default RemoteContext;
|
|
12
|
-
//# sourceMappingURL=RemoteContext.d.ts.map
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { AppshellRemote } from '@appshell/config';
|
|
2
|
-
/** The remote backing the nearest `
|
|
2
|
+
/** The remote backing the nearest `RemoteSlot` — it already knows its own key. */
|
|
3
3
|
declare const _default: () => AppshellRemote | undefined;
|
|
4
4
|
export default _default;
|
|
5
|
-
//# sourceMappingURL=useRemote.d.ts.map
|
|
@@ -1,12 +1,5 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export { default as
|
|
3
|
-
export { GlobalConfigProvider } from './contexts/GlobalConfigContext';
|
|
4
|
-
export { ManifestProvider } from './contexts/ManifestContext';
|
|
5
|
-
export { MetadataProvider } from './contexts/MetadataContext';
|
|
1
|
+
export type { AppshellIndex, AppshellRemote, Metadata } from '@appshell/runtime';
|
|
2
|
+
export { default as RemoteSlot } from './components/RemoteSlot';
|
|
6
3
|
export { RemoteProvider } from './contexts/RemoteContext';
|
|
7
|
-
export { default as useGlobalConfig } from './hooks/useGlobalConfig';
|
|
8
|
-
export { default as useManifest } from './hooks/useManifest';
|
|
9
|
-
export { default as useMetadata } from './hooks/useMetadata';
|
|
10
4
|
export { default as useRemote } from './hooks/useRemote';
|
|
11
5
|
export { default as jsonResource } from './resources/jsonResource';
|
|
12
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A package asked for vars that were never delivered.
|
|
3
|
+
*
|
|
4
|
+
* Almost always one of three things: the package was loaded outside `remoteLoader`
|
|
5
|
+
* (a test, a storybook, a direct import), the host and the package resolved separate
|
|
6
|
+
* copies of `@appshell/runtime` because one of them failed to declare it as a
|
|
7
|
+
* singleton, or the scope compiled into the package is not the scope the registry
|
|
8
|
+
* knows it by.
|
|
9
|
+
*/
|
|
10
|
+
export declare class MissingVarsError extends Error {
|
|
11
|
+
readonly scope: string;
|
|
12
|
+
constructor(scope: string, known: string[]);
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Something tried to replace vars that were already delivered for a scope.
|
|
16
|
+
*
|
|
17
|
+
* The first write wins and is final. Within one page load a scope has exactly one
|
|
18
|
+
* vars object — both resolvers read it from the same `composition.vars[scope]` — so a
|
|
19
|
+
* differing second write is a bug or a package reaching for a scope that is not its own,
|
|
20
|
+
* and neither should be applied quietly.
|
|
21
|
+
*/
|
|
22
|
+
export declare class VarsConflictError extends Error {
|
|
23
|
+
readonly scope: string;
|
|
24
|
+
constructor(scope: string);
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* The package was built without `AppshellPlugin`, so nothing substituted the scope the
|
|
28
|
+
* `@appshell/runtime/vars` accessor needs to know which vars are its own.
|
|
29
|
+
*/
|
|
30
|
+
export declare class MissingScopeError extends Error {
|
|
31
|
+
constructor();
|
|
32
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Who is looking at the page, as the registry was told by the gateway.
|
|
3
|
+
*
|
|
4
|
+
* Unlike vars this is not scope-specific — there is one visitor per page, not one
|
|
5
|
+
* per package — so it lives in the main entry rather than needing the subpath
|
|
6
|
+
* trick `@appshell/runtime/vars` uses to get a per-package scope substituted.
|
|
7
|
+
*
|
|
8
|
+
* It is also not delivered through the vars store, and that is a constraint rather
|
|
9
|
+
* than a preference: `setVars` freezes on first write and throws on replacement,
|
|
10
|
+
* which is what stops one package overwriting another's configuration. Identity
|
|
11
|
+
* changes — sign-in, sign-out, token refresh — so it cannot live behind a
|
|
12
|
+
* write-once door without either breaking that guarantee or never updating.
|
|
13
|
+
*/
|
|
14
|
+
/**
|
|
15
|
+
* A discriminated union rather than an optional user, so `username` cannot be read
|
|
16
|
+
* without the anonymous case having been handled. The compiler enforces what a
|
|
17
|
+
* convention would only ask for.
|
|
18
|
+
*/
|
|
19
|
+
export type Identity = {
|
|
20
|
+
authenticated: false;
|
|
21
|
+
} | {
|
|
22
|
+
authenticated: true;
|
|
23
|
+
subject: string;
|
|
24
|
+
username: string;
|
|
25
|
+
roles: string[];
|
|
26
|
+
};
|
|
27
|
+
export declare const ANONYMOUS: Identity;
|
|
28
|
+
declare global {
|
|
29
|
+
interface Window {
|
|
30
|
+
__appshell_identity__?: unknown;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* The visitor, or the anonymous identity when there is none.
|
|
35
|
+
*
|
|
36
|
+
* Never throws and never returns undefined — an absent or malformed value is
|
|
37
|
+
* anonymous, which is a state every caller already has to handle. That is the
|
|
38
|
+
* opposite of `readVars`, which throws when a scope is missing, and the difference
|
|
39
|
+
* is deliberate: a package with no configuration cannot do its job, while a package
|
|
40
|
+
* with no signed-in user usually can and simply renders differently.
|
|
41
|
+
*
|
|
42
|
+
* This is a typed accessor, not a boundary. The value is inlined into the document
|
|
43
|
+
* and any script on the page can read it directly, exactly as with vars. Treat it
|
|
44
|
+
* as what the server said about the visitor, never as proof of anything: it carries
|
|
45
|
+
* no token and grants nothing. Anything that matters is re-checked server-side.
|
|
46
|
+
*/
|
|
47
|
+
export declare const getIdentity: () => Identity;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { MissingScopeError, MissingVarsError, VarsConflictError } from './errors';
|
|
2
|
+
export { ANONYMOUS, getIdentity } from './identity';
|
|
3
|
+
export type { Identity } from './identity';
|
|
4
|
+
export { hasVars, readVars, resetVars, setVars } from './store';
|
|
5
|
+
export type { Vars } from './types';
|
|
6
|
+
export type { AppshellIndex, AppshellRemote, Metadata, ModuleFederationLoader, RemoteLoader, } from './wire';
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { Vars } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Delivers a scope's vars. Called by `@appshell/loader` immediately before the remote
|
|
4
|
+
* is loaded, so they are in place before the package's modules evaluate.
|
|
5
|
+
*
|
|
6
|
+
* The first write for a scope wins and is frozen. Re-delivering the identical vars is a
|
|
7
|
+
* no-op — the same remote can be mounted more than once — but replacing them throws.
|
|
8
|
+
* That is what keeps one package from overwriting another's: by the time any package
|
|
9
|
+
* evaluates, the host has already written for it.
|
|
10
|
+
*
|
|
11
|
+
* It does not make a scope's vars *private*. Any code on the page can still read another
|
|
12
|
+
* scope by name, and nothing short of a separate realm would change that.
|
|
13
|
+
*/
|
|
14
|
+
export declare const setVars: (scope: string, vars: Vars) => void;
|
|
15
|
+
/**
|
|
16
|
+
* Reads a scope's vars, throwing rather than handing back an empty object — a package
|
|
17
|
+
* that silently renders with no configuration is the failure this replaced.
|
|
18
|
+
*
|
|
19
|
+
* Prefer `getVars()` from `@appshell/runtime/vars`, which supplies the scope for you.
|
|
20
|
+
*/
|
|
21
|
+
export declare const readVars: <TVars extends Vars = Vars>(scope: string) => TVars;
|
|
22
|
+
/** Whether a scope has been delivered, for callers that want to branch instead of catch. */
|
|
23
|
+
export declare const hasVars: (scope: string) => boolean;
|
|
24
|
+
/** Test seam. Not part of the contract a package should build on. */
|
|
25
|
+
export declare const resetVars: () => void;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A package's runtime configuration, already merged by the registry — a package's
|
|
3
|
+
* declared vars, then the application's `overrides.vars`.
|
|
4
|
+
*
|
|
5
|
+
* Structurally identical to `AppshellComposition['vars'][scope]` in `@appshell/config`,
|
|
6
|
+
* but declared here rather than imported. This package is a shared singleton loaded
|
|
7
|
+
* into every micro-frontend on the page, so it carries no dependencies at all.
|
|
8
|
+
*/
|
|
9
|
+
export type Vars = Record<string, string | number | undefined>;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What the browser is told about a remote.
|
|
3
|
+
*
|
|
4
|
+
* These live here rather than in `@appshell/config` because config is build tooling — it
|
|
5
|
+
* carries yaml, lodash and axios — and a package that only wants to type a remote should
|
|
6
|
+
* not install a compiler to get it. This package is already the one every micro-frontend
|
|
7
|
+
* on the page shares, and it has no dependencies of its own to pass on.
|
|
8
|
+
*
|
|
9
|
+
* `AppshellManifest` deliberately stays in `@appshell/config`. It is a build artifact, and
|
|
10
|
+
* its `modules` field is Module Federation plugin options — build-time webpack
|
|
11
|
+
* configuration the browser never sees and this package should never drag in.
|
|
12
|
+
*/
|
|
13
|
+
/** Arbitrary, application-defined description of a remote. Appshell never reads it. */
|
|
14
|
+
export type Metadata = Record<string, unknown>;
|
|
15
|
+
/**
|
|
16
|
+
* How a host loads a remote, named as one kind among possible kinds.
|
|
17
|
+
*
|
|
18
|
+
* scope, module and shareScope are Module Federation's vocabulary, and they used to sit
|
|
19
|
+
* at the top level of a remote where nothing said so — which is what would have made a
|
|
20
|
+
* second framework awkward, not the words themselves. Nested under a kind they are
|
|
21
|
+
* exactly correct, and something like single-spa slots beside them without reinterpreting
|
|
22
|
+
* anything already published.
|
|
23
|
+
*
|
|
24
|
+
* apiVersion follows the house style set by appshell.app.yaml, and the group is appshell's
|
|
25
|
+
* because appshell owns this schema: it decides which fields it stores, even though the
|
|
26
|
+
* fields describe federation concepts. If federation ever needs a different recipe that is
|
|
27
|
+
* a v2, and manifests published under v1 keep meaning what they meant — which matters,
|
|
28
|
+
* because they are immutable and hashed.
|
|
29
|
+
*/
|
|
30
|
+
export type ModuleFederationLoader = {
|
|
31
|
+
apiVersion: 'federation.appshell.org/v1';
|
|
32
|
+
kind: 'ModuleFederation';
|
|
33
|
+
scope: string;
|
|
34
|
+
module: string;
|
|
35
|
+
shareScope?: string;
|
|
36
|
+
/** The entry file the build emits, conventionally remoteEntry.js. */
|
|
37
|
+
filename: string;
|
|
38
|
+
/**
|
|
39
|
+
* What built this, recorded as a fact rather than a constraint.
|
|
40
|
+
*
|
|
41
|
+
* Deliberately not a version range. A range is a claim about the environment, and a
|
|
42
|
+
* package cannot make it: it knows what built it and not what will load it, and the
|
|
43
|
+
* host is what registers the remote. Freezing one into an immutable artifact is the
|
|
44
|
+
* same mistake as freezing its origin.
|
|
45
|
+
*/
|
|
46
|
+
builtWith?: string;
|
|
47
|
+
};
|
|
48
|
+
export type RemoteLoader = ModuleFederationLoader;
|
|
49
|
+
/** A remote the registry has already resolved, so the browser needs no manifest fetch. */
|
|
50
|
+
export type AppshellRemote<TMetadata = Metadata> = {
|
|
51
|
+
id: string;
|
|
52
|
+
manifestUrl: string;
|
|
53
|
+
remoteEntryUrl: string;
|
|
54
|
+
loader: RemoteLoader;
|
|
55
|
+
metadata: TMetadata;
|
|
56
|
+
};
|
|
57
|
+
/** Remote key to manifest url. */
|
|
58
|
+
export type AppshellIndex = Record<string, string>;
|
package/package.json
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@appshell/react",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.101",
|
|
4
4
|
"description": "React utilities for building micro-frontends with Appshell and Module Federation",
|
|
5
5
|
"main": "dist/main.js",
|
|
6
6
|
"types": "dist/types/react/src/index.d.ts",
|
|
7
|
-
"repository":
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/appshellhq/appshell.git"
|
|
10
|
+
},
|
|
8
11
|
"author": "Robert Hamilton <rh@navaris.com>",
|
|
9
12
|
"publishConfig": {
|
|
10
13
|
"access": "public",
|
|
@@ -15,8 +18,12 @@
|
|
|
15
18
|
"build:types": "tsc --emitDeclarationOnly",
|
|
16
19
|
"clean": "rm -rf dist",
|
|
17
20
|
"start": "webpack --watch --mode development --stats-error-details",
|
|
18
|
-
"stats": "webpack --json > stats.json"
|
|
21
|
+
"stats": "webpack --json > stats.json",
|
|
22
|
+
"typecheck": "tsc --noEmit"
|
|
19
23
|
},
|
|
24
|
+
"files": [
|
|
25
|
+
"dist"
|
|
26
|
+
],
|
|
20
27
|
"keywords": [
|
|
21
28
|
"module federation",
|
|
22
29
|
"micro-frontends",
|
|
@@ -27,5 +34,8 @@
|
|
|
27
34
|
"react": "^18.2.0",
|
|
28
35
|
"react-dom": "^18.2.0"
|
|
29
36
|
},
|
|
30
|
-
"gitHead": "
|
|
37
|
+
"gitHead": "7a0f5ce018f35276830999b97891ccaf2114ee1e",
|
|
38
|
+
"dependencies": {
|
|
39
|
+
"@appshell/runtime": "^1.0.0-alpha.101"
|
|
40
|
+
}
|
|
31
41
|
}
|
package/CHANGELOG.md
DELETED
|
@@ -1,207 +0,0 @@
|
|
|
1
|
-
# Change Log
|
|
2
|
-
|
|
3
|
-
All notable changes to this project will be documented in this file.
|
|
4
|
-
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
|
-
|
|
6
|
-
# [1.0.0-alpha.10](https://github.com/appshell-org/appshell/compare/v1.0.0-alpha.9...v1.0.0-alpha.10) (2026-08-19)
|
|
7
|
-
|
|
8
|
-
**Note:** Version bump only for package @appshell/react
|
|
9
|
-
|
|
10
|
-
# [1.0.0-alpha.8](https://github.com/appshell-org/appshell/compare/v1.0.0-alpha.7...v1.0.0-alpha.8) (2026-08-19)
|
|
11
|
-
|
|
12
|
-
**Note:** Version bump only for package @appshell/react
|
|
13
|
-
|
|
14
|
-
# [1.0.0-alpha.7](https://github.com/appshell-org/appshell/compare/v1.0.0-alpha.6...v1.0.0-alpha.7) (2026-08-18)
|
|
15
|
-
|
|
16
|
-
**Note:** Version bump only for package @appshell/react
|
|
17
|
-
|
|
18
|
-
**Note:** Version bump only for package @appshell/react
|
|
19
|
-
|
|
20
|
-
# [1.0.0-alpha.6](https://github.com/appshell-org/appshell/compare/v1.0.0-alpha.5...v1.0.0-alpha.6) (2026-08-18)
|
|
21
|
-
|
|
22
|
-
**Note:** Version bump only for package @appshell/react
|
|
23
|
-
|
|
24
|
-
# [1.0.0-alpha.5](https://github.com/appshell-org/appshell/compare/v1.0.0-alpha.4...v1.0.0-alpha.5) (2026-08-18)
|
|
25
|
-
|
|
26
|
-
**Note:** Version bump only for package @appshell/react
|
|
27
|
-
|
|
28
|
-
**Note:** Version bump only for package @appshell/react
|
|
29
|
-
|
|
30
|
-
# [1.0.0-alpha.4](https://github.com/appshell-org/appshell/compare/v1.0.0-alpha.3...v1.0.0-alpha.4) (2026-08-18)
|
|
31
|
-
|
|
32
|
-
**Note:** Version bump only for package @appshell/react
|
|
33
|
-
|
|
34
|
-
**Note:** Version bump only for package @appshell/react
|
|
35
|
-
|
|
36
|
-
# [1.0.0-alpha.3](https://github.com/appshell-org/appshell/compare/v1.0.0-alpha.2...v1.0.0-alpha.3) (2026-08-18)
|
|
37
|
-
|
|
38
|
-
**Note:** Version bump only for package @appshell/react
|
|
39
|
-
|
|
40
|
-
# 0.12.0-alpha.0 (2026-04-20)
|
|
41
|
-
|
|
42
|
-
### Bug Fixes
|
|
43
|
-
|
|
44
|
-
- appshell loader override check ([aedda4a](https://github.com/appshell-org/appshell/commit/aedda4abf81560297dce03df09fba68e8785242f))
|
|
45
|
-
- capture direct dependencies passed to FederatedComponent for re-render ([3621879](https://github.com/appshell-org/appshell/commit/36218793a5cb47f74bd8d1ce93deffdb1b85cd1c))
|
|
46
|
-
- rename @appshell/react-federated-component package to @appshell/react ([0b74498](https://github.com/appshell-org/appshell/commit/0b74498bf17ba73db4d936c8a012af1d3b111a28))
|
|
47
|
-
- update repository URLs from navaris/appshell to appshell-org/appshell ([506a90d](https://github.com/appshell-org/appshell/commit/506a90d94a6f6e10f463987d408550f48624bfd0))
|
|
48
|
-
|
|
49
|
-
### Features
|
|
50
|
-
|
|
51
|
-
- api key support ([9cdcbee](https://github.com/appshell-org/appshell/commit/9cdcbee36e44b8a179b49768d74a25767f1cc5f2))
|
|
52
|
-
- AppshellComponent impl ([2b82621](https://github.com/appshell-org/appshell/commit/2b82621c13302f790a8e1c457f9a82f39903fc1f))
|
|
53
|
-
- consolidate runtime artifacts ([#26](https://github.com/appshell-org/appshell/issues/26)) ([a29479a](https://github.com/appshell-org/appshell/commit/a29479a49f0c5ec1273c9f8e4c7384096f2d4ba0))
|
|
54
|
-
|
|
55
|
-
## [0.4.1-alpha.0](https://github.com/appshell-org/appshell/compare/@appshell/react@0.4.0...@appshell/react@0.4.1-alpha.0) (2026-04-20)
|
|
56
|
-
|
|
57
|
-
### Bug Fixes
|
|
58
|
-
|
|
59
|
-
- update repository URLs from navaris/appshell to appshell-org/appshell ([506a90d](https://github.com/appshell-org/appshell/commit/506a90d94a6f6e10f463987d408550f48624bfd0))
|
|
60
|
-
|
|
61
|
-
# [0.4.0](https://github.com/navaris/appshell/compare/@appshell/react@0.3.0...@appshell/react@0.4.0) (2024-09-24)
|
|
62
|
-
|
|
63
|
-
### Features
|
|
64
|
-
|
|
65
|
-
- api key support ([9cdcbee](https://github.com/navaris/appshell/commit/9cdcbee36e44b8a179b49768d74a25767f1cc5f2))
|
|
66
|
-
|
|
67
|
-
# [0.4.0-alpha.0](https://github.com/navaris/appshell/compare/@appshell/react@0.3.1-alpha.0...@appshell/react@0.4.0-alpha.0) (2024-09-05)
|
|
68
|
-
|
|
69
|
-
### Features
|
|
70
|
-
|
|
71
|
-
- api key support ([8c91e62](https://github.com/navaris/appshell/commit/8c91e6240b3d879af9bdd5949924865da0e0f8a1))
|
|
72
|
-
|
|
73
|
-
## [0.3.1-alpha.0](https://github.com/navaris/appshell/compare/@appshell/react@0.3.0...@appshell/react@0.3.1-alpha.0) (2024-08-31)
|
|
74
|
-
|
|
75
|
-
### Bug Fixes
|
|
76
|
-
|
|
77
|
-
- bump pipeline ([8bb63bc](https://github.com/navaris/appshell/commit/8bb63bcae1928c01bb6bc853d88010939e686af5))
|
|
78
|
-
|
|
79
|
-
# [0.3.0](https://github.com/navaris/appshell/compare/@appshell/react@0.2.2...@appshell/react@0.3.0) (2024-01-25)
|
|
80
|
-
|
|
81
|
-
### Features
|
|
82
|
-
|
|
83
|
-
- AppshellComponent impl ([2b82621](https://github.com/navaris/appshell/commit/2b82621c13302f790a8e1c457f9a82f39903fc1f))
|
|
84
|
-
|
|
85
|
-
## [0.2.2](https://github.com/navaris/appshell/compare/@appshell/react@0.2.1...@appshell/react@0.2.2) (2024-01-04)
|
|
86
|
-
|
|
87
|
-
### Bug Fixes
|
|
88
|
-
|
|
89
|
-
- capture direct dependencies passed to FederatedComponent for re-render ([3621879](https://github.com/navaris/appshell/commit/36218793a5cb47f74bd8d1ce93deffdb1b85cd1c))
|
|
90
|
-
|
|
91
|
-
## [0.2.1](https://github.com/navaris/appshell/compare/@appshell/react@0.2.0...@appshell/react@0.2.1) (2023-08-29)
|
|
92
|
-
|
|
93
|
-
### Bug Fixes
|
|
94
|
-
|
|
95
|
-
- appshell loader override check ([aedda4a](https://github.com/navaris/appshell/commit/aedda4abf81560297dce03df09fba68e8785242f))
|
|
96
|
-
|
|
97
|
-
# [0.2.0](https://github.com/navaris/appshell/compare/@appshell/react@0.2.0-alpha.0...@appshell/react@0.2.0) (2023-08-28)
|
|
98
|
-
|
|
99
|
-
**Note:** Version bump only for package @appshell/react
|
|
100
|
-
|
|
101
|
-
# [0.2.0-alpha.0](https://github.com/navaris/appshell/compare/@appshell/react@0.1.0...@appshell/react@0.2.0-alpha.0) (2023-08-23)
|
|
102
|
-
|
|
103
|
-
### Features
|
|
104
|
-
|
|
105
|
-
- consolidate runtime artifacts ([#26](https://github.com/navaris/appshell/issues/26)) ([a29479a](https://github.com/navaris/appshell/commit/a29479a49f0c5ec1273c9f8e4c7384096f2d4ba0))
|
|
106
|
-
|
|
107
|
-
# [0.1.0](https://github.com/navaris/appshell/compare/@appshell/react@0.1.0-alpha.6...@appshell/react@0.1.0) (2023-07-11)
|
|
108
|
-
|
|
109
|
-
**Note:** Version bump only for package @appshell/react
|
|
110
|
-
|
|
111
|
-
# 0.1.0-alpha.6 (2023-07-10)
|
|
112
|
-
|
|
113
|
-
### Bug Fixes
|
|
114
|
-
|
|
115
|
-
- rename @appshell/react-federated-component package to @appshell/react ([0b74498](https://github.com/navaris/appshell/commit/0b74498bf17ba73db4d936c8a012af1d3b111a28))
|
|
116
|
-
|
|
117
|
-
# [0.1.0-alpha.5](https://github.com/navaris/appshell/compare/@appshell/react-federated-component@0.1.0-alpha.4...@appshell/react-federated-component@0.1.0-alpha.5) (2023-07-10)
|
|
118
|
-
|
|
119
|
-
### Bug Fixes
|
|
120
|
-
|
|
121
|
-
- registry projection, enable env overwrite, refactor docker workflow, consolidate env names ([33a28fe](https://github.com/navaris/appshell/commit/33a28fe76b58e05c5b6b6b33d4b402e52bb29e70))
|
|
122
|
-
|
|
123
|
-
# [0.1.0-alpha.4](https://github.com/navaris/appshell/compare/@appshell/react-federated-component@0.1.0-alpha.3...@appshell/react-federated-component@0.1.0-alpha.4) (2023-07-06)
|
|
124
|
-
|
|
125
|
-
### Bug Fixes
|
|
126
|
-
|
|
127
|
-
- metadata urls ([efcce1c](https://github.com/navaris/appshell/commit/efcce1ce4cb1745afa83661cae1414a73f837483))
|
|
128
|
-
|
|
129
|
-
# [0.1.0-alpha.3](https://github.com/navaris/appshell/compare/@appshell/react-federated-component@0.1.0-alpha.2...@appshell/react-federated-component@0.1.0-alpha.3) (2023-07-06)
|
|
130
|
-
|
|
131
|
-
### Bug Fixes
|
|
132
|
-
|
|
133
|
-
- support metadata generation ([4df202f](https://github.com/navaris/appshell/commit/4df202f0fd3b9ca6c660975b75eb0ac9b60225c2))
|
|
134
|
-
|
|
135
|
-
# [0.1.0-alpha.2](https://github.com/navaris/appshell/compare/@appshell/react-federated-component@0.1.0-alpha.1...@appshell/react-federated-component@0.1.0-alpha.2) (2023-07-06)
|
|
136
|
-
|
|
137
|
-
### Bug Fixes
|
|
138
|
-
|
|
139
|
-
- lint ([a4861ab](https://github.com/navaris/appshell/commit/a4861abfe82d1e0ab815aaa62cdf7907229d0136))
|
|
140
|
-
|
|
141
|
-
### Features
|
|
142
|
-
|
|
143
|
-
- appshell start, cleanup dev workflow ([74fd2e5](https://github.com/navaris/appshell/commit/74fd2e5a5acd2415482268175c7f3f16cd7c93ec))
|
|
144
|
-
|
|
145
|
-
# [0.1.0-alpha.1](https://github.com/navaris/appshell/compare/@appshell/react-federated-component@0.0.3...@appshell/react-federated-component@0.1.0-alpha.1) (2023-07-05)
|
|
146
|
-
|
|
147
|
-
### Features
|
|
148
|
-
|
|
149
|
-
- foundation refactor wip ([339b930](https://github.com/navaris/appshell/commit/339b9306accaa9aba1712f3a0dee6c4cab7ed273))
|
|
150
|
-
|
|
151
|
-
# [0.1.0-alpha.0](https://github.com/navaris/appshell/compare/@appshell/react-federated-component@0.0.3...@appshell/react-federated-component@0.1.0-alpha.0) (2023-07-05)
|
|
152
|
-
|
|
153
|
-
### Features
|
|
154
|
-
|
|
155
|
-
- registry index ([8e6ee0a](https://github.com/navaris/appshell/commit/8e6ee0a6a377584efa2ee702168025f46108b8c5))
|
|
156
|
-
|
|
157
|
-
## [0.0.3](https://github.com/navaris/appshell/compare/@appshell/react-federated-component@0.0.3-alpha.2...@appshell/react-federated-component@0.0.3) (2023-06-29)
|
|
158
|
-
|
|
159
|
-
**Note:** Version bump only for package @appshell/react-federated-component
|
|
160
|
-
|
|
161
|
-
## [0.0.3-alpha.2](https://github.com/navaris/appshell/compare/@appshell/react-federated-component@0.0.2...@appshell/react-federated-component@0.0.3-alpha.2) (2023-06-29)
|
|
162
|
-
|
|
163
|
-
**Note:** Version bump only for package @appshell/react-federated-component
|
|
164
|
-
|
|
165
|
-
## [0.0.3-alpha.1](https://github.com/navaris/appshell/compare/@appshell/react-federated-component@0.0.3-alpha.0...@appshell/react-federated-component@0.0.3-alpha.1) (2023-06-29)
|
|
166
|
-
|
|
167
|
-
### Bug Fixes
|
|
168
|
-
|
|
169
|
-
- update npm package visibility ([1ef4119](https://github.com/navaris/appshell/commit/1ef411903dd038dfc781e8ce0700811e5460c903))
|
|
170
|
-
|
|
171
|
-
## [0.0.3-alpha.0](https://github.com/navaris/appshell/compare/@appshell/react-federated-component@0.0.2-alpha.1...@appshell/react-federated-component@0.0.3-alpha.0) (2023-06-29)
|
|
172
|
-
|
|
173
|
-
**Note:** Version bump only for package @appshell/react-federated-component
|
|
174
|
-
|
|
175
|
-
## [0.0.2](https://github.com/navaris/appshell/compare/@appshell/react-federated-component@0.0.2-alpha.1...@appshell/react-federated-component@0.0.2) (2023-06-29)
|
|
176
|
-
|
|
177
|
-
**Note:** Version bump only for package @appshell/react-federated-component
|
|
178
|
-
|
|
179
|
-
## [0.0.2-alpha.1](https://github.com/navaris/appshell/compare/@appshell/react-federated-component@0.0.2-alpha.0...@appshell/react-federated-component@0.0.2-alpha.1) (2023-06-24)
|
|
180
|
-
|
|
181
|
-
### Bug Fixes
|
|
182
|
-
|
|
183
|
-
- add useEffect dependencies for federated component ([616039e](https://github.com/navaris/appshell/commit/616039ebb3f46f34db0b82acfb6ee5438a6b4731))
|
|
184
|
-
|
|
185
|
-
## [0.0.2-alpha.0](https://github.com/navaris/appshell/compare/@appshell/react-federated-component@0.0.1...@appshell/react-federated-component@0.0.2-alpha.0) (2023-06-15)
|
|
186
|
-
|
|
187
|
-
### Bug Fixes
|
|
188
|
-
|
|
189
|
-
- hot module replacement support, example updates ([a67d230](https://github.com/navaris/appshell/commit/a67d2303b40f5911373225cc0b4ccf9b67c33d11))
|
|
190
|
-
|
|
191
|
-
## 0.0.1 (2023-06-15)
|
|
192
|
-
|
|
193
|
-
**Note:** Version bump only for package @appshell/react-federated-component
|
|
194
|
-
|
|
195
|
-
## [0.0.1-alpha.2](https://github.com/navaris/appshell/compare/@appshell/react-federated-component@0.0.1-alpha.1...@appshell/react-federated-component@0.0.1-alpha.2) (2023-06-15)
|
|
196
|
-
|
|
197
|
-
### Bug Fixes
|
|
198
|
-
|
|
199
|
-
- hot module replacement support, example updates ([a67d230](https://github.com/navaris/appshell/commit/a67d2303b40f5911373225cc0b4ccf9b67c33d11))
|
|
200
|
-
|
|
201
|
-
## [0.0.1-alpha.1](https://github.com/navaris/appshell/compare/@appshell/react-federated-component@0.0.1-alpha.0...@appshell/react-federated-component@0.0.1-alpha.1) (2023-03-19)
|
|
202
|
-
|
|
203
|
-
**Note:** Version bump only for package @appshell/react-federated-component
|
|
204
|
-
|
|
205
|
-
## 0.0.1-alpha.0 (2023-03-19)
|
|
206
|
-
|
|
207
|
-
**Note:** Version bump only for package @appshell/react-federated-component
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
/** @jest-environment jsdom */
|
|
2
|
-
import * as remoteLoader from '@appshell/loader';
|
|
3
|
-
import '@testing-library/jest-dom';
|
|
4
|
-
import { act, render, screen } from '@testing-library/react';
|
|
5
|
-
import React from 'react';
|
|
6
|
-
import AppshellComponent from '../src/components/AppshellComponent';
|
|
7
|
-
import * as useGlobalConfig from '../src/hooks/useGlobalConfig';
|
|
8
|
-
import manifest from './fixtures/Manifest';
|
|
9
|
-
import TestComponent from './fixtures/TestComponent';
|
|
10
|
-
import config from './fixtures/TestGlobalConfig';
|
|
11
|
-
|
|
12
|
-
jest.mock('../src/hooks/useGlobalConfig');
|
|
13
|
-
|
|
14
|
-
const TestFallback = () => <div>loading...</div>;
|
|
15
|
-
|
|
16
|
-
describe('AppshellComponent', () => {
|
|
17
|
-
it('should match snapshot', async () => {
|
|
18
|
-
jest.spyOn(useGlobalConfig, 'default').mockReturnValue(config);
|
|
19
|
-
jest.spyOn(remoteLoader, 'default').mockReturnValueOnce(async () => [TestComponent, manifest]);
|
|
20
|
-
|
|
21
|
-
const { container, findByText } = await act(() =>
|
|
22
|
-
render(<AppshellComponent remote="TestModule/TestComponent" />),
|
|
23
|
-
);
|
|
24
|
-
const view = await findByText(/test component/i);
|
|
25
|
-
|
|
26
|
-
expect(view).toBeInTheDocument();
|
|
27
|
-
expect(container).toMatchSnapshot();
|
|
28
|
-
});
|
|
29
|
-
|
|
30
|
-
it('should render fallback while resource is pending', async () => {
|
|
31
|
-
jest.spyOn(useGlobalConfig, 'default').mockReturnValue(config);
|
|
32
|
-
jest.spyOn(remoteLoader, 'default').mockReturnValueOnce(() => [null, null]);
|
|
33
|
-
|
|
34
|
-
await act(() =>
|
|
35
|
-
render(<AppshellComponent remote="TestModule/TestComponent" fallback={<TestFallback />} />),
|
|
36
|
-
);
|
|
37
|
-
|
|
38
|
-
expect(screen.getByText(/loading/i)).toBeInTheDocument();
|
|
39
|
-
});
|
|
40
|
-
|
|
41
|
-
it('should render error when resource fails', async () => {
|
|
42
|
-
jest.spyOn(useGlobalConfig, 'default').mockReturnValue(config);
|
|
43
|
-
jest
|
|
44
|
-
.spyOn(remoteLoader, 'default')
|
|
45
|
-
.mockImplementationOnce(() => new Error('Failed to get resource'));
|
|
46
|
-
|
|
47
|
-
await act(() =>
|
|
48
|
-
render(<AppshellComponent remote="TestModule/TestComponent" fallback={<TestFallback />} />),
|
|
49
|
-
);
|
|
50
|
-
|
|
51
|
-
expect(screen.getByText(/Error loading Appshell component/i)).toBeInTheDocument();
|
|
52
|
-
});
|
|
53
|
-
});
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/** @jest-environment jsdom */
|
|
2
|
-
import { render } from '@testing-library/react';
|
|
3
|
-
import React from 'react';
|
|
4
|
-
import LoadingError from '../src/components/LoadingError';
|
|
5
|
-
|
|
6
|
-
describe('LoadingError', () => {
|
|
7
|
-
it('should match snapshot', () => {
|
|
8
|
-
const view = render(
|
|
9
|
-
<LoadingError remote="TestModule/TestComponent" reason="Could not find component" />,
|
|
10
|
-
);
|
|
11
|
-
|
|
12
|
-
expect(view).toMatchSnapshot();
|
|
13
|
-
});
|
|
14
|
-
});
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
/** @jest-environment jsdom */
|
|
2
|
-
import '@testing-library/jest-dom';
|
|
3
|
-
import { render, screen } from '@testing-library/react';
|
|
4
|
-
import React from 'react';
|
|
5
|
-
import { ManifestProvider } from '../src/contexts/ManifestContext';
|
|
6
|
-
import useManifest from '../src/hooks/useManifest';
|
|
7
|
-
import manifest from './fixtures/Manifest';
|
|
8
|
-
import TestComponent from './fixtures/TestComponent';
|
|
9
|
-
|
|
10
|
-
const ComponentUsingManifest = () => {
|
|
11
|
-
const res = useManifest();
|
|
12
|
-
|
|
13
|
-
return <div>{JSON.stringify(res.remotes)}</div>;
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
describe('ManifestProvider', () => {
|
|
17
|
-
it('should render children', async () => {
|
|
18
|
-
render(
|
|
19
|
-
<ManifestProvider manifest={manifest}>
|
|
20
|
-
<TestComponent />
|
|
21
|
-
</ManifestProvider>,
|
|
22
|
-
);
|
|
23
|
-
|
|
24
|
-
await expect(screen.getByText(/test component/i)).toBeInTheDocument();
|
|
25
|
-
});
|
|
26
|
-
|
|
27
|
-
it('should make the manifest context available', async () => {
|
|
28
|
-
render(
|
|
29
|
-
<ManifestProvider manifest={manifest}>
|
|
30
|
-
<ComponentUsingManifest />
|
|
31
|
-
</ManifestProvider>,
|
|
32
|
-
);
|
|
33
|
-
|
|
34
|
-
await expect(screen.getByText(/TestModule\/TestComponent/i)).toBeInTheDocument();
|
|
35
|
-
});
|
|
36
|
-
|
|
37
|
-
it('should warn when a consumer reads the deprecated modules field', () => {
|
|
38
|
-
const warn = jest.spyOn(console, 'warn').mockImplementation(() => {});
|
|
39
|
-
const ComponentUsingModules = () => <div>{Object.keys(useManifest().modules).length}</div>;
|
|
40
|
-
|
|
41
|
-
render(
|
|
42
|
-
<ManifestProvider manifest={manifest}>
|
|
43
|
-
<ComponentUsingModules />
|
|
44
|
-
</ManifestProvider>,
|
|
45
|
-
);
|
|
46
|
-
|
|
47
|
-
expect(warn).toHaveBeenCalledWith(expect.stringMatching(/modules is deprecated/i));
|
|
48
|
-
warn.mockRestore();
|
|
49
|
-
});
|
|
50
|
-
});
|