Skip to content

Commit 94891fd

Browse files
refactor(angular-query): build with tsup and remove devtools component (#8284)
* chore(angular-query): build with tsup * ci: apply automated fixes * remove unused tslib dependency --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
1 parent c9fcd2f commit 94891fd

File tree

31 files changed

+374
-438
lines changed

31 files changed

+374
-438
lines changed

examples/angular/pagination/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
"@angular-devkit/build-angular": "^17.3.8",
2424
"@angular/cli": "^17.3.8",
2525
"@angular/compiler-cli": "^17.3.12",
26-
"@tanstack/angular-query-devtools-experimental": "^5.60.0",
2726
"typescript": "5.3.3"
2827
}
2928
}
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
import { ChangeDetectionStrategy, Component } from '@angular/core'
2-
import { AngularQueryDevtools } from '@tanstack/angular-query-devtools-experimental'
32
import { ExampleComponent } from './components/example.component'
43

54
@Component({
65
changeDetection: ChangeDetectionStrategy.OnPush,
76
selector: 'app-root',
87
standalone: true,
9-
template: `<example /><angular-query-devtools initialIsOpen />`,
10-
imports: [AngularQueryDevtools, ExampleComponent],
8+
template: `<example />`,
9+
imports: [ExampleComponent],
1110
})
1211
export class AppComponent {}

examples/angular/pagination/src/app/app.config.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,14 @@ import {
66
import {
77
QueryClient,
88
provideTanStackQuery,
9+
withDevtools,
910
} from '@tanstack/angular-query-experimental'
1011
import { projectsMockInterceptor } from './api/projects-mock.interceptor'
1112
import type { ApplicationConfig } from '@angular/core'
1213

1314
export const appConfig: ApplicationConfig = {
1415
providers: [
1516
provideHttpClient(withInterceptors([projectsMockInterceptor]), withFetch()),
16-
provideTanStackQuery(new QueryClient()),
17+
provideTanStackQuery(new QueryClient(), withDevtools()),
1718
],
1819
}

examples/angular/query-options-from-a-service/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
"@angular-devkit/build-angular": "^17.3.8",
2525
"@angular/cli": "^17.3.8",
2626
"@angular/compiler-cli": "^17.3.12",
27-
"@tanstack/angular-query-devtools-experimental": "^5.60.0",
2827
"typescript": "5.3.3"
2928
}
3029
}

examples/angular/query-options-from-a-service/src/app/app.component.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,4 @@
88
sequences)
99
</strong>
1010
</p>
11-
<angular-query-devtools initialIsOpen />
1211
<router-outlet />

examples/angular/query-options-from-a-service/src/app/app.component.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
import { Component } from '@angular/core'
22
import { RouterOutlet } from '@angular/router'
3-
import { AngularQueryDevtools } from '@tanstack/angular-query-devtools-experimental'
43

54
@Component({
65
selector: 'app-root',
76
standalone: true,
8-
imports: [AngularQueryDevtools, RouterOutlet],
7+
imports: [RouterOutlet],
98
templateUrl: './app.component.html',
109
styles: [],
1110
})

examples/angular/rxjs/package.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
"watch": "ng build --watch --configuration development"
1010
},
1111
"dependencies": {
12-
"@angular/cdk": "17.3.10",
1312
"@angular/common": "^17.3.12",
1413
"@angular/compiler": "^17.3.12",
1514
"@angular/core": "^17.3.12",
@@ -25,7 +24,6 @@
2524
"@angular-devkit/build-angular": "^17.3.8",
2625
"@angular/cli": "^17.3.8",
2726
"@angular/compiler-cli": "^17.3.12",
28-
"@tanstack/angular-query-devtools-experimental": "^5.60.0",
2927
"typescript": "5.3.3"
3028
}
3129
}
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
import { ChangeDetectionStrategy, Component } from '@angular/core'
2-
import { AngularQueryDevtools } from '@tanstack/angular-query-devtools-experimental'
32
import { ExampleComponent } from './components/example.component'
43

54
@Component({
65
changeDetection: ChangeDetectionStrategy.OnPush,
76
selector: 'app-root',
87
standalone: true,
9-
template: `<example /><angular-query-devtools initialIsOpen />`,
10-
imports: [AngularQueryDevtools, ExampleComponent],
8+
template: `<example />`,
9+
imports: [ExampleComponent],
1110
})
1211
export class AppComponent {}

examples/angular/rxjs/src/app/components/example.component.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { ChangeDetectionStrategy, Component, inject } from '@angular/core'
22
import { toSignal } from '@angular/core/rxjs-interop'
33
import { NonNullableFormBuilder, ReactiveFormsModule } from '@angular/forms'
4-
import { AngularQueryDevtools } from '@tanstack/angular-query-devtools-experimental'
54
import {
65
injectQuery,
76
keepPreviousData,
@@ -14,7 +13,7 @@ import { AutocompleteService } from '../services/autocomplete-service'
1413
selector: 'example',
1514
standalone: true,
1615
templateUrl: './example.component.html',
17-
imports: [AngularQueryDevtools, ReactiveFormsModule],
16+
imports: [ReactiveFormsModule],
1817
})
1918
export class ExampleComponent {
2019
#autocompleteService = inject(AutocompleteService)

examples/angular/rxjs/src/app/services/autocomplete-service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ interface Response {
1111
})
1212
export class AutocompleteService {
1313
#http = inject(HttpClient)
14-
getSuggestions = (term: string) =>
14+
getSuggestions = (term: string = '') =>
1515
term.trim() === ''
1616
? of({ suggestions: [] })
1717
: this.#http.get<Response>(`/api/autocomplete?term=${term}`)

0 commit comments

Comments
 (0)