From 904482bae5bba21996b2a1c744f2361af8df677a Mon Sep 17 00:00:00 2001
From: Pierre Smeyers <pierre.smeyers@gmail.com>
Date: Fri, 5 Apr 2024 08:28:31 +0200
Subject: [PATCH] docs: add warning about default build-args that are not
 unsupported by pnpm

Fixes #34
---
 README.md                    | 2 +-
 kicker.json                  | 2 +-
 templates/gitlab-ci-node.yml | 5 ++++-
 3 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/README.md b/README.md
index d5b1ef1..d62984e 100644
--- a/README.md
+++ b/README.md
@@ -115,7 +115,7 @@ This job is bound to the `build` stage, and uses the following variables:
 |-------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------|
 | `NODE_BUILD_DISABLED`         | Set to `true` to disable build                                                                                                                                    | _none_ (enabled)      |
 | `build-dir` / `NODE_BUILD_DIR` | Variable to define build directory                                                                                                                                | `dist`                |
-| `build-args` / `NODE_BUILD_ARGS` | npm [run script](https://docs.npmjs.com/cli/v8/commands/npm-run-script) arguments <br/> yarn [run script](https://classic.yarnpkg.com/en/docs/cli/run) arguments <br/> pnpm [run script](https://pnpm.io/cli/run) arguments | `run build --prod`    |
+| `build-args` / `NODE_BUILD_ARGS` | npm [run script](https://docs.npmjs.com/cli/v8/commands/npm-run-script) arguments <br/> yarn [run script](https://classic.yarnpkg.com/en/docs/cli/run) arguments <br/> pnpm [run script](https://pnpm.io/cli/run) arguments <br/>⚠ default value should be overridden for `pnpm` as `--prod` is not a valid option. | `run build --prod`    |
 | `test-args` / `NODE_TEST_ARGS` | npm [test](https://docs.npmjs.com/cli/v8/commands/npm-test) arguments <br/> yarn [test](https://classic.yarnpkg.com/en/docs/cli/test) arguments  <br/> pnpm [test](https://pnpm.io/cli/test) arguments                                    | `test -- --coverage`  |
 
 
diff --git a/kicker.json b/kicker.json
index 64d2589..f732265 100644
--- a/kicker.json
+++ b/kicker.json
@@ -44,7 +44,7 @@
     },
     {
       "name": "NODE_BUILD_ARGS",
-      "description": "npm [run script](https://docs.npmjs.com/cli/v8/commands/npm-run-script) arguments - yarn [run script](https://classic.yarnpkg.com/en/docs/cli/run) arguments - pnpm [run script](https://pnpm.io/cli/run) arguments",
+      "description": "npm [run script](https://docs.npmjs.com/cli/v8/commands/npm-run-script) arguments - yarn [run script](https://classic.yarnpkg.com/en/docs/cli/run) arguments - pnpm [run script](https://pnpm.io/cli/run) arguments\n\n⚠ default value should be overridden for `pnpm` as `--prod` is not a valid option",
       "default": "run build --prod",
       "advanced": true
     },
diff --git a/templates/gitlab-ci-node.yml b/templates/gitlab-ci-node.yml
index 625be59..15e55e4 100644
--- a/templates/gitlab-ci-node.yml
+++ b/templates/gitlab-ci-node.yml
@@ -40,7 +40,10 @@ spec:
       description: Space separated list of NPM [scoped registries](https://docs.npmjs.com/cli/v8/using-npm/scope#associating-a-scope-with-a-registry) (formatted as `@somescope:https://some.npm.registry/some/repo @anotherscope:https://another.npm.registry/another/repo`)
       default: ''
     build-args:
-      description: npm [run script](https://docs.npmjs.com/cli/v8/commands/npm-run-script) arguments - yarn [run script](https://classic.yarnpkg.com/en/docs/cli/run) arguments - pnpm [run script](https://pnpm.io/cli/run) arguments
+      description: |
+        npm [run script](https://docs.npmjs.com/cli/v8/commands/npm-run-script) arguments - yarn [run script](https://classic.yarnpkg.com/en/docs/cli/run) arguments - pnpm [run script](https://pnpm.io/cli/run) arguments
+
+        ⚠ default value should be overridden for `pnpm` as `--prod` is not a valid option
       default: run build --prod
     build-dir:
       description: Variable to define build directory
-- 
GitLab