@devvit/shared-types 0.10.19-next-2024-04-23-27f06a745.0 → 0.10.20-next-2024-04-24-8b36e13f0.0

Sign up to get free protection for your applications and to get access to all the features.
package/PlatformUtil.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Returns true for any kind of worker (web worker, Node.js, v8go, etc). False
3
- * for BrowserRuntime and NodeRuntime.
3
+ * for NodeRuntime.
4
4
  */
5
5
  export declare function isWorker(): boolean;
6
6
  /**
@@ -8,7 +8,6 @@ export declare function isWorker(): boolean;
8
8
  * worker.
9
9
  */
10
10
  export declare function isPlatformGo(): boolean;
11
- export declare function isPlatformWeb(): boolean;
12
11
  export declare function isPlatformNode(): boolean;
13
12
  /** Returns true if no GUI nor rich debug console. */
14
13
  export declare function isHeadless(): boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"PlatformUtil.d.ts","sourceRoot":"","sources":["../src/PlatformUtil.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,wBAAgB,QAAQ,IAAI,OAAO,CAOlC;AAED;;;GAGG;AACH,wBAAgB,YAAY,IAAI,OAAO,CAKtC;AAED,wBAAgB,aAAa,IAAI,OAAO,CAKvC;AAED,wBAAgB,cAAc,IAAI,OAAO,CAGxC;AAED,qDAAqD;AACrD,wBAAgB,UAAU,IAAI,OAAO,CAGpC;AAED;;GAEG;AACH,wBAAgB,cAAc,IAAI,OAAO,CAExC"}
1
+ {"version":3,"file":"PlatformUtil.d.ts","sourceRoot":"","sources":["../src/PlatformUtil.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,wBAAgB,QAAQ,IAAI,OAAO,CAOlC;AAED;;;GAGG;AACH,wBAAgB,YAAY,IAAI,OAAO,CAKtC;AAED,wBAAgB,cAAc,IAAI,OAAO,CAGxC;AAED,qDAAqD;AACrD,wBAAgB,UAAU,IAAI,OAAO,CAGpC;AAED;;GAEG;AACH,wBAAgB,cAAc,IAAI,OAAO,CAExC"}
package/PlatformUtil.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Returns true for any kind of worker (web worker, Node.js, v8go, etc). False
3
- * for BrowserRuntime and NodeRuntime.
3
+ * for NodeRuntime.
4
4
  */
5
5
  export function isWorker() {
6
6
  return ((typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope) ||
@@ -15,12 +15,6 @@ export function isWorker() {
15
15
  export function isPlatformGo() {
16
16
  return globalThis.devvit?.compute?.platform === 'go';
17
17
  }
18
- export function isPlatformWeb() {
19
- // to-do: populate globalThis.devvit?.compute.platform for the web.
20
- // The BrowserRuntime executes in a Window. The NodeRuntime has no window
21
- // global and the platform isn't Go.
22
- return !isPlatformGo() && !isPlatformNode();
23
- }
24
18
  export function isPlatformNode() {
25
19
  // to-do: populate globalThis.devvit?.compute.platform for Node.js.
26
20
  return typeof process !== 'undefined' && process.release?.name === 'node';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devvit/shared-types",
3
- "version": "0.10.19-next-2024-04-23-27f06a745.0",
3
+ "version": "0.10.20-next-2024-04-24-8b36e13f0.0",
4
4
  "license": "BSD-3-Clause",
5
5
  "repository": {
6
6
  "type": "git",
@@ -23,12 +23,12 @@
23
23
  },
24
24
  "types": "./index.d.ts",
25
25
  "dependencies": {
26
- "@devvit/protos": "0.10.19-next-2024-04-23-27f06a745.0"
26
+ "@devvit/protos": "0.10.20-next-2024-04-24-8b36e13f0.0"
27
27
  },
28
28
  "devDependencies": {
29
- "@devvit/eslint-config": "0.10.18",
30
- "@devvit/repo-tools": "0.10.18",
31
- "@devvit/tsconfig": "0.10.19-next-2024-04-23-27f06a745.0",
29
+ "@devvit/eslint-config": "0.10.19",
30
+ "@devvit/repo-tools": "0.10.19",
31
+ "@devvit/tsconfig": "0.10.20-next-2024-04-24-8b36e13f0.0",
32
32
  "eslint": "8.9.0",
33
33
  "typescript": "5.3.2",
34
34
  "vitest": "0.31.0"
@@ -37,5 +37,5 @@
37
37
  "directory": "dist"
38
38
  },
39
39
  "source": "./src/index.ts",
40
- "gitHead": "ab1449e7201835dfd8c4fe4363b4cab340254839"
40
+ "gitHead": "b36ce41b5daf76541b4acd48dae6122799efe503"
41
41
  }