Skip to content

Commit fb3dece

Browse files
fix: update ng-packagr to fix schematics output (#5217)
1 parent b2a03cc commit fb3dece

11 files changed

Lines changed: 5561 additions & 7962 deletions

File tree

‎modules/schematics/src/component-store/__snapshots__/index.spec.ts.snap‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
exports[`component-store > should import into a specified module when the module provided 1`] = `
44
"import { NgModule, provideBrowserGlobalErrorListeners } from '@angular/core';
55
import { BrowserModule } from '@angular/platform-browser';
6-
76
import { App } from './app';
87
import { FooStore } from './foo/foo.store';
98
@@ -40,7 +39,6 @@ describe('FooStore', () => {
4039
exports[`component-store > should not be provided into the module by default 1`] = `
4140
"import { NgModule, provideBrowserGlobalErrorListeners } from '@angular/core';
4241
import { BrowserModule } from '@angular/platform-browser';
43-
4442
import { App } from './app';
4543
4644
@NgModule({
@@ -65,10 +63,10 @@ import { FooStore } from './foo/foo.store';
6563
6664
@Component({
6765
selector: 'app-root',
68-
templateUrl: './app.html',
6966
standalone: false,
7067
styleUrl: './app.css',
71-
providers: [FooStore]
68+
templateUrl: './app.html',
69+
providers: [FooStore],
7270
})
7371
export class App {
7472
protected readonly title = signal('bar');

‎modules/schematics/src/container/__snapshots__/index.spec.ts.snap‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ import { Store } from '@ngrx/store';
1515
import * as fromStore from '../reducers';
1616
1717
@Component({
18-
selector: 'app-foo',
1918
imports: [],
20-
templateUrl: './foo.html',
19+
selector: 'app-foo',
2120
styleUrl: './foo.css',
21+
templateUrl: './foo.html',
2222
})
2323
export class Foo {
2424
constructor(private store: Store) {}
@@ -31,10 +31,10 @@ exports[`Container Schematic > should respect the state option if not provided 1
3131
import { Store } from '@ngrx/store';
3232
3333
@Component({
34-
selector: 'app-foo',
3534
imports: [],
36-
templateUrl: './foo.html',
35+
selector: 'app-foo',
3736
styleUrl: './foo.css',
37+
templateUrl: './foo.html',
3838
})
3939
export class Foo {
4040
constructor(private store: Store) {}
@@ -118,10 +118,10 @@ exports[`Container Schematic > standalone > should be standalone by default 1`]
118118
import { Store } from '@ngrx/store';
119119
120120
@Component({
121-
selector: 'app-foo',
122121
imports: [],
123-
templateUrl: './foo.html',
122+
selector: 'app-foo',
124123
styleUrl: './foo.css',
124+
templateUrl: './foo.html',
125125
})
126126
export class Foo {
127127
constructor(private store: Store) {}
@@ -136,8 +136,8 @@ import { Store } from '@ngrx/store';
136136
@Component({
137137
selector: 'app-foo',
138138
standalone: false,
139-
templateUrl: './foo.html',
140139
styleUrl: './foo.css',
140+
templateUrl: './foo.html',
141141
})
142142
export class Foo {
143143
constructor(private store: Store) {}

‎modules/schematics/src/container/index.ts‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,9 @@ function addStateToComponent(options: Partial<ContainerOptions>) {
9494
const componentClass = source.statements.find(
9595
(stm) => stm.kind === ts.SyntaxKind.ClassDeclaration
9696
) as ts.ClassDeclaration;
97-
const constructorUpdate = new ReplaceChange(
97+
const constructorUpdate = new InsertChange(
9898
componentPath,
9999
componentClass.members.pos,
100-
'\n',
101100
`\n constructor(private store: Store) {}`
102101
);
103102

‎modules/schematics/src/effect/__snapshots__/index.spec.ts.snap‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ import { FooEffects } from './foo/foo.effects';
7777
exports[`Effect Schematic > feature effects > should still register the feature effect module with an effect with the minimal flag 1`] = `
7878
"import { NgModule, provideBrowserGlobalErrorListeners } from '@angular/core';
7979
import { BrowserModule } from '@angular/platform-browser';
80-
8180
import { App } from './app';
8281
import { EffectsModule } from '@ngrx/effects';
8382
import { FooEffects } from './foo/foo.effects';
@@ -163,7 +162,6 @@ export class FooEffects {
163162
exports[`Effect Schematic > root effects > should register the root effect in the provided module 1`] = `
164163
"import { NgModule, provideBrowserGlobalErrorListeners } from '@angular/core';
165164
import { BrowserModule } from '@angular/platform-browser';
166-
167165
import { App } from './app';
168166
import { EffectsModule } from '@ngrx/effects';
169167
import { FooEffects } from './foo/foo.effects';
@@ -188,7 +186,6 @@ export class AppModule { }
188186
exports[`Effect Schematic > root effects > should register the root effect module without effect with the minimal flag 1`] = `
189187
"import { NgModule, provideBrowserGlobalErrorListeners } from '@angular/core';
190188
import { BrowserModule } from '@angular/platform-browser';
191-
192189
import { App } from './app';
193190
import { EffectsModule } from '@ngrx/effects';
194191
@@ -298,7 +295,6 @@ export class FooEffects {
298295
exports[`Effect Schematic > should import into a specified module when provided 1`] = `
299296
"import { NgModule, provideBrowserGlobalErrorListeners } from '@angular/core';
300297
import { BrowserModule } from '@angular/platform-browser';
301-
302298
import { App } from './app';
303299
import { EffectsModule } from '@ngrx/effects';
304300
import { FooEffects } from './foo/foo.effects';
@@ -352,7 +348,6 @@ describe('FooEffects', () => {
352348
exports[`Effect Schematic > should not be provided by default 1`] = `
353349
"import { NgModule, provideBrowserGlobalErrorListeners } from '@angular/core';
354350
import { BrowserModule } from '@angular/platform-browser';
355-
356351
import { App } from './app';
357352
358353
@NgModule({

‎modules/schematics/src/entity/__snapshots__/index.spec.ts.snap‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,6 @@ describe('Foo Reducer', () => {
343343
exports[`Entity Schematic > should import into a specified module 1`] = `
344344
"import { NgModule, provideBrowserGlobalErrorListeners } from '@angular/core';
345345
import { BrowserModule } from '@angular/platform-browser';
346-
347346
import { App } from './app';
348347
import { StoreModule } from '@ngrx/store';
349348
import * as fromFoo from './foo.reducer';

‎modules/schematics/src/feature/__snapshots__/index.spec.ts.snap‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,6 @@ export class FooEffects {
293293
exports[`Feature Schematic > should respect the path provided for the feature name 1`] = `
294294
"import { NgModule, provideBrowserGlobalErrorListeners } from '@angular/core';
295295
import { BrowserModule } from '@angular/platform-browser';
296-
297296
import { App } from './app';
298297
299298
@NgModule({

‎modules/schematics/src/reducer/__snapshots__/index.spec.ts.snap‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,6 @@ export const reducer = createReducer(
186186
exports[`Reducer Schematic > should import into a specified module 1`] = `
187187
"import { NgModule, provideBrowserGlobalErrorListeners } from '@angular/core';
188188
import { BrowserModule } from '@angular/platform-browser';
189-
190189
import { App } from './app';
191190
import { StoreModule } from '@ngrx/store';
192191
import * as fromFoo from './foo.reducer';

‎modules/schematics/src/store/__snapshots__/index.spec.ts.snap‎

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
exports[`Store Schematic > should add a feature key if not root 1`] = `
44
"import { NgModule, provideBrowserGlobalErrorListeners } from '@angular/core';
55
import { BrowserModule } from '@angular/platform-browser';
6-
76
import { App } from './app';
87
98
@NgModule({
@@ -65,7 +64,6 @@ import { StoreDevtoolsModule } from '@ngrx/store-devtools';
6564
exports[`Store Schematic > should create the initial store setup 1`] = `
6665
"import { NgModule, provideBrowserGlobalErrorListeners } from '@angular/core';
6766
import { BrowserModule } from '@angular/platform-browser';
68-
6967
import { App } from './app';
7068
7169
@NgModule({
@@ -111,7 +109,6 @@ export const metaReducers: MetaReducer<State>[] = isDevMode() ? [] : [];
111109
exports[`Store Schematic > should import a feature a specified module 1`] = `
112110
"import { NgModule, provideBrowserGlobalErrorListeners } from '@angular/core';
113111
import { BrowserModule } from '@angular/platform-browser';
114-
115112
import { App } from './app';
116113
import { StoreModule } from '@ngrx/store';
117114
import * as fromFoo from './reducers';
@@ -161,7 +158,6 @@ export const metaReducers: MetaReducer<State>[] = isDevMode() ? [] : [];
161158
exports[`Store Schematic > should import into a specified module 1`] = `
162159
"import { NgModule, provideBrowserGlobalErrorListeners, isDevMode } from '@angular/core';
163160
import { BrowserModule } from '@angular/platform-browser';
164-
165161
import { App } from './app';
166162
import { StoreModule } from '@ngrx/store';
167163
import { reducers, metaReducers } from './reducers';
@@ -212,7 +208,6 @@ export const metaReducers: MetaReducer<State>[] = isDevMode() ? [] : [];
212208
exports[`Store Schematic > should not add a feature key if root 1`] = `
213209
"import { NgModule, provideBrowserGlobalErrorListeners } from '@angular/core';
214210
import { BrowserModule } from '@angular/platform-browser';
215-
216211
import { App } from './app';
217212
218213
@NgModule({
@@ -258,7 +253,6 @@ export const metaReducers: MetaReducer<State>[] = isDevMode() ? [] : [];
258253
exports[`Store Schematic > should not skip the initial store setup files if the minimal flag is provided with a feature 1`] = `
259254
"import { NgModule, provideBrowserGlobalErrorListeners } from '@angular/core';
260255
import { BrowserModule } from '@angular/platform-browser';
261-
262256
import { App } from './app';
263257
import { StoreModule } from '@ngrx/store';
264258
import * as fromFoo from './reducers';
@@ -308,7 +302,6 @@ export const metaReducers: MetaReducer<State>[] = isDevMode() ? [] : [];
308302
exports[`Store Schematic > should skip the initial store setup files if the minimal flag is provided 1`] = `
309303
"import { NgModule, provideBrowserGlobalErrorListeners, isDevMode } from '@angular/core';
310304
import { BrowserModule } from '@angular/platform-browser';
311-
312305
import { App } from './app';
313306
import { StoreModule } from '@ngrx/store';
314307
import { StoreDevtoolsModule } from '@ngrx/store-devtools';
@@ -334,7 +327,6 @@ export class AppModule { }
334327
exports[`Store Schematic > should support a custom feature state interface name 1`] = `
335328
"import { NgModule, provideBrowserGlobalErrorListeners } from '@angular/core';
336329
import { BrowserModule } from '@angular/platform-browser';
337-
338330
import { App } from './app';
339331
340332
@NgModule({
@@ -381,7 +373,6 @@ export const metaReducers: MetaReducer<FeatureState>[] = isDevMode() ? [] : [];
381373
exports[`Store Schematic > should support a custom root state interface name 1`] = `
382374
"import { NgModule, provideBrowserGlobalErrorListeners } from '@angular/core';
383375
import { BrowserModule } from '@angular/platform-browser';
384-
385376
import { App } from './app';
386377
387378
@NgModule({
@@ -427,7 +418,6 @@ export const metaReducers: MetaReducer<AppState>[] = isDevMode() ? [] : [];
427418
exports[`Store Schematic > should support a default feature state interface name 1`] = `
428419
"import { NgModule, provideBrowserGlobalErrorListeners } from '@angular/core';
429420
import { BrowserModule } from '@angular/platform-browser';
430-
431421
import { App } from './app';
432422
433423
@NgModule({
@@ -474,7 +464,6 @@ export const metaReducers: MetaReducer<State>[] = isDevMode() ? [] : [];
474464
exports[`Store Schematic > should support a default root state interface name 1`] = `
475465
"import { NgModule, provideBrowserGlobalErrorListeners } from '@angular/core';
476466
import { BrowserModule } from '@angular/platform-browser';
477-
478467
import { App } from './app';
479468
480469
@NgModule({

‎package.json‎

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -67,16 +67,17 @@
6767
"dependencies": {
6868
"@analogjs/content": "2.6.3",
6969
"@analogjs/router": "2.6.3",
70-
"@angular/cdk": "22.0.0",
71-
"@angular/common": "22.0.0",
72-
"@angular/compiler": "22.0.0",
73-
"@angular/core": "22.0.0",
74-
"@angular/elements": "22.0.0",
75-
"@angular/forms": "22.0.0",
76-
"@angular/material": "22.0.0",
77-
"@angular/platform-browser": "22.0.0",
78-
"@angular/platform-server": "22.0.0",
79-
"@angular/router": "22.0.0",
70+
"@angular/animations": "22.1.3",
71+
"@angular/cdk": "22.1.3",
72+
"@angular/common": "22.1.3",
73+
"@angular/compiler": "22.1.3",
74+
"@angular/core": "22.1.3",
75+
"@angular/elements": "22.1.3",
76+
"@angular/forms": "22.1.3",
77+
"@angular/material": "22.1.3",
78+
"@angular/platform-browser": "22.1.3",
79+
"@angular/platform-server": "22.1.3",
80+
"@angular/router": "22.1.3",
8081
"@microsoft/api-extractor": "^7.55.1",
8182
"@microsoft/tsdoc": "^0.15.1",
8283
"@nx/angular": "23.1.0",
@@ -101,18 +102,18 @@
101102
"@analogjs/platform": "2.6.3",
102103
"@analogjs/vite-plugin-angular": "2.6.3",
103104
"@analogjs/vitest-angular": "2.6.3",
104-
"@angular-devkit/core": "22.0.0",
105-
"@angular-devkit/schematics": "22.0.0",
105+
"@angular-devkit/core": "22.1.6",
106+
"@angular-devkit/schematics": "22.1.6",
106107
"@angular-eslint/builder": "22.0.0",
107108
"@angular-eslint/eslint-plugin": "22.0.0",
108109
"@angular-eslint/eslint-plugin-template": "22.0.0",
109110
"@angular-eslint/schematics": "22.0.0",
110111
"@angular-eslint/template-parser": "22.0.0",
111112
"@angular-eslint/test-utils": "22.0.0",
112-
"@angular/build": "22.0.0",
113-
"@angular/cli": "22.0.0",
114-
"@angular/compiler-cli": "22.0.0",
115-
"@angular/language-service": "22.0.0",
113+
"@angular/build": "22.1.6",
114+
"@angular/cli": "22.1.6",
115+
"@angular/compiler-cli": "22.1.3",
116+
"@angular/language-service": "22.1.3",
116117
"@nx/eslint": "23.1.0",
117118
"@nx/eslint-plugin": "23.1.0",
118119
"@nx/node": "23.1.0",
@@ -122,7 +123,7 @@
122123
"@nx/workspace": "23.1.0",
123124
"@octokit/rest": "^15.17.0",
124125
"@playwright/test": "1.58.1",
125-
"@schematics/angular": "22.0.0",
126+
"@schematics/angular": "22.1.6",
126127
"@stackblitz/sdk": "^1.11.0",
127128
"@types/ncp": "^2.0.8",
128129
"@types/node": "^24.3.0",
@@ -144,7 +145,7 @@
144145
"lint-staged": "^8.0.0",
145146
"mkdirp": "^3.0.1",
146147
"ncp": "^2.0.0",
147-
"ng-packagr": "22.0.0",
148+
"ng-packagr": "22.1.1",
148149
"nx": "23.1.0",
149150
"ora": "^8.2.0",
150151
"prettier": "^3.6.2",

0 commit comments

Comments
 (0)