Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

removed deprecations and exported some missing symbols #105

Merged
merged 1 commit into from
Nov 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions jetstream/src/internal_mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ export type {
export type { StreamNames } from "./jsbaseclient_api.ts";
export type {
AccountLimits,
ApiError,
ApiPagedRequest,
ClusterInfo,
ConsumerConfig,
Expand Down
1 change: 1 addition & 0 deletions jetstream/src/mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ export type {
AbortOnMissingResource,
AccountLimits,
Advisory,
ApiError,
ApiPagedRequest,
Bind,
BoundPushConsumerOptions,
Expand Down
12 changes: 1 addition & 11 deletions kv/src/kv.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ import type {
KvEntry,
KvOptions,
KvPutOptions,
KvRemove,
KvStatus,
KvWatchEntry,
KvWatchOptions,
Expand Down Expand Up @@ -263,7 +262,7 @@ export class Kvm {
}
}

export class Bucket implements KV, KvRemove {
export class Bucket implements KV {
js: JetStreamClient;
jsm: JetStreamManager;
stream!: string;
Expand Down Expand Up @@ -328,20 +327,11 @@ export class Bucket implements KV, KvRemove {
this.stream = sc.name = opts.streamName ?? this.bucketName();
sc.retention = RetentionPolicy.Limits;
sc.max_msgs_per_subject = bo.history;
if (bo.maxBucketSize) {
bo.max_bytes = bo.maxBucketSize;
}
if (bo.max_bytes) {
sc.max_bytes = bo.max_bytes;
}
sc.max_msg_size = bo.maxValueSize;
sc.storage = bo.storage;
const location = opts.placementCluster ?? "";
if (location) {
opts.placement = {} as Placement;
opts.placement.cluster = location;
opts.placement.tags = [];
}
if (opts.placement) {
sc.placement = opts.placement;
}
Expand Down
27 changes: 1 addition & 26 deletions kv/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,7 @@ export interface KvLimits {
* The maximum number of bytes on the KV
*/
max_bytes: number;
/**
* @deprecated use max_bytes
*/
maxBucketSize: number;

/**
* The maximum size of a value on the KV
*/
Expand Down Expand Up @@ -121,10 +118,6 @@ export interface KvLimits {
* List of Stream names to replicate into this KV
*/
sources?: StreamSource[];
/**
* @deprecated: use placement
*/
placementCluster: string;

/**
* deprecated: use storage
Expand All @@ -149,12 +142,6 @@ export interface KvStatus extends KvLimits {
*/
values: number;

/**
* @deprecated
* FIXME: remove this on 1.8
*/
bucket_location: string;

/**
* The StreamInfo backing up the KV
*/
Expand Down Expand Up @@ -203,13 +190,6 @@ export interface KvOptions extends KvLimits {
metadata?: Record<string, string>;
}

/**
* @deprecated use purge(k)
*/
export interface KvRemove {
remove(k: string): Promise<void>;
}

export enum KvWatchInclude {
/**
* Include the last value for all the keys
Expand Down Expand Up @@ -281,11 +261,6 @@ export interface RoKV {
opts?: KvWatchOptions,
): Promise<QueuedIterator<KvWatchEntry>>;

/**
* @deprecated - this api is removed.
*/
close(): Promise<void>;

/**
* Returns information about the Kv
*/
Expand Down
1 change: 1 addition & 0 deletions obj/src/internal_mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export type {
ObjectStoreOptions,
ObjectStorePutOpts,
ObjectStoreStatus,
ObjectWatchInfo,
Placement,
} from "./types.ts";

Expand Down
1 change: 1 addition & 0 deletions obj/src/mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export type {
ObjectStoreOptions,
ObjectStorePutOpts,
ObjectStoreStatus,
ObjectWatchInfo,
Placement,
} from "./internal_mod.ts";

Expand Down
5 changes: 1 addition & 4 deletions obj/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,10 +161,7 @@ export type ObjectStoreStatus = {
*/
compression: boolean;
};
/**
* @deprecated {@link ObjectStoreStatus}
*/
export type ObjectStoreInfo = ObjectStoreStatus;

export type ObjectStoreOptions = {
/**
* A description for the object store
Expand Down