SCION Microfrontend Platform | Projects Overview | Changelog | Contributing | Sponsoring |
---|
1.3.1 (2024-10-29)
- devtools: move DevTools to
*.scion.vercel.app
subdomain (3897efe)
-
devtools: The URL of the SCION Microfrontend Platform DevTools has changed.
The URL of previous releases has not changed. The current version (
1.3.1
) is available at the previous and new URL. New releases will be available only at the new URL.To migrate, load the DevTools from https://microfrontend-platform-devtools.scion.vercel.app (latest) or http://microfrontend-platform-devtools-vx-y-z.scion.vercel.app (versioned). Previously, DevTools were available at https://scion-microfrontend-platform-devtools.vercel.app and https://scion-microfrontend-platform-devtools-vx-y-x.vercel.app.
1.3.0 (2024-06-04)
- platform: provide method to get a specific application (c917433)
1.2.2 (2023-11-10)
- platform: support navigating to blob URL (5bbb1e0)
1.2.1 (2023-11-02)
- platform/client: show splash if instructed by the navigator, but only if not navigating to the same capability, if any (a91286d)
1.2.0 (2023-10-31)
- platform/client: change return type of
MicrofrontendPlatformClient#signalReady
to void (2ebd65d) - platform/router-outlet: ensure transparent router-outlet if empty (0c44137), closes /github.com/w3c/csswg-drafts/issues/4772#issuecomment-591553929
- devtools: display warning if not opened as microfrontend (6b0facf)
- devtools: do not set background color to inherit it from the embedding context (7f36dfa)
- platform/client: enable microfrontend to display a splash until loaded (f44087f)
- devtools: display splash while loading (11f0a53)
- devtools: migrate to new theme of @scion/components (88f4ce5)
1.1.0 (2023-07-21)
- platform/client: add missing method overload to
ContextService#lookup
(29d4e09)
- platform: allow associating arbitrary metadata with platform-specific capabilities (6eca043)
- platform: provide API to check if application is qualified for capability (2204eff)
1.0.0 (2023-05-15)
-
platform: dropping deprecated API and backward compatibility introduced a breaking change for host and client applications.
To migrate:
- Update host and clients to version
1.0.0-rc.13
or higher. - Deprecated property
ManifestService.lookupApplications$
has been removed; useManifestService.applications
instead. - Deprecated property
Capability.requiredParams
has been removed; declare required parameters viaCapability.params
instead and mark it as required. - Deprecated property
Capability.optionalParams
has been removed; declare optional parameters viaCapability.params
instead and mark it as non-required.
- Update host and clients to version
1.0.0-rc.13 (2023-03-10)
1.0.0-rc.12 (2022-12-21)
- platform/client: do not provide
HttpClient
in client as only used in the host (e47ed8b) - platform/client: remove startup progress monitor from client (755422e)
- platform/host: remove
ManifestObject
from public API since internal (36f0dd8)
-
platform: reducing the bundle size in client applications introduced a breaking change for host and client applications. The communication protocol between host and client has not changed, i.e., host and clients can be updated independently to the new version.
To enable tree-shaking of the SCION Microfrontend Platform, the platform was split into three separate entry points. This reduced the raw size of the library in a client application by more than 50%, from 120 KB to 40 KB.
Platform Entry Points:
MicrofrontendPlatformHost
to configure and start the platform in the host application;MicrofrontendPlatformClient
to connect to the platform from a microfrontend;MicrofrontendPlatform
to react to platform lifecycle events and stop the platform;
To migrate the host application:
- start the platform via
MicrofrontendPlatformHost.start
instead ofMicrofrontendPlatform.startHost
- monitor startup progress via
MicrofrontendPlatformHost.startupProgress$
instead ofMicrofrontendPlatform.startupProgress$
To migrate the client application:
- connect to the host via
MicrofrontendPlatformClient.connect
method instead ofMicrofrontendPlatform.connectToHost
- test if connected to the host via
MicrofrontendPlatformClient.isConnected
method instead ofMicrofrontendPlatform.isConnectedToHost
-
platform/client: removing client startup progress introduced a breaking change in the client.
To reduce the size of the client bundle, the API for monitoring the startup progress in the client has been removed. This API is useful in the host, but not in the client, because the client only connects to the host and does not perform any long-running operation. There is no replacement.
-
platform/host: removing
ManifestObject
from public API introduced a breaking change.The
ManifestObject
interface is the internal representation of capabilities and intensions in the platform host. It was never intended to be public API.To migrate:
- In the unlikely event that you use this interface, replace it with the following union type:
Capability | Intention
.
- In the unlikely event that you use this interface, replace it with the following union type:
1.0.0-rc.11 (2022-12-06)
- platform/host: add secondary origin to allowed origins (61cddc0), closes #197
- platform/host: validate params of intent before passing it to interceptors (1f5f5e5)
- platform/host: assert topic not to contain empty segments (f8c47e3)
- platform/client: stop platform in
beforeunload
to avoid posting messages to disposed window (3969c17), closes #168 - platform: do not break clients not supporting the ping liveness protocol (6d4eb78), closes #178
- platform: do not unregister clients after resuming the computer from hibernation (a210d4b), closes #178
- platform/client: provide API for microfrontend to monitor focus (e5dc6c2)
- platform/host: support for intercepting messages after platform-internal interceptors (bbfac42)
- platform: drop support for wildcard capability qualifiers and optional wildcard intention qualifiers (9713cf0), closes #163
- platform/client: provide hook to decorate observable emissions (4e0e9b4)
-
platform/host: Property for configuring a secondary origin has been renamed from
messageOrigin
tosecondaryOrigin
. This breaking change only refers to the host.To migrate, configure the additional allowed origin via the
secondaryOrigin
property instead ofmessageOrigin
, as following:await MicrofrontendPlatform.startHost({ applications: [ {symbolicName: 'client', manifestUrl: 'https://app/manifest.json', secondaryOrigin: 'https://secondary'}, ], });
-
platform/host: The host now performs liveness probes to detect and remove stale clients, instead of relying on the heartbeats emitted by the clients of previous versions.
The breaking change only refers to the host. The communication protocol between host and client has NOT changed. You can independently update host and clients to the new version.
To migrate setting of a custom probe configuration in the host, specify the
liveness
instead ofheartbeatInterval
property, as follows:MicrofrontendPlatform.startHost({ liveness: {interval: 60, timeout: 10}, // omitted rest of the config });
-
platform: Optimization of mouse event dispatching introduced a breaking change for Angular applications.
IMPORTANT: For Angular applications, we strongly recommend replacing zone-specific decorators for
MessageClient
andIntentClient
with anObservableDecorator
. Otherwise, you may experience performance degradation due to frequent change detection cycles.It turned out that Angular zone synchronization with decorators for
MessageClient
andIntentClient
is not sufficient and that observables should emit in the same Angular zone in which the subscription was performed. Using the newObservableDecorator
API, Angular zone synchronization can now be performed in a single place for all observables exposed by the SCION Microfrontend Platform.To migrate:
- Remove decorators for
MessageClient
andIntentClient
including their registration in the bean manager (e.g.,NgZoneMessageClientDecorator
andNgZoneIntentClientDecorator
). - Provide a
NgZoneObservableDecorator
and register it in the bean manager before starting the platform. Note to register it as a bean, not as a decorator.
For a complete example and detailed instructions, see https://scion-microfrontend-platform-developer-guide.vercel.app/#chapter:angular-integration-guide:synchronizing-rxjs-observables-with-angular-zone.
/** * Mirrors the source, but ensures subscription and emission {@link NgZone} to be identical. */ export class NgZoneObservableDecorator implements ObservableDecorator { constructor(private zone: NgZone) { } public decorate$<T>(source$: Observable<T>): Observable<T> { return new Observable<T>(observer => { const insideAngular = NgZone.isInAngularZone(); const subscription = source$ .pipe( subscribeInside(fn => this.zone.runOutsideAngular(fn)), observeInside(fn => insideAngular ? this.zone.run(fn) : this.zone.runOutsideAngular(fn)), ) .subscribe(observer); return () => subscription.unsubscribe(); }); } }
const zone: NgZone = ...; // Register decorator Beans.register(ObservableDecorator, {useValue: new NgZoneObservableDecorator(zone)}); // Connect to the host from a micro app zone.runOutsideAngular(() => MicrofrontendPlatform.connectToHost(...)); // Start platform host in host app zone.runOutsideAngular(() => MicrofrontendPlatform.startHost(...));
- Remove decorators for
-
platform: dropping support for wildcard capability qualifiers and optional wildcard intention qualifiers introduced a breaking change in the Intention API.
To migrate:
- Replace asterisk (
*
) wildcard capability qualifier entries with required params. - Replace optional (
?
) wildcard capability qualifier entries with optional params. - If using
QualifierMatcher
to match qualifiers, construct it without flags. The matcher now always evaluates asterisk wildcards in the pattern passed in the constructor.
Capability in Manifest of App 1
{ "name": "App 1", "capabilities": [ { "type": "microfrontend", "qualifier": { "entity": "person", "id": "*", "readonly": "?" }, "private": false, "properties": { "path": "person/:id?readonly=:readonly" } } ] }
Intention in Manifest of App 2
{ "name": "App 2", "intentions": [ { "type": "microfrontend", "qualifier": { "entity": "person", "id": "*", "readonly": "?" } } ] }
Sending Intent in App 2
const intent: Intent = { type: 'microfrontend', qualifier: { entity: 'person', id: '123', readonly: true } }; Beans.get(IntentClient).publish(intent);
Capability in Manifest of App 1
{ "name": "App 1", "capabilities": [ { "type": "microfrontend", "qualifier": { "entity": "person" }, "params": [ { "name": "id", "required": true }, { "name": "readonly", "required": false } ], "private": false, "properties": { "path": "person/:id?readonly=:readonly" } } ] }
Intention in Manifest of App 2
{ "name": "App 2", "intentions": [ { "type": "microfrontend", "qualifier": { "entity": "person" } } ] }
Sending Intent in App 2
const intent: Intent = { type: 'microfrontend', qualifier: { entity: 'person' }, params: new Map().set('id', '123').set('readonly', true) }; Beans.get(IntentClient).publish(intent);
- Replace asterisk (
1.0.0-rc.10 (2022-11-08)
- platform/messaging: receive latest retained message per topic in wildcard subscription (b578317)
- devtools: activate selected tab in application details even after quick navigation (b9e1cff)
- platform: use unique identifier for capability and intention ID (e2957ba), closes #162 #171
- platform/messaging: support sending retained intents (08afb72), closes #142
- platform/messaging: support sending retained requests to a topic (1098f8f)
- devtools: allow filtering capabilities by id (fff5dd7)
- devtools: remove logical operator for capability filters where not useful (3909ba3)
- devtools: render logical operators (OR/AND) in capability filters as toggle button (3130e88)
-
platform/messaging: The
IntentClient
now uses the sameoptions
object as theMessageClient
to control how to send a message or request. The content of theoptions
object has not changed, only its name, i.e., migration is only required if assigning it to a typed variable or decorating theIntentClient
.Note that the communication protocol between host and client has NOT changed, i.e., host and clients can be migrated independently.
To migrate:
- options for sending an intent was changed from
IntentOptions
toPublishOptions
(IntentClient#publish
) - options for requesting data was changed from
IntentOptions
toRequestOptions
(IntentClient#request
)
- options for sending an intent was changed from
-
platform: Using unique identifier for capability and intention ID introduced a breaking change.
Previously, the IDs used for capabilities and intentions were stable but not unique, which caused problems when deregistering capabilities and intentions. If your application requires stable capability identifiers, you can register a capability interceptor, as follows:
import {Capability, CapabilityInterceptor} from '@scion/microfrontend-platform'; import {Crypto} from '@scion/toolkit/crypto'; import {Beans} from '@scion/toolkit/bean-manager'; Beans.register(CapabilityInterceptor, { useValue: new class implements CapabilityInterceptor { public async intercept(capability: Capability): Promise<Capability> { const stableId = await Crypto.digest(JSON.stringify({ type: capability.type, qualifier: capability.qualifier, application: capability.metadata!.appSymbolicName, })); return { ...capability, metadata: {...capability.metadata!, id: stableId}, }; } }, multi: true })
Note that the communication protocol between host and client has NOT changed. You can independently upgrade host and clients to the new version.
1.0.0-rc.9 (2022-11-02)
- platform/devtools: display platform version per application in DevTools (1c8d69c)
- platform: allow intercepting capabilities before their registration (ba423af)
- platform/messaging: index topic subscriptions for faster resolution (e8c2178)
- platform/messaging: subscribe for replies when posting the request in request-response communication (cb23da3)
- platform/messaging: track the number of subscriptions based on subscription change events (8b3c877)
1.0.0-rc.8 (2022-10-27)
- platform/router-outlet: set name of the iframe to the name of the outlet (1aa566d)
1.0.0-rc.7 (2022-10-07)
- platform/router-outlet: size outlet to the reported initial size of embedded content (49f036d)
- platform/router: do not patch URL if protocol is "blob" (064f1f3)
- platform: mirror Observable if replying with an Observable in message or intent callback (d0b8e27), closes #164
- platform: report message rejection of asynchronous interceptors back to the sender (1517366), closes #147
- platform/client: resend connect request only if loaded into the topmost window (ba4e9a2)
-
platform: Fixing message rejection reporting of interceptors introduced a breaking change in the Interceptor API.
This breaking change only refers to the host. The communication protocol between host and client HAS NOT CHANGED. Host and clients can be updated independently to the new version.
In order to report asynchronous message rejection correctly, the Interceptor API has been changed from synchronous to asynchronous message interception. To migrate, change the return type of your interceptors from
void
toPromise<void>
and change the implementation accordingly.class MessageLoggerInterceptor implements MessageInterceptor { public intercept(message: TopicMessage, next: Handler<TopicMessage>): void { console.log(message); // Passes the message along the interceptor chain. next.handle(message); } }
class MessageLoggerInterceptor implements MessageInterceptor { public intercept(message: TopicMessage, next: Handler<TopicMessage>): Promise<void> { console.log(message); // Passes the message along the interceptor chain. return next.handle(message); } }
1.0.0-rc.6 (2022-06-04)
- platform/config: use the application's symbolic name as application name if not configured (2058d99)
- platform/router: do not discard supposedly identical navigations (5adba59)
- platform/router: route the primary outlet if in the context of an activator and if not specified a target outlet (e99ee13)
- platform/devtools: facilitate integration in a router outlet or workbench view using intent-based navigation (bcc0718), closes #45
- platform/router: facilitate intent-based navigation (052dd4c), closes #154
- platform/router: remove matrix and query parameters not passed for substitution (b424647), closes #155
1.0.0-rc.5 (2022-05-18)
- platform: migrate to the framework-agnostic package
@scion/toolkit
(2b53137)
-
platform: Migrating to the framework-agnostic package
@scion/toolkit
introduced a breaking change.Previously, framework-agnostic and Angular-specific tools were published in the same NPM package
@scion/toolkit
, which often led to confusion and prevented framework-agnostic tools from having a release cycle independent of the Angular project. Therefore, Angular-specific tools have been moved to the NPM package@scion/components
. Framework-agnostic tools continue to be released under@scion/toolkit
, but now starting with version1.0.0
instead of pre-release versions.The breaking change only refers to updating
@scion/toolkit
to version1.0.0
. API and communication protocol have not changed or are backward compatible. Host and clients can be updated independently to the new version.To migrate:
- Install the NPM package
@scion/toolkit
in version1.0.0
using the following command:npm install @scion/toolkit@latest --save
. Note that the toolkit was previously released as pre-releases of version13.0.0
or older. - For further instructions on how to migrate Angular-specific tools that have been moved to
@scion/components
, refer to https://github.com/SchweizerischeBundesbahnen/scion-toolkit/blob/master/docs/site/changelog-components/changelog.md#migration-of-angular-specific-components-and-directives.
- Install the NPM package
1.0.0-rc.4 (2022-05-02)
- platform: discard intent parameter if set to
undefined
(873541d), closes #146 - platform: remove
semver
dependency to avoid bundle optimization bailouts (bf44720), closes #141
1.0.0-rc.3 (2022-04-01)
- devtools: allow integrating devtools into the browser window (af142e9)
- platform: connect to the host periodically when starting the platform (788a444)
- platform: allow configuring the message origin for an application (c8a5bf3)
1.0.0-rc.2 (2022-03-18)
- platform: migrate @scion/microfrontend-platform to RxJS 7.5 (c194c5a), closes /github.com/angular/angular/blob/master/CHANGELOG.md#1312-2022-01-12 #108
-
platform: Upgrading @scion/microfrontend-platform to RxJS 7.x introduced a breaking change.
The breaking change only refers to updating RxJS to version 7.5. API and communication protocol have not changed or are backward compatible. Host and clients can be updated independently to the new version.
To migrate, upgrade your application to RxJS 7.5; for detailed migration instructions, refer to https://rxjs.dev/6-to-7-change-summary.
1.0.0-rc.1 (2022-03-15)
- platform: allow publishing messages during platform shutdown (0cc9e2d), closes #83
- platform: comply with the API of
MessageClient
andIntentClient
regarding termination of its Observables (9bbc4a5) - platform: detect and remove stale client registrations (1b21bad)
- platform: detect the version of @scion/microfrontend-platform an application has installed (c891223)
1.0.0-beta.20 (2022-02-01)
- ensure the SciRouterOutlet to be instantiated after initialization of the platform (f1514bd)
- platform: consolidate API for configuring the platform (142ce8e), closes #39 #96
- platform: remove gateway iframe in client-broker communication (0a4b4b0), closes #14
-
platform: Removing the gateway communication iframe introduced a breaking change in the host/client communication protocol.
You need to upgrade the version of SCION Microfrontend Platform in host and client applications at the same time. The breaking change refers only to the communication protocol, the API of the SCION Microfrontend Platform has not changed.
To migrate, upgrade to the newest version of
@scion/microfrontend-platform
in the host and client applications. -
platform: Consolidation of the API for configuring the platform host introduced a breaking change. The communication protocol between host and client is not affected by this change.
- API for loading the platform config via a config loader has been removed; to migrate, load the config before starting the platform;
- API for passing an app list to
MicrofrontendPlatform.startHost
has been removed; to migrate, register applications viaMicrofrontendPlatformConfig
object, as follows:MicrofrontendPlatformConfig.applications
; - manual registration of the host application has been removed as now done implicitly; to migrate:
- remove host app from the app list;
- configure host privileges via
HostConfig
object, as follows:MicrofrontendPlatformConfig.host.scopeCheckDisabled
MicrofrontendPlatformConfig.host.intentionCheckDisabled
MicrofrontendPlatformConfig.host.intentionRegisterApiDisabled
- specify message delivery timeout in
MicrofrontendPlatformConfig.host.messageDeliveryTimeout
; - provide the host's manifest, if any, via
MicrofrontendPlatformConfig.host.manifest
, either as object literal or as URL; - specify the host's symbolic name in
MicrofrontendPlatformConfig.host.symbolicName
; if not specified, defaults tohost
;
- the Activator API can now be disabled by setting the flag
MicrofrontendPlatformConfig.activatorApiDisabled
instead ofPlatformConfig.platformFlags.activatorApiDisabled
; - the interface
ApplicationManifest
has been renamed toManifest
; - the bean
MicroApplicationConfig
has been removed; you can now obtain the application's symbolic name as following:Beans.get<string>(APP_IDENTITY)
- the micro application must now pass its identity (symbolic name) directly as the first argument, rather than via the options object;
- the options object passed to
MicrofrontendPlatform.connectToHost
has been renamed fromMicroApplicationConfig
toConnectOptions
and messaging options are now top-level options; to migrate:- set the flag
MicrofrontendPlatformConnectOptions.connect
instead ofMicroApplicationConfig.messaging.enabled
to control if to connect to the platform host; - specify 'broker discovery timeout' in
MicrofrontendPlatformConnectOptions.brokerDiscoverTimeout
instead ofMicroApplicationConfig.messaging.brokerDiscoverTimeout
; - specify 'message delivery timeout' in
MicrofrontendPlatformConnectOptions.messageDeliveryTimeout
instead ofMicroApplicationConfig.messaging.deliveryTimeout
;
- set the flag
- the bean
MicroApplicationConfig
has been removed; you can now obtain the application's symbolic name as following:Beans.get<string>(APP_IDENTITY)
const applications: ApplicationConfig[] = [ {symbolicName: 'host', manifestUrl: '/manifest.json'}, // optional {symbolicName: 'app1', manifestUrl: 'http://app1/manifest.json'}, {symbolicName: 'app2', manifestUrl: 'http://app2/manifest.json'}, ]; await MicrofrontendPlatform.startHost(applications, {symbolicName: 'host'});
await MicrofrontendPlatform.startHost({ host: { symbolicName: 'host', manifest: '/manifest.json' }, applications: [ {symbolicName: 'app1', manifestUrl: 'http://app1/manifest.json'}, {symbolicName: 'app2', manifestUrl: 'http://app2/manifest.json'} ] });
await MicrofrontendPlatform.startHost({ host: { symbolicName: 'host', manifest: { name: 'Host Application', capabilities: [ // capabilities of the host application ], intentions: [ // intentions of the host application ] } }, applications: [ {symbolicName: 'app1', manifestUrl: 'http://app1/manifest.json'}, {symbolicName: 'app2', manifestUrl: 'http://app2/manifest.json'} ], });
await MicrofrontendPlatform.connectToHost({symbolicName: 'shopping-cart-app'});
await MicrofrontendPlatform.connectToHost('shopping-cart-app');
1.0.0-beta.19 (2021-11-05)
- platform: do not transport intents to other applications if not declaring a respective intention (24681e3)
1.0.0-beta.18 (2021-09-10)
- platform: allow interceptors to reply to requests if no consumer is running (f22c947)
1.0.0-beta.17 (2021-07-12)
- devtools: resolve dependent app also if declaring a wildcard intention (f321c5b)
- devtools: activate a dependency's counterpart tab when navigating to the dependent application (10dda73)
- devtools: allow for quick filtering of capabilities (85abd52)
- devtools: use larger initial width for the main display area (f96e826)
- platform: allow associating metadata with a capability param (05952bc), closes #77
1.0.0-beta.16 (2021-07-02)
1.0.0-beta.15 (2021-05-20)
- platform: allow setting a timeout for loading manifests and activators (fe26507), closes #6
- platform: report platform startup progress (0e9300d), closes #18
1.0.0-beta.14 (2021-04-22)
1.0.0-beta.13 (2021-04-12)
- platform: allow context key names containing forward slashes or starting with a colon (5637832), closes #49
- platform: remove ES2015 import cycles (5dfc7f6), closes #42
-
platform: Allowing context key names containing forward slashes or starting with a colon introduced a breaking change in the host/client communication protocol.
The messaging protocol between host and client HAS CHANGED for context value lookup using the
ContextService
. Therefore, you must update the host and affected clients to the new version together. The API has not changed; the breaking change only applies to the@scion/microfrontend-platform
version.To migrate:
- Upgrade host and clients (which use the
ContextService
) to@scion/[email protected]
.
- Upgrade host and clients (which use the
-
platform: Adding wildcard support for unregistering capabilities and intentions introduced a breaking change.
To migrate:
- upgrade host and client apps to use
@scion/[email protected]
- When searching for capabilities with a qualifier filter that contains scalar qualifier values, only capabilities with exactly those values are now returned. This is different from previous versions where a qualifier filter like
{entity: 'person', id: '5'}
matched capabilities with exactly that qualifier, as well as capabilities containing a wildcard (*
or?
) in the qualifier, such as{entity: 'person', id: '*'}
or{entity: 'person', id: '?'}
. To keep the old lookup behavior, do not pass a qualifier filter and filter the capabilities yourself, e.g. by using theQualifierMatcher
, as follows:Beans.get(ManifestService).lookupCapabilities$({type: 'view'}) .pipe(filterArray(capability => new QualifierMatcher(capability.qualifier, {evalOptional: true, evalAsterisk: true}).matches({entity: 'person', id: '5'})))
- upgrade host and client apps to use
1.0.0-beta.12 (2021-02-22)
- platform: allow preventing default action of registered keystrokes (8ae8595), closes #32
- platform: propagate topic subscription errors in context service (08bbaf7)
- platform: allow collecting values on contextual data lookup (2e87b51)
-
URLs of applications deployed on Vercel now end with
*.vercel.app
instead of*.now.sh
To migrate:
- If using the
SCION Microfrontend Platform DevTools
, load them from https://scion-microfrontend-platform-devtools.vercel.app or from the versioned URL https://scion-microfrontend-platform-devtools-v1-0-0-beta-12.vercel.app. - The Developer Guide is now available under https://scion-microfrontend-platform-developer-guide.vercel.app
- The TypeDoc is now available under https://scion-microfrontend-platform-api.vercel.app
See https://vercel.com/changelog/urls-are-becoming-consistent for more information.
- If using the
1.0.0-beta.11 (2021-02-03)
- platform: add convenience API to reduce code required to respond to requests (d0eeaf5), closes #43
- platform: allow to specify a generic when registering a capability to increase type safety (4af9433), closes #60
- platform: let the message/intent replier control the lifecycle of the requestor’s Observable (77a4dd9)
-
platform: Adding the convenience API for responding to requests introduced the following breaking change for Angular projects.
Note: The messaging protocol between the host and client HAS NOT CHANGED. Thus, you can upgrade the host and clients to the new version independently.
To migrate:
-
If an Angular project, add the method
onMessage
to yourNgZone
message client decorator, as following:public onMessage<IN = any, OUT = any>(topic: string, callback: (message: TopicMessage<IN>) => Observable<OUT> | Promise<OUT> | OUT | void): Subscription { return messageClient.onMessage(topic, callback); }
See https://scion-microfrontend-platform-developer-guide-v1-0-0-rc-10.vercel.app/#chapter:angular-integration-guide:preparing-messaging-for-use-with-angular for more information.
-
If an Angular project, add the method
onIntent
to yourNgZone
intent client decorator, as following:public onIntent<IN = any, OUT = any>(selector: IntentSelector, callback: (intentMessage: IntentMessage<IN>) => Observable<OUT> | Promise<OUT> | OUT | void): Subscription { return intentClient.onIntent(selector, callback); }
See https://scion-microfrontend-platform-developer-guide-v1-0-0-rc-10.vercel.app/#chapter:angular-integration-guide:preparing-messaging-for-use-with-angular for more information.
-
-
platform: Enabling the message/intent replier to control the requestor’s Observable lifecycle introduced a breaking change in the host/client communication protocol.
Note: The messaging protocol between host and client HAS CHANGED for registering/unregistering capabilities/intentions using the
ManifestService
. Therefore, you must update the host and affected clients to the new version together. The API has not changed; the breaking change only applies to the@scion/microfrontend-platform
version.To migrate:
- Upgrade host and clients (which use the
ManifestService
) to@scion/[email protected]
. - Remove the
throwOnErrorStatus
SCION RxJS operator when usingIntentClient#request$
orMessageClient#request$
as already installed by the platform.
- Upgrade host and clients (which use the
1.0.0-beta.10 (2021-01-25)
1.0.0-beta.9 (2021-01-18)
- devtools: perform scope check when computing dependencies between micro applications (5e43bc3)
- platform: resolve host startup promise only once applications and properties are available (f4067c2)
- platform: allow monitoring
sci-router-outlet
whether embedded content has gained or lost focus (14fb178) - platform: allow passing params in an intent (b82b343), closes #44
- platform: open shadow DOM of the router outlet (cb10c32)
1.0.0-beta.8 (2020-12-18)
- platform: allow empty path as url for outlet navigation (8a0a70b)
- platform: ensure trailing slash in application base URLs (62a7a92)
- platform: make platform startup more robust (0d30b72), closes #40 #41
- devtools: add devtools micro application (19db8bf), closes #4
- platform: provide a static list of installed applications in the manifest service (b60015f)
- platform: The
HostPlatformState
bean has been removed as no longer necessary, because activator microfrontends are now installed after completing host platform startup, and because the startup Promise waits until connected to the host.
To migrate: Instead of listening for the host platform to enter the 'started' state, wait for the startup Promise to resolve. Note: You can independently upgrade host and clients to the new version because the platform was not using the platform status at all.
1.0.0-beta.7 (2020-11-05)
- platform: The bean manager was moved from
@scion/microfrontend-platform
to@scion/toolkit
NPM module.
Note: The messaging protocol between host and client HAS NOT CHANGED. You can therefore independently upgrade host and clients to the new version.
To migrate:
- Update
@scion/toolkit
to version10.0.0-beta.3
. - Import following symbols from
@scion/toolkit/bean-manager
instead of from@scion/microfrontend-platform
:BeanManager
,Beans
,Initializer
,InitializerFn
,BeanDecorator
,PreDestroy
,BeanInstanceConstructInstructions
,Type
,AbstractType
. - Replace
InstanceConstructInstructions
withBeanInstanceConstructInstructions
. - Use static methods of the
MicrofrontendPlatform
class to interact with states of the platform lifecycle (formerly viaPlatformState
bean), e.g., to wait for the platform to enter a specific state. In this change, we changed the beanPlatformState
to anenum
to represent platform states (formerlyPlatformStates
). Migrate as follows:- Beans.get(PlatformState).whenState -> MicrofrontendPlatform.whenState, e.g.,
Beans.get(PlatformState).whenState(PlatformStates.Starting) -> MicrofrontendPlatform.whenState(PlatformStates.Starting)
- Beans.get(PlatformState).state -> MicrofrontendPlatform.state
- Beans.get(PlatformState).state$ -> MicrofrontendPlatform.state$
- Beans.get(PlatformState).whenState -> MicrofrontendPlatform.whenState, e.g.,
- Replace occurrences of
PlatformStates
withPlatformState
. - Control bean destruction order by setting its
destroyOrder
in the options object when registering the bean (formerly by setting the destroy phase). Beans with a lower destroy order are destroyed before beans with a higher destroy order. Beans of the same destroy order are destroyed in reverse construction order. By default, the destroy order is 0. - Registering a bean now returns a handle to unregister the bean (formerly
void
). If registering a bean inside avoid
expression, register it inside a void operator, as follows:void (Beans.register(Bean))
1.0.0-beta.6 (2020-09-30)
- platform: allow registering beans under a symbol (98bf890), closes #28
- platform: separate message and intent communication APIs (7610eb0)
- platform: Use
MessageClient
for topic-based messaging, andIntentClient
for intent-based messaging
Note: The messaging protocol between host and client HAS NOT CHANGED. You can therefore independently upgrade host and clients to the new version.
Moved or renamed the following methods:
- MessageClient#onMessage$ -> MessageClient.observe$
- MessageClient#issueIntent -> IntentClient.publish
- MessageClient#requestByIntent$ -> IntentClient.request$
- MessageClient#onIntent$ -> IntentClient.observe$
- MessageClient#isConnected -> MicrofrontendPlatform.isConnectedToHost
Renamed options object of the following methods:
- MessageClient#request$: MessageOptions -> RequestOptions
- IntentClient#publish: MessageOptions -> IntentOptions
- IntentClient#request$: MessageOptions -> IntentOptions
For Angular developers, see Preparing the MessageClient and IntentClient for use with Angular how to decorate the MessageClient
and IntentClient
for making Observables to emit inside the Angular zone.
Messaging can now be deactivated via options object when starting the platform. Previously you had to register a NullMessageClient
bean.
MicrofrontendPlatform.connectToHost({messaging: {enabled: false}}
1.0.0-beta.5 (2020-07-17)
- esm5 and fesm5 format is no longer distributed in
@scion/microfrontend-platform
’s NPM package
We no longer include the distributions for esm5
and fesm5
in the @scion/microfrontend-platform
’s NPM package. Only the formats for esm2015
, fesm2015
, and UMD are distributed. Consequently, the module field in package.json now points to the fesm2015
distribution.
To migrate:
- If requiring
esm5
orfesm5
, you will need to downlevel to ES5 yourself. If using Angular, the Angular CLI will automatically downlevel the code to ES5 if differential loading is enabled in the Angular project, so no action is required from Angular CLI users.
1.0.0-beta.4 (2020-07-14)
- testapp: do not render the application shell in activator microfrontends (2180257)