Skip to content
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
3 changes: 3 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ jobs:
deno fmt --check
deno lint
deno task check:deno-json
- name: deno publish --dry-run
run:
deno publish --dry-run

benchmark:
runs-on: ubuntu-latest
Expand Down
15 changes: 15 additions & 0 deletions deno.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
"name": "@TODO/redis",
"version": "0.34.0",
"exports": "./mod.ts",
"exclude": [
"benchmark/node_modules",
"tmp"
Expand All @@ -13,6 +16,18 @@
"test": {
"exclude": ["benchmark/", "vendor/"]
},
"publish": {
"exclude": [
".denov",
".editorconfig",
".octocov.yml",
".github",
"import_map.test.json",
"benchmark/",
"tests/",
"tools/"
]
},
"tasks": {
"lock": "rm deno.lock && DENO_FUTURE=1 deno cache --reload mod.ts experimental/**/mod.ts tests/**/*.ts",
"check:deno-json": "deno run --allow-read=deno.json tools/check_deno_json.js",
Expand Down
9 changes: 5 additions & 4 deletions pipeline.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import type { Connection, SendCommandOptions } from "./connection.ts";
import { kEmptyRedisArgs } from "./connection.ts";
import { CommandExecutor } from "./executor.ts";
import {
okReply,
import type { CommandExecutor } from "./executor.ts";
import type {
RawOrError,
RedisReply,
RedisValue,
} from "./protocol/shared/types.ts";
import { create, Redis } from "./redis.ts";
import { okReply } from "./protocol/shared/types.ts";
import type { Redis } from "./redis.ts";
import { create } from "./redis.ts";
import { kUnstablePipeline } from "./internal/symbols.ts";

export interface RedisPipeline extends Redis {
Expand Down
2 changes: 1 addition & 1 deletion protocol/deno_streams/command.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { BufReader, BufWriter } from "../../deps/std/io.ts";
import type { BufReader, BufWriter } from "../../deps/std/io.ts";
import { readReply } from "./reply.ts";
import { ErrorReplyError } from "../../errors.ts";
import type { RedisReply, RedisValue } from "../shared/types.ts";
Expand Down
4 changes: 2 additions & 2 deletions protocol/deno_streams/mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { readReply } from "./reply.ts";
import { sendCommand, sendCommands, writeCommand } from "./command.ts";

import type { Command, Protocol as BaseProtocol } from "../shared/protocol.ts";
import { RedisReply, RedisValue } from "../shared/types.ts";
import { ErrorReplyError } from "../../errors.ts";
import type { RedisReply, RedisValue } from "../shared/types.ts";
import type { ErrorReplyError } from "../../errors.ts";

export class Protocol implements BaseProtocol {
#reader: BufReader;
Expand Down
2 changes: 1 addition & 1 deletion protocol/deno_streams/reply.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { BufReader } from "../../deps/std/io.ts";
import type { BufReader } from "../../deps/std/io.ts";
import type * as types from "../shared/types.ts";
import {
ArrayReplyCode,
Expand Down
2 changes: 1 addition & 1 deletion protocol/shared/types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ErrorReplyError } from "../../errors.ts";
import type { ErrorReplyError } from "../../errors.ts";

/**
* @see https://redis.io/topics/protocol
Expand Down
4 changes: 2 additions & 2 deletions protocol/web_streams/mod.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { sendCommand, sendCommands, writeCommand } from "./command.ts";
import { readReply } from "./reply.ts";
import type { Command, Protocol as BaseProtocol } from "../shared/protocol.ts";
import { RedisReply, RedisValue } from "../shared/types.ts";
import { ErrorReplyError } from "../../errors.ts";
import type { RedisReply, RedisValue } from "../shared/types.ts";
import type { ErrorReplyError } from "../../errors.ts";
import { BufferedReadableStream } from "../../internal/buffered_readable_stream.ts";

export class Protocol implements BaseProtocol {
Expand Down
33 changes: 18 additions & 15 deletions redis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ import type {
import { RedisConnection } from "./connection.ts";
import type { Connection, SendCommandOptions } from "./connection.ts";
import type { RedisConnectionOptions } from "./connection.ts";
import { CommandExecutor, DefaultExecutor } from "./executor.ts";
import type { CommandExecutor } from "./executor.ts";
import { DefaultExecutor } from "./executor.ts";
import type {
Binary,
Bulk,
Expand All @@ -62,19 +63,7 @@ import type {
import { createRedisPipeline } from "./pipeline.ts";
import type { RedisSubscription } from "./pubsub.ts";
import { psubscribe, subscribe } from "./pubsub.ts";
import {
convertMap,
isCondArray,
isNumber,
isString,
parseXGroupDetail,
parseXId,
parseXMessage,
parseXPendingConsumers,
parseXPendingCounts,
parseXReadReply,
rawnum,
rawstr,
import type {
StartEndCount,
XAddFieldValues,
XClaimJustXId,
Expand All @@ -85,7 +74,6 @@ import {
XIdInput,
XIdNeg,
XIdPos,
xidstr,
XKeyId,
XKeyIdGroup,
XKeyIdGroupLike,
Expand All @@ -96,6 +84,21 @@ import {
XReadOpts,
XReadStreamRaw,
} from "./stream.ts";
import {
convertMap,
isCondArray,
isNumber,
isString,
parseXGroupDetail,
parseXId,
parseXMessage,
parseXPendingConsumers,
parseXPendingCounts,
parseXReadReply,
rawnum,
rawstr,
xidstr,
} from "./stream.ts";

const binaryCommandOptions = {
returnUint8Arrays: true,
Expand Down
3 changes: 2 additions & 1 deletion tests/commands/pipeline.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { ErrorReplyError, Raw } from "../../mod.ts";
import type { Raw } from "../../mod.ts";
import { ErrorReplyError } from "../../mod.ts";
import { assert, assertEquals } from "../../deps/std/assert.ts";
import { it } from "../../deps/std/testing.ts";
import type { Connector, TestServer } from "../test_util.ts";
Expand Down
3 changes: 2 additions & 1 deletion tests/commands/stream.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { ErrorReplyError, Redis } from "../../mod.ts";
import type { Redis } from "../../mod.ts";
import { ErrorReplyError } from "../../mod.ts";
import { parseXId } from "../../stream.ts";
import { delay } from "../../deps/std/async.ts";
import {
Expand Down
3 changes: 2 additions & 1 deletion tests/test_util.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { connect, Redis, RedisConnectOptions } from "../mod.ts";
import type { Redis, RedisConnectOptions } from "../mod.ts";
import { connect } from "../mod.ts";
import { delay } from "../deps/std/async.ts";

export type Connector = typeof connect;
Expand Down