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

resolves parameters in headers location #2095

Conversation

williamli
Copy link
Contributor

No description provided.

@williamli williamli changed the title Feature/now dev headers location parameters resolves parameters in headers location Apr 4, 2019
@williamli
Copy link
Contributor Author

williamli commented Apr 4, 2019

@TooTallNate not sure if it's ok to bump the canary version number in package.json. I was using it to see if my local now-cli was mapped correctly with now --version

Co-Authored-By: williamli <email@williamli.dev>
@codecov-io
Copy link

codecov-io commented Apr 4, 2019

Codecov Report

Merging #2095 into canary will increase coverage by 0.06%.
The diff coverage is 87.5%.

Impacted file tree graph

@@            Coverage Diff            @@
##           canary   #2095      +/-   ##
=========================================
+ Coverage     4.5%   4.56%   +0.06%     
=========================================
  Files         243     243              
  Lines        8575    8582       +7     
  Branches      876     878       +2     
=========================================
+ Hits          386     392       +6     
  Misses       8172    8172              
- Partials       17      18       +1
Impacted Files Coverage Δ
src/commands/dev/lib/dev-router.ts 70.58% <87.5%> (+2.4%) ⬆️

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 a3fc36e...1169774. Read the comment docs.

@TooTallNate
Copy link
Member

Location isn't the only header that supports route params, we need to process all of them.

@williamli
Copy link
Contributor Author

@TooTallNate https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers
perhaps need to walk the whole tree and try to resolve it for all strings?

@williamli
Copy link
Contributor Author

@TooTallNate done

@TooTallNate TooTallNate merged commit 822971f into vercel:canary Apr 4, 2019
TooTallNate added a commit that referenced this pull request Apr 4, 2019
This is a follow up to #2095 to move the `resolveRouteParameters()`
funcrtion to the top-level and other slight optimizations like not
re-parsing the URL multiple times.
TooTallNate added a commit that referenced this pull request Apr 4, 2019
* [now dev] Clean up `dev-router` a bit

This is a follow up to #2095 to move the `resolveRouteParameters()`
funcrtion to the top-level and other slight optimizations like not
re-parsing the URL multiple times.

* Remove unused `qs` import
leo pushed a commit that referenced this pull request Apr 5, 2019
* version bump (canary)

* inject paramters into headers.Location fixes #2092

* refactored route parameter resolving function

* Revert "version bump (canary)"

This reverts commit 5857489.

* Update src/commands/dev/lib/dev-router.ts

Co-Authored-By: williamli <email@williamli.dev>

* refactor headers resolution

* try to resolve all parameters inside each child of headers
leo pushed a commit that referenced this pull request Apr 5, 2019
* [now dev] Clean up `dev-router` a bit

This is a follow up to #2095 to move the `resolveRouteParameters()`
funcrtion to the top-level and other slight optimizations like not
re-parsing the URL multiple times.

* Remove unused `qs` import
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.

None yet

4 participants