Releases: SchweizerischeBundesbahnen/scion-microfrontend-platform
1.0.0-beta.20
1.0.0-beta.20 (2022-02-01)
Bug Fixes
- ensure the SciRouterOutlet to be instantiated after initialization of the platform (f1514bd)
Code Refactoring
- platform: consolidate API for configuring the platform (142ce8e), closes #39 #96
- platform: remove gateway iframe in client-broker communication (0a4b4b0), closes #14
BREAKING CHANGES
-
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.
Host App Migration
- 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)
Client App Migration
- 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)
The following snippets illustrate how a migration could look like:
Host App: Before migration
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'});
Host App: After migration
await MicrofrontendPlatform.startHost({ host: { symbolicName: 'host', manifest: '/manifest.json' }, applications: [ {symbolicName: 'app1', manifestUrl: 'http://app1/manifest.json'}, {symbolicName: 'app2', manifestUrl: 'http://app2/manifest.json'} ] });
Host App: After migration if inlining the host manifest
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'} ], });
Client App: Before migration
await MicrofrontendPlatform.connectToHost({symbolicName: 'shopping-cart-app'});
Client App: After migration
await MicrofrontendPlatform.connectToHost('shopping-cart-app');
1.0.0-beta.19
1.0.0-beta.19 (2021-11-05)
Bug Fixes
- platform: do not transport intents to other applications if not declaring a respective intention (24681e3)
1.0.0-beta.18
1.0.0-beta.18 (2021-09-10)
Bug Fixes
- platform: allow interceptors to reply to requests if no consumer is running (f22c947)
1.0.0-beta.17
1.0.0-beta.17 (2021-07-12)
Bug Fixes
- devtools: resolve dependent app also if declaring a wildcard intention (f321c5b)
Features
- 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
1.0.0-beta.15
1.0.0-beta.14
1.0.0-beta.14 (2021-04-22)
Features
1.0.0-beta.13
1.0.0-beta.13 (2021-04-12)
Bug Fixes
- platform: allow context key names containing forward slashes or starting with a colon (5637832), closes #49
- platform: remove ES2015 import cycles (5dfc7f6), closes #42
Features
BREAKING CHANGES
-
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 theContextService
.
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
1.0.0-beta.12 (2021-02-22)
Bug Fixes
- platform: allow preventing default action of registered keystrokes (8ae8595), closes #32
- platform: propagate topic subscription errors in context service (08bbaf7)
chore
Features
- platform: allow collecting values on contextual data lookup (2e87b51)
BREAKING CHANGES
-
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
1.0.0-beta.11 (2021-02-03)
Features
- 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)
BREAKING CHANGES
-
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