Bun Version update (#1216)
This commit is contained in:
parent
5e41985bfe
commit
e180f4d43a
@ -44,7 +44,7 @@ MIN_NODE_VERSION = "16.8.0"
|
|||||||
|
|
||||||
# Valid bun versions.
|
# Valid bun versions.
|
||||||
MIN_BUN_VERSION = "0.5.9"
|
MIN_BUN_VERSION = "0.5.9"
|
||||||
MAX_BUN_VERSION = "0.6.1"
|
MAX_BUN_VERSION = "0.6.9"
|
||||||
|
|
||||||
# Files and directories used to init a new project.
|
# Files and directories used to init a new project.
|
||||||
# The root directory of the pynecone library.
|
# The root directory of the pynecone library.
|
||||||
|
@ -10,10 +10,23 @@ from pynecone import Env, constants
|
|||||||
from pynecone.utils import build, format, imports, prerequisites, types
|
from pynecone.utils import build, format, imports, prerequisites, types
|
||||||
from pynecone.vars import Var
|
from pynecone.vars import Var
|
||||||
|
|
||||||
|
|
||||||
|
def get_above_max_version():
|
||||||
|
"""Get the 1 version above the max required bun version.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
max bun version plus one.
|
||||||
|
|
||||||
|
"""
|
||||||
|
semantic_version_list = constants.MAX_BUN_VERSION.split(".")
|
||||||
|
semantic_version_list[-1] = str(int(semantic_version_list[-1]) + 1) # type: ignore
|
||||||
|
return ".".join(semantic_version_list)
|
||||||
|
|
||||||
|
|
||||||
V055 = version.parse("0.5.5")
|
V055 = version.parse("0.5.5")
|
||||||
V059 = version.parse("0.5.9")
|
V059 = version.parse("0.5.9")
|
||||||
V056 = version.parse("0.5.6")
|
V056 = version.parse("0.5.6")
|
||||||
V062 = version.parse("0.6.2")
|
VMAXPLUS1 = version.parse(get_above_max_version())
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize(
|
@pytest.mark.parametrize(
|
||||||
@ -245,7 +258,7 @@ def test_format_route(route: str, expected: bool):
|
|||||||
[
|
[
|
||||||
(V055, False, "yes"),
|
(V055, False, "yes"),
|
||||||
(V059, True, None),
|
(V059, True, None),
|
||||||
(V062, False, "yes"),
|
(VMAXPLUS1, False, "yes"),
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
def test_bun_validate_and_install(mocker, bun_version, is_valid, prompt_input):
|
def test_bun_validate_and_install(mocker, bun_version, is_valid, prompt_input):
|
||||||
|
Loading…
Reference in New Issue
Block a user