Skip to content

[cors] Add delegate function and change owner#25177

Merged
RyanCavanaugh merged 2 commits intoDefinitelyTyped:masterfrom
pluma:fix-cors
Apr 23, 2018
Merged

[cors] Add delegate function and change owner#25177
RyanCavanaugh merged 2 commits intoDefinitelyTyped:masterfrom
pluma:fix-cors

Conversation

@pluma
Copy link
Copy Markdown
Collaborator

@pluma pluma commented Apr 20, 2018

Please fill in this template.

  • Use a meaningful title for the pull request. Include the name of the package modified.
  • Test the change in your own code. (Compile and run.)
  • Add or edit tests to reflect the change. (Run with npm test.)
  • Follow the advice from the readme.
  • Avoid common mistakes.
  • Run npm run lint package-name (or tsc if no tslint.json is present).

If changing an existing definition:


This seems to be an unintentional omission. The delegate has been supported as early as v1.0 and the typings claim to be compatible with v2.8 which still supports this.

Basically instead of providing the config synchronously, one can provide a delegate function which takes a request object and a callback and passes the configuration on a per request basis. This is probably a rare use case but certainly supported by the library.

@typescript-bot typescript-bot added the Unowned This PR touches a package that doesn't have any listed owners. label Apr 20, 2018
@typescript-bot
Copy link
Copy Markdown
Contributor

typescript-bot commented Apr 20, 2018

@pluma Thank you for submitting this PR!

Because this PR doesn't have any code reviewers, a DefinitelyTyped maintainer will be reviewing it in the next few days once the Travis CI build passes.

In the meantime, if the build fails or a merge conflict occurs, I'll let you know. Have a nice day!

@typescript-bot typescript-bot added the Popular package This PR affects a popular package (as counted by NPM download counts). label Apr 20, 2018
@RyanCavanaugh
Copy link
Copy Markdown
Member

Ping @mihhail-lapushkin

@mihhail-lapushkin
Copy link
Copy Markdown

I am totally out of TS community for years already. I don't know how to react to these requests. Is there a way I can resign the "ownership" of these modules?

@RyanCavanaugh
Copy link
Copy Markdown
Member

@mihhail-lapushkin you can submit a PR to remove your name from the header

@pluma
Copy link
Copy Markdown
Collaborator Author

pluma commented Apr 20, 2018 via email

@mihhail-lapushkin
Copy link
Copy Markdown

@pluma Thanks!
Here is the original PR for the modules that I've added: #2815
Please, submit the PR to change the headers.

I officially allow @pluma to take over the ownership of cors and tea-merge modules 😄

@pluma
Copy link
Copy Markdown
Collaborator Author

pluma commented Apr 20, 2018

@mihhail-lapushkin I've added a commit to remove you from this module. I'm not familiar with tea-merge, though, and I think it's unrelated to this one.

@RyanCavanaugh should I file a separate PR on @mihhail-lapushkin's behalf to remove him from tea-merge and leave it as unowned for the time being?

@RyanCavanaugh
Copy link
Copy Markdown
Member

@pluma sounds fine by me. Please link to this PR from it since the next maintainer who sees it will otherwise reject it.

@pluma
Copy link
Copy Markdown
Collaborator Author

pluma commented Apr 23, 2018

@RyanCavanaugh Can we get this PR merged then? I've removed him in this one and the linting is passing. I am also using the changes successfully as we speak.

@mihhail-lapushkin I've created PR #25223 to remove you from tea-merge as you requested.

@pluma pluma changed the title [cors] Add delegate function [cors] Add delegate function and change owner Apr 23, 2018
@pluma
Copy link
Copy Markdown
Collaborator Author

pluma commented Apr 23, 2018

btw, I'm confused that the type declaration declares a namespace e. Can this be safely removed?

@RyanCavanaugh
Copy link
Copy Markdown
Member

@pluma the namespace is necessary in this case because the module exports a combination of a function and properties

@RyanCavanaugh RyanCavanaugh merged commit 54a59cd into DefinitelyTyped:master Apr 23, 2018
@RyanCavanaugh
Copy link
Copy Markdown
Member

🌟 🎈 🎉 🏆 🎂 ✨ ⭐️

Congratulations on your first DefinitelyTyped contribution! Thanks for helping out Mihhail as well.

🌟 🎈 🎉 🏆 🎂 ✨ ⭐️

@pluma pluma deleted the fix-cors branch April 23, 2018 16:11
@pluma
Copy link
Copy Markdown
Collaborator Author

pluma commented Apr 23, 2018

Yay, thanks for the guidance 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Popular package This PR affects a popular package (as counted by NPM download counts). Unowned This PR touches a package that doesn't have any listed owners.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants