Skip to content

Commit

Permalink
Updage to Angular 14, TypeScript 4.6 and RxJS 7.5 (#103)
Browse files Browse the repository at this point in the history
* Update package-lock.json to the new format

* Update Angular ESLint schematics package

* Update to Angular 13

* Update to Angular 14

* Update RxJS

* Bump new library version

* Update angular.json

Update library builder

* Remove unknown argument prod

* Downgrade Node in Travis

* Change Chrome bin path in Travis configuration

* Move to a newer Linux distribution for Travis

* Move to the latest stable LTS distribution

* Move the execution of xvfb to the servicies array

* Set Node configuration for using with NVM

* Enable production flag for builds

* Use Node version 14 instead of 16 because of problems in systelab charts

* Update README.md

* Fix issues with code style

* Fix issues with code style

* Update README.md

* Update README.md

* Update README.md

* Fix Codacy issues

* Fix Codacy markdown issue
  • Loading branch information
fjaguado committed Oct 10, 2022
1 parent bf52190 commit 898fe6b
Show file tree
Hide file tree
Showing 10 changed files with 22,931 additions and 13,343 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/.angular/cache
npm-debug.log
node_modules
coverage
Expand Down
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v16.17.1
9 changes: 5 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
sudo: required
dist: trusty
dist: jammy
language: node_js
node_js:
- '12'
- '14.20.1'
addons:
chrome: stable
services:
- xvfb

before_install:
- export CHROME_BIN=chromium-browser
- export CHROME_BIN=/usr/bin/google-chrome
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start

before_script:
- npm install -g makeshift && makeshift -s @systelab-technologies -r https://registry.npmjs.org
Expand Down
51 changes: 40 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ To download the repository and setup all the dependencies, run the following scr
```bash
git clone https://github.com/systelab/systelab-translate.git
cd systelab-translate
npm install
npm ci
```
## Test

Expand Down Expand Up @@ -59,25 +59,54 @@ The following steps should be consider when migrating from version 6.
- from 'systelab-translate';
```

## Version 8
## Version 14.x.x - Angular 14

[Angular 13 news](https://blog.angular.io/angular-v13-is-now-available-cce66f7bc296)

- **View Engine** is no longer available
- Libraries built with the latest version of the **APF** [Angular Package Format](https://angular.io/guide/angular-package-format) will no longer require the use of ngcc. As a result of these changes library developers can expect leaner package output and faster execution.
- The new API removes the need for ComponentFactoryResolver being injected into the constructor. Ivy creates the opportunity to instantiate the component with ViewContainerRef.createComponent without creating an associated factory
- **End of IE11 support**
- Angular now supports the use of persistent build cache by default for new v13 projects [More info](https://github.com/angular/angular-cli/issues/21545) and [CLI Cache](https://angular.io/cli/cache)
- **RxJS 7.4** is now the default for apps created with ng new
- Dynamically enable/disable validators: allows built-in validators to be disabled by setting the value to null
- Important improvements to TestBed that now does a better job of tearing down test modules and environments after each test
- *canceledNavigationResolution* router flag to restore the computed value of the browser history when set to *computed*
- [TypeScript 4.4](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-4.html)

[Angular 14 news](https://blog.angular.io/angular-v14-is-now-available-391a6db736af)

- [Standalone Components](https://angular.io/guide/standalone-components)
- [Typed Angular Forms](https://angular.io/guide/typed-forms)
- Streamlined page title accessibility
- Extended developer diagnostics
- Catch the invalid “Banana in a box” error on your two-way data bindings
- Catch nullish coalescing on non-nullable values in Angular templates
- Bind to protected component members directly from the templates
- Optional injectors in Embedded Views
- Support for passing in an optional injector when creating an embedded view through *ViewContainerRef.createEmbeddedView* and *TemplateRef.createEmbeddedView*
- NgModel changes are reflected in the UI for OnPush components
- [TypeScript 4.6](https://devblogs.microsoft.com/typescript/announcing-typescript-4-6/)

## Version 11.x.x - Angular 12

date-fns is updated to 2.14. Check breaking changes here: https://date-fns.org/v2.14.0/docs/Change-Log
IE11 support has been deprecated due to the upgrade to Angular 12

In the library changes involved replacing DD, YY, YYY for dd, yy, yyyy. Also using date-fns locale object instead of an string.
Use of [Ivy](https://angular.io/guide/ivy), applications that uses this library have to use Angular 12 and Ivy rendering.

Added --noImplicitOverride flag to allow override methods and get error for unintentionally overrides
https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-3.html#override-and-the---noimplicitoverride-flag

## Version 10.x.x - Angularv11
## Version 10.x.x - Angular 11

There's few changes related to pipes:
- Some pipes (decimal, percent, currency, date, etc) now explicitly state which types are accepted.
- The slice pipe now returns null for the undefined input value, which is consistent with the behavior of most pipes.
- The async pipe no longer claims to return undefined for an input that was typed as undefined. Note that the code actually returned null on undefined inputs
- The uppercase and lowercase pipes no longer let falsy values through. They now map both null and undefined to null and raise an exception on invalid input (0, false, NaN). This matches other Angular pipes

## Version 11.x.x - Angularv12

IE11 support has been deprecated due to the upgrade to Angular 12

Use of [Ivy](https://angular.io/guide/ivy), applications that uses this library have to use Angular 12 and Ivy rendering.
## Version 8

date-fns is updated to 2.14. Check breaking changes here: https://date-fns.org/v2.14.0/docs/Change-Log

Added --noImplicitOverride flag to allow override methods and get error for unintentionally overrides https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-3.html#override-and-the---noimplicitoverride-flag
In the library changes involved replacing DD, YY, YYY for dd, yy, yyyy. Also using date-fns locale object instead of a string.
5 changes: 2 additions & 3 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"prefix": "lib",
"architect": {
"build": {
"builder": "@angular-devkit/build-ng-packagr:build",
"builder": "@angular-devkit/build-angular:ng-packagr",
"options": {
"tsConfig": "projects/systelab-translate/tsconfig.lib.json",
"project": "projects/systelab-translate/ng-package.json"
Expand Down Expand Up @@ -52,6 +52,5 @@
}
}
}
},
"defaultProject": "systelab-translate"
}
}
Loading

0 comments on commit 898fe6b

Please sign in to comment.