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

response.redirect: extract special-cased back, fixes #904 #1115

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

fl0w
Copy link
Contributor

@fl0w fl0w commented Dec 27, 2017

The simple solution to drop special-cased 'back' in response.redirect.
I can't label but should be labeled as version-major.

This PR does not make use of Symbol as purposed in #904.

Edit
If this solution is acceptable, a deprecation should be added to Koa 2 on 'back' use.

@codecov
Copy link

codecov bot commented Dec 27, 2017

Codecov Report

Merging #1115 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff           @@
##           master   #1115   +/-   ##
======================================
  Coverage     100%    100%           
======================================
  Files           5       5           
  Lines         393     398    +5     
======================================
+ Hits          393     398    +5
Impacted Files Coverage Δ
lib/context.js 100% <ø> (ø) ⬆️
lib/response.js 100% <100%> (ø) ⬆️
lib/request.js 100% <0%> (ø) ⬆️
lib/application.js 100% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6c0e0d6...920543b. Read the comment docs.

@fl0w
Copy link
Contributor Author

fl0w commented Dec 28, 2017

I'm assuming this is a travis-cache thingie that fails, can't reproduce it locally.

$ git rev-parse --abbrev-ref HEAD
refactor-back
$ node -v
v9.3.0
$ npm -v
5.6.0
$ npm view koa version
2.4.1
$ npm t

# abbreviated jest output

Test Suites: 66 passed, 66 total
Tests:       298 passed, 298 total
Snapshots:   0 total
Time:        2.265s
Ran all test suites.

@jonathanong
Copy link
Member

👍

let's add this as a feature + deprecation message, then a separate PR to remove it in the next major version

@fl0w
Copy link
Contributor Author

fl0w commented Feb 15, 2018

@jonathanong updated, and should be safe as a semver-minor merge. Just take a quick look at the deprecation message before doing so.

Copy link
Member

@3imed-jaberi 3imed-jaberi left a comment

Choose a reason for hiding this comment

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

LGTM, I believe that should be merged this PR 🚀

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

Successfully merging this pull request may close these issues.

None yet

4 participants