diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2a1ce674..05036d7c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -54,4 +54,4 @@ jobs: working-directory: ./dist run: | npm pkg delete scripts.prepare - npm publish --access public --tag=next + npm publish --access public --tag=canary diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index b75bf293..885415e4 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -58,9 +58,7 @@ jobs: run: bun run build - name: Install example - run: | - bun install - bun add @upstash/redis@../../dist + run: bun add @upstash/redis@../../dist working-directory: ./examples/vercel-functions-app-router - name: Build example @@ -100,9 +98,7 @@ jobs: run: bun run build - name: Install example - run: | - bun install - bun add @upstash/redis@../../dist + run: bun add @upstash/redis@../../dist working-directory: ./examples/vercel-functions-pages-router - name: Build example @@ -255,7 +251,6 @@ jobs: - name: Install example run: | - bun install bun add @upstash/redis@../../dist npm install -g wrangler working-directory: examples/cloudflare-workers @@ -348,7 +343,6 @@ jobs: - name: Install example run: | - bun install bun add @upstash/redis@../../dist npm install -g wrangler @@ -449,7 +443,6 @@ jobs: - name: Install example working-directory: ./examples/fastly run: | - bun install bun add @upstash/redis@../../dist curl -L https://github.com/fastly/cli/releases/download/v1.7.0/fastly_v1.7.0_linux-amd64.tar.gz > fastly.tar.gz tar -xf ./fastly.tar.gz @@ -613,3 +606,7 @@ jobs: run: | npm pkg delete scripts.prepare npm publish --tag=ci --verbose + + - name: Sleep for 10s + run: sleep 10s + shell: bash diff --git a/examples/auto-pipeline/package.json b/examples/auto-pipeline/package.json index 9f2090b9..772fd799 100644 --- a/examples/auto-pipeline/package.json +++ b/examples/auto-pipeline/package.json @@ -9,7 +9,7 @@ "lint": "next lint" }, "dependencies": { - "@upstash/redis": "^1.30.1", + "@upstash/redis": "latest", "next": "14.2.3", "react": "^18", "react-dom": "^18" diff --git a/examples/aws-cdk-typescript/package-lock.json b/examples/aws-cdk-typescript/package-lock.json index 6f9a910e..01578591 100644 --- a/examples/aws-cdk-typescript/package-lock.json +++ b/examples/aws-cdk-typescript/package-lock.json @@ -8,7 +8,7 @@ "name": "aws-cdk-typescript", "version": "0.1.0", "dependencies": { - "@upstash/redis": "^1.33.0", + "@upstash/redis": "latest", "aws-cdk-lib": "2.147.2", "constructs": "^10.0.0", "source-map-support": "^0.5.21" diff --git a/examples/aws-cdk-typescript/package.json b/examples/aws-cdk-typescript/package.json index e06a6a86..31401055 100644 --- a/examples/aws-cdk-typescript/package.json +++ b/examples/aws-cdk-typescript/package.json @@ -20,7 +20,7 @@ "typescript": "~5.4.5" }, "dependencies": { - "@upstash/redis": "^1.33.0", + "@upstash/redis": "latest", "aws-cdk-lib": "2.147.2", "constructs": "^10.0.0", "source-map-support": "^0.5.21" diff --git a/examples/aws-lambda/package-lock.json b/examples/aws-lambda/package-lock.json index 02d7bfef..5d35f30d 100644 --- a/examples/aws-lambda/package-lock.json +++ b/examples/aws-lambda/package-lock.json @@ -5,7 +5,7 @@ "packages": { "": { "dependencies": { - "@upstash/redis": "^1.31.6" + "@upstash/redis": "latest" } }, "node_modules/@upstash/redis": { diff --git a/examples/aws-lambda/package.json b/examples/aws-lambda/package.json index 0e0f9210..51bd12cf 100644 --- a/examples/aws-lambda/package.json +++ b/examples/aws-lambda/package.json @@ -1,6 +1,6 @@ { "dependencies": { - "@upstash/redis": "^1.31.6" + "@upstash/redis": "latest" } } \ No newline at end of file diff --git a/examples/azure-functions/package-lock.json b/examples/azure-functions/package-lock.json index e8bf8eda..c422778f 100644 --- a/examples/azure-functions/package-lock.json +++ b/examples/azure-functions/package-lock.json @@ -8,7 +8,7 @@ "version": "1.0.0", "dependencies": { "@azure/functions": "^4.0.0", - "@upstash/redis": "^1.34.0" + "@upstash/redis": "latest" }, "devDependencies": { "@types/node": "18.x", diff --git a/examples/azure-functions/package.json b/examples/azure-functions/package.json index b81f27de..9694f3a6 100644 --- a/examples/azure-functions/package.json +++ b/examples/azure-functions/package.json @@ -13,7 +13,7 @@ }, "dependencies": { "@azure/functions": "^4.0.0", - "@upstash/redis": "^1.34.0" + "@upstash/redis": "latest" }, "devDependencies": { "@types/node": "18.x", diff --git a/examples/cloudflare-workers-with-typescript/package.json b/examples/cloudflare-workers-with-typescript/package.json index 839b921c..542376e2 100644 --- a/examples/cloudflare-workers-with-typescript/package.json +++ b/examples/cloudflare-workers-with-typescript/package.json @@ -12,6 +12,6 @@ "publish": "wrangler publish" }, "dependencies": { - "@upstash/redis": "../../dist" + "@upstash/redis": "latest" } } diff --git a/examples/cloudflare-workers/bun.lockb b/examples/cloudflare-workers/bun.lockb new file mode 100755 index 00000000..a4175b15 Binary files /dev/null and b/examples/cloudflare-workers/bun.lockb differ diff --git a/examples/fastly/package.json b/examples/fastly/package.json index 0a8a7c3b..608b0c06 100644 --- a/examples/fastly/package.json +++ b/examples/fastly/package.json @@ -11,7 +11,7 @@ }, "dependencies": { "@fastly/js-compute": "^0.5.5", - "@upstash/redis": "../../dist", + "@upstash/redis": "latest", "flight-path": "^1.0.10" }, "scripts": { diff --git a/examples/google-cloud-functions/package.json b/examples/google-cloud-functions/package.json index 3b7be429..f64d2b3b 100644 --- a/examples/google-cloud-functions/package.json +++ b/examples/google-cloud-functions/package.json @@ -1,7 +1,7 @@ { "dependencies": { "@google-cloud/functions-framework": "^3.0.0", - "@upstash/redis": "^1.31.6" + "@upstash/redis": "latest" } } \ No newline at end of file diff --git a/examples/ion/package-lock.json b/examples/ion/package-lock.json index 39e2434f..28fc8c08 100644 --- a/examples/ion/package-lock.json +++ b/examples/ion/package-lock.json @@ -8,7 +8,7 @@ "name": "ion", "version": "0.1.0", "dependencies": { - "@upstash/redis": "^1.34.0", + "@upstash/redis": "latest", "next": "14.2.5", "react": "^18", "react-dom": "^18", diff --git a/examples/ion/package.json b/examples/ion/package.json index 8eb25d95..9cee3124 100644 --- a/examples/ion/package.json +++ b/examples/ion/package.json @@ -9,7 +9,7 @@ "start": "next start" }, "dependencies": { - "@upstash/redis": "^1.34.0", + "@upstash/redis": "latest", "next": "14.2.5", "react": "^18", "react-dom": "^18", diff --git a/examples/nextjs-app-router/package.json b/examples/nextjs-app-router/package.json index 645263ac..370bdd08 100644 --- a/examples/nextjs-app-router/package.json +++ b/examples/nextjs-app-router/package.json @@ -9,7 +9,7 @@ "lint": "next lint" }, "dependencies": { - "@upstash/redis": "^1.33.0", + "@upstash/redis": "latest", "next": "14.2.5", "react": "^18", "react-dom": "^18" diff --git a/examples/nextjs-pages-router/package.json b/examples/nextjs-pages-router/package.json index 5ac0afbe..6b8560c9 100644 --- a/examples/nextjs-pages-router/package.json +++ b/examples/nextjs-pages-router/package.json @@ -9,7 +9,7 @@ "lint": "next lint" }, "dependencies": { - "@upstash/redis": "^1.33.0", + "@upstash/redis": "latest", "next": "14.2.5", "react": "^18", "react-dom": "^18" diff --git a/examples/nodejs/package.json b/examples/nodejs/package.json index a590862d..af1076d9 100644 --- a/examples/nodejs/package.json +++ b/examples/nodejs/package.json @@ -5,6 +5,6 @@ "main": "index.js", "license": "MIT", "dependencies": { - "@upstash/redis": "^1.33.0" + "@upstash/redis": "latest" } } diff --git a/examples/serverless-framework/counter/package-lock.json b/examples/serverless-framework/counter/package-lock.json index 4c1136fa..0c2a65ec 100644 --- a/examples/serverless-framework/counter/package-lock.json +++ b/examples/serverless-framework/counter/package-lock.json @@ -5,7 +5,7 @@ "packages": { "": { "dependencies": { - "@upstash/redis": "^1.31.6" + "@upstash/redis": "latest" } }, "node_modules/@upstash/redis": { diff --git a/examples/serverless-framework/counter/package.json b/examples/serverless-framework/counter/package.json index 0e0f9210..51bd12cf 100644 --- a/examples/serverless-framework/counter/package.json +++ b/examples/serverless-framework/counter/package.json @@ -1,6 +1,6 @@ { "dependencies": { - "@upstash/redis": "^1.31.6" + "@upstash/redis": "latest" } } \ No newline at end of file diff --git a/examples/sst-v2/package.json b/examples/sst-v2/package.json index 7a32d9ae..2b478023 100644 --- a/examples/sst-v2/package.json +++ b/examples/sst-v2/package.json @@ -22,6 +22,6 @@ "packages/*" ], "dependencies": { - "@upstash/redis": "^1.34.0" + "@upstash/redis": "latest" } } diff --git a/examples/terraform/counter/package.json b/examples/terraform/counter/package.json index 0e0f9210..51bd12cf 100644 --- a/examples/terraform/counter/package.json +++ b/examples/terraform/counter/package.json @@ -1,6 +1,6 @@ { "dependencies": { - "@upstash/redis": "^1.31.6" + "@upstash/redis": "latest" } } \ No newline at end of file diff --git a/examples/vercel-functions-app-router/package.json b/examples/vercel-functions-app-router/package.json index 79341eb3..53a128f9 100644 --- a/examples/vercel-functions-app-router/package.json +++ b/examples/vercel-functions-app-router/package.json @@ -9,7 +9,7 @@ "lint": "next lint" }, "dependencies": { - "@upstash/redis": "^1.33.0", + "@upstash/redis": "latest", "next": "14.2.5", "react": "^18", "react-dom": "^18" diff --git a/examples/vercel-functions-pages-router/package.json b/examples/vercel-functions-pages-router/package.json index c8b9fe4d..e1571219 100644 --- a/examples/vercel-functions-pages-router/package.json +++ b/examples/vercel-functions-pages-router/package.json @@ -9,7 +9,7 @@ "lint": "next lint" }, "dependencies": { - "@upstash/redis": "^1.33.0", + "@upstash/redis": "latest", "next": "14.2.5", "react": "^18", "react-dom": "^18" diff --git a/package.json b/package.json index b79e8bba..7bbc80c2 100644 --- a/package.json +++ b/package.json @@ -3,6 +3,7 @@ "version": "1.30.2", "main": "./nodejs.js", "module": "./nodejs.mjs", + "types": "./nodejs.d.ts", "exports": { ".": { "import": "./nodejs.mjs", @@ -12,22 +13,31 @@ "import": "./nodejs.mjs", "require": "./nodejs.js" }, - "./node.js": "./node.js", - "./node.mjs": "./node.mjs", "./cloudflare": { "import": "./cloudflare.mjs", "require": "./cloudflare.js" }, - "./cloudflare.js": "./cloudflare.js", - "./cloudflare.mjs": "./cloudflare.mjs", + "./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": "./fastly.js", - "./fastly.mjs": "./fastly.mjs" + "./fastly.js": { + "import": "./fastly.mjs", + "require": "./fastly.js" + }, + "./fastly.mjs": { + "import": "./fastly.mjs", + "require": "./fastly.js" + } }, - "types": "./nodejs.d.ts", "description": "An HTTP/REST based Redis client built on top of Upstash REST API.", "repository": { "type": "git", @@ -41,19 +51,20 @@ "upstash" ], "files": [ - "./**" + "./*" ], "scripts": { - "build": "tsup && cp README.md ./dist/ && cp package.json ./dist/ && cp LICENSE ./dist/", + "build": "tsup && cp package.json README.md LICENSE dist/", "test": "bun test pkg", "fmt": "prettier --write \"**/*.{ts,tsx,js,jsx,json,md}\"", - "prepare": "husky install", + "prepare": "husky", "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" + "lint:format": "bun run lint:fix && bun run format", + "check-exports": "bun run build && cd dist && attw -P" }, "author": "Andreas Thomas ", "license": "MIT", @@ -61,19 +72,6 @@ "url": "https://github.com/upstash/upstash-redis/issues" }, "homepage": "https://github.com/upstash/upstash-redis#readme", - "typesVersions": { - "*": { - "nodejs": [ - "./nodejs.d.ts" - ], - "cloudflare": [ - "./cloudflare.d.ts" - ], - "fastly": [ - "./fastly.d.ts" - ] - } - }, "devDependencies": { "@biomejs/biome": "latest", "@commitlint/cli": "^19.3.0", diff --git a/tsup.config.js b/tsup.config.ts similarity index 68% rename from tsup.config.js rename to tsup.config.ts index 034b518a..94c453ca 100644 --- a/tsup.config.js +++ b/tsup.config.ts @@ -3,11 +3,6 @@ import { defineConfig } from "tsup"; export default defineConfig({ entry: ["platforms/nodejs.ts", "platforms/cloudflare.ts", "platforms/fastly.ts"], format: ["cjs", "esm"], - splitting: true, - sourcemap: false, clean: true, - bundle: true, dts: true, - minify: true, - minifyWhitespace: true, });