GithubHelp home page GithubHelp logo

Bump koa dependencies about grant HOT 6 CLOSED

bitinn avatar bitinn commented on April 28, 2024
Bump koa dependencies

from grant.

Comments (6)

simov avatar simov commented on April 28, 2024

Currently there is no separate repositories for the meta packages as they contain only 4 files in them

.
├── index.js
├── LICENSE
├── package.json
└── README.md

I agree that separate repository will make it easier to point the dependency to your own fork.

As for breaking changes between 3.0.0 and 3.1.0 that's very unfortunate, because it's not a major release, but it happens.

from grant.

bitinn avatar bitinn commented on April 28, 2024

Seems like koa-session specifically design 3.1.0 to make it backward compatibility, maybe he missed an edge case somewhere. I reverted to 3.0.0 for time being, will report back when I got time to checkout 3.1.0

from grant.

bitinn avatar bitinn commented on April 28, 2024

OK, looks like this is also triggered by app.use ordering:

This works

app.use(session(app));
app.use(bodyParser());
app.use(mount(grant));

But not this

app.use(mount(grant));
app.use(session(app));
app.use(bodyParser());

Maybe update doc to avoid this mishap?

The error is likely due to this._ctx.sessionOptions being empty when cookie is set by 3.0 first.

 TypeError: Cannot set property 'maxAge' of undefined
      at new Session (/Users/teambegin/git/mai/node_modules/koa-session/index.js:152:59)
      at Object.session (/Users/teambegin/git/mai/node_modules/koa-session/index.js:64:16)

from grant.

simov avatar simov commented on April 28, 2024

Closing in favor of #10

from grant.

simov avatar simov commented on April 28, 2024

@bitinn check out the latest changelog https://github.com/simov/grant/blob/master/CHANGELOG.md - it's not entirely related to Koa, but I'm sure you'll like it :)

from grant.

bitinn avatar bitinn commented on April 28, 2024

@simov thx for the heads up, looks great! been using v3.2.0 in one of my project and so far so good, will upgrade to v3.3.0 soonish.

from grant.

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.