minisearch
Advanced tools
Comparing version 3.0.1 to 3.0.2
@@ -5,2 +5,7 @@ # Changelog | ||
# v3.0.2 | ||
- [fix] `addAllAsync` now allows events to be processed between chunks, avoid | ||
blocking the UI (by [@grimmen](https://github.com/grimmen)) | ||
# v3.0.1 | ||
@@ -7,0 +12,0 @@ |
@@ -769,3 +769,8 @@ /*! ***************************************************************************** | ||
if ((i + 1) % chunkSize === 0) { | ||
return { chunk: [], promise: promise.then(function () { return _this.addAll(chunk); }) }; | ||
return { | ||
chunk: [], | ||
promise: promise | ||
.then(function () { return new Promise(function (resolve) { return setTimeout(resolve, 0); }); }) | ||
.then(function () { return _this.addAll(chunk); }) | ||
}; | ||
} | ||
@@ -772,0 +777,0 @@ else { |
@@ -769,3 +769,8 @@ /*! ***************************************************************************** | ||
if ((i + 1) % chunkSize === 0) { | ||
return { chunk: [], promise: promise.then(function () { return _this.addAll(chunk); }) }; | ||
return { | ||
chunk: [], | ||
promise: promise | ||
.then(function () { return new Promise(function (resolve) { return setTimeout(resolve, 0); }); }) | ||
.then(function () { return _this.addAll(chunk); }) | ||
}; | ||
} | ||
@@ -772,0 +777,0 @@ else { |
@@ -775,3 +775,8 @@ (function (global, factory) { | ||
if ((i + 1) % chunkSize === 0) { | ||
return { chunk: [], promise: promise.then(function () { return _this.addAll(chunk); }) }; | ||
return { | ||
chunk: [], | ||
promise: promise | ||
.then(function () { return new Promise(function (resolve) { return setTimeout(resolve, 0); }); }) | ||
.then(function () { return _this.addAll(chunk); }) | ||
}; | ||
} | ||
@@ -778,0 +783,0 @@ else { |
{ | ||
"name": "minisearch", | ||
"version": "3.0.1", | ||
"version": "3.0.2", | ||
"description": "Tiny but powerful full-text search engine for browser and Node", | ||
@@ -79,3 +79,3 @@ "main": "dist/umd/index.js", | ||
"build-docs": "typedoc --options typedoc.json && touch docs/.nojekyll && yarn build-examples", | ||
"build-examples": "cd examples && yarn build && cd ../", | ||
"build-examples": "yarn build && cd examples && yarn install && yarn build && cd ../", | ||
"lint": "eslint 'src/**/*.{js,ts}'", | ||
@@ -82,0 +82,0 @@ "lintfix": "eslint --fix 'src/**/*.{js,ts}'", |
# MiniSearch | ||
[![Build Status](https://travis-ci.com/lucaong/minisearch.svg?branch=master)](https://travis-ci.com/lucaong/minisearch) | ||
[![CI Build](https://github.com/lucaong/minisearch/workflows/CI%20Build/badge.svg)](https://github.com/lucaong/minisearch/actions) | ||
[![Coverage Status](https://coveralls.io/repos/github/lucaong/minisearch/badge.svg?branch=master)](https://coveralls.io/github/lucaong/minisearch?branch=master) | ||
@@ -82,3 +82,3 @@ [![Minzipped Size](https://badgen.net/bundlephobia/minzip/minisearch)](https://bundlephobia.com/result?p=minisearch) | ||
```html | ||
<script src="https://cdn.jsdelivr.net/npm/minisearch@3.0.1/dist/umd/index.min.js"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/minisearch@3.0.2/dist/umd/index.min.js"></script> | ||
``` | ||
@@ -85,0 +85,0 @@ |
@@ -494,3 +494,8 @@ import SearchableMap from './SearchableMap/SearchableMap' | ||
if ((i + 1) % chunkSize === 0) { | ||
return { chunk: [], promise: promise.then(() => this.addAll(chunk)) } | ||
return { | ||
chunk: [], | ||
promise: promise | ||
.then(() => new Promise(resolve => setTimeout(resolve, 0))) | ||
.then(() => this.addAll(chunk)) | ||
} | ||
} else { | ||
@@ -497,0 +502,0 @@ return { chunk, promise } |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
9370
602733
26