@upstash/redis 1.3.5 → 1.4.0-next.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.releaserc +14 -0
- package/README.md +20 -0
- package/esm/platforms/nodejs.js +0 -5
- package/package.json +2 -6
- package/script/platforms/nodejs.js +0 -5
- package/types/platforms/nodejs.d.ts +0 -1
package/.releaserc
ADDED
package/README.md
CHANGED
|
@@ -23,6 +23,23 @@ See
|
|
|
23
23
|
[the list of APIs](https://docs.upstash.com/features/restapi#rest---redis-api-compatibility)
|
|
24
24
|
supported.
|
|
25
25
|
|
|
26
|
+
## Upgrading to v1.4.0 **(ReferenceError: fetch is not defined)**
|
|
27
|
+
|
|
28
|
+
If you are running on nodejs v17 and earlier, you need to manually provide a
|
|
29
|
+
`fetch` polyfill. The simplest way is using `isomorphic-fetch`
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
npm install isomorphic-fetch
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
```typescript
|
|
36
|
+
import "isomorphic-fetch";
|
|
37
|
+
import { Redis } from "@upstash/redis";
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
`fetch` is natively supported in node18 as well as all major platforms: Vercel,
|
|
41
|
+
Netlify, Deno, Fastly etc. and you do not need to do anything.
|
|
42
|
+
|
|
26
43
|
## Upgrading from v0.2.0?
|
|
27
44
|
|
|
28
45
|
Please read the
|
|
@@ -336,3 +353,6 @@ the url and token
|
|
|
336
353
|
```sh
|
|
337
354
|
UPSTASH_REDIS_REST_URL=".." UPSTASH_REDIS_REST_TOKEN=".." deno test -A
|
|
338
355
|
```
|
|
356
|
+
|
|
357
|
+
```
|
|
358
|
+
```
|
package/esm/platforms/nodejs.js
CHANGED
|
@@ -1,11 +1,6 @@
|
|
|
1
1
|
// deno-lint-ignore-file
|
|
2
2
|
import * as core from "../pkg/redis.js";
|
|
3
3
|
import { UpstashError } from "../pkg/error.js";
|
|
4
|
-
// @ts-ignore Deno can't compile
|
|
5
|
-
// import https from "https";
|
|
6
|
-
// @ts-ignore Deno can't compile
|
|
7
|
-
// import http from "http";
|
|
8
|
-
import "isomorphic-fetch";
|
|
9
4
|
/**
|
|
10
5
|
* Serverless redis client for upstash.
|
|
11
6
|
*/
|
package/package.json
CHANGED
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
"main": "./script/platforms/nodejs.js",
|
|
4
4
|
"types": "./types/platforms/nodejs.d.ts",
|
|
5
5
|
"name": "@upstash/redis",
|
|
6
|
-
"version": "v1.3.5",
|
|
7
6
|
"description": "An HTTP/REST based Redis client built on top of Upstash REST API.",
|
|
8
7
|
"repository": {
|
|
9
8
|
"type": "git",
|
|
@@ -27,10 +26,6 @@
|
|
|
27
26
|
"http": false,
|
|
28
27
|
"https": false
|
|
29
28
|
},
|
|
30
|
-
"dependencies": {
|
|
31
|
-
"encoding": "latest",
|
|
32
|
-
"isomorphic-fetch": "^3.0.0"
|
|
33
|
-
},
|
|
34
29
|
"devDependencies": {
|
|
35
30
|
"@size-limit/preset-small-lib": "latest",
|
|
36
31
|
"size-limit": "latest"
|
|
@@ -82,5 +77,6 @@
|
|
|
82
77
|
"require": "./script/platforms/fastly.js",
|
|
83
78
|
"types": "./types/platforms/fastly.d.ts"
|
|
84
79
|
}
|
|
85
|
-
}
|
|
80
|
+
},
|
|
81
|
+
"version": "1.4.0-next.1"
|
|
86
82
|
}
|
|
@@ -27,11 +27,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
27
27
|
exports.Redis = void 0;
|
|
28
28
|
const core = __importStar(require("../pkg/redis.js"));
|
|
29
29
|
const error_js_1 = require("../pkg/error.js");
|
|
30
|
-
// @ts-ignore Deno can't compile
|
|
31
|
-
// import https from "https";
|
|
32
|
-
// @ts-ignore Deno can't compile
|
|
33
|
-
// import http from "http";
|
|
34
|
-
require("isomorphic-fetch");
|
|
35
30
|
/**
|
|
36
31
|
* Serverless redis client for upstash.
|
|
37
32
|
*/
|