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

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

Open
shawncarr opened this issue Aug 10, 2021 · 4 comments
Open

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

shawncarr opened this issue Aug 10, 2021 · 4 comments

Comments

@shawncarr
Copy link

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;
}
@jiminikiz
Copy link

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

@3imed-jaberi
Copy link
Member

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

@shawncarr
Copy link
Author

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

@NourIM
Copy link

NourIM commented Sep 27, 2023

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

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

No branches or pull requests

4 participants