Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add AsyncOriginFunction type #302

Merged
merged 1 commit into from
May 10, 2024
Merged

Conversation

sknetl
Copy link
Contributor

@sknetl sknetl commented May 8, 2024

Checklist

The JavaScript implementation handles async functions already and also the documentation says that async-functions are supported. Just the types don't reflect that.

Async-await and promises are supported as well.

Source


    // Allow for promises
    if (result && typeof result.then === 'function') {
      result.then(res => cb(null, res), cb)
    }

Source

Signed-off-by: Simon Klimek <skli@netlight.com>
Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

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

lgtm

@mcollina mcollina merged commit e2faab0 into fastify:master May 10, 2024
16 checks passed
renovate bot added a commit to tomacheese/telcheck that referenced this pull request Sep 17, 2024
This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [@fastify/cors](https://redirect.github.com/fastify/fastify-cors) |
[`9.0.1` ->
`10.0.0`](https://renovatebot.com/diffs/npm/@fastify%2fcors/9.0.1/10.0.0)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/@fastify%2fcors/10.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@fastify%2fcors/10.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@fastify%2fcors/9.0.1/10.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@fastify%2fcors/9.0.1/10.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>fastify/fastify-cors (@&#8203;fastify/cors)</summary>

###
[`v10.0.0`](https://redirect.github.com/fastify/fastify-cors/releases/tag/v10.0.0)

[Compare
Source](https://redirect.github.com/fastify/fastify-cors/compare/v9.0.1...v10.0.0)

#### What's Changed

- chore(deps): bump mnemonist from 0.39.6 to 0.39.8 by
[@&#8203;dependabot](https://redirect.github.com/dependabot) in
[fastify/fastify-cors#293
- chore(.gitignore): add .tap/ dir by
[@&#8203;Fdawgs](https://redirect.github.com/Fdawgs) in
[fastify/fastify-cors#294
- chore(deps-dev): bump
[@&#8203;typescript-eslint/parser](https://redirect.github.com/typescript-eslint/parser)
from 6.21.0 to 7.1.1 by
[@&#8203;dependabot](https://redirect.github.com/dependabot) in
[fastify/fastify-cors#298
- chore(deps-dev): bump tsd from 0.30.7 to 0.31.0 by
[@&#8203;dependabot](https://redirect.github.com/dependabot) in
[fastify/fastify-cors#300
- Warn about DoS attacks by
[@&#8203;mcollina](https://redirect.github.com/mcollina) in
[fastify/fastify-cors#301
- add AsyncOriginFunction type by
[@&#8203;sknetl](https://redirect.github.com/sknetl) in
[fastify/fastify-cors#302
- Merge `next` into `master` by
[@&#8203;jsumners](https://redirect.github.com/jsumners) in
[fastify/fastify-cors#304
- chore(deps): bump fastify/workflows from 4.1.0 to 4.2.1 by
[@&#8203;dependabot](https://redirect.github.com/dependabot) in
[fastify/fastify-cors#305
- chore(deps-dev): bump tsd from 0.30.7 to 0.31.1 by
[@&#8203;dependabot](https://redirect.github.com/dependabot) in
[fastify/fastify-cors#306
- docs(readme): add `options.methods` default by
[@&#8203;Fdawgs](https://redirect.github.com/Fdawgs) in
[fastify/fastify-cors#307
- chore(deps-dev): bump
[@&#8203;types/node](https://redirect.github.com/types/node) from
20.14.13 to 22.0.0 by
[@&#8203;dependabot](https://redirect.github.com/dependabot) in
[fastify/fastify-cors#308
- chore: update min fastify version by
[@&#8203;Fdawgs](https://redirect.github.com/Fdawgs) in
[fastify/fastify-cors#309
- chore(deps): bump fastify/workflows from 4.2.1 to 5.0.0 by
[@&#8203;dependabot](https://redirect.github.com/dependabot) in
[fastify/fastify-cors#310
- chore: migrate from tap to node:test and c8 by
[@&#8203;dancastillo](https://redirect.github.com/dancastillo) in
[fastify/fastify-cors#316

#### New Contributors

- [@&#8203;sknetl](https://redirect.github.com/sknetl) made their first
contribution in
[fastify/fastify-cors#302
- [@&#8203;dancastillo](https://redirect.github.com/dancastillo) made
their first contribution in
[fastify/fastify-cors#316

**Full Changelog**:
fastify/fastify-cors@v9.0.1...v10.0.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/tomacheese/telcheck).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC44MC4wIiwidXBkYXRlZEluVmVyIjoiMzguODAuMCIsInRhcmdldEJyYW5jaCI6Im1hc3RlciIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
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.

2 participants