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

update ignorePaths logic #72

Merged
merged 1 commit into from
Feb 8, 2019
Merged

update ignorePaths logic #72

merged 1 commit into from
Feb 8, 2019

Conversation

cjihrig
Copy link
Collaborator

@cjihrig cjihrig commented Feb 8, 2019

According to the hapi 18 release notes, request.url.path has gone away in favor of request.path or request.url.pathname. The same release notes also state that request.url.pathname has not changed.

Refs: hapijs/hapi#3871

Copy link
Collaborator

@mcollina mcollina left a comment

Choose a reason for hiding this comment

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

LGTM

test.js Outdated
@@ -1001,7 +1002,8 @@ experiment('ignore request logs for paths in ignorePaths', () => {
resolver = resolve
})
const stream = sink((data) => {
expect(data.req.url).to.not.equal('/ignored')
const url = new URL(data.req.url)
expect(url.pathname).to.equal('/')
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm wondering why these tests where passing before. Did you get a clue on why?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

data.req.url was undefined, so it passed because it wasn't /ignored.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Sorry, not undefined, but it was a full URL (http://colins-macbook-pro.local:0/)

@coveralls
Copy link

Coverage Status

Coverage increased (+0.003%) to 98.81% when pulling 266c3e2 on cjihrig:ignores into 11a6235 on pinojs:master.

@coveralls
Copy link

coveralls commented Feb 8, 2019

Coverage Status

Coverage remained the same at 98.808% when pulling 04fca95 on cjihrig:ignores into 11a6235 on pinojs:master.

@mcollina
Copy link
Collaborator

mcollina commented Feb 8, 2019

@cjihrig tests are failing with Hapi@17: https://travis-ci.org/pinojs/hapi-pino/jobs/490787436.

According to the hapi 18 release notes, request.url.path has
gone away in favor of request.path or request.url.pathname.
The same release notes also state that request.url.pathname
has not changed.

Refs: hapijs/hapi#3871
@cjihrig
Copy link
Collaborator Author

cjihrig commented Feb 8, 2019

@mcollina pushed up something that should fix it

@mcollina mcollina merged commit d50a867 into hapijs:master Feb 8, 2019
@mcollina
Copy link
Collaborator

mcollina commented Feb 8, 2019

Thanks!

@cjihrig cjihrig deleted the ignores branch February 8, 2019 23:48
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.

3 participants