Giter Site home page Giter Site logo

alorel / ngforage Goto Github PK

View Code? Open in Web Editor NEW
111.0 6.0 17.0 10.36 MB

localForage bindings for Angular

Home Page: https://alorel.github.io/ngforage/

License: MIT License

JavaScript 7.23% TypeScript 92.77%
localforage localforage-bindings angular bindings cache caching

ngforage's Introduction

PROJECT SHUT DOWN

I haven't used the library at work or for personal projects since Angular 13 or 14 and it's time to let it rest. I'd recommend switching to using IndexedDB directly (we've made Observable wrappers around its API at work) - browser support is great these days & the API is much more performance and feature-rich.

Peace out and a huge thanks to everyone who's used ngforage over the years!

ngforage

localforage bindings for Angular


NPM link


Installation

You can also npm install manually:

 npm install localforage@^1.10.0 ngforage@^11.0.0 # Angular 17
 npm install localforage@^1.10.0 ngforage@^10.0.0 # Angular 16
 npm install localforage@^1.10.0 ngforage@^9.0.0 # Angular 15
 npm install localforage@^1.10.0 ngforage@^8.0.0 # Angular 14
 npm install localforage@^1.9.0 ngforage@^7.0.0 # Angular 13
 npm install localforage@^1.5.0 ngforage@^6.0.0 # Angular 9
 npm install localforage@^1.5.0 ngforage@^5.0.0 # Angular 8
 npm install localforage@^1.5.0 ngforage@^4.0.0 # Angular 7
 npm install localforage@^1.5.0 ngforage@^3.0.0 # Angular 6
 npm install localforage@^1.5.0 ngforage@^2.0.0 # Angular 5
Basic Usage
  import {DEFAULT_CONFIG, NgForageOptions, NgForageConfig, Driver} from 'ngforage';
  
  @NgModule({
    providers: [
      // One way of configuring ngForage
      {
        provide: DEFAULT_CONFIG,
        useValue: {
          name: 'MyApp',
          driver: [ // defaults to indexedDB -> webSQL -> localStorage
            Driver.INDEXED_DB,
            Driver.LOCAL_STORAGE
          ]
        } as NgForageOptions
      }
    ]
  })
  export class AppModule{
    // An alternative way of configuring ngforage
    public constructor(ngfConfig: NgForageConfig) {
      ngfConfig.configure({
        name: 'MyApp',
        driver: [ // defaults to indexedDB -> webSQL -> localStorage
          Driver.INDEXED_DB,
          Driver.LOCAL_STORAGE
        ]
      });
    }
  }
  import {NgForage, Driver, NgForageCache, CachedItem} from 'ngforage';

  @Component({
    /* If you plan on making per-component config adjustments, add the services to the component's providers
     * to receive fresh instances; otherwise, skip the providers section.
     */
    providers: [NgForage, NgForageCache]
  })
  class SomeComponent implements OnInit {
    constructor(private readonly ngf: NgForage, private readonly cache: NgForageCache) {}
    
    public getItem<T = any>(key: string): Promise<T> {
      return this.ngf.getItem<T>(key);
    }
    
    public getCachedItem<T = any>(key: string): Promise<T | null> {
      return this.cache.getCached<T>(key)
        .then((r: CachedItem<T>) => {
          if (!r.hasData || r.expired) {
            return null;
          }
          
          return r.data;
        })
    }
    
    public ngOnInit() {
      this.ngf.name = 'SomeStore';
      this.cache.driver = Driver.LOCAL_STORAGE;
    }
  }
Store instances

It is recommended to declare NgForage and/or NgForageCache in providers if you're not using the default configuration. The running configuration hash is used to create and reuse drivers (e.g. different IndexedDB databases), therefore setting it on a shared instance might have unintended side-effects.

Defining a Driver
  1. Define a driver as described in the localForage docs
  2. Plug it in, either directly through localForage or through NgForageConfig:
import {NgModule} from "@angular/core";
import {NgForageConfig} from 'ngforage';
import localForage from 'localforage';

// Your driver definition
const myDriver: LocalForageDriver = {/*...*/};

// Define it through localForage
localForage.defineDriver(myDriver)
  .then(() => console.log('Defined!'))
  .catch(console.error);

@NgModule({})
export class AppModule {

  constructor(conf: NgForageConfig) {
    // Or through NgForageConfig
    conf.defineDriver(myDriver)
      .then(() => console.log('Defined!'))
      .catch(console.error);
  }
}

ngforage's People

Contributors

alorel avatar dependabot[bot] avatar greenkeeper[bot] avatar greenkeeperio-bot avatar lgtm-migrator avatar patrykp57 avatar ponich avatar semantic-release-bot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

ngforage's Issues

An in-range update of @angular/platform-browser-dynamic is breaking the build 🚨

Version 5.2.1 of @angular/platform-browser-dynamic was just published.

Branch Build failing 🚨
Dependency @angular/platform-browser-dynamic
Current Version 5.2.0
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

@angular/platform-browser-dynamic is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push The Travis CI build could not complete due to an error Details

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

prod build fails - 'could not resolve ../imports/localforage/'

Hello,

Although the dev build passes ok, building with --prod flag causes the following error:

ERROR in Error during template compile of 'AppModule'
  Could not resolve ../imports/localforage relative to /home/green/develop/angular6-imageslider-interview-app/node_modules/ngforage/ngforage.d.ts. in 'NgForageConfig'
    'NgForageConfig' contains the error at ../ngforage/ngforage.ts(19,53).

Ubuntu, Angular&CLI 6.0.8
clean app on default configs; am I missing something?

Thanks!

Error during AOT build

Hi!
I've updated package.json to use ngforage@^2.0.0 along with @angular/core@^5.0.0 and for some reason when trying to build with AOT I get following message:
image
Do you have any clue why it behaves like this ? I was trying with both 2.x and 3.x and the result is the same. However when I compile without AOT it works perfectly fine.

An in-range update of @types/node is breaking the build 🚨

The devDependency @types/node was updated from 10.12.11 to 10.12.12.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

@types/node is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of @angular/core is breaking the build 🚨

Version 5.2.1 of @angular/core was just published.

Branch Build failing 🚨
Dependency @angular/core
Current Version 5.2.0
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

@angular/core is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push The Travis CI build could not complete due to an error Details

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Action required: Greenkeeper could not be activated 🚨

🚨 You need to enable Continuous Integration on all branches of this repository. 🚨

To enable Greenkeeper, you need to make sure that a commit status is reported on all branches. This is required by Greenkeeper because it uses your CI build statuses to figure out when to notify you about breaking changes.

Since we didn’t receive a CI status on the greenkeeper/initial branch, it’s possible that you don’t have CI set up yet. We recommend using Travis CI, but Greenkeeper will work with every other CI service as well.

If you have already set up a CI for this repository, you might need to check how it’s configured. Make sure it is set to run on all new branches. If you don’t want it to run on absolutely every branch, you can whitelist branches starting with greenkeeper/.

Once you have installed and configured CI on this repository correctly, you’ll need to re-trigger Greenkeeper’s initial pull request. To do this, please delete the greenkeeper/initial branch in this repository, and then remove and re-add this repository to the Greenkeeper integration’s white list on Github. You'll find this list on your repo or organization’s settings page, under Installed GitHub Apps.

An in-range update of @types/jasmine is breaking the build 🚨

Version 2.8.4 of @types/jasmine was just published.

Branch Build failing 🚨
Dependency @types/jasmine
Current Version 2.8.3
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

@types/jasmine is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push The Travis CI build could not complete due to an error Details

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of @angular/compiler-cli is breaking the build 🚨

Version 5.2.1 of @angular/compiler-cli was just published.

Branch Build failing 🚨
Dependency @angular/compiler-cli
Current Version 5.2.0
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

@angular/compiler-cli is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push The Travis CI build could not complete due to an error Details

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of @angular/animations is breaking the build 🚨

Version 5.2.1 of @angular/animations was just published.

Branch Build failing 🚨
Dependency @angular/animations
Current Version 5.2.0
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

@angular/animations is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push The Travis CI build could not complete due to an error Details

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of @types/node is breaking the build 🚨

The devDependency @types/node was updated from 10.11.4 to 10.11.5.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

@types/node is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build failed (Details).
  • coverage/coveralls: First build on greenkeeper/@types/node-10.11.5 at 99.387% (Details).

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of @semantic-release/npm is breaking the build 🚨

The devDependency @semantic-release/npm was updated from 5.0.4 to 5.0.5.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

@semantic-release/npm is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).
  • coverage/coveralls: First build on greenkeeper/@semantic-release/npm-5.0.5 at 98.16% (Details).

Release Notes for v5.0.5

5.0.5 (2018-10-08)

Bug Fixes

  • use default value for null options (df993c7)
Commits

The new version differs by 6 commits.

  • df993c7 fix: use default value for null options
  • 124aca1 docs: harmonize docs with other plugins
  • 98fc020 chore(package): update commitizen to version 3.0.0
  • ec20a08 chore(package): update nock to version 10.0.0
  • a1e46d6 chore(package): update xo to version 0.23.0
  • 6e53a42 chore(package): update delay to version 4.0.0

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of @types/node is breaking the build 🚨

The devDependency @types/node was updated from 10.11.1 to 10.11.2.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

@types/node is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build failed (Details).
  • coverage/coveralls: First build on greenkeeper/@types/node-10.11.2 at 99.387% (Details).

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Compilation error Angular 7 and 8 in AoT

  • I have read the README and API docs (if applicable); the issue is not covered there.
  • I have searched the repository issues and pull requests; my query is not covered there.

  • Expected behaviour: build success
  • Actual behaviour: build failed
  • Environment:
    • Node version: 8.12.0
    • Browser and browser version (if applicable): Chrome
  • Steps to reproduce:
npm i
npm run build

ERROR in Error during template compile of 'AppModule'
Function calls are not supported in decorators but 'NgForageModule' was called.


Additional information, screenshots etc go here.

An in-range update of @types/node is breaking the build 🚨

The devDependency @types/node was updated from 10.9.4 to 10.10.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

@types/node is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build failed (Details).
  • coverage/coveralls: First build on greenkeeper/@types/node-10.10.0 at 99.387% (Details).

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of @angular/cli is breaking the build 🚨

The devDependency @angular/cli was updated from 7.1.0 to 7.1.1.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

@angular/cli is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

Release Notes for v7.1.1

Commits

@ngtools/webpack (7.1.1)

Commit Description Notes
files are not being updated when using `allowJs` or `resolveJsonModule` (#13089) [Closes #13076]
[Closes #12964]
cleanup resources after modules are loaded (#12994)

@schematics/update (0.11.1)

Commit Description Notes
replace environment variables in npm/yarn rc

@schematics/angular (7.1.1)

Commit Description Notes
let tslint resolve codelyzer (#13101) [Closes #13101]
[Closes #13100]
add providers into providers metadata but not inner Object with ut. (#13081)

Special Thanks

Alan Agius, Charles Lyding, Vikram Subramanian, 赵正阳, Hans Larsen, Mathou54, Krishna Mohan

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of @angular/forms is breaking the build 🚨

Version 5.2.1 of @angular/forms was just published.

Branch Build failing 🚨
Dependency @angular/forms
Current Version 5.2.0
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

@angular/forms is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push The Travis CI build could not complete due to an error Details

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of @angular/common is breaking the build 🚨

Version 5.2.1 of @angular/common was just published.

Branch Build failing 🚨
Dependency @angular/common
Current Version 5.2.0
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

@angular/common is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push The Travis CI build could not complete due to an error Details

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of karma-webpack is breaking the build 🚨

☝️ Greenkeeper’s updated Terms of Service will come into effect on April 6th, 2018.

Version 2.0.10 of karma-webpack was just published.

Branch Build failing 🚨
Dependency karma-webpack
Current Version 2.0.9
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

karma-webpack is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push The Travis CI build failed Details

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Data loss on pass by reference.

Good afternoon.

Thank you for NgForage.

I met a case of data loss before and after storing data into NgForage.

I am not sure if it is caused by 'passing data by reference and the data changes continuously'.

I saved data like below. A big data passed by reference. You will see table variable which is two dimensional array.

image

And the result is below.

image

Array is cut.

I suspect that the data is passed by reference and the value of reference, especially the array part is changing.

An in-range update of snyk is breaking the build 🚨

Version 1.68.1 of snyk was just published.

Branch Build failing 🚨
Dependency snyk
Current Version 1.68.0
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

snyk is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push The Travis CI build could not complete due to an error Details

Release Notes v1.68.1

<a name"1.68.1">

1.68.1 (2018-01-16)

Bug Fixes

  • json obj for snyk test error (cdd907c8)
  • update error messages, debug messages, test, erroring flow (1c579e1b)
  • update help wording (9eaaf84d)
Commits

The new version differs by 4 commits.

  • cdd907c fix: json obj for snyk test error
  • 1c579e1 fix: update error messages, debug messages, test, erroring flow
  • 9eaaf84 fix: update help wording
  • 02baf7f chore: remove residual csproj

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of @angular/compiler is breaking the build 🚨

Version 5.2.1 of @angular/compiler was just published.

Branch Build failing 🚨
Dependency @angular/compiler
Current Version 5.2.0
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

@angular/compiler is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push The Travis CI build could not complete due to an error Details

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of @types/node is breaking the build 🚨

The devDependency @types/node was updated from 10.11.3 to 10.11.4.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

@types/node is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build failed (Details).
  • coverage/coveralls: First build on greenkeeper/@types/node-10.11.4 at 99.387% (Details).

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of @types/node is breaking the build 🚨

The devDependency @types/node was updated from 10.10.1 to 10.10.2.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

@types/node is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build failed (Details).
  • coverage/coveralls: First build on greenkeeper/@types/node-10.10.2 at 99.387% (Details).

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of localforage is breaking the build 🚨

☝️ Greenkeeper’s updated Terms of Service will come into effect on April 6th, 2018.

Version 1.7.0 of localforage was just published.

Branch Build failing 🚨
Dependency localforage
Current Version 1.6.0
Type dependency

This version is covered by your current version range and after updating it in your project the build failed.

localforage is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • continuous-integration/travis-ci/push The Travis CI build failed Details

Release Notes Add support for package.json "module" prop

This is a largely minor release but we've added support for the "module" property in package.json–see #805.

Bumping a minor version to make sure people's builds don't break with the new property.

Commits

The new version differs by 7 commits.

  • 098e119 chore: Bump to version 1.7
  • de866cd Merge pull request #806 from brettz9/module-package-json
  • dba7a16 Add module to package.json for #805
  • f66bb7b Merge pull request #802 from Alorel/patch-1
  • ffd2173 Update README.md
  • 3cb9009 Merge pull request #789 from augbog/augbog/version-documentation
  • 8422e50 #658 add documentation for version configuration

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of semantic-release is breaking the build 🚨

The devDependency semantic-release was updated from 15.12.3 to 15.12.4.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

semantic-release is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).
  • coverage/coveralls: First build on greenkeeper/semantic-release-15.12.4 at 98.98% (Details).

Release Notes for v15.12.4

15.12.4 (2018-11-30)

Bug Fixes

  • remove unnecessary branch parameter from push function (ffe1062)
Commits

The new version differs by 1 commits.

  • ffe1062 fix: remove unnecessary branch parameter from push function

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

No available storage method found

Hi, currently I'm using NgForage 2.0.0 and LocalForage 1.5.0 I'm navigating throught pages I'm getting error like :

core.js:1449 ERROR Error: Uncaught (in promise): Error: No available storage method found.
Error: No available storage method found

image below

capturar

I'am using this configuration

constructor(ngfConfig: NgForageConfig) {
ngfConfig.configure({
      name: 'itens',
      storeName: 'dbitens',
      driver: NgForageConfig.DRIVER_INDEXEDDB
    });
}

Angular-Cli : 1.7.3
@angular : 5.2.5

An in-range update of semver is breaking the build 🚨

Version 5.5.0 of semver was just published.

Branch Build failing 🚨
Dependency semver
Current Version 5.4.1
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

semver is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push The Travis CI build could not complete due to an error Details

Commits

The new version differs by 7 commits.

  • 44cbc84 v5.5.0
  • 1d37529 Cleaned up coerce behavior
  • e7092b4 Improved coerce regex and added coerce to README.
  • 68cef2d Added version coercion to the module and CLI.
  • ec6f97a range.bnf: Fix invalid bracket expression
  • 906b664 travis: don't cache node_modules
  • 7184ff4 range.bnf: Remove unnecessary empty entry

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of @types/node is breaking the build 🚨

The devDependency @types/node was updated from 10.10.0 to 10.10.1.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

@types/node is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build failed (Details).
  • coverage/coveralls: First build on greenkeeper/@types/node-10.10.1 at 99.387% (Details).

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

ReferenceError: sessionStorage is not defined

Hello, I've updated ngForage-ng5 to [email protected] and there is something wrong in Angular 5.2.9 (I'm also using Angular Unviersal) when trying to run my server.js by node command. It throws an error :

ReferenceError: sessionStorage is not defined

And it says there is something wrong in this line :

function _isSessionStorageUsable() {
    return typeof sessionStorage !== 'undefined' && !checkIfSessionStorageThrows() || sessionStorage.length > 0;
}

Here is screen:

image

Variable sessionStorage is undefined because compiler cannot read length. Is it something wrong with my code, or is it ngForage core issue ?

EDIT
After deleting || sessionStorage.length > 0; from function _isSessionStorageUsable() nodeJS server finally start, but it is still a problem, becausue I had to edit server.js after compilation.

Gr

An in-range update of @types/webpack is breaking the build 🚨

Version 3.8.3 of @types/webpack was just published.

Branch Build failing 🚨
Dependency @types/webpack
Current Version 3.8.2
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

@types/webpack is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push The Travis CI build could not complete due to an error Details

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of @angular/http is breaking the build 🚨

Version 5.2.1 of @angular/http was just published.

Branch Build failing 🚨
Dependency @angular/http
Current Version 5.2.0
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

@angular/http is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push The Travis CI build could not complete due to an error Details

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Issues on AOT: 'NgForageModule' references 'InstanceFactory'

  1. create a new project with angular cli
  2. yarn add localforage@^1.5.0 ngforage@^2.0.0
  3. import using NgForageModule.forRoot()
  4. add constructor to AppModule:
    public constructor(ngfConfig: NgForageConfig) {
      ngfConfig.configure({
        name: 'MyApp',
        driver: [ // defaults to indexedDB -> webSQL -> localStorage -> sessionStorage
          NgForageConfig.DRIVER_INDEXEDDB,
          NgForageConfig.DRIVER_LOCALSTORAGE
        ]
      });
    }

build with aot:

ERROR in Error during template compile of 'AppModule'
  Could not resolve ../config/NgForageConfig.service relative to /home/can/projects/kill/ng-forage-test/node_modules/ngforage/ngforage.d.ts. in 'NgForageModule'
    'NgForageModule' references 'InstanceFactory'
      'InstanceFactory' contains the error at ../ngforage/ngforage.ts(50,12).

Versions:

Angular CLI: 1.7.3
Node: 7.7.3
OS: linux x64
Angular: 5.2.9
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router

@angular/cli: 1.7.3
@angular-devkit/build-optimizer: 0.3.2
@angular-devkit/core: 0.3.2
@angular-devkit/schematics: 0.3.2
@ngtools/json-schema: 1.2.0
@ngtools/webpack: 1.10.2
@schematics/angular: 0.3.2
@schematics/package-update: 0.3.2
typescript: 2.5.3
webpack: 3.11.0


ngforage:  2.0.2
localforage  1.7.1,

An in-range update of @angular-devkit/build-angular is breaking the build 🚨

The devDependency @angular-devkit/build-angular was updated from 0.11.0 to 0.11.1.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

@angular-devkit/build-angular is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of autoprefixer is breaking the build 🚨

Version 7.2.5 of autoprefixer was just published.

Branch Build failing 🚨
Dependency autoprefixer
Current Version 7.2.4
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

autoprefixer is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push The Travis CI build could not complete due to an error Details

Release Notes 7.2.5
  • Fix multiple prefixes in declaration value.
FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

unable to save data

unable to set the data to storage.. try everything but not working..
using angular 6

An in-range update of @angular-devkit/build-angular is breaking the build 🚨

The devDependency @angular-devkit/build-angular was updated from 0.8.4 to 0.8.5.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

@angular-devkit/build-angular is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of css-loader is breaking the build 🚨

Version 0.28.9 of css-loader was just published.

Branch Build failing 🚨
Dependency css-loader
Current Version 0.28.8
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

css-loader is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push The Travis CI build could not complete due to an error Details

Release Notes v0.28.9

2018-01-17

Bug Fixes

Commits

The new version differs by 3 commits.

  • 630579d chore(release): 0.28.9
  • 604bd4b chore(package): update dependencies
  • d1d8221 fix: ignore invalid URLs (url()) (#663)

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of @types/node is breaking the build 🚨

The devDependency @types/node was updated from 10.11.2 to 10.11.3.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

@types/node is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build failed (Details).
  • coverage/coveralls: First build on greenkeeper/@types/node-10.11.3 at 99.387% (Details).

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of uglify-es is breaking the build 🚨

Version 3.3.6 of uglify-es was just published.

Branch Build failing 🚨
Dependency uglify-es
Current Version 3.3.5
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

uglify-es is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push The Travis CI build could not complete due to an error Details

Release Notes v3.3.6

 

Commits

The new version differs by 21 commits.

  • aa1786d harmony-v3.3.6
  • 0d5df27 add tests for #2740
  • b56e1f1 add test for #2747
  • 9acace2 fix test
  • 0f2be14 Merge branch 'master' into harmony-v3.3.6
  • 460218a v3.3.6
  • e49416e fix reduce_vars on AST_Accessor (#2776)
  • d4d7d99 add SymbolDef IDs to --output ast (#2772)
  • 6a696d0 fix output of imported AST (#2771)
  • 1c9e13f update dependencies (#2770)
  • b757450 fix nested unused assignments (#2769)
  • 23ec484 fix corner case in #2763 (#2766)
  • f1e1bb4 join object assignments (#2763)
  • 6a0af85 skip only vars in if_return (#2759)
  • 1eb15f4 fix reduce_vars with uninitialized let variables (#2760)

There are 21 commits in total.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of ng-packagr is breaking the build 🚨

The devDependency ng-packagr was updated from 4.4.0 to 4.4.5.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

ng-packagr is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

No available storage method found - Angular and Universal

Hello, currently I'm using NgForage 2.0.4 and LocalForage 1.7.1 with Angular 5.2.10 and Angular Universal, and sometimes when I'm navigating throught pages I'm getting error like :

ERROR { Error: Uncaught (in promise): Error: No available storage method found.
Error: No available storage method found.

I'm using NgForage to hold data for offline PWA. To download data from API (or from IndexeDB) I wrote two functions - one for browser side (with NgForage) and one for server side (without NgForage). It's looks like :

    if (isPlatformBrowser(this.platformId)) {
      this.getDataFromIndexedDB(params, index);
    }

    if (isPlatformServer(this.platformId))
      this.getDataFromApi(params, index);

So error visible above shouldn't even appear. I read it's only showing when LocalForage can't find window.promise, but in my sytuation, window.promise always exist. On server side I'm not using NgForage. Do you know how to fix that ? Error only appear in production version and linking to this part of LocalForage:

   this._driverSet = oldDriverSetDone.then(function () {
            var driverName = supportedDrivers[0];
            self._dbInfo = null;
            self._ready = null;

            return self.getDriver(driverName).then(function (driver) {
                self._driver = driver._driver;
                setDriverToConfig();
                self._wrapLibraryMethodsWithReady();
                self._initDriver = initDriver(supportedDrivers);
            });
        })["catch"](function () {
            setDriverToConfig();
            var error = new Error('No available storage method found.');
            self._driverSet = Promise$1.reject(error);
            return self._driverSet;
        });

An in-range update of @angular/platform-browser is breaking the build 🚨

Version 5.2.1 of @angular/platform-browser was just published.

Branch Build failing 🚨
Dependency @angular/platform-browser
Current Version 5.2.0
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

@angular/platform-browser is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push The Travis CI build could not complete due to an error Details

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of @angular-devkit/build-ng-packagr is breaking the build 🚨

The devDependency @angular-devkit/build-ng-packagr was updated from 0.11.0 to 0.11.1.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

@angular-devkit/build-ng-packagr is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

DRIVER error

angular 6.x
localforage@^1.5.0
ngforage@^3.0.0

In my environment, I was giving error in DRIVE, when it was instantiated and used in the following way:

driver: [
          Driver.INDEXED_DB,
          Driver.LOCAL_STORAGE
]

captura de tela de 2018-10-19 10-36-59

changing to this, the error has stopped, but it is not saving in localstorage, only in indexDB

driver: [
                'asyncStorage',
                'localStorageWrapper'
            ]

An in-range update of reflect-metadata is breaking the build 🚨

Version 0.1.12 of reflect-metadata was just published.

Branch Build failing 🚨
Dependency reflect-metadata
Current Version 0.1.10
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

reflect-metadata is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push The Travis CI build could not complete due to an error Details

Release Notes reflect-metadata v0.1.12

This release contains some bug fixes and test improvements. It addresses the following issues:

  • #80 - metadata seemingly erased when using multiple files with karma,mocha,webpack
  • #78 - Error when working with another polyfill, like core-js/reflect
  • #45 - When installed redundantly, Metadata could be erased

This release also fixes a critical issue in 0.1.11 that prevents the library from loading.

Commits

The new version differs by 4 commits.

  • c775af7 Fix issue with exporter
  • 69f4359 Do not clobber existing Reflect metadata polyfill. Fixes #80, #78
  • d20867e Fix npmignore.
  • c9451f3 Drop legacy 'licenses' field, update bower.json

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

problem in build

Angular 7.x
ngforage 4

error in console

captura de tela de 2018-10-24 14-23-03

command used to generate the build

node --max-old-space-size=8192 node_modules/@angular/cli/bin/ng build --prod

file that is reporting the error

import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FlexLayoutModule } from '@angular/flex-layout';
import {FormsModule, ReactiveFormsModule} from '@angular/forms';
// @ts-ignore
import {
    MatButtonModule,
    MatFormFieldModule,
    MatIconModule,
    MatInputModule,
    MatListModule,
    MatToolbarModule,
    MatCardModule,
    // MatSpinnerModule,
} from '@angular/material';

import { LoginComponent } from './login/login.component';
import {SharedModule} from '../shared/shared.module';
import {HttpModule} from '@angular/http';


import {NgForageModule, NgForageConfig, Driver} from 'ngforage';


@NgModule({
    imports: [
        CommonModule,
        ReactiveFormsModule,
        FormsModule,
        MatToolbarModule,
        MatListModule,
        MatButtonModule,
        MatFormFieldModule,
        MatInputModule,
        MatIconModule,
        MatCardModule,
        FlexLayoutModule,
        SharedModule,
        HttpModule,
        NgForageModule.forRoot(),
        NgForageModule.forRoot({
            name: 'funil-pwa',
            driver: [
                Driver.INDEXED_DB,
                Driver.LOCAL_STORAGE
            ]
        })
    ],
    declarations: [
        LoginComponent
    ]
})
export class AuthModule
{

    public constructor(ngfConfig: NgForageConfig) {
        ngfConfig.configure({
            name: 'funil-pwa',
            driver: [
                Driver.INDEXED_DB,
                Driver.LOCAL_STORAGE
            ]
        });
    }
}

An in-range update of uuid is breaking the build 🚨

Version 3.2.0 of uuid was just published.

Branch Build failing 🚨
Dependency uuid
Current Version 3.1.0
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

uuid is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push The Travis CI build could not complete due to an error Details

Commits

The new version differs by 14 commits.

  • c0d44fd Publish v3.2.0 (#240)
  • eaa9f4e Use standard-version for release (#246)
  • 67d697c Fix #248 (#251)
  • 1fef18b fix: use msCrypto if available. Fixes #241 (#247)
  • 815daa3 eslint (#224)
  • bba9402 eslint (#219)
  • 0ea33e6 use typeof to check for crypto rather than global. Fixes #185 (#221)
  • c1f720d Defer random initialization of node and clockseq. Fixes #189 (#220)
  • dc02a76 UUID v3 Support (#217)
  • 72fbabb Corrected version from v4->v5 in README_js.md (#215)
  • 962c80a Use runmd to build README (#204)
  • e2389b3 Fix parentheses typo in README.md (#203)
  • 880d24e Update README.md (#208)
  • 8e23981 Fix buffer not being modified (uuid v5) (#201)

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.