jfromaniello/express-unless

Changelog

KrisLau opened this issue ยท 9 comments

Where is the changelog?

As far as I remember this library never had a changelog.

honest question, do you think it is really important in a project like this?

Most of my libraries are very specific and have a clear purpose, so I am not sure is worth the time and effort. For some libraries I've used an script to autogenerate the changelog file from commits but this one has only ~40 commits.

@jfromaniello I asked mainly because I noticed I'm on v1.0.0 and the package is on 2.1.0 and I thought I had just missed seeing it somewhere. I might have worded the issue wrongly haha but I was looking for it rather than requesting one be made.

If there aren't any breaking changes I'm quite fine without but I just wasn't sure if I should upgrade the package without knowing if there was anything I needed to be worried about. I looked through a comparison of the the two releases but I didn't see any breaking changes. Let me know if I'm mistaken though

@jfromaniello i upgraded to v2.1.1 and that seems to cause my node backend to crash with the error:

decodeIDToken.unless is not a function
    at Object.<anonymous> (/Users/newuser/Desktop/Prototype/backend/index.js:57:23)
    at Module._compile (node:internal/modules/cjs/loader:1105:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12)
    at node:internal/main/run_main_module:17:47

Code:

// Server side auth
app.use(decodeIDToken.unless({
    path: [
        '/test-connection',
        '/debug-sentry',
        /\/calendars/
    ]
}));

Any ideas?

This might be related to the fact that in v2, the export is different.. So you have to use:

var { unless } = require("express-unless");

There have not been big chances between v1 and v2... only that I rewrote the code in typescript. The test suite is the same.

@jfromaniello so decodeIDToken is not an existing middleware, i made it myself so I was using the other import method. Not sure what I need to change in that case? Currently my code is:

decodeIDToken.unless = require("express-unless");

which seems to be the same as the docs?

ok I figured it out:

var { unless } = require("express-unless");
...
decodeIDToken.unless = unless;

thanks for the heads up, you are right! I found the issue in the docs. ๐Ÿ™๐Ÿฝ

@jfromaniello No worries i made a pull request #37 Oops just saw your change

ohh thanks, and sorry !!!