fix(jsonpath): Prevent converting date string to DateTime in JSONPath#5130
Merged
niheaven merged 3 commits intoScoopInstaller:developfrom Sep 9, 2022
Merged
Conversation
Member
|
I'm okay with this fix, but how do we ensure it doesn't break any existing manifest's checkver (because the checkver output will now be different)? /cc @niheaven |
Member
|
Will review it soon, should test as many as we can to ensure the change of parser type doesn't cause problems. |
niheaven
approved these changes
Sep 9, 2022
1 task
1 task
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.
Description
If you extract the date and time string with
checkver/jsonpathin the manifest file, it will be converted toM/d/yyyy h:m:s ttformat instead of the original string. This is due to Json.net converting to DateTime type, so it suppresses the conversion.Motivation and Context
Closes #5129
How Has This Been Tested?
scoop bucket add versiongoneovim-nightly.jsonwith goneovim-nightly: Fix version Versions#618lib/json.ps1with this PRcheckver.ps1 goneovim-nightly ~/scoop/bucket/versions/bucket -fChecklist:
developbranch.