@php-wasm/node 1.2.3 → 2.0.1

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/jspi/php_8_3.js CHANGED
@@ -6,9 +6,10 @@ const require = createRequire(import.meta.url);
6
6
  // Note: The path module is currently needed by code injected by the php-wasm Dockerfile.
7
7
  import path from 'path';
8
8
 
9
- const dependencyFilename = path.join(__dirname, '8_3_0', 'php_8_3.wasm');
9
+ const dependencyFilename = path.join(__dirname, '8_3_23', 'php_8_3.wasm');
10
10
  export { dependencyFilename };
11
- export const dependenciesTotalSize = 32388978;
11
+ export const dependenciesTotalSize = 32571921;
12
+ const phpVersionString = '8.3.23';
12
13
  export function init(RuntimeName, PHPLoader) {
13
14
  // The rest of the code comes from the built php.js file and esm-suffix.js
14
15
  // include: shell.js
@@ -847,7 +848,7 @@ export function init(RuntimeName, PHPLoader) {
847
848
  },
848
849
  };
849
850
 
850
- var ___heap_base = 14208928;
851
+ var ___heap_base = 15214368;
851
852
 
852
853
  var alignMemory = (size, alignment) => {
853
854
  return Math.ceil(size / alignment) * alignment;
@@ -1011,7 +1012,7 @@ export function init(RuntimeName, PHPLoader) {
1011
1012
 
1012
1013
  /** @type {WebAssembly.Table} */
1013
1014
  var wasmTable = new WebAssembly.Table({
1014
- initial: 15668,
1015
+ initial: 15738,
1015
1016
  element: 'anyfunc',
1016
1017
  });
1017
1018
  var getWasmTableEntry = (funcPtr) => {
@@ -1742,13 +1743,13 @@ export function init(RuntimeName, PHPLoader) {
1742
1743
  1024
1743
1744
  );
1744
1745
 
1745
- var ___stack_high = 14208928;
1746
+ var ___stack_high = 15214368;
1746
1747
 
1747
- var ___stack_low = 14143392;
1748
+ var ___stack_low = 14165792;
1748
1749
 
1749
1750
  var ___stack_pointer = new WebAssembly.Global(
1750
1751
  { value: 'i32', mutable: true },
1751
- 14208928
1752
+ 15214368
1752
1753
  );
1753
1754
 
1754
1755
  var PATH = {
@@ -19331,7 +19332,7 @@ export function init(RuntimeName, PHPLoader) {
19331
19332
 
19332
19333
  var addOnExit = (cb) => onExits.unshift(cb);
19333
19334
 
19334
- var STACK_SIZE = 65536;
19335
+ var STACK_SIZE = 1048576;
19335
19336
 
19336
19337
  var STACK_ALIGN = 16;
19337
19338
 
@@ -31252,13 +31253,13 @@ export function init(RuntimeName, PHPLoader) {
31252
31253
  // End JS library code
31253
31254
 
31254
31255
  var ASM_CONSTS = {
31255
- 13214830: ($0) => {
31256
+ 13232622: ($0) => {
31256
31257
  if (!$0) {
31257
31258
  AL.alcErr = 0xa004;
31258
31259
  return 1;
31259
31260
  }
31260
31261
  },
31261
- 13214878: ($0) => {
31262
+ 13232670: ($0) => {
31262
31263
  if (!AL.currentCtx) {
31263
31264
  err('alGetProcAddress() called without a valid context');
31264
31265
  return 1;
@@ -34099,6 +34100,11 @@ export function init(RuntimeName, PHPLoader) {
34099
34100
  var _calloc = (a0, a1) => (_calloc = wasmExports['calloc'])(a0, a1);
34100
34101
  var _flock = (Module['_flock'] = (a0, a1) =>
34101
34102
  (_flock = Module['_flock'] = wasmExports['flock'])(a0, a1));
34103
+ var _initgroups = (Module['_initgroups'] = (a0, a1) =>
34104
+ (_initgroups = Module['_initgroups'] = wasmExports['initgroups'])(
34105
+ a0,
34106
+ a1
34107
+ ));
34102
34108
  var _wasm_read = (Module['_wasm_read'] = (a0, a1, a2) =>
34103
34109
  (_wasm_read = Module['_wasm_read'] = wasmExports['wasm_read'])(
34104
34110
  a0,
@@ -34424,6 +34430,15 @@ export function init(RuntimeName, PHPLoader) {
34424
34430
  };
34425
34431
  }
34426
34432
 
34433
+ /**
34434
+ * Expose the PHP version so the PHP class can make version-specific
34435
+ * adjustments to `php.ini`.
34436
+ */
34437
+ PHPLoader['phpVersion'] = (() => {
34438
+ const [major, minor, patch] = phpVersionString.split('.').map(Number);
34439
+ return { major, minor, patch };
34440
+ })();
34441
+
34427
34442
  return PHPLoader;
34428
34443
 
34429
34444
  // Close the opening bracket from esm-prefix.js:
package/jspi/php_8_4.js CHANGED
@@ -6,9 +6,10 @@ const require = createRequire(import.meta.url);
6
6
  // Note: The path module is currently needed by code injected by the php-wasm Dockerfile.
7
7
  import path from 'path';
8
8
 
9
- const dependencyFilename = path.join(__dirname, '8_4_0', 'php_8_4.wasm');
9
+ const dependencyFilename = path.join(__dirname, '8_4_10', 'php_8_4.wasm');
10
10
  export { dependencyFilename };
11
- export const dependenciesTotalSize = 36202477;
11
+ export const dependenciesTotalSize = 36372438;
12
+ const phpVersionString = '8.4.10';
12
13
  export function init(RuntimeName, PHPLoader) {
13
14
  // The rest of the code comes from the built php.js file and esm-suffix.js
14
15
  // include: shell.js
@@ -847,7 +848,7 @@ export function init(RuntimeName, PHPLoader) {
847
848
  },
848
849
  };
849
850
 
850
- var ___heap_base = 17317792;
851
+ var ___heap_base = 18314400;
851
852
 
852
853
  var alignMemory = (size, alignment) => {
853
854
  return Math.ceil(size / alignment) * alignment;
@@ -1011,7 +1012,7 @@ export function init(RuntimeName, PHPLoader) {
1011
1012
 
1012
1013
  /** @type {WebAssembly.Table} */
1013
1014
  var wasmTable = new WebAssembly.Table({
1014
- initial: 16487,
1015
+ initial: 16555,
1015
1016
  element: 'anyfunc',
1016
1017
  });
1017
1018
  var getWasmTableEntry = (funcPtr) => {
@@ -1742,13 +1743,13 @@ export function init(RuntimeName, PHPLoader) {
1742
1743
  1024
1743
1744
  );
1744
1745
 
1745
- var ___stack_high = 17317792;
1746
+ var ___stack_high = 18314400;
1746
1747
 
1747
- var ___stack_low = 17252256;
1748
+ var ___stack_low = 17265824;
1748
1749
 
1749
1750
  var ___stack_pointer = new WebAssembly.Global(
1750
1751
  { value: 'i32', mutable: true },
1751
- 17317792
1752
+ 18314400
1752
1753
  );
1753
1754
 
1754
1755
  var PATH = {
@@ -19331,7 +19332,7 @@ export function init(RuntimeName, PHPLoader) {
19331
19332
 
19332
19333
  var addOnExit = (cb) => onExits.unshift(cb);
19333
19334
 
19334
- var STACK_SIZE = 65536;
19335
+ var STACK_SIZE = 1048576;
19335
19336
 
19336
19337
  var STACK_ALIGN = 16;
19337
19338
 
@@ -31252,13 +31253,13 @@ export function init(RuntimeName, PHPLoader) {
31252
31253
  // End JS library code
31253
31254
 
31254
31255
  var ASM_CONSTS = {
31255
- 16319278: ($0) => {
31256
+ 16328094: ($0) => {
31256
31257
  if (!$0) {
31257
31258
  AL.alcErr = 0xa004;
31258
31259
  return 1;
31259
31260
  }
31260
31261
  },
31261
- 16319326: ($0) => {
31262
+ 16328142: ($0) => {
31262
31263
  if (!AL.currentCtx) {
31263
31264
  err('alGetProcAddress() called without a valid context');
31264
31265
  return 1;
@@ -34099,6 +34100,11 @@ export function init(RuntimeName, PHPLoader) {
34099
34100
  (___cxa_throw = wasmExports['__cxa_throw'])(a0, a1, a2);
34100
34101
  var _flock = (Module['_flock'] = (a0, a1) =>
34101
34102
  (_flock = Module['_flock'] = wasmExports['flock'])(a0, a1));
34103
+ var _initgroups = (Module['_initgroups'] = (a0, a1) =>
34104
+ (_initgroups = Module['_initgroups'] = wasmExports['initgroups'])(
34105
+ a0,
34106
+ a1
34107
+ ));
34102
34108
  var _wasm_read = (Module['_wasm_read'] = (a0, a1, a2) =>
34103
34109
  (_wasm_read = Module['_wasm_read'] = wasmExports['wasm_read'])(
34104
34110
  a0,
@@ -34424,6 +34430,15 @@ export function init(RuntimeName, PHPLoader) {
34424
34430
  };
34425
34431
  }
34426
34432
 
34433
+ /**
34434
+ * Expose the PHP version so the PHP class can make version-specific
34435
+ * adjustments to `php.ini`.
34436
+ */
34437
+ PHPLoader['phpVersion'] = (() => {
34438
+ const [major, minor, patch] = phpVersionString.split('.').map(Number);
34439
+ return { major, minor, patch };
34440
+ })();
34441
+
34427
34442
  return PHPLoader;
34428
34443
 
34429
34444
  // Close the opening bracket from esm-prefix.js:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@php-wasm/node",
3
- "version": "1.2.3",
3
+ "version": "2.0.1",
4
4
  "description": "PHP.wasm for Node.js",
5
5
  "repository": {
6
6
  "type": "git",
@@ -38,7 +38,7 @@
38
38
  },
39
39
  "license": "GPL-2.0-or-later",
40
40
  "types": "index.d.ts",
41
- "gitHead": "a6624a5390d899d164f887dc915a0ba1dbc31c83",
41
+ "gitHead": "5ecb8899a1650bef8841585f01d3092fa498a419",
42
42
  "engines": {
43
43
  "node": ">=20.18.3",
44
44
  "npm": ">=10.1.0"
@@ -50,11 +50,11 @@
50
50
  "wasm-feature-detect": "1.8.0",
51
51
  "ws": "8.18.1",
52
52
  "yargs": "17.7.2",
53
- "@php-wasm/node-polyfills": "1.2.3",
54
- "@php-wasm/universal": "1.2.3",
55
- "@php-wasm/logger": "1.2.3",
56
- "@php-wasm/util": "1.2.3",
57
- "@wp-playground/common": "1.2.3"
53
+ "@php-wasm/node-polyfills": "2.0.1",
54
+ "@php-wasm/universal": "2.0.1",
55
+ "@php-wasm/logger": "2.0.1",
56
+ "@php-wasm/util": "2.0.1",
57
+ "@wp-playground/common": "2.0.1"
58
58
  },
59
59
  "overrides": {
60
60
  "rollup": "^4.34.6",