@upstash/redis 0.0.0-ci.e9b0c868305a820aaed7d68c8407b277da5a093e-20241008121230 → 0.0.0-ci.e9ff702fe7d2dd2495b4383b5432fe9b93f5a6e7-20250729064656

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/nodejs.mjs CHANGED
@@ -3,7 +3,7 @@ import {
3
3
  Redis,
4
4
  VERSION,
5
5
  error_exports
6
- } from "./chunk-3A3BS427.mjs";
6
+ } from "./chunk-IRVZXPJO.mjs";
7
7
 
8
8
  // platforms/nodejs.ts
9
9
  if (typeof atob === "undefined") {
@@ -36,18 +36,16 @@ var Redis2 = class _Redis extends Redis {
36
36
  console.warn(
37
37
  `[Upstash Redis] The 'url' property is missing or undefined in your Redis config.`
38
38
  );
39
- }
40
- if (!configOrRequester.token) {
39
+ } else if (configOrRequester.url.startsWith(" ") || configOrRequester.url.endsWith(" ") || /\r|\n/.test(configOrRequester.url)) {
41
40
  console.warn(
42
- `[Upstash Redis] The 'token' property is missing or undefined in your Redis config.`
41
+ "[Upstash Redis] The redis url contains whitespace or newline, which can cause errors!"
43
42
  );
44
43
  }
45
- if (configOrRequester.url.startsWith(" ") || configOrRequester.url.endsWith(" ") || /\r|\n/.test(configOrRequester.url)) {
44
+ if (!configOrRequester.token) {
46
45
  console.warn(
47
- "[Upstash Redis] The redis url contains whitespace or newline, which can cause errors!"
46
+ `[Upstash Redis] The 'token' property is missing or undefined in your Redis config.`
48
47
  );
49
- }
50
- if (configOrRequester.token.startsWith(" ") || configOrRequester.token.endsWith(" ") || /\r|\n/.test(configOrRequester.token)) {
48
+ } else if (configOrRequester.token.startsWith(" ") || configOrRequester.token.endsWith(" ") || /\r|\n/.test(configOrRequester.token)) {
51
49
  console.warn(
52
50
  "[Upstash Redis] The redis token contains whitespace or newline, which can cause errors!"
53
51
  );
@@ -96,11 +94,11 @@ var Redis2 = class _Redis extends Redis {
96
94
  '[Upstash Redis] Unable to get environment variables, `process.env` is undefined. If you are deploying to cloudflare, please import from "@upstash/redis/cloudflare" instead'
97
95
  );
98
96
  }
99
- const url = process.env.UPSTASH_REDIS_REST_URL;
97
+ const url = process.env.UPSTASH_REDIS_REST_URL || process.env.KV_REST_API_URL;
100
98
  if (!url) {
101
99
  console.warn("[Upstash Redis] Unable to find environment variable: `UPSTASH_REDIS_REST_URL`");
102
100
  }
103
- const token = process.env.UPSTASH_REDIS_REST_TOKEN;
101
+ const token = process.env.UPSTASH_REDIS_REST_TOKEN || process.env.KV_REST_API_TOKEN;
104
102
  if (!token) {
105
103
  console.warn(
106
104
  "[Upstash Redis] Unable to find environment variable: `UPSTASH_REDIS_REST_TOKEN`"
package/package.json CHANGED
@@ -1 +1 @@
1
- {"name":"@upstash/redis","version":"v0.0.0-ci.e9b0c868305a820aaed7d68c8407b277da5a093e-20241008121230","main":"./nodejs.js","module":"./nodejs.mjs","types":"./nodejs.d.ts","exports":{".":{"import":"./nodejs.mjs","require":"./nodejs.js"},"./node":{"import":"./nodejs.mjs","require":"./nodejs.js"},"./cloudflare":{"import":"./cloudflare.mjs","require":"./cloudflare.js"},"./cloudflare.js":{"import":"./cloudflare.mjs","require":"./cloudflare.js"},"./cloudflare.mjs":{"import":"./cloudflare.mjs","require":"./cloudflare.js"},"./fastly":{"import":"./fastly.mjs","require":"./fastly.js"},"./fastly.js":{"import":"./fastly.mjs","require":"./fastly.js"},"./fastly.mjs":{"import":"./fastly.mjs","require":"./fastly.js"}},"description":"An HTTP/REST based Redis client built on top of Upstash REST API.","repository":{"type":"git","url":"git+https://github.com/upstash/upstash-redis.git"},"keywords":["redis","database","serverless","edge","upstash"],"files":["./*"],"scripts":{"build":"tsup && cp package.json README.md LICENSE dist/","test":"bun test pkg","fmt":"prettier --write \"**/*.{ts,tsx,js,jsx,json,md}\"","lint":"eslint \"**/*.{js,ts,tsx}\" --quiet --fix","format":"prettier --write \"**/*.{ts,tsx,js,jsx,json,md}\"","format:check":"prettier --check \"**/*.{ts,tsx,js,jsx,json,md}\"","lint:fix":"eslint . -c .ts,.tsx,.js,.jsx --fix","commit":"cz","lint:format":"bun run lint:fix && bun run format","check-exports":"bun run build && cd dist && attw -P"},"author":"Andreas Thomas <dev@chronark.com>","license":"MIT","bugs":{"url":"https://github.com/upstash/upstash-redis/issues"},"homepage":"https://github.com/upstash/upstash-redis#readme","devDependencies":{"@biomejs/biome":"latest","@commitlint/cli":"^19.3.0","@commitlint/config-conventional":"^19.2.2","@types/crypto-js":"^4.1.3","@typescript-eslint/eslint-plugin":"8.4.0","@typescript-eslint/parser":"8.4.0","bun-types":"1.0.33","eslint":"9.10.0","eslint-plugin-unicorn":"55.0.0","husky":"^9.1.1","prettier":"^3.3.3","tsup":"^8.2.3","typescript":"latest"},"dependencies":{"crypto-js":"^4.2.0"}}
1
+ {"name":"@upstash/redis","version":"v0.0.0-ci.e9ff702fe7d2dd2495b4383b5432fe9b93f5a6e7-20250729064656","main":"./nodejs.js","module":"./nodejs.mjs","types":"./nodejs.d.ts","exports":{".":{"import":"./nodejs.mjs","require":"./nodejs.js"},"./node":{"import":"./nodejs.mjs","require":"./nodejs.js"},"./cloudflare":{"import":"./cloudflare.mjs","require":"./cloudflare.js"},"./cloudflare.js":{"import":"./cloudflare.mjs","require":"./cloudflare.js"},"./cloudflare.mjs":{"import":"./cloudflare.mjs","require":"./cloudflare.js"},"./fastly":{"import":"./fastly.mjs","require":"./fastly.js"},"./fastly.js":{"import":"./fastly.mjs","require":"./fastly.js"},"./fastly.mjs":{"import":"./fastly.mjs","require":"./fastly.js"}},"description":"An HTTP/REST based Redis client built on top of Upstash REST API.","repository":{"type":"git","url":"git+https://github.com/upstash/upstash-redis.git"},"keywords":["redis","database","serverless","edge","upstash"],"files":["./*"],"scripts":{"build":"tsup && cp package.json README.md LICENSE dist/","test":"bun test pkg","fmt":"prettier --write \"**/*.{ts,tsx,js,jsx,json,md}\"","lint":"eslint \"**/*.{js,ts,tsx}\" --quiet --fix","format":"prettier --write \"**/*.{ts,tsx,js,jsx,json,md}\"","format:check":"prettier --check \"**/*.{ts,tsx,js,jsx,json,md}\"","lint:fix":"eslint . -c .ts,.tsx,.js,.jsx --fix","commit":"cz","lint:format":"bun run lint:fix && bun run format","check-exports":"bun run build && cd dist && attw -P"},"author":"Andreas Thomas <dev@chronark.com>","license":"MIT","bugs":{"url":"https://github.com/upstash/upstash-redis/issues"},"homepage":"https://github.com/upstash/upstash-redis#readme","devDependencies":{"@biomejs/biome":"latest","@commitlint/cli":"^19.3.0","@commitlint/config-conventional":"^19.2.2","@typescript-eslint/eslint-plugin":"8.4.0","@typescript-eslint/parser":"8.4.0","bun-types":"1.0.33","eslint":"9.10.0","eslint-plugin-unicorn":"55.0.0","husky":"^9.1.1","prettier":"^3.3.3","tsup":"^8.2.3","typescript":"latest"},"dependencies":{"uncrypto":"^0.1.3"}}