nodeenv 1.11.0__tar.gz → 1.11.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {nodeenv-1.11.0 → nodeenv-1.11.1}/CHANGES +8 -0
- {nodeenv-1.11.0 → nodeenv-1.11.1}/PKG-INFO +9 -1
- {nodeenv-1.11.0 → nodeenv-1.11.1}/nodeenv.egg-info/PKG-INFO +9 -1
- {nodeenv-1.11.0 → nodeenv-1.11.1}/nodeenv.py +15 -3
- {nodeenv-1.11.0 → nodeenv-1.11.1}/tests/nodeenv_test.py +35 -0
- {nodeenv-1.11.0 → nodeenv-1.11.1}/.coveragerc +0 -0
- {nodeenv-1.11.0 → nodeenv-1.11.1}/.github/release.yml +0 -0
- {nodeenv-1.11.0 → nodeenv-1.11.1}/.github/workflows/main.yml +0 -0
- {nodeenv-1.11.0 → nodeenv-1.11.1}/.github/workflows/tests.yml +0 -0
- {nodeenv-1.11.0 → nodeenv-1.11.1}/.gitignore +0 -0
- {nodeenv-1.11.0 → nodeenv-1.11.1}/AUTHORS +0 -0
- {nodeenv-1.11.0 → nodeenv-1.11.1}/LICENSE +0 -0
- {nodeenv-1.11.0 → nodeenv-1.11.1}/MANIFEST.in +0 -0
- {nodeenv-1.11.0 → nodeenv-1.11.1}/Makefile +0 -0
- {nodeenv-1.11.0 → nodeenv-1.11.1}/README +0 -0
- {nodeenv-1.11.0 → nodeenv-1.11.1}/README.rst +0 -0
- {nodeenv-1.11.0 → nodeenv-1.11.1}/README.ru.rst +0 -0
- {nodeenv-1.11.0 → nodeenv-1.11.1}/debian-upstream/changelog +0 -0
- {nodeenv-1.11.0 → nodeenv-1.11.1}/debian-upstream/compat +0 -0
- {nodeenv-1.11.0 → nodeenv-1.11.1}/debian-upstream/control +0 -0
- {nodeenv-1.11.0 → nodeenv-1.11.1}/debian-upstream/copyright +0 -0
- {nodeenv-1.11.0 → nodeenv-1.11.1}/debian-upstream/nodeenv.links +0 -0
- {nodeenv-1.11.0 → nodeenv-1.11.1}/debian-upstream/nodeenv.triggers +0 -0
- {nodeenv-1.11.0 → nodeenv-1.11.1}/debian-upstream/rules +0 -0
- {nodeenv-1.11.0 → nodeenv-1.11.1}/nodeenv.egg-info/SOURCES.txt +0 -0
- {nodeenv-1.11.0 → nodeenv-1.11.1}/nodeenv.egg-info/dependency_links.txt +0 -0
- {nodeenv-1.11.0 → nodeenv-1.11.1}/nodeenv.egg-info/entry_points.txt +0 -0
- {nodeenv-1.11.0 → nodeenv-1.11.1}/nodeenv.egg-info/not-zip-safe +0 -0
- {nodeenv-1.11.0 → nodeenv-1.11.1}/nodeenv.egg-info/requires.txt +0 -0
- {nodeenv-1.11.0 → nodeenv-1.11.1}/nodeenv.egg-info/top_level.txt +0 -0
- {nodeenv-1.11.0 → nodeenv-1.11.1}/pyproject.toml +0 -0
- {nodeenv-1.11.0 → nodeenv-1.11.1}/requirements-dev.txt +0 -0
- {nodeenv-1.11.0 → nodeenv-1.11.1}/setup.cfg +0 -0
- {nodeenv-1.11.0 → nodeenv-1.11.1}/setup.py +0 -0
- {nodeenv-1.11.0 → nodeenv-1.11.1}/tests/__init__.py +0 -0
- {nodeenv-1.11.0 → nodeenv-1.11.1}/tests/nodejs_index.json +0 -0
- {nodeenv-1.11.0 → nodeenv-1.11.1}/tests/test_activate_shells.py +0 -0
- {nodeenv-1.11.0 → nodeenv-1.11.1}/tests/test_activate_win.py +0 -0
- {nodeenv-1.11.0 → nodeenv-1.11.1}/tests/test_install_activate.py +0 -0
- {nodeenv-1.11.0 → nodeenv-1.11.1}/tox.ini +0 -0
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
Nodeenv changelog
|
|
2
2
|
=================
|
|
3
3
|
|
|
4
|
+
Version 1.11.1
|
|
5
|
+
--------------
|
|
6
|
+
- `latest`, the default, and semver ranges such as `--node=26` no longer
|
|
7
|
+
pick pre-releases: once nodejs.org listed `27.0.0-alpha.0.0.0`, both
|
|
8
|
+
stopped with a traceback. An exact pre-release, such as
|
|
9
|
+
`--node=27.0.0-alpha.0.0.0`, installs instead of crashing as well
|
|
10
|
+
`#453 <https://github.com/ekalinin/nodeenv/issues/453>`_
|
|
11
|
+
|
|
4
12
|
Version 1.11.0
|
|
5
13
|
--------------
|
|
6
14
|
- Fixed zsh `source bin/activate` aborting on the direct-call guard `#398 <https://github.com/ekalinin/nodeenv/issues/398>`_
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: nodeenv
|
|
3
|
-
Version: 1.11.
|
|
3
|
+
Version: 1.11.1
|
|
4
4
|
Summary: Node.js virtual environment builder
|
|
5
5
|
Home-page: https://github.com/ekalinin/nodeenv
|
|
6
6
|
Author: Eugene Kalinin
|
|
@@ -524,6 +524,14 @@ BSD / `LICENSE <https://github.com/ekalinin/nodeenv/blob/master/LICENSE>`_
|
|
|
524
524
|
Nodeenv changelog
|
|
525
525
|
=================
|
|
526
526
|
|
|
527
|
+
Version 1.11.1
|
|
528
|
+
--------------
|
|
529
|
+
- `latest`, the default, and semver ranges such as `--node=26` no longer
|
|
530
|
+
pick pre-releases: once nodejs.org listed `27.0.0-alpha.0.0.0`, both
|
|
531
|
+
stopped with a traceback. An exact pre-release, such as
|
|
532
|
+
`--node=27.0.0-alpha.0.0.0`, installs instead of crashing as well
|
|
533
|
+
`#453 <https://github.com/ekalinin/nodeenv/issues/453>`_
|
|
534
|
+
|
|
527
535
|
Version 1.11.0
|
|
528
536
|
--------------
|
|
529
537
|
- Fixed zsh `source bin/activate` aborting on the direct-call guard `#398 <https://github.com/ekalinin/nodeenv/issues/398>`_
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: nodeenv
|
|
3
|
-
Version: 1.11.
|
|
3
|
+
Version: 1.11.1
|
|
4
4
|
Summary: Node.js virtual environment builder
|
|
5
5
|
Home-page: https://github.com/ekalinin/nodeenv
|
|
6
6
|
Author: Eugene Kalinin
|
|
@@ -524,6 +524,14 @@ BSD / `LICENSE <https://github.com/ekalinin/nodeenv/blob/master/LICENSE>`_
|
|
|
524
524
|
Nodeenv changelog
|
|
525
525
|
=================
|
|
526
526
|
|
|
527
|
+
Version 1.11.1
|
|
528
|
+
--------------
|
|
529
|
+
- `latest`, the default, and semver ranges such as `--node=26` no longer
|
|
530
|
+
pick pre-releases: once nodejs.org listed `27.0.0-alpha.0.0.0`, both
|
|
531
|
+
stopped with a traceback. An exact pre-release, such as
|
|
532
|
+
`--node=27.0.0-alpha.0.0.0`, installs instead of crashing as well
|
|
533
|
+
`#453 <https://github.com/ekalinin/nodeenv/issues/453>`_
|
|
534
|
+
|
|
527
535
|
Version 1.11.0
|
|
528
536
|
--------------
|
|
529
537
|
- Fixed zsh `source bin/activate` aborting on the direct-call guard `#398 <https://github.com/ekalinin/nodeenv/issues/398>`_
|
|
@@ -48,7 +48,7 @@ except ImportError: # pragma: no cover (py3 only)
|
|
|
48
48
|
import http
|
|
49
49
|
IncompleteRead = http.client.IncompleteRead
|
|
50
50
|
|
|
51
|
-
nodeenv_version = '1.11.
|
|
51
|
+
nodeenv_version = '1.11.1'
|
|
52
52
|
|
|
53
53
|
join = os.path.join
|
|
54
54
|
abspath = os.path.abspath
|
|
@@ -200,9 +200,10 @@ def parse_version(version_str):
|
|
|
200
200
|
Parse version string to a tuple of integer parts
|
|
201
201
|
"""
|
|
202
202
|
v = version_str.replace('v', '').split('.')[:3]
|
|
203
|
-
# remove all after '+' in the PATCH part of the version
|
|
203
|
+
# remove all after '+' or '-' in the PATCH part of the version,
|
|
204
|
+
# e.g. 27.0.0-alpha.0.0.0
|
|
204
205
|
if len(v) >= 3:
|
|
205
|
-
v[2] =
|
|
206
|
+
v[2] = re.split('[+-]', v[2])[0]
|
|
206
207
|
return tuple(map(int, v))
|
|
207
208
|
|
|
208
209
|
|
|
@@ -1456,6 +1457,13 @@ def _has_platform_build(version_entry):
|
|
|
1456
1457
|
return True
|
|
1457
1458
|
|
|
1458
1459
|
|
|
1460
|
+
def _is_prerelease(version_entry):
|
|
1461
|
+
"""
|
|
1462
|
+
Check that the version is a pre-release, e.g. 27.0.0-alpha.0.0.0
|
|
1463
|
+
"""
|
|
1464
|
+
return '-' in version_entry['version']
|
|
1465
|
+
|
|
1466
|
+
|
|
1459
1467
|
def _get_last_node_version(lts=False):
|
|
1460
1468
|
"""
|
|
1461
1469
|
Return last node.js version matching the filter
|
|
@@ -1467,6 +1475,8 @@ def _get_last_node_version(lts=False):
|
|
|
1467
1475
|
def version_filter(v):
|
|
1468
1476
|
if lts and not v['lts']:
|
|
1469
1477
|
return False
|
|
1478
|
+
if _is_prerelease(v):
|
|
1479
|
+
return False
|
|
1470
1480
|
|
|
1471
1481
|
return _has_platform_build(v)
|
|
1472
1482
|
|
|
@@ -1501,6 +1511,8 @@ def resolve_node_version(spec):
|
|
|
1501
1511
|
|
|
1502
1512
|
matched = []
|
|
1503
1513
|
for version_entry in _get_versions_json():
|
|
1514
|
+
if _is_prerelease(version_entry):
|
|
1515
|
+
continue
|
|
1504
1516
|
if not _has_platform_build(version_entry):
|
|
1505
1517
|
continue
|
|
1506
1518
|
version = _pad_version(parse_version(version_entry['version']))
|
|
@@ -7,6 +7,7 @@ if sys.version_info < (3, 3):
|
|
|
7
7
|
else:
|
|
8
8
|
from shlex import quote as _quote
|
|
9
9
|
import io
|
|
10
|
+
import json
|
|
10
11
|
import os.path
|
|
11
12
|
import pathlib
|
|
12
13
|
import shutil
|
|
@@ -196,6 +197,29 @@ def mock_index_json():
|
|
|
196
197
|
yield
|
|
197
198
|
|
|
198
199
|
|
|
200
|
+
@pytest.fixture
|
|
201
|
+
def mock_index_json_alpha():
|
|
202
|
+
# the first entry of nodejs.org's index.json on 2026-10-29
|
|
203
|
+
# https://github.com/ekalinin/nodeenv/issues/453
|
|
204
|
+
alpha = {
|
|
205
|
+
'version': 'v27.0.0-alpha.0.0.0', 'date': '2026-10-29',
|
|
206
|
+
'files': [
|
|
207
|
+
'aix-ppc64', 'headers', 'linux-arm64', 'linux-ppc64le',
|
|
208
|
+
'linux-s390x', 'linux-x64', 'linux-x64-musl', 'osx-arm64-tar',
|
|
209
|
+
'osx-x64-pkg', 'src', 'win-arm64-7z', 'win-arm64-zip',
|
|
210
|
+
'win-x64-7z', 'win-x64-exe', 'win-x64-msi', 'win-x64-zip',
|
|
211
|
+
],
|
|
212
|
+
'npm': '12.1.0', 'v8': '15.6.75.25', 'uv': '1.52.1',
|
|
213
|
+
'zlib': '1.3.2.1-motley', 'openssl': '4.1.0', 'modules': '153',
|
|
214
|
+
'lts': False, 'security': False,
|
|
215
|
+
}
|
|
216
|
+
with open(os.path.join(HERE, 'nodejs_index.json'), 'rb') as f:
|
|
217
|
+
index = json.load(f)
|
|
218
|
+
body = io.BytesIO(json.dumps([alpha] + index).encode('utf-8'))
|
|
219
|
+
with mock.patch.object(nodeenv, 'urlopen', return_value=body):
|
|
220
|
+
yield
|
|
221
|
+
|
|
222
|
+
|
|
199
223
|
@pytest.fixture
|
|
200
224
|
def cap_logging_info():
|
|
201
225
|
with mock.patch.object(nodeenv.logger, 'info') as mck:
|
|
@@ -405,6 +429,11 @@ def test_get_latest_node_version():
|
|
|
405
429
|
assert nodeenv.get_last_stable_node_version() == '13.5.0'
|
|
406
430
|
|
|
407
431
|
|
|
432
|
+
@pytest.mark.usefixtures('mock_index_json_alpha', 'mock_host_platform')
|
|
433
|
+
def test_get_latest_node_version_skips_prerelease():
|
|
434
|
+
assert nodeenv.get_last_stable_node_version() == '13.5.0'
|
|
435
|
+
|
|
436
|
+
|
|
408
437
|
@pytest.mark.usefixtures('mock_index_json', 'mock_host_platform')
|
|
409
438
|
def test_get_lts_node_version():
|
|
410
439
|
assert nodeenv.get_last_lts_node_version() == '12.14.0'
|
|
@@ -540,6 +569,7 @@ def test_parse_version():
|
|
|
540
569
|
assert nodeenv.parse_version("v21.7") == (21, 7)
|
|
541
570
|
assert nodeenv.parse_version("v21.7.3") == (21, 7, 3)
|
|
542
571
|
assert nodeenv.parse_version("v21.7.3+0-b20240228T18452699") == (21, 7, 3)
|
|
572
|
+
assert nodeenv.parse_version("v27.0.0-alpha.0.0.0") == (27, 0, 0)
|
|
543
573
|
|
|
544
574
|
|
|
545
575
|
def test_pad_version():
|
|
@@ -672,6 +702,11 @@ def test_resolve_node_version(spec, expected):
|
|
|
672
702
|
assert nodeenv.resolve_node_version(spec) == expected
|
|
673
703
|
|
|
674
704
|
|
|
705
|
+
@pytest.mark.usefixtures('mock_index_json_alpha', 'mock_host_platform')
|
|
706
|
+
def test_resolve_node_version_skips_prerelease():
|
|
707
|
+
assert nodeenv.resolve_node_version('*') == '13.5.0'
|
|
708
|
+
|
|
709
|
+
|
|
675
710
|
@pytest.mark.usefixtures('mock_index_json', 'mock_host_platform')
|
|
676
711
|
def test_resolve_node_version_no_match():
|
|
677
712
|
# the fixture index has no 0.0.x releases
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|