@php-wasm/universal 0.1.39 → 0.1.40

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@php-wasm/universal",
3
- "version": "0.1.39",
3
+ "version": "0.1.40",
4
4
  "description": "PHP.wasm – emscripten bindings for PHP",
5
5
  "repository": {
6
6
  "type": "git",
@@ -35,5 +35,5 @@
35
35
  "main": "./index.cjs",
36
36
  "module": "./index.js",
37
37
  "license": "GPL-2.0-or-later",
38
- "gitHead": "18dcdc0d24417bf9207e113d4832229e80c68a28"
38
+ "gitHead": "d4817100bc505f21309e07a5b2cec1f2be38e85d"
39
39
  }
@@ -181,8 +181,9 @@ export function getLoadedRuntime(id: PHPRuntimeId): PHPRuntime {
181
181
  }
182
182
 
183
183
  export const currentJsRuntime = (function () {
184
- // @ts-ignore
185
- if (typeof window !== 'undefined' && !import.meta.env.TEST) {
184
+ if (typeof process !== 'undefined' && process.release?.name === 'node') {
185
+ return 'NODE';
186
+ } else if (typeof window !== 'undefined') {
186
187
  return 'WEB';
187
188
  } else if (
188
189
  typeof WorkerGlobalScope !== 'undefined' &&