|
9 | 9 | // |
10 | 10 | // Pairing tokens are single-use, so this mints a fresh one per run. Never put a |
11 | 11 | // pairing URL in a committed file or a screenshot. |
12 | | -import { createRequire } from "node:module"; |
| 12 | +import * as NodeModule from "node:module"; |
13 | 13 | import * as NodeChildProcess from "node:child_process"; |
14 | 14 | import * as NodeFSP from "node:fs/promises"; |
15 | 15 | import * as NodePath from "node:path"; |
16 | | -import * as NodeUrl from "node:url"; |
| 16 | +import * as NodeURL from "node:url"; |
17 | 17 | import * as NodeUtil from "node:util"; |
18 | 18 |
|
19 | 19 | const execFile = NodeUtil.promisify(NodeChildProcess.execFile); |
20 | | -const repoRoot = NodePath.resolve(NodePath.dirname(NodeUrl.fileURLToPath(import.meta.url)), ".."); |
| 20 | +const repoRoot = NodePath.resolve(NodePath.dirname(NodeURL.fileURLToPath(import.meta.url)), ".."); |
21 | 21 |
|
22 | 22 | // playwright-core is a direct dependency of apps/desktop, not of the root, so |
23 | 23 | // resolve it from that package rather than guessing a pnpm store path. |
24 | | -const require = createRequire(NodePath.join(repoRoot, "apps/desktop/package.json")); |
| 24 | +const require = NodeModule.createRequire(NodePath.join(repoRoot, "apps/desktop/package.json")); |
25 | 25 | const { chromium } = require("playwright-core"); |
26 | | -const sharp = createRequire(NodePath.join(repoRoot, "package.json"))("sharp"); |
| 26 | +const sharp = NodeModule.createRequire(NodePath.join(repoRoot, "package.json"))("sharp"); |
27 | 27 |
|
28 | 28 | // 1254x841 CSS at deviceScaleFactor 2 lands exactly on the 2508x1682 the hero |
29 | 29 | // <img> declares. Capturing at 1x and upscaling visibly softens the type. |
|
0 commit comments