lighthouse 9.5.0-dev.20221211 → 9.5.0-dev.20221213

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.
@@ -506,9 +506,13 @@ const UIStrings = {
506
506
  */
507
507
  errorDocument: 'Back/forward cache is disabled due to a document error.',
508
508
  /**
509
- * @description Description text for not restored reason ErrorDocument.
509
+ * @description Description text for not restored reason FencedFramesEmbedder.
510
510
  */
511
511
  fencedFramesEmbedder: 'Pages using FencedFrames cannot be stored in bfcache.',
512
+ /**
513
+ * @description Description text for not restored reason KeepaliveRequest.
514
+ */
515
+ keepaliveRequest: 'Back/forward cache is disabled due to a keepalive request.',
512
516
  };
513
517
 
514
518
  const str_ = i18n.createIcuMessageFn(import.meta.url, UIStrings);
@@ -647,6 +651,7 @@ const NotRestoredReasonDescription = {
647
651
  {name: str_(UIStrings.embedderExtensionSentMessageToCachedFrame)},
648
652
  'ErrorDocument': {name: str_(UIStrings.errorDocument)},
649
653
  'FencedFramesEmbedder': {name: str_(UIStrings.fencedFramesEmbedder)},
654
+ 'KeepaliveRequest': {name: str_(UIStrings.keepaliveRequest)},
650
655
  };
651
656
 
652
657
  export {
@@ -157,23 +157,25 @@ class TextSourceMap {
157
157
  }
158
158
  findEntryRanges(lineNumber, columnNumber) {
159
159
  const mappings = this.mappings();
160
- const index = Platform.ArrayUtilities.upperBound(mappings, undefined, (unused, entry) => lineNumber - entry.lineNumber || columnNumber - entry.columnNumber);
161
- if (!index) {
160
+ const endIndex = Platform.ArrayUtilities.upperBound(mappings, undefined, (unused, entry) => lineNumber - entry.lineNumber || columnNumber - entry.columnNumber);
161
+ if (!endIndex) {
162
162
  // If the line and column are preceding all the entries, then there is nothing to map.
163
163
  return null;
164
164
  }
165
- const sourceURL = mappings[index].sourceURL;
165
+ // startIndex must be within mappings range because endIndex must be not falsy
166
+ const startIndex = endIndex - 1;
167
+ const sourceURL = mappings[startIndex].sourceURL;
166
168
  if (!sourceURL) {
167
169
  return null;
168
170
  }
169
171
  // Let us compute the range that contains the source position in the compiled code.
170
- const endLine = index < mappings.length ? mappings[index].lineNumber : 2 ** 31 - 1;
171
- const endColumn = index < mappings.length ? mappings[index].columnNumber : 2 ** 31 - 1;
172
- const range = new TextUtils.TextRange.TextRange(mappings[index - 1].lineNumber, mappings[index - 1].columnNumber, endLine, endColumn);
172
+ const endLine = endIndex < mappings.length ? mappings[endIndex].lineNumber : 2 ** 31 - 1;
173
+ const endColumn = endIndex < mappings.length ? mappings[endIndex].columnNumber : 2 ** 31 - 1;
174
+ const range = new TextUtils.TextRange.TextRange(mappings[startIndex].lineNumber, mappings[startIndex].columnNumber, endLine, endColumn);
173
175
  // Now try to find the corresponding token in the original code.
174
176
  const reverseMappings = this.reversedMappings(sourceURL);
175
- const startSourceLine = mappings[index - 1].sourceLineNumber;
176
- const startSourceColumn = mappings[index - 1].sourceColumnNumber;
177
+ const startSourceLine = mappings[startIndex].sourceLineNumber;
178
+ const startSourceColumn = mappings[startIndex].sourceColumnNumber;
177
179
  const endReverseIndex = Platform.ArrayUtilities.upperBound(reverseMappings, undefined, (unused, i) => startSourceLine - mappings[i].sourceLineNumber || startSourceColumn - mappings[i].sourceColumnNumber);
178
180
  if (!endReverseIndex) {
179
181
  return null;
@@ -38,22 +38,28 @@ const UIStrings = {
38
38
  canRequestURLHTTPContainingNewline:
39
39
  'Resource requests whose URLs contained both removed whitespace `(n|r|t)` characters and less-than characters (`<`) are blocked. Please remove newlines and encode less-than characters from places like element attribute values in order to load these resources.',
40
40
  /**
41
- * @description TODO(crbug.com/1320335): Description needed for translation
41
+ * @description This warning occurs when the website attempts to invoke the
42
+ * deprecated `chrome.loadTimes().connectionInfo` API.
42
43
  */
43
44
  chromeLoadTimesConnectionInfo:
44
45
  '`chrome.loadTimes()` is deprecated, instead use standardized API: Navigation Timing 2.',
45
46
  /**
46
- * @description TODO(crbug.com/1320336): Description needed for translation
47
+ * @description This warning occurs when the website attempts to invoke the
48
+ * deprecated `chrome.loadTimes().firstPaintAfterLoadTime` API.
47
49
  */
48
50
  chromeLoadTimesFirstPaintAfterLoadTime:
49
51
  '`chrome.loadTimes()` is deprecated, instead use standardized API: Paint Timing.',
50
52
  /**
51
- * @description TODO(crbug.com/1320337): Description needed for translation
53
+ * @description This warning occurs when the website attempts to invoke the
54
+ * deprecated `chrome.loadTimes().wasAlternateProtocolAvailable` API.
52
55
  */
53
56
  chromeLoadTimesWasAlternateProtocolAvailable:
54
57
  '`chrome.loadTimes()` is deprecated, instead use standardized API: `nextHopProtocol` in Navigation Timing 2.',
55
58
  /**
56
- * @description TODO(crbug.com/1318847): Description needed for translation
59
+ * @description This warning occurs when the browser attempts to store a
60
+ * cookie containing a banned character. Rather than the cookie string
61
+ * being truncated at the banned character, the entire cookie will be
62
+ * rejected now.
57
63
  */
58
64
  cookieWithTruncatingChar: 'Cookies containing a `(0|r|n)` character will be rejected instead of truncated.',
59
65
  /**
@@ -111,7 +117,9 @@ const UIStrings = {
111
117
  geolocationInsecureOriginDeprecatedNotRemoved:
112
118
  '`getCurrentPosition()` and `watchPosition()` are deprecated on insecure origins. To use this feature, you should consider switching your application to a secure origin, such as HTTPS. See https://goo.gle/chrome-insecure-origins for more details.',
113
119
  /**
114
- * @description TODO(crbug.com/1318858): Description needed for translation
120
+ * @description This warning occurs when the `getUserMedia()` API is invoked
121
+ * on an insecure (e.g., HTTP) site. This is only permitted on secure sites
122
+ * (e.g., HTTPS).
115
123
  */
116
124
  getUserMediaInsecureOrigin:
117
125
  '`getUserMedia()` no longer works on insecure origins. To use this feature, you should consider switching your application to a secure origin, such as HTTPS. See https://goo.gle/chrome-insecure-origins for more details.',
@@ -127,34 +135,87 @@ const UIStrings = {
127
135
  */
128
136
  identityInCanMakePaymentEvent: 'The merchant origin and arbitrary data from the `canmakepayment` service worker event are deprecated and will be removed: `topOrigin`, `paymentRequestOrigin`, `methodData`, `modifiers`.',
129
137
  /**
130
- * @description TODO(crbug.com/1320343): Description needed for translation
138
+ * @description This warning occurs when an insecure context (e.g., HTTP)
139
+ * requests a private resource (not on open internet). This is done to
140
+ * mitigate the potential for CSRF and other attacks.
131
141
  */
132
142
  insecurePrivateNetworkSubresourceRequest:
133
143
  'The website requested a subresource from a network that it could only access because of its users\' privileged network position. These requests expose non-public devices and servers to the internet, increasing the risk of a cross-site request forgery (CSRF) attack, and/or information leakage. To mitigate these risks, Chrome deprecates requests to non-public subresources when initiated from non-secure contexts, and will start blocking them.',
134
144
  /**
135
- * @description A deprecation warning shown in the DevTools Issues tab.
136
- * It's shown when a video conferencing website attempts to disable
137
- * use of IPv6 addresses with a non-standard API.
138
- */
139
- legacyConstraintGoogIPv6:
140
- 'IPv6 is enabled-by-default and the ability to disable it using `googIPv6` is targeted to be removed in M108, after which it will be ignored. Please stop using this legacy constraint.',
141
- /**
142
- * @description TODO(crbug.com/1318865): Description needed for translation
145
+ * @description This warning occurs when a stylesheet loaded from a local
146
+ * file directive does not end in the file type `.css`.
143
147
  */
144
148
  localCSSFileExtensionRejected:
145
149
  'CSS cannot be loaded from `file:` URLs unless they end in a `.css` file extension.',
146
150
  /**
147
- * @description TODO(crbug.com/1320345): Description needed for translation
151
+ * @description This is a deprecation warning to developers that occurs when
152
+ * the script attempts to use the Media Source Extensions API in a way that
153
+ * is no longer supported by the specification for the API. The usage
154
+ * that is problematic is when the script calls the `SourceBuffer.abort()`
155
+ * method at a time when there is still processing happening in response to a
156
+ * previous `SourceBuffer.remove()` call for the same SourceBuffer object.
157
+ * More precisely, we show this warning to developers when script calls the
158
+ * SourceBuffer abort() method while the asynchronous processing of a remove()
159
+ * call on that SourceBuffer is not yet complete. Early versions of the Media
160
+ * Source Extensions specification allowed such aborts, but standardization of
161
+ * the specification resulted in disallowing the aborts. The script should
162
+ * instead wait for the asynchronous remove() operation to complete, which is
163
+ * observable by listening for the associated 'updateend' event from the
164
+ * SourceBuffer. A note is also included in the warning, describing when
165
+ * abort() is meaningful and allowed by the specification for purposes other
166
+ * than interrupting a remove() operation's asynchronous steps. Those
167
+ * supported purposes include using abort() to interrupt processing that may
168
+ * still be happening in response to a previous appendBuffer() call on that
169
+ * SourceBuffer, or using abort() to clear the internal of any unprocessed
170
+ * data remaining from previous appendBuffer() calls.
171
+ * See https://www.w3.org/TR/media-source-2/#dom-sourcebuffer-abort for the
172
+ * currently specified behavior, which would throw an exception once the
173
+ * deprecated removal abort is no longer supported.
174
+ * See https://github.com/w3c/media-source/issues/19 for the discussion that
175
+ * led to the specification change.
148
176
  */
149
177
  mediaSourceAbortRemove:
150
178
  'Using `SourceBuffer.abort()` to abort `remove()`\'s asynchronous range removal is deprecated due to specification change. Support will be removed in the future. You should listen to the `updateend` event instead. `abort()` is intended to only abort an asynchronous media append or reset parser state.',
151
179
  /**
152
- * @description TODO(crbug.com/1320346): Description needed for translation
180
+ * @description This is a deprecation warning to developers that occurs when
181
+ * the script attempts to use the Media Source Extensions API in a way that is
182
+ * no longer supported by the specification for the API. The usage that is
183
+ * problematic is when the script sets the duration attribute of a MediaSource
184
+ * object too low. The duration attribute of a MediaSource must be longer than
185
+ * the actual duration of any media (audio or video) already in the
186
+ * MediaSource. When set too low, the MediaSource must remove audio and video
187
+ * content that is beyond the time indicated by the new duration. Content
188
+ * removal that is caused by setting the duration attribute too low is no
189
+ * longer allowed by the specification. The message describes the minimum
190
+ * allowable duration value as the "highest presentation timestamp of any
191
+ * buffered coded frames" as a more precise way of describing the duration of
192
+ * content already in the MediaSource: "coded frames" are the specification's
193
+ * way of describing compressed audio frames or compressed video frames, and
194
+ * they each have a "presentation timestamp" that describes precisely when
195
+ * that frame's playback occurs in the overall media presentation. Early
196
+ * versions of the Media Source Extensions specification allowed this to
197
+ * happen, but standardization of the specification resulted in disallowing
198
+ * this behavior. The underlying issue leading to this specification change
199
+ * was that setting the duration attribute should be synchronous, but setting
200
+ * it lower than the timestamp of something currently buffered would cause
201
+ * confusing removal of media between that new duration and the previous,
202
+ * larger, duration. The script should instead explicitly remove that range of
203
+ * media first, before lowering the duration.
204
+ * See https://www.w3.org/TR/media-source-2/#dom-mediasource-duration and
205
+ * https://www.w3.org/TR/media-source-2/#dom-mediasource-duration for the
206
+ * currently specified behavior, which would throw an exception once support
207
+ * is removed for deprecated implicit asynchronous range removal when duration
208
+ * is truncated.
209
+ * See both https://github.com/w3c/media-source/issues/20 and
210
+ * https://github.com/w3c/media-source/issues/26 for the discussion that led
211
+ * to the specification change.
153
212
  */
154
213
  mediaSourceDurationTruncatingBuffered:
155
214
  'Setting `MediaSource.duration` below the highest presentation timestamp of any buffered coded frames is deprecated due to specification change. Support for implicit removal of truncated buffered media will be removed in the future. You should instead perform explicit `remove(newDuration, oldDuration)` on all `sourceBuffers`, where `newDuration < oldDuration`.',
156
215
  /**
157
- * @description TODO(crbug.com/1320347): Description needed for translation
216
+ * @description This warning occurs when the browser requests Web MIDI access
217
+ * as sysex (system exclusive messages) can be allowed via prompt even if
218
+ * the browser did not specifically request it.
158
219
  */
159
220
  noSysexWebMIDIWithoutPermission:
160
221
  'Web MIDI will ask a permission to use even if the sysex is not specified in the `MIDIOptions`.',
@@ -169,7 +230,9 @@ const UIStrings = {
169
230
  notificationPermissionRequestedIframe:
170
231
  'Permission for the Notification API may no longer be requested from a cross-origin iframe. You should consider requesting permission from a top-level frame or opening a new window instead.',
171
232
  /**
172
- * @description TODO(crbug.com/1318867): Description needed for translation
233
+ * @description This warning occurs when the WebRTC protocol attempts to
234
+ * negotiate a connection using an obsolete cipher and risks connection
235
+ * security.
173
236
  */
174
237
  obsoleteWebRtcCipherSuite:
175
238
  'Your partner is negotiating an obsolete (D)TLS version. Please check with your partner to have this fixed.',
@@ -178,6 +241,14 @@ const UIStrings = {
178
241
  */
179
242
  openWebDatabaseInsecureContext:
180
243
  'WebSQL in non-secure contexts is deprecated and will be removed soon. Please use Web Storage or Indexed Database.',
244
+ /**
245
+ * @description Warning displayed to developers when they use the PaymentInstruments API to let them know this API is deprecated.
246
+ */
247
+ paymentInstruments: '`paymentManager.instruments` is deprecated. Please use just-in-time install for payment handlers instead.',
248
+ /**
249
+ * @description Warning displayed to developers when their Web Payment API usage violates their Content-Security-Policy (CSP) connect-src directive to let them know this CSP bypass has been deprecated.
250
+ */
251
+ paymentRequestCSPViolation: 'Your `PaymentRequest` call bypassed Content-Security-Policy (CSP) `connect-src` directive. This bypass is deprecated. Please add the payment method identifier from the `PaymentRequest` API (in `supportedMethods` field) to your CSP `connect-src` directive.',
181
252
  /**
182
253
  * @description Warning displayed to developers when persistent storage type is used to notify that storage type is deprecated.
183
254
  */
@@ -208,7 +279,8 @@ const UIStrings = {
208
279
  */
209
280
  deprecatedWithReplacement: '{PH1} is deprecated. Please use {PH2} instead.',
210
281
  /**
211
- * @description TODO(crbug.com/1320357): Description needed for translation
282
+ * @description This warning occurs when a subresource loaded by a page
283
+ * has a URL with an authority portion. These are disallowed.
212
284
  */
213
285
  requestedSubresourceWithEmbeddedCredentials:
214
286
  'Subresource requests whose URLs contain embedded credentials (e.g. `https://user:pass@host/`) are blocked.',
@@ -303,6 +375,14 @@ const UIStrings = {
303
375
  */
304
376
  xrSupportsSession:
305
377
  '`supportsSession()` is deprecated. Please use `isSessionSupported()` and check the resolved boolean value instead.',
378
+ /**
379
+ * @description Warning displayed to developers that use overflow:visible
380
+ * for replaced elements. This declaration was earlier ignored but will now
381
+ * change the element's painting based on whether the overflow value allows
382
+ * the element to paint outside its bounds.
383
+ */
384
+ overflowVisibleOnReplacedElement:
385
+ 'Specifying `overflow: visible` on img, video and canvas tags may cause them to produce visual content outside of the element bounds. See https://github.com/WICG/shared-element-transitions/blob/main/debugging_overflow_on_images.md.',
306
386
  };
307
387
 
308
388
  const str_ = i18n.createIcuMessageFn(import.meta.url, UIStrings);
@@ -395,10 +475,6 @@ function getDescription(issueDetails) {
395
475
  feature = 5436853517811712;
396
476
  milestone = 92;
397
477
  break;
398
- case 'LegacyConstraintGoogIPv6':
399
- message = str_(UIStrings.legacyConstraintGoogIPv6);
400
- milestone = 103;
401
- break;
402
478
  case 'LocalCSSFileExtensionRejected':
403
479
  message = str_(UIStrings.localCSSFileExtensionRejected);
404
480
  milestone = 64;
@@ -411,15 +487,6 @@ function getDescription(issueDetails) {
411
487
  message = str_(UIStrings.mediaSourceDurationTruncatingBuffered);
412
488
  feature = 6107495151960064;
413
489
  break;
414
- case 'NavigateEventRestoreScroll':
415
- message = str_(
416
- UIStrings.deprecatedWithReplacement, {PH1: 'navigateEvent.restoreScroll()', PH2: 'navigateEvent.scroll()'});
417
- break;
418
- case 'NavigateEventTransitionWhile':
419
- message = str_(
420
- UIStrings.deprecatedWithReplacement,
421
- {PH1: 'navigateEvent.transitionWhile()', PH2: 'navigateEvent.intercept()'});
422
- break;
423
490
  case 'NoSysexWebMIDIWithoutPermission':
424
491
  message = str_(UIStrings.noSysexWebMIDIWithoutPermission);
425
492
  feature = 5138066234671104;
@@ -441,6 +508,14 @@ function getDescription(issueDetails) {
441
508
  feature = 5175124599767040;
442
509
  milestone = 105;
443
510
  break;
511
+ case 'PaymentInstruments':
512
+ message = str_(UIStrings.paymentInstruments);
513
+ feature = 5099285054488576;
514
+ break;
515
+ case 'PaymentRequestCSPViolation':
516
+ message = str_(UIStrings.paymentRequestCSPViolation);
517
+ feature = 6286595631087616;
518
+ break;
444
519
  case 'PersistentQuotaType':
445
520
  message = str_(UIStrings.persistentQuotaType);
446
521
  feature = 5176235376246784;
@@ -498,6 +573,11 @@ function getDescription(issueDetails) {
498
573
  message = str_(UIStrings.requestedSubresourceWithEmbeddedCredentials);
499
574
  feature = 5669008342777856;
500
575
  break;
576
+ case 'OverflowVisibleOnReplacedElement':
577
+ message = str_(UIStrings.overflowVisibleOnReplacedElement);
578
+ feature = 5137515594383360;
579
+ milestone = 108;
580
+ break;
501
581
  case 'RTCConstraintEnableDtlsSrtpFalse':
502
582
  message = str_(UIStrings.rtcConstraintEnableDtlsSrtpFalse);
503
583
  milestone = 97;
@@ -173,6 +173,11 @@ function lookupLocale(locales, possibleLocales) {
173
173
  function createIcuMessageFn(filename, fileStrings) {
174
174
  if (filename.startsWith('file://')) filename = url.fileURLToPath(filename);
175
175
 
176
+ // In the common case, `filename` is an absolute path that needs to be transformed
177
+ // to be relative to LH_ROOT. In other cases, `filename` might be the exact i18n identifier
178
+ // already (see: stack-packs.js, or bundled lighthouse).
179
+ if (path.isAbsolute(filename)) filename = path.relative(LH_ROOT, filename);
180
+
176
181
  /**
177
182
  * Combined so fn can access both caller's strings and i18n.UIStrings shared across LH.
178
183
  * @type {Record<string, string>}
@@ -189,8 +194,12 @@ function createIcuMessageFn(filename, fileStrings) {
189
194
  const keyname = Object.keys(mergedStrings).find(key => mergedStrings[key] === message);
190
195
  if (!keyname) throw new Error(`Could not locate: ${message}`);
191
196
 
192
- const filenameToLookup = keyname in fileStrings ? filename : getModulePath(import.meta);
193
- const unixStyleFilename = path.relative(LH_ROOT, filenameToLookup).replace(/\\/g, '/');
197
+ // `message` can be a UIString defined within the provided `fileStrings`, or it could be
198
+ // one of the common strings found in `i18n.UIStrings`.
199
+ const filenameToLookup = keyname in fileStrings ?
200
+ filename :
201
+ path.relative(LH_ROOT, getModulePath(import.meta));
202
+ const unixStyleFilename = filenameToLookup.replace(/\\/g, '/');
194
203
  const i18nId = `${unixStyleFilename} | ${keyname}`;
195
204
 
196
205
  return {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "lighthouse",
3
3
  "type": "module",
4
- "version": "9.5.0-dev.20221211",
4
+ "version": "9.5.0-dev.20221213",
5
5
  "description": "Automated auditing, performance metrics, and best practices for the web.",
6
6
  "main": "./core/index.js",
7
7
  "bin": {
@@ -134,13 +134,13 @@
134
134
  "archiver": "^3.0.0",
135
135
  "c8": "^7.11.3",
136
136
  "chalk": "^2.4.1",
137
- "chrome-devtools-frontend": "1.0.1040857",
137
+ "chrome-devtools-frontend": "1.0.1070764",
138
138
  "concurrently": "^6.4.0",
139
139
  "conventional-changelog-cli": "^2.1.1",
140
140
  "cpy": "^8.1.2",
141
141
  "cross-env": "^7.0.2",
142
142
  "csv-validator": "^0.0.3",
143
- "devtools-protocol": "0.0.1034970",
143
+ "devtools-protocol": "0.0.1081726",
144
144
  "es-main": "^1.0.2",
145
145
  "eslint": "^8.4.1",
146
146
  "eslint-config-google": "^0.14.0",
@@ -212,8 +212,8 @@
212
212
  "yargs-parser": "^21.0.0"
213
213
  },
214
214
  "resolutions": {
215
- "puppeteer/**/devtools-protocol": "0.0.1034970",
216
- "puppeteer-core/**/devtools-protocol": "0.0.1034970",
215
+ "puppeteer/**/devtools-protocol": "0.0.1081726",
216
+ "puppeteer-core/**/devtools-protocol": "0.0.1081726",
217
217
  "testdouble/**/quibble": "connorjclark/quibble#fork"
218
218
  },
219
219
  "repository": "GoogleChrome/lighthouse",
@@ -1844,6 +1844,9 @@
1844
1844
  "core/lib/bfcache-strings.js | JavaScriptExecution": {
1845
1845
  "message": "Chrome detected an attempt to execute JavaScript while in the cache."
1846
1846
  },
1847
+ "core/lib/bfcache-strings.js | keepaliveRequest": {
1848
+ "message": "Back/forward cache is disabled due to a keepalive request."
1849
+ },
1847
1850
  "core/lib/bfcache-strings.js | keyboardLock": {
1848
1851
  "message": "Pages that use Keyboard lock are not currently eligible for back/forward cache."
1849
1852
  },
@@ -2138,9 +2141,6 @@
2138
2141
  "core/lib/deprecations-strings.js | insecurePrivateNetworkSubresourceRequest": {
2139
2142
  "message": "The website requested a subresource from a network that it could only access because of its users' privileged network position. These requests expose non-public devices and servers to the internet, increasing the risk of a cross-site request forgery (CSRF) attack, and/or information leakage. To mitigate these risks, Chrome deprecates requests to non-public subresources when initiated from non-secure contexts, and will start blocking them."
2140
2143
  },
2141
- "core/lib/deprecations-strings.js | legacyConstraintGoogIPv6": {
2142
- "message": "IPv6 is enabled-by-default and the ability to disable it using `googIPv6` is targeted to be removed in M108, after which it will be ignored. Please stop using this legacy constraint."
2143
- },
2144
2144
  "core/lib/deprecations-strings.js | localCSSFileExtensionRejected": {
2145
2145
  "message": "CSS cannot be loaded from `file:` URLs unless they end in a `.css` file extension."
2146
2146
  },
@@ -2168,6 +2168,15 @@
2168
2168
  "core/lib/deprecations-strings.js | openWebDatabaseInsecureContext": {
2169
2169
  "message": "WebSQL in non-secure contexts is deprecated and will be removed soon. Please use Web Storage or Indexed Database."
2170
2170
  },
2171
+ "core/lib/deprecations-strings.js | overflowVisibleOnReplacedElement": {
2172
+ "message": "Specifying `overflow: visible` on img, video and canvas tags may cause them to produce visual content outside of the element bounds. See https://github.com/WICG/shared-element-transitions/blob/main/debugging_overflow_on_images.md."
2173
+ },
2174
+ "core/lib/deprecations-strings.js | paymentInstruments": {
2175
+ "message": "`paymentManager.instruments` is deprecated. Please use just-in-time install for payment handlers instead."
2176
+ },
2177
+ "core/lib/deprecations-strings.js | paymentRequestCSPViolation": {
2178
+ "message": "Your `PaymentRequest` call bypassed Content-Security-Policy (CSP) `connect-src` directive. This bypass is deprecated. Please add the payment method identifier from the `PaymentRequest` API (in `supportedMethods` field) to your CSP `connect-src` directive."
2179
+ },
2171
2180
  "core/lib/deprecations-strings.js | persistentQuotaType": {
2172
2181
  "message": "`StorageType.persistent` is deprecated. Please use standardized `navigator.storage` instead."
2173
2182
  },
@@ -1844,6 +1844,9 @@
1844
1844
  "core/lib/bfcache-strings.js | JavaScriptExecution": {
1845
1845
  "message": "Ĉh́r̂óm̂é d̂ét̂éĉt́êd́ âń ât́t̂ém̂ṕt̂ t́ô éx̂éĉút̂é Ĵáv̂áŜćr̂íp̂t́ ŵh́îĺê ín̂ t́ĥé ĉáĉh́ê."
1846
1846
  },
1847
+ "core/lib/bfcache-strings.js | keepaliveRequest": {
1848
+ "message": "B̂áĉḱ/f̂ór̂ẃâŕd̂ ćâćĥé îś d̂íŝáb̂ĺêd́ d̂úê t́ô á k̂éêṕâĺîv́ê ŕêq́ûéŝt́."
1849
+ },
1847
1850
  "core/lib/bfcache-strings.js | keyboardLock": {
1848
1851
  "message": "P̂áĝéŝ t́ĥát̂ úŝé K̂éŷb́ôár̂d́ l̂óĉḱ âŕê ńôt́ ĉúr̂ŕêńt̂ĺŷ él̂íĝíb̂ĺê f́ôŕ b̂áĉḱ/f̂ór̂ẃâŕd̂ ćâćĥé."
1849
1852
  },
@@ -2138,9 +2141,6 @@
2138
2141
  "core/lib/deprecations-strings.js | insecurePrivateNetworkSubresourceRequest": {
2139
2142
  "message": "T̂h́ê ẃêb́ŝít̂é r̂éq̂úêśt̂éd̂ á ŝúb̂ŕêśôúr̂ćê f́r̂óm̂ á n̂ét̂ẃôŕk̂ t́ĥát̂ ít̂ ćôúl̂d́ ôńl̂ý âćĉéŝś b̂éĉáûśê óf̂ ít̂ś ûśêŕŝ' ṕr̂ív̂íl̂éĝéd̂ ńêt́ŵór̂ḱ p̂óŝít̂íôń. T̂h́êśê ŕêq́ûéŝt́ŝ éx̂ṕôśê ńôń-p̂úb̂ĺîć d̂év̂íĉéŝ án̂d́ ŝér̂v́êŕŝ t́ô t́ĥé îńt̂ér̂ńêt́, îńĉŕêáŝín̂ǵ t̂h́ê ŕîśk̂ óf̂ á ĉŕôśŝ-śît́ê ŕêq́ûéŝt́ f̂ór̂ǵêŕŷ (ĆŜŔF̂) át̂t́âćk̂, án̂d́/ôŕ îńf̂ór̂ḿât́îón̂ ĺêák̂áĝé. T̂ó m̂ít̂íĝát̂é t̂h́êśê ŕîśk̂ś, Ĉh́r̂óm̂é d̂ép̂ŕêćât́êś r̂éq̂úêśt̂ś t̂ó n̂ón̂-ṕûb́l̂íĉ śûb́r̂éŝóûŕĉéŝ ẃĥén̂ ín̂ít̂íât́êd́ f̂ŕôḿ n̂ón̂-śêćûŕê ćôńt̂éx̂t́ŝ, án̂d́ ŵíl̂ĺ ŝt́âŕt̂ b́l̂óĉḱîńĝ t́ĥém̂."
2140
2143
  },
2141
- "core/lib/deprecations-strings.js | legacyConstraintGoogIPv6": {
2142
- "message": "ÎṔv̂6 íŝ én̂áb̂ĺêd́-b̂ý-d̂éf̂áûĺt̂ án̂d́ t̂h́ê áb̂íl̂ít̂ý t̂ó d̂íŝáb̂ĺê ít̂ úŝín̂ǵ `googIPv6` îś t̂ár̂ǵêt́êd́ t̂ó b̂é r̂ém̂óv̂éd̂ ín̂ Ḿ108, âf́t̂ér̂ ẃĥíĉh́ ît́ ŵíl̂ĺ b̂é îǵn̂ór̂éd̂. Ṕl̂éâśê śt̂óp̂ úŝín̂ǵ t̂h́îś l̂éĝáĉý ĉón̂śt̂ŕâín̂t́."
2143
- },
2144
2144
  "core/lib/deprecations-strings.js | localCSSFileExtensionRejected": {
2145
2145
  "message": "ĈŚŜ ćâńn̂ót̂ b́ê ĺôád̂éd̂ f́r̂óm̂ `file:` ÚR̂Ĺŝ ún̂ĺêśŝ t́ĥéŷ én̂d́ îń â `.css` f́îĺê éx̂t́êńŝíôń."
2146
2146
  },
@@ -2168,6 +2168,15 @@
2168
2168
  "core/lib/deprecations-strings.js | openWebDatabaseInsecureContext": {
2169
2169
  "message": "Ŵéb̂ŚQ̂Ĺ îń n̂ón̂-śêćûŕê ćôńt̂éx̂t́ŝ íŝ d́êṕr̂éĉát̂éd̂ án̂d́ ŵíl̂ĺ b̂é r̂ém̂óv̂éd̂ śôón̂. Ṕl̂éâśê úŝé Ŵéb̂ Śt̂ór̂áĝé ôŕ Îńd̂éx̂éd̂ D́ât́âb́âśê."
2170
2170
  },
2171
+ "core/lib/deprecations-strings.js | overflowVisibleOnReplacedElement": {
2172
+ "message": "Ŝṕêćîf́ŷín̂ǵ `overflow: visible` ôń îḿĝ, v́îd́êó âńd̂ ćâńv̂áŝ t́âǵŝ ḿâý ĉáûśê t́ĥém̂ t́ô ṕr̂ód̂úĉé v̂íŝúâĺ ĉón̂t́êńt̂ óût́ŝíd̂é ôf́ t̂h́ê él̂ém̂én̂t́ b̂óûńd̂ś. Ŝéê h́t̂t́p̂ś://ĝít̂h́ûb́.ĉóm̂/ẂÎĆĜ/śĥár̂éd̂-él̂ém̂én̂t́-t̂ŕâńŝít̂íôńŝ/b́l̂ób̂/ḿâín̂/d́êb́ûǵĝín̂ǵ_ôv́êŕf̂ĺôẃ_ôń_îḿâǵêś.m̂d́."
2173
+ },
2174
+ "core/lib/deprecations-strings.js | paymentInstruments": {
2175
+ "message": "`paymentManager.instruments` îś d̂ép̂ŕêćât́êd́. P̂ĺêáŝé ûśê j́ûśt̂-ín̂-t́îḿê ín̂śt̂ál̂ĺ f̂ór̂ ṕâým̂én̂t́ ĥán̂d́l̂ér̂ś îńŝt́êád̂."
2176
+ },
2177
+ "core/lib/deprecations-strings.js | paymentRequestCSPViolation": {
2178
+ "message": "Ŷóûŕ `PaymentRequest` ĉál̂ĺ b̂ýp̂áŝśêd́ Ĉón̂t́êńt̂-Śêćûŕît́ŷ-Ṕôĺîćŷ (ĆŜṔ) `connect-src` d̂ír̂éĉt́îv́ê. T́ĥíŝ b́ŷṕâśŝ íŝ d́êṕr̂éĉát̂éd̂. Ṕl̂éâśê ád̂d́ t̂h́ê ṕâým̂én̂t́ m̂ét̂h́ôd́ îd́êńt̂íf̂íêŕ f̂ŕôḿ t̂h́ê `PaymentRequest` ÁP̂Í (îń `supportedMethods` f̂íêĺd̂) t́ô ýôúr̂ ĆŜṔ `connect-src` d̂ír̂éĉt́îv́ê."
2179
+ },
2171
2180
  "core/lib/deprecations-strings.js | persistentQuotaType": {
2172
2181
  "message": "`StorageType.persistent` îś d̂ép̂ŕêćât́êd́. P̂ĺêáŝé ûśê śt̂án̂d́âŕd̂íẑéd̂ `navigator.storage` ín̂śt̂éâd́."
2173
2182
  },
@@ -11,6 +11,7 @@ import * as constants from '../../../core/config/constants.js';
11
11
  import * as format from '../../localization/format.js';
12
12
  import {locales} from '../../localization/locales.js';
13
13
  import {getModuleDirectory, getModulePath} from '../../../esm-utils.js';
14
+ import {LH_ROOT} from '../../../root.js';
14
15
 
15
16
  const moduleDir = getModuleDirectory(import.meta);
16
17
  const modulePath = getModulePath(import.meta);
@@ -185,37 +186,41 @@ describe('format', () => {
185
186
  expect(formattedStr).toEqual('en-XZ cuerda!');
186
187
  });
187
188
 
188
- it('overwrites existing locale strings', async () => {
189
- const filename = 'core/audits/is-on-https.js';
190
- const {UIStrings} = await import('../../../core/audits/is-on-https.js');
191
- const str_ = i18n.createIcuMessageFn(filename, UIStrings);
192
-
193
- // To start with, we get back the intended string..
194
- const origTitle = format.getFormatted(str_(UIStrings.title), 'es-419');
195
- expect(origTitle).toEqual('Usa HTTPS');
196
- const origFailureTitle = format.getFormatted(str_(UIStrings.failureTitle), 'es-419');
197
- expect(origFailureTitle).toEqual('No usa HTTPS');
198
-
199
- // Now we declare and register the new string...
200
- const localeData = {
201
- 'core/audits/is-on-https.js | title': {
202
- 'message': 'new string for es-419 uses https!',
203
- },
204
- };
205
- format.registerLocaleData('es-419', localeData);
206
-
207
- // And confirm that's what is returned
208
- const newTitle = format.getFormatted(str_(UIStrings.title), 'es-419');
209
- expect(newTitle).toEqual('new string for es-419 uses https!');
210
-
211
- // Meanwhile another string that wasn't set in registerLocaleData just falls back to english
212
- const newFailureTitle = format.getFormatted(str_(UIStrings.failureTitle), 'es-419');
213
- expect(newFailureTitle).toEqual('Does not use HTTPS');
214
-
215
- // Restore overwritten strings to avoid messing with other tests
216
- locales['es-419'] = clonedLocales['es-419'];
217
- const title = format.getFormatted(str_(UIStrings.title), 'es-419');
218
- expect(title).toEqual('Usa HTTPS');
189
+ [
190
+ {label: 'relative path', filename: 'core/audits/is-on-https.js'},
191
+ {label: 'absolute path', filename: `${LH_ROOT}/core/audits/is-on-https.js`},
192
+ ].forEach(({label, filename}) => {
193
+ it(`overwrites existing locale strings: ${label}`, async () => {
194
+ const {UIStrings} = await import('../../../core/audits/is-on-https.js');
195
+ const str_ = i18n.createIcuMessageFn(filename, UIStrings);
196
+
197
+ // To start with, we get back the intended string..
198
+ const origTitle = format.getFormatted(str_(UIStrings.title), 'es-419');
199
+ expect(origTitle).toEqual('Usa HTTPS');
200
+ const origFailureTitle = format.getFormatted(str_(UIStrings.failureTitle), 'es-419');
201
+ expect(origFailureTitle).toEqual('No usa HTTPS');
202
+
203
+ // Now we declare and register the new string...
204
+ const localeData = {
205
+ 'core/audits/is-on-https.js | title': {
206
+ 'message': 'new string for es-419 uses https!',
207
+ },
208
+ };
209
+ format.registerLocaleData('es-419', localeData);
210
+
211
+ // And confirm that's what is returned
212
+ const newTitle = format.getFormatted(str_(UIStrings.title), 'es-419');
213
+ expect(newTitle).toEqual('new string for es-419 uses https!');
214
+
215
+ // Meanwhile another string that wasn't set in registerLocaleData just falls back to english
216
+ const newFailureTitle = format.getFormatted(str_(UIStrings.failureTitle), 'es-419');
217
+ expect(newFailureTitle).toEqual('Does not use HTTPS');
218
+
219
+ // Restore overwritten strings to avoid messing with other tests
220
+ locales['es-419'] = clonedLocales['es-419'];
221
+ const title = format.getFormatted(str_(UIStrings.title), 'es-419');
222
+ expect(title).toEqual('Usa HTTPS');
223
+ });
219
224
  });
220
225
  });
221
226
 
package/tsconfig.json CHANGED
@@ -105,8 +105,9 @@
105
105
  ],
106
106
  "files": [
107
107
  // Opt-in to typechecking for some core tests and test-support files.
108
- "core/test/audits/script-treemap-data-test.js",
109
108
  "cli/test/fixtures/static-server.js",
109
+ "core/test/audits/script-treemap-data-test.js",
110
+ "core/test/computed/metrics/interactive-test.js",
110
111
  "core/test/fixtures/config-plugins/lighthouse-plugin-simple/plugin-simple.js",
111
112
  ],
112
113
  }