From 042f9250946763787e41cb70bbff606c2c8280fa Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Thu, 23 Mar 2023 09:46:06 +0100 Subject: [PATCH] fix(simulator): fix CF build deployement MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- package.json | 2 +- pnpm-lock.yaml | 8 ++++---- skip-preinstall.cjs | 3 ++- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 6c794f56..10344b1e 100644 --- a/package.json +++ b/package.json @@ -52,7 +52,7 @@ "start:heapprofiler": "cross-env NODE_ENV=production clinic heapprofiler -- node -r source-map-support/register dist/start.mjs", "rollup": "pnpm run build-requirements && rollup --config", "build": "pnpm run rollup", - "build:cf": "rimraf node_modules && npx cross-env SKIP_PREINSTALL=1 npm install && npm run rollup", + "build:cf": "npx rimraf node_modules && npx cross-env SKIP_PREINSTALL=1 npm install && pnpm run rollup", "build:dev": "pnpm run rollup -- --environment BUILD:development", "build:dev:watch": "pnpm run rollup -- --environment BUILD:development --watch", "lint": "cross-env TIMING=1 eslint --cache --ext .js,.cjs,.mjs,.ts src", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e5f506f6..6fe783bb 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -551,8 +551,8 @@ packages: eslint-visitor-keys: 3.3.0 dev: true - /@eslint-community/regexpp/4.4.0: - resolution: {integrity: sha512-A9983Q0LnDGdLPjxyXQ00sbV+K+O+ko2Dr+CZigbHWtX9pNfxlaBkMR8X1CztI73zuEyEBXTVjx7CE+/VSwDiQ==} + /@eslint-community/regexpp/4.4.1: + resolution: {integrity: sha512-BISJ6ZE4xQsuL/FmsyRaiffpq977bMlsKfGHTQrOGFErfByxIe6iZTxPf/00Zon9b9a7iUykfQwejN3s2ZW/Bw==} engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} dev: true @@ -1504,7 +1504,7 @@ packages: typescript: optional: true dependencies: - '@eslint-community/regexpp': 4.4.0 + '@eslint-community/regexpp': 4.4.1 '@typescript-eslint/parser': 5.56.0_j4766f7ecgqbon3u7zlxn5zszu '@typescript-eslint/scope-manager': 5.56.0 '@typescript-eslint/type-utils': 5.56.0_j4766f7ecgqbon3u7zlxn5zszu @@ -4096,7 +4096,7 @@ packages: hasBin: true dependencies: '@eslint-community/eslint-utils': 4.3.0_eslint@8.36.0 - '@eslint-community/regexpp': 4.4.0 + '@eslint-community/regexpp': 4.4.1 '@eslint/eslintrc': 2.0.1 '@eslint/js': 8.36.0 '@humanwhocodes/config-array': 0.11.8 diff --git a/skip-preinstall.cjs b/skip-preinstall.cjs index 3d17131c..fffc7d87 100644 --- a/skip-preinstall.cjs +++ b/skip-preinstall.cjs @@ -1,4 +1,5 @@ -if (process.env.SKIP_PREINSTALL) { +const isCFEnvironment = process.env.VCAP_APPLICATION !== undefined; +if (process.env.SKIP_PREINSTALL || isCFEnvironment) { // eslint-disable-next-line n/no-process-exit process.exit(0); } else { -- 2.34.1