You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by GitBox <gi...@apache.org> on 2021/02/25 02:34:16 UTC

[GitHub] [skywalking-nodejs] zijin-m commented on a change in pull request #29: add plugin mysql

zijin-m commented on a change in pull request #29:
URL: https://github.com/apache/skywalking-nodejs/pull/29#discussion_r582447361



##########
File path: src/core/PluginInstaller.ts
##########
@@ -33,7 +34,7 @@ while (topModule.parent) {
 export default class PluginInstaller {
   private readonly pluginDir: string;
   readonly require: (name: string) => any = topModule.require.bind(topModule);
-  private readonly resolve = (request: string) => (module.constructor as any)._resolveFilename(request, topModule);
+  private readonly resolve = (request: string) => resolve.sync(request);

Review comment:
       Sorry, I missed this point. According to the documentation [resolve](https://www.npmjs.com/package/resolve), this can be done by 
   ```private readonly resolve = (request: string) => resolve.sync(request, {basedir: path.dirname(topModule.id) });```
    if You agree i will update later




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org