Code Monkey home page Code Monkey logo

Comments (7)

arb avatar arb commented on June 1, 2024

Hmmm interesting. Seems like we're going to need to do some extra now to update incoming message values when Joi makes changes to the object.

Are there docs about Express 5 anywhere?

from celebrate.

kswope avatar kswope commented on June 1, 2024

I've only found this
http://expressjs.com/en/guide/migrating-5.html

Why is it that I could comment out the offending line and seemingly make it work again?

from celebrate.

cjihrig avatar cjihrig commented on June 1, 2024

Why is it that I could comment out the offending line and seemingly make it work again?

Are you referring to https://github.com/continuationlabs/celebrate/blob/a61daa15813f828515bbbedd33bea989f32b59eb/lib/index.js#L37? If so, it works because you're no longer overwriting the existing query mentioned in that error message. The problem is that it cripples the functionality of Celebrate. You will be able to validate inputs, but not update them, which is something Joi supports.

from celebrate.

kswope avatar kswope commented on June 1, 2024

Oh ok I didn't realize Joi had that 'convert' option, now it makes sense.

I vaguely remember req.params changing to read only, but I can't remember where. I can understand the argument that middleware shouldn't be modifying the input, but I think you have a stronger argument. I'm dig a little deeper into this.

from celebrate.

cjihrig avatar cjihrig commented on June 1, 2024

For context:

Here is the Express 5.0 release notes/PR: expressjs/express#2237
Here is the PR that updated req.query to be a getter: expressjs/express#2215
Here is the commit: expressjs/express@dcc4eaa

from celebrate.

cjihrig avatar cjihrig commented on June 1, 2024

If anyone is following along here, and cares enough, there is some discussion going on at expressjs/express#3472. You may want to weigh in.

from celebrate.

arb avatar arb commented on June 1, 2024

Closed via #48

from celebrate.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.