Skip to content

Commit

Permalink
feat(elasticsearch): release support of v8 and drop support of v7 (#104)
Browse files Browse the repository at this point in the history
BREAKING CHANGE: Support elasticsearch v8 and remove support of v7
  • Loading branch information
Thenkei authored Sep 6, 2024
1 parent bcdeb35 commit bb348b1
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
4 changes: 1 addition & 3 deletions jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@ import type { Config } from '@jest/types';
const config: Config.InitialOptions = {
preset: 'ts-jest',
testEnvironment: 'node',
collectCoverageFrom: [
'<rootDir>/packages/*/src/**/*.ts',
],
collectCoverageFrom: ['<rootDir>/packages/*/src/**/*.ts'],
testMatch: ['<rootDir>/packages/*/test/**/*.test.ts'],
setupFilesAfterEnv: ['jest-extended/all'],
};
Expand Down
8 changes: 6 additions & 2 deletions packages/datasource-elasticsearch/jest.config.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
/* eslint-disable import/no-relative-packages */
import type { Config } from '@jest/types';

// eslint-disable-next-line import/no-relative-packages
import jestConfig from '../../jest.config';

export default {
const config: Config.InitialOptions = {
...jestConfig,
collectCoverageFrom: ['<rootDir>/src/**/*.ts'],
testMatch: ['<rootDir>/test/**/*.test.ts'],
testTimeout: 10_000,
maxWorkers: 1,
};

export default config;
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ export interface ElasticsearchDatasourceOptionsBuilder {
}: ElasticsearchCollectionFromTemplateOptions): this;
}

/**
* Builder pattern to ease adding collection from Elastic search
*/
export class ElasticsearchDatasourceBuilder implements ElasticsearchDatasourceOptionsBuilder {
private readonly elasticsearchClient: Client;

Expand Down Expand Up @@ -135,6 +138,9 @@ export class ElasticsearchDatasourceBuilder implements ElasticsearchDatasourceOp
return this;
}

/**
* Internal usages only the client only sees ElasticsearchDatasourceOptionsBuilder interface
*/
public async createCollectionsFromConfiguration() {
return Promise.all(this.collectionsPromises);
}
Expand Down

0 comments on commit bb348b1

Please sign in to comment.