- Update Angular from 19.2.18 to 20.3.9 - Update Angular Material/CDK from 19.2.19 to 20.2.14 - Update TypeScript from 5.8.3 to 5.9.3 - Update @typescript-eslint from 6.21.0 to 8.18.2 - Update @angular-eslint from 19.8.1 to 20.0.0 - Update ng-packagr from 19.2.2 to 20.3.2 - Update @mat-datetimepicker/core from 15.0.2 to 16.0.1 (Angular 20 compatible) Angular Migrations Applied: - Convert templates to new control flow syntax (@if, @for, @switch) - Migrate DOCUMENT imports from @angular/common to @angular/core - Update Router.getCurrentNavigation() to currentNavigation signal - Replace deprecated InjectFlags enum usage - Replace TestBed.get with TestBed.inject Breaking Changes Fixed: - Remove deprecated Directionality.value setter (read-only in Angular 20) - Update ESLint config: replace @typescript-eslint/no-var-requires with no-require-imports - Remove @typescript-eslint/brace-style rule (deprecated in v8) Configuration: - Add .npmrc with legacy-peer-deps for CI/CD compatibility - Update ESLint rules for @typescript-eslint v8 compatibility BREAKING CHANGE: Requires Angular 20+ and @mat-datetimepicker/core@16.0.1 Note: Nx build system currently has plugin worker issues. TypeScript compilation verified successfully. Full builds and tests pending Nx worker resolution. See MIGRATION_SUMMARY.md for complete details. Co-authored-by: Cursor <cursoragent@cursor.com>
@alfresco/adf-core/feature-flags
Secondary entry point of @alfresco/adf-core. It can be used by importing from @alfresco/adf-core/feature-flags.
Feature flags (aka feature toggles) are a concept that allow product owners to control the availability of a feature in a particular environment. A product manager may use feature flags to hide a feature that isn't complete yet, roll out a feature to a select set of end-users in order to gather feedback, or coordinate a feature "go live" with marketing and other departments. From a developer perspective, feature flags are an important tool that allows them to continually commit their code even if a feature is not complete, thus a proper feature flag capability is essential to a functional continuous delivery model.
Because this library system is BE/Framework agnostic, it's required to implement the service that manages the retrieval of FeatureFlags and provide it to the AppModule:
@NgModule({
declarations: [AppComponent],
providers: [
{ provide: OverridableFeaturesServiceToken, useClass: <YourCustomFeaturesService> },
{ provide: FeaturesServiceToken, useExisting: OverridableFeaturesServiceToken },
{ provide: FeaturesServiceConfigToken, useValue: <CustomConfiguration> }
],
bootstrap: [AppComponent],
})
export class AppModule {}
<YourCustomFeaturesService> is a service that implements the IFeaturesService interface:
interface IFeaturesService<T = FlagChangeset> {
init(): Observable<T>;
isOn$(key: string): Observable<boolean>;
isOff$(key: string): Observable<boolean>;
getFlags$(): Observable<T>;
}
A FlagChangeset is an Object in which keys are Feature Flag names, and values are the current and previous enabled status for that particular flag. The previous status can be null.
interface FlagChangeset {
[key: string]: {
current: boolean;
previous: boolean | null;
};
}
Optionally, is possible to provide a <CustomConfiguration>
{
storageKey?: string;
helperExposeKeyOnDocument?: string;
}
storageKey: Local Storage key to save feature flags (default: 'feature-flags')
helperExposeKeyOnDocument: browser document key to add commands to enable or disable feature flags from the browser console.
Furher reading: https://hyland.atlassian.net/wiki/spaces/HXP/pages/1308017277/Studio+Management+of+Feature+Flags https://hyland.atlassian.net/wiki/spaces/HXP/pages/1308031390/Developing+frontend+apps+libs+e2es+with+feature+flags