fix: release 2.4.1 with consistent npm locks and Node version checks
This commit is contained in:
1 parent
e90da727d4
commit
ac3d8cf54a
9 files changed
+74
-22
No files matched your search
@@ -75,6 +75,34 @@ if ($env:npm_config_registry) { throw 'Official mode selected a China registry'
|
||||
assert result.returncode == 0, result.stdout + result.stderr
|
||||
|
||||
|
||||
def test_node_compatibility_matches_angular_supported_release_lines(tmp_path):
|
||||
result = powershell(
|
||||
tmp_path,
|
||||
"""
|
||||
$tokens = $null; $errors = $null
|
||||
$ast = [System.Management.Automation.Language.Parser]::ParseFile($env:LAUNCH_SCRIPT, [ref]$tokens, [ref]$errors)
|
||||
if ($errors) { throw 'Launcher parse error' }
|
||||
$checker = $ast.Find({ param($node) $node -is [System.Management.Automation.Language.FunctionDefinitionAst] -and $node.Name -eq 'Test-NodeCompatible' }, $true)
|
||||
. ([scriptblock]::Create($checker.Extent.Text))
|
||||
function Test-CommandExists { return $true }
|
||||
function node { return $script:nodeVersion }
|
||||
$cases = @{
|
||||
'v20.19.0' = $false; 'v22.22.0' = $false; 'v22.22.2' = $false
|
||||
'v22.22.3' = $true; 'v22.23.2' = $true; 'v23.0.0' = $false
|
||||
'v24.14.0' = $false; 'v24.15.0' = $true; 'v24.22.1' = $true
|
||||
'v24.15.0-rc.1' = $false; 'v25.0.0' = $false; 'v26.0.0' = $true
|
||||
'not-a-version' = $false
|
||||
}
|
||||
foreach ($case in $cases.GetEnumerator()) {
|
||||
$script:nodeVersion = $case.Key
|
||||
if ((Test-NodeCompatible) -ne $case.Value) { throw "Wrong compatibility for $($case.Key)" }
|
||||
}
|
||||
""",
|
||||
LAUNCH_SCRIPT=str(ROOT / "scripts/start.ps1"),
|
||||
)
|
||||
assert result.returncode == 0, result.stdout + result.stderr
|
||||
|
||||
|
||||
@pytest.mark.parametrize("first_failure", ["http", "timeout", "hash", "all"])
|
||||
def test_scrcpy_source_failover_checks_hash_before_installing(tmp_path, first_failure):
|
||||
archive = tmp_path / "fixture.zip"
|
||||
|
||||
Reference in new issue
Block a user