Skip to content

V9 #172

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

Merged
merged 80 commits into from
Feb 7, 2020
Merged

V9 #172

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
80 commits
Select commit Hold shift + click to select a range
9737caa
release: v9.0.0-beta.0
cyrilletuzi Aug 20, 2019
9505026
feat: remove deprecated APIs (#173)
cyrilletuzi Aug 20, 2019
6288239
Merge branch 'master' into v9beta
cyrilletuzi Aug 21, 2019
72855fb
docs
cyrilletuzi Aug 21, 2019
67b6e79
version
cyrilletuzi Aug 21, 2019
7f7edc5
docs
cyrilletuzi Aug 21, 2019
62e81a6
Merge branch 'master' into v9beta
cyrilletuzi Aug 21, 2019
68d2994
merge
cyrilletuzi Sep 27, 2019
de6e0d4
Merge branch 'master' into v9beta
cyrilletuzi Oct 6, 2019
48a7908
feat: upgrade to Angular@next
cyrilletuzi Oct 6, 2019
97f70f9
fix: pin versions for renovatebot
cyrilletuzi Oct 6, 2019
1561b27
feat: update schematics for Angular 9
cyrilletuzi Oct 6, 2019
1f1ec2d
fix: disable ivy for IE tests
cyrilletuzi Oct 6, 2019
9df905a
release: v9.0.0-beta.2
cyrilletuzi Oct 6, 2019
dfe6a44
build: isolute publish script
cyrilletuzi Oct 6, 2019
924509b
watch method (#108)
cyrilletuzi Oct 8, 2019
3c09e8f
docs
cyrilletuzi Oct 8, 2019
9cf25fc
Merge branch 'master' into v9beta
cyrilletuzi Oct 9, 2019
b8eb577
merge
cyrilletuzi Oct 11, 2019
5656f7b
build: renegarate package-lock
cyrilletuzi Oct 11, 2019
5add79d
Angular CLI update
cyrilletuzi Oct 11, 2019
bc6e4d4
feat: default IDBNoWrap to true (#221)
cyrilletuzi Oct 11, 2019
9a835a5
deps: only allow Angular 9 and align to new RxJS minimum
cyrilletuzi Oct 11, 2019
af16142
Angular CLI update
cyrilletuzi Oct 23, 2019
3b75dfa
deps: update to last betas
cyrilletuzi Oct 23, 2019
6c6d6b5
fix: tslib is now a peerDependency for Angular projects
cyrilletuzi Oct 23, 2019
9cf91cc
deps: fresh install to remove security audits
cyrilletuzi Oct 23, 2019
7c7a679
Merge branch 'master' into v9beta
cyrilletuzi Oct 23, 2019
f9c955b
merge
cyrilletuzi Oct 23, 2019
fdbe91f
ci: try to fix webdriver mismatch
cyrilletuzi Oct 23, 2019
20d1cf0
ci: update to Node 12
cyrilletuzi Oct 23, 2019
191c487
ci
cyrilletuzi Oct 23, 2019
da13626
tests: test with old view engine
cyrilletuzi Oct 23, 2019
4b842c6
ci
cyrilletuzi Oct 23, 2019
72e250f
ci
cyrilletuzi Oct 23, 2019
744186b
ci
cyrilletuzi Oct 23, 2019
4571309
refactor: better typings
cyrilletuzi Oct 23, 2019
a33a846
Angular CLI update
cyrilletuzi Oct 24, 2019
a4dac41
ivy: migration of ModuleWithProviders
cyrilletuzi Oct 24, 2019
88bed75
renovate: allow TS 3.6
cyrilletuzi Oct 25, 2019
051a818
Merge branch 'master' into v9beta
cyrilletuzi Oct 25, 2019
08b45e1
Merge branch 'master' into v9beta
cyrilletuzi Oct 25, 2019
65f27f0
merge
cyrilletuzi Nov 1, 2019
b17cd63
Angular CLI update
cyrilletuzi Nov 1, 2019
cb64f43
feat: update to Angular 9-rc.0
cyrilletuzi Nov 1, 2019
95f6ee2
feat: strictTemplates flag
cyrilletuzi Nov 1, 2019
fca82ac
release: v9.0.0-rc.0
cyrilletuzi Nov 1, 2019
7e3ab08
Merge branch 'master' into v9beta
cyrilletuzi Nov 1, 2019
4551da9
fix: pin deps
cyrilletuzi Nov 1, 2019
7c12970
Merge branch 'master' into v9beta
cyrilletuzi Nov 8, 2019
4f758b3
feat: update to Angular 9 RC1
cyrilletuzi Nov 8, 2019
c0cef6f
release: v9.0.0-rc.1
cyrilletuzi Nov 8, 2019
effb0d8
Merge branch 'master' into v9beta
cyrilletuzi Nov 8, 2019
f4e2adc
feat: Angular v9-rc.4
cyrilletuzi Nov 30, 2019
5dc38f9
Merge branch 'master' into v9beta
cyrilletuzi Nov 30, 2019
7160805
redo package-lock
cyrilletuzi Nov 30, 2019
ba01f65
Merge branch 'master' into v9beta
cyrilletuzi Dec 24, 2019
ea67f9e
refresh package-lock
cyrilletuzi Dec 24, 2019
156fb5c
Merge branch 'master' into v9beta
cyrilletuzi Jan 2, 2020
57cedf2
reinit package-lock
cyrilletuzi Jan 2, 2020
bc08155
feat: angular v9 rc.7
cyrilletuzi Jan 2, 2020
b13d47b
deps: latest versions but ci to test min deps requirements
cyrilletuzi Jan 2, 2020
7829a10
ci
cyrilletuzi Jan 2, 2020
de474e6
release: v9.0.0-rc.2
cyrilletuzi Jan 2, 2020
58074e7
ci: chromedriver version
cyrilletuzi Jan 10, 2020
f411812
ci: chromedriver version
cyrilletuzi Jan 10, 2020
bd9c33e
Merge branch 'master' into v9beta
cyrilletuzi Jan 13, 2020
65ceb12
feat: ng9 rc10 & typescript 3.7
cyrilletuzi Jan 24, 2020
46c98fa
Merge branch 'master' into v9beta
cyrilletuzi Jan 24, 2020
5188e2d
tests: enable IE in browserlist for tests
cyrilletuzi Jan 24, 2020
a8c1ef3
Merge branch 'master' into v9beta
cyrilletuzi Jan 24, 2020
4a9e911
tests: core-js issue
cyrilletuzi Jan 24, 2020
a02405e
release: v9.0.0-rc.3
cyrilletuzi Jan 24, 2020
b89e7fe
ci: actions/checkout@v2
cyrilletuzi Feb 2, 2020
558ed78
Merge branch 'master' into v9beta
cyrilletuzi Feb 2, 2020
6a73dfa
fresh install
cyrilletuzi Feb 2, 2020
044fbfe
v9 stable
cyrilletuzi Feb 7, 2020
4d92617
deps patches
cyrilletuzi Feb 7, 2020
109e230
v9.0.0
cyrilletuzi Feb 7, 2020
07dd77a
fresh install
cyrilletuzi Feb 7, 2020
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
54 changes: 45 additions & 9 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ jobs:
name: Lint check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2
- name: Setup Node
uses: actions/setup-node@v1
with:
node-version: 10
node-version: 12
- name: Install dependencies
run: npm ci
env:
Expand All @@ -30,11 +30,11 @@ jobs:
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2
- name: Setup Node
uses: actions/setup-node@v1
with:
node-version: 10
node-version: 12
- name: Install dependencies
run: npm ci
env:
Expand All @@ -58,25 +58,25 @@ jobs:
run: npm run test:ivy
if: matrix.os == 'ubuntu-latest'

test-backward:
test-next:

name: Test with Angular@8.0 (and TypeScript@3.4 and RxJS@6.4)
name: Test with Angular@next
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2
- name: Setup Node
uses: actions/setup-node@v1
with:
node-version: 10.9
node-version: 12
- name: Install dependencies
run: npm ci
env:
CI: true
- name: Build the lib (with the current version, as it is what is published on npm)
run: npm run build
- name: Update dependencies to next version
run: npm install typescript@3.4.1 rxjs@6.4.0 zone.js@0.9.1 @angular/common@8.0.0 @angular/compiler@8.0.0 @angular/core@8.0.0 @angular/platform-browser@8.0.0 @angular/platform-browser-dynamic@8.0.0 @angular/router@8.0.0 @angular/cli@8.0.1 @angular/compiler-cli@8.0.0 @angular-devkit/build-angular@0.800.1 @angular-devkit/build-ng-packagr@0.800.1
run: npm install @angular/common@next @angular/compiler@next @angular/core@next @angular/platform-browser@next @angular/platform-browser-dynamic@next @angular/router@next @angular/cli@next @angular/compiler-cli@next @angular-devkit/build-angular@next @angular-devkit/build-ng-packagr@next
env:
CI: true
- name: Run unit tests
Expand All @@ -89,3 +89,39 @@ jobs:
run: npm run test:e2e:demo
- name: Run interoperability e2e tests
run: npm run test:e2e:interoperability
- name: Run Ivy e2e tests
run: npm run test:ivy

test-minimum:

name: Test with Angular@9.0.0 and minimum dependencies requirements
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Setup Node
uses: actions/setup-node@v1
with:
node-version: 12
- name: Install dependencies
run: npm ci
env:
CI: true
- 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@3.6.4 rxjs@6.5.3 zone.js@0.10.2 tslib@1.10.0
env:
CI: true
- name: Run unit tests
run: npm run test:unit:ubuntu-latest
- name: Run unit tests in private mode
run: npm run test:unit:ubuntu-latest:private
- name: Install matching webdriver version
run: ./node_modules/.bin/webdriver-manager update --versions.chrome 78.0.3904.70
- name: Run general e2e tests
run: npm run test:e2e:demo
- name: Run interoperability e2e tests
run: npm run test:e2e:interoperability
- name: Run Ivy e2e tests
run: npm run test:ivy
24 changes: 12 additions & 12 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,11 @@

This lib is fully documented and so you'll find detailed [migration guides](./MIGRATION.md).

## 8.2.4 (2020-01-13)

No code change, just a release built with last Angular 8.
Probably the last before Angular 9.

Also, documentation about [sponsorship](https://github.com/sponsors/cyrilletuzi).

## 9.0.0-rc.1 (2019-11-08)
## 9.0.0 (2020-02-07)

To update: `ng update @ngx-pwa/local-storage@next`
To update: `ng update @ngx-pwa/local-storage`

A [full migration guide to version 9](https://github.com/cyrilletuzi/angular-async-local-storage/blob/v9beta/docs/MIGRATION_TO_V9.md) is available.
A [full migration guide to version 9](https://github.com/cyrilletuzi/angular-async-local-storage/blob/master/docs/MIGRATION_TO_V9.md) is available.

### Angular 9

Expand All @@ -24,12 +17,12 @@ v9 requires Angular 9.
Doing `ng update` should have managed backward compatibility.
But it's not easy to be sure schematics work in all cases,
so **be sure to check the migration was done correctly** by following the
[migration guide to v9](https://github.com/cyrilletuzi/angular-async-local-storage/blob/v9beta/docs/MIGRATION_TO_V9.md), **otherwise you would lost previously stored data**.
[migration guide to v9](https://github.com/cyrilletuzi/angular-async-local-storage/blob/master/docs/MIGRATION_TO_V9.md), **otherwise you would lost previously stored data**.

### Feature

- New `.watch()` method on `StorageMap` service
(see [#108](https://github.com/cyrilletuzi/angular-async-local-storage/pull/108/))
(see [documentation](https://github.com/cyrilletuzi/angular-async-local-storage/blob/master/docs/WATCHING.md))

### Breaking changes: removal of deprecated features

Expand All @@ -51,6 +44,13 @@ Please follow the [migration guide to v8](./docs/MIGRATION_TO_V8.md) for more de
- `.removeItemSubscribe()` (use `.removeItem().subscribe()` instead)
- `.clearSubscribe()` (use `.clear().subscribe()` instead)

## 8.2.4 (2020-01-13)

No code change, just a release built with last Angular 8.
Probably the last before Angular 9.

Also, documentation about [sponsorship](https://github.com/sponsors/cyrilletuzi).

## 8.2.3 (2019-09-27)

### Bug fix
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License

Copyright (c) 2016-2019 Cyrille Tuzi
Copyright (c) 2016-2020 Cyrille Tuzi

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
3 changes: 2 additions & 1 deletion MIGRATION.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# Migration guides

- [Migration from the old `angular-async-local-storage` package to `@ngx-pwa/local-storage`](./docs/MIGRATION_TO_NEW_PACKAGE.md)
- [Migration to version 6](./docs/MIGRATION_TO_V6.md)
- [Migration to version 6](./docs/MIGRATION_TO_V6.md) (for Angular 6 & 7)
- [Migration to version 8](./docs/MIGRATION_TO_V8.md)
- [Migration to version 9](./docs/MIGRATION_TO_V9.md)

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

Expand Down
13 changes: 5 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ to be homogeneous with other Angular modules.
Install the package, according to your Angular version:

```bash
# For Angular 8:
# For Angular 8 & 9:
ng add @ngx-pwa/local-storage

# For Angular 6 & 7:
Expand All @@ -69,7 +69,7 @@ npm install @ngx-pwa/local-storage@6

You should **stick to these commands**. If for any reason `ng add` does not work,
be sure to follow the [manual installation guide](./docs/MANUAL_INSTALLATION.md),
as there are additionnal steps to do in addition to the package installation.
as there are additionnal steps to do in addition to the package installation for some versions.

For version >= 8, if you have multiple applications in the same project, as usual, you need to choose the project:
```bash
Expand Down Expand Up @@ -203,11 +203,8 @@ this.storage.get('notexisting').subscribe((data) => {
```

Note you'll only get *one* value: the `Observable` is here for asynchrony but is not meant to
emit again when the stored data is changed. And it's normal: if app data change, it's the role of your app
to keep track of it, not of this lib. See [#16](https://github.com/cyrilletuzi/angular-async-local-storage/issues/16)
for more context and [#4](https://github.com/cyrilletuzi/angular-async-local-storage/issues/4)
for an example. A `watch()` method may come soon
(see [#108](https://github.com/cyrilletuzi/angular-async-local-storage/pull/108))
emit again when the stored data is changed. If you need to watch the value,
version 9 introduced a `watch()` method, see the [watching guide](./docs/WATCHING.md).

### Checking data

Expand Down Expand Up @@ -276,7 +273,7 @@ For example, it allows to implement a multiple databases scenario.
### Angular support

We follow [Angular LTS support](https://angular.io/guide/releases),
meaning we support Angular >= 6, until November 2019.
meaning we support Angular >= 7, until April 2020.

This module supports [AoT pre-compiling](https://angular.io/guide/aot-compiler) and Ivy.

Expand Down
23 changes: 18 additions & 5 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
},
"configurations": {
"production": {
"project": "projects/ngx-pwa/local-storage/ng-package.prod.json"
"project": "projects/ngx-pwa/local-storage/ng-package.prod.json",
"tsConfig": "projects/ngx-pwa/local-storage/tsconfig.lib.prod.json"
}
}
},
Expand Down Expand Up @@ -85,7 +86,6 @@
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
Expand All @@ -94,6 +94,10 @@
"type": "initial",
"maximumWarning": "2mb",
"maximumError": "5mb"
},
{
"type": "anyComponentStyle",
"maximumWarning": "6kb"
}
]
}
Expand Down Expand Up @@ -189,7 +193,6 @@
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
Expand All @@ -198,6 +201,10 @@
"type": "initial",
"maximumWarning": "2mb",
"maximumError": "5mb"
},
{
"type": "anyComponentStyle",
"maximumWarning": "6kb"
}
]
}
Expand Down Expand Up @@ -306,7 +313,6 @@
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
Expand All @@ -315,6 +321,10 @@
"type": "initial",
"maximumWarning": "2mb",
"maximumError": "5mb"
},
{
"type": "anyComponentStyle",
"maximumWarning": "6kb"
}
]
}
Expand Down Expand Up @@ -423,7 +433,6 @@
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
Expand All @@ -432,6 +441,10 @@
"type": "initial",
"maximumWarning": "2mb",
"maximumError": "5mb"
},
{
"type": "anyComponentStyle",
"maximumWarning": "6kb"
}
]
}
Expand Down
16 changes: 16 additions & 0 deletions browserslist
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
# For additional information regarding the format and rule options, please see:
# https://github.com/browserslist/browserslist#queries

# You can see what browsers were selected by your queries by running:
# npx browserslist

# Googlebot uses an older version of Chrome
# For additional information see: https://developers.google.com/search/docs/guides/rendering

> 0.5%
last 2 versions
Firefox ESR
Chrome 41 # Support for Googlebot
not dead
IE 9-11 # For IE 9-11 support, remove 'not'.
15 changes: 8 additions & 7 deletions docs/INTEROPERABILITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ as there are important things to do and to be aware of to achieve interoperabili

## Requirements

Interoperability can be achieved:
- **since v8 of this lib**,
- **only for apps that haven't been deployed in production yet**,
as v8 uses the following opt-in option to allow interoperability:
changing configuration on the fly would mean to **lose all previously stored data**.
Interoperability can be achieved **since v8 of this lib**.

In versions >= 9, no requirement, the new configuration is now the default.

In version 8, you need to add this config:

```ts
import { StorageModule } from '@ngx-pwa/local-storage';
Expand Down Expand Up @@ -54,7 +54,7 @@ import { StorageModule } from '@ngx-pwa/local-storage';
@NgModule({
imports: [
StorageModule.forRoot({
IDBNoWrap: true,
IDBNoWrap: true, // Not required in versions >= 9
IDBDBName: 'customDataBaseName',
IDBStoreName: 'customStoreName',
})
Expand Down Expand Up @@ -93,6 +93,7 @@ import { StorageModule } from '@ngx-pwa/local-storage';
@NgModule({
imports: [
StorageModule.forRoot({
IDBNoWrap: true, // Not required in versions >= 9
LSPrefix: 'myapp_',
})
]
Expand All @@ -118,7 +119,7 @@ import { StorageModule } from '@ngx-pwa/local-storage';
@NgModule({
imports: [
StorageModule.forRoot({
IDBNoWrap: true,
IDBNoWrap: true, // Not required in versions >= 9
LSPrefix: 'localforage/',
IDBDBName: 'localforage',
IDBStoreName: 'keyvaluepairs',
Expand Down
Loading