polendina 3.3.2 → 3.3.3
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/.github/dependabot.yml +1 -130
- package/.github/workflows/test-and-release.yml +1 -3
- package/AGENTS.md +59 -39
- package/CHANGELOG.md +6 -0
- package/lib/webpack.config.js +5 -2
- package/package.json +3 -4
- package/test/common.js +27 -10
- package/test/consumer/package.json +11 -0
- package/test/fixtures/bare-async/package.json +1 -14
- package/test/fixtures/bare-async-esm/package.json +2 -15
- package/test/fixtures/bare-async-failure/package.json +1 -14
- package/test/fixtures/bare-async-failure-esm/package.json +2 -15
- package/test/fixtures/bare-sync/package.json +1 -14
- package/test/fixtures/bare-sync-esm/package.json +2 -15
- package/test/fixtures/bare-sync-failure/package.json +1 -14
- package/test/fixtures/bare-sync-failure-esm/package.json +2 -15
- package/test/fixtures/mocha/package.json +1 -15
- package/test/fixtures/mocha-esm/package.json +2 -16
- package/test/fixtures/mocha-failure/package.json +1 -15
- package/test/fixtures/mocha-failure-esm/package.json +2 -16
- package/test/fixtures/tape/package.json +1 -14
- package/test/fixtures/tape-esm/package.json +2 -15
- package/test/fixtures/tape-failure/package.json +1 -14
- package/test/fixtures/tape-failure-esm/package.json +2 -15
- package/test/fixtures/webpack-merge/package.json +1 -14
- package/test/setup.js +96 -0
- package/test/test-bare-async.js +10 -14
- package/test/test-bare-sync.js +10 -14
- package/test/test-mocha.js +23 -23
- package/test/test-packed-install.js +29 -69
- package/test/test-polendina-node.js +9 -19
- package/test/test-tape.js +10 -14
- package/test/test-webpack-merge.js +3 -7
package/.github/dependabot.yml
CHANGED
|
@@ -17,138 +17,9 @@ updates:
|
|
|
17
17
|
include: 'scope'
|
|
18
18
|
|
|
19
19
|
- package-ecosystem: 'npm'
|
|
20
|
-
directory: '/test/
|
|
20
|
+
directory: '/test/consumer'
|
|
21
21
|
schedule:
|
|
22
22
|
interval: 'daily'
|
|
23
23
|
commit-message:
|
|
24
24
|
prefix: 'chore'
|
|
25
25
|
include: 'scope'
|
|
26
|
-
|
|
27
|
-
- package-ecosystem: 'npm'
|
|
28
|
-
directory: '/test/fixtures/bare-async-esm'
|
|
29
|
-
schedule:
|
|
30
|
-
interval: 'daily'
|
|
31
|
-
commit-message:
|
|
32
|
-
prefix: 'chore'
|
|
33
|
-
include: 'scope'
|
|
34
|
-
|
|
35
|
-
- package-ecosystem: 'npm'
|
|
36
|
-
directory: '/test/fixtures/bare-async-failure'
|
|
37
|
-
schedule:
|
|
38
|
-
interval: 'daily'
|
|
39
|
-
commit-message:
|
|
40
|
-
prefix: 'chore'
|
|
41
|
-
include: 'scope'
|
|
42
|
-
|
|
43
|
-
- package-ecosystem: 'npm'
|
|
44
|
-
directory: '/test/fixtures/bare-async-failure-esm'
|
|
45
|
-
schedule:
|
|
46
|
-
interval: 'daily'
|
|
47
|
-
commit-message:
|
|
48
|
-
prefix: 'chore'
|
|
49
|
-
include: 'scope'
|
|
50
|
-
|
|
51
|
-
- package-ecosystem: 'npm'
|
|
52
|
-
directory: '/test/fixtures/bare-sync'
|
|
53
|
-
schedule:
|
|
54
|
-
interval: 'daily'
|
|
55
|
-
commit-message:
|
|
56
|
-
prefix: 'chore'
|
|
57
|
-
include: 'scope'
|
|
58
|
-
|
|
59
|
-
- package-ecosystem: 'npm'
|
|
60
|
-
directory: '/test/fixtures/bare-sync-esm'
|
|
61
|
-
schedule:
|
|
62
|
-
interval: 'daily'
|
|
63
|
-
commit-message:
|
|
64
|
-
prefix: 'chore'
|
|
65
|
-
include: 'scope'
|
|
66
|
-
|
|
67
|
-
- package-ecosystem: 'npm'
|
|
68
|
-
directory: '/test/fixtures/bare-sync-failure'
|
|
69
|
-
schedule:
|
|
70
|
-
interval: 'daily'
|
|
71
|
-
commit-message:
|
|
72
|
-
prefix: 'chore'
|
|
73
|
-
include: 'scope'
|
|
74
|
-
|
|
75
|
-
- package-ecosystem: 'npm'
|
|
76
|
-
directory: '/test/fixtures/bare-sync-failure-esm'
|
|
77
|
-
schedule:
|
|
78
|
-
interval: 'daily'
|
|
79
|
-
commit-message:
|
|
80
|
-
prefix: 'chore'
|
|
81
|
-
include: 'scope'
|
|
82
|
-
|
|
83
|
-
- package-ecosystem: 'npm'
|
|
84
|
-
directory: '/test/fixtures/mocha'
|
|
85
|
-
schedule:
|
|
86
|
-
interval: 'daily'
|
|
87
|
-
commit-message:
|
|
88
|
-
prefix: 'chore'
|
|
89
|
-
include: 'scope'
|
|
90
|
-
|
|
91
|
-
- package-ecosystem: 'npm'
|
|
92
|
-
directory: '/test/fixtures/mocha-esm'
|
|
93
|
-
schedule:
|
|
94
|
-
interval: 'daily'
|
|
95
|
-
commit-message:
|
|
96
|
-
prefix: 'chore'
|
|
97
|
-
include: 'scope'
|
|
98
|
-
|
|
99
|
-
- package-ecosystem: 'npm'
|
|
100
|
-
directory: '/test/fixtures/mocha-failure'
|
|
101
|
-
schedule:
|
|
102
|
-
interval: 'daily'
|
|
103
|
-
commit-message:
|
|
104
|
-
prefix: 'chore'
|
|
105
|
-
include: 'scope'
|
|
106
|
-
|
|
107
|
-
- package-ecosystem: 'npm'
|
|
108
|
-
directory: '/test/fixtures/mocha-failure-esm'
|
|
109
|
-
schedule:
|
|
110
|
-
interval: 'daily'
|
|
111
|
-
commit-message:
|
|
112
|
-
prefix: 'chore'
|
|
113
|
-
include: 'scope'
|
|
114
|
-
|
|
115
|
-
- package-ecosystem: 'npm'
|
|
116
|
-
directory: '/test/fixtures/tape'
|
|
117
|
-
schedule:
|
|
118
|
-
interval: 'daily'
|
|
119
|
-
commit-message:
|
|
120
|
-
prefix: 'chore'
|
|
121
|
-
include: 'scope'
|
|
122
|
-
|
|
123
|
-
- package-ecosystem: 'npm'
|
|
124
|
-
directory: '/test/fixtures/tape-esm'
|
|
125
|
-
schedule:
|
|
126
|
-
interval: 'daily'
|
|
127
|
-
commit-message:
|
|
128
|
-
prefix: 'chore'
|
|
129
|
-
include: 'scope'
|
|
130
|
-
|
|
131
|
-
- package-ecosystem: 'npm'
|
|
132
|
-
directory: '/test/fixtures/tape-failure'
|
|
133
|
-
schedule:
|
|
134
|
-
interval: 'daily'
|
|
135
|
-
commit-message:
|
|
136
|
-
prefix: 'chore'
|
|
137
|
-
include: 'scope'
|
|
138
|
-
|
|
139
|
-
- package-ecosystem: 'npm'
|
|
140
|
-
directory: '/test/fixtures/tape-failure-esm'
|
|
141
|
-
schedule:
|
|
142
|
-
interval: 'daily'
|
|
143
|
-
commit-message:
|
|
144
|
-
prefix: 'chore'
|
|
145
|
-
include: 'scope'
|
|
146
|
-
|
|
147
|
-
- package-ecosystem: 'npm'
|
|
148
|
-
directory: '/test/fixtures/webpack-merge'
|
|
149
|
-
schedule:
|
|
150
|
-
interval: 'daily'
|
|
151
|
-
commit-message:
|
|
152
|
-
prefix: 'chore'
|
|
153
|
-
include: 'scope'
|
|
154
|
-
|
package/AGENTS.md
CHANGED
|
@@ -102,8 +102,9 @@ Files:
|
|
|
102
102
|
`index.html` and `page-run.js` are served static. `common-run.js`,
|
|
103
103
|
`test-registry.cjs` and one of `mocha-run.js`, `tape-run.js`, `bare-run.js`
|
|
104
104
|
are bundled as the last entry.
|
|
105
|
-
- `test/`
|
|
106
|
-
per runner,
|
|
105
|
+
- `test/` packs polendina, installs it into temporary consumers outside the
|
|
106
|
+
repo, one per runner, and runs the CLI against `test/fixtures/*` from
|
|
107
|
+
inside them, one fixture per runner, in CJS and ESM, passing and failing.
|
|
107
108
|
|
|
108
109
|
### The deferral trick
|
|
109
110
|
|
|
@@ -132,9 +133,13 @@ believing it.
|
|
|
132
133
|
|
|
133
134
|
Things that look wrong and are not. Each exists because something broke.
|
|
134
135
|
|
|
135
|
-
- **`resolve.modules` and `resolveLoader.modules` list
|
|
136
|
-
polendina's `node_modules` second.** The
|
|
137
|
-
|
|
136
|
+
- **`resolve.modules` and `resolveLoader.modules` list the relative
|
|
137
|
+
`node_modules` first, polendina's own `node_modules` second.** The relative
|
|
138
|
+
entry walks up from the requesting file as Node does, so the consumer's
|
|
139
|
+
mocha, tape and chai win and hoisted or nested dependencies resolve from a
|
|
140
|
+
workspace package or any subdirectory. An absolute `cwd/node_modules` here
|
|
141
|
+
does not walk and breaks both. polendina has no mocha or tape in its own
|
|
142
|
+
tree, on purpose.
|
|
138
143
|
- **Tape gets `resolve.fallback` for `stream` and `path`, `fs: false`, and
|
|
139
144
|
`ProvidePlugin({ process })`.** Webpack 5 dropped Node core polyfills.
|
|
140
145
|
Mocha's browser bundle is self-contained; tape's is not. `process`,
|
|
@@ -167,12 +172,22 @@ Things that look wrong and are not. Each exists because something broke.
|
|
|
167
172
|
enumeration would otherwise see the wrong keys.
|
|
168
173
|
- **`polendina-cli` exits with the mocha failure count; `polendina-node` exits
|
|
169
174
|
0 or 1.** The first matches mocha's own behaviour. Keep both.
|
|
170
|
-
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
175
|
+
- **The test frameworks live in `test/consumer/package.json`, not the root
|
|
176
|
+
package, and `test:run` uses `npx --yes mocha`.** mocha and tape must never
|
|
177
|
+
become devDependencies of the root package: they would land in polendina's
|
|
178
|
+
`node_modules` and silently mask a broken consumer resolve. That file is
|
|
179
|
+
the one place dependabot bumps them; it is never installed as is. The flag,
|
|
180
|
+
not an `npm_config_yes=` prefix, because npm scripts run under cmd.exe on
|
|
181
|
+
Windows and a `VAR=value` prefix is not a command there.
|
|
182
|
+
- **One consumer per runner, never one consumer with every framework.** Tape
|
|
183
|
+
and polendina both depend on `readable-stream`. Installed together with
|
|
184
|
+
mocha, npm nests whichever versions clash and the fixtures run on a tree no
|
|
185
|
+
real consumer has. Each consumer installs only what its runner's fixtures
|
|
186
|
+
import.
|
|
187
|
+
- **Fixture `package.json` files declare only a name and, for ESM, a
|
|
188
|
+
`type`.** Their dependencies come from the consumer they are copied into.
|
|
189
|
+
The webpack-merge fixture's config `require('webpack')` finds the hoisted
|
|
190
|
+
copy there, as a real consumer's would.
|
|
176
191
|
- **`test/common.js` asserts empty stderr on success and always passes
|
|
177
192
|
`--cleanup`.** Any stray warning is a test failure. Fixtures stay clean
|
|
178
193
|
between runs only because of the flag.
|
|
@@ -212,14 +227,23 @@ green matrix is a Node.js interop issue, not a flaky test.
|
|
|
212
227
|
## Testing polendina itself
|
|
213
228
|
|
|
214
229
|
```bash
|
|
215
|
-
npm test
|
|
216
|
-
|
|
217
|
-
npx mocha test/test-
|
|
218
|
-
|
|
219
|
-
cd test/fixtures/mocha && ../../../polendina-cli.js --cleanup test-*.js # by hand
|
|
220
|
-
cd test/fixtures/mocha && ../../../polendina-cli.js test-*.js --stats # keep build/ to inspect
|
|
230
|
+
npm test # lint and the whole matrix
|
|
231
|
+
npx mocha --require test/setup.js test/test-mocha.js # one runner's suite
|
|
232
|
+
POLENDINA_KEEP_CONSUMERS=1 npx mocha --require test/setup.js test/test-tape.js # keep the consumers to poke at
|
|
233
|
+
cd test/fixtures/mocha && ../../../polendina-cli.js test-*.js --stats # by hand, in-repo layout, keep build/
|
|
221
234
|
```
|
|
222
235
|
|
|
236
|
+
`test/setup.js` is a mocha global fixture. It packs the working tree, writes
|
|
237
|
+
a `package.json` per consumer, installs the tarball with that consumer's
|
|
238
|
+
frameworks into a temporary directory, copies `test/fixtures` in, and removes
|
|
239
|
+
everything afterwards. Its `variants` table maps a consumer name to the
|
|
240
|
+
packages it installs: `mocha` and `bare` take chai, `tape` takes tape,
|
|
241
|
+
`mocha11` pins the previous mocha major. Bare names take their version range
|
|
242
|
+
from `test/consumer/package.json`. Each suite names the consumer it runs in
|
|
243
|
+
when it calls `runCli`. The installs run in parallel from the npm cache with
|
|
244
|
+
the Chrome that puppeteer already downloaded for the root install, so they
|
|
245
|
+
need a warm cache and take well under a minute.
|
|
246
|
+
|
|
223
247
|
### Install topologies
|
|
224
248
|
|
|
225
249
|
polendina resolves modules two ways at once: Node resolution for its own
|
|
@@ -230,30 +254,34 @@ test setup covers all three cases.
|
|
|
230
254
|
|
|
231
255
|
| Topology | polendina's own `node_modules` | What it hides |
|
|
232
256
|
|----------|-------------------------------|---------------|
|
|
233
|
-
| Fixtures in this repo | The dev tree, two directories up | Fixtures can walk up and find polendina's dev dependencies. A missing
|
|
257
|
+
| Fixtures run in this repo by hand | The dev tree, two directories up | Fixtures can walk up and find polendina's dev dependencies. A missing dependency, or any package added to the root, is silently masked. Fine for poking at a bundle, proves nothing about resolution. |
|
|
234
258
|
| Symlinked working copy in a consumer | polendina's own full tree, separate from the consumer's | Two complete trees, no hoisting, no version contention. Cleaner than any real install. Will not reproduce a hoisting break. |
|
|
235
|
-
| Published install in a consumer | Mostly absent: dependencies are hoisted into the consumer's flat tree | Anything that assumes a file exists under `polendina/node_modules/` breaks. Version conflicts between polendina's dependencies and the consumer's resolve by npm nesting and are then found by `resolve.modules` in whichever order npm left them. This is reality. |
|
|
259
|
+
| Published install in a consumer | Mostly absent: dependencies are hoisted into the consumer's flat tree | Anything that assumes a file exists under `polendina/node_modules/` breaks. Version conflicts between polendina's dependencies and the consumer's resolve by npm nesting and are then found by `resolve.modules` in whichever order npm left them. This is reality, and it is what the suite runs in. |
|
|
236
260
|
|
|
237
261
|
Consequences:
|
|
238
262
|
|
|
239
|
-
- A resolution change passing the fixture suite proves little on its own.
|
|
240
|
-
`test/test-packed-install.js` covers the published layout for tape and
|
|
241
|
-
mocha; extend it when a change touches resolution.
|
|
242
263
|
- Never reference polendina's own `node_modules` by path. Resolve through
|
|
243
264
|
Node from a file inside polendina so it works wherever npm put the package.
|
|
244
|
-
- The
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
265
|
+
- The fixtures sit in a subdirectory of the consumer, so the suite also
|
|
266
|
+
stands in for a workspace package whose dependencies are hoisted to a
|
|
267
|
+
parent. Module resolution must walk up.
|
|
268
|
+
- `test/test-packed-install.js` asserts the layout itself: polendina's
|
|
269
|
+
dependencies hoisted, each framework present only in its own consumer,
|
|
270
|
+
mocha and tape absent from polendina's own tree.
|
|
248
271
|
|
|
249
272
|
Rules the suite relies on:
|
|
250
273
|
|
|
251
|
-
- polendina is tested the way it is used: as a CLI
|
|
252
|
-
directory. Do not import `polendina.js` into
|
|
253
|
-
|
|
274
|
+
- polendina is tested the way it is used: as a CLI installed from a tarball
|
|
275
|
+
and run from inside a consumer directory. Do not import `polendina.js` into
|
|
276
|
+
tests to make them faster.
|
|
277
|
+
- The mocha spec reporter's pass symbol differs between majors in the
|
|
278
|
+
browser bundle, so mocha expectations take the tick from a per-consumer
|
|
279
|
+
table rather than a literal.
|
|
254
280
|
- Every runner has a passing and a failing fixture, in CJS and ESM. A new
|
|
255
|
-
runner or mode adds all four
|
|
256
|
-
|
|
281
|
+
runner or mode adds all four, a row in `variants` with its framework, and
|
|
282
|
+
that framework in `test/consumer/package.json`. A new code path in an
|
|
283
|
+
existing runner adds an assertion to the existing fixtures rather than a
|
|
284
|
+
new fixture.
|
|
257
285
|
- Expected output is matched as exact multi-line strings with timings
|
|
258
286
|
scrubbed. When output changes on purpose, update the expectation and say so
|
|
259
287
|
in the PR.
|
|
@@ -293,14 +321,6 @@ Good work, roughly in order of value:
|
|
|
293
321
|
commented-out `page.on('console')` block is dead. The `useColors` branch is
|
|
294
322
|
unreachable on supported mochas. Each removal is one PR with a full test run
|
|
295
323
|
and a `git log -S` showing where it came from.
|
|
296
|
-
- **Move the fixtures into the packed consumer.** `test/test-packed-install.js`
|
|
297
|
-
already packs polendina and installs it into a temporary consumer outside
|
|
298
|
-
the repo, the only layout a real user has. Running the existing fixture
|
|
299
|
-
directories from inside that consumer would replace seventeen `npm i` runs
|
|
300
|
-
and seventeen dependabot entries with one install, close the topology leak
|
|
301
|
-
for every test, and make a second consumer on the previous mocha major
|
|
302
|
-
cheap. The fixtures and their assertions stay as they are; only where they
|
|
303
|
-
run changes.
|
|
304
324
|
- **Make failures legible.** When a resolve fails inside a consumer's
|
|
305
325
|
dependency, the webpack error is the user's only clue. Better messages
|
|
306
326
|
around bundle errors and the timeout are cheap wins.
|
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
## [3.3.3](https://github.com/rvagg/polendina/compare/v3.3.2...v3.3.3) (2026-10-24)
|
|
2
|
+
|
|
3
|
+
### Tests
|
|
4
|
+
|
|
5
|
+
* run fixtures from a packed install in temporary consumers ([#205](https://github.com/rvagg/polendina/issues/205)) ([d1601fc](https://github.com/rvagg/polendina/commit/d1601fcc94b50bb6192629173500b85443a405f2))
|
|
6
|
+
|
|
1
7
|
## [3.3.2](https://github.com/rvagg/polendina/compare/v3.3.1...v3.3.2) (2026-10-24)
|
|
2
8
|
|
|
3
9
|
### Bug Fixes
|
package/lib/webpack.config.js
CHANGED
|
@@ -34,14 +34,17 @@ export function webpackConfig (env, options, runner) {
|
|
|
34
34
|
// published deps; tsconfig-aware resolution follows it and fails every resolve
|
|
35
35
|
// inside that dependency.
|
|
36
36
|
tsconfig: false,
|
|
37
|
+
// the consumer's tree first, walking up from the requesting file as Node
|
|
38
|
+
// does so hoisted and nested dependencies resolve; polendina's own tree
|
|
39
|
+
// is only a fallback for its runner shims
|
|
37
40
|
modules: [
|
|
38
|
-
|
|
41
|
+
'node_modules',
|
|
39
42
|
path.join(__dirname, '../node_modules')
|
|
40
43
|
]
|
|
41
44
|
},
|
|
42
45
|
resolveLoader: {
|
|
43
46
|
modules: [
|
|
44
|
-
|
|
47
|
+
'node_modules',
|
|
45
48
|
path.join(__dirname, '../node_modules')
|
|
46
49
|
]
|
|
47
50
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "polendina",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.3",
|
|
4
4
|
"description": "Non-UI browser testing for JavaScript libraries from the command-line",
|
|
5
5
|
"main": "polendina.js",
|
|
6
6
|
"type": "module",
|
|
@@ -26,9 +26,8 @@
|
|
|
26
26
|
},
|
|
27
27
|
"scripts": {
|
|
28
28
|
"lint": "standard",
|
|
29
|
-
"test:
|
|
30
|
-
"test
|
|
31
|
-
"test": "npm run lint && npm run test:install && npm run test:run"
|
|
29
|
+
"test:run": "npx --yes mocha --require test/setup.js test/test-*.js",
|
|
30
|
+
"test": "npm run lint && npm run test:run"
|
|
32
31
|
},
|
|
33
32
|
"repository": {
|
|
34
33
|
"type": "git",
|
package/test/common.js
CHANGED
|
@@ -1,19 +1,37 @@
|
|
|
1
1
|
import path from 'path'
|
|
2
2
|
import assert from 'assert'
|
|
3
3
|
import { execFile } from 'child_process'
|
|
4
|
-
import { fileURLToPath } from 'url'
|
|
5
4
|
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
// consumers installed by setup.js, one per runner, named by its variants table
|
|
6
|
+
export function consumers () {
|
|
7
|
+
return JSON.parse(process.env.POLENDINA_CONSUMERS)
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export function consumer (name) {
|
|
11
|
+
const dir = consumers()[name]
|
|
12
|
+
if (!dir) {
|
|
13
|
+
throw new Error(`no consumer named ${name}`)
|
|
14
|
+
}
|
|
15
|
+
return dir
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
// runs the installed polendina CLI from inside a copied fixture directory;
|
|
19
|
+
// resolved at call time because consumers exist only once setup.js has run
|
|
20
|
+
export async function runCli (consumerName, fixture, args = []) {
|
|
21
|
+
const dir = consumer(consumerName)
|
|
22
|
+
const cli = path.join(dir, 'node_modules/polendina/polendina-cli.js')
|
|
23
|
+
return runCommand(cli, ['test*.js', 'test/test*.js', '--cleanup', ...args], path.join(dir, 'fixtures', fixture))
|
|
24
|
+
}
|
|
8
25
|
|
|
9
|
-
export async function
|
|
10
|
-
|
|
26
|
+
export async function runNodeCli (consumerName, fixture, mode) {
|
|
27
|
+
const dir = consumer(consumerName)
|
|
28
|
+
const cli = path.join(dir, 'node_modules/polendina/polendina-node-cli.js')
|
|
29
|
+
return runCommand(cli, [mode, 'test*.js'], path.join(dir, 'fixtures', fixture))
|
|
11
30
|
}
|
|
12
31
|
|
|
13
|
-
export async function runCommand (
|
|
32
|
+
export async function runCommand (script, args, cwd) {
|
|
14
33
|
return new Promise((resolve, reject) => {
|
|
15
|
-
|
|
16
|
-
execFile(process.execPath, args, { cwd }, (err, stdout, stderr) => {
|
|
34
|
+
execFile(process.execPath, [script, ...args], { cwd }, (err, stdout, stderr) => {
|
|
17
35
|
const code = err ? err.code : 0
|
|
18
36
|
if (!code) {
|
|
19
37
|
try {
|
|
@@ -22,8 +40,7 @@ export async function runCommand (command, cwd) {
|
|
|
22
40
|
return reject(e)
|
|
23
41
|
}
|
|
24
42
|
}
|
|
25
|
-
|
|
26
|
-
resolve(out)
|
|
43
|
+
resolve({ stdout: stdout.toString(), stderr: stderr.toString(), code })
|
|
27
44
|
})
|
|
28
45
|
})
|
|
29
46
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "polendina-test-consumer",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"description": "Version ranges for the test frameworks that test/setup.js installs, one runner per temporary consumer, alongside a packed polendina",
|
|
6
|
+
"devDependencies": {
|
|
7
|
+
"chai": "^6.0.1",
|
|
8
|
+
"mocha": "^12.0.2",
|
|
9
|
+
"tape": "^5.6.3"
|
|
10
|
+
}
|
|
11
|
+
}
|
|
@@ -1,18 +1,5 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fixture-bare-async",
|
|
3
3
|
"version": "1.0.0",
|
|
4
|
-
"
|
|
5
|
-
"main": "index.js",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"test": "node test-1.js && node test-2.js"
|
|
8
|
-
},
|
|
9
|
-
"author": "Rod <rod@vagg.org> (http://r.va.gg/)",
|
|
10
|
-
"repository": {
|
|
11
|
-
"type": "git",
|
|
12
|
-
"url": "https://github.com/rvagg/polendina.git"
|
|
13
|
-
},
|
|
14
|
-
"license": "Apache-2.0",
|
|
15
|
-
"devDependencies": {
|
|
16
|
-
"chai": "^6.0.1"
|
|
17
|
-
}
|
|
4
|
+
"private": true
|
|
18
5
|
}
|
|
@@ -1,19 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fixture-bare-async",
|
|
3
3
|
"version": "1.0.0",
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
"type": "module",
|
|
7
|
-
"scripts": {
|
|
8
|
-
"test": "node test-1.js && node test-2.js"
|
|
9
|
-
},
|
|
10
|
-
"author": "Rod <rod@vagg.org> (http://r.va.gg/)",
|
|
11
|
-
"repository": {
|
|
12
|
-
"type": "git",
|
|
13
|
-
"url": "https://github.com/rvagg/polendina.git"
|
|
14
|
-
},
|
|
15
|
-
"license": "Apache-2.0",
|
|
16
|
-
"devDependencies": {
|
|
17
|
-
"chai": "^6.0.1"
|
|
18
|
-
}
|
|
4
|
+
"private": true,
|
|
5
|
+
"type": "module"
|
|
19
6
|
}
|
|
@@ -1,18 +1,5 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fixture-bare-async-failure",
|
|
3
3
|
"version": "1.0.0",
|
|
4
|
-
"
|
|
5
|
-
"main": "index.js",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"test": "node test-1.js && node test-2.js"
|
|
8
|
-
},
|
|
9
|
-
"author": "Rod <rod@vagg.org> (http://r.va.gg/)",
|
|
10
|
-
"repository": {
|
|
11
|
-
"type": "git",
|
|
12
|
-
"url": "https://github.com/rvagg/polendina.git"
|
|
13
|
-
},
|
|
14
|
-
"license": "Apache-2.0",
|
|
15
|
-
"devDependencies": {
|
|
16
|
-
"chai": "^6.0.1"
|
|
17
|
-
}
|
|
4
|
+
"private": true
|
|
18
5
|
}
|
|
@@ -1,19 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fixture-bare-async-failure",
|
|
3
3
|
"version": "1.0.0",
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
"type": "module",
|
|
7
|
-
"scripts": {
|
|
8
|
-
"test": "node test-1.js && node test-2.js"
|
|
9
|
-
},
|
|
10
|
-
"author": "Rod <rod@vagg.org> (http://r.va.gg/)",
|
|
11
|
-
"repository": {
|
|
12
|
-
"type": "git",
|
|
13
|
-
"url": "https://github.com/rvagg/polendina.git"
|
|
14
|
-
},
|
|
15
|
-
"license": "Apache-2.0",
|
|
16
|
-
"devDependencies": {
|
|
17
|
-
"chai": "^6.0.1"
|
|
18
|
-
}
|
|
4
|
+
"private": true,
|
|
5
|
+
"type": "module"
|
|
19
6
|
}
|
|
@@ -1,18 +1,5 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fixture-bare-sync",
|
|
3
3
|
"version": "1.0.0",
|
|
4
|
-
"
|
|
5
|
-
"main": "index.js",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"test": "node test-1.js && node test-2.js"
|
|
8
|
-
},
|
|
9
|
-
"author": "Rod <rod@vagg.org> (http://r.va.gg/)",
|
|
10
|
-
"repository": {
|
|
11
|
-
"type": "git",
|
|
12
|
-
"url": "https://github.com/rvagg/polendina.git"
|
|
13
|
-
},
|
|
14
|
-
"license": "Apache-2.0",
|
|
15
|
-
"devDependencies": {
|
|
16
|
-
"chai": "^6.0.1"
|
|
17
|
-
}
|
|
4
|
+
"private": true
|
|
18
5
|
}
|
|
@@ -1,19 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fixture-bare-sync",
|
|
3
3
|
"version": "1.0.0",
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
"type": "module",
|
|
7
|
-
"scripts": {
|
|
8
|
-
"test": "node test-1.js && node test-2.js"
|
|
9
|
-
},
|
|
10
|
-
"author": "Rod <rod@vagg.org> (http://r.va.gg/)",
|
|
11
|
-
"repository": {
|
|
12
|
-
"type": "git",
|
|
13
|
-
"url": "https://github.com/rvagg/polendina.git"
|
|
14
|
-
},
|
|
15
|
-
"license": "Apache-2.0",
|
|
16
|
-
"devDependencies": {
|
|
17
|
-
"chai": "^6.0.1"
|
|
18
|
-
}
|
|
4
|
+
"private": true,
|
|
5
|
+
"type": "module"
|
|
19
6
|
}
|
|
@@ -1,18 +1,5 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fixture-bare-sync-failure",
|
|
3
3
|
"version": "1.0.0",
|
|
4
|
-
"
|
|
5
|
-
"main": "index.js",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"test": "node test-1.js && node test-2.js"
|
|
8
|
-
},
|
|
9
|
-
"author": "Rod <rod@vagg.org> (http://r.va.gg/)",
|
|
10
|
-
"repository": {
|
|
11
|
-
"type": "git",
|
|
12
|
-
"url": "https://github.com/rvagg/polendina.git"
|
|
13
|
-
},
|
|
14
|
-
"license": "Apache-2.0",
|
|
15
|
-
"devDependencies": {
|
|
16
|
-
"chai": "^6.0.1"
|
|
17
|
-
}
|
|
4
|
+
"private": true
|
|
18
5
|
}
|
|
@@ -1,19 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fixture-bare-sync-failure",
|
|
3
3
|
"version": "1.0.0",
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
"type": "module",
|
|
7
|
-
"scripts": {
|
|
8
|
-
"test": "node test-1.js && node test-2.js"
|
|
9
|
-
},
|
|
10
|
-
"author": "Rod <rod@vagg.org> (http://r.va.gg/)",
|
|
11
|
-
"repository": {
|
|
12
|
-
"type": "git",
|
|
13
|
-
"url": "https://github.com/rvagg/polendina.git"
|
|
14
|
-
},
|
|
15
|
-
"license": "Apache-2.0",
|
|
16
|
-
"devDependencies": {
|
|
17
|
-
"chai": "^6.0.1"
|
|
18
|
-
}
|
|
4
|
+
"private": true,
|
|
5
|
+
"type": "module"
|
|
19
6
|
}
|
|
@@ -1,19 +1,5 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fixture-mocha",
|
|
3
3
|
"version": "1.0.0",
|
|
4
|
-
"
|
|
5
|
-
"main": "index.js",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"test": "mocha test-*.js"
|
|
8
|
-
},
|
|
9
|
-
"author": "Rod <rod@vagg.org> (http://r.va.gg/)",
|
|
10
|
-
"license": "Apache-2.0",
|
|
11
|
-
"repository": {
|
|
12
|
-
"type": "git",
|
|
13
|
-
"url": "https://github.com/rvagg/polendina.git"
|
|
14
|
-
},
|
|
15
|
-
"devDependencies": {
|
|
16
|
-
"chai": "^6.0.1",
|
|
17
|
-
"mocha": "^12.0.2"
|
|
18
|
-
}
|
|
4
|
+
"private": true
|
|
19
5
|
}
|
|
@@ -1,20 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fixture-mocha",
|
|
3
3
|
"version": "1.0.0",
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
"type": "module",
|
|
7
|
-
"scripts": {
|
|
8
|
-
"test": "mocha test-*.js"
|
|
9
|
-
},
|
|
10
|
-
"author": "Rod <rod@vagg.org> (http://r.va.gg/)",
|
|
11
|
-
"license": "Apache-2.0",
|
|
12
|
-
"repository": {
|
|
13
|
-
"type": "git",
|
|
14
|
-
"url": "https://github.com/rvagg/polendina.git"
|
|
15
|
-
},
|
|
16
|
-
"devDependencies": {
|
|
17
|
-
"chai": "^6.0.1",
|
|
18
|
-
"mocha": "^12.0.2"
|
|
19
|
-
}
|
|
4
|
+
"private": true,
|
|
5
|
+
"type": "module"
|
|
20
6
|
}
|