node-semver


Namenode-semver JSON
Version 0.9.0 PyPI version JSON
download
home_pagehttps://github.com/podhmo/python-node-semver
Summaryport of node-semver
upload_time2023-02-23 14:28:56
maintainer
docs_urlNone
authorpodhmo
requires_python
licensemit
keywords version semver node-semver
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI
coveralls test coverage No coveralls.
            node-semver
=================

.. image:: https://github.com/podhmo/python-node-semver/actions/workflows/python-package.yml/badge.svg
    :target: https://github.com/podhmo/python-node-semver/actions/workflows/python-package.yml

python version of [node-semver](https://github.com/isaacs/node-semver)

install
----------------------------------------

.. code-block:: console

   pip install node-semver

examples
----------------------------------------

.. code-block:: python

   from semver import max_satisfying

   versions = ['1.2.3', '1.2.4', '1.2.5', '1.2.6', '2.0.1']
   range_ = '~1.2.3'
   assert max_satisfying(versions, range_, loose=False) == '1.2.6'


   versions = ['1.1.0', '1.2.0', '1.2.1', '1.3.0', '2.0.0b1', '2.0.0b2', '2.0.0b3', '2.0.0', '2.1.0']
   range_ = '~2.0.0'
   assert max_satisfying(versions, range_, loose=True) == '2.0.0'

   try:
       (max_satisfying(versions, range_, loose=False) == '2.0.0')
   except ValueError as e:
       assert e.args[0] == "Invalid Version: 2.0.0b1"

   versions = ['1.2.3', '1.2.4', '1.2.5', '1.2.6-pre.1', '2.0.1']
   range_ = '~1.2.3'
   assert max_satisfying(versions, range_, loose=False, include_prerelease=True) == '1.2.6-pre.1'
   assert max_satisfying(versions, range_, loose=False, include_prerelease=False) == '1.2.5'


0.9.0

- RENAME MODULE semver -> nodesemver (#39)
- pre release range fix (#40)

0.8.1

- fix erroneous parsing of $ component version numbers (#44)

0.8.0

- handle 4-digit version correctly (#35)

0.7.0

- include tests in source distributions (#31)

0.6.0

- more strict error handling (InvalidTypeIncluded is added)

0.5.1

- bug fix

0.5.0

- include_prerelease option is added

0.4.2

- fix bug for support 4-digit (handling prelease and build)

0.4.0

- suport 4-digit version (e.g. x.y.z.a)

0.3.0

- drop python2.x support
- bug fix, Add sort key function #14



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/podhmo/python-node-semver",
    "name": "node-semver",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "version semver node-semver",
    "author": "podhmo",
    "author_email": "ababjam61+github@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/eb/c5/e823658f716b17ab1c52d68ed13a0e09c0130af052401a26b5738e4290cc/node-semver-0.9.0.tar.gz",
    "platform": null,
    "description": "node-semver\n=================\n\n.. image:: https://github.com/podhmo/python-node-semver/actions/workflows/python-package.yml/badge.svg\n    :target: https://github.com/podhmo/python-node-semver/actions/workflows/python-package.yml\n\npython version of [node-semver](https://github.com/isaacs/node-semver)\n\ninstall\n----------------------------------------\n\n.. code-block:: console\n\n   pip install node-semver\n\nexamples\n----------------------------------------\n\n.. code-block:: python\n\n   from semver import max_satisfying\n\n   versions = ['1.2.3', '1.2.4', '1.2.5', '1.2.6', '2.0.1']\n   range_ = '~1.2.3'\n   assert max_satisfying(versions, range_, loose=False) == '1.2.6'\n\n\n   versions = ['1.1.0', '1.2.0', '1.2.1', '1.3.0', '2.0.0b1', '2.0.0b2', '2.0.0b3', '2.0.0', '2.1.0']\n   range_ = '~2.0.0'\n   assert max_satisfying(versions, range_, loose=True) == '2.0.0'\n\n   try:\n       (max_satisfying(versions, range_, loose=False) == '2.0.0')\n   except ValueError as e:\n       assert e.args[0] == \"Invalid Version: 2.0.0b1\"\n\n   versions = ['1.2.3', '1.2.4', '1.2.5', '1.2.6-pre.1', '2.0.1']\n   range_ = '~1.2.3'\n   assert max_satisfying(versions, range_, loose=False, include_prerelease=True) == '1.2.6-pre.1'\n   assert max_satisfying(versions, range_, loose=False, include_prerelease=False) == '1.2.5'\n\n\n0.9.0\n\n- RENAME MODULE semver -> nodesemver (#39)\n- pre release range fix (#40)\n\n0.8.1\n\n- fix erroneous parsing of $ component version numbers (#44)\n\n0.8.0\n\n- handle 4-digit version correctly (#35)\n\n0.7.0\n\n- include tests in source distributions (#31)\n\n0.6.0\n\n- more strict error handling (InvalidTypeIncluded is added)\n\n0.5.1\n\n- bug fix\n\n0.5.0\n\n- include_prerelease option is added\n\n0.4.2\n\n- fix bug for support 4-digit (handling prelease and build)\n\n0.4.0\n\n- suport 4-digit version (e.g. x.y.z.a)\n\n0.3.0\n\n- drop python2.x support\n- bug fix, Add sort key function #14\n\n\n",
    "bugtrack_url": null,
    "license": "mit",
    "summary": "port of node-semver",
    "version": "0.9.0",
    "project_urls": {
        "Homepage": "https://github.com/podhmo/python-node-semver"
    },
    "split_keywords": [
        "version",
        "semver",
        "node-semver"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1a4b180481021692a76dc91f46fa6a49cdef4c3e630c77a83b7fda3f4eb7aa04",
                "md5": "66b967ac1c1077600408b62bb996fe35",
                "sha256": "8153270903772b1e59500ced6f0aca0f7bdb021651c27584e9283b7077b4916b"
            },
            "downloads": -1,
            "filename": "node_semver-0.9.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "66b967ac1c1077600408b62bb996fe35",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 12165,
            "upload_time": "2023-02-23T14:28:55",
            "upload_time_iso_8601": "2023-02-23T14:28:55.129911Z",
            "url": "https://files.pythonhosted.org/packages/1a/4b/180481021692a76dc91f46fa6a49cdef4c3e630c77a83b7fda3f4eb7aa04/node_semver-0.9.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ebc5e823658f716b17ab1c52d68ed13a0e09c0130af052401a26b5738e4290cc",
                "md5": "b02700e242fd5cc57b5297b41c535825",
                "sha256": "04aa0b0016dbc06748d6378c42d8cf82a343415bd9fca6284f488041d08b33bb"
            },
            "downloads": -1,
            "filename": "node-semver-0.9.0.tar.gz",
            "has_sig": false,
            "md5_digest": "b02700e242fd5cc57b5297b41c535825",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 12632,
            "upload_time": "2023-02-23T14:28:56",
            "upload_time_iso_8601": "2023-02-23T14:28:56.834985Z",
            "url": "https://files.pythonhosted.org/packages/eb/c5/e823658f716b17ab1c52d68ed13a0e09c0130af052401a26b5738e4290cc/node-semver-0.9.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-02-23 14:28:56",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "podhmo",
    "github_project": "python-node-semver",
    "travis_ci": true,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "node-semver"
}
        
Elapsed time: 0.21557s