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

V1 #76

Open
wants to merge 4 commits into
base: v1
Choose a base branch
from
Open

V1 #76

wants to merge 4 commits into from

Conversation

pudgereyem
Copy link

@pudgereyem pudgereyem commented May 9, 2020

I made some changes to the v1 branch on my fork over here https://github.com/pudgereyem/micro-cors/tree/v1.

You can take a look at all changes by looking at the PR's in my fork.

fix: update development dependencies - pudgereyem#1

  • Remove async-to-gen in favor of @babel/plugin-transform-runtime
  • Update babel to v7
  • Update ava to latest version

fix: remove build script - pudgereyem#2

We don't need to build this project, so this removes the build script and changes the main file to be src/index.js. This was previously discussed in this issue.

fix: set headers before calling handler - pudgereyem#3, pudgereyem#4

micro-cors have to set all the headers before calling the handler, since the handler otherwise would end the request. If the user wants to set any headers in their own handler they have to deal with any overrides, as described in more depth here; pudgereyem#4

Changes:

- Remove `async-to-gen` in favor of @babel/plugin-transform-runtime
- Update babel to v7
- Update ava to latest version
* fix: remove build script

* fix: change main file
@pudgereyem
Copy link
Author

@tim-phillips and @possibilities I'm keen on getting this branch merged to v1 and then v1 merged to master. There are some functionality in v1 that is probably very much needed for a lot of developers.

For me personally it was Allow regex and array origin to determine Access-Control-Allow-Origin

The only possibly breaking change for v1 is the addition of runHandlerOnPreflightRequest that is set to false by default. Some users might have logic for the preflight request in their current handler which would require them to set runHandlerOnPreflightRequest to true.

If we decide to keep that option we would have to bump the version from to 1.0.0 to stay backwards compatible.

Proposed action list

  • Review this PR
  • Merge this PR
  • Bump version of the package to 1.0.0
  • Merge v1 into master

@pudgereyem pudgereyem mentioned this pull request May 9, 2020
9 tasks
alaisgomes added a commit to crowdbotics/micro-cors that referenced this pull request Mar 9, 2021
Updating code to match PR: possibilities#76
Keeping own copy to avoid unwanted changes
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