mdn / content

The content behind MDN Web Docs
https://developer.mozilla.org
Other
8.88k stars 22.43k forks source link

Fix globals, part 4: `crypto` #33291

Closed skyclouds2001 closed 5 days ago

skyclouds2001 commented 3 weeks ago

Description

/cc @wbamberg

part of the #33019

Motivation

Additional details

Related issues and pull requests

github-actions[bot] commented 3 weeks ago

This pull request has merge conflicts that must be resolved before it can be merged.

github-actions[bot] commented 3 weeks ago
Preview URLs (12 pages) - [`/en-US/docs/Web/API/Crypto/getRandomValues`](https://pr33291.content.dev.mdn.mozit.cloud/en-US/docs/Web/API/Crypto/getRandomValues) - [`/en-US/docs/Web/API/Crypto/randomUUID`](https://pr33291.content.dev.mdn.mozit.cloud/en-US/docs/Web/API/Crypto/randomUUID) - [`/en-US/docs/Web/API/Crypto`](https://pr33291.content.dev.mdn.mozit.cloud/en-US/docs/Web/API/Crypto) - [`/en-US/docs/Web/API/RTCPeerConnection/generateCertificate_static`](https://pr33291.content.dev.mdn.mozit.cloud/en-US/docs/Web/API/RTCPeerConnection/generateCertificate_static) - [`/en-US/docs/Web/API/SubtleCrypto/digest`](https://pr33291.content.dev.mdn.mozit.cloud/en-US/docs/Web/API/SubtleCrypto/digest) - [`/en-US/docs/Web/API/SubtleCrypto/encrypt`](https://pr33291.content.dev.mdn.mozit.cloud/en-US/docs/Web/API/SubtleCrypto/encrypt) - [`/en-US/docs/Web/API/SubtleCrypto`](https://pr33291.content.dev.mdn.mozit.cloud/en-US/docs/Web/API/SubtleCrypto) - [`/en-US/docs/Web/API/Window/crypto`](https://pr33291.content.dev.mdn.mozit.cloud/en-US/docs/Web/API/Window/crypto) - [`/en-US/docs/Web/API/Window`](https://pr33291.content.dev.mdn.mozit.cloud/en-US/docs/Web/API/Window) - [`/en-US/docs/Web/API/WorkerGlobalScope/crypto`](https://pr33291.content.dev.mdn.mozit.cloud/en-US/docs/Web/API/WorkerGlobalScope/crypto) - [`/en-US/docs/Web/API/WorkerGlobalScope`](https://pr33291.content.dev.mdn.mozit.cloud/en-US/docs/Web/API/WorkerGlobalScope) - [`/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/random`](https://pr33291.content.dev.mdn.mozit.cloud/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/random)
Flaws (4) Note! *11 documents with no flaws that don't need to be listed. 🎉* URL: [`/en-US/docs/Web/API/RTCPeerConnection/generateCertificate_static`](https://pr33291.content.dev.mdn.mozit.cloud/en-US/docs/Web/API/RTCPeerConnection/generateCertificate_static) Title: `RTCPeerConnection: generateCertificate() static method` Flaw count: 4 - **macros**: - `/en-US/docs/Web/API/AlgorithmIdentifier does not exist` - `/en-US/docs/Web/API/Algorithm does not exist` - `/en-US/docs/Web/API/RTCCertificateExpiration does not exist` - `/en-US/docs/Web/API/Algorithm does not exist`

(comment last updated: 2024-05-16 09:45:29)

skyclouds2001 commented 3 weeks ago

remove /en-US/docs/Web/API/crossOriginIsolated /en-US/docs/Web/API/Window/crossOriginIsolated the redirect can pass the test, but the issue existed in the preview product

skyclouds2001 commented 3 weeks ago

It seems that when building the preview result, the _redirects.txt file in the repository is used, not the updated one (same behavior can be observed in #33339 )

wbamberg commented 2 weeks ago

It seems that when building the preview result, the _redirects.txt file in the repository is used, not the updated one (same behavior can be observed in #33339 )

Yeah, I know. It's OK, I have your branch checked out locally so I can test the redirects :).

(edited to add: oh, do you mean, that's the reason we are getting these CI errors?)

skyclouds2001 commented 2 weeks ago

(edited to add: oh, do you mean, that's the reason we are getting these CI errors?)

Yes, I think this is the reason

skyclouds2001 commented 2 weeks ago

So what should do next?

OnkarRuikar commented 2 weeks ago

It seems that when building the preview result, the _redirects.txt file in the repository is used, not the updated one

Not true. We are not using pull_request_target trigger here.

In future run yarn content fix-redirects command to fix automatically fixable errors in _redirects.txt file.

skyclouds2001 commented 2 weeks ago

It seems that when building the preview result, the _redirects.txt file in the repository is used, not the updated one

Not true. We are not using pull_request_target trigger here.

In future run yarn content fix-redirects command to fix automatically fixable errors in _redirects.txt file.

Got it!

wbamberg commented 2 weeks ago

Thanks @OnkarRuikar ! I had forgotten about sorting. Yes, AFAIK we have to edit redirects manually for some of this work because when these global properties were first added, redirect were sometimes made from API/Window/thing to API/thing_property, and we're now reinstating API/Window/thing. Maybe there's a better way but if so I don't know it.