Skip to content

Commit

Permalink
Fix Yari bugs... in the presence of more bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
Josh-Cena committed Nov 2, 2024
1 parent 9c9a3a1 commit 565e3c2
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 18 deletions.
2 changes: 0 additions & 2 deletions config/allowed-code-link-text.txt
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,6 @@ NPP_GetValue()
<module specifier map>
<significant version>
<etag_value>
<MIME_type>/*
<MIME_type>/<MIME_subtype>

ALLOW-FROM origin
NPP_ClearSiteData
Expand Down
30 changes: 16 additions & 14 deletions config/missing-features.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,6 @@ api.CanvasFilter.CanvasFilter
api.CaretPosition.getClientRect
api.CaretPosition.offset
api.CaretPosition.offsetNode
api.CommandEvent
api.CommandEvent.CommandEvent
api.CommandEvent.command
api.CommandEvent.source
api.Counter
api.Counter.identifier
api.Counter.listStyle
Expand Down Expand Up @@ -120,6 +116,10 @@ api.DataCue.value
api.DataTransfer.mozCursor
api.DataTransfer.mozSourceNode
api.DataTransfer.mozUserCancelled
api.DelegatedInkTrailPresenter
api.DelegatedInkTrailPresenter.expectedImprovement
api.DelegatedInkTrailPresenter.presentationArea
api.DelegatedInkTrailPresenter.updateInkTrailStartPoint
api.DevicePosture
api.DevicePosture.type
api.Directory
Expand Down Expand Up @@ -168,7 +168,6 @@ api.FileSystemHandle.move
api.FileSystemSync.name
api.FileSystemSync.root
api.FontFaceSet.FontFaceSet
api.GPUAdapter.info
api.GPUComputePassEncoder.writeTimestamp
api.GPURenderPassEncoder.writeTimestamp
api.GamepadHapticActuator.canPlayEffectType
Expand All @@ -187,6 +186,7 @@ api.GestureEvent.target
api.HTMLAnchorElement.attributionSourceId
api.HTMLAnchorElement.charset
api.HTMLAnchorElement.coords
api.HTMLAnchorElement.hrefTranslate
api.HTMLAnchorElement.name
api.HTMLAnchorElement.rev
api.HTMLAnchorElement.shape
Expand All @@ -202,10 +202,7 @@ api.HTMLBodyElement.bgColor
api.HTMLBodyElement.link
api.HTMLBodyElement.text
api.HTMLBodyElement.vLink
api.HTMLButtonElement.command
api.HTMLButtonElement.commandfor
api.HTMLButtonElement.formNoValidate
api.HTMLButtonElement.formTarget
api.HTMLCanvasElement.mozPrintCallback
api.HTMLDListElement.compact
api.HTMLDirectoryElement
Expand All @@ -217,7 +214,6 @@ api.HTMLEmbedElement.align
api.HTMLEmbedElement.getSVGDocument
api.HTMLEmbedElement.name
api.HTMLEmbedElement.type
api.HTMLFormElement.noValidate
api.HTMLFormElement.rel
api.HTMLFormElement.relList
api.HTMLFrameElement
Expand Down Expand Up @@ -254,8 +250,6 @@ api.HTMLImageElement.lowsrc
api.HTMLImageElement.sharedStorageWritable
api.HTMLInputElement.align
api.HTMLInputElement.dirName
api.HTMLInputElement.formNoValidate
api.HTMLInputElement.formTarget
api.HTMLInputElement.incremental
api.HTMLInputElement.useMap
api.HTMLLIElement.type
Expand Down Expand Up @@ -314,7 +308,6 @@ api.HTMLQuoteElement.cite
api.HTMLScriptElement.charset
api.HTMLScriptElement.event
api.HTMLScriptElement.htmlFor
api.HTMLSelectElement.autocomplete
api.HTMLSourceElement.media
api.HTMLSourceElement.sizes
api.HTMLSourceElement.src
Expand Down Expand Up @@ -473,11 +466,9 @@ api.MimeTypeArray.item
api.MimeTypeArray.length
api.MimeTypeArray.namedItem
api.NDEFReader.makeReadOnly
api.NavigateEvent.canTransition
api.NavigateEvent.hasUAVisualTransition
api.NavigateEvent.restoreScroll
api.NavigateEvent.transitionWhile
api.Navigation.activation
api.Navigator.audioSession
api.Navigator.authentication
api.Navigator.devicePosture
Expand Down Expand Up @@ -1002,6 +993,11 @@ api.SerialPort.connected
api.ShadowRoot.elementFromPoint
api.ShadowRoot.elementsFromPoint
api.ShadowRoot.getSelection
api.SharedStorage.createWorklet
api.SharedStorage.get
api.SharedStorage.run
api.SharedStorage.selectURL
api.SharedStorage.worklet
api.SharedStorageWorklet.run
api.SharedStorageWorklet.selectURL
api.SpeechRecognitionErrorEvent.SpeechRecognitionErrorEvent
Expand Down Expand Up @@ -1192,6 +1188,12 @@ css.selectors.volume-locked
css.types.calc-constant
javascript.builtins.RegExp.source.escaping
javascript.builtins.RegExp.toString.escaping
javascript.builtins.Uint8Array.fromBase64
javascript.builtins.Uint8Array.fromHex
javascript.builtins.Uint8Array.setFromBase64
javascript.builtins.Uint8Array.setFromHex
javascript.builtins.Uint8Array.toBase64
javascript.builtins.Uint8Array.toHex
http.headers.Attribution-Reporting-Support
http.headers.Sec-CH-Save-Data
http.headers.Snapshot-Content-Location
Expand Down
1 change: 0 additions & 1 deletion config/no-page.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
/en-US/docs/Web/API/BluetoothDevice/gattserverdisconnected_event
/en-US/docs/Web/API/BluetoothDevice/watchAdvertisements
/en-US/docs/Web/API/BluetoothRemoteGATTCharacteristic/characteristicvaluechanged_event
/en-US/docs/Web/API/CSSMarginRule
/en-US/docs/Web/API/CSSNumericType
/en-US/docs/Web/API/DOMMatrix/fromFloat32Array
/en-US/docs/Web/API/DOMMatrix/fromFloat64Array
Expand Down
13 changes: 12 additions & 1 deletion src/server/process-warnings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ for (const node of nodes) {
Object.entries(node.data.metadata.flaws).forEach(([id, data]) => {
data.forEach((d) => {
if (id === "broken_links") {
// TODO: Yari bug
if (["/en-US/play", "/en-US/plus"].includes(d.href)) return;
const correspondingWarning = nodeWarnings.find(
(w) =>
w.message === "Broken link" &&
Expand All @@ -87,7 +89,16 @@ for (const node of nodes) {
return;
}
if (d.explanation !== "Link points to the page it's already on") {
console.error("Broken link not caught by warnings:", d.href);
// After https://github.com/mdn/yari/pull/12045, Yari no longer
// emits broken links with hrefs. This means that our broken link
// check is essentially useless. However we do want to keep the
// config-based exclusion mechanism, so we restore to the former
// state by migrating flaws to warnings.
nodeWarnings.push({
message: "Broken link",
data: [d.href, d.explanation.replace(d.href, "").trim()],
});
return;
}
} else if (id === "macros") {
if (d.explanation.endsWith("does not exist")) {
Expand Down

0 comments on commit 565e3c2

Please sign in to comment.