Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

Update dependencies and environment variables configuration

Kiran Kf31d27acb532
diff --git a/apps/web/package.json b/apps/web/package.json
index aa9d735220..08e3000acc 100644
--- a/apps/web/package.json
+++ b/apps/web/package.json
@@ -118,7 +118,8 @@
"turbo": "^1.10.14",
"typescript": "^5.1.6",
"vite-tsconfig-paths": "^4.3.2",
- "vitest": "^1.4.0"
+ "vitest": "1.5.0",
+ "vite": "5.2.9"
},
"browser": {
"crypto": false
diff --git a/apps/web/tests/utils/env.ts b/apps/web/tests/utils/env.ts
index 1c3c23a311..6771714931 100644
--- a/apps/web/tests/utils/env.ts
+++ b/apps/web/tests/utils/env.ts
@@ -1,10 +1,10 @@
import { z } from "zod";
export const integrationTestEnv = z.object({
- API_BASE_URL: z.string().url().default("https://api.dub.co"),
- TOKEN: z.string().min(1),
- USER_ID: z.string().min(1),
- WORKSPACE_ID: z.string().min(1).default("ws_clv6iazq2003k8lh32eclix8l"),
- WORKSPACE_SLUG: z.string().min(1).default("acme"),
- WORKSPACE_NAME: z.string().min(1).default("Acme"),
+ E2E_API_BASE_URL: z.string().url().min(1),
+ E2E_TOKEN: z.string().min(1),
+ E2E_USER_ID: z.string().min(1),
+ E2E_WORKSPACE_ID: z.string().min(1),
+ E2E_WORKSPACE_SLUG: z.string().min(1),
+ E2E_WORKSPACE_NAME: z.string().min(1),
});
diff --git a/apps/web/tests/utils/globalSetup.ts b/apps/web/tests/utils/globalSetup.ts
deleted file mode 100644
index e69de29bb2..0000000000
diff --git a/apps/web/tests/utils/integration.ts b/apps/web/tests/utils/integration.ts
index 50c9cc3717..7a22d5f26b 100644
--- a/apps/web/tests/utils/integration.ts
+++ b/apps/web/tests/utils/integration.ts
@@ -21,31 +21,28 @@ export class IntegrationHarness {
this.env = integrationTestEnv.parse(process.env);
this.ctx = ctx;
- this.baseUrl = this.env.API_BASE_URL;
+ this.baseUrl = this.env.E2E_API_BASE_URL;
this.http = new HttpClient({
baseUrl: this.baseUrl,
headers: {
- Authorization: `Bearer ${this.env.TOKEN}`,
+ Authorization: `Bearer ${this.env.E2E_TOKEN}`,
},
});
}
async init() {
- const { USER_ID, TOKEN, WORKSPACE_ID, WORKSPACE_SLUG, WORKSPACE_NAME } =
- this.env;
-
const user = {
- id: USER_ID,
+ id: this.env.E2E_USER_ID,
};
const apiKey = {
- token: TOKEN,
+ token: this.env.E2E_TOKEN,
};
const workspace = {
- id: WORKSPACE_ID,
- slug: WORKSPACE_SLUG,
- name: WORKSPACE_NAME,
+ id: this.env.E2E_WORKSPACE_ID,
+ slug: this.env.E2E_WORKSPACE_SLUG,
+ name: this.env.E2E_WORKSPACE_NAME,
};
this.resources = {
diff --git a/apps/web/vitest.config.ts b/apps/web/vitest.config.ts
index a6d76589c0..78ff229db2 100644
--- a/apps/web/vitest.config.ts
+++ b/apps/web/vitest.config.ts
@@ -1,3 +1,4 @@
+import { loadEnv } from "vite";
import tsconfigPaths from "vite-tsconfig-paths";
import { defineConfig } from "vitest/config";
@@ -8,5 +9,6 @@ export default defineConfig({
reporters: ["verbose"],
globals: true,
testTimeout: 50000,
+ env: loadEnv("", process.cwd(), ""),
},
});
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index b9a030cd2a..4c3e1c87ab 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -347,12 +347,15 @@ importers:
typescript:
specifier: ^5.1.6
version: 5.1.6
+ vite:
+ specifier: 5.2.9
+ version: 5.2.9(@types/[email protected])
vite-tsconfig-paths:
specifier: ^4.3.2
- version: 4.3.2([email protected])
vitest:
- specifier: ^1.4.0
- version: 1.4.0(@types/[email protected])
+ specifier: 1.5.0
+ version: 1.5.0(@types/[email protected])
packages/tailwind-config:
dependencies:
@@ -7817,38 +7820,38 @@ packages:
internmap: 2.0.3
dev: false
- /@vitest/[email protected]:
- resolution: {integrity: sha512-Jths0sWCJZ8BxjKe+p+eKsoqev1/T8lYcrjavEaz8auEJ4jAVY0GwW3JKmdVU4mmNPLPHixh4GNXP7GFtAiDHA==}
+ /@vitest/[email protected]:
+ resolution: {integrity: sha512-0pzuCI6KYi2SIC3LQezmxujU9RK/vwC1U9R0rLuGlNGcOuDWxqWKu6nUdFsX9tH1WU0SXtAxToOsEjeUn1s3hA==}
dependencies:
- '@vitest/spy': 1.4.0
- '@vitest/utils': 1.4.0
+ '@vitest/spy': 1.5.0
+ '@vitest/utils': 1.5.0
chai: 4.4.1
dev: true
- /@vitest/[email protected]:
- resolution: {integrity: sha512-EDYVSmesqlQ4RD2VvWo3hQgTJ7ZrFQ2VSJdfiJiArkCerDAGeyF1i6dHkmySqk573jLp6d/cfqCN+7wUB5tLgg==}
+ /@vitest/[email protected]:
+ resolution: {integrity: sha512-7HWwdxXP5yDoe7DTpbif9l6ZmDwCzcSIK38kTSIt6CFEpMjX4EpCgT6wUmS0xTXqMI6E/ONmfgRKmaujpabjZQ==}
dependencies:
- '@vitest/utils': 1.4.0
+ '@vitest/utils': 1.5.0
p-limit: 5.0.0
pathe: 1.1.2
dev: true
- /@vitest/[email protected]:
- resolution: {integrity: sha512-saAFnt5pPIA5qDGxOHxJ/XxhMFKkUSBJmVt5VgDsAqPTX6JP326r5C/c9UuCMPoXNzuudTPsYDZCoJ5ilpqG2A==}
+ /@vitest/[email protected]:
+ resolution: {integrity: sha512-qpv3fSEuNrhAO3FpH6YYRdaECnnRjg9VxbhdtPwPRnzSfHVXnNzzrpX4cJxqiwgRMo7uRMWDFBlsBq4Cr+rO3A==}
dependencies:
- magic-string: 0.30.8
+ magic-string: 0.30.9
pathe: 1.1.2
pretty-format: 29.7.0
dev: true
- /@vitest/[email protected]:
- resolution: {integrity: sha512-Ywau/Qs1DzM/8Uc+yA77CwSegizMlcgTJuYGAi0jujOteJOUf1ujunHThYo243KG9nAyWT3L9ifPYZ5+As/+6Q==}
+ /@vitest/[email protected]:
+ resolution: {integrity: sha512-vu6vi6ew5N5MMHJjD5PoakMRKYdmIrNJmyfkhRpQt5d9Ewhw9nZ5Aqynbi3N61bvk9UvZ5UysMT6ayIrZ8GA9w==}
dependencies:
tinyspy: 2.2.1
dev: true
- /@vitest/[email protected]:
- resolution: {integrity: sha512-mx3Yd1/6e2Vt/PUC98DcqTirtfxUyAZ32uK82r8rZzbtBeBo+nqgnjx/LvqQdWsrvNtm14VmurNgcf4nqY5gJg==}
+ /@vitest/[email protected]:
+ resolution: {integrity: sha512-BDU0GNL8MWkRkSRdNFvCUCAVOeHaUlVJ9Tx0TYBZyXaaOTmGtUFObzchCivIBrIwKzvZA7A9sCejVhXM2aY98A==}
dependencies:
diff-sequences: 29.6.3
estree-walker: 3.0.3
@@ -11964,19 +11967,11 @@ packages:
react: 18.2.0
dev: false
- resolution: {integrity: sha512-ISQTe55T2ao7XtlAStud6qwYPZjE4GK1S/BeVPus4jrq6JuOnQ00YKQC581RWhR122W7msZV263KzVeLoqidyQ==}
- engines: {node: '>=12'}
- dependencies:
- '@jridgewell/sourcemap-codec': 1.4.15
- dev: true
-
resolution: {integrity: sha512-S1+hd+dIrC8EZqKyT9DstTH/0Z+f76kmmvZnkfQVmOpDEF9iVgdYif3Q/pIWHmCoo59bQVGW0kVL3e2nl+9+Sw==}
engines: {node: '>=12'}
dependencies:
'@jridgewell/sourcemap-codec': 1.4.15
- dev: false
resolution: {integrity: sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==}
@@ -13804,7 +13799,7 @@ packages:
dependencies:
nanoid: 3.3.7
picocolors: 1.0.0
- source-map-js: 1.0.2
+ source-map-js: 1.2.0
dev: false
@@ -16591,8 +16586,8 @@ packages:
vfile-message: 3.1.4
dev: false
- resolution: {integrity: sha512-VZDAseqjrHgNd4Kh8icYHWzTKSCZMhia7GyHfhtzLW33fZlG9SwsB6CEhgyVOWkJfJ2pFLrp/Gj1FSfAiqH9Lw==}
+ resolution: {integrity: sha512-tV8h6gMj6vPzVCa7l+VGq9lwoJjW8Y79vst8QZZGiuRAfijU+EEWuc0kFpmndQrWhMMhet1jdSF+40KSZUqIIw==}
engines: {node: ^18.0.0 || >=20.0.0}
hasBin: true
dependencies:
@@ -16600,7 +16595,7 @@ packages:
debug: 4.3.4
pathe: 1.1.2
picocolors: 1.0.0
- vite: 5.2.7(@types/[email protected])
+ vite: 5.2.9(@types/[email protected])
transitivePeerDependencies:
- '@types/node'
- less
@@ -16612,7 +16607,7 @@ packages:
- terser
dev: true
resolution: {integrity: sha512-0Vd/a6po6Q+86rPlntHye7F31zA2URZMbH8M3saAZ/xR9QoGN/L21bxEGfXdWmFdNkqPpRdxFT7nmNe12e9/uA==}
peerDependencies:
vite: '*'
@@ -16623,13 +16618,14 @@ packages:
debug: 4.3.4
globrex: 0.1.2
tsconfck: 3.0.3([email protected])
+ vite: 5.2.9(@types/[email protected])
transitivePeerDependencies:
- supports-color
- typescript
dev: true
- resolution: {integrity: sha512-k14PWOKLI6pMaSzAuGtT+Cf0YmIx12z9YGon39onaJNy8DLBfBJrzg9FQEmkAM5lpHBZs9wksWAsyF/HkpEwJA==}
+ resolution: {integrity: sha512-uOQWfuZBlc6Y3W/DTuQ1Sr+oIXWvqljLvS881SVmAj00d5RdgShLcuXWxseWPd4HXwiYBFW/vXHfKFeqj9uQnw==}
engines: {node: ^18.0.0 || >=20.0.0}
hasBin: true
peerDependencies:
@@ -16664,15 +16660,15 @@ packages:
fsevents: 2.3.3
dev: true
- resolution: {integrity: sha512-gujzn0g7fmwf83/WzrDTnncZt2UiXP41mHuFYFrdwaLRVQ6JYQEiME2IfEjU3vcFL3VKa75XhI3lFgn+hfVsQw==}
+ resolution: {integrity: sha512-d8UKgR0m2kjdxDWX6911uwxout6GHS0XaGH1cksSIVVG8kRlE7G7aBw7myKQCvDI5dT4j7ZMa+l706BIORMDLw==}
engines: {node: ^18.0.0 || >=20.0.0}
hasBin: true
peerDependencies:
'@edge-runtime/vm': '*'
'@types/node': ^18.0.0 || >=20.0.0
- '@vitest/browser': 1.4.0
- '@vitest/ui': 1.4.0
+ '@vitest/browser': 1.5.0
+ '@vitest/ui': 1.5.0
happy-dom: '*'
jsdom: '*'
peerDependenciesMeta:
@@ -16690,25 +16686,25 @@ packages:
optional: true
dependencies:
'@types/node': 18.11.9
- '@vitest/expect': 1.4.0
- '@vitest/runner': 1.4.0
- '@vitest/snapshot': 1.4.0
- '@vitest/spy': 1.4.0
- '@vitest/utils': 1.4.0
+ '@vitest/expect': 1.5.0
+ '@vitest/runner': 1.5.0
+ '@vitest/snapshot': 1.5.0
+ '@vitest/spy': 1.5.0
+ '@vitest/utils': 1.5.0
acorn-walk: 8.3.2
chai: 4.4.1
debug: 4.3.4
execa: 8.0.1
local-pkg: 0.5.0
- magic-string: 0.30.8
+ magic-string: 0.30.9
pathe: 1.1.2
picocolors: 1.0.0
std-env: 3.7.0
strip-literal: 2.1.0
tinybench: 2.6.0
tinypool: 0.8.3
- vite: 5.2.7(@types/[email protected])
- vite-node: 1.4.0(@types/[email protected])
+ vite: 5.2.9(@types/[email protected])
+ vite-node: 1.5.0(@types/[email protected])
why-is-node-running: 2.2.2
transitivePeerDependencies:
- less