Skip to content

Commit 4068d47

Browse files
authored
replace JSON3 with JSON (#202)
* replace JSON3 with JSON.jl * update changelog * bump JSON compat --------- Co-authored-by: Christopher Doris <github.com/cjdoris>
1 parent 44e39ab commit 4068d47

File tree

4 files changed

+8
-7
lines changed

4 files changed

+8
-7
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
## Unreleased
44
* If the `env` preference (or `JULIA_CONDAPKG_ENV`) can now be a relative path, which is
55
taken to be relative to the current Julia project.
6+
* Internal: move from JSON3 to JSON v1.
67

78
## 0.2.33 (2025-09-18)
89
* Add `[dev]` section to CondaPkg.toml, specifying development dependencies which are only

Project.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ authors = ["Christopher Doris <github.com/cjdoris>"]
44
version = "0.2.33"
55

66
[deps]
7-
JSON3 = "0f8b85d8-7281-11e9-16c2-39a750bddbf1"
7+
JSON = "682c06a0-de6a-54ab-a142-c8b1cf79cde6"
88
Markdown = "d6f4376e-aef5-505a-96c1-9c027394607a"
99
MicroMamba = "0b3b1443-0f03-428d-bdfb-f27f9c1191ea"
1010
Pidfile = "fa939f87-e72e-5be4-a000-7fc836dbe307"
@@ -16,7 +16,7 @@ pixi_jll = "4d7b5844-a134-5dcd-ac86-c8f19cd51bed"
1616

1717
[compat]
1818
Aqua = "0 - 999"
19-
JSON3 = "1.9"
19+
JSON = "1.2"
2020
Markdown = "1"
2121
MicroMamba = "0.1.4"
2222
OpenSSL_jll = "0 - 999"

src/CondaPkg.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ if isdefined(Base, :Experimental) &&
99
end
1010

1111
using Base: @kwdef
12-
using JSON3: JSON3
12+
using JSON: JSON
1313
using Pidfile: Pidfile
1414
using Preferences: @load_preference
1515
using Pkg: Pkg

src/deps.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -134,11 +134,11 @@ function current_packages()
134134
b = backend()
135135
if b in CONDA_BACKENDS
136136
cmd = conda_cmd(`list -p $(envdir()) --json`)
137-
pkglist = JSON3.read(cmd)
137+
pkglist = JSON.parse(cmd)
138138
elseif b in PIXI_BACKENDS
139139
cmd =
140140
pixi_cmd(`list --manifest-path $(joinpath(STATE.meta_dir, "pixi.toml")) --json`)
141-
pkglist = JSON3.read(cmd)
141+
pkglist = JSON.parse(cmd)
142142
pkglist = [pkg for pkg in pkglist if pkg.kind == "conda"]
143143
end
144144
Dict(normalise_pkg(pkg.name) => pkg for pkg in pkglist)
@@ -149,12 +149,12 @@ function current_pip_packages()
149149
if b in CONDA_BACKENDS
150150
pkglist = withenv() do
151151
cmd = `$(which("pip")) list --format=json`
152-
JSON3.read(cmd)
152+
JSON.parse(cmd)
153153
end
154154
elseif b in PIXI_BACKENDS
155155
cmd =
156156
pixi_cmd(`list --manifest-path $(joinpath(STATE.meta_dir, "pixi.toml")) --json`)
157-
pkglist = JSON3.read(cmd)
157+
pkglist = JSON.parse(cmd)
158158
pkglist = [pkg for pkg in pkglist if pkg.kind == "pypi"]
159159
end
160160
Dict(normalise_pip_pkg(pkg.name) => pkg for pkg in pkglist)

0 commit comments

Comments
 (0)