@php-wasm/web-8-0 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
@@ -1,6 +1,6 @@
1
1
  import dependencyFilename from './8_0_30/php_8_0.wasm';
2
2
  export { dependencyFilename };
3
- export const dependenciesTotalSize = 20682574;
3
+ export const dependenciesTotalSize = 20682510;
4
4
  const phpVersionString = '8.0.30';
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
@@ -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() ' +
@@ -24716,13 +24712,13 @@ export function init(RuntimeName, PHPLoader) {
24716
24712
  ___cxa_rethrow_primary_exception;
24717
24713
  Module['___syscall_shutdown'] = ___syscall_shutdown;
24718
24714
  var ASM_CONSTS = {
24719
- 12292625: ($0) => {
24715
+ 12292609: ($0) => {
24720
24716
  if (!$0) {
24721
24717
  AL.alcErr = 40964;
24722
24718
  return 1;
24723
24719
  }
24724
24720
  },
24725
- 12292673: ($0) => {
24721
+ 12292657: ($0) => {
24726
24722
  if (!AL.currentCtx) {
24727
24723
  err('alGetProcAddress() called without a valid context');
24728
24724
  return 1;
Binary file
Binary file
package/jspi/php_8_0.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import dependencyFilename from './8_0_30/php_8_0.wasm';
2
2
  export { dependencyFilename };
3
- export const dependenciesTotalSize = 20235028;
3
+ export const dependenciesTotalSize = 20235025;
4
4
  const phpVersionString = '8.0.30';
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() ' +
@@ -24490,13 +24486,13 @@ export function init(RuntimeName, PHPLoader) {
24490
24486
  Module['_sched_yield'] = _sched_yield;
24491
24487
  Module['___syscall_shutdown'] = ___syscall_shutdown;
24492
24488
  var ASM_CONSTS = {
24493
- 12293186: ($0) => {
24489
+ 12293170: ($0) => {
24494
24490
  if (!$0) {
24495
24491
  AL.alcErr = 40964;
24496
24492
  return 1;
24497
24493
  }
24498
24494
  },
24499
- 12293234: ($0) => {
24495
+ 12293218: ($0) => {
24500
24496
  if (!AL.currentCtx) {
24501
24497
  err('alGetProcAddress() called without a valid context');
24502
24498
  return 1;
@@ -24975,7 +24971,7 @@ export function init(RuntimeName, PHPLoader) {
24975
24971
  wasmExports['__indirect_function_table'];
24976
24972
  ___cpp_exception = wasmExports['__cpp_exception'];
24977
24973
  }
24978
- var ___heap_base = 13573792;
24974
+ var ___heap_base = 13573728;
24979
24975
  var wasmImports = {
24980
24976
  IMG_Init: _IMG_Init,
24981
24977
  IMG_Load: _IMG_Load,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@php-wasm/web-8-0",
3
- "version": "3.0.35",
3
+ "version": "3.0.37",
4
4
  "description": "PHP 8.0 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": {