Skip to content

Commit 8dcfda6

Browse files
authored
added Dria compatiblity SDK (#6)
1 parent 572762b commit 8dcfda6

23 files changed

+880
-69
lines changed

.eslintrc.json

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
{
2+
"extends": ["eslint:recommended", "plugin:node/recommended", "prettier"],
3+
"plugins": ["node", "prettier"],
4+
"rules": {
5+
"prettier/prettier": "error",
6+
"block-scoped-var": "error",
7+
"eqeqeq": "error",
8+
"no-var": "error",
9+
"prefer-const": "error",
10+
"eol-last": "error",
11+
"prefer-arrow-callback": "error",
12+
"no-trailing-spaces": "error",
13+
"no-restricted-properties": [
14+
"error",
15+
{
16+
"object": "describe",
17+
"property": "only"
18+
},
19+
{
20+
"object": "it",
21+
"property": "only"
22+
}
23+
]
24+
},
25+
"ignorePatterns": [
26+
// js output
27+
"build",
28+
"dist",
29+
"lib",
30+
// modules
31+
"node_modules",
32+
// dot files
33+
".parcel-cache",
34+
".github",
35+
// protobufs
36+
"proto"
37+
],
38+
"overrides": [
39+
{
40+
"files": ["**/*.ts", "**/*.tsx"],
41+
"parser": "@typescript-eslint/parser",
42+
"extends": ["plugin:@typescript-eslint/recommended"],
43+
"rules": {
44+
"@typescript-eslint/no-non-null-assertion": "off",
45+
"@typescript-eslint/no-use-before-define": "off",
46+
"@typescript-eslint/no-warning-comments": "off",
47+
"@typescript-eslint/no-empty-function": "off",
48+
"@typescript-eslint/no-var-requires": "off",
49+
"@typescript-eslint/explicit-function-return-type": "off",
50+
"@typescript-eslint/explicit-module-boundary-types": "off",
51+
"@typescript-eslint/ban-types": "off",
52+
"@typescript-eslint/camelcase": "off",
53+
"node/no-missing-import": "off",
54+
"node/no-empty-function": "off",
55+
"node/no-unsupported-features/es-syntax": "off",
56+
"node/no-missing-require": "off",
57+
"node/shebang": "off",
58+
"no-dupe-class-members": "off",
59+
"require-atomic-updates": "off"
60+
}
61+
}
62+
],
63+
"parserOptions": {
64+
"ecmaVersion": "latest",
65+
"sourceType": "module"
66+
}
67+
}

.github/workflows/tests.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,20 @@ jobs:
4040
- name: Install dependencies
4141
run: pnpm install --no-frozen-lockfile
4242

43+
- name: Lint everything
44+
run: pnpm lint
45+
46+
- name: Check formatting
47+
run: pnpm format
48+
49+
- name: Build
50+
run: pnpm build
51+
4352
- name: Start Redis
4453
uses: supercharge/redis-github-action@1.5.0
4554
with:
4655
redis-version: 7
4756
redis-port: 6379
4857

49-
- name: Build
50-
run: pnpm build
51-
5258
- name: Run tests
5359
run: pnpm test

.prettierignore

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# js output
2+
build
3+
dist
4+
lib
5+
6+
# modules
7+
node_modules
8+
9+
# dot files
10+
.parcel-cache
11+
.github
12+
13+
# protobufs
14+
proto

README.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ const vectordb = new HollowDBVector(hollowdb);
6464
With this, you can insert a new point:
6565

6666
```ts
67-
// an array of floats
6867
const point = [-0.28571999073028564 /* and many more... */, 0.13964000344276428];
6968

7069
// any object
@@ -167,6 +166,18 @@ pnpm test
167166

168167
Check the formatting with:
169168

169+
```sh
170+
pnpm format
171+
```
172+
173+
Lint everything with:
174+
175+
```sh
176+
pnpm lint
177+
```
178+
179+
You can also check types with:
180+
170181
```sh
171182
pnpm check
172183
```
@@ -177,4 +188,4 @@ HollowDB Vector replaces DANNY, for the legacy code please [refer to this branch
177188

178189
## License
179190

180-
Dria Docker is licensed under [Apache 2.0](./LICENSE).
191+
HollowDB Vector is licensed under [Apache 2.0](./LICENSE).

lib/index.cjs

Lines changed: 45 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/index.cjs.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/index.d.ts

Lines changed: 18 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)