Comparing version 4.3.1 to 4.3.2
@@ -0,1 +1,5 @@ | ||
# v4.3.2 | ||
- Convert paths to file URLs in `loadModules` with ESM, fixes [#225](https://github.com/jeffijoe/awilix/issues/225). ([#227](https://github.com/jeffijoe/awilix/pull/227), [Jamie Corkhill](https://github.com/JamieCorkhill)) | ||
# v4.3.1 | ||
@@ -2,0 +6,0 @@ |
import { sync } from 'glob'; | ||
import { basename, resolve } from 'path'; | ||
import { inspect } from 'util'; | ||
import { pathToFileURL } from 'url'; | ||
import { camelCase } from 'camel-case'; | ||
@@ -1082,3 +1083,4 @@ import { importModule } from './load-module-native.js'; | ||
for (const m of modules) { | ||
importPromises.push(dependencies.require(m.path)); | ||
const fileUrl = pathToFileURL(m.path).toString(); | ||
importPromises.push(dependencies.require(fileUrl)); | ||
} | ||
@@ -1085,0 +1087,0 @@ const imports = yield Promise.all(importPromises); |
@@ -13,2 +13,3 @@ "use strict"; | ||
exports.loadModules = void 0; | ||
const url_1 = require("url"); | ||
const lifetime_1 = require("./lifetime"); | ||
@@ -77,3 +78,4 @@ const resolvers_1 = require("./resolvers"); | ||
for (const m of modules) { | ||
importPromises.push(dependencies.require(m.path)); | ||
const fileUrl = url_1.pathToFileURL(m.path).toString(); | ||
importPromises.push(dependencies.require(fileUrl)); | ||
} | ||
@@ -80,0 +82,0 @@ const imports = yield Promise.all(importPromises); |
{ | ||
"name": "awilix", | ||
"version": "4.3.1", | ||
"version": "4.3.2", | ||
"description": "Extremely powerful dependency injection container.", | ||
@@ -5,0 +5,0 @@ "main": "lib/awilix.js", |
@@ -65,3 +65,3 @@ # Awilix | ||
``` | ||
npm install awilix --save | ||
npm install awilix | ||
``` | ||
@@ -68,0 +68,0 @@ |
Sorry, the diff of this file is not supported yet
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
315768
6583