Skip to content

Commit

Permalink
Merge pull request #21 from FullStacksDev/ngrx-upgrade
Browse files Browse the repository at this point in the history
NgRx Signals v18 stable upgrade + revamp stores
  • Loading branch information
jits authored Aug 1, 2024
2 parents 6b2bdb9 + df7a83a commit 6d0d1de
Show file tree
Hide file tree
Showing 12 changed files with 1,919 additions and 2,584 deletions.
2 changes: 1 addition & 1 deletion ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ The [`./deploy`](./deploy) script in the root of the project is a simple script

| **:brain: Design decision** |
| :-- |
| We make two key decisions about Angular components (which all components generated from the Angular CLI use):<br><br><ol><li>The component template and styles are defined in the same file as the component's definition (commonly known as "single file components (SFC)"). We strongly prefer this approach as it keeps things in one logical place and also pushes us to define smaller components that don't do too much.</li><li>The [`OnPush` change detection strategy](https://angular.dev/best-practices/skipping-subtrees#using-onpush) is used by default, and we recommend ALL components use it. This is a more performant approach that [works well with Angular's signals](https://angular.dev/guide/signals#reading-signals-in-onpush-components), and since we use NgRx SignalStore you are unlikely to hit the cases where change detection is not triggered when it should be.</li></ol> |
| We make two key decisions about Angular components (which all components generated from the Angular CLI use):<br><br><ol><li>The component template and styles are defined in the same file as the component's definition (commonly known as "single file components (SFC)"). We strongly prefer this approach as it keeps things in one logical place and also pushes us to define smaller components that don't do too much.</li><li>The [`OnPush` change detection strategy](https://angular.dev/best-practices/skipping-subtrees#using-onpush) is used by default, and we recommend ALL components use it. This is a more performant approach that [works well with Angular's signals](https://angular.dev/guide/signals#reading-signals-in-onpush-components), and since we use NgRx SignalStore and Angular's signals to manage most application state you are unlikely to hit the cases where change detection is not triggered when it should be.</li></ol> |

> [!NOTE]
>
Expand Down
2 changes: 1 addition & 1 deletion TEMPLATE_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1.0.0-alpha.1
v1.0.0-alpha.2
3 changes: 3 additions & 0 deletions app/eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ const eslint = require("@eslint/js");
const tseslint = require("typescript-eslint");
const angular = require("angular-eslint");
const eslintConfigPrettier = require("eslint-config-prettier");
const ngrx = require("@ngrx/eslint-plugin/v9");

module.exports = tseslint.config(
{
Expand All @@ -13,6 +14,8 @@ module.exports = tseslint.config(
...tseslint.configs.stylisticTypeChecked,
...angular.configs.tsRecommended,
eslintConfigPrettier,
...ngrx.configs.operators,
...ngrx.configs.signals,
],
languageOptions: {
parserOptions: {
Expand Down
65 changes: 36 additions & 29 deletions app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,53 +19,60 @@
},
"private": true,
"dependencies": {
"@angular/animations": "^18.1.0",
"@angular/cdk": "18.1.0",
"@angular/common": "^18.1.0",
"@angular/compiler": "^18.1.0",
"@angular/core": "^18.1.0",
"@angular/forms": "^18.1.0",
"@angular/material": "18.1.0",
"@angular/platform-browser": "^18.1.0",
"@angular/platform-browser-dynamic": "^18.1.0",
"@angular/platform-server": "^18.1.0",
"@angular/router": "^18.1.0",
"@angular/service-worker": "^18.1.0",
"@angular/ssr": "^18.1.0",
"@ngrx/operators": "^18.0.1",
"@ngrx/signals": "18.0.0-rc.2",
"@angular/animations": "^18.1.3",
"@angular/cdk": "18.1.3",
"@angular/common": "^18.1.3",
"@angular/compiler": "^18.1.3",
"@angular/core": "^18.1.3",
"@angular/forms": "^18.1.3",
"@angular/material": "18.1.3",
"@angular/platform-browser": "^18.1.3",
"@angular/platform-browser-dynamic": "^18.1.3",
"@angular/platform-server": "^18.1.3",
"@angular/router": "^18.1.3",
"@angular/service-worker": "^18.1.3",
"@angular/ssr": "^18.1.3",
"@ngrx/operators": "^18.0.2",
"@ngrx/signals": "^18.0.2",
"consola": "^3.2.3",
"express": "^4.19.2",
"firebase": "^10.12.3",
"firebase": "^10.12.4",
"ngxtension": "^4.0.0",
"rxfire": "^6.0.6-canary.5cfad21",
"rxjs": "~7.8.0",
"tslib": "^2.3.0",
"zone.js": "~0.14.5"
"zone.js": "~0.14.8"
},
"devDependencies": {
"@angular-devkit/build-angular": "^18.1.0",
"@angular/cli": "^18.1.0",
"@angular/compiler-cli": "^18.1.0",
"@angular-devkit/build-angular": "^18.1.3",
"@angular/cli": "^18.1.3",
"@angular/compiler-cli": "^18.1.3",
"@ngrx/eslint-plugin": "^18.0.2",
"@types/express": "^4.17.17",
"@types/jasmine": "~5.1.0",
"@types/node": "^20.14.11",
"angular-eslint": "18.1.0",
"@types/node": "^22.0.2",
"angular-eslint": "18.2.0",
"autoprefixer": "^10.4.19",
"eslint": "^9.7.0",
"eslint": "^9.8.0",
"eslint-config-prettier": "^9.1.0",
"jasmine-core": "~5.1.2",
"karma": "~6.4.3",
"jasmine-core": "~5.2.0",
"karma": "~6.4.4",
"karma-chrome-launcher": "~3.2.0",
"karma-coverage": "~2.2.0",
"karma-jasmine": "~5.1.0",
"karma-jasmine-html-reporter": "~2.1.0",
"ng-mocks": "^14.13.0",
"postcss": "^8.4.39",
"postcss": "^8.4.40",
"prettier": "^3.3.3",
"prettier-plugin-tailwindcss": "^0.6.5",
"tailwindcss": "^3.4.6",
"typescript": "~5.5.3",
"typescript-eslint": "^8.0.0-alpha.44"
"tailwindcss": "^3.4.7",
"typescript": "~5.5.4",
"typescript-eslint": "^8.0.0"
},
"pnpm": {
"overrides": {
"undici": "^6.19.5",
"undici-types": "^6.19.5"
}
}
}
Loading

0 comments on commit 6d0d1de

Please sign in to comment.