diff --git a/CHANGELOG.md b/CHANGELOG.md index f78e152..a9a48ac 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.19.0] - 2026-04-20 + +### Added +- `IGNORE_APP_RELATIONSHIP` env var. When set, the `app` field in target configs is ignored — targets are no longer triggered just because their corresponding app is tainted (only direct changes, lockfile changes, and tainted workspace imports apply). + ## [0.18.1] - 2026-04-13 ### Changed @@ -257,6 +262,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Multi-stage Docker build - Automated vendor upgrade workflow +[0.19.0]: https://github.com/gooddata/gooddata-goodchanges/compare/v0.18.1...v0.19.0 [0.18.1]: https://github.com/gooddata/gooddata-goodchanges/compare/v0.18.0...v0.18.1 [0.18.0]: https://github.com/gooddata/gooddata-goodchanges/compare/v0.17.1...v0.18.0 [0.17.1]: https://github.com/gooddata/gooddata-goodchanges/compare/v0.17.0...v0.17.1 diff --git a/README.md b/README.md index 168453e..ec7c48a 100644 --- a/README.md +++ b/README.md @@ -57,14 +57,15 @@ JSON array of target objects: ## Environment variables -| Variable | Description | Default | -|------------------|-------------------------------------------------------------------------------------------------------------------------------|-----------------| -| `LOG_LEVEL` | Logging verbosity. `BASIC` for standard logging, `DEBUG` for verbose AST/taint tracing to stderr | _(no logging)_ | -| `INCLUDE_TYPES` | When set to any non-empty value, includes type-only changes (interfaces, type aliases, type annotations) in taint propagation | _(disabled)_ | -| `INCLUDE_CSS` | When set to any non-empty value, enables CSS/SCSS change detection and taint propagation through `@use`/`@import` chains | _(disabled)_ | -| `COMPARE_COMMIT` | Specific git commit hash to compare against (overrides branch-based comparison) | _(empty)_ | -| `COMPARE_BRANCH` | Git branch to compute merge base against | `origin/master` | -| `TARGETS` | Comma-delimited list of target names to include in output. Supports `*` wildcard (e.g. `*backstop*,@gooddata/sdk-*`). | _(all targets)_ | +| Variable | Description | Default | +|---------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------| +| `LOG_LEVEL` | Logging verbosity. `BASIC` for standard logging, `DEBUG` for verbose AST/taint tracing to stderr | _(no logging)_ | +| `INCLUDE_TYPES` | When set to any non-empty value, includes type-only changes (interfaces, type aliases, type annotations) in taint propagation | _(disabled)_ | +| `INCLUDE_CSS` | When set to any non-empty value, enables CSS/SCSS change detection and taint propagation through `@use`/`@import` chains | _(disabled)_ | +| `COMPARE_COMMIT` | Specific git commit hash to compare against (overrides branch-based comparison) | _(empty)_ | +| `COMPARE_BRANCH` | Git branch to compute merge base against | `origin/master` | +| `TARGETS` | Comma-delimited list of target names to include in output. Supports `*` wildcard (e.g. `*backstop*,@gooddata/sdk-*`). | _(all targets)_ | +| `IGNORE_APP_RELATIONSHIP` | When set to any non-empty value, ignores the `app` field in target configs. Targets are no longer triggered solely because their corresponding app is tainted. | _(disabled)_ | ## Library vs app detection @@ -124,7 +125,7 @@ Each target is triggered by any of these conditions: 1. **Direct file changes** -- files matching `changeDirs` globs changed (excluding ignored paths). Defaults to `**/*` (entire project) when `changeDirs` is not set. 2. **External dependency changes** -- a dependency version changed in `pnpm-lock.yaml` 3. **Tainted workspace imports** -- a file matching `changeDirs` globs imports a tainted symbol from a workspace library -4. **Corresponding app is tainted** -- the app specified by `app` is affected (any of the above conditions) +4. **Corresponding app is tainted** -- the app specified by `app` is affected (any of the above conditions). Disabled when `IGNORE_APP_RELATIONSHIP` env var is set. ### changeDirs diff --git a/VERSION b/VERSION index 6b2d58c..3f46c4d 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.18.1 \ No newline at end of file +0.19.0 \ No newline at end of file diff --git a/main.go b/main.go index e3d0686..6a54a41 100644 --- a/main.go +++ b/main.go @@ -24,6 +24,7 @@ var version string var flagIncludeTypes bool var flagIncludeCSS bool +var flagIgnoreAppRelationship bool var flagLog bool var flagDebug bool @@ -51,10 +52,25 @@ func main() { fmt.Println() os.Exit(0) } + if arg == "--list" { + rushConfig, err := rush.LoadConfig(".") + if err != nil { + fmt.Fprintf(os.Stderr, "Error loading rush config: %v\n", err) + os.Exit(1) + } + data, err := json.MarshalIndent(rushConfig.Projects, "", " ") + if err != nil { + fmt.Fprintf(os.Stderr, "Error marshalling projects: %v\n", err) + os.Exit(1) + } + fmt.Println(string(data)) + os.Exit(0) + } } flagIncludeTypes = envBool("INCLUDE_TYPES") flagIncludeCSS = envBool("INCLUDE_CSS") + flagIgnoreAppRelationship = envBool("IGNORE_APP_RELATIONSHIP") logLevel := strings.ToUpper(os.Getenv("LOG_LEVEL")) flagLog = logLevel == "BASIC" || logLevel == "DEBUG" @@ -392,7 +408,7 @@ func main() { } // Quick check: app taint - if td.App != nil { + if td.App != nil && !flagIgnoreAppRelationship { appInfo := projectMap[*td.App] if appInfo != nil { if changedProjects[*td.App] != nil {