Document CORS config, promise plugins/adapters, and legacy template warning - #52
Open
ricardo-devis-agullo wants to merge 1 commit into
Open
Document CORS config, promise plugins/adapters, and legacy template warning#52ricardo-devis-agullo wants to merge 1 commit into
ricardo-devis-agullo wants to merge 1 commit into
Conversation
…arning Reflects several recently merged oc registry PRs that weren't yet covered by the docs site: - Configurable `cors` registry option (origin/credentials/allowedHeaders/ methods), including a new example and defaults table entries (opencomponents/oc#1545). - Plugins' `register` can now return a Promise instead of using the `next()` callback; callback style remains supported with a deprecation warning (opencomponents/oc#1542). - HTTP server adapters (Express/Fastify) support a promise-based `listen()`/`close()` lifecycle via `supportsPromiseLifecycle`, alongside the deprecated callback form (opencomponents/oc#1544). - The registry `error` event's `code` is now the adapter-neutral `SERVER_ERROR` instead of `EXPRESS_ERROR` (opencomponents/oc#1547). - `oc init` emits a one-time deprecation warning when given the bare `jade`/`handlebars` template names, pointing to `oc-template-es6` (opencomponents/oc#1546). opencomponents/oc#1543 (isolating deferred plugin loads across concurrent registries) is an internal correctness fix with no user-facing config or API change, so it isn't documented here. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Docs updates covering user-facing behavior from recently merged
opencomponents/ocPRs that weren't yet reflected on the docs site:opencomponents/oc#1545) - newcorsregistry option (origin,credentials,allowedHeaders,methods), documented in the config reference table plus a new "CORS Configuration" example. Defaults match the registry's existing hardcoded headers when omitted.opencomponents/oc#1542) -register(options, dependencies)can now return aPromiseinstead of callingnext(); documented with an example and a deprecation note for the callback form.opencomponents/oc#1544) -listen()/close()on the Express/Fastify adapters now support a promise form (supportsPromiseLifecycle), documented in the server adapters guide for custom-adapter authors.opencomponents/oc#1547) - the registryerrorevent now emitsSERVER_ERRORinstead ofEXPRESS_ERROR; updated the registry events table and added a callout.oc initlegacy template deprecation warning (opencomponents/oc#1546) - barejade/handlebarstemplate names now emit a one-time deprecation warning pointing tooc-template-es6; documented under theinitCLI command.opencomponents/oc#1543(isolating deferred plugin loads across concurrent registry instances) is an internal correctness fix with no observable config/API surface, so it isn't covered here.Test plan
npm run buildinwebsite/completes successfully with no new errors.