This is an automated email from the ASF dual-hosted git repository.
SiyaoIsHiding pushed a commit to branch typescript
in repository https://gitbox.apache.org/repos/asf/cassandra-nodejs-driver.git
The following commit(s) were added to refs/heads/typescript by this push:
new 7a6bc852 CASSNODEJS-8: First TypeScript PR: Massive rename patch by
Jane He; reviewed by Jorge Bay
7a6bc852 is described below
commit 7a6bc85273f613ea64caad805a54d2fd326e2b51
Author: Jane He <[email protected]>
AuthorDate: Thu Jan 16 17:38:24 2025 +0800
CASSNODEJS-8: First TypeScript PR: Massive rename
patch by Jane He; reviewed by Jorge Bay
---
index.d.ts | 420 ---------------------
index.js => index.ts | 0
...-authenticator.js => base-dse-authenticator.ts} | 0
...uth-provider.js => dse-gssapi-auth-provider.ts} | 0
...provider.js => dse-plain-text-auth-provider.ts} | 0
lib/auth/{gssapi-client.js => gssapi-client.ts} | 0
lib/auth/{index.js => index.ts} | 0
.../{no-auth-provider.js => no-auth-provider.ts} | 0
...uth-provider.js => plain-text-auth-provider.ts} | 2 +-
lib/auth/{provider.js => provider.ts} | 0
lib/{client-options.js => client-options.ts} | 0
lib/{client.js => client.ts} | 4 +-
lib/concurrent/{index.js => index.ts} | 0
lib/{connection.js => connection.ts} | 2 +-
...control-connection.js => control-connection.ts} | 0
lib/datastax/cloud/{index.js => index.ts} | 0
...mplex-type-helper.js => complex-type-helper.ts} | 0
...e-serializers.js => custom-type-serializers.ts} | 0
.../graph/{graph-executor.js => graph-executor.ts} | 0
.../{graph-serializer.js => graph-serializer.ts} | 0
lib/datastax/graph/{index.js => index.ts} | 0
lib/datastax/graph/{options.js => options.ts} | 0
.../graph/{result-set.js => result-set.ts} | 0
lib/datastax/graph/{structure.js => structure.ts} | 0
.../{type-serializers.js => type-serializers.ts} | 0
lib/datastax/graph/{wrappers.js => wrappers.ts} | 0
lib/datastax/{index.js => index.ts} | 0
.../search/{date-range.js => date-range.ts} | 0
lib/datastax/search/{index.js => index.ts} | 0
lib/{encoder.js => encoder.ts} | 0
lib/{errors.js => errors.ts} | 0
lib/{execution-options.js => execution-options.ts} | 0
lib/{execution-profile.js => execution-profile.ts} | 0
lib/geometry/{geometry.js => geometry.ts} | 0
lib/geometry/{index.js => index.ts} | 0
lib/geometry/{line-string.js => line-string.ts} | 0
lib/geometry/{point.js => point.ts} | 0
lib/geometry/{polygon.js => polygon.ts} | 0
...-connection-pool.js => host-connection-pool.ts} | 0
lib/{host.js => host.ts} | 0
lib/{insights-client.js => insights-client.ts} | 0
lib/mapping/{cache.js => cache.ts} | 0
.../{doc-info-adapter.js => doc-info-adapter.ts} | 0
lib/mapping/{index.js => index.ts} | 0
lib/mapping/{mapper.js => mapper.ts} | 0
.../{mapping-handler.js => mapping-handler.ts} | 0
.../{model-batch-item.js => model-batch-item.ts} | 0
...model-batch-mapper.js => model-batch-mapper.ts} | 0
lib/mapping/{model-mapper.js => model-mapper.ts} | 0
...model-mapping-info.js => model-mapping-info.ts} | 0
.../{object-selector.js => object-selector.ts} | 0
lib/mapping/{q.js => q.ts} | 0
.../{query-generator.js => query-generator.ts} | 0
lib/mapping/{result-mapper.js => result-mapper.ts} | 0
lib/mapping/{result.js => result.ts} | 0
.../{table-mappings.js => table-mappings.ts} | 0
lib/mapping/{tree.js => tree.ts} | 0
lib/metadata/{aggregate.js => aggregate.ts} | 0
lib/metadata/{client-state.js => client-state.ts} | 0
.../{data-collection.js => data-collection.ts} | 0
.../{event-debouncer.js => event-debouncer.ts} | 0
lib/metadata/{index.js => index.ts} | 0
.../{materialized-view.js => materialized-view.ts} | 0
.../{schema-function.js => schema-function.ts} | 0
lib/metadata/{schema-index.js => schema-index.ts} | 0
.../{schema-parser.js => schema-parser.ts} | 0
.../{table-metadata.js => table-metadata.ts} | 0
.../{client-metrics.js => client-metrics.ts} | 0
.../{default-metrics.js => default-metrics.ts} | 0
lib/metrics/{index.js => index.ts} | 0
lib/{operation-state.js => operation-state.ts} | 0
...address-resolution.js => address-resolution.ts} | 0
lib/policies/{index.js => index.ts} | 0
.../{load-balancing.js => load-balancing.ts} | 4 +-
lib/policies/{reconnection.js => reconnection.ts} | 0
lib/policies/{retry.js => retry.ts} | 0
...ative-execution.js => speculative-execution.ts} | 0
...stamp-generation.js => timestamp-generation.ts} | 0
lib/{prepare-handler.js => prepare-handler.ts} | 0
lib/{promise-utils.js => promise-utils.ts} | 0
lib/{readers.js => readers.ts} | 0
lib/{request-execution.js => request-execution.ts} | 0
lib/{request-handler.js => request-handler.ts} | 0
lib/{requests.js => requests.ts} | 0
lib/{stream-id-stack.js => stream-id-stack.ts} | 0
lib/{streams.js => streams.ts} | 0
lib/{token.js => token.ts} | 0
lib/{tokenizer.js => tokenizer.ts} | 0
lib/tracker/{index.js => index.ts} | 0
.../{request-logger.js => request-logger.ts} | 0
.../{request-tracker.js => request-tracker.ts} | 0
lib/types/{big-decimal.js => big-decimal.ts} | 0
lib/types/{duration.js => duration.ts} | 0
lib/types/{index.js => index.ts} | 0
lib/types/{inet-address.js => inet-address.ts} | 0
lib/types/{integer.js => integer.ts} | 0
lib/types/{local-date.js => local-date.ts} | 0
lib/types/{local-time.js => local-time.ts} | 0
lib/types/{mutable-long.js => mutable-long.ts} | 0
.../{protocol-version.js => protocol-version.ts} | 0
lib/types/{result-set.js => result-set.ts} | 0
lib/types/{result-stream.js => result-stream.ts} | 0
lib/types/{row.js => row.ts} | 0
lib/types/{time-uuid.js => time-uuid.ts} | 0
lib/types/{tuple.js => tuple.ts} | 0
lib/types/{uuid.js => uuid.ts} | 0
lib/types/{vector.js => vector.ts} | 0
lib/types/{version-number.js => version-number.ts} | 0
lib/{utils.js => utils.ts} | 0
lib/{writers.js => writers.ts} | 2 +-
package-lock.json | 162 +++++++-
package.json | 5 +-
...-metadata-tests.js => client-metadata-tests.ts} | 0
.../long/{event-tests.js => event-tests.ts} | 0
...-balancing-tests.js => load-balancing-tests.ts} | 8 +-
...-tests.js => dse-gssapi-auth-provider-tests.ts} | 0
...ts.js => dse-plain-text-auth-provider-tests.ts} | 0
...cation-test.js => proxy-authentication-test.ts} | 0
...client-batch-tests.js => client-batch-tests.ts} | 8 +-
...-each-row-tests.js => client-each-row-tests.ts} | 8 +-
...d-tests.js => client-execute-prepared-tests.ts} | 0
...-tests.js => client-execute-simulator-tests.ts} | 0
...nt-execute-tests.js => client-execute-tests.ts} | 10 +-
.../{client-pool-tests.js => client-pool-tests.ts} | 4 +-
...ient-stream-tests.js => client-stream-tests.ts} | 8 +-
.../cloud/{cloud-helper.js => cloud-helper.ts} | 0
.../short/cloud/{cloud-tests.js => cloud-tests.ts} | 0
...urrent-tests.js => execute-concurrent-tests.ts} | 0
.../{connection-tests.js => connection-tests.ts} | 10 +-
...ts.js => control-connection-simulator-tests.ts} | 2 +-
...ection-tests.js => control-connection-tests.ts} | 2 +-
...om-payload-tests.js => custom-payload-tests.ts} | 0
...ration-type-tests.js => duration-type-tests.ts} | 0
...simulator-tests.js => error-simulator-tests.ts} | 0
.../short/{error-tests.js => error-tests.ts} | 0
...profile-tests.js => execution-profile-tests.ts} | 0
.../{line-string-tests.js => line-string-tests.ts} | 0
.../geometry/{point-tests.js => point-tests.ts} | 0
.../{polygon-tests.js => polygon-tests.ts} | 0
.../{graph-olap-tests.js => graph-olap-tests.ts} | 0
.../{graph-test-helper.js => graph-test-helper.ts} | 0
.../short/graph/{graph-tests.js => graph-tests.ts} | 0
...aph-timeout-tests.js => graph-timeout-tests.ts} | 0
...node-tests.js => graph-with-down-node-tests.ts} | 0
...ulator-tests.js => insights-simulator-tests.ts} | 0
...-tests.js => load-balancing-simulator-tests.ts} | 0
...-balancing-tests.js => load-balancing-tests.ts} | 0
...om-queries-tests.js => custom-queries-tests.ts} | 0
...ests.js => from-and-to-model-function-tests.ts} | 0
...mapper-test-helper.js => mapper-test-helper.ts} | 0
.../mapping/{mapper-tests.js => mapper-tests.ts} | 0
...model-mapper-tests.js => model-mapper-tests.ts} | 0
...ulator-tests.js => metadata-simulator-tests.ts} | 0
.../short/{metadata-tests.js => metadata-tests.ts} | 0
.../short/{numeric-tests.js => numeric-tests.ts} | 0
.../short/{paging-tests.js => paging-tests.ts} | 0
...-simulator-tests.js => pool-simulator-tests.ts} | 0
...mulator-tests.js => prepare-simulator-tests.ts} | 0
...simulator-tests.js => retry-simulator-tests.ts} | 0
.../{date-range-tests.js => date-range-tests.ts} | 0
...js => speculative-execution-simulator-tests.ts} | 2 +-
.../short/{ssl-tests.js => ssl-tests.ts} | 0
...mulator-tests.js => timeout-simulator-tests.ts} | 0
...mulator-tests.js => tracker-simulator-tests.ts} | 0
.../short/{udf-tests.js => udf-tests.ts} | 0
.../short/{vector-tests.js => vector-tests.ts} | 0
test/integration/{simulacron.js => simulacron.ts} | 4 +-
.../memory/{basic-profile.js => basic-profile.ts} | 4 +-
...ofile-keeping-ref.js => profile-keeping-ref.ts} | 4 +-
test/{test-helper.js => test-helper.ts} | 0
...lution-tests.js => address-resolution-tests.ts} | 0
test/unit/{api-tests.js => api-tests.ts} | 0
test/unit/{basic-tests.js => basic-tests.ts} | 2 +-
.../{big-decimal-tests.js => big-decimal-tests.ts} | 0
test/unit/{client-tests.js => client-tests.ts} | 4 +-
...on-tests.js => certificate-validation-tests.ts} | 0
...urrent-tests.js => execute-concurrent-tests.ts} | 0
.../{connection-tests.js => connection-tests.ts} | 0
...ection-tests.js => control-connection-tests.ts} | 2 +-
...s.js => default-load-balancing-policy-tests.ts} | 0
...-tests.js => dse-gssapi-auth-provider-tests.ts} | 0
...ts.js => dse-plain-text-auth-provider-tests.ts} | 0
...ration-type-tests.js => duration-type-tests.ts} | 0
test/unit/{encoder-tests.js => encoder-tests.ts} | 0
...der-vector-tests.js => encoder-vector-tests.ts} | 0
test/unit/{error-tests.js => error-tests.ts} | 0
...debouncer-tests.js => event-debouncer-tests.ts} | 0
...options-tests.js => execution-options-tests.ts} | 0
...profile-tests.js => execution-profile-tests.ts} | 0
.../{line-string-tests.js => line-string-tests.ts} | 0
.../geometry/{point-tests.js => point-tests.ts} | 0
.../{polygon-tests.js => polygon-tests.ts} | 0
.../graph/{executor-tests.js => executor-tests.ts} | 0
...graph-result-tests.js => graph-result-tests.ts} | 0
.../graph/{graphson-tests.js => graphson-tests.ts} | 0
test/unit/{host-tests.js => host-tests.ts} | 2 +-
...inet-address-tests.js => inet-address-tests.ts} | 0
...ts-client-tests.js => insights-client-tests.ts} | 0
test/unit/{license-tests.js => license-tests.ts} | 0
...-balancing-tests.js => load-balancing-tests.ts} | 4 +-
.../mapping/{cache-tests.js => cache-tests.ts} | 0
.../mapping/{mapper-tests.js => mapper-tests.ts} | 0
...t-test-helper.js => mapper-unit-test-helper.ts} | 0
...g-handler-tests.js => mapping-handler-tests.ts} | 0
...ion-tests.js => model-mapper-mutation-tests.ts} | 0
...elect-tests.js => model-mapper-select-tests.ts} | 0
...g-info-tests.js => model-mapping-info-tests.ts} | 0
...sult-mapper-tests.js => result-mapper-tests.ts} | 0
.../mapping/{result-tests.js => result-tests.ts} | 0
...e-mappings-tests.js => table-mappings-tests.ts} | 0
test/unit/mapping/{tree-tests.js => tree-tests.ts} | 0
test/unit/{metadata-tests.js => metadata-tests.ts} | 6 +-
...mutable-long-tests.js => mutable-long-tests.ts} | 0
test/unit/{parser-tests.js => parser-tests.ts} | 0
...e-handler-tests.js => prepare-handler-tests.ts} | 0
...ol-stream-tests.js => protocol-stream-tests.ts} | 0
...-version-tests.js => protocol-version-tests.ts} | 0
.../{reconnection-test.js => reconnection-test.ts} | 0
...t-handler-tests.js => request-handler-tests.ts} | 0
test/unit/{requests-test.js => requests-test.ts} | 0
...tamps-tests.js => requests-timestamps-tests.ts} | 0
.../{result-set-tests.js => result-set-tests.ts} | 0
...retry-policy-tests.js => retry-policy-tests.ts} | 0
.../{date-range-tests.js => date-range-tests.ts} | 0
...ion-tests.js => speculative-execution-tests.ts} | 0
...-id-stack-tests.js => stream-id-stack-tests.ts} | 0
.../{timestamp-tests.js => timestamp-tests.ts} | 0
test/unit/{token-tests.js => token-tests.ts} | 0
.../{tokenizer-tests.js => tokenizer-tests.ts} | 0
test/unit/{tracker-tests.js => tracker-tests.ts} | 0
test/unit/{utils-tests.js => utils-tests.ts} | 0
test/unit/{uuid-tests.js => uuid-tests.ts} | 0
...ion-number-tests.js => version-number-tests.ts} | 0
tsconfig.json | 31 ++
234 files changed, 249 insertions(+), 477 deletions(-)
diff --git a/index.d.ts b/index.d.ts
deleted file mode 100644
index 2b3f0850..00000000
--- a/index.d.ts
+++ /dev/null
@@ -1,420 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import * as events from 'events';
-import * as tls from 'tls';
-import { URL } from 'url';
-import { auth } from './lib/auth';
-import { policies } from './lib/policies';
-import { types } from './lib/types';
-import { metrics } from './lib/metrics';
-import { tracker } from './lib/tracker';
-import { metadata } from './lib/metadata';
-import { datastax } from './lib/datastax/';
-import Long = types.Long;
-import Uuid = types.Uuid;
-import graph = datastax.graph;
-
-// Export imported submodules
-export { concurrent } from './lib/concurrent';
-export { mapping } from './lib/mapping';
-export { geometry } from './lib/geometry';
-export { auth, datastax, metadata, metrics, policies, tracker, types };
-
-export const version: number;
-
-export function defaultOptions(): ClientOptions;
-
-export type ValueCallback<T> = (err: Error, val: T) => void;
-export type EmptyCallback = (err: Error) => void;
-export type ArrayOrObject = any[]|{[key: string]: any};
-
-export class Client extends events.EventEmitter {
- hosts: HostMap;
- keyspace: string;
- metadata: metadata.Metadata;
- metrics: metrics.ClientMetrics;
-
- constructor(options: DseClientOptions);
-
- connect(): Promise<void>;
-
- connect(callback: EmptyCallback): void;
-
- execute(query: string, params?: ArrayOrObject, options?: QueryOptions):
Promise<types.ResultSet>;
-
- execute(query: string, params: ArrayOrObject, options: QueryOptions,
callback: ValueCallback<types.ResultSet>): void;
-
- execute(query: string, params: ArrayOrObject, callback:
ValueCallback<types.ResultSet>): void;
-
- execute(query: string, callback: ValueCallback<types.ResultSet>): void;
-
- executeGraph(
- traversal: string,
- parameters: { [name: string]: any } | undefined,
- options: GraphQueryOptions,
- callback: ValueCallback<graph.GraphResultSet>): void;
-
- executeGraph(
- traversal: string,
- parameters: { [name: string]: any } | undefined,
- callback: ValueCallback<graph.GraphResultSet>): void;
-
- executeGraph(traversal: string, callback:
ValueCallback<graph.GraphResultSet>): void;
-
- executeGraph(
- traversal: string,
- parameters?: { [name: string]: any },
- options?: GraphQueryOptions): Promise<graph.GraphResultSet>;
-
- eachRow(query: string,
- params: ArrayOrObject,
- options: QueryOptions,
- rowCallback: (n: number, row: types.Row) => void,
- callback?: ValueCallback<types.ResultSet>): void;
-
- eachRow(query: string,
- params: ArrayOrObject,
- rowCallback: (n: number, row: types.Row) => void,
- callback?: ValueCallback<types.ResultSet>): void;
-
- eachRow(query: string,
- rowCallback: (n: number, row: types.Row) => void): void;
-
- stream(query: string, params?: ArrayOrObject, options?: QueryOptions,
callback?: EmptyCallback): events.EventEmitter;
-
- batch(
- queries: Array<string|{query: string, params?: ArrayOrObject}>,
- options?: QueryOptions): Promise<types.ResultSet>;
-
- batch(
- queries: Array<string|{query: string, params?: ArrayOrObject}>,
- options: QueryOptions,
- callback: ValueCallback<types.ResultSet>): void;
-
- batch(
- queries: Array<string|{query: string, params?: ArrayOrObject}>,
- callback: ValueCallback<types.ResultSet>): void;
-
- shutdown(): Promise<void>;
-
- shutdown(callback: EmptyCallback): void;
-
- getReplicas(keyspace: string, token: Buffer): Host[];
-
- getState(): metadata.ClientState;
-}
-
-export interface HostMap extends events.EventEmitter {
- length: number;
-
- forEach(callback: (value: Host, key: string) => void): void;
-
- get(key: string): Host;
-
- keys(): string[];
-
- values(): Host[];
-}
-
-export interface Host extends events.EventEmitter {
- address: string;
- cassandraVersion: string;
- datacenter: string;
- rack: string;
- tokens: string[];
- hostId: types.Uuid;
-
- canBeConsideredAsUp(): boolean;
-
- getCassandraVersion(): number[];
-
- isUp(): boolean;
-}
-
-export interface ExecutionOptions {
- getCaptureStackTrace(): boolean;
-
- getConsistency(): types.consistencies;
-
- getCustomPayload(): { [key: string]: any };
-
- getFetchSize(): number;
-
- getFixedHost(): Host;
-
- getHints(): string[] | string[][];
-
- isAutoPage(): boolean;
-
- isBatchCounter(): boolean;
-
- isBatchLogged(): boolean;
-
- isIdempotent(): boolean;
-
- isPrepared(): boolean;
-
- isQueryTracing(): boolean;
-
- getKeyspace(): string;
-
- getLoadBalancingPolicy(): policies.loadBalancing.LoadBalancingPolicy;
-
- getPageState(): Buffer;
-
- getRawQueryOptions(): QueryOptions;
-
- getReadTimeout(): number;
-
- getRetryPolicy(): policies.retry.RetryPolicy;
-
- getRoutingKey(): Buffer | Buffer[];
-
- getSerialConsistency(): types.consistencies;
-
- getTimestamp(): number | Long | undefined | null;
-
- setHints(hints: string[]): void;
-}
-
-export interface ClientOptions {
- contactPoints?: string[];
- localDataCenter?: string;
- keyspace?: string;
- authProvider?: auth.AuthProvider;
- credentials?: {
- username: string;
- password: string;
- }
-
- cloud?: {
- secureConnectBundle: string | URL;
- };
-
- encoding?: {
- map?: Function;
- set?: Function;
- copyBuffer?: boolean;
- useUndefinedAsUnset?: boolean;
- useBigIntAsLong?: boolean;
- useBigIntAsVarint?: boolean;
- };
- isMetadataSyncEnabled?: boolean;
- maxPrepared?: number;
- metrics?: metrics.ClientMetrics;
- policies?: {
- addressResolution?: policies.addressResolution.AddressTranslator;
- loadBalancing?: policies.loadBalancing.LoadBalancingPolicy;
- reconnection?: policies.reconnection.ReconnectionPolicy;
- retry?: policies.retry.RetryPolicy;
- speculativeExecution?:
policies.speculativeExecution.SpeculativeExecutionPolicy;
- timestampGeneration?: policies.timestampGeneration.TimestampGenerator;
- };
- pooling?: {
- coreConnectionsPerHost?: { [key: number]: number; };
- heartBeatInterval?: number;
- maxRequestsPerConnection?: number;
- warmup?: boolean;
- };
- prepareOnAllHosts?: boolean;
- profiles?: ExecutionProfile[];
- protocolOptions?: {
- maxSchemaAgreementWaitSeconds?: number;
- maxVersion?: number;
- noCompact?: boolean;
- port?: number;
- };
- promiseFactory?: (handler: (callback: (err: Error, result?: any) => void) =>
void) => Promise<any>;
- queryOptions?: QueryOptions;
- refreshSchemaDelay?: number;
- rePrepareOnUp?: boolean;
- requestTracker?: tracker.RequestTracker;
- socketOptions?: {
- coalescingThreshold?: number;
- connectTimeout?: number;
- defunctReadTimeoutThreshold?: number;
- keepAlive?: boolean;
- keepAliveDelay?: number;
- readTimeout?: number;
- tcpNoDelay?: boolean;
- };
- sslOptions?: tls.ConnectionOptions;
-}
-
-export interface QueryOptions {
- autoPage?: boolean;
- captureStackTrace?: boolean;
- consistency?: number;
- counter?: boolean;
- customPayload?: any;
- executionProfile?: string | ExecutionProfile;
- fetchSize?: number;
- hints?: string[] | string[][];
- host?: Host;
- isIdempotent?: boolean;
- keyspace?: string;
- logged?: boolean;
- pageState?: Buffer | string;
- prepare?: boolean;
- readTimeout?: number;
- retry?: policies.retry.RetryPolicy;
- routingIndexes?: number[];
- routingKey?: Buffer | Buffer[];
- routingNames?: string[];
- serialConsistency?: number;
- timestamp?: number | Long;
- traceQuery?: boolean;
-}
-
-export interface DseClientOptions extends ClientOptions {
- id?: Uuid;
- applicationName?: string;
- applicationVersion?: string;
- monitorReporting?: { enabled?: boolean };
- graphOptions?: GraphOptions;
-}
-
-export interface GraphQueryOptions extends QueryOptions {
- graphLanguage?: string;
- graphName?: string;
- graphReadConsistency?: types.consistencies;
- graphSource?: string;
- graphWriteConsistency?: types.consistencies;
-}
-
-export type GraphOptions = {
- language?: string;
- name?: string;
- readConsistency?: types.consistencies;
- readTimeout?: number;
- source?: string;
- writeConsistency?: types.consistencies;
-};
-
-export class ExecutionProfile {
- consistency?: types.consistencies;
- loadBalancing?: policies.loadBalancing.LoadBalancingPolicy;
- name: string;
- readTimeout?: number;
- retry?: policies.retry.RetryPolicy;
- serialConsistency?: types.consistencies;
- graphOptions?: {
- name?: string;
- language?: string;
- source?: string;
- readConsistency?: types.consistencies;
- writeConsistency?: types.consistencies;
- };
-
- constructor(name: string, options: {
- consistency?: types.consistencies;
- loadBalancing?: policies.loadBalancing.LoadBalancingPolicy;
- readTimeout?: number;
- retry?: policies.retry.RetryPolicy;
- serialConsistency?: types.consistencies;
- graphOptions?: {
- name?: string;
- language?: string;
- source?: string;
- readConsistency?: types.consistencies;
- writeConsistency?: types.consistencies;
- };
- });
-}
-
-export namespace errors {
- class ArgumentError extends DriverError {
- constructor(message: string);
- }
-
- class AuthenticationError extends DriverError {
- constructor(message: string);
- }
-
- class BusyConnectionError extends DriverError {
- constructor(address: string, maxRequestsPerConnection: number,
connectionLength: number);
- }
-
- class VIntOutOfRangeException extends DriverError {
- constructor(long: Long);
- }
-
- abstract class DriverError extends Error {
- info: string;
-
- constructor(message: string, constructor?: any);
- }
-
- class DriverInternalError extends DriverError {
- constructor(message: string);
- }
-
- class NoHostAvailableError extends DriverError {
- innerErrors: any;
-
- constructor(innerErrors: any, message?: string);
- }
-
- class NotSupportedError extends DriverError {
- constructor(message: string);
- }
-
- class OperationTimedOutError extends DriverError {
- host?: string;
-
- constructor(message: string, host?: string);
- }
-
- class ResponseError extends DriverError {
- code: number;
-
- constructor(code: number, message: string);
- }
-}
-
-export namespace token {
- interface Token {
- compare(other: Token): number;
-
- equals(other: Token): boolean;
-
- getType(): { code: types.dataTypes, info: any };
-
- getValue(): any;
- }
-
- interface TokenRange {
- start: Token;
- end: Token;
-
- compare(other: TokenRange): number;
-
- contains(token: Token): boolean;
-
- equals(other: TokenRange): boolean;
-
- isEmpty(): boolean;
-
- isWrappedAround(): boolean;
-
- splitEvenly(numberOfSplits: number): TokenRange[];
-
- unwrap(): TokenRange[];
- }
-}
\ No newline at end of file
diff --git a/index.js b/index.ts
similarity index 100%
rename from index.js
rename to index.ts
diff --git a/lib/auth/base-dse-authenticator.js
b/lib/auth/base-dse-authenticator.ts
similarity index 100%
rename from lib/auth/base-dse-authenticator.js
rename to lib/auth/base-dse-authenticator.ts
diff --git a/lib/auth/dse-gssapi-auth-provider.js
b/lib/auth/dse-gssapi-auth-provider.ts
similarity index 100%
rename from lib/auth/dse-gssapi-auth-provider.js
rename to lib/auth/dse-gssapi-auth-provider.ts
diff --git a/lib/auth/dse-plain-text-auth-provider.js
b/lib/auth/dse-plain-text-auth-provider.ts
similarity index 100%
rename from lib/auth/dse-plain-text-auth-provider.js
rename to lib/auth/dse-plain-text-auth-provider.ts
diff --git a/lib/auth/gssapi-client.js b/lib/auth/gssapi-client.ts
similarity index 100%
rename from lib/auth/gssapi-client.js
rename to lib/auth/gssapi-client.ts
diff --git a/lib/auth/index.js b/lib/auth/index.ts
similarity index 100%
rename from lib/auth/index.js
rename to lib/auth/index.ts
diff --git a/lib/auth/no-auth-provider.js b/lib/auth/no-auth-provider.ts
similarity index 100%
rename from lib/auth/no-auth-provider.js
rename to lib/auth/no-auth-provider.ts
diff --git a/lib/auth/plain-text-auth-provider.js
b/lib/auth/plain-text-auth-provider.ts
similarity index 98%
rename from lib/auth/plain-text-auth-provider.js
rename to lib/auth/plain-text-auth-provider.ts
index d98091d0..bae8aaaa 100644
--- a/lib/auth/plain-text-auth-provider.js
+++ b/lib/auth/plain-text-auth-provider.ts
@@ -18,7 +18,7 @@
'use strict';
const util = require('util');
-const provider = require('./provider.js');
+const provider = require('./provider');
const utils = require('../utils');
const AuthProvider = provider.AuthProvider;
const Authenticator = provider.Authenticator;
diff --git a/lib/auth/provider.js b/lib/auth/provider.ts
similarity index 100%
rename from lib/auth/provider.js
rename to lib/auth/provider.ts
diff --git a/lib/client-options.js b/lib/client-options.ts
similarity index 100%
rename from lib/client-options.js
rename to lib/client-options.ts
diff --git a/lib/client.js b/lib/client.ts
similarity index 99%
rename from lib/client.js
rename to lib/client.ts
index d00c6e44..c046fc1a 100644
--- a/lib/client.js
+++ b/lib/client.ts
@@ -20,8 +20,8 @@
const events = require('events');
const util = require('util');
-const utils = require('./utils.js');
-const errors = require('./errors.js');
+const utils = require('./utils');
+const errors = require('./errors');
const types = require('./types');
const { ProfileManager } = require('./execution-profile');
const requests = require('./requests');
diff --git a/lib/concurrent/index.js b/lib/concurrent/index.ts
similarity index 100%
rename from lib/concurrent/index.js
rename to lib/concurrent/index.ts
diff --git a/lib/connection.js b/lib/connection.ts
similarity index 99%
rename from lib/connection.js
rename to lib/connection.ts
index af7b016d..44352940 100644
--- a/lib/connection.js
+++ b/lib/connection.ts
@@ -23,7 +23,7 @@ const util = require('util');
const tls = require('tls');
const net = require('net');
-const Encoder = require('./encoder.js');
+const Encoder = require('./encoder');
const { WriteQueue } = require('./writers');
const requests = require('./requests');
const streams = require('./streams');
diff --git a/lib/control-connection.js b/lib/control-connection.ts
similarity index 100%
rename from lib/control-connection.js
rename to lib/control-connection.ts
diff --git a/lib/datastax/cloud/index.js b/lib/datastax/cloud/index.ts
similarity index 100%
rename from lib/datastax/cloud/index.js
rename to lib/datastax/cloud/index.ts
diff --git a/lib/datastax/graph/complex-type-helper.js
b/lib/datastax/graph/complex-type-helper.ts
similarity index 100%
rename from lib/datastax/graph/complex-type-helper.js
rename to lib/datastax/graph/complex-type-helper.ts
diff --git a/lib/datastax/graph/custom-type-serializers.js
b/lib/datastax/graph/custom-type-serializers.ts
similarity index 100%
rename from lib/datastax/graph/custom-type-serializers.js
rename to lib/datastax/graph/custom-type-serializers.ts
diff --git a/lib/datastax/graph/graph-executor.js
b/lib/datastax/graph/graph-executor.ts
similarity index 100%
rename from lib/datastax/graph/graph-executor.js
rename to lib/datastax/graph/graph-executor.ts
diff --git a/lib/datastax/graph/graph-serializer.js
b/lib/datastax/graph/graph-serializer.ts
similarity index 100%
rename from lib/datastax/graph/graph-serializer.js
rename to lib/datastax/graph/graph-serializer.ts
diff --git a/lib/datastax/graph/index.js b/lib/datastax/graph/index.ts
similarity index 100%
rename from lib/datastax/graph/index.js
rename to lib/datastax/graph/index.ts
diff --git a/lib/datastax/graph/options.js b/lib/datastax/graph/options.ts
similarity index 100%
rename from lib/datastax/graph/options.js
rename to lib/datastax/graph/options.ts
diff --git a/lib/datastax/graph/result-set.js b/lib/datastax/graph/result-set.ts
similarity index 100%
rename from lib/datastax/graph/result-set.js
rename to lib/datastax/graph/result-set.ts
diff --git a/lib/datastax/graph/structure.js b/lib/datastax/graph/structure.ts
similarity index 100%
rename from lib/datastax/graph/structure.js
rename to lib/datastax/graph/structure.ts
diff --git a/lib/datastax/graph/type-serializers.js
b/lib/datastax/graph/type-serializers.ts
similarity index 100%
rename from lib/datastax/graph/type-serializers.js
rename to lib/datastax/graph/type-serializers.ts
diff --git a/lib/datastax/graph/wrappers.js b/lib/datastax/graph/wrappers.ts
similarity index 100%
rename from lib/datastax/graph/wrappers.js
rename to lib/datastax/graph/wrappers.ts
diff --git a/lib/datastax/index.js b/lib/datastax/index.ts
similarity index 100%
rename from lib/datastax/index.js
rename to lib/datastax/index.ts
diff --git a/lib/datastax/search/date-range.js
b/lib/datastax/search/date-range.ts
similarity index 100%
rename from lib/datastax/search/date-range.js
rename to lib/datastax/search/date-range.ts
diff --git a/lib/datastax/search/index.js b/lib/datastax/search/index.ts
similarity index 100%
rename from lib/datastax/search/index.js
rename to lib/datastax/search/index.ts
diff --git a/lib/encoder.js b/lib/encoder.ts
similarity index 100%
rename from lib/encoder.js
rename to lib/encoder.ts
diff --git a/lib/errors.js b/lib/errors.ts
similarity index 100%
rename from lib/errors.js
rename to lib/errors.ts
diff --git a/lib/execution-options.js b/lib/execution-options.ts
similarity index 100%
rename from lib/execution-options.js
rename to lib/execution-options.ts
diff --git a/lib/execution-profile.js b/lib/execution-profile.ts
similarity index 100%
rename from lib/execution-profile.js
rename to lib/execution-profile.ts
diff --git a/lib/geometry/geometry.js b/lib/geometry/geometry.ts
similarity index 100%
rename from lib/geometry/geometry.js
rename to lib/geometry/geometry.ts
diff --git a/lib/geometry/index.js b/lib/geometry/index.ts
similarity index 100%
rename from lib/geometry/index.js
rename to lib/geometry/index.ts
diff --git a/lib/geometry/line-string.js b/lib/geometry/line-string.ts
similarity index 100%
rename from lib/geometry/line-string.js
rename to lib/geometry/line-string.ts
diff --git a/lib/geometry/point.js b/lib/geometry/point.ts
similarity index 100%
rename from lib/geometry/point.js
rename to lib/geometry/point.ts
diff --git a/lib/geometry/polygon.js b/lib/geometry/polygon.ts
similarity index 100%
rename from lib/geometry/polygon.js
rename to lib/geometry/polygon.ts
diff --git a/lib/host-connection-pool.js b/lib/host-connection-pool.ts
similarity index 100%
rename from lib/host-connection-pool.js
rename to lib/host-connection-pool.ts
diff --git a/lib/host.js b/lib/host.ts
similarity index 100%
rename from lib/host.js
rename to lib/host.ts
diff --git a/lib/insights-client.js b/lib/insights-client.ts
similarity index 100%
rename from lib/insights-client.js
rename to lib/insights-client.ts
diff --git a/lib/mapping/cache.js b/lib/mapping/cache.ts
similarity index 100%
rename from lib/mapping/cache.js
rename to lib/mapping/cache.ts
diff --git a/lib/mapping/doc-info-adapter.js b/lib/mapping/doc-info-adapter.ts
similarity index 100%
rename from lib/mapping/doc-info-adapter.js
rename to lib/mapping/doc-info-adapter.ts
diff --git a/lib/mapping/index.js b/lib/mapping/index.ts
similarity index 100%
rename from lib/mapping/index.js
rename to lib/mapping/index.ts
diff --git a/lib/mapping/mapper.js b/lib/mapping/mapper.ts
similarity index 100%
rename from lib/mapping/mapper.js
rename to lib/mapping/mapper.ts
diff --git a/lib/mapping/mapping-handler.js b/lib/mapping/mapping-handler.ts
similarity index 100%
rename from lib/mapping/mapping-handler.js
rename to lib/mapping/mapping-handler.ts
diff --git a/lib/mapping/model-batch-item.js b/lib/mapping/model-batch-item.ts
similarity index 100%
rename from lib/mapping/model-batch-item.js
rename to lib/mapping/model-batch-item.ts
diff --git a/lib/mapping/model-batch-mapper.js
b/lib/mapping/model-batch-mapper.ts
similarity index 100%
rename from lib/mapping/model-batch-mapper.js
rename to lib/mapping/model-batch-mapper.ts
diff --git a/lib/mapping/model-mapper.js b/lib/mapping/model-mapper.ts
similarity index 100%
rename from lib/mapping/model-mapper.js
rename to lib/mapping/model-mapper.ts
diff --git a/lib/mapping/model-mapping-info.js
b/lib/mapping/model-mapping-info.ts
similarity index 100%
rename from lib/mapping/model-mapping-info.js
rename to lib/mapping/model-mapping-info.ts
diff --git a/lib/mapping/object-selector.js b/lib/mapping/object-selector.ts
similarity index 100%
rename from lib/mapping/object-selector.js
rename to lib/mapping/object-selector.ts
diff --git a/lib/mapping/q.js b/lib/mapping/q.ts
similarity index 100%
rename from lib/mapping/q.js
rename to lib/mapping/q.ts
diff --git a/lib/mapping/query-generator.js b/lib/mapping/query-generator.ts
similarity index 100%
rename from lib/mapping/query-generator.js
rename to lib/mapping/query-generator.ts
diff --git a/lib/mapping/result-mapper.js b/lib/mapping/result-mapper.ts
similarity index 100%
rename from lib/mapping/result-mapper.js
rename to lib/mapping/result-mapper.ts
diff --git a/lib/mapping/result.js b/lib/mapping/result.ts
similarity index 100%
rename from lib/mapping/result.js
rename to lib/mapping/result.ts
diff --git a/lib/mapping/table-mappings.js b/lib/mapping/table-mappings.ts
similarity index 100%
rename from lib/mapping/table-mappings.js
rename to lib/mapping/table-mappings.ts
diff --git a/lib/mapping/tree.js b/lib/mapping/tree.ts
similarity index 100%
rename from lib/mapping/tree.js
rename to lib/mapping/tree.ts
diff --git a/lib/metadata/aggregate.js b/lib/metadata/aggregate.ts
similarity index 100%
rename from lib/metadata/aggregate.js
rename to lib/metadata/aggregate.ts
diff --git a/lib/metadata/client-state.js b/lib/metadata/client-state.ts
similarity index 100%
rename from lib/metadata/client-state.js
rename to lib/metadata/client-state.ts
diff --git a/lib/metadata/data-collection.js b/lib/metadata/data-collection.ts
similarity index 100%
rename from lib/metadata/data-collection.js
rename to lib/metadata/data-collection.ts
diff --git a/lib/metadata/event-debouncer.js b/lib/metadata/event-debouncer.ts
similarity index 100%
rename from lib/metadata/event-debouncer.js
rename to lib/metadata/event-debouncer.ts
diff --git a/lib/metadata/index.js b/lib/metadata/index.ts
similarity index 100%
rename from lib/metadata/index.js
rename to lib/metadata/index.ts
diff --git a/lib/metadata/materialized-view.js
b/lib/metadata/materialized-view.ts
similarity index 100%
rename from lib/metadata/materialized-view.js
rename to lib/metadata/materialized-view.ts
diff --git a/lib/metadata/schema-function.js b/lib/metadata/schema-function.ts
similarity index 100%
rename from lib/metadata/schema-function.js
rename to lib/metadata/schema-function.ts
diff --git a/lib/metadata/schema-index.js b/lib/metadata/schema-index.ts
similarity index 100%
rename from lib/metadata/schema-index.js
rename to lib/metadata/schema-index.ts
diff --git a/lib/metadata/schema-parser.js b/lib/metadata/schema-parser.ts
similarity index 100%
rename from lib/metadata/schema-parser.js
rename to lib/metadata/schema-parser.ts
diff --git a/lib/metadata/table-metadata.js b/lib/metadata/table-metadata.ts
similarity index 100%
rename from lib/metadata/table-metadata.js
rename to lib/metadata/table-metadata.ts
diff --git a/lib/metrics/client-metrics.js b/lib/metrics/client-metrics.ts
similarity index 100%
rename from lib/metrics/client-metrics.js
rename to lib/metrics/client-metrics.ts
diff --git a/lib/metrics/default-metrics.js b/lib/metrics/default-metrics.ts
similarity index 100%
rename from lib/metrics/default-metrics.js
rename to lib/metrics/default-metrics.ts
diff --git a/lib/metrics/index.js b/lib/metrics/index.ts
similarity index 100%
rename from lib/metrics/index.js
rename to lib/metrics/index.ts
diff --git a/lib/operation-state.js b/lib/operation-state.ts
similarity index 100%
rename from lib/operation-state.js
rename to lib/operation-state.ts
diff --git a/lib/policies/address-resolution.js
b/lib/policies/address-resolution.ts
similarity index 100%
rename from lib/policies/address-resolution.js
rename to lib/policies/address-resolution.ts
diff --git a/lib/policies/index.js b/lib/policies/index.ts
similarity index 100%
rename from lib/policies/index.js
rename to lib/policies/index.ts
diff --git a/lib/policies/load-balancing.js b/lib/policies/load-balancing.ts
similarity index 99%
rename from lib/policies/load-balancing.js
rename to lib/policies/load-balancing.ts
index 02a7317f..a603f267 100644
--- a/lib/policies/load-balancing.js
+++ b/lib/policies/load-balancing.ts
@@ -19,8 +19,8 @@
const util = require('util');
const types = require('../types');
-const utils = require('../utils.js');
-const errors = require('../errors.js');
+const utils = require('../utils');
+const errors = require('../errors');
const doneIteratorObject = Object.freeze({ done: true });
const newlyUpInterval = 60000;
diff --git a/lib/policies/reconnection.js b/lib/policies/reconnection.ts
similarity index 100%
rename from lib/policies/reconnection.js
rename to lib/policies/reconnection.ts
diff --git a/lib/policies/retry.js b/lib/policies/retry.ts
similarity index 100%
rename from lib/policies/retry.js
rename to lib/policies/retry.ts
diff --git a/lib/policies/speculative-execution.js
b/lib/policies/speculative-execution.ts
similarity index 100%
rename from lib/policies/speculative-execution.js
rename to lib/policies/speculative-execution.ts
diff --git a/lib/policies/timestamp-generation.js
b/lib/policies/timestamp-generation.ts
similarity index 100%
rename from lib/policies/timestamp-generation.js
rename to lib/policies/timestamp-generation.ts
diff --git a/lib/prepare-handler.js b/lib/prepare-handler.ts
similarity index 100%
rename from lib/prepare-handler.js
rename to lib/prepare-handler.ts
diff --git a/lib/promise-utils.js b/lib/promise-utils.ts
similarity index 100%
rename from lib/promise-utils.js
rename to lib/promise-utils.ts
diff --git a/lib/readers.js b/lib/readers.ts
similarity index 100%
rename from lib/readers.js
rename to lib/readers.ts
diff --git a/lib/request-execution.js b/lib/request-execution.ts
similarity index 100%
rename from lib/request-execution.js
rename to lib/request-execution.ts
diff --git a/lib/request-handler.js b/lib/request-handler.ts
similarity index 100%
rename from lib/request-handler.js
rename to lib/request-handler.ts
diff --git a/lib/requests.js b/lib/requests.ts
similarity index 100%
rename from lib/requests.js
rename to lib/requests.ts
diff --git a/lib/stream-id-stack.js b/lib/stream-id-stack.ts
similarity index 100%
rename from lib/stream-id-stack.js
rename to lib/stream-id-stack.ts
diff --git a/lib/streams.js b/lib/streams.ts
similarity index 100%
rename from lib/streams.js
rename to lib/streams.ts
diff --git a/lib/token.js b/lib/token.ts
similarity index 100%
rename from lib/token.js
rename to lib/token.ts
diff --git a/lib/tokenizer.js b/lib/tokenizer.ts
similarity index 100%
rename from lib/tokenizer.js
rename to lib/tokenizer.ts
diff --git a/lib/tracker/index.js b/lib/tracker/index.ts
similarity index 100%
rename from lib/tracker/index.js
rename to lib/tracker/index.ts
diff --git a/lib/tracker/request-logger.js b/lib/tracker/request-logger.ts
similarity index 100%
rename from lib/tracker/request-logger.js
rename to lib/tracker/request-logger.ts
diff --git a/lib/tracker/request-tracker.js b/lib/tracker/request-tracker.ts
similarity index 100%
rename from lib/tracker/request-tracker.js
rename to lib/tracker/request-tracker.ts
diff --git a/lib/types/big-decimal.js b/lib/types/big-decimal.ts
similarity index 100%
rename from lib/types/big-decimal.js
rename to lib/types/big-decimal.ts
diff --git a/lib/types/duration.js b/lib/types/duration.ts
similarity index 100%
rename from lib/types/duration.js
rename to lib/types/duration.ts
diff --git a/lib/types/index.js b/lib/types/index.ts
similarity index 100%
rename from lib/types/index.js
rename to lib/types/index.ts
diff --git a/lib/types/inet-address.js b/lib/types/inet-address.ts
similarity index 100%
rename from lib/types/inet-address.js
rename to lib/types/inet-address.ts
diff --git a/lib/types/integer.js b/lib/types/integer.ts
similarity index 100%
rename from lib/types/integer.js
rename to lib/types/integer.ts
diff --git a/lib/types/local-date.js b/lib/types/local-date.ts
similarity index 100%
rename from lib/types/local-date.js
rename to lib/types/local-date.ts
diff --git a/lib/types/local-time.js b/lib/types/local-time.ts
similarity index 100%
rename from lib/types/local-time.js
rename to lib/types/local-time.ts
diff --git a/lib/types/mutable-long.js b/lib/types/mutable-long.ts
similarity index 100%
rename from lib/types/mutable-long.js
rename to lib/types/mutable-long.ts
diff --git a/lib/types/protocol-version.js b/lib/types/protocol-version.ts
similarity index 100%
rename from lib/types/protocol-version.js
rename to lib/types/protocol-version.ts
diff --git a/lib/types/result-set.js b/lib/types/result-set.ts
similarity index 100%
rename from lib/types/result-set.js
rename to lib/types/result-set.ts
diff --git a/lib/types/result-stream.js b/lib/types/result-stream.ts
similarity index 100%
rename from lib/types/result-stream.js
rename to lib/types/result-stream.ts
diff --git a/lib/types/row.js b/lib/types/row.ts
similarity index 100%
rename from lib/types/row.js
rename to lib/types/row.ts
diff --git a/lib/types/time-uuid.js b/lib/types/time-uuid.ts
similarity index 100%
rename from lib/types/time-uuid.js
rename to lib/types/time-uuid.ts
diff --git a/lib/types/tuple.js b/lib/types/tuple.ts
similarity index 100%
rename from lib/types/tuple.js
rename to lib/types/tuple.ts
diff --git a/lib/types/uuid.js b/lib/types/uuid.ts
similarity index 100%
rename from lib/types/uuid.js
rename to lib/types/uuid.ts
diff --git a/lib/types/vector.js b/lib/types/vector.ts
similarity index 100%
rename from lib/types/vector.js
rename to lib/types/vector.ts
diff --git a/lib/types/version-number.js b/lib/types/version-number.ts
similarity index 100%
rename from lib/types/version-number.js
rename to lib/types/version-number.ts
diff --git a/lib/utils.js b/lib/utils.ts
similarity index 100%
rename from lib/utils.js
rename to lib/utils.ts
diff --git a/lib/writers.js b/lib/writers.ts
similarity index 99%
rename from lib/writers.js
rename to lib/writers.ts
index c0d071ab..a70a6001 100644
--- a/lib/writers.js
+++ b/lib/writers.ts
@@ -19,7 +19,7 @@
const events = require('events');
const types = require('./types');
-const utils = require('./utils.js');
+const utils = require('./utils');
const FrameHeader = types.FrameHeader;
/**
diff --git a/package-lock.json b/package-lock.json
index 50139e18..5e960708 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -20,7 +20,9 @@
"mocha-jenkins-reporter": "~0.4.8",
"proxyquire": "~2.1.3",
"sinon": "~15.2.0",
- "temp": ">= 0.8.3"
+ "temp": ">= 0.8.3",
+ "ts-mocha": "^10.0.0",
+ "typescript": "^5.7.3"
},
"engines": {
"node": ">=20"
@@ -70,6 +72,13 @@
"integrity":
"sha512-sXXKG+uL9IrKqViTtao2Ws6dy0znu9sOaP1di/jKGW1M6VssO8vlpXCQcpZ+jisQ1tTFAC5Jo/EOzFbggBagFQ==",
"dev": true
},
+ "node_modules/@types/json5": {
+ "version": "0.0.29",
+ "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz",
+ "integrity":
"sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==",
+ "dev": true,
+ "optional": true
+ },
"node_modules/@types/node": {
"version": "20.19.39",
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.39.tgz",
@@ -140,6 +149,15 @@
"integrity":
"sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==",
"dev": true
},
+ "node_modules/arrify": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz",
+ "integrity":
"sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
"node_modules/assertion-error": {
"version": "1.1.0",
"resolved":
"https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz",
@@ -250,6 +268,12 @@
"ieee754": "^1.1.13"
}
},
+ "node_modules/buffer-from": {
+ "version": "1.1.2",
+ "resolved":
"https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz",
+ "integrity":
"sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==",
+ "dev": true
+ },
"node_modules/camelcase": {
"version": "6.3.0",
"resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz",
@@ -859,6 +883,19 @@
"js-yaml": "bin/js-yaml.js"
}
},
+ "node_modules/json5": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz",
+ "integrity":
"sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==",
+ "dev": true,
+ "optional": true,
+ "dependencies": {
+ "minimist": "^1.2.0"
+ },
+ "bin": {
+ "json5": "lib/cli.js"
+ }
+ },
"node_modules/just-extend": {
"version": "4.2.1",
"resolved":
"https://registry.npmjs.org/just-extend/-/just-extend-4.2.1.tgz",
@@ -931,6 +968,12 @@
"get-func-name": "^2.0.0"
}
},
+ "node_modules/make-error": {
+ "version": "1.3.6",
+ "resolved":
"https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz",
+ "integrity":
"sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==",
+ "dev": true
+ },
"node_modules/merge-descriptors": {
"version": "1.0.1",
"resolved":
"https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz",
@@ -1007,6 +1050,7 @@
"integrity":
"sha512-VZlYo/WE8t1tstuRmqgeyBgCbJc/lEdopaa+axcKzTBJ+UIdlAB9XnmvTCAH4pwR4ElNInaedhEBmZD8iCSVEg==",
"dev": true,
"license": "MIT",
+ "peer": true,
"dependencies": {
"ansi-colors": "^4.1.3",
"browser-stdout": "^1.3.1",
@@ -1540,6 +1584,25 @@
"node": ">=8"
}
},
+ "node_modules/source-map": {
+ "version": "0.6.1",
+ "resolved":
"https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+ "integrity":
"sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/source-map-support": {
+ "version": "0.5.21",
+ "resolved":
"https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz",
+ "integrity":
"sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==",
+ "dev": true,
+ "dependencies": {
+ "buffer-from": "^1.0.0",
+ "source-map": "^0.6.0"
+ }
+ },
"node_modules/string_decoder": {
"version": "1.3.0",
"resolved":
"https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz",
@@ -1576,6 +1639,16 @@
"node": ">=8"
}
},
+ "node_modules/strip-bom": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz",
+ "integrity":
"sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==",
+ "dev": true,
+ "optional": true,
+ "engines": {
+ "node": ">=4"
+ }
+ },
"node_modules/strip-json-comments": {
"version": "3.1.1",
"resolved":
"https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz",
@@ -1670,6 +1743,71 @@
"node": ">=8.0"
}
},
+ "node_modules/ts-mocha": {
+ "version": "10.0.0",
+ "resolved": "https://registry.npmjs.org/ts-mocha/-/ts-mocha-10.0.0.tgz",
+ "integrity":
"sha512-VRfgDO+iiuJFlNB18tzOfypJ21xn2xbuZyDvJvqpTbWgkAgD17ONGr8t+Tl8rcBtOBdjXp5e/Rk+d39f7XBHRw==",
+ "dev": true,
+ "dependencies": {
+ "ts-node": "7.0.1"
+ },
+ "bin": {
+ "ts-mocha": "bin/ts-mocha"
+ },
+ "engines": {
+ "node": ">= 6.X.X"
+ },
+ "optionalDependencies": {
+ "tsconfig-paths": "^3.5.0"
+ },
+ "peerDependencies": {
+ "mocha": "^3.X.X || ^4.X.X || ^5.X.X || ^6.X.X || ^7.X.X || ^8.X.X ||
^9.X.X || ^10.X.X"
+ }
+ },
+ "node_modules/ts-node": {
+ "version": "7.0.1",
+ "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-7.0.1.tgz",
+ "integrity":
"sha512-BVwVbPJRspzNh2yfslyT1PSbl5uIk03EZlb493RKHN4qej/D06n1cEhjlOJG69oFsE7OT8XjpTUcYf6pKTLMhw==",
+ "dev": true,
+ "dependencies": {
+ "arrify": "^1.0.0",
+ "buffer-from": "^1.1.0",
+ "diff": "^3.1.0",
+ "make-error": "^1.1.1",
+ "minimist": "^1.2.0",
+ "mkdirp": "^0.5.1",
+ "source-map-support": "^0.5.6",
+ "yn": "^2.0.0"
+ },
+ "bin": {
+ "ts-node": "dist/bin.js"
+ },
+ "engines": {
+ "node": ">=4.2.0"
+ }
+ },
+ "node_modules/ts-node/node_modules/diff": {
+ "version": "3.5.0",
+ "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz",
+ "integrity":
"sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.3.1"
+ }
+ },
+ "node_modules/tsconfig-paths": {
+ "version": "3.15.0",
+ "resolved":
"https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz",
+ "integrity":
"sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg==",
+ "dev": true,
+ "optional": true,
+ "dependencies": {
+ "@types/json5": "^0.0.29",
+ "json5": "^1.0.2",
+ "minimist": "^1.2.6",
+ "strip-bom": "^3.0.0"
+ }
+ },
"node_modules/tunnel-agent": {
"version": "0.6.0",
"resolved":
"https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz",
@@ -1692,6 +1830,19 @@
"node": ">=4"
}
},
+ "node_modules/typescript": {
+ "version": "5.7.3",
+ "resolved":
"https://registry.npmjs.org/typescript/-/typescript-5.7.3.tgz",
+ "integrity":
"sha512-84MVSjMEHP+FQRPy3pX9sTVV/INIex71s9TL2Gm5FG/WG1SqXeKyZ0k7/blY/4FdOzI12CBy1vGc4og/eus0fw==",
+ "dev": true,
+ "bin": {
+ "tsc": "bin/tsc",
+ "tsserver": "bin/tsserver"
+ },
+ "engines": {
+ "node": ">=14.17"
+ }
+ },
"node_modules/undici-types": {
"version": "6.21.0",
"resolved":
"https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz",
@@ -1792,6 +1943,15 @@
"engines": {
"node": ">=10"
}
+ },
+ "node_modules/yn": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/yn/-/yn-2.0.0.tgz",
+ "integrity":
"sha512-uTv8J/wiWTgUTg+9vLTi//leUl5vDQS6uii/emeTb2ssY7vl6QWf2fFbIIGjnhjvbdKlU0ed7QPgY1htTC86jQ==",
+ "dev": true,
+ "engines": {
+ "node": ">=4"
+ }
}
}
}
diff --git a/package.json b/package.json
index a8b151b7..567328ae 100644
--- a/package.json
+++ b/package.json
@@ -18,7 +18,6 @@
"graphdb"
],
"license": "Apache-2.0",
- "types": "./index.d.ts",
"dependencies": {
"@types/node": "^20.14.8",
"adm-zip": "~0.5.10",
@@ -31,7 +30,9 @@
"mocha-jenkins-reporter": "~0.4.8",
"proxyquire": "~2.1.3",
"sinon": "~15.2.0",
- "temp": ">= 0.8.3"
+ "temp": ">= 0.8.3",
+ "ts-mocha": "^10.0.0",
+ "typescript": "^5.7.3"
},
"repository": {
"type": "git",
diff --git a/test/integration/long/client-metadata-tests.js
b/test/integration/long/client-metadata-tests.ts
similarity index 100%
rename from test/integration/long/client-metadata-tests.js
rename to test/integration/long/client-metadata-tests.ts
diff --git a/test/integration/long/event-tests.js
b/test/integration/long/event-tests.ts
similarity index 100%
rename from test/integration/long/event-tests.js
rename to test/integration/long/event-tests.ts
diff --git a/test/integration/long/load-balancing-tests.js
b/test/integration/long/load-balancing-tests.ts
similarity index 98%
rename from test/integration/long/load-balancing-tests.js
rename to test/integration/long/load-balancing-tests.ts
index 5d710671..3f579044 100644
--- a/test/integration/long/load-balancing-tests.js
+++ b/test/integration/long/load-balancing-tests.ts
@@ -19,10 +19,10 @@
const assert = require('assert');
const util = require('util');
-const helper = require('../../test-helper.js');
-const Client = require('../../../lib/client.js');
-const utils = require('../../../lib/utils.js');
-const loadBalancing = require('../../../lib/policies/load-balancing.js');
+const helper = require('../../test-helper');
+const Client = require('../../../lib/client');
+const utils = require('../../../lib/utils');
+const loadBalancing = require('../../../lib/policies/load-balancing');
const DCAwareRoundRobinPolicy = loadBalancing.DCAwareRoundRobinPolicy;
const TokenAwarePolicy = loadBalancing.TokenAwarePolicy;
diff --git a/test/integration/short/auth/dse-gssapi-auth-provider-tests.js
b/test/integration/short/auth/dse-gssapi-auth-provider-tests.ts
similarity index 100%
rename from test/integration/short/auth/dse-gssapi-auth-provider-tests.js
rename to test/integration/short/auth/dse-gssapi-auth-provider-tests.ts
diff --git a/test/integration/short/auth/dse-plain-text-auth-provider-tests.js
b/test/integration/short/auth/dse-plain-text-auth-provider-tests.ts
similarity index 100%
rename from test/integration/short/auth/dse-plain-text-auth-provider-tests.js
rename to test/integration/short/auth/dse-plain-text-auth-provider-tests.ts
diff --git a/test/integration/short/auth/proxy-authentication-test.js
b/test/integration/short/auth/proxy-authentication-test.ts
similarity index 100%
rename from test/integration/short/auth/proxy-authentication-test.js
rename to test/integration/short/auth/proxy-authentication-test.ts
diff --git a/test/integration/short/client-batch-tests.js
b/test/integration/short/client-batch-tests.ts
similarity index 99%
rename from test/integration/short/client-batch-tests.js
rename to test/integration/short/client-batch-tests.ts
index 45bec739..d89b9a07 100644
--- a/test/integration/short/client-batch-tests.js
+++ b/test/integration/short/client-batch-tests.ts
@@ -19,11 +19,11 @@
const assert = require('assert');
const util = require('util');
-const helper = require('../../test-helper.js');
-const Client = require('../../../lib/client.js');
+const helper = require('../../test-helper');
+const Client = require('../../../lib/client');
const types = require('../../../lib/types');
-const utils = require('../../../lib/utils.js');
-const errors = require('../../../lib/errors.js');
+const utils = require('../../../lib/utils');
+const errors = require('../../../lib/errors');
const vit = helper.vit;
describe('Client @SERVER_API', function () {
diff --git a/test/integration/short/client-each-row-tests.js
b/test/integration/short/client-each-row-tests.ts
similarity index 99%
rename from test/integration/short/client-each-row-tests.js
rename to test/integration/short/client-each-row-tests.ts
index 4d2901a5..63b099ae 100644
--- a/test/integration/short/client-each-row-tests.js
+++ b/test/integration/short/client-each-row-tests.ts
@@ -21,11 +21,11 @@ const assert = require('chai').assert;
const util = require('util');
const sinon = require('sinon');
-const helper = require('../../test-helper.js');
-const Client = require('../../../lib/client.js');
+const helper = require('../../test-helper');
+const Client = require('../../../lib/client');
const types = require('../../../lib/types');
-const utils = require('../../../lib/utils.js');
-const errors = require('../../../lib/errors.js');
+const utils = require('../../../lib/utils');
+const errors = require('../../../lib/errors');
const vit = helper.vit;
describe('Client', function () {
diff --git a/test/integration/short/client-execute-prepared-tests.js
b/test/integration/short/client-execute-prepared-tests.ts
similarity index 100%
rename from test/integration/short/client-execute-prepared-tests.js
rename to test/integration/short/client-execute-prepared-tests.ts
diff --git a/test/integration/short/client-execute-simulator-tests.js
b/test/integration/short/client-execute-simulator-tests.ts
similarity index 100%
rename from test/integration/short/client-execute-simulator-tests.js
rename to test/integration/short/client-execute-simulator-tests.ts
diff --git a/test/integration/short/client-execute-tests.js
b/test/integration/short/client-execute-tests.ts
similarity index 99%
rename from test/integration/short/client-execute-tests.js
rename to test/integration/short/client-execute-tests.ts
index b407f2fb..eef0bffd 100644
--- a/test/integration/short/client-execute-tests.js
+++ b/test/integration/short/client-execute-tests.ts
@@ -19,12 +19,12 @@
const assert = require('assert');
const util = require('util');
-const helper = require('../../test-helper.js');
-const Client = require('../../../lib/client.js');
-const ExecutionProfile =
require('../../../lib/execution-profile.js').ExecutionProfile;
+const helper = require('../../test-helper');
+const Client = require('../../../lib/client');
+const ExecutionProfile =
require('../../../lib/execution-profile').ExecutionProfile;
const types = require('../../../lib/types');
-const utils = require('../../../lib/utils.js');
-const errors = require('../../../lib/errors.js');
+const utils = require('../../../lib/utils');
+const errors = require('../../../lib/errors');
const vit = helper.vit;
const vdescribe = helper.vdescribe;
const numericTests = require('./numeric-tests');
diff --git a/test/integration/short/client-pool-tests.js
b/test/integration/short/client-pool-tests.ts
similarity index 99%
rename from test/integration/short/client-pool-tests.js
rename to test/integration/short/client-pool-tests.ts
index 603d625d..b15f5abd 100644
--- a/test/integration/short/client-pool-tests.js
+++ b/test/integration/short/client-pool-tests.ts
@@ -28,8 +28,8 @@ const utils = require('../../../lib/utils');
const errors = require('../../../lib/errors');
const types = require('../../../lib/types');
const policies = require('../../../lib/policies');
-const RoundRobinPolicy =
require('../../../lib/policies/load-balancing.js').RoundRobinPolicy;
-const Murmur3Tokenizer = require('../../../lib/tokenizer.js').Murmur3Tokenizer;
+const RoundRobinPolicy =
require('../../../lib/policies/load-balancing').RoundRobinPolicy;
+const Murmur3Tokenizer = require('../../../lib/tokenizer').Murmur3Tokenizer;
const { PlainTextAuthProvider } = require('../../../lib/auth');
const ConstantSpeculativeExecutionPolicy =
policies.speculativeExecution.ConstantSpeculativeExecutionPolicy;
const OrderedLoadBalancingPolicy = helper.OrderedLoadBalancingPolicy;
diff --git a/test/integration/short/client-stream-tests.js
b/test/integration/short/client-stream-tests.ts
similarity index 98%
rename from test/integration/short/client-stream-tests.js
rename to test/integration/short/client-stream-tests.ts
index 03a6a67b..c09e32a7 100644
--- a/test/integration/short/client-stream-tests.js
+++ b/test/integration/short/client-stream-tests.ts
@@ -19,12 +19,12 @@
const assert = require('assert');
const util = require('util');
-const helper = require('../../test-helper.js');
+const helper = require('../../test-helper');
const vit = helper.vit;
-const Client = require('../../../lib/client.js');
+const Client = require('../../../lib/client');
const types = require('../../../lib/types');
-const utils = require('../../../lib/utils.js');
-const errors = require('../../../lib/errors.js');
+const utils = require('../../../lib/utils');
+const errors = require('../../../lib/errors');
describe('Client', function () {
this.timeout(120000);
diff --git a/test/integration/short/cloud/cloud-helper.js
b/test/integration/short/cloud/cloud-helper.ts
similarity index 100%
rename from test/integration/short/cloud/cloud-helper.js
rename to test/integration/short/cloud/cloud-helper.ts
diff --git a/test/integration/short/cloud/cloud-tests.js
b/test/integration/short/cloud/cloud-tests.ts
similarity index 100%
rename from test/integration/short/cloud/cloud-tests.js
rename to test/integration/short/cloud/cloud-tests.ts
diff --git a/test/integration/short/concurrent/execute-concurrent-tests.js
b/test/integration/short/concurrent/execute-concurrent-tests.ts
similarity index 100%
rename from test/integration/short/concurrent/execute-concurrent-tests.js
rename to test/integration/short/concurrent/execute-concurrent-tests.ts
diff --git a/test/integration/short/connection-tests.js
b/test/integration/short/connection-tests.ts
similarity index 97%
rename from test/integration/short/connection-tests.js
rename to test/integration/short/connection-tests.ts
index 3109b95f..b1fdb4cc 100644
--- a/test/integration/short/connection-tests.js
+++ b/test/integration/short/connection-tests.ts
@@ -20,12 +20,12 @@
const assert = require('chai').assert;
const sinon = require('sinon');
-const Connection = require('../../../lib/connection.js');
-const defaultOptions =
require('../../../lib/client-options.js').defaultOptions();
-const utils = require('../../../lib/utils.js');
-const requests = require('../../../lib/requests.js');
+const Connection = require('../../../lib/connection');
+const defaultOptions = require('../../../lib/client-options').defaultOptions();
+const utils = require('../../../lib/utils');
+const requests = require('../../../lib/requests');
const protocolVersion = require('../../../lib/types').protocolVersion;
-const helper = require('../../test-helper.js');
+const helper = require('../../test-helper');
const errors = require('../../../lib/errors');
const types = require('../../../lib/types');
const vit = helper.vit;
diff --git a/test/integration/short/control-connection-simulator-tests.js
b/test/integration/short/control-connection-simulator-tests.ts
similarity index 99%
rename from test/integration/short/control-connection-simulator-tests.js
rename to test/integration/short/control-connection-simulator-tests.ts
index f64a074b..6678b564 100644
--- a/test/integration/short/control-connection-simulator-tests.js
+++ b/test/integration/short/control-connection-simulator-tests.ts
@@ -23,7 +23,7 @@ const simulacron = require('../simulacron');
const utils = require('../../../lib/utils');
const types = require('../../../lib/types');
-const Client = require('../../../lib/client.js');
+const Client = require('../../../lib/client');
describe('ControlConnection', function() {
this.timeout(5000);
diff --git a/test/integration/short/control-connection-tests.js
b/test/integration/short/control-connection-tests.ts
similarity index 99%
rename from test/integration/short/control-connection-tests.js
rename to test/integration/short/control-connection-tests.ts
index b4b77cfc..670335d7 100644
--- a/test/integration/short/control-connection-tests.js
+++ b/test/integration/short/control-connection-tests.ts
@@ -20,7 +20,7 @@ const assert = require('assert');
const util = require('util');
const helper = require('../../test-helper');
-const Client = require('../../../lib/client.js');
+const Client = require('../../../lib/client');
const ControlConnection = require('../../../lib/control-connection');
const utils = require('../../../lib/utils');
const types = require('../../../lib/types');
diff --git a/test/integration/short/custom-payload-tests.js
b/test/integration/short/custom-payload-tests.ts
similarity index 100%
rename from test/integration/short/custom-payload-tests.js
rename to test/integration/short/custom-payload-tests.ts
diff --git a/test/integration/short/duration-type-tests.js
b/test/integration/short/duration-type-tests.ts
similarity index 100%
rename from test/integration/short/duration-type-tests.js
rename to test/integration/short/duration-type-tests.ts
diff --git a/test/integration/short/error-simulator-tests.js
b/test/integration/short/error-simulator-tests.ts
similarity index 100%
rename from test/integration/short/error-simulator-tests.js
rename to test/integration/short/error-simulator-tests.ts
diff --git a/test/integration/short/error-tests.js
b/test/integration/short/error-tests.ts
similarity index 100%
rename from test/integration/short/error-tests.js
rename to test/integration/short/error-tests.ts
diff --git a/test/integration/short/execution-profile-tests.js
b/test/integration/short/execution-profile-tests.ts
similarity index 100%
rename from test/integration/short/execution-profile-tests.js
rename to test/integration/short/execution-profile-tests.ts
diff --git a/test/integration/short/geometry/line-string-tests.js
b/test/integration/short/geometry/line-string-tests.ts
similarity index 100%
rename from test/integration/short/geometry/line-string-tests.js
rename to test/integration/short/geometry/line-string-tests.ts
diff --git a/test/integration/short/geometry/point-tests.js
b/test/integration/short/geometry/point-tests.ts
similarity index 100%
rename from test/integration/short/geometry/point-tests.js
rename to test/integration/short/geometry/point-tests.ts
diff --git a/test/integration/short/geometry/polygon-tests.js
b/test/integration/short/geometry/polygon-tests.ts
similarity index 100%
rename from test/integration/short/geometry/polygon-tests.js
rename to test/integration/short/geometry/polygon-tests.ts
diff --git a/test/integration/short/graph/graph-olap-tests.js
b/test/integration/short/graph/graph-olap-tests.ts
similarity index 100%
rename from test/integration/short/graph/graph-olap-tests.js
rename to test/integration/short/graph/graph-olap-tests.ts
diff --git a/test/integration/short/graph/graph-test-helper.js
b/test/integration/short/graph/graph-test-helper.ts
similarity index 100%
rename from test/integration/short/graph/graph-test-helper.js
rename to test/integration/short/graph/graph-test-helper.ts
diff --git a/test/integration/short/graph/graph-tests.js
b/test/integration/short/graph/graph-tests.ts
similarity index 100%
rename from test/integration/short/graph/graph-tests.js
rename to test/integration/short/graph/graph-tests.ts
diff --git a/test/integration/short/graph/graph-timeout-tests.js
b/test/integration/short/graph/graph-timeout-tests.ts
similarity index 100%
rename from test/integration/short/graph/graph-timeout-tests.js
rename to test/integration/short/graph/graph-timeout-tests.ts
diff --git a/test/integration/short/graph/graph-with-down-node-tests.js
b/test/integration/short/graph/graph-with-down-node-tests.ts
similarity index 100%
rename from test/integration/short/graph/graph-with-down-node-tests.js
rename to test/integration/short/graph/graph-with-down-node-tests.ts
diff --git a/test/integration/short/insights-simulator-tests.js
b/test/integration/short/insights-simulator-tests.ts
similarity index 100%
rename from test/integration/short/insights-simulator-tests.js
rename to test/integration/short/insights-simulator-tests.ts
diff --git a/test/integration/short/load-balancing-simulator-tests.js
b/test/integration/short/load-balancing-simulator-tests.ts
similarity index 100%
rename from test/integration/short/load-balancing-simulator-tests.js
rename to test/integration/short/load-balancing-simulator-tests.ts
diff --git a/test/integration/short/load-balancing-tests.js
b/test/integration/short/load-balancing-tests.ts
similarity index 100%
rename from test/integration/short/load-balancing-tests.js
rename to test/integration/short/load-balancing-tests.ts
diff --git a/test/integration/short/mapping/custom-queries-tests.js
b/test/integration/short/mapping/custom-queries-tests.ts
similarity index 100%
rename from test/integration/short/mapping/custom-queries-tests.js
rename to test/integration/short/mapping/custom-queries-tests.ts
diff --git a/test/integration/short/mapping/from-and-to-model-function-tests.js
b/test/integration/short/mapping/from-and-to-model-function-tests.ts
similarity index 100%
rename from test/integration/short/mapping/from-and-to-model-function-tests.js
rename to test/integration/short/mapping/from-and-to-model-function-tests.ts
diff --git a/test/integration/short/mapping/mapper-test-helper.js
b/test/integration/short/mapping/mapper-test-helper.ts
similarity index 100%
rename from test/integration/short/mapping/mapper-test-helper.js
rename to test/integration/short/mapping/mapper-test-helper.ts
diff --git a/test/integration/short/mapping/mapper-tests.js
b/test/integration/short/mapping/mapper-tests.ts
similarity index 100%
rename from test/integration/short/mapping/mapper-tests.js
rename to test/integration/short/mapping/mapper-tests.ts
diff --git a/test/integration/short/mapping/model-mapper-tests.js
b/test/integration/short/mapping/model-mapper-tests.ts
similarity index 100%
rename from test/integration/short/mapping/model-mapper-tests.js
rename to test/integration/short/mapping/model-mapper-tests.ts
diff --git a/test/integration/short/metadata-simulator-tests.js
b/test/integration/short/metadata-simulator-tests.ts
similarity index 100%
rename from test/integration/short/metadata-simulator-tests.js
rename to test/integration/short/metadata-simulator-tests.ts
diff --git a/test/integration/short/metadata-tests.js
b/test/integration/short/metadata-tests.ts
similarity index 100%
rename from test/integration/short/metadata-tests.js
rename to test/integration/short/metadata-tests.ts
diff --git a/test/integration/short/numeric-tests.js
b/test/integration/short/numeric-tests.ts
similarity index 100%
rename from test/integration/short/numeric-tests.js
rename to test/integration/short/numeric-tests.ts
diff --git a/test/integration/short/paging-tests.js
b/test/integration/short/paging-tests.ts
similarity index 100%
rename from test/integration/short/paging-tests.js
rename to test/integration/short/paging-tests.ts
diff --git a/test/integration/short/pool-simulator-tests.js
b/test/integration/short/pool-simulator-tests.ts
similarity index 100%
rename from test/integration/short/pool-simulator-tests.js
rename to test/integration/short/pool-simulator-tests.ts
diff --git a/test/integration/short/prepare-simulator-tests.js
b/test/integration/short/prepare-simulator-tests.ts
similarity index 100%
rename from test/integration/short/prepare-simulator-tests.js
rename to test/integration/short/prepare-simulator-tests.ts
diff --git a/test/integration/short/retry-simulator-tests.js
b/test/integration/short/retry-simulator-tests.ts
similarity index 100%
rename from test/integration/short/retry-simulator-tests.js
rename to test/integration/short/retry-simulator-tests.ts
diff --git a/test/integration/short/search/date-range-tests.js
b/test/integration/short/search/date-range-tests.ts
similarity index 100%
rename from test/integration/short/search/date-range-tests.js
rename to test/integration/short/search/date-range-tests.ts
diff --git a/test/integration/short/speculative-execution-simulator-tests.js
b/test/integration/short/speculative-execution-simulator-tests.ts
similarity index 99%
rename from test/integration/short/speculative-execution-simulator-tests.js
rename to test/integration/short/speculative-execution-simulator-tests.ts
index 5ce310a3..475cb2d2 100644
--- a/test/integration/short/speculative-execution-simulator-tests.js
+++ b/test/integration/short/speculative-execution-simulator-tests.ts
@@ -22,7 +22,7 @@ const simulacron = require('../simulacron');
const helper = require('../../test-helper');
const utils = require('../../../lib/utils');
-const Client = require('../../../lib/client.js');
+const Client = require('../../../lib/client');
const ConstantSpeculativeExecutionPolicy =
require('../../../lib/policies/speculative-execution').ConstantSpeculativeExecutionPolicy;
const NoSpeculativeExecutionPolicy =
require('../../../lib/policies/speculative-execution').NoSpeculativeExecutionPolicy;
const OrderedLoadBalancingPolicy =
require('../../test-helper').OrderedLoadBalancingPolicy;
diff --git a/test/integration/short/ssl-tests.js
b/test/integration/short/ssl-tests.ts
similarity index 100%
rename from test/integration/short/ssl-tests.js
rename to test/integration/short/ssl-tests.ts
diff --git a/test/integration/short/timeout-simulator-tests.js
b/test/integration/short/timeout-simulator-tests.ts
similarity index 100%
rename from test/integration/short/timeout-simulator-tests.js
rename to test/integration/short/timeout-simulator-tests.ts
diff --git a/test/integration/short/tracker-simulator-tests.js
b/test/integration/short/tracker-simulator-tests.ts
similarity index 100%
rename from test/integration/short/tracker-simulator-tests.js
rename to test/integration/short/tracker-simulator-tests.ts
diff --git a/test/integration/short/udf-tests.js
b/test/integration/short/udf-tests.ts
similarity index 100%
rename from test/integration/short/udf-tests.js
rename to test/integration/short/udf-tests.ts
diff --git a/test/integration/short/vector-tests.js
b/test/integration/short/vector-tests.ts
similarity index 100%
rename from test/integration/short/vector-tests.js
rename to test/integration/short/vector-tests.ts
diff --git a/test/integration/simulacron.js b/test/integration/simulacron.ts
similarity index 99%
rename from test/integration/simulacron.js
rename to test/integration/simulacron.ts
index 020dad2e..b2dde82b 100644
--- a/test/integration/simulacron.js
+++ b/test/integration/simulacron.ts
@@ -21,8 +21,8 @@ const http = require('http');
const spawn = require('child_process').spawn;
const util = require('util');
const fs = require('fs');
-const utils = require('../../lib/utils.js');
-const Client = require('../../lib/client.js');
+const utils = require('../../lib/utils');
+const Client = require('../../lib/client');
const simulacronHelper = {
_execute: function(processName, params, cb) {
diff --git a/test/other/memory/basic-profile.js
b/test/other/memory/basic-profile.ts
similarity index 97%
rename from test/other/memory/basic-profile.js
rename to test/other/memory/basic-profile.ts
index 5f95423f..fc88e4f7 100644
--- a/test/other/memory/basic-profile.js
+++ b/test/other/memory/basic-profile.ts
@@ -29,8 +29,8 @@ catch (e) {
console.error('There was an error while trying to import heapdump', e);
}
-const helper = require('../../test-helper.js');
-const cassandra = require('../../../index.js');
+const helper = require('../../test-helper');
+const cassandra = require('../../../index');
const Client = cassandra.Client;
const types = cassandra.types;
const utils = require('../../../lib/utils');
diff --git a/test/other/memory/profile-keeping-ref.js
b/test/other/memory/profile-keeping-ref.ts
similarity index 97%
rename from test/other/memory/profile-keeping-ref.js
rename to test/other/memory/profile-keeping-ref.ts
index d64f6b81..4626801f 100644
--- a/test/other/memory/profile-keeping-ref.js
+++ b/test/other/memory/profile-keeping-ref.ts
@@ -29,8 +29,8 @@ catch (e) {
console.log(e);
}
-const helper = require('../../test-helper.js');
-const cassandra = require('../../../index.js');
+const helper = require('../../test-helper');
+const cassandra = require('../../../index');
const Client = cassandra.Client;
const types = cassandra.types;
const utils = require('../../../lib/utils');
diff --git a/test/test-helper.js b/test/test-helper.ts
similarity index 100%
rename from test/test-helper.js
rename to test/test-helper.ts
diff --git a/test/unit/address-resolution-tests.js
b/test/unit/address-resolution-tests.ts
similarity index 100%
rename from test/unit/address-resolution-tests.js
rename to test/unit/address-resolution-tests.ts
diff --git a/test/unit/api-tests.js b/test/unit/api-tests.ts
similarity index 100%
rename from test/unit/api-tests.js
rename to test/unit/api-tests.ts
diff --git a/test/unit/basic-tests.js b/test/unit/basic-tests.ts
similarity index 99%
rename from test/unit/basic-tests.js
rename to test/unit/basic-tests.ts
index bbcf761d..a22b944f 100644
--- a/test/unit/basic-tests.js
+++ b/test/unit/basic-tests.ts
@@ -913,7 +913,7 @@ describe('exports', function () {
//test that the exposed API is the one expected
//it looks like a dumb test and it is, but it is necessary!
/* eslint-disable global-require */
- const api = require('../../index.js');
+ const api = require('../../index');
assert.strictEqual(api.Client, Client);
assert.ok(api.errors);
assert.strictEqual(typeof api.errors.DriverError, 'function');
diff --git a/test/unit/big-decimal-tests.js b/test/unit/big-decimal-tests.ts
similarity index 100%
rename from test/unit/big-decimal-tests.js
rename to test/unit/big-decimal-tests.ts
diff --git a/test/unit/client-tests.js b/test/unit/client-tests.ts
similarity index 99%
rename from test/unit/client-tests.js
rename to test/unit/client-tests.ts
index 04c10da3..24c5eced 100644
--- a/test/unit/client-tests.js
+++ b/test/unit/client-tests.ts
@@ -181,7 +181,7 @@ describe('Client', function () {
await helper.delayAsync(20);
};
- const Client = proxyquire('../../lib/client.js', {
+ const Client = proxyquire('../../lib/client', {
'./control-connection': ccMock
});
const client = new Client(options);
@@ -550,7 +550,7 @@ describe('Client', function () {
send: () => Promise.resolve()
};
- const Client = proxyquire('../../lib/client.js', {
+ const Client = proxyquire('../../lib/client', {
'./request-handler': requestHandlerMock
});
diff --git a/test/unit/cloud/certificate-validation-tests.js
b/test/unit/cloud/certificate-validation-tests.ts
similarity index 100%
rename from test/unit/cloud/certificate-validation-tests.js
rename to test/unit/cloud/certificate-validation-tests.ts
diff --git a/test/unit/concurrent/execute-concurrent-tests.js
b/test/unit/concurrent/execute-concurrent-tests.ts
similarity index 100%
rename from test/unit/concurrent/execute-concurrent-tests.js
rename to test/unit/concurrent/execute-concurrent-tests.ts
diff --git a/test/unit/connection-tests.js b/test/unit/connection-tests.ts
similarity index 100%
rename from test/unit/connection-tests.js
rename to test/unit/connection-tests.ts
diff --git a/test/unit/control-connection-tests.js
b/test/unit/control-connection-tests.ts
similarity index 99%
rename from test/unit/control-connection-tests.js
rename to test/unit/control-connection-tests.ts
index 8481d3d7..a3396ec7 100644
--- a/test/unit/control-connection-tests.js
+++ b/test/unit/control-connection-tests.ts
@@ -21,7 +21,7 @@ const events = require('events');
const proxyquire = require('proxyquire');
const util = require('util');
-const helper = require('../test-helper.js');
+const helper = require('../test-helper');
const ControlConnection = require('../../lib/control-connection');
const Host = require('../../lib/host').Host;
const utils = require('../../lib/utils');
diff --git a/test/unit/default-load-balancing-policy-tests.js
b/test/unit/default-load-balancing-policy-tests.ts
similarity index 100%
rename from test/unit/default-load-balancing-policy-tests.js
rename to test/unit/default-load-balancing-policy-tests.ts
diff --git a/test/unit/dse-gssapi-auth-provider-tests.js
b/test/unit/dse-gssapi-auth-provider-tests.ts
similarity index 100%
rename from test/unit/dse-gssapi-auth-provider-tests.js
rename to test/unit/dse-gssapi-auth-provider-tests.ts
diff --git a/test/unit/dse-plain-text-auth-provider-tests.js
b/test/unit/dse-plain-text-auth-provider-tests.ts
similarity index 100%
rename from test/unit/dse-plain-text-auth-provider-tests.js
rename to test/unit/dse-plain-text-auth-provider-tests.ts
diff --git a/test/unit/duration-type-tests.js b/test/unit/duration-type-tests.ts
similarity index 100%
rename from test/unit/duration-type-tests.js
rename to test/unit/duration-type-tests.ts
diff --git a/test/unit/encoder-tests.js b/test/unit/encoder-tests.ts
similarity index 100%
rename from test/unit/encoder-tests.js
rename to test/unit/encoder-tests.ts
diff --git a/test/unit/encoder-vector-tests.js
b/test/unit/encoder-vector-tests.ts
similarity index 100%
rename from test/unit/encoder-vector-tests.js
rename to test/unit/encoder-vector-tests.ts
diff --git a/test/unit/error-tests.js b/test/unit/error-tests.ts
similarity index 100%
rename from test/unit/error-tests.js
rename to test/unit/error-tests.ts
diff --git a/test/unit/event-debouncer-tests.js
b/test/unit/event-debouncer-tests.ts
similarity index 100%
rename from test/unit/event-debouncer-tests.js
rename to test/unit/event-debouncer-tests.ts
diff --git a/test/unit/execution-options-tests.js
b/test/unit/execution-options-tests.ts
similarity index 100%
rename from test/unit/execution-options-tests.js
rename to test/unit/execution-options-tests.ts
diff --git a/test/unit/execution-profile-tests.js
b/test/unit/execution-profile-tests.ts
similarity index 100%
rename from test/unit/execution-profile-tests.js
rename to test/unit/execution-profile-tests.ts
diff --git a/test/unit/geometry/line-string-tests.js
b/test/unit/geometry/line-string-tests.ts
similarity index 100%
rename from test/unit/geometry/line-string-tests.js
rename to test/unit/geometry/line-string-tests.ts
diff --git a/test/unit/geometry/point-tests.js
b/test/unit/geometry/point-tests.ts
similarity index 100%
rename from test/unit/geometry/point-tests.js
rename to test/unit/geometry/point-tests.ts
diff --git a/test/unit/geometry/polygon-tests.js
b/test/unit/geometry/polygon-tests.ts
similarity index 100%
rename from test/unit/geometry/polygon-tests.js
rename to test/unit/geometry/polygon-tests.ts
diff --git a/test/unit/graph/executor-tests.js
b/test/unit/graph/executor-tests.ts
similarity index 100%
rename from test/unit/graph/executor-tests.js
rename to test/unit/graph/executor-tests.ts
diff --git a/test/unit/graph/graph-result-tests.js
b/test/unit/graph/graph-result-tests.ts
similarity index 100%
rename from test/unit/graph/graph-result-tests.js
rename to test/unit/graph/graph-result-tests.ts
diff --git a/test/unit/graph/graphson-tests.js
b/test/unit/graph/graphson-tests.ts
similarity index 100%
rename from test/unit/graph/graphson-tests.js
rename to test/unit/graph/graphson-tests.ts
diff --git a/test/unit/host-tests.js b/test/unit/host-tests.ts
similarity index 99%
rename from test/unit/host-tests.js
rename to test/unit/host-tests.ts
index 35d8a4fb..49fc9ded 100644
--- a/test/unit/host-tests.js
+++ b/test/unit/host-tests.ts
@@ -31,7 +31,7 @@ const types = require('../../lib/types');
const clientOptions = require('../../lib/client-options');
const defaultOptions = clientOptions.defaultOptions();
defaultOptions.pooling.coreConnectionsPerHost =
clientOptions.coreConnectionsPerHostV3;
-const utils = require('../../lib/utils.js');
+const utils = require('../../lib/utils');
const policies = require('../../lib/policies');
const helper = require('../test-helper');
const reconnection = policies.reconnection;
diff --git a/test/unit/inet-address-tests.js b/test/unit/inet-address-tests.ts
similarity index 100%
rename from test/unit/inet-address-tests.js
rename to test/unit/inet-address-tests.ts
diff --git a/test/unit/insights-client-tests.js
b/test/unit/insights-client-tests.ts
similarity index 100%
rename from test/unit/insights-client-tests.js
rename to test/unit/insights-client-tests.ts
diff --git a/test/unit/license-tests.js b/test/unit/license-tests.ts
similarity index 100%
rename from test/unit/license-tests.js
rename to test/unit/license-tests.ts
diff --git a/test/unit/load-balancing-tests.js
b/test/unit/load-balancing-tests.ts
similarity index 99%
rename from test/unit/load-balancing-tests.js
rename to test/unit/load-balancing-tests.ts
index 309cfc72..a0ff7e14 100644
--- a/test/unit/load-balancing-tests.js
+++ b/test/unit/load-balancing-tests.ts
@@ -18,9 +18,9 @@
'use strict';
const assert = require('assert');
-const helper = require('../test-helper.js');
+const helper = require('../test-helper');
const errors = require('../../lib/errors');
-const Client = require('../../lib/client.js');
+const Client = require('../../lib/client');
const clientOptions = require('../../lib/client-options');
const { Host, HostMap } = require('../../lib/host');
const types = require('../../lib/types');
diff --git a/test/unit/mapping/cache-tests.js b/test/unit/mapping/cache-tests.ts
similarity index 100%
rename from test/unit/mapping/cache-tests.js
rename to test/unit/mapping/cache-tests.ts
diff --git a/test/unit/mapping/mapper-tests.js
b/test/unit/mapping/mapper-tests.ts
similarity index 100%
rename from test/unit/mapping/mapper-tests.js
rename to test/unit/mapping/mapper-tests.ts
diff --git a/test/unit/mapping/mapper-unit-test-helper.js
b/test/unit/mapping/mapper-unit-test-helper.ts
similarity index 100%
rename from test/unit/mapping/mapper-unit-test-helper.js
rename to test/unit/mapping/mapper-unit-test-helper.ts
diff --git a/test/unit/mapping/mapping-handler-tests.js
b/test/unit/mapping/mapping-handler-tests.ts
similarity index 100%
rename from test/unit/mapping/mapping-handler-tests.js
rename to test/unit/mapping/mapping-handler-tests.ts
diff --git a/test/unit/mapping/model-mapper-mutation-tests.js
b/test/unit/mapping/model-mapper-mutation-tests.ts
similarity index 100%
rename from test/unit/mapping/model-mapper-mutation-tests.js
rename to test/unit/mapping/model-mapper-mutation-tests.ts
diff --git a/test/unit/mapping/model-mapper-select-tests.js
b/test/unit/mapping/model-mapper-select-tests.ts
similarity index 100%
rename from test/unit/mapping/model-mapper-select-tests.js
rename to test/unit/mapping/model-mapper-select-tests.ts
diff --git a/test/unit/mapping/model-mapping-info-tests.js
b/test/unit/mapping/model-mapping-info-tests.ts
similarity index 100%
rename from test/unit/mapping/model-mapping-info-tests.js
rename to test/unit/mapping/model-mapping-info-tests.ts
diff --git a/test/unit/mapping/result-mapper-tests.js
b/test/unit/mapping/result-mapper-tests.ts
similarity index 100%
rename from test/unit/mapping/result-mapper-tests.js
rename to test/unit/mapping/result-mapper-tests.ts
diff --git a/test/unit/mapping/result-tests.js
b/test/unit/mapping/result-tests.ts
similarity index 100%
rename from test/unit/mapping/result-tests.js
rename to test/unit/mapping/result-tests.ts
diff --git a/test/unit/mapping/table-mappings-tests.js
b/test/unit/mapping/table-mappings-tests.ts
similarity index 100%
rename from test/unit/mapping/table-mappings-tests.js
rename to test/unit/mapping/table-mappings-tests.ts
diff --git a/test/unit/mapping/tree-tests.js b/test/unit/mapping/tree-tests.ts
similarity index 100%
rename from test/unit/mapping/tree-tests.js
rename to test/unit/mapping/tree-tests.ts
diff --git a/test/unit/metadata-tests.js b/test/unit/metadata-tests.ts
similarity index 99%
rename from test/unit/metadata-tests.js
rename to test/unit/metadata-tests.ts
index e211db9e..6ea665a3 100644
--- a/test/unit/metadata-tests.js
+++ b/test/unit/metadata-tests.ts
@@ -22,9 +22,9 @@ const { assert } = require('chai');
const sinon = require('sinon');
const events = require('events');
-const helper = require('../test-helper.js');
-const clientOptions = require('../../lib/client-options.js');
-const Host = require('../../lib/host.js').Host;
+const helper = require('../test-helper');
+const clientOptions = require('../../lib/client-options');
+const Host = require('../../lib/host').Host;
const HostMap = require('../../lib/host').HostMap;
const Metadata = require('../../lib/metadata');
const TableMetadata = require('../../lib/metadata/table-metadata');
diff --git a/test/unit/mutable-long-tests.js b/test/unit/mutable-long-tests.ts
similarity index 100%
rename from test/unit/mutable-long-tests.js
rename to test/unit/mutable-long-tests.ts
diff --git a/test/unit/parser-tests.js b/test/unit/parser-tests.ts
similarity index 100%
rename from test/unit/parser-tests.js
rename to test/unit/parser-tests.ts
diff --git a/test/unit/prepare-handler-tests.js
b/test/unit/prepare-handler-tests.ts
similarity index 100%
rename from test/unit/prepare-handler-tests.js
rename to test/unit/prepare-handler-tests.ts
diff --git a/test/unit/protocol-stream-tests.js
b/test/unit/protocol-stream-tests.ts
similarity index 100%
rename from test/unit/protocol-stream-tests.js
rename to test/unit/protocol-stream-tests.ts
diff --git a/test/unit/protocol-version-tests.js
b/test/unit/protocol-version-tests.ts
similarity index 100%
rename from test/unit/protocol-version-tests.js
rename to test/unit/protocol-version-tests.ts
diff --git a/test/unit/reconnection-test.js b/test/unit/reconnection-test.ts
similarity index 100%
rename from test/unit/reconnection-test.js
rename to test/unit/reconnection-test.ts
diff --git a/test/unit/request-handler-tests.js
b/test/unit/request-handler-tests.ts
similarity index 100%
rename from test/unit/request-handler-tests.js
rename to test/unit/request-handler-tests.ts
diff --git a/test/unit/requests-test.js b/test/unit/requests-test.ts
similarity index 100%
rename from test/unit/requests-test.js
rename to test/unit/requests-test.ts
diff --git a/test/unit/requests-timestamps-tests.js
b/test/unit/requests-timestamps-tests.ts
similarity index 100%
rename from test/unit/requests-timestamps-tests.js
rename to test/unit/requests-timestamps-tests.ts
diff --git a/test/unit/result-set-tests.js b/test/unit/result-set-tests.ts
similarity index 100%
rename from test/unit/result-set-tests.js
rename to test/unit/result-set-tests.ts
diff --git a/test/unit/retry-policy-tests.js b/test/unit/retry-policy-tests.ts
similarity index 100%
rename from test/unit/retry-policy-tests.js
rename to test/unit/retry-policy-tests.ts
diff --git a/test/unit/search/date-range-tests.js
b/test/unit/search/date-range-tests.ts
similarity index 100%
rename from test/unit/search/date-range-tests.js
rename to test/unit/search/date-range-tests.ts
diff --git a/test/unit/speculative-execution-tests.js
b/test/unit/speculative-execution-tests.ts
similarity index 100%
rename from test/unit/speculative-execution-tests.js
rename to test/unit/speculative-execution-tests.ts
diff --git a/test/unit/stream-id-stack-tests.js
b/test/unit/stream-id-stack-tests.ts
similarity index 100%
rename from test/unit/stream-id-stack-tests.js
rename to test/unit/stream-id-stack-tests.ts
diff --git a/test/unit/timestamp-tests.js b/test/unit/timestamp-tests.ts
similarity index 100%
rename from test/unit/timestamp-tests.js
rename to test/unit/timestamp-tests.ts
diff --git a/test/unit/token-tests.js b/test/unit/token-tests.ts
similarity index 100%
rename from test/unit/token-tests.js
rename to test/unit/token-tests.ts
diff --git a/test/unit/tokenizer-tests.js b/test/unit/tokenizer-tests.ts
similarity index 100%
rename from test/unit/tokenizer-tests.js
rename to test/unit/tokenizer-tests.ts
diff --git a/test/unit/tracker-tests.js b/test/unit/tracker-tests.ts
similarity index 100%
rename from test/unit/tracker-tests.js
rename to test/unit/tracker-tests.ts
diff --git a/test/unit/utils-tests.js b/test/unit/utils-tests.ts
similarity index 100%
rename from test/unit/utils-tests.js
rename to test/unit/utils-tests.ts
diff --git a/test/unit/uuid-tests.js b/test/unit/uuid-tests.ts
similarity index 100%
rename from test/unit/uuid-tests.js
rename to test/unit/uuid-tests.ts
diff --git a/test/unit/version-number-tests.js
b/test/unit/version-number-tests.ts
similarity index 100%
rename from test/unit/version-number-tests.js
rename to test/unit/version-number-tests.ts
diff --git a/tsconfig.json b/tsconfig.json
new file mode 100644
index 00000000..b80ad4e9
--- /dev/null
+++ b/tsconfig.json
@@ -0,0 +1,31 @@
+{
+ "compilerOptions": {
+ "module": "NodeNext",
+ "lib": ["es2015"],
+ "target": "es2015",
+ "sourceMap": false,
+ "strict": false,
+ "noImplicitAny": false,
+ "outDir": "out",
+ "declaration": true,
+ "allowJs": true,
+ "esModuleInterop": true,
+ "skipLibCheck": true,
+ "forceConsistentCasingInFileNames": true,
+ "declarationMap": false,
+ "moduleDetection": "force",
+ "resolveJsonModule": true,
+ "moduleResolution": "nodenext",
+ "checkJs": true,
+ },
+ "include": [
+ "lib/**/*.ts",
+ // "test/**/*.ts",
+ "index.ts"
+ ],
+ "exclude": [
+ "node_modules",
+ "out",
+ "dist"
+ ]
+ }
\ No newline at end of file
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]