New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

directory-import

Package Overview
Dependencies
Maintainers
0
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

directory-import - npm Package Compare versions

Comparing version 3.3.1 to 3.3.2

1

dist/index.d.ts

@@ -19,2 +19,3 @@ type ModuleName = string;

limit?: number;
forceReload?: boolean;
}

@@ -21,0 +22,0 @@

@@ -128,2 +128,5 @@ "use strict";

const relativeModulePath = filePath.slice(options.targetDirectoryPath.length);
if (options.forceReload) {
delete require.cache[filePath];
}
const importedModule = require(filePath);

@@ -153,3 +156,4 @@ modules[relativeModulePath] = importedModule;

callerDirectoryPath: import_node_path4.default.resolve("/"),
targetDirectoryPath: import_node_path4.default.resolve("/")
targetDirectoryPath: import_node_path4.default.resolve("/"),
forceReload: false
};

@@ -156,0 +160,0 @@ options.callerFilePath = new Error("functional-error").stack.split("\n")[4]?.match(/(?:\/|[A-Za-z]:\\)[/\\]?(?:[^:]+){1,2}/)?.[0] || options.callerFilePath;

8

package.json
{
"name": "directory-import",
"version": "3.3.1",
"version": "3.3.2",
"description": "Module will allow you to synchronously or asynchronously import (requires) all modules from the folder you specify",

@@ -13,3 +13,4 @@ "main": "dist/index.js",

"start": "node dist/index.js",
"publish": "npm run build && npm publish",
"prepare": "npm run build",
"publish": "npm run prepare && npm publish",
"jest": "jest --silent test/index.test.ts",

@@ -63,3 +64,2 @@ "jest:watcher": "jest --watchAll",

"eslint-plugin-unicorn": "^49.0.0",
"husky": "^8.0.3",
"jest": "^29.7.0",

@@ -71,2 +71,2 @@ "prettier": "^3.1.0",

}
}
}

@@ -113,2 +113,3 @@ <!--suppress HtmlDeprecatedAttribute -->

| limit | Number | Limit the number of imported modules |
| forceReload | Boolean | If true, reload modules disabling require cache |

@@ -339,4 +340,9 @@ [back to top](#top)

### [3.3.0] - 2024-03-27
### [3.3.2] - 2024-12-25
#### Added
- Add forceReload option.
### [3.3.1] - 2024-03-27
#### Fixed

@@ -343,0 +349,0 @@ - Now module can work with windows operating system!

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc