2323from platformio .util import strip_ansi_codes
2424
2525PlatformioCLI .leftover_args = ["--json-output" ] # hook for click
26+ ARDUINO_JSON_VERSION = "6.21.5"
2627
2728
2829def test_search (clirunner , validate_cliresult ):
@@ -44,10 +45,10 @@ def test_global_install_registry(clirunner, validate_cliresult, isolated_pio_cor
4445 "-g" ,
4546 "install" ,
4647 "64" ,
47- "ArduinoJson@~5.10.0 " ,
48- "547@2.2.4 " ,
48+ "ArduinoJson@~6 " ,
49+ "547@2.7.3 " ,
4950 "AsyncMqttClient@<=0.8.2" ,
50- "Adafruit PN532@1.2.0 " ,
51+ "Adafruit PN532@1.3.2 " ,
5152 ],
5253 )
5354 validate_cliresult (result )
@@ -60,7 +61,7 @@ def test_global_install_registry(clirunner, validate_cliresult, isolated_pio_cor
6061 items1 = [d .basename for d in isolated_pio_core .join ("lib" ).listdir ()]
6162 items2 = [
6263 "ArduinoJson" ,
63- "ArduinoJson@5.10.1 " ,
64+ "fArduinoJson@{ARDUINO_JSON_VERSION} " ,
6465 "NeoPixelBus" ,
6566 "AsyncMqttClient" ,
6667 "ESPAsyncTCP" ,
@@ -79,7 +80,7 @@ def test_global_install_archive(clirunner, validate_cliresult, isolated_pio_core
7980 "install" ,
8081 "https://github.com/bblanchon/ArduinoJson/archive/v5.8.2.zip" ,
8182 "https://github.com/bblanchon/ArduinoJson/archive/v5.8.2.zip@5.8.2" ,
82- "SomeLib=https://dl.registry.platformio.org/download/milesburton/library/DallasTemperature/3.8.1 /DallasTemperature-3.8.1 .tar.gz" ,
83+ "SomeLib=https://dl.registry.platformio.org/download/milesburton/library/DallasTemperature/3.11.0 /DallasTemperature-3.11.0 .tar.gz" ,
8384 "https://github.com/Pedroalbuquerque/ESP32WebServer/archive/master.zip" ,
8485 ],
8586 )
@@ -142,7 +143,7 @@ def test_install_duplicates( # pylint: disable=unused-argument
142143 [
143144 "-g" ,
144145 "install" ,
145- "https://dl.registry.platformio.org/download/milesburton/library/DallasTemperature/3.8.1 /DallasTemperature-3.8.1 .tar.gz" ,
146+ "https://dl.registry.platformio.org/download/milesburton/library/DallasTemperature/3.11.0 /DallasTemperature-3.11.0 .tar.gz" ,
146147 ],
147148 )
148149 validate_cliresult (result )
@@ -176,11 +177,11 @@ def test_global_lib_list(clirunner, validate_cliresult):
176177 n in result .output
177178 for n in (
178179 "required: https://github.com/Pedroalbuquerque/ESP32WebServer/archive/master.zip" ,
179- "ArduinoJson @ 5.10.1 " ,
180+ f "ArduinoJson @ { ARDUINO_JSON_VERSION } " ,
180181 "required: git+https://github.com/gioblu/PJON.git#3.0" ,
181182 "PJON @ 3.0.0+sha.1fb26f" ,
182183 )
183- )
184+ ), result . output
184185
185186 result = clirunner .invoke (cmd_lib , ["-g" , "list" , "--json-output" ])
186187 assert all (
@@ -220,7 +221,7 @@ def test_global_lib_list(clirunner, validate_cliresult):
220221 "ArduinoJson@5.8.2" ,
221222 "ArduinoJson@5.10.1" ,
222223 "AsyncMqttClient@0.8.2" ,
223- "NeoPixelBus@2.2.4 " ,
224+ "NeoPixelBus@2.7.3 " ,
224225 "PJON@6.2.0+sha.07fe9aa" ,
225226 "PJON@3.0.0+sha.1fb26fd" ,
226227 "PubSubClient@2.6.0+sha.bef5814" ,
@@ -249,7 +250,7 @@ def test_global_lib_update(clirunner, validate_cliresult):
249250 assert "__pkg_dir" in oudated [0 ]
250251 result = clirunner .invoke (cmd_lib , ["-g" , "update" , oudated [0 ]["__pkg_dir" ]])
251252 validate_cliresult (result )
252- assert "Removing NeoPixelBus @ 2.2.4 " in strip_ansi_codes (result .output )
253+ assert "Removing NeoPixelBus @ 2.7.3 " in strip_ansi_codes (result .output )
253254
254255 # update all libraries
255256 result = clirunner .invoke (
0 commit comments