Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
cb65a2e
chore
tharropoulos Feb 5, 2025
e0eab4f
build: add tsup build system
tharropoulos Aug 21, 2024
bdb1463
build: add cjs plugin or esbuild
tharropoulos Aug 21, 2024
ba3c290
fix: import from cjs on `require`
tharropoulos Aug 21, 2024
93942ee
build: add esbuild options for bundling UMD dependencies
tharropoulos Aug 21, 2024
838c9bd
fix: avoid reusing logger import from `loglevel`
tharropoulos Aug 21, 2024
2b51b85
chore: remove uneeded common-js dependency for esbuild
tharropoulos Aug 21, 2024
8a6596d
chore: add prepare script to run before package publishing
tharropoulos Aug 21, 2024
b337526
chore: update package-lock based on changes
tharropoulos Aug 21, 2024
3b69e10
feat(build): export types and fix browser polyfills
tharropoulos Feb 5, 2025
72f1b98
chore(build): remove peer dependency for babel runtime
tharropoulos Feb 5, 2025
0c8c173
chore: build artifacts
tharropoulos Feb 5, 2025
8dea7d5
chore: remove typesense-data from source control
tharropoulos Feb 6, 2025
f7b687e
feat(multi-search): add union parameter to multisearch
tharropoulos Feb 3, 2025
5663223
feat(client): add stemming dictionaries support
tharropoulos Feb 3, 2025
5353759
feat(multi-search): add `rerank_hybrid_searches` parameter to multise…
tharropoulos Feb 3, 2025
d2c0eba
feat(field): add `tokens_separators` and `symbols_to_index` to field-…
tharropoulos Feb 3, 2025
d389717
feat(collections): add collection truncation option
tharropoulos Feb 3, 2025
efa6bed
feat(fields): add `geopolygon` field type
tharropoulos Feb 3, 2025
b7350c9
feat(search): add `max_filter_by_candidates` search param
tharropoulos Feb 3, 2025
d58512c
feat(operations): add the `schema_changes` operation option
tharropoulos Feb 3, 2025
c2dacf1
fix: remove redudant stemming dict file
tharropoulos Feb 3, 2025
ec09e2d
fix(stemming): fix stemming resource path
tharropoulos Feb 4, 2025
19efbb0
fix(stemming): update dictionary interface and JSONL handling
tharropoulos Feb 4, 2025
bdebd1f
fix(stemming): fix tests for stemming
tharropoulos Feb 4, 2025
d5ca72b
fix(types): fix return type for stemming dictionaries
tharropoulos Feb 4, 2025
bfdfee0
build: configure tsc and tsup for dual compilation
tharropoulos Feb 6, 2025
5fc85dc
build(exports): configure package exports for typescript imports
tharropoulos Feb 6, 2025
ae7de6c
build: add unminified version of browser dist
tharropoulos Feb 6, 2025
5cddab3
chore: build artifacts
tharropoulos Feb 6, 2025
a78adb9
build: refactor typescript configuration for dual module builds
tharropoulos Feb 7, 2025
ff485f9
refactor: consolidate browser and main typesense exports
tharropoulos Feb 7, 2025
02eed40
build: enable tree shaking for browser bundle
tharropoulos Feb 7, 2025
ce41977
build: include source files in npm package
tharropoulos Feb 7, 2025
a5d6a4c
chore: build artifacts
tharropoulos Feb 7, 2025
d5afb34
docs: update readme with search-only client guide
tharropoulos Feb 7, 2025
7ca86a5
build: minify browser bundle by default
tharropoulos Feb 7, 2025
c969776
build: expose only lib and dist on package
tharropoulos Feb 7, 2025
9eb89cd
build: rename entrypoint from `Typesense.ts` to `index.ts` for parcel
tharropoulos Feb 7, 2025
68f42a9
fix(documents): throw on empty lists of documents
tharropoulos Feb 5, 2025
e5aaf4b
test(documents): add tests for empty document validation
tharropoulos Feb 6, 2025
c9aab29
chore: fix import paths in tests
tharropoulos Feb 7, 2025
491d002
Merge branch 'master' into minified-bundle
tharropoulos Feb 7, 2025
1d7088f
chore: remove webpack from dependencies
tharropoulos Feb 7, 2025
c842363
Merge branch 'master' of github.com:typesense/typesense-js into minif…
tharropoulos May 9, 2025
e9f09aa
fix(test): fix import to use barrel export
tharropoulos May 9, 2025
85c3d4b
Merge branch 'master' of github.com:typesense/typesense-js into minif…
tharropoulos May 27, 2025
a684934
build: add main export for parcel
tharropoulos May 29, 2025
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ typesense-server-nodes
.DS_Store
test-results.xml
test-files
typesense-data
.env
23 changes: 22 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Javascript client library for accessing the [Typesense HTTP API](https://github.com/typesense/typesense).

This library can be used both on the server-side and on the client-side. The library's [source](/src) is in ES6 and during build time, we transpile it to ES5 and generate two artifacts - [one](/lib) that can be used on the server-side and [another](/dist) that uses [Browserify](http://browserify.org/) and can be used on the client side.
This library can be used both on the server-side and on the client-side. The library's [source](/src) is in ES6 and during build time, we transpile it to ES5 and generate two artifacts - [one](/lib) CommonJS that can be used on Node and [another](/dist) CommonJS / ESM that uses [tsup](https://tsup.egoist.dev/) and can be used on the client side.

## Installation

Expand Down Expand Up @@ -41,6 +41,27 @@ Tests are also a good place to know how the library works internally: [test](tes

See [Configuration.ts](src/Typesense/Configuration.ts) for a list of all client configuration options.

## Search-only Client for Browser
You can create a search-only client instance for use in the browser by importing the `SearchClient` class from `typesense/dist`.

```typescript
import { SearchClient } from 'typesense/dist'

const client = new SearchClient({
nodes: [
{
host: 'localhost',
port: '8108',
protocol: 'http',
},
],
apiKey: 'xyz',
connectionTimeoutSeconds: 2,
healthcheckIntervalSeconds: 60,

})
```

### Examples

Here are some examples with inline comments that walk you through how to use the client: [doc/examples](doc/examples)
Expand Down
1,335 changes: 1,335 additions & 0 deletions dist/index.d.mts

Large diffs are not rendered by default.

1,335 changes: 1,335 additions & 0 deletions dist/index.d.ts

Large diffs are not rendered by default.

Loading