From 76c025f04c6d44a24cf96e42b8a6ae32ec0f0fee Mon Sep 17 00:00:00 2001 From: Jari Kolehmainen Date: Wed, 1 Feb 2023 17:13:13 +0200 Subject: [PATCH] Fix ensure-binaries bin (#7078) * fix ensure-binaries bin Signed-off-by: Jari Kolehmainen * fix dist file extension Signed-off-by: Jari Kolehmainen * use type: module Signed-off-by: Jari Kolehmainen * fix lerna/yarn timeouts on windows Signed-off-by: Jari Kolehmainen * increase install dependency retry timeout Signed-off-by: Jari Kolehmainen --------- Signed-off-by: Jari Kolehmainen --- .github/workflows/test.yml | 2 +- lerna.json | 5 ++++- packages/ensure-binaries/package.json | 9 ++++++--- packages/open-lens/package.json | 2 +- 4 files changed, 12 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1180655a0a..b34c8570fa 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -48,7 +48,7 @@ jobs: - uses: nick-fields/retry@v2 name: Install dependencies with: - timeout_minutes: 10 + timeout_minutes: 20 max_attempts: 3 retry_on: error command: yarn install --frozen-lockfile diff --git a/lerna.json b/lerna.json index 0a4bc2ec5e..5641e8b0f9 100644 --- a/lerna.json +++ b/lerna.json @@ -5,5 +5,8 @@ "packages/*" ], "version": "6.4.0-beta.10", - "npmClient": "yarn" + "npmClient": "yarn", + "npmClientArgs": [ + "--network-timeout=100000" + ] } diff --git a/packages/ensure-binaries/package.json b/packages/ensure-binaries/package.json index 181a69e12b..3d48c94e51 100644 --- a/packages/ensure-binaries/package.json +++ b/packages/ensure-binaries/package.json @@ -2,14 +2,17 @@ "name": "@k8slens/ensure-binaries", "version": "6.4.0-beta.10", "description": "CLI for downloading configured versions of the bundled versions of CLIs", - "main": "dist/index.mjs", + "main": "dist/index.js", "license": "MIT", "scripts": { "clean": "rimraf dist/", - "build": "swc ./src/index.ts -o ./dist/index.mjs", + "build": "swc ./src/index.ts -o ./dist/index.js", "prepare:dev": "npm run build" }, - "bin": "./dist/index.mjs", + "bin": { + "ensure-binaries": "./dist/index.js" + }, + "type": "module", "files": [ "dist" ], diff --git a/packages/open-lens/package.json b/packages/open-lens/package.json index e6f97f90a5..65c7fe3a3b 100644 --- a/packages/open-lens/package.json +++ b/packages/open-lens/package.json @@ -35,7 +35,7 @@ "dev:renderer": "cross-env NODE_ENV=development ts-node ./webpack/dev-server.ts", "test:integration": "jest -xyz --runInBand --detectOpenHandles --forceExit --modulePaths=[\"/integration/\"];", "build:tray-icons": "ts-node build/generate-tray-icons.ts", - "download:binaries": "npm exec -- @k8slens/ensure-binaries --package $INIT_CWD/package.json --base-dir $INIT_CWD/binaries/client" + "download:binaries": "ensure-binaries --package ./package.json --base-dir ./binaries/client" }, "config": { "k8sProxyVersion": "0.3.0",