joi-router icon indicating copy to clipboard operation
joi-router copied to clipboard

`is-gen-fn` is has invalid package.json in Node 16

Open shawncarr opened this issue 2 years ago • 4 comments

The package is-gen-fn, which koa-joi-router has a dependency on, has an issue in its package.json resulting in a DeprecationWarning when koa-joi-router is used in node 16.

[DEP0128] DeprecationWarning: Invalid 'main' field in '/usr/src/app/node_modules/is-gen-fn/package.json' of 'yes'. Please either fix that or report it to the module author

As the is-gen-fn package has not been updated in 7 years nor is it public, and is a single line function I recommend that you implement the function in this package to avoid issues in the future.

Function from is-gen-fn

function isGeneratorFunction(obj) {
  return obj && obj.constructor && 'GeneratorFunction' == obj.constructor.name;
}

shawncarr avatar Aug 10 '21 18:08 shawncarr

Came here to post what @shawncarr posted, I too agree with his solution too.

jiminikiz avatar Sep 29 '21 15:09 jiminikiz

Hello guys, I solve it ago some time by this PR #128 . just I'm wait @aheckmann to merge it.

3imed-jaberi avatar Sep 29 '21 17:09 3imed-jaberi

@3imed-jaberi can you update the PR description to reference this issue?

shawncarr avatar Sep 29 '21 17:09 shawncarr

Hi @3imed-jaberi! when are you planning to publish these fixes to the new version?

NourIM avatar Sep 27 '23 11:09 NourIM