refactor: establish Crypto folder feature - #317
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ac809614fc
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| "WebAPI.File": ["WebAPI.Event", "File"], | ||
| "WebAPI.URL": ["WebAPI.DOM", "URL"], | ||
| "WebAPI.Fetch": ["WebAPI.Event", "WebAPI.File", "WebAPI.URL", "Fetch"], | ||
| "WebAPI.Crypto": ["WebAPI.DOM", "Crypto"], |
There was a problem hiding this comment.
Make the advertised Crypto feature compile
When a consumer selects WebAPI.Crypto, rescript build --prod --features WebAPI.Crypto fails because this implication activates the entire WebAPI.DOM source group, while its dependencies do not provide modules such as EventTarget and DOMStringMap used by that group. The compiler help confirms that --features includes transitively implied features, so the new public feature is unusable unless this dependency points at the appropriate internal foundation or supplies the complete DOM prerequisite closure.
Useful? React with 👍 / 👎.
| }, | ||
| { | ||
| "dir": "src/WebCrypto", | ||
| "dir": "src/crypto", |
There was a problem hiding this comment.
Update the docs feature map for the renamed folder
After this rename, scripts/unmonorepo/feature-spec.mjs still describes the feature directory as WebCrypto. Consequently, docs/utils.js searches for src/WebCrypto/WebCryptoTypes.res and filters the API module out when that path does not exist, so the Crypto documentation disappears from the generated API pages. Update the shared feature specification to recognize the new directory while retaining the intended public naming.
Useful? React with 👍 / 👎.
ac80961 to
8b2c9b2
Compare
Tracking issue: #342
Stack context
Part 7 of the Option 5 folder-feature stack.
Review this PR as the incremental diff against #316.
Summary
src/WebCryptoto the targetsrc/cryptofolderCryptofeatureWebAPI.Cryptofeature with itsWebAPI.DOMdependencyWebAPI.CryptoandWebAPI.SubtleCryptomodulesThe internal
WebCryptoTypeshelper remains private inside the complete folder.Temporary state
coreuntil the final ownership cleanup determines whether that broadly shared type should stay foundationalReview focus
WebAPI.Crypto -> WebAPI.DOM + CryptoimplicationVerification
node_modules/.bin/rescript cleannode_modules/.bin/rescript build --prod --features DOM,Cryptonpm run buildnpm testnpm run format:checkgit diff --check