File tree Expand file tree Collapse file tree 18 files changed +136
-34
lines changed Expand file tree Collapse file tree 18 files changed +136
-34
lines changed Original file line number Diff line number Diff line change @@ -1205,7 +1205,7 @@ RUN set -euxo pipefail; \
1205
1205
# Manually turn the output into a esm module instead of relying on -s MODULARIZE=1.
1206
1206
# which pollutes the global namespace and does not play well with import() mechanics.
1207
1207
if [ "$EMSCRIPTEN_ENVIRONMENT" = "node" ]; then \
1208
- echo "const dependencyFilename = __dirname + '/ ${PHP_VERSION_ESCAPED}/ $WASM_FILENAME'; " >> /root/output/php-module.js; \
1208
+ echo "const dependencyFilename = path.join( __dirname, ' ${PHP_VERSION_ESCAPED}', ' $WASM_FILENAME'); " >> /root/output/php-module.js; \
1209
1209
else \
1210
1210
echo "import dependencyFilename from './${PHP_VERSION_ESCAPED}/$WASM_FILENAME'; " >> /root/output/php-module.js; \
1211
1211
fi; \
Original file line number Diff line number Diff line change 3
3
// this code in Node.js as an ES module.
4
4
import { createRequire } from 'module' ;
5
5
const require = createRequire ( import . meta. url ) ;
6
- const __dirname = new URL ( '.' , import . meta. url ) . pathname ;
6
+ import { fileURLToPath } from 'url' ;
7
+ import { dirname } from 'path' ;
8
+
9
+ const __filename = fileURLToPath ( import . meta. url ) ;
10
+ const __dirname = dirname ( __filename ) ;
11
+
12
+ import path from 'path' ;
Original file line number Diff line number Diff line change 3
3
// this code in Node.js as an ES module.
4
4
import { createRequire } from 'module' ;
5
5
const require = createRequire ( import . meta. url ) ;
6
- const __dirname = new URL ( '.' , import . meta. url ) . pathname ;
7
- const dependencyFilename = __dirname + '/7_2_34/php_7_2.wasm' ;
6
+ import { fileURLToPath } from 'url' ;
7
+ import { dirname } from 'path' ;
8
+
9
+ const __filename = fileURLToPath ( import . meta. url ) ;
10
+ const __dirname = dirname ( __filename ) ;
11
+
12
+ import path from 'path' ;
13
+ const dependencyFilename = path . join ( __dirname , '7_2_34' , 'php_7_2.wasm' ) ;
8
14
export { dependencyFilename } ;
9
15
export const dependenciesTotalSize = 15174064 ;
10
16
export function init ( RuntimeName , PHPLoader ) {
Original file line number Diff line number Diff line change 3
3
// this code in Node.js as an ES module.
4
4
import { createRequire } from 'module' ;
5
5
const require = createRequire ( import . meta. url ) ;
6
- const __dirname = new URL ( '.' , import . meta. url ) . pathname ;
7
- const dependencyFilename = __dirname + '/7_3_33/php_7_3.wasm' ;
6
+ import { fileURLToPath } from 'url' ;
7
+ import { dirname } from 'path' ;
8
+
9
+ const __filename = fileURLToPath ( import . meta. url ) ;
10
+ const __dirname = dirname ( __filename ) ;
11
+
12
+ import path from 'path' ;
13
+ const dependencyFilename = path . join ( __dirname , '7_3_33' , 'php_7_3.wasm' ) ;
8
14
export { dependencyFilename } ;
9
15
export const dependenciesTotalSize = 15264356 ;
10
16
export function init ( RuntimeName , PHPLoader ) {
Original file line number Diff line number Diff line change 3
3
// this code in Node.js as an ES module.
4
4
import { createRequire } from 'module' ;
5
5
const require = createRequire ( import . meta. url ) ;
6
- const __dirname = new URL ( '.' , import . meta. url ) . pathname ;
7
- const dependencyFilename = __dirname + '/7_4_33/php_7_4.wasm' ;
6
+ import { fileURLToPath } from 'url' ;
7
+ import { dirname } from 'path' ;
8
+
9
+ const __filename = fileURLToPath ( import . meta. url ) ;
10
+ const __dirname = dirname ( __filename ) ;
11
+
12
+ import path from 'path' ;
13
+ const dependencyFilename = path . join ( __dirname , '7_4_33' , 'php_7_4.wasm' ) ;
8
14
export { dependencyFilename } ;
9
15
export const dependenciesTotalSize = 15767571 ;
10
16
export function init ( RuntimeName , PHPLoader ) {
Original file line number Diff line number Diff line change 3
3
// this code in Node.js as an ES module.
4
4
import { createRequire } from 'module' ;
5
5
const require = createRequire ( import . meta. url ) ;
6
- const __dirname = new URL ( '.' , import . meta. url ) . pathname ;
7
- const dependencyFilename = __dirname + '/8_0_30/php_8_0.wasm' ;
6
+ import { fileURLToPath } from 'url' ;
7
+ import { dirname } from 'path' ;
8
+
9
+ const __filename = fileURLToPath ( import . meta. url ) ;
10
+ const __dirname = dirname ( __filename ) ;
11
+
12
+ import path from 'path' ;
13
+ const dependencyFilename = path . join ( __dirname , '8_0_30' , 'php_8_0.wasm' ) ;
8
14
export { dependencyFilename } ;
9
15
export const dependenciesTotalSize = 14885873 ;
10
16
export function init ( RuntimeName , PHPLoader ) {
Original file line number Diff line number Diff line change 3
3
// this code in Node.js as an ES module.
4
4
import { createRequire } from 'module' ;
5
5
const require = createRequire ( import . meta. url ) ;
6
- const __dirname = new URL ( '.' , import . meta. url ) . pathname ;
7
- const dependencyFilename = __dirname + '/8_1_23/php_8_1.wasm' ;
6
+ import { fileURLToPath } from 'url' ;
7
+ import { dirname } from 'path' ;
8
+
9
+ const __filename = fileURLToPath ( import . meta. url ) ;
10
+ const __dirname = dirname ( __filename ) ;
11
+
12
+ import path from 'path' ;
13
+ const dependencyFilename = path . join ( __dirname , '8_1_23' , 'php_8_1.wasm' ) ;
8
14
export { dependencyFilename } ;
9
15
export const dependenciesTotalSize = 14866086 ;
10
16
export function init ( RuntimeName , PHPLoader ) {
Original file line number Diff line number Diff line change 3
3
// this code in Node.js as an ES module.
4
4
import { createRequire } from 'module' ;
5
5
const require = createRequire ( import . meta. url ) ;
6
- const __dirname = new URL ( '.' , import . meta. url ) . pathname ;
7
- const dependencyFilename = __dirname + '/8_2_10/php_8_2.wasm' ;
6
+ import { fileURLToPath } from 'url' ;
7
+ import { dirname } from 'path' ;
8
+
9
+ const __filename = fileURLToPath ( import . meta. url ) ;
10
+ const __dirname = dirname ( __filename ) ;
11
+
12
+ import path from 'path' ;
13
+ const dependencyFilename = path . join ( __dirname , '8_2_10' , 'php_8_2.wasm' ) ;
8
14
export { dependencyFilename } ;
9
15
export const dependenciesTotalSize = 15123547 ;
10
16
export function init ( RuntimeName , PHPLoader ) {
Original file line number Diff line number Diff line change 3
3
// this code in Node.js as an ES module.
4
4
import { createRequire } from 'module';
5
5
const require = createRequire(import.meta.url);
6
- const __dirname = new URL ( '.' , import . meta. url ) . pathname ;
7
- const dependencyFilename = __dirname + '/8_3_0/php_8_3.wasm' ;
6
+ import { fileURLToPath } from 'url';
7
+ import { dirname } from 'path';
8
+
9
+ const __filename = fileURLToPath(import.meta.url);
10
+ const __dirname = dirname(__filename);
11
+
12
+ import path from 'path';
13
+ const dependencyFilename = path.join(__dirname, '8_3_0', 'php_8_3.wasm');
8
14
export { dependencyFilename };
9
15
export const dependenciesTotalSize = 15504351;
10
16
export function init(RuntimeName, PHPLoader) {
Original file line number Diff line number Diff line change 3
3
// this code in Node.js as an ES module.
4
4
import { createRequire } from 'module';
5
5
const require = createRequire(import.meta.url);
6
- const __dirname = new URL('.', import.meta.url).pathname;
7
- const dependencyFilename = __dirname + '/8_4_0/php_8_4.wasm';
6
+ import { fileURLToPath } from 'url';
7
+ import { dirname } from 'path';
8
+
9
+ const __filename = fileURLToPath(import.meta.url);
10
+ const __dirname = dirname(__filename);
11
+
12
+ import path from 'path';
13
+ const dependencyFilename = path.join(__dirname, '8_4_0', 'php_8_4.wasm');
8
14
export { dependencyFilename };
9
15
export const dependenciesTotalSize = 18827718;
10
16
export function init(RuntimeName, PHPLoader) {
Original file line number Diff line number Diff line change 3
3
// this code in Node.js as an ES module.
4
4
import { createRequire } from 'module';
5
5
const require = createRequire(import.meta.url);
6
- const __dirname = new URL('.', import.meta.url).pathname;
7
- const dependencyFilename = __dirname + '/7_2_34/php_7_2.wasm';
6
+ import { fileURLToPath } from 'url';
7
+ import { dirname } from 'path';
8
+
9
+ const __filename = fileURLToPath(import.meta.url);
10
+ const __dirname = dirname(__filename);
11
+
12
+ import path from 'path';
13
+ const dependencyFilename = path.join(__dirname, '7_2_34', 'php_7_2.wasm');
8
14
export { dependencyFilename };
9
15
export const dependenciesTotalSize = 14902784;
10
16
export function init(RuntimeName, PHPLoader) {
Original file line number Diff line number Diff line change 3
3
// this code in Node.js as an ES module.
4
4
import { createRequire } from 'module';
5
5
const require = createRequire(import.meta.url);
6
- const __dirname = new URL('.', import.meta.url).pathname;
7
- const dependencyFilename = __dirname + '/7_3_33/php_7_3.wasm';
6
+ import { fileURLToPath } from 'url';
7
+ import { dirname } from 'path';
8
+
9
+ const __filename = fileURLToPath(import.meta.url);
10
+ const __dirname = dirname(__filename);
11
+
12
+ import path from 'path';
13
+ const dependencyFilename = path.join(__dirname, '7_3_33', 'php_7_3.wasm');
8
14
export { dependencyFilename };
9
15
export const dependenciesTotalSize = 14999493;
10
16
export function init(RuntimeName, PHPLoader) {
Original file line number Diff line number Diff line change 3
3
// this code in Node.js as an ES module.
4
4
import { createRequire } from 'module';
5
5
const require = createRequire(import.meta.url);
6
- const __dirname = new URL('.', import.meta.url).pathname;
7
- const dependencyFilename = __dirname + '/7_4_33/php_7_4.wasm';
6
+ import { fileURLToPath } from 'url';
7
+ import { dirname } from 'path';
8
+
9
+ const __filename = fileURLToPath(import.meta.url);
10
+ const __dirname = dirname(__filename);
11
+
12
+ import path from 'path';
13
+ const dependencyFilename = path.join(__dirname, '7_4_33', 'php_7_4.wasm');
8
14
export { dependencyFilename };
9
15
export const dependenciesTotalSize = 15481719;
10
16
export function init(RuntimeName, PHPLoader) {
Original file line number Diff line number Diff line change 3
3
// this code in Node.js as an ES module.
4
4
import { createRequire } from 'module';
5
5
const require = createRequire(import.meta.url);
6
- const __dirname = new URL('.', import.meta.url).pathname;
7
- const dependencyFilename = __dirname + '/8_0_30/php_8_0.wasm';
6
+ import { fileURLToPath } from 'url';
7
+ import { dirname } from 'path';
8
+
9
+ const __filename = fileURLToPath(import.meta.url);
10
+ const __dirname = dirname(__filename);
11
+
12
+ import path from 'path';
13
+ const dependencyFilename = path.join(__dirname, '8_0_30', 'php_8_0.wasm');
8
14
export { dependencyFilename };
9
15
export const dependenciesTotalSize = 14670932;
10
16
export function init(RuntimeName, PHPLoader) {
Original file line number Diff line number Diff line change 3
3
// this code in Node.js as an ES module.
4
4
import { createRequire } from 'module';
5
5
const require = createRequire(import.meta.url);
6
- const __dirname = new URL('.', import.meta.url).pathname;
7
- const dependencyFilename = __dirname + '/8_1_23/php_8_1.wasm';
6
+ import { fileURLToPath } from 'url';
7
+ import { dirname } from 'path';
8
+
9
+ const __filename = fileURLToPath(import.meta.url);
10
+ const __dirname = dirname(__filename);
11
+
12
+ import path from 'path';
13
+ const dependencyFilename = path.join(__dirname, '8_1_23', 'php_8_1.wasm');
8
14
export { dependencyFilename };
9
15
export const dependenciesTotalSize = 14677997;
10
16
export function init(RuntimeName, PHPLoader) {
Original file line number Diff line number Diff line change 3
3
// this code in Node.js as an ES module.
4
4
import { createRequire } from 'module';
5
5
const require = createRequire(import.meta.url);
6
- const __dirname = new URL('.', import.meta.url).pathname;
7
- const dependencyFilename = __dirname + '/8_2_10/php_8_2.wasm';
6
+ import { fileURLToPath } from 'url';
7
+ import { dirname } from 'path';
8
+
9
+ const __filename = fileURLToPath(import.meta.url);
10
+ const __dirname = dirname(__filename);
11
+
12
+ import path from 'path';
13
+ const dependencyFilename = path.join(__dirname, '8_2_10', 'php_8_2.wasm');
8
14
export { dependencyFilename };
9
15
export const dependenciesTotalSize = 14936153;
10
16
export function init(RuntimeName, PHPLoader) {
Original file line number Diff line number Diff line change 3
3
// this code in Node.js as an ES module.
4
4
import { createRequire } from 'module';
5
5
const require = createRequire(import.meta.url);
6
- const __dirname = new URL('.', import.meta.url).pathname;
7
- const dependencyFilename = __dirname + '/8_3_0/php_8_3.wasm';
6
+ import { fileURLToPath } from 'url';
7
+ import { dirname } from 'path';
8
+
9
+ const __filename = fileURLToPath(import.meta.url);
10
+ const __dirname = dirname(__filename);
11
+
12
+ import path from 'path';
13
+ const dependencyFilename = path.join(__dirname, '8_3_0', 'php_8_3.wasm');
8
14
export { dependencyFilename };
9
15
export const dependenciesTotalSize = 15318281;
10
16
export function init(RuntimeName, PHPLoader) {
Original file line number Diff line number Diff line change 3
3
// this code in Node.js as an ES module.
4
4
import { createRequire } from 'module';
5
5
const require = createRequire(import.meta.url);
6
- const __dirname = new URL('.', import.meta.url).pathname;
7
- const dependencyFilename = __dirname + '/8_4_0/php_8_4.wasm';
6
+ import { fileURLToPath } from 'url';
7
+ import { dirname } from 'path';
8
+
9
+ const __filename = fileURLToPath(import.meta.url);
10
+ const __dirname = dirname(__filename);
11
+
12
+ import path from 'path';
13
+ const dependencyFilename = path.join(__dirname, '8_4_0', 'php_8_4.wasm');
8
14
export { dependencyFilename };
9
15
export const dependenciesTotalSize = 18644334;
10
16
export function init(RuntimeName, PHPLoader) {
You can’t perform that action at this time.
0 commit comments