@vercel/remix-builder 5.5.1 → 5.5.2
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/dist/index.js +34 -18
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -2984,11 +2984,15 @@ var build = async ({
|
|
|
2984
2984
|
packageJsonPackageManager,
|
|
2985
2985
|
turboSupportsCorepackHome
|
|
2986
2986
|
} = await (0, import_build_utils3.scanParentDirs)(entrypointFsDirname, true);
|
|
2987
|
-
const
|
|
2987
|
+
const spawnOpts = (0, import_build_utils3.getSpawnOptions)(meta, nodeVersion);
|
|
2988
|
+
if (!spawnOpts.env) {
|
|
2989
|
+
spawnOpts.env = {};
|
|
2990
|
+
}
|
|
2991
|
+
spawnOpts.env = (0, import_build_utils3.getEnvForPackageManager)({
|
|
2988
2992
|
cliType,
|
|
2989
2993
|
lockfileVersion,
|
|
2990
2994
|
packageJsonPackageManager,
|
|
2991
|
-
env:
|
|
2995
|
+
env: spawnOpts.env,
|
|
2992
2996
|
turboSupportsCorepackHome,
|
|
2993
2997
|
projectCreatedAt: config.projectSettings?.createdAt
|
|
2994
2998
|
});
|
|
@@ -2996,7 +3000,7 @@ var build = async ({
|
|
|
2996
3000
|
if (installCommand.trim()) {
|
|
2997
3001
|
console.log(`Running "install" command: \`${installCommand}\`...`);
|
|
2998
3002
|
await (0, import_build_utils3.execCommand)(installCommand, {
|
|
2999
|
-
|
|
3003
|
+
...spawnOpts,
|
|
3000
3004
|
cwd: entrypointFsDirname
|
|
3001
3005
|
});
|
|
3002
3006
|
} else {
|
|
@@ -3006,7 +3010,7 @@ var build = async ({
|
|
|
3006
3010
|
await (0, import_build_utils3.runNpmInstall)(
|
|
3007
3011
|
entrypointFsDirname,
|
|
3008
3012
|
[],
|
|
3009
|
-
|
|
3013
|
+
spawnOpts,
|
|
3010
3014
|
meta,
|
|
3011
3015
|
config.projectSettings?.createdAt
|
|
3012
3016
|
);
|
|
@@ -3019,7 +3023,7 @@ var build = async ({
|
|
|
3019
3023
|
if (buildCommand) {
|
|
3020
3024
|
(0, import_build_utils3.debug)(`Executing build command "${buildCommand}"`);
|
|
3021
3025
|
await (0, import_build_utils3.execCommand)(buildCommand, {
|
|
3022
|
-
|
|
3026
|
+
...spawnOpts,
|
|
3023
3027
|
cwd: entrypointFsDirname
|
|
3024
3028
|
});
|
|
3025
3029
|
} else {
|
|
@@ -3028,7 +3032,7 @@ var build = async ({
|
|
|
3028
3032
|
await (0, import_build_utils3.runPackageJsonScript)(
|
|
3029
3033
|
entrypointFsDirname,
|
|
3030
3034
|
"vercel-build",
|
|
3031
|
-
|
|
3035
|
+
spawnOpts,
|
|
3032
3036
|
config.projectSettings?.createdAt
|
|
3033
3037
|
);
|
|
3034
3038
|
} else if (hasScript("build", packageJson)) {
|
|
@@ -3036,12 +3040,12 @@ var build = async ({
|
|
|
3036
3040
|
await (0, import_build_utils3.runPackageJsonScript)(
|
|
3037
3041
|
entrypointFsDirname,
|
|
3038
3042
|
"build",
|
|
3039
|
-
|
|
3043
|
+
spawnOpts,
|
|
3040
3044
|
config.projectSettings?.createdAt
|
|
3041
3045
|
);
|
|
3042
3046
|
} else {
|
|
3043
3047
|
await (0, import_build_utils3.execCommand)(frameworkSettings.buildCommand, {
|
|
3044
|
-
|
|
3048
|
+
...spawnOpts,
|
|
3045
3049
|
cwd: entrypointFsDirname
|
|
3046
3050
|
});
|
|
3047
3051
|
}
|
|
@@ -3461,11 +3465,15 @@ var build2 = async ({
|
|
|
3461
3465
|
import_fs3.promises.readFile(packageJsonPath, "utf8")
|
|
3462
3466
|
]);
|
|
3463
3467
|
const pkg = JSON.parse(pkgRaw);
|
|
3464
|
-
const
|
|
3468
|
+
const spawnOpts = (0, import_build_utils4.getSpawnOptions)(meta, nodeVersion);
|
|
3469
|
+
if (!spawnOpts.env) {
|
|
3470
|
+
spawnOpts.env = {};
|
|
3471
|
+
}
|
|
3472
|
+
spawnOpts.env = (0, import_build_utils4.getEnvForPackageManager)({
|
|
3465
3473
|
cliType,
|
|
3466
3474
|
lockfileVersion,
|
|
3467
3475
|
packageJsonPackageManager,
|
|
3468
|
-
env:
|
|
3476
|
+
env: spawnOpts.env,
|
|
3469
3477
|
turboSupportsCorepackHome,
|
|
3470
3478
|
projectCreatedAt: config.projectSettings?.createdAt
|
|
3471
3479
|
});
|
|
@@ -3473,7 +3481,7 @@ var build2 = async ({
|
|
|
3473
3481
|
if (installCommand.trim()) {
|
|
3474
3482
|
console.log(`Running "install" command: \`${installCommand}\`...`);
|
|
3475
3483
|
await (0, import_build_utils4.execCommand)(installCommand, {
|
|
3476
|
-
|
|
3484
|
+
...spawnOpts,
|
|
3477
3485
|
cwd: entrypointFsDirname
|
|
3478
3486
|
});
|
|
3479
3487
|
} else {
|
|
@@ -3483,7 +3491,7 @@ var build2 = async ({
|
|
|
3483
3491
|
await (0, import_build_utils4.runNpmInstall)(
|
|
3484
3492
|
entrypointFsDirname,
|
|
3485
3493
|
[],
|
|
3486
|
-
|
|
3494
|
+
spawnOpts,
|
|
3487
3495
|
meta,
|
|
3488
3496
|
config.projectSettings?.createdAt
|
|
3489
3497
|
);
|
|
@@ -3596,7 +3604,7 @@ var build2 = async ({
|
|
|
3596
3604
|
}
|
|
3597
3605
|
if (depsModified) {
|
|
3598
3606
|
await import_fs3.promises.writeFile(packageJsonPath, JSON.stringify(pkg, null, 2) + "\n");
|
|
3599
|
-
const nonCiEnv = { ...
|
|
3607
|
+
const nonCiEnv = { ...spawnOpts.env };
|
|
3600
3608
|
delete nonCiEnv.CI;
|
|
3601
3609
|
delete nonCiEnv.VERCEL;
|
|
3602
3610
|
delete nonCiEnv.NOW_BUILDER;
|
|
@@ -3604,6 +3612,7 @@ var build2 = async ({
|
|
|
3604
3612
|
entrypointFsDirname,
|
|
3605
3613
|
[],
|
|
3606
3614
|
{
|
|
3615
|
+
...spawnOpts,
|
|
3607
3616
|
env: nonCiEnv
|
|
3608
3617
|
},
|
|
3609
3618
|
void 0,
|
|
@@ -3677,11 +3686,11 @@ module.exports = config;`;
|
|
|
3677
3686
|
console.log('WARN: No "server" field found in Remix config');
|
|
3678
3687
|
}
|
|
3679
3688
|
}
|
|
3680
|
-
|
|
3689
|
+
spawnOpts.env.NODE_ENV = "production";
|
|
3681
3690
|
if (buildCommand) {
|
|
3682
3691
|
(0, import_build_utils4.debug)(`Executing build command "${buildCommand}"`);
|
|
3683
3692
|
await (0, import_build_utils4.execCommand)(buildCommand, {
|
|
3684
|
-
|
|
3693
|
+
...spawnOpts,
|
|
3685
3694
|
cwd: entrypointFsDirname
|
|
3686
3695
|
});
|
|
3687
3696
|
} else {
|
|
@@ -3690,7 +3699,7 @@ module.exports = config;`;
|
|
|
3690
3699
|
await (0, import_build_utils4.runPackageJsonScript)(
|
|
3691
3700
|
entrypointFsDirname,
|
|
3692
3701
|
"vercel-build",
|
|
3693
|
-
|
|
3702
|
+
spawnOpts,
|
|
3694
3703
|
config.projectSettings?.createdAt
|
|
3695
3704
|
);
|
|
3696
3705
|
} else if (hasScript2("build", pkg)) {
|
|
@@ -3698,12 +3707,12 @@ module.exports = config;`;
|
|
|
3698
3707
|
await (0, import_build_utils4.runPackageJsonScript)(
|
|
3699
3708
|
entrypointFsDirname,
|
|
3700
3709
|
"build",
|
|
3701
|
-
|
|
3710
|
+
spawnOpts,
|
|
3702
3711
|
config.projectSettings?.createdAt
|
|
3703
3712
|
);
|
|
3704
3713
|
} else {
|
|
3705
3714
|
await (0, import_build_utils4.execCommand)("remix build", {
|
|
3706
|
-
|
|
3715
|
+
...spawnOpts,
|
|
3707
3716
|
cwd: entrypointFsDirname
|
|
3708
3717
|
});
|
|
3709
3718
|
}
|
|
@@ -4011,10 +4020,17 @@ var prepareCache = async ({
|
|
|
4011
4020
|
const entrypointFsDirname = (0, import_path5.join)(workPath, mountpoint);
|
|
4012
4021
|
let cacheDirFiles;
|
|
4013
4022
|
if (!isVite(workPath)) {
|
|
4023
|
+
const nodeVersion = await (0, import_build_utils5.getNodeVersion)(
|
|
4024
|
+
entrypointFsDirname,
|
|
4025
|
+
void 0,
|
|
4026
|
+
config
|
|
4027
|
+
);
|
|
4028
|
+
const spawnOpts = (0, import_build_utils5.getSpawnOptions)({}, nodeVersion);
|
|
4014
4029
|
await (0, import_build_utils5.runNpmInstall)(
|
|
4015
4030
|
entrypointFsDirname,
|
|
4016
4031
|
[],
|
|
4017
4032
|
{
|
|
4033
|
+
...spawnOpts,
|
|
4018
4034
|
stdio: "ignore"
|
|
4019
4035
|
},
|
|
4020
4036
|
void 0,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vercel/remix-builder",
|
|
3
|
-
"version": "5.5.
|
|
3
|
+
"version": "5.5.2",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"homepage": "https://vercel.com/docs",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"@types/jest": "27.5.1",
|
|
27
27
|
"@types/node": "14.18.33",
|
|
28
28
|
"@types/semver": "7.3.13",
|
|
29
|
-
"@vercel/build-utils": "13.0.
|
|
29
|
+
"@vercel/build-utils": "13.0.1",
|
|
30
30
|
"glob": "10.3.16",
|
|
31
31
|
"jest-junit": "16.0.0",
|
|
32
32
|
"semver": "7.5.2",
|