Skip to content
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
6 changes: 3 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v6
with:
node-version: '22'
node-version: '24'
- name: Install dependencies
run: npm ci
env:
Expand All @@ -37,7 +37,7 @@ jobs:

test-minimum:

name: Test with Angular@20.0.0 and minimum dependencies requirements
name: Test with Angular@21.0.0 and minimum dependencies requirements
runs-on: ubuntu-latest
timeout-minutes: 10

Expand All @@ -54,7 +54,7 @@ jobs:
- name: Build the lib (with the current version, as it is what is published on npm)
run: npm run build
- name: Downgrade dependencies to minimal required version
run: npm install typescript@5.8.2 tslib@2.5.0 better-typescript-lib@2.11.0 rxjs@7.6.0 zone.js@0.15.0 @angular/common@20.0.0 @angular/compiler@20.0.0 @angular/core@20.0.0 @angular/platform-browser@20.0.0 @angular/router@20.0.0 @angular/cli@20.0.0 @angular/compiler-cli@20.0.0 @angular/build@20.0.0 --legacy-peer-deps
run: npm install typescript@5.9.2 tslib@2.5.0 better-typescript-lib@2.12.0 rxjs@7.6.0 @angular/common@21.0.0 @angular/compiler@21.0.0 @angular/core@21.0.0 @angular/platform-browser@21.0.0 @angular/router@21.0.0 @angular/cli@21.0.0 @angular/compiler-cli@21.0.0 @angular/build@21.0.0 --legacy-peer-deps
env:
CI: true
- name: Run unit tests
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ npm-debug.log
yarn-error.log
testem.log
/typings
__screenshots__/

# System Files
.DS_Store
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

This library is fully documented and so you will find detailed [migration guides](https://github.com/cyrilletuzi/angular-async-local-storage/blob/main/MIGRATION.md).

## 21.0.0 (2025-11-20)

### Breaking changes

- Angular 21 is required.

## 20.0.0 (2025-05-29)

### Breaking changes
Expand Down
3 changes: 2 additions & 1 deletion MIGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
- [Migration to version 17](./docs/MIGRATION_TO_V17.md)
- [Migration to version 18](./docs/MIGRATION_TO_V18.md)
- [Migration to version 19](./docs/MIGRATION_TO_V19.md)
- [Migration to version 19](./docs/MIGRATION_TO_V20.md)
- [Migration to version 20](./docs/MIGRATION_TO_V20.md)
- [Migration to version 21](./docs/MIGRATION_TO_V21.md)

[Full changelog available here.](./CHANGELOG.md)

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ This library has a simple API similar to native `localStorage`, but internally s
Install the package:

```bash
# For Angular LTS (Angular >= 18):
# For Angular LTS (Angular >= 19):
ng add @ngx-pwa/local-storage
```

Expand All @@ -37,7 +37,7 @@ ng add @ngx-pwa/local-storage
If for any reason `ng add` does not work, follow the [manual installation guide](https://github.com/cyrilletuzi/angular-async-local-storage/blob/main/docs/MANUAL_INSTALLATION.md).

> [!NOTE]
> Angular versions <= 17 are [officially outdated](https://angular.dev/reference/versions).
> Angular versions <= 18 are [officially outdated](https://angular.dev/reference/versions).
### Upgrading

Expand Down
28 changes: 9 additions & 19 deletions angular.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"cli": {
"packageManager": "npm"
},
"newProjectRoot": "testing-apps",
"projects": {
"lib": {
Expand All @@ -25,10 +28,6 @@
"builder": "@angular/build:karma",
"options": {
"aot": true,
"polyfills": [
"zone.js",
"zone.js/testing"
],
"tsConfig": "lib/tsconfig.spec.json",
"karmaConfig": "lib/karma.conf.js"
}
Expand All @@ -54,9 +53,6 @@
"builder": "@angular/build:application",
"options": {
"browser": "testing-apps/demo/src/main.ts",
"polyfills": [
"zone.js"
],
"tsConfig": "testing-apps/demo/tsconfig.app.json",
"assets": [],
"styles": []
Expand All @@ -71,8 +67,8 @@
},
{
"type": "anyComponentStyle",
"maximumWarning": "2kb",
"maximumError": "4kb"
"maximumWarning": "4kB",
"maximumError": "8kB"
}
],
"outputHashing": "all"
Expand Down Expand Up @@ -112,9 +108,6 @@
"builder": "@angular/build:application",
"options": {
"browser": "testing-apps/iframe/src/main.ts",
"polyfills": [
"zone.js"
],
"tsConfig": "testing-apps/iframe/tsconfig.app.json",
"assets": [],
"styles": []
Expand All @@ -129,8 +122,8 @@
},
{
"type": "anyComponentStyle",
"maximumWarning": "2kb",
"maximumError": "4kb"
"maximumWarning": "4kB",
"maximumError": "8kB"
}
],
"outputHashing": "all"
Expand Down Expand Up @@ -170,9 +163,6 @@
"builder": "@angular/build:application",
"options": {
"browser": "testing-apps/localforage/src/main.ts",
"polyfills": [
"zone.js"
],
"tsConfig": "testing-apps/localforage/tsconfig.app.json",
"assets": [],
"styles": []
Expand All @@ -187,8 +177,8 @@
},
{
"type": "anyComponentStyle",
"maximumWarning": "2kb",
"maximumError": "4kb"
"maximumWarning": "4kB",
"maximumError": "8kB"
}
],
"outputHashing": "all"
Expand Down
8 changes: 4 additions & 4 deletions docs/MANUAL_INSTALLATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@ If it causes an error, please file an issue. In the meantime, you can proceed to
Install the right version according to your Angular one via [`npm`](http://npmjs.com):

```bash
# For Angular 21:
npm install @ngx-pwa/local-storage@^21.0.0

# For Angular 20:
npm install @ngx-pwa/local-storage@^20.0.0

# For Angular 19:
npm install @ngx-pwa/local-storage@^19.0.0

# For Angular 18:
npm install @ngx-pwa/local-storage@^18.0.0
```

> [!NOTE]
> Angular versions <= 17 are [officially outdated](https://angular.dev/reference/versions).
> Angular versions <= 18 are [officially outdated](https://angular.dev/reference/versions).

[Back to general documentation](../README.md)
5 changes: 3 additions & 2 deletions docs/MIGRATION_TO_NEW_PACKAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@ But **do not worry: the previous package is still here** and will be as long as
- v17 for Angular 17,
- v18 for Angular 18,
- v19 for Angular 19,
- v20 for Angular 20.
- v20 for Angular 20,
- v21 for Angular 21.

[Angular <= 17 are officially outdated](https://angular.dev/reference/versions#actively-supported-versions).
[Angular <= 18 are officially outdated](https://angular.dev/reference/versions#actively-supported-versions).

## Installing the new package

Expand Down
26 changes: 26 additions & 0 deletions docs/MIGRATION_TO_V21.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Migration guide to version 21

## How to update

```bash
ng update @ngx-pwa/local-storage
```

> [!IMPORTANT]
> If your project is actually in a version < 20, please do the [other migrations](../MIGRATION.md) first in an incremental way. **The version 9 migration is especially important**, as a wrongly done migration could lead to the loss of all previously stored data.

## Breaking changes

- Angular 21 is required.
- RxJS >= 7.6 is required.

> [!IMPORTANT]
> RxJS 6 is *not* supported.

Done, no code changes.

## More documentation

- [Full changelog for v21](../CHANGELOG.md)
- [Other migration guides](../MIGRATION.md)
- [Main documentation](../README.md)
4 changes: 2 additions & 2 deletions lib/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
"tslib": "^2.5.0"
},
"peerDependencies": {
"@angular/common": "^20.0.0",
"@angular/core": "^20.0.0",
"@angular/common": "^21.0.0",
"@angular/core": "^21.0.0",
"rxjs": "^7.6.0"
},
"schematics": "./schematics/collection.json",
Expand Down
6 changes: 3 additions & 3 deletions lib/schematics/ng-add/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ export default function (): Rule {
const angularMajorVersion = getDependencyMajorVersion("@angular/core", host);

if (angularMajorVersion === undefined) {
context.logger.warn(`Not able to detect @angular/core version. Be aware that Angular versions <= 17 are no longer supported.`);
context.logger.warn(`Not able to detect @angular/core version. Be aware that Angular versions <= 18 are no longer supported.`);
}

if (angularMajorVersion !== undefined && (angularMajorVersion <= 17)) {
throw new SchematicsException("Angular versions <= 17 are no longer supported.");
if (angularMajorVersion !== undefined && (angularMajorVersion <= 18)) {
throw new SchematicsException("Angular versions <= 18 are no longer supported.");
}

const rxjsMajorVersion = getDependencyMajorVersion("rxjs", host);
Expand Down
1 change: 1 addition & 0 deletions lib/tsconfig.spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
]
},
"include": [
"src/**/*.d.ts",
"src/**/*.spec.ts"
]
}
Loading