Skip to content

Commit ff15a4e

Browse files
committed
chore: lint and format
1 parent 6c988cf commit ff15a4e

File tree

2 files changed

+25
-19
lines changed

2 files changed

+25
-19
lines changed

src/collections/config/index.ts

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,15 @@ const config = <T>(
4040
.withClassName(name)
4141
.withProperty(resolveProperty<any>(property, []))
4242
.do()
43-
.then(() => { }),
43+
.then(() => {}),
4444
addReference: (
4545
reference: ReferenceSingleTargetConfigCreate<any> | ReferenceMultiTargetConfigCreate<any>
4646
) =>
4747
new PropertyCreator(connection)
4848
.withClassName(name)
4949
.withProperty(resolveReference<any>(reference))
5050
.do()
51-
.then(() => { }),
51+
.then(() => {}),
5252
addVector: async (vectors: VectorizersConfigAdd<T>) => {
5353
const supportsDynamicVectorIndex = await dbVersionSupport.supportsDynamicVectorIndex();
5454
const { vectorsConfig } = makeVectorsConfig(vectors, supportsDynamicVectorIndex);
@@ -72,7 +72,7 @@ const config = <T>(
7272
})
7373
);
7474
},
75-
updateShards: async function(status: 'READY' | 'READONLY', names?: string | string[]) {
75+
updateShards: async function (status: 'READY' | 'READONLY', names?: string | string[]) {
7676
let shardNames: string[];
7777
if (names === undefined) {
7878
shardNames = await this.getShards().then((shards) => shards.map((s) => s.name));
@@ -97,7 +97,7 @@ const config = <T>(
9797
)
9898
)
9999
.then((merged) => new ClassUpdater(connection).withClass(merged).do())
100-
.then(() => { });
100+
.then(() => {});
101101
},
102102
};
103103
};
@@ -122,15 +122,15 @@ export interface Config<T> {
122122
reference: ReferenceSingleTargetConfigCreate<T> | ReferenceMultiTargetConfigCreate<T>
123123
) => Promise<void>;
124124
/**
125-
* Add one or more named vectors to the collection in Weaviate.
126-
* Named vectors can be added to collections with existing named vectors only.
127-
*
128-
* Existing named vectors are immutable in Weaviate. The client will not include
129-
* any of those in the request.
130-
*
131-
* @param {VectorizersConfigAdd<any>} vectors Vector configurations.
132-
* @returns {Promise<void>} A promise that resolves when the named vector has been created.
133-
*/
125+
* Add one or more named vectors to the collection in Weaviate.
126+
* Named vectors can be added to collections with existing named vectors only.
127+
*
128+
* Existing named vectors are immutable in Weaviate. The client will not include
129+
* any of those in the request.
130+
*
131+
* @param {VectorizersConfigAdd<any>} vectors Vector configurations.
132+
* @returns {Promise<void>} A promise that resolves when the named vector has been created.
133+
*/
134134
addVector: (vectors: VectorizersConfigAdd<T>) => Promise<void>;
135135
/**
136136
* Get the configuration for this collection from Weaviate.

src/collections/config/integration.test.ts

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,11 @@ describe('Testing of the collection.config namespace', () => {
387387
]);
388388
});
389389

390-
requireAtLeast(1, 31, 0)('Mutable named vectors', () => {
390+
requireAtLeast(
391+
1,
392+
31,
393+
0
394+
)('Mutable named vectors', () => {
391395
it('should be able to add named vectors to a collection', async () => {
392396
const collectionName = 'TestCollectionConfigAddVector' as const;
393397
const collection = await client.collections.create({
@@ -404,17 +408,19 @@ describe('Testing of the collection.config namespace', () => {
404408
]);
405409

406410
// Trying to update 'original' vector -- should be omitted from request.
407-
await collection.config.addVector(weaviate.configure.vectorizer.none({
408-
name: 'original',
409-
vectorIndexConfig: weaviate.configure.vectorIndex.flat(),
410-
}));
411+
await collection.config.addVector(
412+
weaviate.configure.vectorizer.none({
413+
name: 'original',
414+
vectorIndexConfig: weaviate.configure.vectorIndex.flat(),
415+
})
416+
);
411417

412418
const config = await collection.config.get();
413419
expect(config.vectorizers).toHaveProperty('vector-a');
414420
expect(config.vectorizers).toHaveProperty('vector-b');
415421
expect(config.vectorizers).toHaveProperty('vector-c');
416422

417-
expect(config.vectorizers['original']).toHaveProperty('indexType', 'hnsw');
423+
expect(config.vectorizers.original).toHaveProperty('indexType', 'hnsw');
418424
});
419425
});
420426

0 commit comments

Comments
 (0)