Skip to content

Commit

Permalink
chore(angular-query): update to angular 19
Browse files Browse the repository at this point in the history
  • Loading branch information
arnoud-dv committed Nov 25, 2024
1 parent ef0b7b2 commit 7315df1
Show file tree
Hide file tree
Showing 40 changed files with 4,498 additions and 992 deletions.
6 changes: 3 additions & 3 deletions examples/angular/basic/angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"prefix": "app",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:application",
"builder": "@angular/build:application",
"options": {
"outputPath": "dist/basic",
"index": "src/index.html",
Expand Down Expand Up @@ -81,7 +81,7 @@
"defaultConfiguration": "production"
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"builder": "@angular/build:dev-server",
"configurations": {
"production": {
"buildTarget": "basic:build:production"
Expand All @@ -93,7 +93,7 @@
"defaultConfiguration": "development"
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"builder": "@angular/build:extract-i18n",
"options": {
"buildTarget": "basic:build"
}
Expand Down
20 changes: 10 additions & 10 deletions examples/angular/basic/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,20 @@
},
"private": true,
"dependencies": {
"@angular/common": "^17.3.12",
"@angular/compiler": "^17.3.12",
"@angular/core": "^17.3.12",
"@angular/platform-browser": "^17.3.12",
"@angular/platform-browser-dynamic": "^17.3.12",
"@angular/common": "^19.0.0",
"@angular/compiler": "^19.0.0",
"@angular/core": "^19.0.0",
"@angular/platform-browser": "^19.0.0",
"@angular/platform-browser-dynamic": "^19.0.0",
"@tanstack/angular-query-experimental": "^5.61.3",
"rxjs": "^7.8.1",
"tslib": "^2.6.3",
"zone.js": "^0.14.8"
"zone.js": "^0.15.0"
},
"devDependencies": {
"@angular-devkit/build-angular": "^17.3.8",
"@angular/cli": "^17.3.8",
"@angular/compiler-cli": "^17.3.12",
"typescript": "5.4.5"
"@angular/build": "^19.0.1",
"@angular/cli": "^19.0.1",
"@angular/compiler-cli": "^19.0.0",
"typescript": "5.6.3"
}
}
9 changes: 4 additions & 5 deletions examples/angular/basic/src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@ import { PostComponent } from './components/post.component'
import { PostsComponent } from './components/posts.component'

@Component({
changeDetection: ChangeDetectionStrategy.OnPush,
selector: 'basic-example',
standalone: true,
templateUrl: './app.component.html',
imports: [PostComponent, PostsComponent],
changeDetection: ChangeDetectionStrategy.OnPush,
selector: 'basic-example',
templateUrl: './app.component.html',
imports: [PostComponent, PostsComponent]
})
export class BasicExampleComponent {
postId = signal(-1)
Expand Down
6 changes: 3 additions & 3 deletions examples/angular/devtools-panel/angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"prefix": "app",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:application",
"builder": "@angular/build:application",
"options": {
"outputPath": "dist/devtools-panel",
"index": "src/index.html",
Expand Down Expand Up @@ -79,7 +79,7 @@
"defaultConfiguration": "production"
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"builder": "@angular/build:dev-server",
"configurations": {
"production": {
"buildTarget": "devtools-panel:build:production"
Expand All @@ -91,7 +91,7 @@
"defaultConfiguration": "development"
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"builder": "@angular/build:extract-i18n",
"options": {
"buildTarget": "devtools-panel:build"
}
Expand Down
22 changes: 11 additions & 11 deletions examples/angular/devtools-panel/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,22 @@
},
"private": true,
"dependencies": {
"@angular/common": "^17.3.12",
"@angular/compiler": "^17.3.12",
"@angular/core": "^17.3.12",
"@angular/platform-browser": "^17.3.12",
"@angular/platform-browser-dynamic": "^17.3.12",
"@angular/router": "^17.3.12",
"@angular/common": "^19.0.0",
"@angular/compiler": "^19.0.0",
"@angular/core": "^19.0.0",
"@angular/platform-browser": "^19.0.0",
"@angular/platform-browser-dynamic": "^19.0.0",
"@angular/router": "^19.0.0",
"@tanstack/angular-query-devtools-experimental": "^5.61.3",
"@tanstack/angular-query-experimental": "^5.61.3",
"rxjs": "^7.8.1",
"tslib": "^2.6.3",
"zone.js": "^0.14.8"
"zone.js": "^0.15.0"
},
"devDependencies": {
"@angular-devkit/build-angular": "^17.3.8",
"@angular/cli": "^17.3.8",
"@angular/compiler-cli": "^17.3.12",
"typescript": "5.4.5"
"@angular/build": "^19.0.1",
"@angular/cli": "^19.0.1",
"@angular/compiler-cli": "^19.0.0",
"typescript": "5.6.3"
}
}
9 changes: 4 additions & 5 deletions examples/angular/devtools-panel/src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@ import { RouterLink, RouterOutlet } from '@angular/router'
import { ExampleQueryComponent } from './components/example-query.component'

@Component({
changeDetection: ChangeDetectionStrategy.OnPush,
selector: 'app-root',
standalone: true,
template: `
changeDetection: ChangeDetectionStrategy.OnPush,
selector: 'app-root',
template: `
<ul>
<li>
<a routerLink="basic">Basic devtools panel example</a>
Expand All @@ -18,6 +17,6 @@ import { ExampleQueryComponent } from './components/example-query.component'
<router-outlet />
`,
imports: [ExampleQueryComponent, RouterOutlet, RouterLink],
imports: [ExampleQueryComponent, RouterOutlet, RouterLink]
})
export class AppComponent {}
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@ import { ExampleQueryComponent } from './example-query.component'
import type { ElementRef } from '@angular/core'

@Component({
standalone: true,
selector: 'basic-devtools-panel-example',
changeDetection: ChangeDetectionStrategy.OnPush,
template: `
selector: 'basic-devtools-panel-example',
changeDetection: ChangeDetectionStrategy.OnPush,
template: `
<example-query />
<h1>Basic devtools panel example</h1>
<p>
Expand All @@ -21,7 +20,7 @@ import type { ElementRef } from '@angular/core'
<div #div style="height: 500px"></div>
}
`,
imports: [ExampleQueryComponent],
imports: [ExampleQueryComponent]
})
export default class BasicDevtoolsPanelExampleComponent {
isOpen = false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,9 @@ import type { ElementRef } from '@angular/core'
import type { DevtoolsPanelRef } from '@tanstack/angular-query-devtools-experimental'

@Component({
standalone: true,
selector: 'lazy-load-devtools-panel-example',
changeDetection: ChangeDetectionStrategy.OnPush,
template: `
selector: 'lazy-load-devtools-panel-example',
changeDetection: ChangeDetectionStrategy.OnPush,
template: `
<example-query />
<h1>Lazy load devtools panel example</h1>
<p>
Expand All @@ -28,7 +27,7 @@ import type { DevtoolsPanelRef } from '@tanstack/angular-query-devtools-experime
<div #div style="height: 500px"></div>
}
`,
imports: [ExampleQueryComponent],
imports: [ExampleQueryComponent]
})
export default class LazyLoadDevtoolsPanelExampleComponent {
isOpen = false
Expand Down
6 changes: 3 additions & 3 deletions examples/angular/infinite-query-with-max-pages/angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"prefix": "app",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:application",
"builder": "@angular/build:application",
"options": {
"outputPath": "dist/infinite-query-with-max-pages",
"index": "src/index.html",
Expand Down Expand Up @@ -81,7 +81,7 @@
"defaultConfiguration": "production"
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"builder": "@angular/build:dev-server",
"configurations": {
"production": {
"buildTarget": "infinite-query-with-max-pages:build:production"
Expand All @@ -93,7 +93,7 @@
"defaultConfiguration": "development"
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"builder": "@angular/build:extract-i18n",
"options": {
"buildTarget": "infinite-query-with-max-pages:build"
}
Expand Down
20 changes: 10 additions & 10 deletions examples/angular/infinite-query-with-max-pages/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,20 @@
"watch": "ng build --watch --configuration development"
},
"dependencies": {
"@angular/common": "^17.3.12",
"@angular/compiler": "^17.3.12",
"@angular/core": "^17.3.12",
"@angular/platform-browser": "^17.3.12",
"@angular/platform-browser-dynamic": "^17.3.12",
"@angular/common": "^19.0.0",
"@angular/compiler": "^19.0.0",
"@angular/core": "^19.0.0",
"@angular/platform-browser": "^19.0.0",
"@angular/platform-browser-dynamic": "^19.0.0",
"@tanstack/angular-query-experimental": "^5.61.3",
"rxjs": "^7.8.1",
"tslib": "^2.6.3",
"zone.js": "^0.14.8"
"zone.js": "^0.15.0"
},
"devDependencies": {
"@angular-devkit/build-angular": "^17.3.8",
"@angular/cli": "^17.3.8",
"@angular/compiler-cli": "^17.3.12",
"typescript": "5.4.5"
"@angular/build": "^19.0.1",
"@angular/cli": "^19.0.1",
"@angular/compiler-cli": "^19.0.0",
"typescript": "5.6.3"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@ import { ChangeDetectionStrategy, Component } from '@angular/core'
import { ExampleComponent } from './components/example.component'

@Component({
changeDetection: ChangeDetectionStrategy.OnPush,
selector: 'app-root',
standalone: true,
template: `<example />`,
imports: [ExampleComponent],
changeDetection: ChangeDetectionStrategy.OnPush,
selector: 'app-root',
template: `<example />`,
imports: [ExampleComponent]
})
export class AppComponent {}
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
import {
provideHttpClient,
withFetch,
withInterceptors,
} from '@angular/common/http'
import { provideHttpClient, withFetch, withInterceptors } from '@angular/common/http'
import {
QueryClient,
provideTanStackQuery,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,10 @@ import { ProjectStyleDirective } from '../directives/project-style.directive'
import { ProjectsService } from '../services/projects.service'

@Component({
changeDetection: ChangeDetectionStrategy.OnPush,
selector: 'example',
standalone: true,
templateUrl: './example.component.html',
imports: [ProjectStyleDirective],
changeDetection: ChangeDetectionStrategy.OnPush,
selector: 'example',
templateUrl: './example.component.html',
imports: [ProjectStyleDirective]
})
export class ExampleComponent {
projectsService = inject(ProjectsService)
Expand Down
6 changes: 3 additions & 3 deletions examples/angular/pagination/angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"prefix": "app",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:application",
"builder": "@angular/build:application",
"options": {
"outputPath": "dist/pagination",
"index": "src/index.html",
Expand Down Expand Up @@ -81,7 +81,7 @@
"defaultConfiguration": "production"
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"builder": "@angular/build:dev-server",
"configurations": {
"production": {
"buildTarget": "pagination:build:production"
Expand All @@ -93,7 +93,7 @@
"defaultConfiguration": "development"
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"builder": "@angular/build:extract-i18n",
"options": {
"buildTarget": "pagination:build"
}
Expand Down
20 changes: 10 additions & 10 deletions examples/angular/pagination/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,20 @@
"watch": "ng build --watch --configuration development"
},
"dependencies": {
"@angular/common": "^17.3.12",
"@angular/compiler": "^17.3.12",
"@angular/core": "^17.3.12",
"@angular/platform-browser": "^17.3.12",
"@angular/platform-browser-dynamic": "^17.3.12",
"@angular/common": "^19.0.0",
"@angular/compiler": "^19.0.0",
"@angular/core": "^19.0.0",
"@angular/platform-browser": "^19.0.0",
"@angular/platform-browser-dynamic": "^19.0.0",
"@tanstack/angular-query-experimental": "^5.61.3",
"rxjs": "^7.8.1",
"tslib": "^2.6.3",
"zone.js": "^0.14.8"
"zone.js": "^0.15.0"
},
"devDependencies": {
"@angular-devkit/build-angular": "^17.3.8",
"@angular/cli": "^17.3.8",
"@angular/compiler-cli": "^17.3.12",
"typescript": "5.4.5"
"@angular/build": "^19.0.1",
"@angular/cli": "^19.0.1",
"@angular/compiler-cli": "^19.0.0",
"typescript": "5.6.3"
}
}
9 changes: 4 additions & 5 deletions examples/angular/pagination/src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@ import { ChangeDetectionStrategy, Component } from '@angular/core'
import { ExampleComponent } from './components/example.component'

@Component({
changeDetection: ChangeDetectionStrategy.OnPush,
selector: 'app-root',
standalone: true,
template: `<example />`,
imports: [ExampleComponent],
changeDetection: ChangeDetectionStrategy.OnPush,
selector: 'app-root',
template: `<example />`,
imports: [ExampleComponent]
})
export class AppComponent {}
6 changes: 1 addition & 5 deletions examples/angular/pagination/src/app/app.config.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
import {
provideHttpClient,
withFetch,
withInterceptors,
} from '@angular/common/http'
import { provideHttpClient, withFetch, withInterceptors } from '@angular/common/http'
import {
QueryClient,
provideTanStackQuery,
Expand Down
Loading

0 comments on commit 7315df1

Please sign in to comment.