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.
- package/CHANGELOG.md +85 -0
- package/README.md +37 -0
- package/README.zh-CN.md +35 -1
- package/bin/rea-shim.mjs +491 -23
- package/package.json +5 -3
- package/scripts/host-compat.mjs +224 -0
- package/scripts/rea-bundle-bootstrap.ps1 +5 -0
- package/scripts/setup.mjs +5 -1
- package/scripts/setup.test.mjs +368 -3
- package/scripts/verify-branch.ps1 +9 -2
|
@@ -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
|
-
|
|
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
|
|