Skip to content

Commit

Permalink
V5.0.0 (#621)
Browse files Browse the repository at this point in the history
* working for one test

* ES6

* prettier config

* remove node@14 (EOL)

* uses es6 syntax throughout

* update docs

* use destructuring

* need to do this monster commit now since broken but past point of no return. Stuff releated to ES6ifyinh and class-ifying lib

* fixed some tests

* fixed some more tests

* fix more tests

* tidy up

* classification

* tidy up and added DELETE_RAW

* tidyup

* align prettier with standard

* fixed cacheLength thing, isLeaf option is no longer user-definable

* update code formatting

* fix tests

* fix tests

* remove unneeded options object from invokation

* remove unused comments

* factor out EntryStream

* back to arrow functions to allow destructured assignment

* test destructuring

* update docs, and add some destructuring assignment for test purposes

* simplified code

* update demo (work in progress)

* fix linting issues

* removed unreferenced file

* WIP: demo2

* WIP demo

* WIP demo2

* WIP demo and FACETs no longer include empty buckets by default

* WIP demo

* PAGING info in resultset

* WIP demo

* WIP demo

* WIP demo- js templates now a part of main lib under { UI }

* linting

* capitalise classes

* WIP demo

* WIP demo

* WIP demo

* linting

* better webpackery

* if only one page- hide paging

* autocomplete

* linting

* update deps

* trying to fix build on github

* trying to fix build on github

* trying to fix build on github

* trying to fix build on github

* trying to fix build on github

* trying to fix build on github

* trying to fix build on github

* update webpack and tape deps

* bootstrapification

* bootstrapification

* improved caching

* better passing of vars to autosuggest

* latest

* version bump

* fix deps, add dist dir, version bump

* removed demo to its own repo at https://github.com/fergiemcdowall/search-index-demo

* appease the linter

* added som JSDocage

* update docs

* update deps

* update API docs

* human readable timestamps

* remove link to Gitter (use GitHub Discussions instead)

* update doc

* added typedefs in jsdoc

* set version

* version bump
  • Loading branch information
fergiemcdowall authored Aug 19, 2024
1 parent eee4ced commit 193a340
Show file tree
Hide file tree
Showing 109 changed files with 8,698 additions and 184,840 deletions.
18 changes: 7 additions & 11 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,15 @@
name: tests
on:
- push
- pull_request
- push
jobs:
run-tests:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14, 16, 18, 20]
node-version: [18, 20, 22]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: npm install
- run: sudo apt-get install xvfb
- run: xvfb-run --auto-servernum npm test

- uses: actions/checkout@v4
- run: npm install
- run: xvfb-run npm test
timeout-minutes: 5 # If the tests fails, the browser will hang open indefinitely
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,6 @@ demo/generate-index/earthporn

IGNORE*

TMP*
TMP*

NOTES.org
7 changes: 7 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"arrowParens": "avoid",
"bracketSpacing": true,
"semi": false,
"singleQuote": true,
"trailingComma": "none"
}
15 changes: 7 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

### A network resilient, persistent full-text search library for the browser and Node.js

[![Gitter](https://img.shields.io/gitter/room/nwjs/nw.js.svg?style=flat-square)](https://gitter.im/fergiemcdowall/search-index)
[![npm](https://img.shields.io/npm/v/search-index.svg?style=flat-square)](https://www.npmjs.com/package/search-index)
[![npm](https://img.shields.io/npm/dm/search-index.svg?style=flat-square)](https://npm-stat.com/charts.html?package=search-index)
[![license](https://img.shields.io/github/license/mashape/apistatus.svg?style=flat-square)](LICENCE)
Expand All @@ -13,22 +12,22 @@
## Quick start

```javascript
const si = require('search-index')
import { SearchIndex } from 'search-index'

// initialize an index
const { PUT, QUERY } = await si()
const { PUT, QUERY } = new SearchIndex(options)

// add documents to the index
await PUT( /* objects */ )
await PUT(documents)

// read documents from the index
const results = await QUERY( /* query */ )
const results = await QUERY(query)
```

## Documentation

* [Browser
demo](https://codesandbox.io/p/github/fergiemcdowall/search-index-demo/)
([source code](https://github.com/fergiemcdowall/search-index-demo))
* [API](docs/API.md)
* [FAQ](docs/FAQ.md)
* [Browser demo](https://fergiemcdowall.github.io/search-index/demo/index.html) ([source code](demo/))
* [Code examples](docs/EXAMPLES.md)

10 changes: 0 additions & 10 deletions demo/README.md

This file was deleted.

18 changes: 0 additions & 18 deletions demo/generate-index/EarthPorn-top-processed-2.json

This file was deleted.

Loading

0 comments on commit 193a340

Please sign in to comment.