Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(checkver): improve JSONPath extraction support #4522

Merged
merged 10 commits into from Nov 29, 2021

Conversation

pratikpc
Copy link
Contributor

  1. Extract multiple versions
  2. Reverse versions, especially if regex is absent
  3. Support returning single value even if multiple versions were found
    This is probably required with regex mode on
  4. Simplify data extraction using JValue over JObject/JArray combination. Saves a few function calls

1. Extract multiple versions
2. Reverse versions, especially if regex is absent
3. Support returning single value even if multiple versions were found
This is probably required with regex mode on
4. Simplify data extraction using JValue over JObject/JArray combination. Saves a few function calls
@pratikpc
Copy link
Contributor Author

@niheaven I am not one of the best when it comes to PowerShell so could you please check this code?

This solves the mariadb issue and allows us to use '$.releases[?(@.status=='stable')].release_number' there alone

bin/checkver.ps1 Outdated Show resolved Hide resolved
bin/checkver.ps1 Outdated Show resolved Hide resolved
lib/json.ps1 Outdated Show resolved Hide resolved
lib/json.ps1 Outdated Show resolved Hide resolved
lib/json.ps1 Outdated Show resolved Hide resolved
lib/json.ps1 Outdated Show resolved Hide resolved
pratikpc and others added 6 commits November 19, 2021 22:10
Co-authored-by: Hsiao-nan Cheung <niheaven@gmail.com>
Co-authored-by: Hsiao-nan Cheung <niheaven@gmail.com>
Co-authored-by: Hsiao-nan Cheung <niheaven@gmail.com>
Co-authored-by: Hsiao-nan Cheung <niheaven@gmail.com>
Co-authored-by: Hsiao-nan Cheung <niheaven@gmail.com>
Co-authored-by: Hsiao-nan Cheung <niheaven@gmail.com>
bin/checkver.ps1 Outdated Show resolved Hide resolved
bin/checkver.ps1 Outdated Show resolved Hide resolved
bin/checkver.ps1 Outdated Show resolved Hide resolved
pratikpc and others added 2 commits November 22, 2021 05:21
Co-authored-by: Hsiao-nan Cheung <niheaven@gmail.com>
Co-authored-by: Hsiao-nan Cheung <niheaven@gmail.com>
Copy link
Member

@niheaven niheaven left a comment

Choose a reason for hiding this comment

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

LGTM

@niheaven
Copy link
Member

@ScoopInstaller/maintainers Maybe it's okay to merge develop into master and we could go forward by merging more PRs into develop (incl. this one)?

@pratikpc
Copy link
Contributor Author

@niheaven I agree

To me develop as it stands looks stable

The current develop could be merged into master while this becomes the new top commit on develop after its rebased.

Base automatically changed from develop to master November 22, 2021 14:40
@pratikpc pratikpc requested a review from rasa November 22, 2021 14:42
@niheaven niheaven changed the base branch from master to develop November 22, 2021 14:55
@niheaven niheaven merged commit 4ec9ecc into develop Nov 29, 2021
@niheaven niheaven deleted the pratikpc-regex-json-patch branch November 29, 2021 08:55
niheaven added a commit that referenced this pull request Dec 25, 2021
Related PRs:
- #4531 @filmor 
  - ac71fcc @niheaven 
- #4535 @rashil2000 
- #4522 @pratikpc 
- #4550 @niheaven 
- #4528 @niheaven 
- #4532 @MrNuggelz
- #4155 @MrNuggelz Co-authored-by: @rashil2000 
  - #4581 @niheaven 
  - fb496c4 @rashil2000 
- #4543 @rashil2000 Co-authored-by: @niheaven 
  - #4555 @rashil2000 
  - 3c90d1a @rashil2000 
  - 2ec00d5 @rashil2000 
- #4567 @rashil2000 
  - cbe29ed @rashil2000 
- #4570 @niheaven 
  - #4582 @niheaven 
- #4571 @niheaven 
- #3244 @nickbudi 
- #3821 @jfastnacht Co-authored-by: @rasa 
- #4578 @tukanos
- #4579 @rashil2000 

Co-authored-by: Hsiao-nan Cheung <niheaven@gmail.com>
Co-authored-by: Rashil Gandhi <46838874+rashil2000@users.noreply.github.com>
Co-authored-by: Jakub Čábera <cabera.jakub@gmail.com>
Co-authored-by: Ross Smith II <ross@smithii.com>
Co-authored-by: Benedikt Reinartz <filmor@gmail.com>
Co-authored-by: Joris <MrNuggelz@users.noreply.github.com>
Co-authored-by: Pratik Chowdhury <pratikc@live.co.uk>
Co-authored-by: Rashil Gandhi <rashil2000@gmail.com>
Co-authored-by: nickbudi <nickbudi@users.noreply.github.com>
Co-authored-by: Julian <github@fastnacht.consulting>
Co-authored-by: tukanos <patrik.svestka@gmail.com>
se35710 pushed a commit to se35710/scoop that referenced this pull request Mar 8, 2022
se35710 pushed a commit to se35710/scoop that referenced this pull request Mar 8, 2022
Related PRs:
- ScoopInstaller#4531 @filmor
  - ac71fcc @niheaven
- ScoopInstaller#4535 @rashil2000
- ScoopInstaller#4522 @pratikpc
- ScoopInstaller#4550 @niheaven
- ScoopInstaller#4528 @niheaven
- ScoopInstaller#4532 @MrNuggelz
- ScoopInstaller#4155 @MrNuggelz Co-authored-by: @rashil2000
  - ScoopInstaller#4581 @niheaven
  - fb496c4 @rashil2000
- ScoopInstaller#4543 @rashil2000 Co-authored-by: @niheaven
  - ScoopInstaller#4555 @rashil2000
  - 3c90d1a @rashil2000
  - 2ec00d5 @rashil2000
- ScoopInstaller#4567 @rashil2000
  - cbe29ed @rashil2000
- ScoopInstaller#4570 @niheaven
  - ScoopInstaller#4582 @niheaven
- ScoopInstaller#4571 @niheaven
- ScoopInstaller#3244 @nickbudi
- ScoopInstaller#3821 @jfastnacht Co-authored-by: @rasa
- ScoopInstaller#4578 @tukanos
- ScoopInstaller#4579 @rashil2000

Co-authored-by: Hsiao-nan Cheung <niheaven@gmail.com>
Co-authored-by: Rashil Gandhi <46838874+rashil2000@users.noreply.github.com>
Co-authored-by: Jakub Čábera <cabera.jakub@gmail.com>
Co-authored-by: Ross Smith II <ross@smithii.com>
Co-authored-by: Benedikt Reinartz <filmor@gmail.com>
Co-authored-by: Joris <MrNuggelz@users.noreply.github.com>
Co-authored-by: Pratik Chowdhury <pratikc@live.co.uk>
Co-authored-by: Rashil Gandhi <rashil2000@gmail.com>
Co-authored-by: nickbudi <nickbudi@users.noreply.github.com>
Co-authored-by: Julian <github@fastnacht.consulting>
Co-authored-by: tukanos <patrik.svestka@gmail.com>
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.

None yet

2 participants