feat: add compare command to cli - #72
Closed
kriscoleman wants to merge 1 commit into
Closed
Conversation
kriscoleman
force-pushed
the
feat/compare-cmd
branch
4 times, most recently
from
March 13, 2025 15:05
f89dd13 to
ecfab09
Compare
A new 'compare' command has been added to the CLI. This command allows users to compare two manifest files and list the changes between them. The comparison is done by loading each manifest file, then using a new function from the 'manifest' package to identify differences. Error handling has also been implemented for scenarios where loading or comparing manifests fails. Tests were also included to test the compare function. Signed-off-by: Kris Coleman <kriscodeman@gmail.com>
kriscoleman
force-pushed
the
feat/compare-cmd
branch
from
March 13, 2025 15:07
ecfab09 to
676e841
Compare
Member
|
@kriscoleman, this was automatically closed by accident. Please reopen when you have moment. Thanks! |
jonathannorris
added a commit
that referenced
this pull request
Aug 17, 2026
- @angular/core 20.3.25 -> 20.3.28 (high, alert #75: XSS via event-handler attributes) - @angular/compiler 20.3.25 -> 20.3.28 (high, alert #74: XSS via event-handler attributes) - @angular/common 20.3.25 -> 20.3.28 (high, alert #73: cache-key ambiguity in HttpTransferCache) - brace-expansion 2.1.0 -> 2.1.4 (high, alert #72: DoS via exponential-time expansion) Signed-off-by: Jonathan Norris <jonathan.norris@dynatrace.com>
jonathannorris
added a commit
that referenced
this pull request
Aug 17, 2026
* chore: resolve open dependabot security alerts - vite ^6.4.2 -> ^6.4.3 (medium/high, alerts #57 #58) - @babel/core transitive -> ^7.29.6 via override (low, alert #56) - @angular/common, @angular/core, @angular/compiler 19.x -> 20.3.25 (high/medium, alerts #52 #53 #54 #55) Signed-off-by: Jonathan Norris <jonathan.norris@dynatrace.com> * chore: align @openfeature/web-sdk with angular-sdk peer dependency Address Copilot review feedback on PR #253: @openfeature/angular-sdk 1.3.1 requires @openfeature/web-sdk ^1.9.0 as a peer dependency, but package.json still allowed ^1.7.3. Bump the declared range to match and regenerate the lockfile. Signed-off-by: Jonathan Norris <jonathan.norris@dynatrace.com> * chore: resolve additional dependabot alerts for fast-uri - fast-uri ^3.1.2 -> ^3.1.4 (high, alert #59: host confusion via failed IDN canonicalization) - fast-uri ^3.1.2 -> ^3.1.4 (high, alert #60: host confusion via literal backslash authority delimiter) Signed-off-by: Jonathan Norris <jonathan.norris@dynatrace.com> * fix(deps): regenerate OpenAPI client for oapi-codegen v2.8.0 Signed-off-by: Jonathan Norris <jonathan.norris@dynatrace.com> * chore: resolve postcss alert and pin fast-uri exactly - postcss <= 8.5.17 -> ^8.5.18 override (high, alert #62) - pin fast-uri override to exact 3.1.4 per CodeRabbit review suggestion Signed-off-by: Jonathan Norris <jonathan.norris@dynatrace.com> * chore: bump fast-uri to 3.1.5 for dependabot alert #64 - fast-uri 3.1.4 -> 3.1.5 (high, alert #64: host confusion via backslash authority introducer) Signed-off-by: Jonathan Norris <jonathan.norris@dynatrace.com> * chore: resolve open dependabot security alerts - @angular/core 20.3.25 -> 20.3.28 (high, alert #75: XSS via event-handler attributes) - @angular/compiler 20.3.25 -> 20.3.28 (high, alert #74: XSS via event-handler attributes) - @angular/common 20.3.25 -> 20.3.28 (high, alert #73: cache-key ambiguity in HttpTransferCache) - brace-expansion 2.1.0 -> 2.1.4 (high, alert #72: DoS via exponential-time expansion) Signed-off-by: Jonathan Norris <jonathan.norris@dynatrace.com> --------- Signed-off-by: Jonathan Norris <jonathan.norris@dynatrace.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR
feat: add compare command to cli
A new 'compare' command has been added to the CLI. This command allows users to compare two manifest files and list the changes between them. The comparison is done by loading each manifest file, then using a new function from the 'manifest' package to identify differences. Error handling has also been implemented for scenarios where loading or comparing manifests fails.
feat: add tests for manifest comparison
Added two new test functions in the 'manifest' package. The first function, 'TestCompareDifferentManifests', checks if the 'Compare' function correctly identifies changes between two different manifests. The second function, 'TestCompareIdenticalManifests', verifies that no changes are reported when comparing identical manifests. Both tests use a helper function to sort the changes before comparing them.
Related Issues
#32
Notes
These changes are pretty straightforward, just adds the compare function to the cli commands, but this is on top of Michaels WIP work. I did have to make a couple changes to get things building that I suspect Michael may have already handled in his code, so let me know if there are any conflicts you'd like me to sort out.
Follow-up Tasks
Introducing a simple comparison between two files is a good place to start.
However, long term I wonder if we could make it operate with a little more context awareness.
I use aws cdk a lot for Infrastructure as Code, and I'm a fan of it's cdk diff command. It has a pretty simple dev ex and it's behavior reminds me of what we're doing here.
At any time, I can check my branche's IaC stack differences against another environment.
I can branch off
mainand change my stacks, then run:cdk diff --profile devto check what the diff of my local is against devcdk diff --profile prodto check what the diff of my local is against prodand so forth.
It might be cool in the future if we could have a simple
openfeature compare --env prodpattern to abstract the need to define paths for the compare.I think as we add further foundational features, like
openfeature pull, it might assist us achieving such a pattern.How to test
manual testing:
go build -o openfeaturesudo mv openfeature /usr/local/bin/openfeature compare <pathToOld> <pathToNew>unit tests:
go test .