Thanks to visit codestin.com
Credit goes to github.com

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
36 changes: 18 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,24 +23,6 @@ See
[the list of APIs](https://docs.upstash.com/features/restapi#rest---redis-api-compatibility)
supported.

## Upgrading to v1.4.0 **(ReferenceError: fetch is not defined)**

If you are running on nodejs v17 and earlier, `fetch` will not be natively
supported. Platforms like Vercel, Netlify, Deno, Fastly etc. provide a polyfill
for you. But if you are running on bare node, you need to either specify a
polyfill yourself or change the import path to:

```typescript
import { Redis } from "@upstash/redis/with-fetch";
```

## Upgrading from v0.2.0?

Please read the
[migration guide](https://docs.upstash.com/redis/sdks/javascriptsdk/migration).
For further explanation we wrote a
[blog post](https://blog.upstash.com/upstash-redis-sdk-v1).

## Quick Start

### Install
Expand Down Expand Up @@ -99,6 +81,24 @@ data = await redis.spop('animals', 1)
console.log(data)
```

### Upgrading to v1.4.0 **(ReferenceError: fetch is not defined)**

If you are running on nodejs v17 and earlier, `fetch` will not be natively
supported. Platforms like Vercel, Netlify, Deno, Fastly etc. provide a polyfill
for you. But if you are running on bare node, you need to either specify a
polyfill yourself or change the import path to:

```typescript
import { Redis } from "@upstash/redis/with-fetch";
```

### Upgrading from v0.2.0?

Please read the
[migration guide](https://docs.upstash.com/redis/sdks/javascriptsdk/migration).
For further explanation we wrote a
[blog post](https://blog.upstash.com/upstash-redis-sdk-v1).

## Docs

See [the documentation](https://docs.upstash.com/features/javascriptsdk) for
Expand Down
6 changes: 3 additions & 3 deletions cmd/build.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { build, emptyDir } from "https://deno.land/x/dnt/mod.ts";
import { dnt } from "../deps.ts";

const packageManager = "npm";
const outDir = "./dist";

await emptyDir(outDir);
await dnt.emptyDir(outDir);

await build({
await dnt.build({
packageManager,
entryPoints: [
"platforms/nodejs.ts",
Expand Down
11 changes: 11 additions & 0 deletions deno.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,19 @@
{
"compilerOptions": {
"lib": ["deno.window"]
},
"lint": {
"files": {
"exclude": ["node_modules", "dist", ".next"]
},
"rules": {
"tags": ["recommended"],
"exclude": ["no-explicit-any"]
}
},
"fmt": {
"files": {
"exclude": ["node_modules", "dist", ".next"]
}
}
}
1 change: 1 addition & 0 deletions deps.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * as dnt from "https://deno.land/x/[email protected]/mod.ts";