| … | … | @@ -90,12 +90,17 @@ steps: |
| 90 | 90 | # SEPARATE prefix, only the packages this tree lacks are copied in, the suite runs with the TREE'S |
| 91 | 91 | # copy of brittle (brittle-bare runs tests in-process, so runner and tests must share one instance), |
| 92 | 92 | # and exactly those added packages are removed again. The published closure is byte-for-byte what |
| 93 | | # it was before this step. The version is the devDependency's range, not whatever is latest. |
| 93 | # it was before this step. |
| 94 | # |
| 95 | # Every REGISTRY devDependency is installed this way at its declared range, not just brittle: the |
| 96 | # suites also import keet-identity-key, which `npm install --production` never installs. (file: |
| 97 | # devDependencies are siblings, and the vendor step has already copied those in.) |
| 94 | 98 | - name: tests (offline, against the vendored closure) |
| 95 | 99 | run: | |
| 96 | 100 | B=$(mktemp -d) |
| 97 | | RANGE=$(node -p 'require("./package.json").devDependencies.brittle') |
| 98 | | npm install --prefix "$B" --no-audit --no-fund --no-save "brittle@$RANGE" >/dev/null 2>&1 || { echo "could not install brittle@$RANGE"; exit 1; } |
| 101 | SPECS=$(node -p 'Object.entries(require("./package.json").devDependencies||{}).filter(([,v])=>!String(v).startsWith("file:")).map(([k,v])=>k+"@"+v).join(" ")') |
| 102 | echo "test-only devDependencies: $SPECS" |
| 103 | npm install --prefix "$B" --no-audit --no-fund --no-save $SPECS >/dev/null 2>&1 || { echo "could not install: $SPECS"; exit 1; } |
| 99 | 104 | ADDED="" |
| 100 | 105 | for p in $(cd "$B/node_modules" && ls -A | grep -v -E '^\.'); do |
| 101 | 106 | case "$p" in |