agentiqa 1.1.3 → 1.1.4

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/package.json CHANGED
@@ -1,17 +1,19 @@
1
1
  {
2
2
  "name": "agentiqa",
3
- "version": "1.1.3",
3
+ "version": "1.1.4",
4
4
  "description": "AI-powered testing for web and mobile apps",
5
5
  "type": "module",
6
6
  "bin": "dist/cli.js",
7
7
  "files": [
8
- "dist/cli.js"
8
+ "dist/cli.js",
9
+ "scripts/preinstall.cjs"
9
10
  ],
10
11
  "scripts": {
11
12
  "build": "npx tsx esbuild.config.ts",
12
13
  "test": "node --import tsx --test src/__tests__/*.test.ts",
13
14
  "typecheck": "tsc --noEmit",
14
15
  "cli": "npx tsx src/index.ts",
16
+ "preinstall": "node scripts/preinstall.cjs",
15
17
  "postinstall": "npx playwright install chromium 2>/dev/null || true"
16
18
  },
17
19
  "dependencies": {
@@ -0,0 +1,23 @@
1
+ // Node version gate — must stay CommonJS + ES5 syntax so it parses on every
2
+ // Node release npm 6+ supports. We can't rely on `engines.node` alone because
3
+ // npm only warns about it; on Node <18 the install otherwise half-succeeds
4
+ // and fails later with confusing errors (EBADENGINE spam, then
5
+ // "sh: agentiqa: Permission denied" when npx tries to launch the bin).
6
+ var current = process.versions.node
7
+ var major = parseInt(current.split('.')[0], 10)
8
+ var MIN_MAJOR = 18
9
+
10
+ if (major < MIN_MAJOR) {
11
+ var msg =
12
+ '\nagentiqa requires Node.js >= ' +
13
+ MIN_MAJOR +
14
+ ' (you have v' +
15
+ current +
16
+ ').\n\n' +
17
+ 'Upgrade Node before installing. Common ways to do that:\n' +
18
+ ' - GitHub Actions: uses: actions/setup-node@v4 with: { node-version: 20 }\n' +
19
+ ' - Ubuntu CI: curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash - && sudo apt-get install -y nodejs\n' +
20
+ ' - nvm (local): nvm install 20 && nvm use 20\n'
21
+ process.stderr.write(msg + '\n')
22
+ process.exit(1)
23
+ }