lighthouse 13.6.0-dev.20261105 → 13.6.0-dev.20261109

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.
@@ -11,26 +11,6 @@ import {ProcessedTrace} from './processed-trace.js';
11
11
  import {NetworkRecords} from './network-records.js';
12
12
  import {TraceEngineResult} from './trace-engine-result.js';
13
13
 
14
- /**
15
- * ResourceSendRequest URLs in the trace retain #hash fragments, whereas CDP
16
- * Network.requestWillBeSent, Page.frameNavigated, initiator.url, documentURL,
17
- * and V8 script events strip #hash fragments, and Lantern's NetworkAnalyzer
18
- * requires request.url not to have a fragment.
19
- * TODO: Remove once @paulirish/trace_engine includes the fix in LanternComputationData.
20
- * @param {string} urlStr
21
- * @return {string}
22
- */
23
- function stripUrlHash(urlStr) {
24
- if (!urlStr.includes('#')) return urlStr;
25
- try {
26
- const url = new URL(urlStr);
27
- url.hash = '';
28
- return url.href;
29
- } catch {
30
- return urlStr;
31
- }
32
- }
33
-
34
14
  class PageDependencyGraph {
35
15
  /**
36
16
  * @param {{trace: LH.Trace, devtoolsLog: LH.DevtoolsLog, settings: LH.Audit.Context['settings'], URL: LH.Artifacts['URL'], SourceMaps: LH.Artifacts['SourceMaps'], HostDPR: LH.Artifacts['HostDPR'], fromTrace: boolean}} data
@@ -47,41 +27,7 @@ class PageDependencyGraph {
47
27
  if (data.fromTrace) {
48
28
  const traceEngineResult =
49
29
  await TraceEngineResult.request({trace, settings, SourceMaps, HostDPR}, context);
50
- let parsedTrace = traceEngineResult.data;
51
- if (parsedTrace.NetworkRequests.byTime.some(
52
- r => r.args.data.url.includes('#') ||
53
- r.args.data.redirects.some(red => red.url.includes('#'))
54
- )) {
55
- const byTime = parsedTrace.NetworkRequests.byTime.map(request => {
56
- const url = stripUrlHash(request.args.data.url);
57
- const redirects = request.args.data.redirects.map(redirect => ({
58
- ...redirect,
59
- url: stripUrlHash(redirect.url),
60
- }));
61
- if (url === request.args.data.url &&
62
- redirects.every((red, i) => red.url === request.args.data.redirects[i].url)) {
63
- return request;
64
- }
65
- return {
66
- ...request,
67
- args: {
68
- ...request.args,
69
- data: {
70
- ...request.args.data,
71
- url,
72
- redirects,
73
- },
74
- },
75
- };
76
- });
77
- parsedTrace = {
78
- ...parsedTrace,
79
- NetworkRequests: {
80
- ...parsedTrace.NetworkRequests,
81
- byTime,
82
- },
83
- };
84
- }
30
+ const parsedTrace = traceEngineResult.data;
85
31
  const requests =
86
32
  Lantern.TraceEngineComputationData.createNetworkRequests(trace, parsedTrace);
87
33
  const graph =
@@ -128,13 +128,15 @@ const str_ = i18n.createIcuMessageFn(import.meta.url, UIStrings);
128
128
  const defaultConfig = {
129
129
  settings: constants.defaultSettings,
130
130
  artifacts: [
131
- {id: 'WebMCP', gatherer: 'webmcp'},
132
- {id: 'WebMcpSchemaIssues', gatherer: 'webmcp-schema'},
133
- {id: 'LlmsTxt', gatherer: 'agentic/llms-txt'},
134
131
  // Artifacts which can be depended on come first.
135
132
  {id: 'DevtoolsLog', gatherer: 'devtools-log'},
136
133
  {id: 'Trace', gatherer: 'trace'},
134
+ {id: 'RobotsTxt', gatherer: 'seo/robots-txt'},
137
135
 
136
+ {id: 'WebMCP', gatherer: 'webmcp'},
137
+ {id: 'WebMcpSchemaIssues', gatherer: 'webmcp-schema'},
138
+ {id: 'LlmsTxt', gatherer: 'agentic/llms-txt'},
139
+ {id: 'AgentResourceDiscovery', gatherer: 'agentic/ard'},
138
140
  {id: 'Accessibility', gatherer: 'accessibility'},
139
141
  {id: 'AnchorElements', gatherer: 'anchor-elements'},
140
142
  {id: 'ConsoleMessages', gatherer: 'console-messages'},
@@ -149,8 +151,6 @@ const defaultConfig = {
149
151
  {id: 'MainDocumentContent', gatherer: 'main-document-content'},
150
152
  {id: 'MetaElements', gatherer: 'meta-elements'},
151
153
  {id: 'NetworkUserAgent', gatherer: 'network-user-agent'},
152
- {id: 'RobotsTxt', gatherer: 'seo/robots-txt'},
153
- {id: 'AgentResourceDiscovery', gatherer: 'agentic/ard'},
154
154
  {id: 'Scripts', gatherer: 'scripts'},
155
155
  {id: 'SourceMaps', gatherer: 'source-maps'},
156
156
  {id: 'Stacks', gatherer: 'stacks'},
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "lighthouse",
3
3
  "type": "module",
4
- "version": "13.6.0-dev.20261105",
4
+ "version": "13.6.0-dev.20261109",
5
5
  "description": "Automated auditing, performance metrics, and best practices for the web.",
6
6
  "main": "./core/index.js",
7
7
  "bin": {