Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

module-alias

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

module-alias - npm Package Compare versions

Comparing version 2.2.0 to 2.2.1

13

index.js

@@ -30,3 +30,3 @@ 'use strict'

var oldResolveFilename = Module._resolveFilename
Module._resolveFilename = function (request, parentModule, isMain) {
Module._resolveFilename = function (request, parentModule, isMain, options) {
for (var i = moduleAliasNames.length; i-- > 0;) {

@@ -50,3 +50,3 @@ var alias = moduleAliasNames[i]

return oldResolveFilename.call(this, request, parentModule, isMain)
return oldResolveFilename.call(this, request, parentModule, isMain, options)
}

@@ -121,2 +121,11 @@

removePathHelper(path, require.main.paths)
// Delete from require.cache if the module has been required before.
// This is required for node >= 11
Object.getOwnPropertyNames(require.cache).forEach(function (name) {
if (name.indexOf(path) !== -1) {
delete require.cache[name]
}
})
var parent = module.parent

@@ -123,0 +132,0 @@ while (parent && parent !== require.main) {

{
"name": "module-alias",
"description": "Create aliases of directories and register custom module paths",
"version": "2.2.0",
"version": "2.2.1",
"author": {

@@ -13,3 +13,4 @@ "name": "Nick Gavrilov",

"testonly-watch": "NODE_ENV=test mocha -w test/specs.js",
"lint": "standard"
"lint": "standard",
"lint-test": "npm run lint && npm run test"
},

@@ -42,5 +43,12 @@ "bugs": {

"hello-world-classic": "ilearnio/hello-world-classic",
"husky": "^3.0.2",
"mocha": "^2.4.5",
"semver": "^6.1.1",
"standard": "^12.0.1"
},
"husky": {
"hooks": {
"pre-push": "npm run lint-test"
}
}
}
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