Skip to content

TS6 compatibility fixes + @teambit/harmony 0.4.12#10466

Open
davidfirst wants to merge 5 commits into
masterfrom
ts6-compatibility
Open

TS6 compatibility fixes + @teambit/harmony 0.4.12#10466
davidfirst wants to merge 5 commits into
masterfrom
ts6-compatibility

Conversation

@davidfirst

Copy link
Copy Markdown
Member

Preparatory changes for the TypeScript 6 upgrade.

  • Bump @teambit/harmony to 0.4.12, which points its exports types conditions at the compiled .d.ts instead of source. Under moduleResolution: bundler/node16 the old source-pointing types made harmony resolve to its shipped source and collide with its dist in the same program (TS2345 source-vs-dist duplicate identity). Classic node resolution ignores exports, so it's unaffected.
  • tar: switch to import * as tar — no default export under TS6's stricter ESM interop.
  • Add /// <reference types="chai-fs" /> where the matchers are used — TS6 no longer auto-loads ambient @types.
  • Add explicit type annotations/casts (Format in vizgraph, useWorkspace return type) for stricter TS6 inference.

@qodo-free-for-open-source-projects

qodo-free-for-open-source-projects Bot commented Jul 2, 2026

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (3) 📘 Rule violations (1) 📜 Skill insights (0)

Grey Divider


Action required

1. Hardcoded ANSI + ✓/ output 📘 Rule violation ⚙ Maintainability
Description
scripts/check-harmony-version-sync.sh introduces hardcoded ANSI color escape sequences and Unicode
symbols (/) in CLI output. This violates the requirement to avoid ad-hoc styling/symbols and
instead use the shared CLI output formatting toolkit for consistent output.
Code

scripts/check-harmony-version-sync.sh[R18-46]

+RED='\033[0;31m'
+GREEN='\033[0;32m'
+YELLOW='\033[1;33m'
+NC='\033[0m' # No Color
+
+FIX=false
+if [ "${1:-}" = "--fix" ]; then
+  FIX=true
+fi
+
+WORKSPACE_FILE="workspace.jsonc"
+CONFIG_FILE=".circleci/config.yml"
+
+echo "Checking @teambit/harmony version synchronization..."
+
+# Source of truth: the harmony pins in workspace.jsonc. There are two (the
+# dependency policy and the dependency-resolver overrides); they must agree.
+WS_VERSIONS=$(grep -oE '"@teambit/harmony": *"[0-9]+\.[0-9]+\.[0-9]+"' "$WORKSPACE_FILE" | grep -oE '[0-9]+\.[0-9]+\.[0-9]+' | sort -u)
+WS_COUNT=$(echo "$WS_VERSIONS" | grep -c .)
+
+if [ -z "$WS_VERSIONS" ]; then
+  echo -e "${RED}✗ ERROR: no @teambit/harmony pin found in ${WORKSPACE_FILE}${NC}"
+  exit 1
+fi
+
+if [ "$WS_COUNT" -ne 1 ]; then
+  echo -e "${RED}✗ ERROR: ${WORKSPACE_FILE} has inconsistent @teambit/harmony pins:${NC}"
+  echo "$WS_VERSIONS" | sed 's/^/  /'
+  echo -e "${YELLOW}Fix workspace.jsonc first so all @teambit/harmony pins match, then re-run.${NC}"
Evidence
PR Compliance ID 1 forbids introducing hardcoded styling (chalk-like/ANSI) and Unicode symbols in
CLI output. The added script defines ANSI color escapes (RED, GREEN, YELLOW) and prints
/ in multiple echo -e statements.

CLAUDE.md: CLI Output Must Use Shared Formatting Toolkit (No Hardcoded Chalk Styles or Unicode Symbols): CLAUDE.md: CLI Output Must Use Shared Formatting Toolkit (No Hardcoded Chalk Styles or Unicode Symbols): CLAUDE.md: CLI Output Must Use Shared Formatting Toolkit (No Hardcoded Chalk Styles or Unicode Symbols): CLAUDE.md: CLI Output Must Use Shared Formatting Toolkit (No Hardcoded Chalk Styles or Unicode Symbols)
scripts/check-harmony-version-sync.sh[18-21]
scripts/check-harmony-version-sync.sh[39-46]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The new bash script prints hardcoded ANSI color codes and Unicode symbols (`✓`/`✗`) in its output, which is disallowed by the CLI output compliance rule.
## Issue Context
This repository requires CLI output to avoid ad-hoc styling/symbols and instead use the shared formatting toolkit from `@teambit/cli` (or, for non-TS scripts, fall back to plain, unstyled ASCII output).
## Fix Focus Areas
- scripts/check-harmony-version-sync.sh[18-46]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools



Remediation recommended

2. Broken env lane check 🐞 Bug ≡ Correctness ⭐ New
Description
After adding EnvsAspect.id to handledExtIds, envStrategy() becomes the only path that can merge
teambit.envs/envs. envStrategy() calls `isIdInWorkspaceOrOtherLane(this.currentEnv.id,
this.otherEnv.version), but populateEnvs() derives otherEnv.version` from a different extension id
than currentEnv.id, so the otherLaneIdsStr.includes(id@version) check can fail to detect that
the current env exists in the other lane and incorrectly proceed to merge/sync env config.
Code

scopes/workspace/config-merger/component-config-merger.ts[R74-80]

+  // don't try to merge builder, it's possible that at one end it wasn't built yet, so it's empty.
+  // teambit.envs/envs is handled exclusively by envStrategy() — the generic aspect merge would copy
+  // `config.env` verbatim, which never carries the env's version (the version lives in the separate
+  // env-aspect entry that only envStrategy knows to attach). If envStrategy declines (e.g. the
+  // current env is a workspace component), letting the generic merge run would leak an unversioned
+  // external env and break the snap with ExternalEnvWithoutVersion.
+  private handledExtIds: string[] = [BuilderAspect.id, EnvsAspect.id];
Evidence
The PR change seeds handledExtIds with EnvsAspect.id, and merge() skips any extension whose id
is in handledExtIds, so teambit.envs/envs will not be processed by the generic merge loop and
relies on envStrategy() only. populateEnvs() sets currentEnv and otherEnv independently
(including independent version extraction), but envStrategy() combines currentEnv.id with
otherEnv.version when calling isIdInWorkspaceOrOtherLane(), whose implementation expects the
version to match the same id being checked
(otherLaneIdsStr.includes(${id}@${versionOnOtherLane})).

scopes/workspace/config-merger/component-config-merger.ts[74-105]
scopes/workspace/config-merger/component-config-merger.ts[157-217]
scopes/workspace/config-merger/component-config-merger.ts[631-633]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
`ComponentConfigMerger` now skips generic merging of `teambit.envs/envs` by seeding `handledExtIds` with `EnvsAspect.id`. This makes `envStrategy()` the sole source of a merge result for `EnvsAspect.id`.

However, `envStrategy()` currently calls:

```ts
this.isIdInWorkspaceOrOtherLane(this.currentEnv.id, this.otherEnv.version)
```

`populateEnvs()` computes `currentEnv` and `otherEnv` (and their versions) from different extension IDs, so when the env IDs differ, `otherEnv.version` does not correspond to `currentEnv.id`. Since `isIdInWorkspaceOrOtherLane()` checks `otherLaneIdsStr.includes(`${id}@${versionOnOtherLane}`)`, this makes the “other lane” portion of the condition unreliable.

### Issue Context
This can cause `envStrategy()` to fall through to `basicConfigMerge()` and emit an env merge result when it should have returned `null` (i.e., keep the current env because it exists in the other lane).

### Fix Focus Areas
- scopes/workspace/config-merger/component-config-merger.ts[196-217]
- scopes/workspace/config-merger/component-config-merger.ts[157-186]
- scopes/workspace/config-merger/component-config-merger.ts[631-633]

### Suggested fix
Adjust the check so the version used matches the ID being checked, e.g.:
- Pass `this.currentEnv.version` when checking `this.currentEnv.id`, **or**
- Change the helper to support an id-only check against `otherLaneIdsStr` (ignore version) for this env-specific branch.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


3. set -e aborts counting 🐞 Bug ☼ Reliability
Description
In check-harmony-version-sync.sh, WS_COUNT is computed using grep -c . while set -e is
enabled; when WS_VERSIONS is empty (e.g. the grep patterns don’t match), grep exits non-zero and
the script terminates before reaching the explicit “no @teambit/harmony pin found” error handling.
This makes the new CI step fail with less actionable output than intended for that edge case.
Code

scripts/check-harmony-version-sync.sh[R16-41]

+set -e
+
+RED='\033[0;31m'
+GREEN='\033[0;32m'
+YELLOW='\033[1;33m'
+NC='\033[0m' # No Color
+
+FIX=false
+if [ "${1:-}" = "--fix" ]; then
+  FIX=true
+fi
+
+WORKSPACE_FILE="workspace.jsonc"
+CONFIG_FILE=".circleci/config.yml"
+
+echo "Checking @teambit/harmony version synchronization..."
+
+# Source of truth: the harmony pins in workspace.jsonc. There are two (the
+# dependency policy and the dependency-resolver overrides); they must agree.
+WS_VERSIONS=$(grep -oE '"@teambit/harmony": *"[0-9]+\.[0-9]+\.[0-9]+"' "$WORKSPACE_FILE" | grep -oE '[0-9]+\.[0-9]+\.[0-9]+' | sort -u)
+WS_COUNT=$(echo "$WS_VERSIONS" | grep -c .)
+
+if [ -z "$WS_VERSIONS" ]; then
+  echo -e "${RED}✗ ERROR: no @teambit/harmony pin found in ${WORKSPACE_FILE}${NC}"
+  exit 1
+fi
Evidence
The script sets set -e and computes WS_COUNT before checking whether WS_VERSIONS is empty, so
a non-zero exit from the counting command can stop execution before the explicit empty-case error
branch runs.

scripts/check-harmony-version-sync.sh[16-41]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
`scripts/check-harmony-version-sync.sh` enables `set -e` and then uses `grep -c .` to count lines in `WS_VERSIONS`. When `WS_VERSIONS` is empty (no matches), `grep -c` returns exit code 1, which can abort the script before it prints the intended explicit error message and guidance.
### Issue Context
This script is executed in CI (CircleCI job `check_env_cache_sync`) to validate harmony version synchronization.
### Fix Focus Areas
- scripts/check-harmony-version-sync.sh[16-47]
### Suggested fix
Move the `WS_COUNT` computation after the `-z "$WS_VERSIONS"` check, and/or replace the `grep -c .` counting with a command that does not fail on empty input. For example:
- After verifying `WS_VERSIONS` is non-empty, use `wc -l`:
- `WS_COUNT=$(printf '%s\n' "$WS_VERSIONS" | wc -l | tr -d ' ')`
Or keep `grep` but neutralize its exit code:
- `WS_COUNT=$(echo "$WS_VERSIONS" | grep -c . || true)`

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools



Informational

4. Strict harmony version regex 🐞 Bug ⚙ Maintainability
Description
scripts/check-harmony-version-sync.sh only recognizes @teambit/harmony pins that match an exact
numeric "x.y.z" regex, so pins like "^0.4.12" or "0.4.13-rc.1" will be treated as missing/mismatched
and fail the new CI step. This can unexpectedly block future bumps if the pinning format changes
(ranges/prereleases).
Code

scripts/check-harmony-version-sync.sh[R33-56]

+# Source of truth: the harmony pins in workspace.jsonc. There are two (the
+# dependency policy and the dependency-resolver overrides); they must agree.
+WS_VERSIONS=$(grep -oE '"@teambit/harmony": *"[0-9]+\.[0-9]+\.[0-9]+"' "$WORKSPACE_FILE" | grep -oE '[0-9]+\.[0-9]+\.[0-9]+' | sort -u)
+WS_COUNT=$(echo "$WS_VERSIONS" | grep -c .)
+
+if [ -z "$WS_VERSIONS" ]; then
+  echo -e "${RED}✗ ERROR: no @teambit/harmony pin found in ${WORKSPACE_FILE}${NC}"
+  exit 1
+fi
+
+if [ "$WS_COUNT" -ne 1 ]; then
+  echo -e "${RED}✗ ERROR: ${WORKSPACE_FILE} has inconsistent @teambit/harmony pins:${NC}"
+  echo "$WS_VERSIONS" | sed 's/^/  /'
+  echo -e "${YELLOW}Fix workspace.jsonc first so all @teambit/harmony pins match, then re-run.${NC}"
+  exit 1
+fi
+
+EXPECTED="$WS_VERSIONS"
+echo "Found @teambit/harmony in ${WORKSPACE_FILE}: $EXPECTED"
+
+# The config.yml overrides look like:
+#   pnpm.overrides.@teambit/harmony" --values "0.4.12"
+CONFIG_VERSIONS=$(grep -oE 'pnpm\.overrides\.@teambit/harmony" --values "[0-9]+\.[0-9]+\.[0-9]+"' "$CONFIG_FILE" | grep -oE '[0-9]+\.[0-9]+\.[0-9]+' | sort -u)
+
Evidence
The script’s extraction regexes only match three numeric dot-separated segments, which excludes
common valid semver forms like ranges (^, ~) and prerelease/build metadata (-rc.1, +build).

scripts/check-harmony-version-sync.sh[33-36]
scripts/check-harmony-version-sync.sh[53-56]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
`check-harmony-version-sync.sh` extracts versions using regexes that only match exact `x.y.z` strings. If the repo ever uses semver ranges (e.g. `^0.4.12`) or prereleases/build metadata (e.g. `0.4.13-rc.1`), the script will report “no pin found” / mismatch and fail CI.
### Issue Context
The script is now executed in CircleCI (`check_env_cache_sync` job). It is intended to prevent drift between `workspace.jsonc` and the `.circleci/config.yml` `pnpm.overrides.@teambit/harmony` overrides.
### Fix Focus Areas
- scripts/check-harmony-version-sync.sh[35-56]
### Suggested fix
Choose one:
1) **If exact pins are required by policy**: update script comments/error messages to explicitly state it enforces exact `x.y.z` pins (and consider validating that the pins are exact to make failures clearer).
2) **If flexibility is desired**: broaden the regex to accept semver prerelease/build metadata and optional `^`/`~`, e.g.:
- `\^?([0-9]+\.[0-9]+\.[0-9]+(?:-[0-9A-Za-z.-]+)?(?:\+[0-9A-Za-z.-]+)?)`
and use that capture for both `workspace.jsonc` and `.circleci/config.yml` extraction.
3) **Most robust**: replace grep-regex parsing with a small `node` snippet that parses JSONC/YAML and reads the relevant fields explicitly.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Previous review results

Review updated until commit 6101f4d

Results up to commit e751234


🐞 Bugs (2) 📘 Rule violations (1) 📜 Skill insights (0)


Action required
1. Hardcoded ANSI + ✓/ output 📘 Rule violation ⚙ Maintainability
Description
scripts/check-harmony-version-sync.sh introduces hardcoded ANSI color escape sequences and Unicode
symbols (/) in CLI output. This violates the requirement to avoid ad-hoc styling/symbols and
instead use the shared CLI output formatting toolkit for consistent output.
Code

scripts/check-harmony-version-sync.sh[R18-46]

+RED='\033[0;31m'
+GREEN='\033[0;32m'
+YELLOW='\033[1;33m'
+NC='\033[0m' # No Color
+
+FIX=false
+if [ "${1:-}" = "--fix" ]; then
+  FIX=true
+fi
+
+WORKSPACE_FILE="workspace.jsonc"
+CONFIG_FILE=".circleci/config.yml"
+
+echo "Checking @teambit/harmony version synchronization..."
+
+# Source of truth: the harmony pins in workspace.jsonc. There are two (the
+# dependency policy and the dependency-resolver overrides); they must agree.
+WS_VERSIONS=$(grep -oE '"@teambit/harmony": *"[0-9]+\.[0-9]+\.[0-9]+"' "$WORKSPACE_FILE" | grep -oE '[0-9]+\.[0-9]+\.[0-9]+' | sort -u)
+WS_COUNT=$(echo "$WS_VERSIONS" | grep -c .)
+
+if [ -z "$WS_VERSIONS" ]; then
+  echo -e "${RED}✗ ERROR: no @teambit/harmony pin found in ${WORKSPACE_FILE}${NC}"
+  exit 1
+fi
+
+if [ "$WS_COUNT" -ne 1 ]; then
+  echo -e "${RED}✗ ERROR: ${WORKSPACE_FILE} has inconsistent @teambit/harmony pins:${NC}"
+  echo "$WS_VERSIONS" | sed 's/^/  /'
+  echo -e "${YELLOW}Fix workspace.jsonc first so all @teambit/harmony pins match, then re-run.${NC}"
Evidence
PR Compliance ID 1 forbids introducing hardcoded styling (chalk-like/ANSI) and Unicode symbols in
CLI output. The added script defines ANSI color escapes (RED, GREEN, YELLOW) and prints
/ in multiple echo -e statements.

CLAUDE.md: CLI Output Must Use Shared Formatting Toolkit (No Hardcoded Chalk Styles or Unicode Symbols): CLAUDE.md: CLI Output Must Use Shared Formatting Toolkit (No Hardcoded Chalk Styles or Unicode Symbols)
scripts/check-harmony-version-sync.sh[18-21]
scripts/check-harmony-version-sync.sh[39-46]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The new bash script prints hardcoded ANSI color codes and Unicode symbols (`✓`/`✗`) in its output, which is disallowed by the CLI output compliance rule.
## Issue Context
This repository requires CLI output to avoid ad-hoc styling/symbols and instead use the shared formatting toolkit from `@teambit/cli` (or, for non-TS scripts, fall back to plain, unstyled ASCII output).
## Fix Focus Areas
- scripts/check-harmony-version-sync.sh[18-46]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools



Remediation recommended
2. set -e aborts counting 🐞 Bug ☼ Reliability ⭐ New
Description
In check-harmony-version-sync.sh, WS_COUNT is computed using grep -c . while set -e is
enabled; when WS_VERSIONS is empty (e.g. the grep patterns don’t match), grep exits non-zero and
the script terminates before reaching the explicit “no @teambit/harmony pin found” error handling.
This makes the new CI step fail with less actionable output than intended for that edge case.
Code

scripts/check-harmony-version-sync.sh[R16-41]

+set -e
+
+RED='\033[0;31m'
+GREEN='\033[0;32m'
+YELLOW='\033[1;33m'
+NC='\033[0m' # No Color
+
+FIX=false
+if [ "${1:-}" = "--fix" ]; then
+  FIX=true
+fi
+
+WORKSPACE_FILE="workspace.jsonc"
+CONFIG_FILE=".circleci/config.yml"
+
+echo "Checking @teambit/harmony version synchronization..."
+
+# Source of truth: the harmony pins in workspace.jsonc. There are two (the
+# dependency policy and the dependency-resolver overrides); they must agree.
+WS_VERSIONS=$(grep -oE '"@teambit/harmony": *"[0-9]+\.[0-9]+\.[0-9]+"' "$WORKSPACE_FILE" | grep -oE '[0-9]+\.[0-9]+\.[0-9]+' | sort -u)
+WS_COUNT=$(echo "$WS_VERSIONS" | grep -c .)
+
+if [ -z "$WS_VERSIONS" ]; then
+  echo -e "${RED}✗ ERROR: no @teambit/harmony pin found in ${WORKSPACE_FILE}${NC}"
+  exit 1
+fi
Evidence
The script sets set -e and computes WS_COUNT before checking whether WS_VERSIONS is empty, so
a non-zero exit from the counting command can stop execution before the explicit empty-case error
branch runs.

scripts/check-harmony-version-sync.sh[16-41]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
`scripts/check-harmony-version-sync.sh` enables `set -e` and then uses `grep -c .` to count lines in `WS_VERSIONS`. When `WS_VERSIONS` is empty (no matches), `grep -c` returns exit code 1, which can abort the script before it prints the intended explicit error message and guidance.

### Issue Context
This script is executed in CI (CircleCI job `check_env_cache_sync`) to validate harmony version synchronization.

### Fix Focus Areas
- scripts/check-harmony-version-sync.sh[16-47]

### Suggested fix
Move the `WS_COUNT` computation after the `-z "$WS_VERSIONS"` check, and/or replace the `grep -c .` counting with a command that does not fail on empty input. For example:
- After verifying `WS_VERSIONS` is non-empty, use `wc -l`:
 - `WS_COUNT=$(printf '%s\n' "$WS_VERSIONS" | wc -l | tr -d ' ')`
Or keep `grep` but neutralize its exit code:
- `WS_COUNT=$(echo "$WS_VERSIONS" | grep -c . || true)`

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools



Informational
3. Strict harmony version regex 🐞 Bug ⚙ Maintainability
Description
scripts/check-harmony-version-sync.sh only recognizes @teambit/harmony pins that match an exact
numeric "x.y.z" regex, so pins like "^0.4.12" or "0.4.13-rc.1" will be treated as missing/mismatched
and fail the new CI step. This can unexpectedly block future bumps if the pinning format changes
(ranges/prereleases).
Code

scripts/check-harmony-version-sync.sh[R33-56]

+# Source of truth: the harmony pins in workspace.jsonc. There are two (the
+# dependency policy and the dependency-resolver overrides); they must agree.
+WS_VERSIONS=$(grep -oE '"@teambit/harmony": *"[0-9]+\.[0-9]+\.[0-9]+"' "$WORKSPACE_FILE" | grep -oE '[0-9]+\.[0-9]+\.[0-9]+' | sort -u)
+WS_COUNT=$(echo "$WS_VERSIONS" | grep -c .)
+
+if [ -z "$WS_VERSIONS" ]; then
+  echo -e "${RED}✗ ERROR: no @teambit/harmony pin found in ${WORKSPACE_FILE}${NC}"
+  exit 1
+fi
+
+if [ "$WS_COUNT" -ne 1 ]; then
+  echo -e "${RED}✗ ERROR: ${WORKSPACE_FILE} has inconsistent @teambit/harmony pins:${NC}"
+  echo "$WS_VERSIONS" | sed 's/^/  /'
+  echo -e "${YELLOW}Fix workspace.jsonc first so all @teambit/harmony pins match, then re-run.${NC}"
+  exit 1
+fi
+
+EXPECTED="$WS_VERSIONS"
+echo "Found @teambit/harmony in ${WORKSPACE_FILE}: $EXPECTED"
+
+# The config.yml overrides look like:
+#   pnpm.overrides.@teambit/harmony" --values "0.4.12"
+CONFIG_VERSIONS=$(grep -oE 'pnpm\.overrides\.@teambit/harmony" --values "[0-9]+\.[0-9]+\.[0-9]+"' "$CONFIG_FILE" | grep -oE '[0-9]+\.[0-9]+\.[0-9]+' | sort -u)
+
Evidence
The script’s extraction regexes only match three numeric dot-separated segments, which excludes
common valid semver forms like ranges (^, ~) and prerelease/build metadata (-rc.1, +build).

scripts/check-harmony-version-sync.sh[33-36]
scripts/check-harmony-version-sync.sh[53-56]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
`check-harmony-version-sync.sh` extracts versions using regexes that only match exact `x.y.z` strings. If the repo ever uses semver ranges (e.g. `^0.4.12`) or prereleases/build metadata (e.g. `0.4.13-rc.1`), the script will report “no pin found” / mismatch and fail CI.
### Issue Context
The script is now executed in CircleCI (`check_env_cache_sync` job). It is intended to prevent drift between `workspace.jsonc` and the `.circleci/config.yml` `pnpm.overrides.@teambit/harmony` overrides.
### Fix Focus Areas
- scripts/check-harmony-version-sync.sh[35-56]
### Suggested fix
Choose one:
1) **If exact pins are required by policy**: update script comments/error messages to explicitly state it enforces exact `x.y.z` pins (and consider validating that the pins are exact to make failures clearer).
2) **If flexibility is desired**: broaden the regex to accept semver prerelease/build metadata and optional `^`/`~`, e.g.:
 - `\^?([0-9]+\.[0-9]+\.[0-9]+(?:-[0-9A-Za-z.-]+)?(?:\+[0-9A-Za-z.-]+)?)`
 and use that capture for both `workspace.jsonc` and `.circleci/config.yml` extraction.
3) **Most robust**: replace grep-regex parsing with a small `node` snippet that parses JSONC/YAML and reads the relevant fields explicitly.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Results up to commit 03ef52b


🐞 Bugs (1) 📘 Rule violations (1) 📜 Skill insights (0)


Action required
1. Hardcoded ANSI + ✓/✗ output 📘 Rule violation ⚙ Maintainability
Description
scripts/check-harmony-version-sync.sh introduces hardcoded ANSI color escape sequences and Unicode
symbols (/) in CLI output. This violates the requirement to avoid ad-hoc styling/symbols and
instead use the shared CLI output formatting toolkit for consistent output.
Code

scripts/check-harmony-version-sync.sh[R18-46]

+RED='\033[0;31m'
+GREEN='\033[0;32m'
+YELLOW='\033[1;33m'
+NC='\033[0m' # No Color
+
+FIX=false
+if [ "${1:-}" = "--fix" ]; then
+  FIX=true
+fi
+
+WORKSPACE_FILE="workspace.jsonc"
+CONFIG_FILE=".circleci/config.yml"
+
+echo "Checking @teambit/harmony version synchronization..."
+
+# Source of truth: the harmony pins in workspace.jsonc. There are two (the
+# dependency policy and the dependency-resolver overrides); they must agree.
+WS_VERSIONS=$(grep -oE '"@teambit/harmony": *"[0-9]+\.[0-9]+\.[0-9]+"' "$WORKSPACE_FILE" | grep -oE '[0-9]+\.[0-9]+\.[0-9]+' | sort -u)
+WS_COUNT=$(echo "$WS_VERSIONS" | grep -c .)
+
+if [ -z "$WS_VERSIONS" ]; then
+  echo -e "${RED}✗ ERROR: no @teambit/harmony pin found in ${WORKSPACE_FILE}${NC}"
+  exit 1
+fi
+
+if [ "$WS_COUNT" -ne 1 ]; then
+  echo -e "${RED}✗ ERROR: ${WORKSPACE_FILE} has inconsistent @teambit/harmony pins:${NC}"
+  echo "$WS_VERSIONS" | sed 's/^/  /'
+  echo -e "${YELLOW}Fix workspace.jsonc first so all @teambit/harmony pins match, then re-run.${NC}"
Evidence
PR Compliance ID 1 forbids introducing hardcoded styling (chalk-like/ANSI) and Unicode symbols in
CLI output. The added script defines ANSI color escapes (RED, GREEN, YELLOW) and prints
/ in multiple echo -e statements.

CLAUDE.md: CLI Output Must Use Shared Formatting Toolkit (No Hardcoded Chalk Styles or Unicode Symbols)
scripts/check-harmony-version-sync.sh[18-21]
scripts/check-harmony-version-sync.sh[39-46]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The new bash script prints hardcoded ANSI color codes and Unicode symbols (`✓`/`✗`) in its output, which is disallowed by the CLI output compliance rule.

## Issue Context
This repository requires CLI output to avoid ad-hoc styling/symbols and instead use the shared formatting toolkit from `@teambit/cli` (or, for non-TS scripts, fall back to plain, unstyled ASCII output).

## Fix Focus Areas
- scripts/check-harmony-version-sync.sh[18-46]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools



Informational
2. Strict harmony version regex 🐞 Bug ⚙ Maintainability
Description
scripts/check-harmony-version-sync.sh only recognizes @teambit/harmony pins that match an exact
numeric "x.y.z" regex, so pins like "^0.4.12" or "0.4.13-rc.1" will be treated as missing/mismatched
and fail the new CI step. This can unexpectedly block future bumps if the pinning format changes
(ranges/prereleases).
Code

scripts/check-harmony-version-sync.sh[R33-56]

+# Source of truth: the harmony pins in workspace.jsonc. There are two (the
+# dependency policy and the dependency-resolver overrides); they must agree.
+WS_VERSIONS=$(grep -oE '"@teambit/harmony": *"[0-9]+\.[0-9]+\.[0-9]+"' "$WORKSPACE_FILE" | grep -oE '[0-9]+\.[0-9]+\.[0-9]+' | sort -u)
+WS_COUNT=$(echo "$WS_VERSIONS" | grep -c .)
+
+if [ -z "$WS_VERSIONS" ]; then
+  echo -e "${RED}✗ ERROR: no @teambit/harmony pin found in ${WORKSPACE_FILE}${NC}"
+  exit 1
+fi
+
+if [ "$WS_COUNT" -ne 1 ]; then
+  echo -e "${RED}✗ ERROR: ${WORKSPACE_FILE} has inconsistent @teambit/harmony pins:${NC}"
+  echo "$WS_VERSIONS" | sed 's/^/  /'
+  echo -e "${YELLOW}Fix workspace.jsonc first so all @teambit/harmony pins match, then re-run.${NC}"
+  exit 1
+fi
+
+EXPECTED="$WS_VERSIONS"
+echo "Found @teambit/harmony in ${WORKSPACE_FILE}: $EXPECTED"
+
+# The config.yml overrides look like:
+#   pnpm.overrides.@teambit/harmony" --values "0.4.12"
+CONFIG_VERSIONS=$(grep -oE 'pnpm\.overrides\.@teambit/harmony" --values "[0-9]+\.[0-9]+\.[0-9]+"' "$CONFIG_FILE" | grep -oE '[0-9]+\.[0-9]+\.[0-9]+' | sort -u)
+
Evidence
The script’s extraction regexes only match three numeric dot-separated segments, which excludes
common valid semver forms like ranges (^, ~) and prerelease/build metadata (-rc.1, +build).

scripts/check-harmony-version-sync.sh[33-36]
scripts/check-harmony-version-sync.sh[53-56]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
`check-harmony-version-sync.sh` extracts versions using regexes that only match exact `x.y.z` strings. If the repo ever uses semver ranges (e.g. `^0.4.12`) or prereleases/build metadata (e.g. `0.4.13-rc.1`), the script will report “no pin found” / mismatch and fail CI.

### Issue Context
The script is now executed in CircleCI (`check_env_cache_sync` job). It is intended to prevent drift between `workspace.jsonc` and the `.circleci/config.yml` `pnpm.overrides.@teambit/harmony` overrides.

### Fix Focus Areas
- scripts/check-harmony-version-sync.sh[35-56]

### Suggested fix
Choose one:
1) **If exact pins are required by policy**: update script comments/error messages to explicitly state it enforces exact `x.y.z` pins (and consider validating that the pins are exact to make failures clearer).
2) **If flexibility is desired**: broaden the regex to accept semver prerelease/build metadata and optional `^`/`~`, e.g.:
  - `\^?([0-9]+\.[0-9]+\.[0-9]+(?:-[0-9A-Za-z.-]+)?(?:\+[0-9A-Za-z.-]+)?)`
  and use that capture for both `workspace.jsonc` and `.circleci/config.yml` extraction.
3) **Most robust**: replace grep-regex parsing with a small `node` snippet that parses JSONC/YAML and reads the relevant fields explicitly.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Results up to commit N/A


New Review Started


This review has been superseded by a new analysis


Qodo Logo

@qodo-free-for-open-source-projects

Copy link
Copy Markdown

PR Summary by Qodo

TS6 compatibility fixes and bump @teambit/harmony to 0.4.12

✨ Enhancement ⚙️ Configuration changes 🕐 20-40 Minutes

Grey Divider

AI Description

• Bump @teambit/harmony to 0.4.12 to avoid source-vs-dist type identity collisions.
• Fix TS6 module/typing strictness (tar namespace import, explicit chai-fs type references).
• Add explicit type annotations/casts to satisfy stricter TS6 inference.
Diagram

graph TD
  CFG["workspace.jsonc / pnpm-lock"] --> RES["TS6 module resolution"] --> HARM["@teambit/harmony 0.4.12"] --> UI["workspace UI hook"]
  RES --> E2E["e2e helpers & specs"]
  RES --> VIZ["dependency graph viz"]
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Centralize chai-fs typing via tsconfig `types`
  • ➕ Avoids per-file /// directives
  • ➕ Keeps test files cleaner and consistent across the suite
  • ➖ Requires plumbing through the repo’s TS project references/build tooling
  • ➖ May unintentionally include chai-fs types in non-test compilation units
2. Rely on compiler flags for `tar` default import interop
  • ➕ Keeps existing import tar from &#x27;tar&#x27; style if desired
  • ➖ TS6 + modern ESM resolution often still rejects/invalidates default import assumptions
  • ➖ Adds compiler-option coupling rather than fixing import semantics at call sites
3. Avoid harmony bump by changing moduleResolution away from bundler/node16
  • ➕ No dependency change required
  • ➕ May reduce exposure to exports condition edge cases
  • ➖ Moves the project away from the intended TS6/modern-resolution target
  • ➖ Doesn’t address other TS6 strictness issues (ambient types, inference changes)

Recommendation: Keep the PR’s targeted, minimal fixes: bumping harmony aligns its exports/types with compiled .d.ts, and the tar + explicit ambient type references address real TS6 behavior changes without widening compiler configuration scope. Consider the tsconfig-based chai-fs option only if many more files need the reference.

Files changed (8) +1020 / -855

Bug fix (4) +10 / -4
vizgraph.tsCast Graphviz output format to adapter 'Format' type +3/-1

Cast Graphviz output format to adapter 'Format' type

• Imports the 'Format' type from 'ts-graphviz/adapter' and casts the inferred file extension format to 'Format' before calling 'toFile()'. This avoids TS6 inference/compat issues when passing the format option.

components/legacy/dependency-graph/vizgraph.ts

e2e-fixtures-helper.tsUse namespace import for 'tar' under stricter ESM interop +1/-1

Use namespace import for 'tar' under stricter ESM interop

• Replaces 'import tar from 'tar'' with 'import * as tar from 'tar'' to match the package’s export shape under TS6 and modern module resolution.

components/legacy/e2e-helper/e2e-fixtures-helper.ts

e2e-general-helper.tsUse namespace import for 'tar' under stricter ESM interop +1/-1

Use namespace import for 'tar' under stricter ESM interop

• Replaces 'import tar from 'tar'' with 'import * as tar from 'tar'' to avoid TS6 default-import interop issues.

components/legacy/e2e-helper/e2e-general-helper.ts

use-workspace.tsAdd explicit 'UseWorkspaceResult' return type +5/-1

Add explicit 'UseWorkspaceResult' return type

• Introduces a 'UseWorkspaceResult' type and annotates 'useWorkspace()' to return it, making the hook’s contract explicit and stable under stricter TS6 inference (especially around 'useDataQuery'’s 'data'/'previousData' typing).

scopes/workspace/workspace/ui/workspace/use-workspace.ts

Tests (2) +2 / -0
e2e-fs-helper.tsExplicitly reference chai-fs ambient types for matcher typing +1/-0

Explicitly reference chai-fs ambient types for matcher typing

• Adds '/// <reference types="chai-fs" />' so chai-fs matchers (e.g. '.path()') typecheck under TS6, which no longer implicitly loads ambient '@types' as broadly.

components/legacy/e2e-helper/e2e-fs-helper.ts

checkout.spec.tsExplicitly reference chai-fs ambient types in checkout spec +1/-0

Explicitly reference chai-fs ambient types in checkout spec

• Adds '/// <reference types="chai-fs" />' so chai-fs assertions typecheck under TS6.

scopes/component/checkout/checkout.spec.ts

Other (2) +1008 / -851
pnpm-lock.yamlUpdate lockfile for @teambit/harmony 0.4.12 override +1006/-849

Update lockfile for @teambit/harmony 0.4.12 override

• Refreshes pnpm lock state to reflect the harmony version bump/override. Ensures dependency graph consistency for installs and CI.

pnpm-lock.yaml

workspace.jsoncBump @teambit/harmony to 0.4.12 (deps + override) +2/-2

Bump @teambit/harmony to 0.4.12 (deps + override)

• Updates the workspace dependency and override entries for '@teambit/harmony' from 0.4.11 to 0.4.12 to align exported type conditions with compiled declaration outputs.

workspace.jsonc

@qodo-free-for-open-source-projects

qodo-free-for-open-source-projects Bot commented Jul 2, 2026

Copy link
Copy Markdown

Code Review by Qodo

Grey Divider

New Review Started

This review has been superseded by a new analysis

Grey Divider

Qodo Logo

Comment on lines +18 to +46
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
NC='\033[0m' # No Color

FIX=false
if [ "${1:-}" = "--fix" ]; then
FIX=true
fi

WORKSPACE_FILE="workspace.jsonc"
CONFIG_FILE=".circleci/config.yml"

echo "Checking @teambit/harmony version synchronization..."

# Source of truth: the harmony pins in workspace.jsonc. There are two (the
# dependency policy and the dependency-resolver overrides); they must agree.
WS_VERSIONS=$(grep -oE '"@teambit/harmony": *"[0-9]+\.[0-9]+\.[0-9]+"' "$WORKSPACE_FILE" | grep -oE '[0-9]+\.[0-9]+\.[0-9]+' | sort -u)
WS_COUNT=$(echo "$WS_VERSIONS" | grep -c .)

if [ -z "$WS_VERSIONS" ]; then
echo -e "${RED}✗ ERROR: no @teambit/harmony pin found in ${WORKSPACE_FILE}${NC}"
exit 1
fi

if [ "$WS_COUNT" -ne 1 ]; then
echo -e "${RED}✗ ERROR: ${WORKSPACE_FILE} has inconsistent @teambit/harmony pins:${NC}"
echo "$WS_VERSIONS" | sed 's/^/ /'
echo -e "${YELLOW}Fix workspace.jsonc first so all @teambit/harmony pins match, then re-run.${NC}"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Action required

1. Hardcoded ansi + ✓/✗ output 📘 Rule violation ⚙ Maintainability

scripts/check-harmony-version-sync.sh introduces hardcoded ANSI color escape sequences and Unicode
symbols (/) in CLI output. This violates the requirement to avoid ad-hoc styling/symbols and
instead use the shared CLI output formatting toolkit for consistent output.
Agent Prompt
## Issue description
The new bash script prints hardcoded ANSI color codes and Unicode symbols (`✓`/`✗`) in its output, which is disallowed by the CLI output compliance rule.

## Issue Context
This repository requires CLI output to avoid ad-hoc styling/symbols and instead use the shared formatting toolkit from `@teambit/cli` (or, for non-TS scripts, fall back to plain, unstyled ASCII output).

## Fix Focus Areas
- scripts/check-harmony-version-sync.sh[18-46]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Comment on lines +33 to +56
# Source of truth: the harmony pins in workspace.jsonc. There are two (the
# dependency policy and the dependency-resolver overrides); they must agree.
WS_VERSIONS=$(grep -oE '"@teambit/harmony": *"[0-9]+\.[0-9]+\.[0-9]+"' "$WORKSPACE_FILE" | grep -oE '[0-9]+\.[0-9]+\.[0-9]+' | sort -u)
WS_COUNT=$(echo "$WS_VERSIONS" | grep -c .)

if [ -z "$WS_VERSIONS" ]; then
echo -e "${RED}✗ ERROR: no @teambit/harmony pin found in ${WORKSPACE_FILE}${NC}"
exit 1
fi

if [ "$WS_COUNT" -ne 1 ]; then
echo -e "${RED}✗ ERROR: ${WORKSPACE_FILE} has inconsistent @teambit/harmony pins:${NC}"
echo "$WS_VERSIONS" | sed 's/^/ /'
echo -e "${YELLOW}Fix workspace.jsonc first so all @teambit/harmony pins match, then re-run.${NC}"
exit 1
fi

EXPECTED="$WS_VERSIONS"
echo "Found @teambit/harmony in ${WORKSPACE_FILE}: $EXPECTED"

# The config.yml overrides look like:
# pnpm.overrides.@teambit/harmony" --values "0.4.12"
CONFIG_VERSIONS=$(grep -oE 'pnpm\.overrides\.@teambit/harmony" --values "[0-9]+\.[0-9]+\.[0-9]+"' "$CONFIG_FILE" | grep -oE '[0-9]+\.[0-9]+\.[0-9]+' | sort -u)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Informational

2. Strict harmony version regex 🐞 Bug ⚙ Maintainability

scripts/check-harmony-version-sync.sh only recognizes @teambit/harmony pins that match an exact
numeric "x.y.z" regex, so pins like "^0.4.12" or "0.4.13-rc.1" will be treated as missing/mismatched
and fail the new CI step. This can unexpectedly block future bumps if the pinning format changes
(ranges/prereleases).
Agent Prompt
### Issue description
`check-harmony-version-sync.sh` extracts versions using regexes that only match exact `x.y.z` strings. If the repo ever uses semver ranges (e.g. `^0.4.12`) or prereleases/build metadata (e.g. `0.4.13-rc.1`), the script will report “no pin found” / mismatch and fail CI.

### Issue Context
The script is now executed in CircleCI (`check_env_cache_sync` job). It is intended to prevent drift between `workspace.jsonc` and the `.circleci/config.yml` `pnpm.overrides.@teambit/harmony` overrides.

### Fix Focus Areas
- scripts/check-harmony-version-sync.sh[35-56]

### Suggested fix
Choose one:
1) **If exact pins are required by policy**: update script comments/error messages to explicitly state it enforces exact `x.y.z` pins (and consider validating that the pins are exact to make failures clearer).
2) **If flexibility is desired**: broaden the regex to accept semver prerelease/build metadata and optional `^`/`~`, e.g.:
   - `\^?([0-9]+\.[0-9]+\.[0-9]+(?:-[0-9A-Za-z.-]+)?(?:\+[0-9A-Za-z.-]+)?)`
   and use that capture for both `workspace.jsonc` and `.circleci/config.yml` extraction.
3) **Most robust**: replace grep-regex parsing with a small `node` snippet that parses JSONC/YAML and reads the relevant fields explicitly.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

@qodo-free-for-open-source-projects

Copy link
Copy Markdown

Code review by qodo was updated up to the latest commit 03ef52b

@davidfirst davidfirst enabled auto-merge (squash) July 2, 2026 14:57
Comment on lines +16 to +41
set -e

RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
NC='\033[0m' # No Color

FIX=false
if [ "${1:-}" = "--fix" ]; then
FIX=true
fi

WORKSPACE_FILE="workspace.jsonc"
CONFIG_FILE=".circleci/config.yml"

echo "Checking @teambit/harmony version synchronization..."

# Source of truth: the harmony pins in workspace.jsonc. There are two (the
# dependency policy and the dependency-resolver overrides); they must agree.
WS_VERSIONS=$(grep -oE '"@teambit/harmony": *"[0-9]+\.[0-9]+\.[0-9]+"' "$WORKSPACE_FILE" | grep -oE '[0-9]+\.[0-9]+\.[0-9]+' | sort -u)
WS_COUNT=$(echo "$WS_VERSIONS" | grep -c .)

if [ -z "$WS_VERSIONS" ]; then
echo -e "${RED}✗ ERROR: no @teambit/harmony pin found in ${WORKSPACE_FILE}${NC}"
exit 1
fi

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remediation recommended

1. Set -e aborts counting 🐞 Bug ☼ Reliability

In check-harmony-version-sync.sh, WS_COUNT is computed using grep -c . while set -e is
enabled; when WS_VERSIONS is empty (e.g. the grep patterns don’t match), grep exits non-zero and
the script terminates before reaching the explicit “no @teambit/harmony pin found” error handling.
This makes the new CI step fail with less actionable output than intended for that edge case.
Agent Prompt
### Issue description
`scripts/check-harmony-version-sync.sh` enables `set -e` and then uses `grep -c .` to count lines in `WS_VERSIONS`. When `WS_VERSIONS` is empty (no matches), `grep -c` returns exit code 1, which can abort the script before it prints the intended explicit error message and guidance.

### Issue Context
This script is executed in CI (CircleCI job `check_env_cache_sync`) to validate harmony version synchronization.

### Fix Focus Areas
- scripts/check-harmony-version-sync.sh[16-47]

### Suggested fix
Move the `WS_COUNT` computation after the `-z "$WS_VERSIONS"` check, and/or replace the `grep -c .` counting with a command that does not fail on empty input. For example:
- After verifying `WS_VERSIONS` is non-empty, use `wc -l`:
  - `WS_COUNT=$(printf '%s\n' "$WS_VERSIONS" | wc -l | tr -d ' ')`
Or keep `grep` but neutralize its exit code:
- `WS_COUNT=$(echo "$WS_VERSIONS" | grep -c . || true)`

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

@qodo-free-for-open-source-projects

Copy link
Copy Markdown

Code review by qodo was updated up to the latest commit e751234

…an unversioned env

When 'bit ci pr' syncs config from main and the lane still uses a workspace env
(so envStrategy keeps the current env) while main migrated the component onto a
different external env, the generic aspect merge copied main's teambit.envs/envs
config verbatim. That config carries the env id without its version, so the snap
failed with ExternalEnvWithoutVersion. Exclude teambit.envs/envs from the generic
merge so envStrategy is the sole authority on envs.
Comment on lines +74 to +80
// don't try to merge builder, it's possible that at one end it wasn't built yet, so it's empty.
// teambit.envs/envs is handled exclusively by envStrategy() — the generic aspect merge would copy
// `config.env` verbatim, which never carries the env's version (the version lives in the separate
// env-aspect entry that only envStrategy knows to attach). If envStrategy declines (e.g. the
// current env is a workspace component), letting the generic merge run would leak an unversioned
// external env and break the snap with ExternalEnvWithoutVersion.
private handledExtIds: string[] = [BuilderAspect.id, EnvsAspect.id];

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remediation recommended

1. Broken env lane check 🐞 Bug ≡ Correctness

After adding EnvsAspect.id to handledExtIds, envStrategy() becomes the only path that can merge
teambit.envs/envs. envStrategy() calls `isIdInWorkspaceOrOtherLane(this.currentEnv.id,
this.otherEnv.version), but populateEnvs() derives otherEnv.version` from a different extension id
than currentEnv.id, so the otherLaneIdsStr.includes(id@version) check can fail to detect that
the current env exists in the other lane and incorrectly proceed to merge/sync env config.
Agent Prompt
### Issue description
`ComponentConfigMerger` now skips generic merging of `teambit.envs/envs` by seeding `handledExtIds` with `EnvsAspect.id`. This makes `envStrategy()` the sole source of a merge result for `EnvsAspect.id`.

However, `envStrategy()` currently calls:

```ts
this.isIdInWorkspaceOrOtherLane(this.currentEnv.id, this.otherEnv.version)
```

`populateEnvs()` computes `currentEnv` and `otherEnv` (and their versions) from different extension IDs, so when the env IDs differ, `otherEnv.version` does not correspond to `currentEnv.id`. Since `isIdInWorkspaceOrOtherLane()` checks `otherLaneIdsStr.includes(`${id}@${versionOnOtherLane}`)`, this makes the “other lane” portion of the condition unreliable.

### Issue Context
This can cause `envStrategy()` to fall through to `basicConfigMerge()` and emit an env merge result when it should have returned `null` (i.e., keep the current env because it exists in the other lane).

### Fix Focus Areas
- scopes/workspace/config-merger/component-config-merger.ts[196-217]
- scopes/workspace/config-merger/component-config-merger.ts[157-186]
- scopes/workspace/config-merger/component-config-merger.ts[631-633]

### Suggested fix
Adjust the check so the version used matches the ID being checked, e.g.:
- Pass `this.currentEnv.version` when checking `this.currentEnv.id`, **or**
- Change the helper to support an id-only check against `otherLaneIdsStr` (ignore version) for this env-specific branch.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

@qodo-free-for-open-source-projects

Copy link
Copy Markdown

Code review by qodo was updated up to the latest commit 6101f4d

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants