@live-codes/browser-compilers 0.7.6 → 0.9.0

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": "@live-codes/browser-compilers",
3
- "version": "0.7.6",
3
+ "version": "0.9.0",
4
4
  "description": "Compilers that run in the browser, for use in livecodes.io",
5
5
  "author": "Hatem Hosny",
6
6
  "license": "MIT",
@@ -63,6 +63,7 @@
63
63
  "less": "4.1.3",
64
64
  "lightningcss-wasm": "1.21.0",
65
65
  "patch-package": "6.4.7",
66
+ "php-wasm": "0.0.7",
66
67
  "postcss": "8.4.24",
67
68
  "postcss-modules": "6.0.0",
68
69
  "postcss-preset-env": "8.4.2",
@@ -308,7 +308,7 @@ fs.copyFileSync(
308
308
  .then(() => {
309
309
  if (mod !== 'jest-dom.js') return;
310
310
  patch('dist/@testing-library/jest-dom.js', {
311
- 'expect.extend': 'window.jestLite?.core.expect.extend',
311
+ 'expect.extend': 'window.browserJest?.expect.extend',
312
312
  });
313
313
  });
314
314
  },
@@ -477,3 +477,18 @@ esbuild.build({
477
477
  outfile: 'dist/vue-compiler-sfc/vue-compiler-sfc.js',
478
478
  globalName: 'VueCompilerSFC',
479
479
  });
480
+
481
+ // php-wasm
482
+ esbuild
483
+ .build({
484
+ ...baseOptions,
485
+ entryPoints: ['vendor_modules/imports/php-wasm.js'],
486
+ outfile: 'dist/php-wasm/php-wasm.js',
487
+ globalName: 'phpWasm',
488
+ })
489
+ .then(() => {
490
+ fs.copyFileSync(
491
+ path.resolve('node_modules/php-wasm/php-web.wasm'),
492
+ path.resolve(targetDir + '/php-wasm/php-web.wasm'),
493
+ );
494
+ });
@@ -0,0 +1,2 @@
1
+ import { PhpWeb as PHP } from 'php-wasm/PhpWeb';
2
+ export { PHP };