fastify-plugin
Advanced tools
Comparing version 2.3.0 to 2.3.1
{ | ||
"name": "fastify-plugin", | ||
"version": "2.3.0", | ||
"version": "2.3.1", | ||
"description": "Plugin helper for Fastify", | ||
@@ -9,3 +9,3 @@ "main": "plugin.js", | ||
"typescript": "tsd", | ||
"test": "standard && tap test/*.js && npm run typescript" | ||
"test": "standard && tap test/*.js test/esm/*.js && npm run typescript" | ||
}, | ||
@@ -12,0 +12,0 @@ "repository": { |
@@ -80,2 +80,6 @@ 'use strict' | ||
function resolvePkgPath (mainFilename) { | ||
return join(dirname(require.resolve('fastify', { paths: [mainFilename] })), 'package.json') | ||
} | ||
function checkVersion (version, pluginName) { | ||
@@ -90,5 +94,8 @@ if (typeof version !== 'string') { | ||
var pkgPath | ||
if (require.main.filename) { | ||
if (require.main && require.main.filename) { | ||
// We need to dynamically compute this to support yarn pnp | ||
pkgPath = join(dirname(require.resolve('fastify', { paths: [require.main.filename] })), 'package.json') | ||
pkgPath = resolvePkgPath(require.main.filename) | ||
} else if (process.argv[1]) { | ||
// We need this to support native ESM context | ||
pkgPath = resolvePkgPath(process.argv[1]) | ||
} else { | ||
@@ -95,0 +102,0 @@ // In bundlers, there is no require.main.filename so we go ahead and require directly |
@@ -7,6 +7,3 @@ { | ||
"strict": true, | ||
}, | ||
"files": [ | ||
"./test/types.test.ts" | ||
] | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
26459
17
610
2
1