Skip to content

Commit fda414a

Browse files
authored
bump support for JSON 1.0 (#352)
1 parent 16c0813 commit fda414a

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Artifacts = "1"
2121
CoverageTools = "1"
2222
Downloads = "1.6.0"
2323
HTTP = "0.8, 0.9, 1"
24-
JSON = "0.21"
24+
JSON = "1"
2525
MbedTLS = "0.6, 0.7, 1"
2626
SHA = "0.7.0"
2727
Scratch = "1"

src/codecov_functions.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ function export_codecov_json(fcs::Vector{FileCoverage}, output_file="coverage.js
4040
codecov_data = to_codecov_json(fcs)
4141

4242
open(output_file, "w") do io
43-
JSON.print(io, codecov_data)
43+
JSON.json(io, codecov_data)
4444
end
4545

4646
@info "Codecov JSON exported to: $output_file"

src/codecovio.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ function add_ci_to_kwargs(kwargs::Dict)
163163
build = ENV["BUILD_BUILDID"],
164164
)
165165
elseif haskey(ENV, "GITHUB_ACTION") # GitHub Actions
166-
event_path = open(JSON.Parser.parse, ENV["GITHUB_EVENT_PATH"])
166+
event_path = open(JSON.parse, ENV["GITHUB_EVENT_PATH"])
167167
ref = ENV["GITHUB_REF"]
168168
if startswith(ref, "refs/heads/")
169169
branch = ref[12:end]
@@ -308,7 +308,7 @@ end
308308
function upload_to_s3(; s3url, fcs)
309309
startswith(s3url, "https://") || error("Invalid codecov response: $s3url")
310310
# Upload to S3
311-
request = HTTP.put(s3url; body=json(to_json(fcs)),
311+
request = HTTP.put(s3url; body=JSON.json(to_json(fcs)),
312312
header=Dict("Content-Type" => "application/json",
313313
"x-amz-storage-class" => "REDUCED_REDUNDANCY"))
314314
@debug "Result of submission:" * mask_token(String(request))

src/coveralls.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ function prepare_request(fcs::Vector{FileCoverage}, local_env::Bool, git_info=qu
121121
data["service_name"] = "github"
122122
data["git"] = parse_git_info(git_info)
123123

124-
event_path = open(JSON.Parser.parse, ENV["GITHUB_EVENT_PATH"])
124+
event_path = open(JSON.parse, ENV["GITHUB_EVENT_PATH"])
125125
github_pr_info = get(event_path, "pull_request", Dict())
126126
github_pr = get(github_pr_info, "number", "")
127127
github_pr::Union{AbstractString, Integer}

src/coveralls_functions.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ function export_coveralls_json(fcs::Vector{FileCoverage}, output_file="coveralls
6969
end
7070

7171
open(output_file, "w") do io
72-
JSON.print(io, coveralls_data)
72+
JSON.json(io, coveralls_data)
7373
end
7474

7575
@info "Coveralls JSON exported to: $output_file"

0 commit comments

Comments
 (0)