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

republish as @koa/cors? #35

Closed
jonathanong opened this issue Apr 3, 2017 · 10 comments
Closed

republish as @koa/cors? #35

jonathanong opened this issue Apr 3, 2017 · 10 comments
Assignees

Comments

@jonathanong
Copy link
Member

might be better than kcors, especially since there's a koa-cors that is no longer maintained

@ianstormtaylor
Copy link

ianstormtaylor commented May 7, 2017

Or even get the koa-cors maintainer to give up the name ideally.

But yeah, +1 because it's hard to remember what kcors is when looking through dependencies...

@fengmk2
Copy link
Member

fengmk2 commented May 8, 2017

I'm ok for this. @jonathanong just do it and add a deprecated message on the kcors package.

@jonathanong jonathanong self-assigned this May 8, 2017
@jonathanong
Copy link
Member Author

done

@jonathanong
Copy link
Member Author

i do not have access to kcors

@jonathanong jonathanong assigned fengmk2 and unassigned jonathanong Sep 30, 2017
@stevehipwell
Copy link

I'm not sure that @koa/cors is the best name for this package as it's not consistent with the other core koa packages. Ideally you could get the koa-cors package name, otherwise maybe something more like koa-cors-official.

@jonathanong
Copy link
Member Author

jonathanong commented Oct 4, 2017

@stevehipwell we can slowly move koa packages to @koa/*, which would be somewhat ideal Imo

@stevehipwell
Copy link

@jonathanong - If this is the policy for all koa packages then it makes sense, however you might want to notify the relevant TypeScript definition authors that the package has moved as @koa/cors doesn't have any definitions but kcors does.

@vladshcherbin
Copy link

The name without @ is better because now it differs from the rest of koa family and is the first one in dependency list, even above packages that start with a letter.

Will stick with kcors for now.

@raphaelsoul
Copy link

currently I copy declare code from @types/koa2-cors to my index.d.ts

declare module "@koa/cors" {
    import * as Koa from 'koa';
    namespace cors {
        interface Options {
            origin?: string | ((ctx: Koa.Context) => boolean | string);
            exposeHeaders?: string[];
            maxAge?: number;
            credentials?: boolean;
            allowMethods?: string[];
            allowHeaders?: string[];
        }
    }

    function cors(options?: cors.Options): Koa.Middleware;

    export = cors;
}

@fengmk2
Copy link
Member

fengmk2 commented Jul 11, 2018

@fengmk2 fengmk2 closed this as completed Jul 11, 2018
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

No branches or pull requests

6 participants