README
Changelog
All notable changes to this project will be documented in this file.
This project adheres to Semantic Versioning.
Upgrading to the latest version
If you project is generated from schematics v2.0.0 onward, you can always update to the latest version of schematics by running:
npm run update
If this migration process fails for some reason, you will need to follow all the manual steps outlined below to update your project to the latest schematic.
[6.0.5] - 2021-01-19
Fixed
- Reworked logic of universal-ang restricted imports to maintain not only
pattern, but also the other kind likepaths. [NVCTS-779]
[6.0.4] - 2021-01-17
Fixed
- Fixed
updateEslintOverridesRulesto be more precise in replacement logic, and added selector for overrides on both*.tsand*.html[NVCTS-779]
[6.0.3] - 2021-01-14
Fixed
- Fixed restricted imports from universal-ang script [NVCTS-779]
[6.0.2] - 2021-12-21
Added
- EsLint helper to update override rules [NVCTS-712]
- Restrict imports from universal-ang. [NVCTS-712]
[6.0.1] - 2021-11-11
Added
- Fix publish build in jenkins and force new version.
[6.0.0] - 2021-11-11
Added
- Update to angular 12 (WF-141).
[5.4.3] - 2021-10-14
Fixed
- bundle correctly handle named imports (WF-478).
[5.4.2] - 2021-10-06
Fixed
- Fix bundle module resolver to break when an exception happens (WF-470).
[5.4.1] - 2021-09-14
Fixed
- Fix bundle module resolver to support
default imports(MAINT-12820).
[5.4.0] - 2021-09-15
Added
- project: update default registry URL
- project: update to Angular 11.2.x
- project: update to
@ngrx/store@~11.0.0 - project: update to
@ngrx/effects@~11.0.0 - widget: update peer dependencies to Angular 11.2.x
- data-module: update peer dependencies to Angular 11.2.x
[5.3.3] - 2021-08-11
Fixed
- Fix migration to override
karma.conf.jsfile.
[5.3.2] - 2021-07-30
Fixed
- Fix
karma.conf.jsto handle a single configuration file (WF-416).
[5.3.1] - 2021-07-30
Fixed
- Fix
tsconfig.jsonto handle paths only from public_api (WF-400).
[5.3.0] - 2021-07-27
Added
- app: add default
animationintegration.
[5.2.1] - 2021-07-23
Added
- project: update to latest
@bb-cli/bb-ang
[5.2.0] - 2021-07-15
Added
- project: update to latest
@bb-cli/bb-ang
[5.1.2] - 2021-06-30
Fixed
- Fixed generating a new component doesn’t create a separate template file (MAINT-10880)
[5.1.1] - 2021-06-01
Fixed
- Fixed theme generation when the registry is repo.backbase.com (caused by JFrog migration) (MAINT-12074)
[5.1.0] - 2020-04-01
Added
- Add
--inline-templateoption towidgetschematic (WF-78)
[5.0.1] - 2020-02-16
Fixed
Add an "main" entry point to the package configuration (MAINT-11389)
Since the release of Angular 11.1.3,
ng updatefails to load the@bb-cli/schematicsmigrations because it doesn't recognize it as a valid package. Even if the project isn't using Angular 11, the newest version of the CLI is automatically installed to perform the update (unless theNG_DISABLE_VERSION_CHECK=1environment variable is set).
[5.0.0] - 2020-01-28
Changed
- Upgrade to Angular 11 based project (SDK-2359)
[4.11.0] - 2020-01-08
Added
- update tslint configration with the latest one from angular cli (SDK-2363)
Upgrading Manually
This migrates upddates your tslint config with latest best practice.
to apply this changes apply the following steps:
Update project tslint.json to include the following configration
inside rules remove the following rules:
- 'use-input-property-decorator'
- 'use-output-property-decorator'
- 'use-host-property-decorator'
- 'use-life-cycle-interface'
and add the following rules:
+ "component-class-suffix": true,
+ "contextual-lifecycle": true,
+ "directive-class-suffix": true,
+ "no-conflicting-lifecycle": true,
+ "no-host-metadata-property": true,
+ "no-input-rename": true,
+ "no-inputs-metadata-property": true,
+ "no-output-native": true,
+ "no-output-on-prefix": true,
+ "no-output-rename": true,
+ "no-outputs-metadata-property": true,
+ "template-banana-in-box": true,
+ "template-no-negated-async": true,
+ "use-lifecycle-interface": true,
+ "use-pipe-transform-interface": true
[4.10.0] - 2020-12-28
Added
- migration schematics to make sure projects is updated with the correct angular version and configrations changes (SDK-2351)
Upgrading Manually
This migrates add the missing changes for angular 10 upgrade.
to apply this changes apply the following steps:
Update project tsconfig.json to include the following configration
inside compilerOptions add:
+ "forceConsistentCasingInFileNames": true,
+ "noImplicitReturns": true,
+ "noFallthroughCasesInSwitch": true,
+ "downlevelIteration": true,
inside angularCompilerOptions add:
+ "strictTemplates": true,
update each application update tsconfig.app.json module to ES2020 instead of esNext
Update each protractor.conf.js inside e2e applications
- chromeOptions: { args: [ '--headless', '--disable-gpu', '--window-size=800,600' ] }
- jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
+ jasmine.getEnv().addReporter(new SpecReporter({
+ spec: {
+ displayStacktrace: StacktraceOption.PRETTY
+ }
+ }));
Make sure that you are using angular version (10.1.0) for example
- "@angular/core": "10.2.2",
+ "@angular/core": "~10.1.0",
[4.9.0] - 2020-12-16
Added
- data-module: remove test and lint architect for data modules as they not needed and effecting code coverage for projects (SDK-2286)
[4.8.1] - 2020-11-12
Fixed
- data-module: fix mocks for lazy loaded data module (SDK-2348)
[4.8.0] - 2020-11-12
Added
- project,library,widget: move to api-extractor from bb-ang.
Upgrading Manually
This migrates from the bb-ang extract-api and bb-ang check-api wrappers to using the api-extractor tool directly.
to apply this changes apply the following steps:
update each public library package.json to include the following scripts
...
"scripts": {
"api:check": "../../node_modules/.bin/api-extractor run -c ./api-extractor.json",
"api:extract": "npm run api:check -- --local"
},
...
Add api-extractor.json config file to each lib
Add an api-extractor.json file under each library folder. The content of the file should look like this.
Replace LIBRARY_NAME with the correct path name for the library.
{
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
"extends": "../../api-extractor.json",
"mainEntryPointFilePath": "../../dist/libs/LIBRARY_NAME/public_api.d.ts",
"projectFolder": "."
}
Update project package.json to include check and extract scripts for each lib
{
...
"scripts": {
"api:check": "npm run api:check:example-widget && npm run api:check:example-data-http",
"api:check:example-data-http": "cd libs/example-data-http && npm run api:check",
"api:check:example-widget": "cd libs/example-widget && npm run api:check",
"api:extract": "npm run api:extract:example-widget && npm run api:extract:example-data-http",
"api:extract:example-data-http": "cd libs/example-data-http && npm run api:extract",
"api:extract:example-widget": "cd libs/example-widget && npm run api:extract",
...
}
...
}
Add an api-extractor.json to the project root
{
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
"bundledPackages": [],
"compiler": {
"overrideTsconfig": {
"extends": "../../tsconfig.json",
"compilerOptions": {
"typeRoots": [
"./node_modules/@types"
]
}
}
},
"apiReport": {
"enabled": true,
"reportFolder": "<projectFolder>",
"reportTempFolder": "dist"
},
"docModel": {
"enabled": false
},
"dtsRollup": {
"enabled": false
},
"tsdocMetadata": {
"enabled": false
},
"messages": {
"compilerMessageReporting": {
"default": {
"logLevel": "warning"
}
},
"extractorMessageReporting": {
"default": {
"logLevel": "warning",
"addToApiReportFile": true
},
"ae-missing-release-tag": {
"logLevel": "none",
"addToApiReportFile": false
},
"ae-forgotten-export": {
"logLevel": "warning",
"addToApiReportFile": true
},
"ae-incompatible-release-tags": {
"logLevel": "none",
"addToApiReportFile": false
},
"ae-internal-missing-underscore": {
"logLevel": "none",
"addToApiReportFile": false
},
"ae-unresolved-inheritdoc-reference": {
"logLevel": "none",
"addToApiReportFile": false
},
"ae-unresolved-inheritdoc-base": {
"logLevel": "none",
"addToApiReportFile": false
},
"ae-missing-getter": {
"logLevel": "warning",
"addToApiReportFile": true
},
"ae-setter-with-docs": {
"logLevel": "none",
"addToApiReportFile": false
}
},
"tsdocMessageReporting": {
"default": {
"logLevel": "none"
}
}
}
}
[4.7.1] - 2020-11-10
Fixed
- bundle: local model bundle strategy does not work as angular cli is not allowing to pass array of strings so now modelFile is comma seprated string (SDK-2347).
[4.7.0] - 2020-10-29
Added
- project: Update bb-ang to latest version. Now if
angular.jsoncontains ai18nproject option then build with a singleng buildcommand, instead of building each locale separately using the deprecated--i18n-fileoptions.
This allows you to use more of the standard i18n configuration.
Fixed
- theme: Restrict
node-sassversion to^4.0.0to matchpeerDependenciesofsass-loader.
[4.6.0] - 2020-10-27
Added
- library,widget: Add tslib as dependency to libraries (SDK-2268)
Upgrading Manually
Please update libs and widgets package.json files to include tslib version ^2.0.0 as dependancy
So your file should look like this:
{
...
"dependencies": {
...
"tslib": "^2.0.0"
}
...
}
[4.5.0] - 2020-10-22
Added
- library,widget: update libs tslint.json files to include no-implicit-dependencies rule (SDK-2212)
Upgrading Manually
Please update libs tslint.json files to include no-implicit-dependencies rule
So your file should look like this:
{
...
"rules": {
...,
"no-implicit-dependencies": {
"severity": "warning",
"options": true
}
...
},
...
"linterOptions": {"exclude": ["test.ts"]}
}
[4.4.2] - 2020-10-14
Fixed
- app: fix app schematics fails if user set style to something diffrent from css (MAINT-10646)
[4.4.1] - 2020-10-07
Fixed
- data-module: mark params in http methods as optional if all params is optional (MAINT-10610)
[4.4.0] - 2020-09-23
Added
- bundle: allow bundle tool to read the model from local file (SDK-2157)
[4.3.0] - 2020-09-21
Added
- project: update to Angular 10.1.x
- project: update to
@bb-cli/bb-ang@4.3.0 - project: update to
rxjs@~6.6.2
Fixed
- application: update
@angular/localizefor patch releases only (to align with the other@angular/*packages)
Upgrading Manually
Ensure dependencies are up to date
Update Angular dependencies using ng update. This will allow these packages to
perform any migrations that they deem necessary.
ng update @angular/cli@10.1.0 @angular/core@10.1.0 --force
Set @angular/localize version to ~10.1.0 and rxjs version to ~6.6.2:
Update peer dependency versions in all public libs
The peerDependencies of all libs in a project should be aligned with the package versions actually installed in the project. This means that development and tests can be performed against compatible versions of the target dependencies.
Any peerDependencies in package.json files inside libs packages should be updated to be compatible with the following versions:
@angular/animations: 10.1.0,
@angular/common: 10.1.0,
@angular/compiler: 10.1.0,
@angular/core: 10.1.0,
@angular/forms: 10.1.0,
@angular/platform-browser: 10.1.0,
@angular/platform-browser-dynamic: 10.1.0,
@angular/router: 10.1.0,
@ngrx/effects: 10.0.0,
@ngrx/store: 10.0.0,
rxjs: 6.6.2
Note: This does not mean that the version must be locked - the semver range should reflect the most liberal version(s) the library supports.
[4.2.1] - 2020-09-14
Fixed
- project: use supported module from angular 10 (SDK-2295)
Upgrading Manually
Please update "module" in tsconfig.spec.json to "ES2020"
So your file should look like this:
{
...
"compilerOptions": {
...,
"module": "ES2020"
},
...
}
[4.2.0] - 2020-09-10
Fixed
- Allow typescript version 4
Added
- project: update to latest
@bb-cli/bb-ang
Upgrading Manually
Update to @bb-cli/bb-ang@~4.2.2:
npm install @bb-cli/bb-ang@~4.2.2 --save-dev
[4.1.0] - 2020-09-09
Added
- project: Add support for CX5.9
[4.0.6] - 2020-09-08
Fixed
- project: ngrx version updated to version 10
- data-module, widget: ngrx peerDependecy version set to
^10.0.0
[4.0.5] - 2020-09-04
Fixed
- Fix bug with migration from 2.17.0
[4.0.4] - 2020-08-27
Fixed
- Fix migration to 3.0.0 to split ui-ang from foundation.
[4.0.3] - 2020-08-31
Fixed
- Bundling adds extra BackbaseCoreModule (SDK-2275)
[4.0.2] - 2020-08-07
Fixed
- Allow migration to
@bb-cli/schematics@3.2.xto succeed without pre-installing ngrx (SDK-2258)
[4.0.1] - 2020-08-07
Fixed
- Add
@angular/localizeas a dependency for apps
Upgrading Manually
Add @angular/localize dependency
As of Angular 9 there is a new localization package that must be included to support translations. Install the package:
ng add @angular/localize
Initialize @angular/localize
The functionality is initialized by importing it in the polyfills.ts files:
import '@angular/localize/init';
[4.0.0] - 2020-08-05
Note: running npm run update won't automatically update to this major version. To update to the new major version run:
npm run ng -- update "@bb-cli/schematics@^4.0.0"
Changed
- Update to latest LTS angular 10
- Update the output libs with angular 10
Fixed
- Don't add
ngrxaspeerDependenciesof widgets and libraries by default.
Upgrading Manually
Ensure dependencies are up to date
Update all important dependencies using ng update. This will allow any these packages to
perform any migrations that they deem necessary.
ng update @angular/cli@10 @angular/core@10 @bb-cli/bb-ang@4
Modify the "update" script in package.json
Change the update script from version ^3 to ^4 for @bb-cli/schematics:
"scripts": {
"update": "ng update @bb-cli/schematics@^4",
}
Make sure the version of @bb-cli/bb-ang is ~4.0.0
$ npm install --save-dev @bb-cli/bb-ang@~4.0.0
Remove ngPackage "languageLevel" configuration from all package.json files
Previously the supported language level for ngPackager was configured using the "ngPackage.lib" key in the package.json. This information is now part of the Typescript configuration and must be removed from the package.json of any libs in the project.
Update peer dependency versions in all public libs
The peerDependencies of all libs in a project should be aligned with the package versions actually installed in the project. This means that development and tests can be performed against compatible versions of the target dependencies.
Any peerDependencies in package.json files inside libs packages should be updated to be compatible with the following versions:
@angular/animations: 10.0.0,
@angular/common: 10.0.0,
@angular/compiler: 10.0.0,
@angular/core: 10.0.0,
@angular/forms: 10.0.0,
@angular/platform-browser: 10.0.0,
@angular/platform-browser-dynamic: 10.0.0,
@angular/router: 10.0.0,
@backbase/foundation-ang: 6.0.0,
@ngrx/effects: 10.0.0-beta.0,
@ngrx/store: 10.0.0-beta.0,
core-js: 2.6.5,
rxjs: 6.5.5,
zone.js: 0.10.3
Note: This does not mean that the version must be locked - the semver range should reflect the most liberal version(s) the library supports.
Update engines to support newer npm and node
The engines specification in the project package.json should be updated to reflect the currently supported node and npm versions:
"engines": {
"node": "^10.13.0 || ^12.16.1",
"npm": "^6.11.0"
}
[3.2.3] - 2020-08-27
Fixed
- Fix migration to 3.0.0 to split ui-ang from foundation.
[3.2.2] - 2020-08-14
Fixed
- Allow migration to
@bb-cli/schematics@3.2.xto succeed without pre-installing ngrx (SDK-2258)
[3.2.1] - 2020-08-03
- project: Lock ngrx to 8.1.0 to be compatible with foundation-ang.
- project: Add missing dependency:
tslib@1.9.0. - project: Remove redundant packages:
@angular-devkit/schematics,@schematics/angularandtsickle
Upgrading Manually
Fix the dependencies in the project's package:
npm install --save-exact @ngrx/store@8.1.0 @ngrx/effects@8.1.0
npm install --save-dev tslib@^1.9.0
npm uninstall @angular-devkit/schematics @schematics/angular tsickle
[3.2.0] - 2020-07-02
- project: add
@ngrx/storeand@ngrx/effectsmodules by default - library,widget: add
@ngrx/storeand@ngrx/effectsas peerDependencies by default
[3.1.0] - 2020-07-02
Added
- project: update to latest
@bb-cli/bb-angwhich have the following effect- update
package:libsscript to remove some properties from built libs which might exposes internal information, it will automatically remove any property starting with underscore or the property name one of the followingauthor,publishConfig,rights
- update
Upgrading Manually
Update to @bb-cli/bb-ang@~3.14.0:
npm install @bb-cli/bb-ang@~3.14.0 --save-dev
[3.0.1] - 2020-07-01
Fixed
- Improve migration updates so that a failed migration doesn't abort all previous migrations.
[3.0.0] - 2020-06-26
Note: running npm run update won't automatically update to this major version. To update to the new major version run:
npm run ng -- update "@bb-cli/schematics@^3.0.0"
Changed
- project: Update to the latest
@backbase/foundation-ang@5.x - project: Split ui-ang imports to separate package
@backbase/ui-ang.
Added
- Update
updatescript to latest version of schematics.
Upgrading Manually
Change the "update" script in "package.json"
Change the update script to:
{
...
scripts: {
...
"update": "ng update @bb-cli/schematics@^3"
}
}
2. Install @backbase/ui-ang
Install @backbase/ui-ang version 4.152.0 as a dependency using the following command:
npm install --save @backbase/ui-ang@4.152.0 @ng-select/ng-select@^2.19.0 @angular/cdk@8.0.0 bignumber.js@^9.0.0
3. Import directly from '@backbase/ui-ang'
All import from the @backbase/foundation-ang/ui entry point should be changed to import directly from @backbase/ui-ang.
For example, an import declaration such as this:
import { AccountCardModule } from '@backbase/foundation-ang/ui'
should become:
import { AccountCardModule } from '@backbase/ui-ang'
[2.19.6] - 2020-08-27
Fixed
- Fix migration to 2.17.0. ui-ang split can't happen until upgrading to foundation v5.
[2.19.5] - 2020-08-12
Fixed
- Fix resolving content modules during
bundlegenerate.
[2.19.4] - 2020-07-01
Fixed
- Improve migration updates so that a failed migration doesn't abort all previous migrations.
[2.19.3] - 2020-06-29
Fixed
- Fixed migration to 2.17.0.
[2.19.2] - 2020-06-24
Fixed
- Correct the instructions to continue automatic migration (SDK-2179)
[2.19.1] - 2020-06-24
Added
- Improved migration failure message to include instructions to continue automatic migration (SDK-2179)
[2.19.0] - 2020-06-10
Added
- project: update to latest
@bb-cli/bb-angwhich have the following effect- Ability to have structured content added to the provisioning package automatically (SDK-2047)
Upgrading Manually
Update to @bb-cli/bb-ang@~3.13.1:
npm install @bb-cli/bb-ang@~3.13.1 --save-dev
[2.18.0] - 2020-06-04
Added
- theme Support generation of Theme-v2 (ATOM-712)
Fixed
- theme Add Theme dependencies and theme in package while generating Theme (ATOM-712)
- theme Add theme to the angular.json after generating (ATOM-712)
- project: Use latest theme-v1 when no themeVersion is specified (until theme-v2 schematics are released)
[2.17.3] - 2020-05-19
Fixed
- data-module: Module specific configuration should be optional (SDK-2158)
[2.17.2] - 2020-05-15
Fixed
- project: Fix versions of foundation-ang.
Manual Process
Upgrade '@backbase/foundation-ang'
Make sure the version of @backbase/foundation-ang is 4.34.0:
npm install --save @backbase/foundation-ang@4.34.0
[2.17.1] - 2020-05-13
Fixed
- library,widget: calling widget schematics using
externalSchematicsthrows (MAINT-9660)
[2.17.0] - 2020-05-11
Changed
- project: Take ui-ang out of foundation-ang (SDK-2081)
[2.16.3] - 2020-05-04
Fixed
- Fixed changelog
[2.16.2] - 2020-05-04
Fixed
- project: Ensure
HttpClientModuleis included in the app module - data-module: Remove import of
HttpClientModulefromdata-moduleschematic (MAINT-9551) - data-module: Ensure http params are correctly encoded. This fix is technically a breaking
change, so you need to opt-in by enabling the feature flag:
EXTRA_ENCODE_URI_PARAMS(fixes SDK-2132). This is fixing a known bug in angular.
Note: This fix won't automatically be available in @backbase/data-ang. Please review the release notes
from @backbase/data-ang to see when the DBS data modules are regenerated to receive this fix.
- project: Ensure the latest
@backbase/foundation-angis used.
Upgrading Manually
Note: Your project's version of @backbase/foundation-ang will not be upgraded automatically with npm run update.
To update to the minimum version of @backbase/foundation-ang for this fix, use 4.33.0:
npm install @backbase/foundation-ang@4.33.0
As always, consult your other dependencies peerDependencies for required versions of @backbase/foundation-ang.
Make sure the version of @bb-cli/bb-ang is 3.11.4
For that install it as a dev dependency using the following command:
$ npm install --save-dev @bb-cli/bb-ang@3.11.4
Ensure HttpClientModule is included in the app module
As the data modules can no longer provide the HttpClientModule it must be
imported by the app module.
[2.16.1] - 2020-04-08
Fixed
- project: passing the
--configurationoption topackage:appsscript does not work (MAINT-9449) create-provisioning-packagecommand is moved topostpackage:appsscript.
Upgrading Manually
Existing projects will only be updated if the package:apps script is defined as expected and postpackage:apps script does not exist.
In that case, the following changes will be made:
package:appsscript inpackage.jsonupdated to:
{
...
scripts: {
...
"package:apps": "bb-ang build-apps --output-hashing --build-memory=4096"
}
}
- New
postpackage:appsscript added to thepackage.json:
{
...
scripts: {
...
"postpackage:apps": "bb-ang create-provisioning-package"
}
}
If you have custom scripts and want to pass custom build parameters to the package:apps script, move bb-ang create-provisioning-package command to the postpackage:apps script.
[2.16.0] - 2020-04-02
Added
- project: Added JSON5 support to parsing of
angular.json(allows trailing commas, comments).
Fixed
- project: Respect
vendorChunkoption inangular.json. - project: extend-container flag to respect name in
model.xml(MAINT-9341)
Upgrading Manually
Update to @bb-cli/bb-ang@~3.11.0:
npm install @bb-cli/bb-ang@~3.11.0
[2.15.1] - 2020-04-01
Fixed
- widget: Respect the
--specoption (SDK-2088)
[2.15.0] - 2020-03-25
Change
- project, library : Project no longer has a default scope. The scope which is provided by any other schematic added to the tsconfig.json. The first ever provided scope is added to the project package.json as "backbase.defaultScope" (SDK-1995)
[2.14.0] - 2020-03-19
Added
- Update node and npm to LTS version (SDK-1985)
[2.13.0] - 2020-03-16
Added
- project: update to latest
@bb-cli/bb-angwhich have the following effect- No longer package widgets and containers that aren't part of the application.
- Allow arbitrary items to be added to the provision packages (via the new --cx-items option of bb-ang create-provision-package).
Upgrading Manually
This won't be enabled automatically. It's technically a breaking change as it will cause items to be removed from the bundle which would have otherwise been included.
To enable this new functionality update @bb-cli/bb-ang to latest version and update npm run package:apps command in your package.json with "bb-ang build-apps --output-hashing --build-memory=4096 && bb-ang create-provisioning-package"
[2.12.1] - 2020-02-18
Fixed
- data-module, library, widget: Generate ECMAScript Module name according to the Backbase guidelines (SDK-2030)
[2.12.0] - 2020-01-28
Added
- application: Set module to
esNextin apps typescript config to make them compatible with auto generated lazy loading definitions. - bundle: Automatically generate bundle configuration for an app to enable lazy loading. Two bundling strategies are available:
- per SPA, which will create a single bundle for every SPA in the portal.
- per route, which will create bundles based on routing tree in portal model. This strategy accepts additional
depthparameter which defines the level from which all items needs to be places in the same bundle.
Warning: Bundling process cannot be reverted. Module imports will be extracted from AppModule and placed into bundle modules and LazyConfig will be passed to BackbaseCoreModule. This will change your app.module.ts file.
Upgrading Manually
Update tsconfig.app.json
Please set the module in compilerOptions of your apps tsconfig.app.json to esNext:
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"outDir": "../../out-tsc/app",
"types": [],
"module": "esNext"
},
"include": ["src/**/*.ts"],
"exclude": ["src/test.ts", "src/**/*.spec.ts"]
}
[2.12.0-beta.2] - 2020-01-15
Warning: This is a beta version to get testing and early feedback for bundling automation. The API is not yet finalised, so it may break in future versions, and likely contains bugs.
Added
- bundle: Per route bundling strategy (SDK-1899)
[2.12.0-beta.1] - 2019-11-28
Warning: This is a beta version to get testing and early feedback for bundling automation. The API is not yet finalised, so it may break in future versions, and likely contains bugs.
Fixed
- bundle: Every item should be included in only one bundle (SDK-1943)
[2.12.0-beta.0] - 2019-11-25
Warning: This is a beta version to get testing and early feedback for bundling automation. The API is not yet finalised, so it may break in future versions, and likely contains bugs.
Added
- bundle: Automatically generate bundle configuration for an app to enable lazy loading. The first version only supports a single bundling strategy which will create a single bundle for everything in your app.
[2.11.3] - 2020-01-16
Fixed
- If backbase-schematics does not have a specific generator use generator from angular-schematics (SDK-1996)
[2.11.2] - 2019-12-16
Fixed
- Warn if project has outdated bb-ang version that does not support Backbase builder (SDK-1964)
[2.11.1] - 2019-12-06
Fixed
- Lazy loading chunks are not loaded from the right location (MAINT-8596)
Upgrading Manually
1. Add the new configuration to the "angular.json"
{
...
"projects": {
"example-app": {
...
"architect": {
...
"build": {
builder: '@bb-cli/bb-ang:browser'
...
...
2. Upgrade the "bb-ang" dev dependency
Install it as a dev dependency using the following command:
$ npm i --save-dev @bb-cli/bb-ang@~3.8.0
[2.11.0] - 2019-11-22
Fixed
- Prevent "null" mocks from being generated for
application/jsonendpoints (MAINT-8543)
[2.10.2] - 2019-11-15
Fixed
- Fixed auto-migrations for 2.10.1 update.
[2.10.1] - 2019-11-15
Fixed
- Ensure
updatescript always updates to latest version of schematics. - Run missing migration to use exact version of schematics to allow property project migrations.
Important: If you generated your project on version @bb-cli/schematics@2.10.0 then your npm run update process will be broken. Please follow the manual steps below to ensure future upgrades.
Upgrading Manually
1. Change the "update" script in "package.json"
Change the update script to:
{
...
scripts: {
...
"update": "ng update @bb-cli/schematics@^2"
}
}
2. Use exact version of @bb-cli/schematics
Remove the semver caret ^ from the @bb-cli/schematics devDependency. After the update it should be:
{
...
devDependencies: {
...
"@bb-cli/schematics": "2.10.1"
}
}
[2.10.0] - 2019-11-06
Added
- project: Ability to skip installing package dependencies after generation of the new project.
This can be done by adding
--skipInstallflag to the generate project command.
Fixed
- Project schematics installs exact version of schematics to allow proper project migration (SDK-1913)
[2.9.1] - 2019-11-05
Fixed
- Use virtual file system for migration file operations (SDK-1895)
[2.9.0] - 2019-10-31
Added
- application: New "shared" configuration using
environment.shared.ts(see http://wa3.backbase.com/foundation/latest/howto/environments)
Upgrading Manually
Update each application's "environments/type.ts" file to make the "mockProviders" key optional and add an extra "shared" environment configuration.
1. Update the "Environment" type to make "mockProviders" optional (add the "?")
export interface Environment {
readonly production: boolean;
readonly mockProviders?: Array<Provider>;
readonly bootstrap?: {
readonly pageModel: Item;
readonly services: ExternalServices;
};
}
This will require an update to the apps "AppModule" to handle the case where "mockProviders" is undefined. In the apps "app/app.module.ts" file, add a default value (an empty array) where "mockProviders" is spread into the module providers.
@NgModule({
...
providers: [...environment.mockProviders || []],
...
})
2. Create a new "shared" environment configuration file ("environments/environment.shared.ts")
import { createMocksInterceptor } from '@backbase/foundation-ang/data-http';
import { Environment } from './type';
export const environment: Environment = {
production: false,
mockProviders: [createMocksInterceptor()],
};
Add the new configuration to the "angular.json"
{
...
"projects": {
"example-app": {
...
"architect": {
...
"build": {
...
"configurations": {
...
"shared": {
"fileReplacements": [
{
"replace": "apps/tutorial-app/src/environments/environment.ts",
"with": "apps/tutorial-app/src/environments/environment.shared.ts"
}
],
}
}
...
}
3. Upgrade the "bb-ang" dev dependency
Install it as a dev dependency using the following command:
npm i --save-dev @bb-cli/bb-ang@3.6.0
[2.8.0] - 2019-10-31
Added
- data-module: Give more descriptive names to the data module configuration injection tokens to make debugging missing provides easier.
[2.7.2] - 2019-10-28
Fixed
- Fixed import locations for
ItemandExternalServicesinenvironments/type.ts.
Upgrading Manually
Update import statements in each application's environments/type.ts file.
1. Update importing of Item
Change import of Item to
import { Item } from '@backbase/foundation-ang/core';
2. Update importing of ExternalServices
Change import of ExternalServices to
import { ExternalServices } from '@backbase/foundation-ang/start';
[2.7.1] - 2019-10-25
Fixed
- Added migration notes to the CHANGELOG
- Update migration notes to link to this changelog
[2.7.0] - 2019-10-25
Added
- Enable ability to customize app container HTML and model by default
Upgrading Manually
We have added the ability to create your Application Container from your Angular
App's index.html file.
This won't be enabled automatically as it could cause unwanted code to end up in your
Application Container if you have standalone specific code in your index.html.
To enable this new functionality you can add the --extend-container flag to your
npm run package:apps command in your package.json.
[2.6.0] - 2019-10-21
Fixed
- Add support of the differential loading to fix missing polyfills (SDK-1845)
Added
- Added ability to customize app container's HTML and model.xml (SDK-1701)
Upgrading Manually
Update bb-ang
Make sure the version of @bb-cli/bb-ang is ~3.5.0
For that install it as a dev dependency using the following command:
$ npm i --save-dev @bb-cli/bb-ang@~3.5.0
[2.5.2] - 2019-10-17
Fixed
- Fix peer dependencies warning by updating
@ng-bootstrap/ng-bootstrapto version 5.1.1.
Upgrading Manually
Update foundation-ang and ng-bootstrap
Make sure the version of @backbase/foundation-ang is ^4.12.0 and version of
@ng-bootstrap/ng-bootstrap is 5.1.1.
For that install it as a dependency using the following command:
$ npm i --save @backbase/foundation-ang@^4.12.0 @ng-bootstrap/ng-bootstrap@5.1.1
[2.5.1] - 2019-10-15
Fixed
- Fix
2.4.1and2.5.0update schematics.
[2.5.0] - 2019-10-14
Added
- data-module, library, widget: Data modules, libraries and widgets will extend project's tslint rules by blacklisting imports of
BrowserModule,BrowserAnimationsModuleandHttpClientModulemodules. (SDK-1833).
Upgrading Manually
Add tslint file inside each library folder
In each library folder add tslint.json file next to public_api.ts file with the following content:
{
"extends": "../../tslint.json",
"rules": {
"import-blacklist": [
true,
"rxjs/Rx",
{ "@angular/platform-browser": ["BrowserModule"] },
{ "@angular/platform-browser/animations": ["BrowserAnimationsModule"] },
{ "@angular/common/http": ["HttpClientModule"] }
]
}
}
[2.4.1] - 2019-10-14
Fixed
- application: Add module type to the app typescript config to have treeshaking working. (SDK-1838)
Upgrading Manually
Update tsconfig.app.json
Please add "module": "es2015" to the compilerOptions of your apps tsconfig.app.json:
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"outDir": "../../out-tsc/app",
"types": [],
"module": "es2015"
},
"include": ["src/**/*.ts"],
"exclude": ["src/test.ts", "src/**/*.spec.ts"]
}
[2.4.0] - 2019-10-03
Added
- project: Updated
npm run api:checkandnpm run api:extractto support packages that have multiple entry points. - widget: When generating a widget we will add this widget component to
public_api.ts(SDK-1601).
Upgrading Manually
Update bb-ang
Make sure the version of @bb-cli/bb-ang is ~3.4.0
For that install it as a dev dependency using the following command:
$ npm i --save-dev @bb-cli/bb-ang@~3.4.0
[2.3.0] - 2019-09-02
Added
- data-module: Changed import statements to use named imports instead of wildcard imports. This makes it easier to parse by other tooling. Eg, for dead code elimination or API documentation generation (SDK-1798).
[2.2.1] - 2019-08-28
Fixed
- Fix
2.1.0and2.1.1update schematics.
[2.2.0] - 2019-08-26
- Add command for libraries API checks (SDK-1789)
Upgrading Manually
1. Add command to the package scripts
In package.json file, define new scripts for the api check:
{
"name": "my-project",
"version": "0.0.0",
"license": "MIT",
"scripts": {
"build": "ng build",
"e2e": "ng e2e",
...
"api:check": "bb-ang check-api",
"api:extract": "bb-ang extract-api",
},
...
}
2. Make sure the version of @bb-cli/bb-ang is $~3.2.0
For that install it as a dev dependency using the following command:
$ npm i --save-dev @bb-cli/bb-ang@$~3.2.0
[2.1.1] - 2019-08-16
- Declare and use a pre-defined type for both environment definitions. (SDK-1787)
Upgrading Manually
1. Define an "Environment" type
In apps/*/environments/type.ts file, define a new type Environment that a will be used to add strong typing to the declaration of the environment configuration.
// apps/my-example-app/environments/type.ts
import { Provider } from '@angular/core';
import { Item } from '@backbase/core-ang';
import { ExternalServices } from '@backbase/web-sdk-api-ang';
export interface Environment {
readonly production: boolean;
readonly mockProviders: Array<Provider>;
readonly bootstrap?: {
readonly pageModel: Item;
readonly services: ExternalServices;
};
}
2. Update the environment declarations to conform to the newly defined type
To make use of this type, the environment files should be updated to declare the "environment" variable to be of ths new "Environment" type. This should be done for all environment files in the Apps (usually "environment.ts" and "environment.prod.ts").
// apps/my-example-app/environments/environment.ts
import { Environment } from './type';
// ...
export const environment: Environment = // ...
3. Update the bootstrap to use the defined type
Having made these changes, the bootstrap process in main.ts will fail to compile as TypeScript is unable to narrow the type within the closure. We fix this by extracting the type outside of the closure:
if (environment.bootstrap) {
const { services, pageModel } = environment.bootstrap;
start(services).then((app) => {
app.bootstrap(pageModel, { parentName: '', index: 0 });
});
}
[2.1.0] - 2019-08-14
- Move standalone
pageModelandservicesfromdev-mock.jstoenvironment.ts(SDK-1763)
Upgrading Manually
1. Move Standalone Page Model and External Services to "environment.ts"
The page model and external services used for standalone development was previously defined in apps/*/assets/dev-mock.js. This definition should now be in the apps/*/environments/environment.ts file. The page model and external services should be a exported as the pageModel
and services properties (respectively) on the environment object.
For example:
// apps/my-example-app/environments/environment.ts
import { Item } from '@backbase/foundation-ang/core';
import { ExternalServices } from '@backbase/foundation-ang/start';
const services: ExternalServices = {};
const pageModel: Item = {
name: 'app-container',
properties: {},
children: [],
};
export const environment = {
production: false,
mockProviders: [],
bootstrap: {
pageModel,
services,
},
};
2. Move Standalone Bootstrap to "main.ts"
To make use of this, the bootstrapping of the application for standalone development has also been moved from apps/*/assets/dev-mock.js into the /apps/*/src/main.ts.
// apps/my-example-app/src/main.ts
import { environment } from './environments/environment';
// ...
const start = registerSingleApp((extraProviders: Array<StaticProvider>) =>
platformBrowserDynamic(extraProviders).bootstrapModule(AppModule),
);
if (environment.bootstrap) {
start(environment.bootstrap.services).then((app) => {
app.bootstrap(environment.bootstrap.pageModel, { parentName: '', index: 0 });
});
}
3. Remove redundant "dev-mock.js"
Having made these changes, the apps/*/assets/dev-mock.js file(s) should be redundant. The script tag can be removed from the apps/*/src/index.html and the file deleted from the project.
[2.0.2] - 2019-07-29
- app: Remove redundant option
itemName
[2.0.0] - 2019-06-07
- app: Compatibility with CX5 was added. You can run packaging now with
npm run package:apps -- --cx-version 5.8.0.0
to create a CX5 provision package.
- project, app: project structure is updated to follow Angular 8 structure.
Updating Your Project
- Remove the
index.hbsandmodel.xmlfrom the apps. - Make sure your distribution pipelines (if any) are updated, since the location of the provisioning package has been changed.
Changed
Added
- app: Build memory flag was added to the package:apps command to prevent possible "out of memory" caused failures.
- project:
updateschematic was added. This will enable to consume changes made to the project structure vianpm run updatecommand starting from 2.0 version.
1.0.0-beta.80
Added
- project: Set default --build-memory for package:apps to 4GB to prevent out-of-memory errors
Updating Your project
- Update bb-ang to ^2.0.1-pr.52
npm i -D @bb-cli/bb-ang^2.0.1-pr.52 - Update the
package:appscommand inpackage.jsonto:"package:apps": "bb-ang package-apps --output-hashing --build-memory=4096",
1.0.0-beta.80
Changed
- project:
protractor-accessibility-pluginis removed from the project schematic.
1.0.0-beta.79
Fixed
- data-module: Fix support for circular references in json schemas. Note: circular references are not supported between definitions.
1.0.0-beta.77
Fixed
- theme: main file path in model.xml (NOJIRA)
1.0.0-beta.73
Fixed
- widget: When generating a widget it will correctly inherit the prefix from the project for the name of the widget selector AND the name of the model.xml (MAINT-6704).
Changed
- app: Removed
--prefixoption and just inherit prefix from the project (reads from tslint).
1.0.0-beta.71
Fixed
- ui: ng-bootstrap version updated to 2.2.2 from 2.0.0
Updating Your Project
- Update the ng-bootstrap version in your
package.jsonfrom 2.0.0 to 2.2.2 then runnpm installto update your node_modules
1.0.0-beta.68
Changed
--npmScopeproperty has been removed from the following schematics:data-modulelibrarywidget
--routingproperty has been removed fromappschematic--pathand--flatproperties have been removed fromlibraryandwidgetschematics (SDK-1530)
Fixed
- project: npmScope property is stored in
angular.jsonnow, so that libraries and widgets will inherit the npmScope from the project. - project: lock the rxjs version to ~6.3.3 (see https://github.com/ReactiveX/rxjs/issues/4512)
Updating Your Project
- Add the following to your
angular.json(replacing "backbase" with your scope):{ ... "schematics": { "@bb-cli/schematics:widget": { "npmScope": "backbase" }, "@bb-cli/schematics:library": { "npmScope": "backbase" }, "@bb-cli/schematics:data-module": { "npmScope": "backbase" } }, ... }
1.0.0-beta.65
Changed
project: Don't run tests from a single entry point anymore. Each app and library should have it's own test entry point (test.ts), and it's own "test" architect in the
angular.json. This also means that acoveragedirectory will be created for each app/library that has a "test" architect in theangular.json.**Warning**. This means that there will no longer be a combinedcoverage report in the root of the project. If you still want it see this github issue for a workaround. Or, if you are using sonar (or something similar), just pass it all the coverage files and it should be able to aggregate them for you. See instructions below:
This also means that you can now run tests for a single library by specifying it via
npm run test -- example-library(SDK-1332).app: Create an entry point for testing instead of using a
test.tsfrom the project root.library: Create an entry point for testing instead of using a
test.tsfrom the project root. Thistest.tsalso includes thepublic_api.tsto ensure the coverage is now reported for all files, even if they don't have.spec.tsfiles (SDK-1497).
Updating Your Project
Update
@angular-devkit/build-angular, if it isn't already:npm install -D @angular-devkit/build-angular@~0.11.4Replace "npm test" script in your package.json: Before:
"test": "ng test --environment=dev --code-coverage=true",After:
"test": "ng test",Remove the
test.jsfile from the root of the projectAdd the following
test.tsfile to any apps (not libs) in your project (that you have unit test spec files for):Eg:
example-project/apps/my-example-app/src/test.ts:// This file is required by karma.conf.js and loads recursively all the .spec and framework files import 'zone.js/dist/zone-testing'; import { getTestBed } from '@angular/core/testing'; import { BrowserDynamicTestingModule, platformBrowserDynamicTesting, } from '@angular/platform-browser-dynamic/testing'; declare const require: any; // First, initialize the Angular testing environment. getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting()); // Then we find all the tests. const context = require.context('./', true, /\.spec\.ts$/); // And load the modules. context.keys().map(context);Add the following
test.tsfile to any libs in your project (that you have unit test spec files for):Eg:
libs/example-library:// This file is required by karma.conf.js and loads recursively all the .spec and framework files import 'zone.js/dist/zone-testing'; import { getTestBed } from '@angular/core/testing'; import { BrowserDynamicTestingModule, platformBrowserDynamicTesting, } from '@angular/platform-browser-dynamic/testing'; declare const require: any; // First, initialize the Angular testing environment. getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting()); // Then we find all the tests. const context = require.context('./', true, /\.spec\.ts$/); // And load the modules. context.keys().map(context); // Add public_api for coverage const publicApiContext = require.context('./', true, /public_api\.ts$/); publicApiContext.keys().map(publicApiContext);Update the
angular.jsonfor the default app. Set the"test": { "options"as below:Note: If you don't have tests in your app, just remove the
"testsection entirelyBefore:
"options": { "main": "apps/my-example-app/src/../../../test.js", "karmaConfig": "./karma.conf.js", "tsConfig": "apps/my-example-app/src/../../../tsconfig.spec.json", "codeCoverageExclude": [ "test.js", "**/polyfills.ts" ] }After:
"options": { "main": "apps/my-example-app/src/test.ts", "karmaConfig": "./karma.conf.js", "polyfills": "apps/my-example-app/src/polyfills.ts", "tsConfig": "apps/my-example-app/src/../../../tsconfig.spec.json", "environment": "dev", "codeCoverage": true, "codeCoverageExclude": [ "test.ts", "**/polyfills.ts" ] }Update the
angular.json, adding this section for each library "architect", replacing %library-name%:"test": { "builder": "@angular-devkit/build-angular:karma", "options": { "main": "libs/%library-name%/test.ts", "karmaConfig": "./karma.conf.js", "polyfills": "libs/%library-name%/polyfills.ts", "tsConfig": "./tsconfig.spec.json", "environment": "dev", "codeCoverage": true, "codeCoverageExclude": [ "test.ts", "**/polyfills.ts" ] } },Change the
karma.conf.jsin the root of the project, ensuring that the generated reports include json:Before:
… coverageIstanbulReporter: { … reports: ['html', 'lcovonly', 'text-summary'],After:
coverageIstanbulReporter: { … reports: ['html', 'lcovonly', 'text-summary', 'json'],And the coverage directory is moved from the root to be within the library: Before:
coverageIstanbulReporter: { dir: require('path').join(__dirname, 'coverage'), …After:
… coverageIstanbulReporter: { dir: require('path').join(config.buildWebpack.projectRoot, 'coverage'), …Add the following to your .gitignore:
apps/*/coverage libs/*/coverage(optional) Update sonar.properties to pass all coverage reports: Before:
sonar.typescript.lcov.reportPaths=coverage/lcov.infoAfter:
sonar.typescript.lcov.reportPaths=libs/library-a/coverage/lcov.info,libs/library-b/coverage/lcov.info
1.0.0-beta.64
Fixed
- data-module: Fix mocking of RAML responses with no body defined (SDK-1495).
1.0.0-beta.63
Added
- app: Added accessibility check to via protractor plugin (SDK-1478)
1.0.0-beta.62
Added
- data-module: Add an ability for a data module service to have multiple response types (SDK-1479)
- data-module: Raml-generate script correctly handles npm-scope parameter
1.0.0-beta.61
Fixed
- app: Update test config generator so it excludes
**/polyfills.tsfrom the coverage output
1.0.0-beta.60
Fixed
- theme: Removed toString from the buffer so that binary files won't be corrupted (MAINT-6481)
1.0.0-beta.59
Fixed
- project: Lock @types/jasmine to a version compatible with typescript <2.8
- app: Fix lint configuration when generating an app (fix location of tsconfig.spec.json)
- app: Update tslint when using a new
--prefix - widget, library: Update angular.json with the correct selector prefix (based on app)
1.0.0-beta.56
Fixed
- project: Update dependencies to match versions used previously (in 1.0.0-beta.54) (SDK-1430)
1.0.0-beta.55
Fixed
- project: Remove dependency on external NRWL schematic to improve performance and stability (SDK-1422).
1.0.0-beta.54
Added
- ui-component: Added generate ui-component schematic (NOJIRA)
1.0.0-beta.53
Changed
- theme: Fixed an issue with download-npm-package https (NOJIRA)
1.0.0-beta.52
Changed
- theme: Version and npm namespace updated (BAC-1791)
1.0.0-beta.51
Added
- app: Add static assets resource to allow the app to load statics from libs
1.0.0-beta.50
Fixed
- data-module: Mocks are built for responses with empty body
1.0.0-beta.49
Changed
- app: Remove styles.css generation and prevent it from adding to angular.json (BAC-1444)
1.0.0-beta.48
Fixed
- data-module: Allow query params to be passed in delete methods (SDK-1406)
Warning: This fix causes a breaking changes in generated APIs
For example, the method signature for this raml:
/resource
/{id}
delete:
queryParameters:
deleteParam:
displayName: 'Delete it'
type: boolean
description: 'Param for a delete request'
required: true
responses:
204:
has been changed from this:
deleteResourceRecordById(
todoId: string,
body: any,
headers: HttpHeaders
): Observable<HttpResponse<any>>
to this:
deleteResourceRecordById(
todoId: string,
params: {
deleteParam: string;
},
headers: HttpHeaders
): Observable<HttpResponse<any>>
1.0.0-beta.47
- project: Add node/npm engine config to package.json
1.0.0-beta.46
- project: Update structure of e2e testing
1.0.0-beta.45
Added
- project: Enable hashing of generated files for cache-busting
1.0.0-beta.44
- Nothing changed
1.0.0-beta.43
Added
- theme: Option to provide the name for the generated theme (BAC-1356)
1.0.0-beta.42
Fixed
- theme: Path normalization issues on Windows (BAC-1418)
1.0.0-beta.41
Changed
- theme: Changed Theme schematics to use Backbase Theme (BAC-1413)
1.0.0-beta.40
Changed
- styleguide: Changed name of the library and binary to design-system and bb-designsystem
1.0.0-beta.39
Fixed
- data-module,widget,library: Options and descriptions documentation improved (SDK-1346)
Added
- theme: Ability to set Backbase theme version when generating a new theme
1.0.0-beta.69
Fixed
- library,data-module,widget: Polyfills are removed (SDK-1368, SDK-1367)
1.0.0-beta.38
Fixed
- data-module: Data module generation on windows (SDK-1368, SDK-1367)
1.0.0-beta.37
Fixed
- theme: No longer breaks the build if the project name is not specified while generating the theme (BAC-1315)
- theme: No longer add a new project object to angular.json if the project actually don't exist (BAC-1315)
1.0.0-beta.36
Added
- styleguide: Styleguide Schematics
1.0.0-beta.35
Fixed
- data-module: Prevent interfaces handler from generating types for non-json types (SDK-1337)
1.0.0-beta.34
Fixed
- data-module: Allow
.forRootconfiguration to work when AOT compiled (SDK-1360)
1.0.0-beta.33
Fixed
- widget: Don't error if dev-mock doesn't exist (NOJIRA)
1.0.0-beta.32
Added
- project: Use single karma config
- project: Add test coverage checks
1.0.0-beta.31
Fixed
- library,data-module: Fix generation of library and data modules so they can accept camel cased names (MAINT-6004)
1.0.0-beta.30
Fixed
- component: Delegate component schematic to angular's schematics (SDK-1345)