Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version 19 (beta 0) #4602

Merged
merged 3 commits into from
Nov 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
],
"@typescript-eslint/naming-convention": "off",
"@typescript-eslint/prefer-namespace-keyword": "error",
"@typescript-eslint/ban-types": "warn",
"@typescript-eslint/no-empty-function": "warn",
"@typescript-eslint/no-empty-object-type": "warn",
"eqeqeq": ["off", "smart"],
Expand All @@ -71,7 +70,9 @@
"no-redeclare": "off",
"no-underscore-dangle": "off",
"no-var": "error",
"no-prototype-builtins": "off"
"no-prototype-builtins": "off",
"@typescript-eslint/no-wrapper-object-types": "off",
"@typescript-eslint/no-unsafe-function-type": "off"
},
"plugins": ["eslint-plugin-import", "@typescript-eslint"]
},
Expand Down
87 changes: 87 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,90 @@
<a name="19.0.0-beta.0""></a>

# [19.0.0-beta.0"](https://github.com/ngrx/platform/compare/18.1.1...19.0.0-beta.0") (2024-11-20)

### Features

- **schematics:** change standalone default to true for components ([#4569](https://github.com/ngrx/platform/issues/4569)) ([c7d0ce6](https://github.com/ngrx/platform/commit/c7d0ce6))
- **signals:** rename `rxMethod.unsubscribe` to `destroy` ([#4584](https://github.com/ngrx/platform/issues/4584)) ([57ad5c5](https://github.com/ngrx/platform/commit/57ad5c5))
- **signals:** throw error in dev mode on state mutation ([#4526](https://github.com/ngrx/platform/issues/4526)) ([7a84209](https://github.com/ngrx/platform/commit/7a84209))

### BREAKING CHANGES

- **signals:** The `signalState`/`signalStore` state object is frozen in development mode.
If a mutable change occurs to the state object, an error will be thrown.

BEFORE:

```ts
const userState = signalState(initialState);
patchState(userState, (state) => {
state.user.firstName = 'mutable change'; // mutable change which went through
return state;
});
```

AFTER:

```ts
const userState = signalState(initialState);
patchState(userState, (state) => {
state.user.firstName = 'mutable change'; // throws in dev mode
return state;
});
```

- **signals:** The `unsubscribe` method from `rxMethod` is renamed to `destroy`.

BEFORE:

```ts
const logNumber = rxMethod<number>(tap(console.log));

const num1Ref = logNumber(interval(1_000));
const num2Ref = logNumber(interval(2_000));

// destroy `num1Ref` after 2 seconds
setTimeout(() => num1Ref.unsubscribe(), 2_000);

// destroy all reactive method refs after 5 seconds
setTimeout(() => logNumber.unsubscribe(), 5_000);
```

AFTER:

```ts
const logNumber = rxMethod<number>(tap(console.log));

const num1Ref = logNumber(interval(1_000));
const num2Ref = logNumber(interval(2_000));

// destroy `num1Ref` after 2 seconds
setTimeout(() => num1Ref.destroy(), 2_000);

// destroy all reactive method refs after 5 seconds
setTimeout(() => logNumber.destroy(), 5_000);
```

- **schematics:** The default setting for generating components using schematics is updated.

BEFORE:

The default setting for generating components using schematics does not use standalone components.

AFTER:

The default setting for generating components using schematics uses standalone components.

- The minimum required version of Angular has been updated.

BEFORE:

The minimum required version is Angular 18.x

AFTER:

The minimum required version is Angular 19.x

<a name="18.1.1"></a>

## [18.1.1](https://github.com/ngrx/platform/compare/18.1.0...18.1.1) (2024-10-29)
Expand Down
4 changes: 2 additions & 2 deletions MIGRATION.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# V18 Migration guide
# V19 Migration guide

This document has been moved to https://ngrx.io/guide/migration/v18.
This document has been moved to https://ngrx.io/guide/migration/v19.
4 changes: 2 additions & 2 deletions modules/component-store/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ngrx/component-store",
"version": "18.1.1",
"version": "19.0.0-beta.0",
"description": "Reactive store for component state",
"repository": {
"type": "git",
Expand All @@ -22,7 +22,7 @@
},
"homepage": "https://github.com/ngrx/platform#readme",
"peerDependencies": {
"@angular/core": "^18.0.0",
"@angular/core": "^19.0.0",
"rxjs": "^6.5.3 || ^7.5.0"
},
"schematics": "./schematics/collection.json",
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const platformVersion = '^18.1.1';
export const platformVersion = '^19.0.0-beta.0';
6 changes: 3 additions & 3 deletions modules/component/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ngrx/component",
"version": "18.1.1",
"version": "19.0.0-beta.0",
"description": "Reactive Extensions for Angular Components",
"repository": {
"type": "git",
Expand All @@ -20,8 +20,8 @@
},
"homepage": "https://github.com/ngrx/platform#readme",
"peerDependencies": {
"@angular/common": "^18.0.0",
"@angular/core": "^18.0.0",
"@angular/common": "^19.0.0",
"@angular/core": "^19.0.0",
"rxjs": "^6.5.3 || ^7.5.0"
},
"schematics": "./schematics/collection.json",
Expand Down
2 changes: 1 addition & 1 deletion modules/component/schematics-core/utility/libs-version.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const platformVersion = '^18.1.1';
export const platformVersion = '^19.0.0-beta.0';
12 changes: 6 additions & 6 deletions modules/data/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ngrx/data",
"version": "18.1.1",
"version": "19.0.0-beta.0",
"description": "API management for NgRx",
"repository": {
"type": "git",
Expand All @@ -20,11 +20,11 @@
},
"homepage": "https://github.com/ngrx/platform#readme",
"peerDependencies": {
"@angular/common": "^18.0.0",
"@angular/core": "^18.0.0",
"@ngrx/store": "18.1.1",
"@ngrx/effects": "18.1.1",
"@ngrx/entity": "18.1.1",
"@angular/common": "^19.0.0",
"@angular/core": "^19.0.0",
"@ngrx/store": "19.0.0-beta.0",
"@ngrx/effects": "19.0.0-beta.0",
"@ngrx/entity": "19.0.0-beta.0",
"rxjs": "^6.5.3 || ^7.5.0"
},
"schematics": "./schematics/collection.json",
Expand Down
2 changes: 1 addition & 1 deletion modules/data/schematics-core/utility/libs-version.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const platformVersion = '^18.1.1';
export const platformVersion = '^19.0.0-beta.0';
6 changes: 3 additions & 3 deletions modules/effects/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ngrx/effects",
"version": "18.1.1",
"version": "19.0.0-beta.0",
"description": "Side effect model for @ngrx/store",
"repository": {
"type": "git",
Expand All @@ -21,8 +21,8 @@
},
"homepage": "https://github.com/ngrx/platform#readme",
"peerDependencies": {
"@angular/core": "^18.0.0",
"@ngrx/store": "18.1.1",
"@angular/core": "^19.0.0",
"@ngrx/store": "19.0.0-beta.0",
"rxjs": "^6.5.3 || ^7.5.0"
},
"schematics": "./schematics/collection.json",
Expand Down
2 changes: 1 addition & 1 deletion modules/effects/schematics-core/utility/libs-version.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const platformVersion = '^18.1.1';
export const platformVersion = '^19.0.0-beta.0';
6 changes: 3 additions & 3 deletions modules/entity/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ngrx/entity",
"version": "18.1.1",
"version": "19.0.0-beta.0",
"description": "Common utilities for entity reducers",
"repository": {
"type": "git",
Expand All @@ -20,8 +20,8 @@
},
"homepage": "https://github.com/ngrx/platform#readme",
"peerDependencies": {
"@angular/core": "^18.0.0",
"@ngrx/store": "18.1.1",
"@angular/core": "^19.0.0",
"@ngrx/store": "19.0.0-beta.0",
"rxjs": "^6.5.3 || ^7.5.0"
},
"schematics": "./schematics/collection.json",
Expand Down
2 changes: 1 addition & 1 deletion modules/entity/schematics-core/utility/libs-version.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const platformVersion = '^18.1.1';
export const platformVersion = '^19.0.0-beta.0';
7 changes: 4 additions & 3 deletions modules/eslint-plugin/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ngrx/eslint-plugin",
"version": "18.1.1",
"version": "19.0.0-beta.0",
"description": "NgRx ESLint Plugin",
"repository": {
"type": "git",
Expand Down Expand Up @@ -46,7 +46,8 @@
},
"peerDependencies": {
"eslint": "^8.57.0 || ^9.0.0",
"@typescript-eslint/utils": "^7.11.0 || ^8.0.0-alpha.20",
"typescript": "*"
"typescript": "*",
"typescript-eslint": "^8.0.0",
"@typescript-eslint/utils": "^8.0.0"
}
}
2 changes: 1 addition & 1 deletion modules/operators/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ngrx/operators",
"version": "18.1.1",
"version": "19.0.0-beta.0",
"description": "Shared RxJS Operators for NgRx libraries",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion modules/operators/schematics-core/utility/libs-version.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const platformVersion = '^18.1.1';
export const platformVersion = '^19.0.0-beta.0';
10 changes: 5 additions & 5 deletions modules/router-store/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ngrx/router-store",
"version": "18.1.1",
"version": "19.0.0-beta.0",
"description": "Bindings to connect @angular/router to @ngrx/store",
"repository": {
"type": "git",
Expand All @@ -20,10 +20,10 @@
},
"homepage": "https://github.com/ngrx/platform#readme",
"peerDependencies": {
"@angular/common": "^18.0.0",
"@angular/core": "^18.0.0",
"@angular/router": "^18.0.0",
"@ngrx/store": "18.1.1",
"@angular/common": "^19.0.0",
"@angular/core": "^19.0.0",
"@angular/router": "^19.0.0",
"@ngrx/store": "19.0.0-beta.0",
"rxjs": "^6.5.3 || ^7.5.0"
},
"schematics": "./schematics/collection.json",
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const platformVersion = '^18.1.1';
export const platformVersion = '^19.0.0-beta.0';
2 changes: 1 addition & 1 deletion modules/schematics-core/utility/libs-version.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const platformVersion = '^18.1.1';
export const platformVersion = '^19.0.0-beta.0';
2 changes: 1 addition & 1 deletion modules/schematics/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ngrx/schematics",
"version": "18.1.1",
"version": "19.0.0-beta.0",
"description": "NgRx Schematics for Angular",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion modules/schematics/schematics-core/utility/libs-version.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const platformVersion = '^18.1.1';
export const platformVersion = '^19.0.0-beta.0';
12 changes: 1 addition & 11 deletions modules/signals/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,7 @@
"rules": {
"@angular-eslint/directive-selector": "off",
"@angular-eslint/component-selector": "off",
"@nx/enforce-module-boundaries": "off",
"@typescript-eslint/ban-types": [
"error",
{
"extendDefaults": true,
"types": {
"{}": false,
"Function": false
}
}
]
"@nx/enforce-module-boundaries": "off"
},
"plugins": ["@typescript-eslint"]
},
Expand Down
4 changes: 2 additions & 2 deletions modules/signals/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ngrx/signals",
"version": "18.1.1",
"version": "19.0.0-beta.0",
"description": "Reactive Store and Set of Utilities for Angular Signals",
"repository": {
"type": "git",
Expand All @@ -21,7 +21,7 @@
},
"homepage": "https://github.com/ngrx/platform#readme",
"peerDependencies": {
"@angular/core": "^18.0.0",
"@angular/core": "^19.0.0",
"rxjs": "^6.5.3 || ^7.4.0"
},
"peerDependenciesMeta": {
Expand Down
2 changes: 1 addition & 1 deletion modules/signals/schematics-core/utility/libs-version.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const platformVersion = '^18.1.1';
export const platformVersion = '^19.0.0-beta.0';
6 changes: 3 additions & 3 deletions modules/store-devtools/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ngrx/store-devtools",
"version": "18.1.1",
"version": "19.0.0-beta.0",
"description": "Developer tools for @ngrx/store",
"repository": {
"type": "git",
Expand All @@ -20,8 +20,8 @@
},
"homepage": "https://github.com/ngrx/platform#readme",
"peerDependencies": {
"@angular/core": "^18.0.0",
"@ngrx/store": "18.1.1",
"@angular/core": "^19.0.0",
"@ngrx/store": "19.0.0-beta.0",
"rxjs": "^6.5.3 || ^7.5.0"
},
"schematics": "./schematics/collection.json",
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const platformVersion = '^18.1.1';
export const platformVersion = '^19.0.0-beta.0';
4 changes: 2 additions & 2 deletions modules/store/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ngrx/store",
"version": "18.1.1",
"version": "19.0.0-beta.0",
"description": "RxJS powered Redux for Angular apps",
"repository": {
"type": "git",
Expand All @@ -21,7 +21,7 @@
},
"homepage": "https://github.com/ngrx/platform#readme",
"peerDependencies": {
"@angular/core": "^18.0.0",
"@angular/core": "^19.0.0",
"rxjs": "^6.5.3 || ^7.5.0"
},
"schematics": "./schematics/collection.json",
Expand Down
2 changes: 1 addition & 1 deletion modules/store/schematics-core/utility/libs-version.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const platformVersion = '^18.1.1';
export const platformVersion = '^19.0.0-beta.0';
Loading