@devvit/media 0.12.1-next-2025-09-08-16-36-02-0857fd917.0 → 0.12.1-next-2025-09-08-19-45-32-89a065252.0

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.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.test.d.ts","sourceRoot":"","sources":["../src/index.test.ts"],"names":[],"mappings":""}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devvit/media",
3
- "version": "0.12.1-next-2025-09-08-16-36-02-0857fd917.0",
3
+ "version": "0.12.1-next-2025-09-08-19-45-32-89a065252.0",
4
4
  "license": "BSD-3-Clause",
5
5
  "repository": {
6
6
  "type": "git",
@@ -8,10 +8,12 @@
8
8
  },
9
9
  "type": "module",
10
10
  "exports": {
11
- ".": "./index.js",
11
+ ".": {
12
+ "browser": "./serverImportInClientCodePanic.js",
13
+ "default": "./index.js"
14
+ },
12
15
  "./package.json": "./package.json"
13
16
  },
14
- "main": "./dist/index.js",
15
17
  "files": [
16
18
  "**"
17
19
  ],
@@ -23,24 +25,25 @@
23
25
  "lint": "redlint .",
24
26
  "lint:fix": "yarn lint --fix",
25
27
  "prepublishOnly": "publish-package-json",
26
- "test": "yarn test:types && yarn lint",
27
- "test:types": "tsc --noEmit"
28
+ "test": "yarn test:unit && yarn test:types && yarn lint",
29
+ "test:types": "tsc --noEmit",
30
+ "test:unit": "vitest run",
31
+ "test:unit-with-coverage": "vitest run --coverage"
28
32
  },
29
- "types": "./dist/index.d.ts",
30
33
  "dependencies": {
31
- "@devvit/protos": "0.12.1-next-2025-09-08-16-36-02-0857fd917.0"
34
+ "@devvit/protos": "0.12.1-next-2025-09-08-19-45-32-89a065252.0"
32
35
  },
33
36
  "peerDependencies": {
34
37
  "@devvit/server": "*"
35
38
  },
36
39
  "devDependencies": {
37
- "@devvit/repo-tools": "0.12.1-next-2025-09-08-16-36-02-0857fd917.0",
38
- "@devvit/server": "0.12.1-next-2025-09-08-16-36-02-0857fd917.0",
39
- "@devvit/shared-types": "0.12.1-next-2025-09-08-16-36-02-0857fd917.0",
40
- "@devvit/tsconfig": "0.12.1-next-2025-09-08-16-36-02-0857fd917.0",
40
+ "@devvit/repo-tools": "0.12.1-next-2025-09-08-19-45-32-89a065252.0",
41
+ "@devvit/server": "0.12.1-next-2025-09-08-19-45-32-89a065252.0",
42
+ "@devvit/shared-types": "0.12.1-next-2025-09-08-19-45-32-89a065252.0",
43
+ "@devvit/tsconfig": "0.12.1-next-2025-09-08-19-45-32-89a065252.0",
41
44
  "eslint": "9.11.1",
42
- "typescript": "5.8.3"
45
+ "typescript": "5.8.3",
46
+ "vitest": "1.6.1"
43
47
  },
44
- "source": "./src/index.ts",
45
- "gitHead": "9c81842620a8bd6824ee42532789c29eb57bbe29"
48
+ "gitHead": "f26bdc215ac18d3f501b4dc720461ba096126721"
46
49
  }
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Hey! If you're seeing this, you're probably trying to run server code in the
3
+ * client context, or you have your server build environment set up incorrectly.
4
+ * To fix this:
5
+ * 1) Check that you're not importing server code in your client files. If you
6
+ * are, you should import from `@devvit/web/client` instead of
7
+ * `@devvit/web/server`. `@devvit/media` is server only and has no client
8
+ * support.
9
+ * 2) If this is coming from server code, ensure that your client's tsconfig &
10
+ * build environment is set up correctly - specifically, make sure you do NOT
11
+ * have `compilerOptions.customConditions` set to include `["browser"]` in
12
+ * your `tsconfig.json` file. Also, verify that whatever bundler you're using
13
+ * (esbuild, vite, etc.) is bundling the client code for a Node environment,
14
+ * and not a web browser!
15
+ */
16
+ export {};
17
+ //# sourceMappingURL=serverImportInClientCodePanic.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"serverImportInClientCodePanic.d.ts","sourceRoot":"","sources":["../src/serverImportInClientCodePanic.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Hey! If you're seeing this, you're probably trying to run server code in the
3
+ * client context, or you have your server build environment set up incorrectly.
4
+ * To fix this:
5
+ * 1) Check that you're not importing server code in your client files. If you
6
+ * are, you should import from `@devvit/web/client` instead of
7
+ * `@devvit/web/server`. `@devvit/media` is server only and has no client
8
+ * support.
9
+ * 2) If this is coming from server code, ensure that your client's tsconfig &
10
+ * build environment is set up correctly - specifically, make sure you do NOT
11
+ * have `compilerOptions.customConditions` set to include `["browser"]` in
12
+ * your `tsconfig.json` file. Also, verify that whatever bundler you're using
13
+ * (esbuild, vite, etc.) is bundling the client code for a Node environment,
14
+ * and not a web browser!
15
+ */
16
+ console.error("Can't import server code in the client!");
17
+ export {};