Skip to content

Commit a0406a9

Browse files
authored
feat: export experimental modules (#472)
1 parent e33db58 commit a0406a9

4 files changed

Lines changed: 15 additions & 4 deletions

File tree

deno.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
{
22
"name": "@db/redis",
33
"version": "0.35.0",
4-
"exports": "./mod.ts",
4+
"exports": {
5+
".": "./mod.ts",
6+
"./experimental/cluster": "./experimental/cluster/mod.ts",
7+
"./experimental/web-streams-connection": "./experimental/web_streams_connection/mod.ts"
8+
},
59
"exclude": [
610
"benchmark/node_modules",
711
"tmp"

experimental/cluster/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ The implementation is based on the
1111
## Usage
1212

1313
```typescript
14-
import { connect } from "https://deno.land/x/redis/experimental/cluster/mod.ts";
14+
import { connect } from "@db/redis/experimental/cluster";
1515

1616
const cluster = await connect({
1717
nodes: [

experimental/cluster/mod.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
/**
2+
* @module
3+
* @experimental **NOTE**: This is an unstable module.
4+
*
25
* Based on https://github.com/antirez/redis-rb-cluster which is licensed as follows:
36
*
47
* Copyright (C) 2013 Salvatore Sanfilippo <antirez@gmail.com>

experimental/web_streams_connection/mod.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
1+
/**
2+
* @module
3+
* @experimental **NOTE**: This is an unstable module.
4+
*/
15
import { kUnstableCreateProtocol } from "../../internal/symbols.ts";
2-
import type { RedisConnectOptions } from "../../redis.ts";
6+
import type { Redis, RedisConnectOptions } from "../../redis.ts";
37
import { connect as _connect } from "../../redis.ts";
48
import { Protocol } from "../../protocol/web_streams/mod.ts";
59

610
function createProtocol(conn: Deno.Conn) {
711
return new Protocol(conn);
812
}
913

10-
export function connect(options: RedisConnectOptions) {
14+
export function connect(options: RedisConnectOptions): Promise<Redis> {
1115
return _connect({
1216
...options,
1317
[kUnstableCreateProtocol]: createProtocol,

0 commit comments

Comments
 (0)