@php-wasm/web-8-1 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.
@@ -1,7 +1,7 @@
1
- import dependencyFilename from './8_1_33/php_8_1.wasm';
1
+ import dependencyFilename from './8_1_34/php_8_1.wasm';
2
2
  export { dependencyFilename };
3
- export const dependenciesTotalSize = 24491461;
4
- const phpVersionString = '8.1.33';
3
+ export const dependenciesTotalSize = 24491713;
4
+ const phpVersionString = '8.1.34';
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
7
7
  var Module = typeof PHPLoader != 'undefined' ? PHPLoader : {};
@@ -13290,12 +13290,15 @@ export function init(RuntimeName, PHPLoader) {
13290
13290
  noop: function () {},
13291
13291
  spawnProcess: function (command, args, options) {
13292
13292
  if (Module['spawnProcess']) {
13293
- const spawnedPromise = Module['spawnProcess'](
13294
- command,
13295
- args,
13296
- options
13297
- );
13298
- return Promise.resolve(spawnedPromise).then(function (spawned) {
13293
+ const spawned = Module['spawnProcess'](command, args, {
13294
+ ...options,
13295
+ shell: true,
13296
+ stdio: ['pipe', 'pipe', 'pipe'],
13297
+ });
13298
+ if (spawned && !('then' in spawned) && 'on' in spawned) {
13299
+ return spawned;
13300
+ }
13301
+ return Promise.resolve(spawned).then(function (spawned) {
13299
13302
  if (!spawned || !spawned.on) {
13300
13303
  throw new Error(
13301
13304
  'spawnProcess() must return an EventEmitter but returned a different type.'
@@ -13304,13 +13307,6 @@ export function init(RuntimeName, PHPLoader) {
13304
13307
  return spawned;
13305
13308
  });
13306
13309
  }
13307
- if (ENVIRONMENT_IS_NODE) {
13308
- return require('child_process').spawn(command, args, {
13309
- ...options,
13310
- shell: true,
13311
- stdio: ['pipe', 'pipe', 'pipe'],
13312
- });
13313
- }
13314
13310
  const e = new Error(
13315
13311
  'popen(), proc_open() etc. are unsupported on this PHP instance. Call php.setSpawnHandler() ' +
13316
13312
  'and provide a callback to handle spawning processes, or disable a popen(), proc_open() ' +
Binary file
package/jspi/php_8_1.js CHANGED
@@ -1,7 +1,7 @@
1
- import dependencyFilename from './8_1_33/php_8_1.wasm';
1
+ import dependencyFilename from './8_1_34/php_8_1.wasm';
2
2
  export { dependencyFilename };
3
- export const dependenciesTotalSize = 23991108;
4
- const phpVersionString = '8.1.33';
3
+ export const dependenciesTotalSize = 23991445;
4
+ const phpVersionString = '8.1.34';
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
7
7
  var Module = typeof PHPLoader != 'undefined' ? PHPLoader : {};
@@ -13166,12 +13166,15 @@ export function init(RuntimeName, PHPLoader) {
13166
13166
  noop: function () {},
13167
13167
  spawnProcess: function (command, args, options) {
13168
13168
  if (Module['spawnProcess']) {
13169
- const spawnedPromise = Module['spawnProcess'](
13170
- command,
13171
- args,
13172
- options
13173
- );
13174
- return Promise.resolve(spawnedPromise).then(function (spawned) {
13169
+ const spawned = Module['spawnProcess'](command, args, {
13170
+ ...options,
13171
+ shell: true,
13172
+ stdio: ['pipe', 'pipe', 'pipe'],
13173
+ });
13174
+ if (spawned && !('then' in spawned) && 'on' in spawned) {
13175
+ return spawned;
13176
+ }
13177
+ return Promise.resolve(spawned).then(function (spawned) {
13175
13178
  if (!spawned || !spawned.on) {
13176
13179
  throw new Error(
13177
13180
  'spawnProcess() must return an EventEmitter but returned a different type.'
@@ -13180,13 +13183,6 @@ export function init(RuntimeName, PHPLoader) {
13180
13183
  return spawned;
13181
13184
  });
13182
13185
  }
13183
- if (ENVIRONMENT_IS_NODE) {
13184
- return require('child_process').spawn(command, args, {
13185
- ...options,
13186
- shell: true,
13187
- stdio: ['pipe', 'pipe', 'pipe'],
13188
- });
13189
- }
13190
13186
  const e = new Error(
13191
13187
  'popen(), proc_open() etc. are unsupported on this PHP instance. Call php.setSpawnHandler() ' +
13192
13188
  '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-8-1",
3
- "version": "3.0.35",
3
+ "version": "3.0.37",
4
4
  "description": "PHP 8.1 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": {