dsh-plugin-rea 2.0.5 → 2.0.7

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.
@@ -12,7 +12,7 @@ function Check($name, [bool]$ok, $detail) {
12
12
  }
13
13
 
14
14
  Write-Host "`n=== 1. JS syntax ===" -ForegroundColor Cyan
15
- foreach ($f in @('index.mjs','bin\rea-shim.mjs','scripts\setup.mjs','scripts\audit-manifest.mjs','scripts\setup.test.mjs')) {
15
+ foreach ($f in @('index.mjs','bin\rea-shim.mjs','scripts\setup.mjs','scripts\audit-manifest.mjs','scripts\setup.test.mjs','scripts\host-compat.mjs')) {
16
16
  $out = & node --check $f 2>&1
17
17
  Check $f ($LASTEXITCODE -eq 0) ($out -join ' ')
18
18
  }
@@ -83,7 +83,14 @@ foreach ($entry in @('index.mjs', 'bin/', 'scripts/', 'manifest/', 'cordis.patch
83
83
  # the pointer resolves keeps that from returning silently.
84
84
  Check 'package.json declares main' (-not [string]::IsNullOrWhiteSpace($pkg.main)) ''
85
85
  Check 'main resolves to a shipped file' ($pkg.main -and (Test-Path (Join-Path $root $pkg.main))) "main=$($pkg.main)"
86
- foreach ($script in @('bundle:setup', 'bundle:status', 'bundle:audit', 'bundle:test')) {
86
+ # The market decides "compatible" vs "unknown" from engines.dsh, and hides the
87
+ # plugin from hosts whose version does not match. An absent or unparseable
88
+ # declaration therefore reads as "nothing to say" rather than as a defect, which
89
+ # is why the coverage check runs here as well as in CI.
90
+ Check 'package.json declares engines.dsh' (-not [string]::IsNullOrWhiteSpace($pkg.engines.dsh)) ''
91
+ $compat = & node scripts\host-compat.mjs 2>&1
92
+ Check 'engines.dsh covers every released DSH host' ($LASTEXITCODE -eq 0) (($compat | Select-Object -Last 2) -join ' ')
93
+ foreach ($script in @('bundle:setup', 'bundle:status', 'bundle:audit', 'bundle:test', 'bundle:host-compat')) {
87
94
  Check "scripts.$script exists" ($pkg.scripts.PSObject.Properties.Name -contains $script) ''
88
95
  }
89
96