Skip to content

Commit f6f79a1

Browse files
authoredDec 17, 2024··
feat: update to Angular 19 (#200)
Changes that were applied: - bump dependency versions - applied migrations from `migrations.json` - remove unused component imports - add `as unknown` to `updateOptions` to fix a previously working type conversion - add `skipToken` check to `normalizeOptions` to narrow down typing
1 parent b0d39bb commit f6f79a1

24 files changed

+12227
-11773
lines changed
 

‎.eslintrc.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@
2424
"prefix": "query",
2525
"style": "kebab-case"
2626
}
27-
]
27+
],
28+
"@angular-eslint/prefer-standalone": "off"
2829
}
2930
},
3031
{

‎.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,5 @@ testem.log
3939
Thumbs.db
4040

4141
.nx/cache
42+
.nx/workspace-data
4243
.angular

‎.prettierignore

+2
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,5 @@
44
/coverage
55
.angular
66
.nx
7+
8+
/.nx/workspace-data

‎devtools/.eslintrc.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@
2424
"prefix": "query",
2525
"style": "kebab-case"
2626
}
27-
]
27+
],
28+
"@angular-eslint/prefer-standalone": "off"
2829
}
2930
},
3031
{

‎devtools/package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@
1010
"url": "https://github.com/sponsors/ngneat"
1111
},
1212
"peerDependencies": {
13-
"@angular/core": ">=16.0.0 <19.0.0",
14-
"@tanstack/query-devtools": "5.4.2"
13+
"@angular/core": ">=16.0.0 <=19.0.4",
14+
"@tanstack/query-devtools": "5.61.4"
1515
},
1616
"dependencies": {
17-
"tslib": "^2.3.0"
17+
"tslib": "^2.4.0"
1818
},
1919
"publishConfig": {
2020
"access": "public"

‎jest.config.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { getJestProjects } from '@nx/jest';
1+
import { getJestProjectsAsync } from '@nx/jest';
22

3-
export default {
4-
projects: getJestProjects(),
5-
};
3+
export default async () => ({
4+
projects: await getJestProjectsAsync(),
5+
});

‎migrations.json

+175-48
Original file line numberDiff line numberDiff line change
@@ -1,82 +1,209 @@
11
{
22
"migrations": [
33
{
4-
"version": "18.1.0-beta.3",
5-
"description": "Moves affected.defaultBase to defaultBase in `nx.json`",
6-
"implementation": "./src/migrations/update-17-2-0/move-default-base",
4+
"cli": "nx",
5+
"version": "19.2.0-beta.2",
6+
"description": "Updates the default workspace data directory to .nx/workspace-data",
7+
"implementation": "./src/migrations/update-19-2-0/move-workspace-data-directory",
8+
"package": "nx",
9+
"name": "19-2-0-move-graph-cache-directory"
10+
},
11+
{
12+
"cli": "nx",
13+
"version": "19.2.2-beta.0",
14+
"description": "Updates the nx wrapper.",
15+
"implementation": "./src/migrations/update-17-3-0/update-nxw",
16+
"package": "nx",
17+
"name": "19-2-2-update-nx-wrapper"
18+
},
19+
{
20+
"version": "19.2.4-beta.0",
21+
"description": "Set project name in nx.json explicitly",
22+
"implementation": "./src/migrations/update-19-2-4/set-project-name",
23+
"x-repair-skip": true,
724
"package": "nx",
8-
"name": "move-default-base-to-nx-json-root"
25+
"name": "19-2-4-set-project-name"
26+
},
27+
{
28+
"version": "20.0.0-beta.7",
29+
"description": "Migration for v20.0.0-beta.7",
30+
"implementation": "./src/migrations/update-20-0-0/move-use-daemon-process",
31+
"package": "nx",
32+
"name": "move-use-daemon-process"
33+
},
34+
{
35+
"version": "20.0.1",
36+
"description": "Set `useLegacyCache` to true for migrating workspaces",
37+
"implementation": "./src/migrations/update-20-0-1/use-legacy-cache",
38+
"x-repair-skip": true,
39+
"package": "nx",
40+
"name": "use-legacy-cache"
41+
},
42+
{
43+
"version": "20.2.0-beta.5",
44+
"description": "Update TypeScript ESLint packages to v8.13.0 if they are already on v8",
45+
"implementation": "./src/migrations/update-20-2-0/update-typescript-eslint-v8-13-0",
46+
"package": "@nx/eslint",
47+
"name": "update-typescript-eslint-v8.13.0"
948
},
1049
{
1150
"cli": "nx",
12-
"version": "19.1.0-beta.6",
13-
"description": "Migrate no-extra-semi rules into user config, out of nx extendable configs",
14-
"implementation": "./src/migrations/update-19-1-0-migrate-no-extra-semi/migrate-no-extra-semi",
15-
"package": "@nx/eslint-plugin",
16-
"name": "update-19-1-0-rename-no-extra-semi"
51+
"version": "20.0.0-beta.5",
52+
"description": "replace getJestProjects with getJestProjectsAsync",
53+
"implementation": "./src/migrations/update-20-0-0/replace-getJestProjects-with-getJestProjectsAsync",
54+
"package": "@nx/jest",
55+
"name": "replace-getJestProjects-with-getJestProjectsAsync"
1756
},
1857
{
1958
"cli": "nx",
20-
"version": "18.1.0-beta.1",
21-
"requires": {
22-
"@angular/core": ">=17.2.0"
23-
},
24-
"description": "Update the @angular/cli package version to ~17.2.0.",
25-
"factory": "./src/migrations/update-18-1-0/update-angular-cli",
59+
"version": "19.6.0-beta.0",
60+
"description": "Use serve-static or preview for webServerCommand.",
61+
"implementation": "./src/migrations/update-19-6-0/use-serve-static-preview-for-command",
62+
"package": "@nx/playwright",
63+
"name": "19-6-0-use-serve-static-preview-for-command"
64+
},
65+
{
66+
"cli": "nx",
67+
"version": "19.6.0-beta.1",
68+
"description": "Add inferred ciTargetNames to targetDefaults with dependsOn to ensure dependent application builds are scheduled before atomized tasks.",
69+
"implementation": "./src/migrations/update-19-6-0/add-e2e-ci-target-defaults",
70+
"package": "@nx/playwright",
71+
"name": "update-19-6-0-add-e2e-ci-target-defaults"
72+
},
73+
{
74+
"cli": "nx",
75+
"version": "19.2.1-beta.0",
76+
"requires": { "@angular-eslint/eslint-plugin": ">=18.0.0" },
77+
"description": "Installs the '@typescript-eslint/utils' package when having installed '@angular-eslint/eslint-plugin' or '@angular-eslint/eslint-plugin-template' with version >=18.0.0.",
78+
"factory": "./src/migrations/update-19-2-1/add-typescript-eslint-utils",
2679
"package": "@nx/angular",
27-
"name": "update-angular-cli-version-17-2-0"
80+
"name": "add-typescript-eslint-utils"
2881
},
2982
{
3083
"cli": "nx",
31-
"version": "18.1.1-beta.0",
32-
"description": "Ensure targetDefaults inputs for task hashing when '@nx/angular:webpack-browser' is used are correct for Module Federation.",
33-
"factory": "./src/migrations/update-18-1-1/fix-target-defaults-inputs",
84+
"version": "19.5.0-beta.1",
85+
"requires": { "@angular/core": ">=18.1.0" },
86+
"description": "Update the @angular/cli package version to ~18.1.0.",
87+
"factory": "./src/migrations/update-19-5-0/update-angular-cli",
3488
"package": "@nx/angular",
35-
"name": "fix-target-defaults-for-webpack-browser"
89+
"name": "update-angular-cli-version-18-1-0"
3690
},
3791
{
3892
"cli": "nx",
39-
"version": "18.2.0-beta.0",
40-
"requires": {
41-
"@angular/core": ">=17.3.0"
42-
},
43-
"description": "Update the @angular/cli package version to ~17.3.0.",
44-
"factory": "./src/migrations/update-18-2-0/update-angular-cli",
93+
"version": "19.6.0-beta.4",
94+
"description": "Ensure Module Federation DTS is turned off by default.",
95+
"factory": "./src/migrations/update-19-6-0/turn-off-dts-by-default",
4596
"package": "@nx/angular",
46-
"name": "update-angular-cli-version-17-3-0"
97+
"name": "update-19-6-0"
4798
},
4899
{
49100
"cli": "nx",
50-
"version": "19.1.0-beta.2",
51-
"requires": {
52-
"@angular/core": ">=18.0.0"
53-
},
54-
"description": "Update the @angular/cli package version to ~18.0.0.",
55-
"factory": "./src/migrations/update-19-1-0/update-angular-cli",
101+
"version": "19.6.0-beta.7",
102+
"requires": { "@angular/core": ">=18.2.0" },
103+
"description": "Update the @angular/cli package version to ~18.2.0.",
104+
"factory": "./src/migrations/update-19-6-0/update-angular-cli",
56105
"package": "@nx/angular",
57-
"name": "update-angular-cli-version-18-0-0"
106+
"name": "update-angular-cli-version-18-2-0"
58107
},
59108
{
60109
"cli": "nx",
61-
"version": "18.1.0-beta.3",
62-
"description": "Remove invalid baseUrl option from @nx/playwright:playwright targets in project.json.",
63-
"implementation": "./src/migrations/update-18-1-0/remove-baseUrl-from-project-json",
64-
"package": "@nx/playwright",
65-
"name": "18-1-0-remove-baseUrl-from-project-json"
110+
"version": "19.6.1-beta.0",
111+
"description": "Ensure Target Defaults are set correctly for Module Federation.",
112+
"factory": "./src/migrations/update-19-6-1/ensure-depends-on-for-mf",
113+
"package": "@nx/angular",
114+
"name": "update-19-6-1-ensure-module-federation-target-defaults"
115+
},
116+
{
117+
"cli": "nx",
118+
"version": "20.2.0-beta.2",
119+
"description": "Update the ModuleFederationConfig import use @nx/module-federation.",
120+
"factory": "./src/migrations/update-20-2-0/migrate-mf-imports-to-new-package",
121+
"package": "@nx/angular",
122+
"name": "update-20-2-0-update-module-federation-config-import"
123+
},
124+
{
125+
"cli": "nx",
126+
"version": "20.2.0-beta.2",
127+
"description": "Update the withModuleFederation import use @nx/module-federation/angular.",
128+
"factory": "./src/migrations/update-20-2-0/migrate-with-mf-import-to-new-package",
129+
"package": "@nx/angular",
130+
"name": "update-20-2-0-update-with-module-federation-import"
131+
},
132+
{
133+
"cli": "nx",
134+
"version": "20.2.0-beta.5",
135+
"requires": { "@angular/core": ">=19.0.0" },
136+
"description": "Update the @angular/cli package version to ~19.0.0.",
137+
"factory": "./src/migrations/update-20-2-0/update-angular-cli",
138+
"package": "@nx/angular",
139+
"name": "update-angular-cli-version-19-0-0"
140+
},
141+
{
142+
"cli": "nx",
143+
"version": "20.2.0-beta.5",
144+
"requires": { "@angular/core": ">=19.0.0" },
145+
"description": "Add the '@angular/localize/init' polyfill to the 'polyfills' option of targets using esbuild-based executors.",
146+
"factory": "./src/migrations/update-20-2-0/add-localize-polyfill-to-targets",
147+
"package": "@nx/angular",
148+
"name": "add-localize-polyfill-to-targets"
149+
},
150+
{
151+
"cli": "nx",
152+
"version": "20.2.0-beta.5",
153+
"requires": { "@angular/core": ">=19.0.0" },
154+
"description": "Update '@angular/ssr' import paths to use the new '/node' entry point when 'CommonEngine' is detected.",
155+
"factory": "./src/migrations/update-20-2-0/update-angular-ssr-imports-to-use-node-entry-point",
156+
"package": "@nx/angular",
157+
"name": "update-angular-ssr-imports-to-use-node-entry-point"
158+
},
159+
{
160+
"cli": "nx",
161+
"version": "20.2.0-beta.6",
162+
"requires": { "@angular/core": ">=19.0.0" },
163+
"description": "Disable the Angular ESLint prefer-standalone rule if not set.",
164+
"factory": "./src/migrations/update-20-2-0/disable-angular-eslint-prefer-standalone",
165+
"package": "@nx/angular",
166+
"name": "disable-angular-eslint-prefer-standalone"
167+
},
168+
{
169+
"cli": "nx",
170+
"version": "20.2.0-beta.8",
171+
"requires": { "@angular/core": ">=19.0.0" },
172+
"description": "Remove Angular ESLint rules that were removed in v19.0.0.",
173+
"factory": "./src/migrations/update-20-2-0/remove-angular-eslint-rules",
174+
"package": "@nx/angular",
175+
"name": "remove-angular-eslint-rules"
176+
},
177+
{
178+
"cli": "nx",
179+
"version": "20.2.0-beta.8",
180+
"requires": { "@angular/core": ">=19.0.0" },
181+
"description": "Remove the deprecated 'tailwindConfig' option from ng-packagr executors. Tailwind CSS configurations located at the project or workspace root will be picked up automatically.",
182+
"factory": "./src/migrations/update-20-2-0/remove-tailwind-config-from-ng-packagr-executors",
183+
"package": "@nx/angular",
184+
"name": "remove-tailwind-config-from-ng-packagr-executors"
185+
},
186+
{
187+
"version": "19.0.0",
188+
"description": "Updates non-standalone Directives, Component and Pipes to 'standalone:false' and removes 'standalone:true' from those who are standalone",
189+
"factory": "./bundles/explicit-standalone-flag#migrate",
190+
"package": "@angular/core",
191+
"name": "explicit-standalone-flag"
66192
},
67193
{
68-
"version": "18.0.0",
69-
"description": "Updates two-way bindings that have an invalid expression to use the longform expression instead.",
70-
"factory": "./migrations/invalid-two-way-bindings/bundle",
194+
"version": "19.0.0",
195+
"description": "Updates ExperimentalPendingTasks to PendingTasks",
196+
"factory": "./bundles/pending-tasks#migrate",
71197
"package": "@angular/core",
72-
"name": "invalid-two-way-bindings"
198+
"name": "pending-tasks"
73199
},
74200
{
75-
"version": "18.0.0",
76-
"description": "Replace deprecated HTTP related modules with provider functions",
77-
"factory": "./migrations/http-providers/bundle",
201+
"version": "19.0.0",
202+
"description": "Replaces `APP_INITIALIZER`, `ENVIRONMENT_INITIALIZER` & `PLATFORM_INITIALIZER` respectively with `provideAppInitializer`, `provideEnvironmentInitializer` & `providePlatformInitializer`.",
203+
"factory": "./bundles/provide-initializer#migrate",
204+
"optional": true,
78205
"package": "@angular/core",
79-
"name": "migration-http-providers"
206+
"name": "provide-initializer"
80207
}
81208
]
82-
}
209+
}

‎nx.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -62,5 +62,6 @@
6262
"style": "scss"
6363
}
6464
},
65-
"defaultProject": "query-playground"
65+
"defaultProject": "query-playground",
66+
"useLegacyCache": true
6667
}

‎package-lock.json

+11,930-11,603
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json

+44-43
Original file line numberDiff line numberDiff line change
@@ -19,52 +19,53 @@
1919
},
2020
"private": true,
2121
"dependencies": {
22-
"@angular/animations": "18.0.1",
23-
"@angular/common": "18.0.1",
24-
"@angular/compiler": "18.0.1",
25-
"@angular/core": "18.0.1",
26-
"@angular/forms": "18.0.1",
27-
"@angular/platform-browser": "18.0.1",
28-
"@angular/platform-browser-dynamic": "18.0.1",
29-
"@angular/router": "18.0.1",
22+
"@angular/animations": "~19.0.4",
23+
"@angular/common": "~19.0.4",
24+
"@angular/compiler": "~19.0.4",
25+
"@angular/core": "~19.0.4",
26+
"@angular/forms": "~19.0.4",
27+
"@angular/platform-browser": "~19.0.4",
28+
"@angular/platform-browser-dynamic": "~19.0.4",
29+
"@angular/router": "~19.0.4",
3030
"@ngneat/until-destroy": "^10.0.0",
31-
"@nx/angular": "19.1.1",
32-
"@tanstack/query-core": "^5.17.1",
31+
"@nx/angular": "~20.2.2",
32+
"@tanstack/query-core": "^5.62.7",
3333
"bulma": "^0.9.4",
34-
"ngxtension": "^2.0.0",
34+
"ngxtension": "^4.2.0",
3535
"rxjs": "~7.8.0",
36-
"tslib": "^2.3.0",
37-
"zone.js": "0.14.4"
36+
"tslib": "^2.4.0",
37+
"zone.js": "0.15.0"
3838
},
3939
"devDependencies": {
40-
"@angular-devkit/build-angular": "18.0.2",
41-
"@angular-devkit/core": "18.0.2",
42-
"@angular-devkit/schematics": "18.0.2",
43-
"@angular-eslint/eslint-plugin": "17.3.0",
44-
"@angular-eslint/eslint-plugin-template": "17.3.0",
45-
"@angular-eslint/template-parser": "17.3.0",
46-
"@angular/cli": "~18.0.0",
47-
"@angular/compiler-cli": "18.0.1",
48-
"@angular/language-service": "18.0.1",
40+
"@angular-devkit/build-angular": "19.0.5",
41+
"@angular-devkit/core": "19.0.5",
42+
"@angular-devkit/schematics": "19.0.5",
43+
"@angular-eslint/eslint-plugin": "19.0.2",
44+
"@angular-eslint/eslint-plugin-template": "19.0.2",
45+
"@angular-eslint/template-parser": "19.0.2",
46+
"@angular/cli": "~19.0.0",
47+
"@angular/compiler-cli": "19.0.4",
48+
"@angular/language-service": "19.0.4",
4949
"@commitlint/cli": "19.3.0",
5050
"@commitlint/config-angular": "19.3.0",
5151
"@commitlint/config-conventional": "19.2.2",
52-
"@jscutlery/semver": "5.2.2",
53-
"@nx/devkit": "19.1.1",
54-
"@nx/eslint": "19.1.1",
55-
"@nx/eslint-plugin": "19.1.1",
56-
"@nx/jest": "19.1.1",
57-
"@nx/js": "19.1.1",
58-
"@nx/playwright": "19.1.1",
59-
"@nx/workspace": "19.1.1",
52+
"@jscutlery/semver": "^5.5.1",
53+
"@nx/devkit": "20.2.2",
54+
"@nx/eslint": "20.2.2",
55+
"@nx/eslint-plugin": "20.2.2",
56+
"@nx/jest": "20.2.2",
57+
"@nx/js": "20.2.2",
58+
"@nx/playwright": "20.2.2",
59+
"@nx/workspace": "20.2.2",
6060
"@playwright/test": "^1.36.0",
61-
"@schematics/angular": "18.0.2",
62-
"@swc-node/register": "1.8.0",
63-
"@swc/core": "~1.3.85",
64-
"@types/jest": "^29.4.0",
61+
"@schematics/angular": "19.0.5",
62+
"@swc-node/register": "1.9.2",
63+
"@swc/core": "1.5.7",
64+
"@types/jest": "29.5.14",
6565
"@types/node": "^18.16.9",
66-
"@typescript-eslint/eslint-plugin": "7.9.0",
67-
"@typescript-eslint/parser": "7.9.0",
66+
"@typescript-eslint/eslint-plugin": "7.16.0",
67+
"@typescript-eslint/parser": "7.16.0",
68+
"@typescript-eslint/utils": "^7.16.0",
6869
"autoprefixer": "^10.4.0",
6970
"commitizen": "^4.3.0",
7071
"cz-conventional-changelog": "^3.3.0",
@@ -74,24 +75,24 @@
7475
"expect-type": "^0.17.3",
7576
"git-cz": "^4.9.0",
7677
"husky": "^8.0.3",
77-
"jest": "^29.4.1",
78-
"jest-environment-jsdom": "^29.4.1",
79-
"jest-preset-angular": "14.1.0",
78+
"jest": "29.7.0",
79+
"jest-environment-jsdom": "29.7.0",
80+
"jest-preset-angular": "14.4.2",
8081
"jsonc-eslint-parser": "^2.1.0",
81-
"ng-packagr": "18.0.0",
82-
"nx": "19.1.1",
82+
"ng-packagr": "19.0.1",
83+
"nx": "20.2.2",
8384
"postcss": "^8.4.5",
8485
"postcss-import": "~14.1.0",
8586
"postcss-preset-env": "~7.5.0",
8687
"postcss-url": "~10.1.3",
8788
"prettier": "3.1.0",
8889
"ts-jest": "^29.1.0",
8990
"ts-node": "10.9.1",
90-
"typescript": "5.4.5"
91+
"typescript": "5.6.3"
9192
},
9293
"overrides": {
9394
"@jscutlery/semver": {
94-
"@nx/devkit": "19.1.1"
95+
"@nx/devkit": "20.2.2"
9596
}
9697
},
9798
"workspaces": [

‎query/.eslintrc.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@
2525
"prefix": "query",
2626
"style": "kebab-case"
2727
}
28-
]
28+
],
29+
"@angular-eslint/prefer-standalone": "off"
2930
}
3031
},
3132
{

‎query/package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@
1010
"url": "https://github.com/sponsors/ngneat"
1111
},
1212
"peerDependencies": {
13-
"@tanstack/query-core": "^5.4.3",
14-
"@angular/core": ">=16.0.0 <19.0.0"
13+
"@tanstack/query-core": "^5.62.7",
14+
"@angular/core": ">=16.0.0 <=19.0.4"
1515
},
1616
"dependencies": {
17-
"tslib": "^2.3.0"
17+
"tslib": "^2.4.0"
1818
},
1919
"publishConfig": {
2020
"access": "public"

‎query/src/lib/base-query.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ export function createBaseQuery<
166166
...newOptions,
167167
},
168168
injector,
169-
) as QueryObserverOptions<
169+
) as unknown as QueryObserverOptions<
170170
TQueryFnData,
171171
TError,
172172
TData,

‎query/src/lib/query-options.ts

+11-9
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
import { Injector, runInInjectionContext } from '@angular/core';
2-
import type {
3-
DataTag,
4-
DefaultError,
5-
DefaultedQueryObserverOptions,
6-
QueryClient,
7-
QueryFunctionContext,
8-
QueryKey,
9-
QueryObserverOptions,
2+
import {
3+
skipToken,
4+
type DataTag,
5+
type DefaultError,
6+
type DefaultedQueryObserverOptions,
7+
type QueryClient,
8+
type QueryFunctionContext,
9+
type QueryKey,
10+
type QueryObserverOptions,
1011
} from '@tanstack/query-core';
1112
import { isObservable } from 'rxjs';
1213
import { CreateBaseQueryOptions } from './base-query';
@@ -122,7 +123,8 @@ export function normalizeOptions<
122123

123124
const originalQueryFn = defaultedOptions.queryFn;
124125

125-
if (originalQueryFn) {
126+
// once the skipToken is encountered we just return the default options instead
127+
if (originalQueryFn && originalQueryFn !== skipToken) {
126128
defaultedOptions.queryFn = function (ctx: QueryFunctionContext) {
127129
// eslint-disable-next-line @typescript-eslint/no-this-alias
128130
const _this = this;

‎src/app/app.component.ts

+4-5
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,9 @@ import { Component } from '@angular/core';
22
import { RouterModule } from '@angular/router';
33

44
@Component({
5-
standalone: true,
6-
imports: [RouterModule],
7-
selector: 'query-root',
8-
templateUrl: './app.component.html',
9-
styleUrls: ['./app.component.scss'],
5+
imports: [RouterModule],
6+
selector: 'query-root',
7+
templateUrl: './app.component.html',
8+
styleUrls: ['./app.component.scss']
109
})
1110
export class AppComponent {}

‎src/app/basic-page/todos-page.component.ts

+4-5
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,10 @@ import { TabsComponent } from '../ui/query-tabs/tabs.component';
1010
import { TabComponent } from '../ui/query-tab/tab.component';
1111

1212
@Component({
13-
selector: 'query-todos-page',
14-
standalone: true,
15-
imports: [CommonModule, TabsComponent, TabComponent],
16-
templateUrl: './todos-page.component.html',
17-
changeDetection: ChangeDetectionStrategy.OnPush,
13+
selector: 'query-todos-page',
14+
imports: [CommonModule, TabsComponent, TabComponent],
15+
templateUrl: './todos-page.component.html',
16+
changeDetection: ChangeDetectionStrategy.OnPush
1817
})
1918
export class TodosPageComponent {
2019
#todosService = inject(TodosService);

‎src/app/dynamic-page/dynamic-page.component.ts

+4-5
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,10 @@ import { computedAsync } from 'ngxtension/computed-async';
55
import { createPendingObserverResult } from '@ngneat/query';
66

77
@Component({
8-
selector: 'query-dynamic-page',
9-
standalone: true,
10-
imports: [RouterModule],
11-
templateUrl: './dynamic-page.component.html',
12-
styleUrls: ['./dynamic-page.component.scss'],
8+
selector: 'query-dynamic-page',
9+
imports: [RouterModule],
10+
templateUrl: './dynamic-page.component.html',
11+
styleUrls: ['./dynamic-page.component.scss']
1312
})
1413
export class DynamicPageComponent {
1514
id = input.required<string>();

‎src/app/infinite-scroll-page/posts-page.component.ts

+5-6
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,11 @@ import { PostsService } from './posts.service';
44
import { InViewDirective } from './in-view.directive';
55

66
@Component({
7-
selector: 'query-posts-page',
8-
standalone: true,
9-
imports: [CommonModule, InViewDirective],
10-
templateUrl: './posts-page.component.html',
11-
styles: [],
12-
changeDetection: ChangeDetectionStrategy.OnPush,
7+
selector: 'query-posts-page',
8+
imports: [CommonModule, InViewDirective],
9+
templateUrl: './posts-page.component.html',
10+
styles: [],
11+
changeDetection: ChangeDetectionStrategy.OnPush
1312
})
1413
export class PostsPageComponent {
1514
posts$ = inject(PostsService).getPosts().result$;

‎src/app/intersecting-page/intersecting-page.component.ts

+5-6
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,11 @@ import { intersectResults, intersectResults$ } from '@ngneat/query';
55
import { combineLatest } from 'rxjs';
66

77
@Component({
8-
selector: 'query-intersecting-page',
9-
standalone: true,
10-
imports: [CommonModule],
11-
templateUrl: './intersecting-page.component.html',
12-
styles: [],
13-
changeDetection: ChangeDetectionStrategy.OnPush,
8+
selector: 'query-intersecting-page',
9+
imports: [CommonModule],
10+
templateUrl: './intersecting-page.component.html',
11+
styles: [],
12+
changeDetection: ChangeDetectionStrategy.OnPush
1413
})
1514
export class IntersectingPageComponent {
1615
#todosService = inject(TodosService);

‎src/app/mutation-page/mutation-page.component.ts

+4-5
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,10 @@ import { TodosService } from '../services/todos.service';
77
import { TabsComponent } from '../ui/query-tabs/tabs.component';
88
import { TabComponent } from '../ui/query-tab/tab.component';
99
@Component({
10-
selector: 'query-mutation-page',
11-
standalone: true,
12-
imports: [CommonModule, FormsModule, TabsComponent, TabComponent],
13-
templateUrl: './mutation-page.component.html',
14-
changeDetection: ChangeDetectionStrategy.OnPush,
10+
selector: 'query-mutation-page',
11+
imports: [CommonModule, FormsModule, TabsComponent, TabComponent],
12+
templateUrl: './mutation-page.component.html',
13+
changeDetection: ChangeDetectionStrategy.OnPush
1514
})
1615
export class MutationPageComponent {
1716
#useIsMutating = injectIsMutating();

‎src/app/pagination-page/pagination-page.component.ts

+5-6
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,11 @@ import { TabsComponent } from '../ui/query-tabs/tabs.component';
66
import { TabComponent } from '../ui/query-tab/tab.component';
77

88
@Component({
9-
selector: 'query-pagination-page',
10-
standalone: true,
11-
imports: [CommonModule, TabsComponent, TabComponent],
12-
templateUrl: './pagination-page.component.html',
13-
styleUrls: ['./pagination-page.component.scss'],
14-
changeDetection: ChangeDetectionStrategy.OnPush,
9+
selector: 'query-pagination-page',
10+
imports: [CommonModule, TabsComponent, TabComponent],
11+
templateUrl: './pagination-page.component.html',
12+
styleUrls: ['./pagination-page.component.scss'],
13+
changeDetection: ChangeDetectionStrategy.OnPush
1514
})
1615
export class PaginationPageComponent {
1716
#page = new BehaviorSubject(0);

‎src/app/prefetch-page/prefetch-page.component.ts

+5-6
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,11 @@ import { ChangeDetectionStrategy, Component, Input } from '@angular/core';
33
import { Todo } from '../services/todos.service';
44

55
@Component({
6-
selector: 'query-prefetch-page',
7-
standalone: true,
8-
imports: [CommonModule],
9-
templateUrl: './prefetch-page.component.html',
10-
styles: [],
11-
changeDetection: ChangeDetectionStrategy.OnPush,
6+
selector: 'query-prefetch-page',
7+
imports: [CommonModule],
8+
templateUrl: './prefetch-page.component.html',
9+
styles: [],
10+
changeDetection: ChangeDetectionStrategy.OnPush
1211
})
1312
export class PrefetchPageComponent {
1413
@Input() todos: Todo[] = [];

‎src/app/ui/query-tab/tab.component.ts

+4-5
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
import { Component, Input } from '@angular/core';
22

33
@Component({
4-
selector: 'query-tab',
5-
standalone: true,
6-
imports: [],
7-
templateUrl: './tab.component.html',
8-
styles: '',
4+
selector: 'query-tab',
5+
imports: [],
6+
templateUrl: './tab.component.html',
7+
styles: ''
98
})
109
export class TabComponent {
1110
@Input({ required: true }) title = '';

‎src/app/ui/query-tabs/tabs.component.ts

+5-6
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,15 @@ import { NgComponentOutlet, NgForOf } from '@angular/common';
88
import { TabComponent } from '../query-tab/tab.component';
99

1010
@Component({
11-
selector: 'query-tabs',
12-
standalone: true,
13-
imports: [NgForOf, NgComponentOutlet],
14-
templateUrl: './tabs.component.html',
15-
styles: `
11+
selector: 'query-tabs',
12+
imports: [NgForOf, NgComponentOutlet],
13+
templateUrl: './tabs.component.html',
14+
styles: `
1615
.is-active-tab a {
1716
color: #b93eff;
1817
border-bottom-color: #b93eff;
1918
}
20-
`,
19+
`
2120
})
2221
export class TabsComponent implements AfterContentInit {
2322
@ContentChildren(TabComponent, { read: TabComponent })

0 commit comments

Comments
 (0)
Please sign in to comment.