Skip to content

refactor: establish Crypto folder feature - #317

Open
jderochervlk wants to merge 1 commit into
codex/option5-view-transitions-folderfrom
codex/option5-crypto-folder
Open

refactor: establish Crypto folder feature#317
jderochervlk wants to merge 1 commit into
codex/option5-view-transitions-folderfrom
codex/option5-crypto-folder

Conversation

@jderochervlk

@jderochervlk jderochervlk commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

Tracking issue: #342

Stack context

Part 7 of the Option 5 folder-feature stack.

Review this PR as the incremental diff against #316.

Summary

  • rename src/WebCrypto to the target src/crypto folder
  • change the folder to the unqualified internal Crypto feature
  • add the supported WebAPI.Crypto feature with its WebAPI.DOM dependency
  • preserve the flat WebAPI.Crypto and WebAPI.SubtleCrypto modules

The internal WebCryptoTypes helper remains private inside the complete folder.

Temporary state

  • this PR does not introduce compatibility aliases, file exclusions, or module slices; the Crypto folder and feature ownership are final
  • the typed-array helper it uses remains in core until the final ownership cleanup determines whether that broadly shared type should stay foundational

Review focus

  • the WebAPI.Crypto -> WebAPI.DOM + Crypto implication
  • unchanged public Crypto APIs and module paths
  • complete folder ownership

Verification

  • node_modules/.bin/rescript clean
  • node_modules/.bin/rescript build --prod --features DOM,Crypto
  • npm run build
  • npm test
  • npm run format:check
  • git diff --check

Copy link
Copy Markdown
Collaborator Author

@codex

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread rescript.json
"WebAPI.File": ["WebAPI.Event", "File"],
"WebAPI.URL": ["WebAPI.DOM", "URL"],
"WebAPI.Fetch": ["WebAPI.Event", "WebAPI.File", "WebAPI.URL", "Fetch"],
"WebAPI.Crypto": ["WebAPI.DOM", "Crypto"],

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

Comment thread rescript.json
},
{
"dir": "src/WebCrypto",
"dir": "src/crypto",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@jderochervlk
jderochervlk force-pushed the codex/option5-crypto-folder branch from ac80961 to 8b2c9b2 Compare August 4, 2026 17:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant