Skip to content

Commit

Permalink
chore: update to rc
Browse files Browse the repository at this point in the history
  • Loading branch information
timdeschryver committed Nov 7, 2024
1 parent b0a47de commit 7c1aadc
Show file tree
Hide file tree
Showing 11 changed files with 491 additions and 598 deletions.
15 changes: 3 additions & 12 deletions modules/data/schematics/ng-add/__snapshots__/index.spec.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,7 @@ import { provideEntityData } from '@ngrx/data';
import { entityConfig } from './entity-metadata';
export const appConfig: ApplicationConfig = {
providers: [
provideZoneChangeDetection({ eventCoalescing: true }),
provideEntityData(entityConfig)
]
providers: [provideZoneChangeDetection({ eventCoalescing: true }), provideEntityData(entityConfig)]
};
"
`;
Expand All @@ -19,10 +16,7 @@ exports[`Data ng-add Schematic Migration of ngrx-data Data ng-add Schematic for
import { provideEntityData, withEffects } from '@ngrx/data';
export const appConfig: ApplicationConfig = {
providers: [
provideZoneChangeDetection({ eventCoalescing: true }),
provideEntityData({}, withEffects())
]
providers: [provideZoneChangeDetection({ eventCoalescing: true }), provideEntityData({}, withEffects())]
};
"
`;
Expand All @@ -33,10 +27,7 @@ import { provideEntityData, withEffects } from '@ngrx/data';
import { entityConfig } from './entity-metadata';
export const appConfig: ApplicationConfig = {
providers: [
provideZoneChangeDetection({ eventCoalescing: true }),
provideEntityData(entityConfig, withEffects())
]
providers: [provideZoneChangeDetection({ eventCoalescing: true }), provideEntityData(entityConfig, withEffects())]
};
"
`;
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,7 @@ import { provideEffects } from '@ngrx/effects';
import { FooEffects } from './foo/foo.effects';
export const appConfig: ApplicationConfig = {
providers: [
provideZoneChangeDetection({ eventCoalescing: true }),
provideEffects(FooEffects)
]
providers: [provideZoneChangeDetection({ eventCoalescing: true }), provideEffects(FooEffects)]
};
"
`;
Expand All @@ -19,10 +16,7 @@ exports[`Effects ng-add Schematic Effects ng-add Schematic for standalone applic
import { provideEffects } from '@ngrx/effects';
export const appConfig: ApplicationConfig = {
providers: [
provideZoneChangeDetection({ eventCoalescing: true }),
provideEffects()
]
providers: [provideZoneChangeDetection({ eventCoalescing: true }), provideEffects()]
};
"
`;
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@ exports[`Router Store ng-add Schematic Router Store ng-add Schematic for standal
import { provideRouterStore } from '@ngrx/router-store';
export const appConfig: ApplicationConfig = {
providers: [
provideZoneChangeDetection({ eventCoalescing: true }),
provideRouterStore()
]
providers: [provideZoneChangeDetection({ eventCoalescing: true }), provideRouterStore()]
};
"
`;
22 changes: 18 additions & 4 deletions modules/schematics/src/container/__snapshots__/index.spec.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import * as fromStore from '../reducers';
@Component({
selector: 'app-foo',
standalone: true,
imports: [],
templateUrl: './foo.component.html',
styleUrl: './foo.component.css'
Expand All @@ -33,7 +32,6 @@ import { Store } from '@ngrx/store';
@Component({
selector: 'app-foo',
standalone: true,
imports: [],
templateUrl: './foo.component.html',
styleUrl: './foo.component.css'
Expand Down Expand Up @@ -115,13 +113,12 @@ describe('FooComponent', () => {
"
`;
exports[`Container Schematic standalone should create a standalone component if true 1`] = `
exports[`Container Schematic standalone should be standalone by default 1`] = `
"import { Component } from '@angular/core';
import { Store } from '@ngrx/store';
@Component({
selector: 'app-foo',
standalone: true,
imports: [],
templateUrl: './foo.component.html',
styleUrl: './foo.component.css'
Expand All @@ -131,3 +128,20 @@ export class FooComponent {
}
"
`;
exports[`Container Schematic standalone should create a non-standalone component if false 1`] = `
"import { Component } from '@angular/core';
import { Store } from '@ngrx/store';
@Component({
selector: 'app-foo',
standalone: false,
templateUrl: './foo.component.html',
styleUrl: './foo.component.css'
})
export class FooComponent {
constructor(private store: Store) {}
}
"
`;
13 changes: 7 additions & 6 deletions modules/schematics/src/container/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,8 @@ describe('Container Schematic', () => {
});

describe('standalone', () => {
it('should be disabled by default', async () => {
const options = { ...defaultOptions, standalone: false };
it('should be standalone by default', async () => {
const options = { ...defaultOptions };
const tree = await schematicRunner.runSchematic(
'container',
options,
Expand All @@ -127,11 +127,12 @@ describe('Container Schematic', () => {
const content = tree.readContent(
`${projectPath}/src/app/foo/foo.component.ts`
);
expect(content).not.toMatch(/standalone: true/);
expect(content).not.toMatch(/standalone/);
expect(content).toMatchSnapshot();
});

it('should create a standalone component if true', async () => {
const options = { ...defaultOptions, standalone: true };
it('should create a non-standalone component if false', async () => {
const options = { ...defaultOptions, standalone: false };
const tree = await schematicRunner.runSchematic(
'container',
options,
Expand All @@ -140,7 +141,7 @@ describe('Container Schematic', () => {
const content = tree.readContent(
`${projectPath}/src/app/foo/foo.component.ts`
);
expect(content).toMatch(/standalone: true/);
expect(content).toMatch(/standalone: false/);
expect(content).toMatchSnapshot();
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@ exports[`Store-Devtools ng-add Schematic Store Devtools ng-add Schematic for sta
import { provideStoreDevtools } from '@ngrx/store-devtools';
export const appConfig: ApplicationConfig = {
providers: [
provideZoneChangeDetection({ eventCoalescing: true }),
provideStoreDevtools({ maxAge: 25, logOnly: !isDevMode() })
]
providers: [provideZoneChangeDetection({ eventCoalescing: true }), provideStoreDevtools({ maxAge: 25, logOnly: !isDevMode() })]
};
"
`;
40 changes: 20 additions & 20 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"copy:schematics": "ts-node ./build/copy-schematics-core.ts",
"schematics:check": "git diff --name-only --exit-code ./modules",
"build:stackblitz": "ts-node ./build/stackblitz.ts && git add ./stackblitz.html",
"publish:next": "ts-node ./build/publish-next.ts",
"publish:next": "ts-node ./build/publish-rc.1",
"publish:latest": "ts-node ./build/publish-latest.ts",
"nx": "nx",
"update": "nx migrate latest",
Expand Down Expand Up @@ -66,17 +66,17 @@
]
},
"dependencies": {
"@angular/animations": "19.0.0-next.11",
"@angular/cdk": "19.0.0-next.10",
"@angular/common": "19.0.0-next.11",
"@angular/compiler": "19.0.0-next.11",
"@angular/core": "19.0.0-next.11",
"@angular/forms": "19.0.0-next.11",
"@angular/material": "19.0.0-next.10",
"@angular/platform-browser": "19.0.0-next.11",
"@angular/platform-browser-dynamic": "19.0.0-next.11",
"@angular/platform-server": "19.0.0-next.11",
"@angular/router": "19.0.0-next.11",
"@angular/animations": "19.0.0-rc.1",
"@angular/cdk": "19.0.0-rc.1",
"@angular/common": "19.0.0-rc.1",
"@angular/compiler": "19.0.0-rc.1",
"@angular/core": "19.0.0-rc.1",
"@angular/forms": "19.0.0-rc.1",
"@angular/material": "19.0.0-rc.1",
"@angular/platform-browser": "19.0.0-rc.1",
"@angular/platform-browser-dynamic": "19.0.0-rc.1",
"@angular/platform-server": "19.0.0-rc.1",
"@angular/router": "19.0.0-rc.1",
"@nx/angular": "19.8.0",
"ajv-formats": "^2.1.1",
"core-js": "^2.5.4",
Expand All @@ -88,26 +88,26 @@
"zone.js": "0.15.0"
},
"devDependencies": {
"@angular-devkit/build-angular": "19.0.0-next.13",
"@angular-devkit/core": "19.0.0-next.11",
"@angular-devkit/schematics": "19.0.0-next.11",
"@angular-devkit/build-angular": "19.0.0-rc.1",
"@angular-devkit/core": "19.0.0-rc.1",
"@angular-devkit/schematics": "19.0.0-rc.1",
"@angular-eslint/builder": "18.0.1",
"@angular-eslint/eslint-plugin": "18.0.1",
"@angular-eslint/eslint-plugin-template": "18.0.1",
"@angular-eslint/schematics": "18.0.1",
"@angular-eslint/template-parser": "18.0.1",
"@angular-eslint/test-utils": "18.0.1",
"@angular/cli": "19.0.0-next.13",
"@angular/compiler-cli": "19.0.0-next.11",
"@angular/language-service": "19.0.0-next.11",
"@angular/cli": "19.0.0-rc.1",
"@angular/compiler-cli": "19.0.0-rc.1",
"@angular/language-service": "19.0.0-rc.1",
"@nx/cypress": "19.8.0",
"@nx/eslint": "19.8.0",
"@nx/eslint-plugin": "19.8.0",
"@nx/jest": "19.8.0",
"@nx/node": "19.8.0",
"@nx/workspace": "19.8.0",
"@octokit/rest": "^15.17.0",
"@schematics/angular": "19.0.0-next.11",
"@schematics/angular": "19.0.0-rc.1",
"@testing-library/cypress": "9.0.0",
"@types/eslint": "^8.56.10",
"@types/fs-extra": "^2.1.0",
Expand Down Expand Up @@ -159,7 +159,7 @@
"karma-jasmine-html-reporter": "2.0.0",
"lint-staged": "^8.0.0",
"ncp": "^2.0.0",
"ng-packagr": "19.0.0-next.7",
"ng-packagr": "19.0.0-rc.0",
"npm-run-all": "^4.1.5",
"nx": "19.8.0",
"nyc": "^10.1.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ exports[`Logout Confirmation Dialog should compile 1`] = `
<ng-component>
<h2
class="mat-mdc-dialog-title mdc-dialog__title"
id="mat-mdc-dialog-title-a0"
mat-dialog-title=""
>
Logout
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ exports[`Login Page should compile 1`] = `
aria-required="false"
class="mat-mdc-input-element mat-mdc-form-field-input-control mdc-text-field__input ng-untouched ng-pristine ng-valid cdk-text-field-autofill-monitored"
formcontrolname="username"
id="mat-input-a0"
matinput=""
placeholder="Username"
type="text"
Expand Down Expand Up @@ -89,6 +90,7 @@ exports[`Login Page should compile 1`] = `
aria-required="false"
class="mat-mdc-input-element mat-mdc-form-field-input-control mdc-text-field__input ng-untouched ng-pristine ng-valid cdk-text-field-autofill-monitored"
formcontrolname="password"
id="mat-input-a1"
matinput=""
placeholder="Password"
type="password"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ exports[`Find Book Page should compile 1`] = `
aria-invalid="false"
aria-required="false"
class="mat-mdc-input-element mat-mdc-form-field-input-control mdc-text-field__input cdk-text-field-autofill-monitored"
id="mat-input-a0"
matinput=""
placeholder="Search for a book"
/>
Expand Down
Loading

0 comments on commit 7c1aadc

Please sign in to comment.