pagetrace 0.7.0 → 0.8.0
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 +13 -0
- package/README.md +1 -1
- package/dist/cli.cjs +6 -2
- package/dist/cli.js +6 -2
- package/dist/index.cjs +5 -1
- package/dist/index.d.cts +4 -2
- package/dist/index.d.ts +4 -2
- package/dist/index.js +5 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,18 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
While the version is below 1.0.0, breaking changes ship in a minor release.
|
|
8
8
|
|
|
9
|
+
## [0.8.0] - 2026-09-06
|
|
10
|
+
|
|
11
|
+
### Fixed
|
|
12
|
+
|
|
13
|
+
- `siteUrl` now overrides the crawled origin for an origin crawl, not just a
|
|
14
|
+
`--dir` crawl. Checking a local build or a preview deployment means crawling
|
|
15
|
+
`http://localhost:3000` while every page's canonical points at production, so
|
|
16
|
+
`canonical.offsite` fired on every page and made the check useless in exactly
|
|
17
|
+
the setup it is most wanted. Where you crawl and what the site calls itself are
|
|
18
|
+
separate things; `siteUrl` is now the authority on the latter. Without it the
|
|
19
|
+
crawled origin is still used, so nothing changes for a plain production crawl.
|
|
20
|
+
|
|
9
21
|
## [0.7.0] - 2026-09-06
|
|
10
22
|
|
|
11
23
|
### Changed
|
|
@@ -237,6 +249,7 @@ Initial release. `snapshot`, `check` and `audit` commands; filesystem and HTTP
|
|
|
237
249
|
crawling; diff classified by transition; absolute, cross-page and hreflang audit
|
|
238
250
|
rules; pretty, JSON, markdown, GitHub and HTML reporters.
|
|
239
251
|
|
|
252
|
+
[0.8.0]: https://github.com/shyamexe/pagetrace/compare/v0.7.0...v0.8.0
|
|
240
253
|
[0.7.0]: https://github.com/shyamexe/pagetrace/compare/v0.6.0...v0.7.0
|
|
241
254
|
[0.6.0]: https://github.com/shyamexe/pagetrace/compare/v0.5.0...v0.6.0
|
|
242
255
|
[0.5.0]: https://github.com/shyamexe/pagetrace/compare/v0.4.0...v0.5.0
|
package/README.md
CHANGED
|
@@ -156,7 +156,7 @@ Alongside the diff, `check` runs absolute rules: missing title, canonical, `h1`,
|
|
|
156
156
|
}
|
|
157
157
|
```
|
|
158
158
|
|
|
159
|
-
`siteUrl` is
|
|
159
|
+
`siteUrl` is what the site calls itself, which is not always where you are crawling it. It is what `canonical.offsite` compares against, so set it when checking a `--dir` build, and when crawling a local build or a preview deployment whose pages carry production canonicals. A plain crawl of production infers it.
|
|
160
160
|
|
|
161
161
|
Every finding has a stable `code`. Set any code to `error`, `warn`, `info`, or `off`.
|
|
162
162
|
|
package/dist/cli.cjs
CHANGED
|
@@ -1451,7 +1451,11 @@ async function snapshotFromOrigin(origin, options = {}) {
|
|
|
1451
1451
|
const base = new URL(origin);
|
|
1452
1452
|
const agents = options.aiAgents ?? DEFAULT_AI_AGENTS;
|
|
1453
1453
|
const timeout = options.timeout;
|
|
1454
|
-
const site = {
|
|
1454
|
+
const site = {
|
|
1455
|
+
origin: options.siteUrl ? new URL(options.siteUrl).origin : base.origin,
|
|
1456
|
+
robotsTxt: null,
|
|
1457
|
+
llmsTxt: null
|
|
1458
|
+
};
|
|
1455
1459
|
const limit = options.limit ?? 200;
|
|
1456
1460
|
const robots = await fetchText(new URL("/robots.txt", base).href, timeout);
|
|
1457
1461
|
if (robots !== null) site.robotsTxt = extractRobotsTxt(robots, agents);
|
|
@@ -1641,7 +1645,7 @@ cli.command("audit", "Audit a site as it stands, with explanations and fixes").o
|
|
|
1641
1645
|
}
|
|
1642
1646
|
});
|
|
1643
1647
|
cli.help();
|
|
1644
|
-
cli.version("0.
|
|
1648
|
+
cli.version("0.8.0");
|
|
1645
1649
|
async function main() {
|
|
1646
1650
|
try {
|
|
1647
1651
|
cli.parse(process.argv, { run: false });
|
package/dist/cli.js
CHANGED
|
@@ -1428,7 +1428,11 @@ async function snapshotFromOrigin(origin, options = {}) {
|
|
|
1428
1428
|
const base = new URL(origin);
|
|
1429
1429
|
const agents = options.aiAgents ?? DEFAULT_AI_AGENTS;
|
|
1430
1430
|
const timeout = options.timeout;
|
|
1431
|
-
const site = {
|
|
1431
|
+
const site = {
|
|
1432
|
+
origin: options.siteUrl ? new URL(options.siteUrl).origin : base.origin,
|
|
1433
|
+
robotsTxt: null,
|
|
1434
|
+
llmsTxt: null
|
|
1435
|
+
};
|
|
1432
1436
|
const limit = options.limit ?? 200;
|
|
1433
1437
|
const robots = await fetchText(new URL("/robots.txt", base).href, timeout);
|
|
1434
1438
|
if (robots !== null) site.robotsTxt = extractRobotsTxt(robots, agents);
|
|
@@ -1618,7 +1622,7 @@ cli.command("audit", "Audit a site as it stands, with explanations and fixes").o
|
|
|
1618
1622
|
}
|
|
1619
1623
|
});
|
|
1620
1624
|
cli.help();
|
|
1621
|
-
cli.version("0.
|
|
1625
|
+
cli.version("0.8.0");
|
|
1622
1626
|
async function main() {
|
|
1623
1627
|
try {
|
|
1624
1628
|
cli.parse(process.argv, { run: false });
|
package/dist/index.cjs
CHANGED
|
@@ -1490,7 +1490,11 @@ async function snapshotFromOrigin(origin, options = {}) {
|
|
|
1490
1490
|
const base = new URL(origin);
|
|
1491
1491
|
const agents = options.aiAgents ?? DEFAULT_AI_AGENTS;
|
|
1492
1492
|
const timeout = options.timeout;
|
|
1493
|
-
const site = {
|
|
1493
|
+
const site = {
|
|
1494
|
+
origin: options.siteUrl ? new URL(options.siteUrl).origin : base.origin,
|
|
1495
|
+
robotsTxt: null,
|
|
1496
|
+
llmsTxt: null
|
|
1497
|
+
};
|
|
1494
1498
|
const limit = options.limit ?? 200;
|
|
1495
1499
|
const robots = await fetchText(new URL("/robots.txt", base).href, timeout);
|
|
1496
1500
|
if (robots !== null) site.robotsTxt = extractRobotsTxt(robots, agents);
|
package/dist/index.d.cts
CHANGED
|
@@ -94,8 +94,10 @@ interface Config {
|
|
|
94
94
|
/** Minimum word count before a page is flagged as thin. */
|
|
95
95
|
minWordCount?: number;
|
|
96
96
|
/**
|
|
97
|
-
* The site's own origin, e.g. "https://example.com".
|
|
98
|
-
*
|
|
97
|
+
* The site's own origin, e.g. "https://example.com". Used to detect canonicals
|
|
98
|
+
* pointing at another host. A --dir crawl has no other source for it, and an
|
|
99
|
+
* origin crawl of a local build or preview deployment needs it to override the
|
|
100
|
+
* URL being crawled, since those serve production canonicals.
|
|
99
101
|
*/
|
|
100
102
|
siteUrl?: string;
|
|
101
103
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -94,8 +94,10 @@ interface Config {
|
|
|
94
94
|
/** Minimum word count before a page is flagged as thin. */
|
|
95
95
|
minWordCount?: number;
|
|
96
96
|
/**
|
|
97
|
-
* The site's own origin, e.g. "https://example.com".
|
|
98
|
-
*
|
|
97
|
+
* The site's own origin, e.g. "https://example.com". Used to detect canonicals
|
|
98
|
+
* pointing at another host. A --dir crawl has no other source for it, and an
|
|
99
|
+
* origin crawl of a local build or preview deployment needs it to override the
|
|
100
|
+
* URL being crawled, since those serve production canonicals.
|
|
99
101
|
*/
|
|
100
102
|
siteUrl?: string;
|
|
101
103
|
}
|
package/dist/index.js
CHANGED
|
@@ -1419,7 +1419,11 @@ async function snapshotFromOrigin(origin, options = {}) {
|
|
|
1419
1419
|
const base = new URL(origin);
|
|
1420
1420
|
const agents = options.aiAgents ?? DEFAULT_AI_AGENTS;
|
|
1421
1421
|
const timeout = options.timeout;
|
|
1422
|
-
const site = {
|
|
1422
|
+
const site = {
|
|
1423
|
+
origin: options.siteUrl ? new URL(options.siteUrl).origin : base.origin,
|
|
1424
|
+
robotsTxt: null,
|
|
1425
|
+
llmsTxt: null
|
|
1426
|
+
};
|
|
1423
1427
|
const limit = options.limit ?? 200;
|
|
1424
1428
|
const robots = await fetchText(new URL("/robots.txt", base).href, timeout);
|
|
1425
1429
|
if (robots !== null) site.robotsTxt = extractRobotsTxt(robots, agents);
|