@php-wasm/web-7-3 3.0.35 → 3.0.37

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.
Binary file
@@ -13289,12 +13289,15 @@ export function init(RuntimeName, PHPLoader) {
13289
13289
  noop: function () {},
13290
13290
  spawnProcess: function (command, args, options) {
13291
13291
  if (Module['spawnProcess']) {
13292
- const spawnedPromise = Module['spawnProcess'](
13293
- command,
13294
- args,
13295
- options
13296
- );
13297
- return Promise.resolve(spawnedPromise).then(function (spawned) {
13292
+ const spawned = Module['spawnProcess'](command, args, {
13293
+ ...options,
13294
+ shell: true,
13295
+ stdio: ['pipe', 'pipe', 'pipe'],
13296
+ });
13297
+ if (spawned && !('then' in spawned) && 'on' in spawned) {
13298
+ return spawned;
13299
+ }
13300
+ return Promise.resolve(spawned).then(function (spawned) {
13298
13301
  if (!spawned || !spawned.on) {
13299
13302
  throw new Error(
13300
13303
  'spawnProcess() must return an EventEmitter but returned a different type.'
@@ -13303,13 +13306,6 @@ export function init(RuntimeName, PHPLoader) {
13303
13306
  return spawned;
13304
13307
  });
13305
13308
  }
13306
- if (ENVIRONMENT_IS_NODE) {
13307
- return require('child_process').spawn(command, args, {
13308
- ...options,
13309
- shell: true,
13310
- stdio: ['pipe', 'pipe', 'pipe'],
13311
- });
13312
- }
13313
13309
  const e = new Error(
13314
13310
  'popen(), proc_open() etc. are unsupported on this PHP instance. Call php.setSpawnHandler() ' +
13315
13311
  'and provide a callback to handle spawning processes, or disable a popen(), proc_open() ' +
Binary file
package/jspi/php_7_3.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import dependencyFilename from './7_3_33/php_7_3.wasm';
2
2
  export { dependencyFilename };
3
- export const dependenciesTotalSize = 19778055;
3
+ export const dependenciesTotalSize = 19778053;
4
4
  const phpVersionString = '7.3.33';
5
5
  export function init(RuntimeName, PHPLoader) {
6
6
  // The rest of the code comes from the built php.js file and esm-suffix.js
@@ -13165,12 +13165,15 @@ export function init(RuntimeName, PHPLoader) {
13165
13165
  noop: function () {},
13166
13166
  spawnProcess: function (command, args, options) {
13167
13167
  if (Module['spawnProcess']) {
13168
- const spawnedPromise = Module['spawnProcess'](
13169
- command,
13170
- args,
13171
- options
13172
- );
13173
- return Promise.resolve(spawnedPromise).then(function (spawned) {
13168
+ const spawned = Module['spawnProcess'](command, args, {
13169
+ ...options,
13170
+ shell: true,
13171
+ stdio: ['pipe', 'pipe', 'pipe'],
13172
+ });
13173
+ if (spawned && !('then' in spawned) && 'on' in spawned) {
13174
+ return spawned;
13175
+ }
13176
+ return Promise.resolve(spawned).then(function (spawned) {
13174
13177
  if (!spawned || !spawned.on) {
13175
13178
  throw new Error(
13176
13179
  'spawnProcess() must return an EventEmitter but returned a different type.'
@@ -13179,13 +13182,6 @@ export function init(RuntimeName, PHPLoader) {
13179
13182
  return spawned;
13180
13183
  });
13181
13184
  }
13182
- if (ENVIRONMENT_IS_NODE) {
13183
- return require('child_process').spawn(command, args, {
13184
- ...options,
13185
- shell: true,
13186
- stdio: ['pipe', 'pipe', 'pipe'],
13187
- });
13188
- }
13189
13185
  const e = new Error(
13190
13186
  'popen(), proc_open() etc. are unsupported on this PHP instance. Call php.setSpawnHandler() ' +
13191
13187
  'and provide a callback to handle spawning processes, or disable a popen(), proc_open() ' +
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@php-wasm/web-7-3",
3
- "version": "3.0.35",
3
+ "version": "3.0.37",
4
4
  "description": "PHP 7.3 WebAssembly binaries for web",
5
5
  "repository": {
6
6
  "type": "git",
@@ -35,11 +35,11 @@
35
35
  "node": ">=20.18.3",
36
36
  "npm": ">=10.1.0"
37
37
  },
38
- "gitHead": "9ab661ec8c217023fef7dd97781a751551aafa2a",
38
+ "gitHead": "1ac56b78f05f1c517f6b56beb527d6826b53aa82",
39
39
  "dependencies": {
40
40
  "ini": "4.1.2",
41
41
  "wasm-feature-detect": "1.8.0",
42
- "@php-wasm/universal": "3.0.35"
42
+ "@php-wasm/universal": "3.0.37"
43
43
  },
44
44
  "packageManager": "npm@10.9.2",
45
45
  "overrides": {