create-require
Advanced tools
Comparing version 1.0.2 to 1.1.0
@@ -5,2 +5,9 @@ # Changelog | ||
## [1.1.0](https://github.com/nuxt-contrib/create-require/compare/v1.0.2...v1.1.0) (2020-11-21) | ||
### Features | ||
* fallback to process.cwd() if no filename provided either ([ae5e0d6](https://github.com/nuxt-contrib/create-require/commit/ae5e0d665945b980b82ae6e998146c32295a6734)) | ||
### [1.0.2](https://github.com/nuxt-contrib/create-require/compare/v1.0.1...v1.0.2) (2020-06-12) | ||
@@ -7,0 +14,0 @@ |
@@ -6,2 +6,7 @@ const nativeModule = require('module') | ||
function createRequire (filename) { | ||
// Fallback to process.cwd() if no filename passed | ||
if (!filename) { | ||
filename = process.cwd() | ||
} | ||
// If filename is dir, createRequire goes with parent directory, so we need fakepath | ||
@@ -8,0 +13,0 @@ if (isDir(filename)) { |
{ | ||
"name": "create-require", | ||
"version": "1.0.2", | ||
"version": "1.1.0", | ||
"description": "Polyfill for Node.js module.createRequire (<= v12.2.0)", | ||
@@ -5,0 +5,0 @@ "repository": "nuxt-contrib/create-require", |
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
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
5895
42