![Maven Central Adds Sigstore Signature Validation](https://cdn.sanity.io/images/cgdhsj6q/production/7da3bc8a946cfb5df15d7fcf49767faedc72b483-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Maven Central Adds Sigstore Signature Validation
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
dev-require
Advanced tools
Patch require to load local modules during development.
Allowing you to create a series of dependent modules and work on them
all without npm publish
and npm install
ing all the time.
npm install --save-dev dev-require
Given directory:
projects-directory/
├── bar-module
│ └── index.js
└── foo-module
└── index.js
Given file projects-directory/bar-module/index.js
:
//Patch require to look in 'projects-directory/'
//BEFORE looking in node_modules
require('dev-require').activate({
'iJamoProR.local': {
dir: __dirname + "/.."
}
});
//retrieves local 'foo-module'
var foo = require('foo-module');
console.log(42 + foo); //=> 49
activate(config)
Activates development require
config
.[hostname]
- configuration for hostname
that matches require('os').hostname()
. "*"
can be used to match all hostnames.
config
.[hostname]
.dir
- a directory to search
config
.[hostname]
.dirs
- an array of directories to search
config
.[hostname]
.filter
- pass the module name through a filter
function before attempting the require
config
.[hostname]
.filters
- an array filter
functions
Note: The first directory+filter(module)
combination to successfully return a module will be used. If none match, require
will run as normal.
deactivate()
Deactivates development require
Copyright © 2013 Jaime Pillora <dev@jpillora.com>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
FAQs
Patch require to load local modules during development
The npm package dev-require receives a total of 2 weekly downloads. As such, dev-require popularity was classified as not popular.
We found that dev-require demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.