pirates
npmv4.0.7TypeScriptProperly hijack require, i.e., properly define require hooks and customizations
Adopt with care
pirates is usable, with caveats. Last published 531 days ago.
- ?Adoption: grade ?, Not reported by this registry.
No download data reported for this package yet.
- CMaintenance: grade C, Fair — worth a look.
Last published 531 days ago.
- AWeight: grade A, Excellent.
Zero runtime dependencies, about 12 KB installed.
- ASupply chain: grade A, Excellent.
No install scripts, 3 maintainers, and a contained dependency surface.
- ALicense: grade A, Excellent.
MIT — permissive, with no copyleft found in the dependency tree.
Grades are computed deterministically from registry metadata collected by PackageGraph — downloads, dependents, publish dates, the resolved dependency tree, maintainer count, and declared licenses. No third-party scores are used.
Install cost
What you actually take on by adding pirates to a project.
Runtime packages this one declares itself.
Distinct packages in the full runtime tree, deduplicated the way a package manager would.
Unpacked size of this package plus its entire runtime tree.
Longest resolved dependency chain below this package.
Compatibility
- Node.js
- node >= 6
- Module format
- CommonJS only
- TypeScript
- Types included
- Install scripts
- None
Quick start
A usage example from the pirates README.
// my-module/register.js
const addHook = require('pirates').addHook;
// Or if you use ES modules
// import { addHook } from 'pirates';
function matcher(filename) {
// Here, you can inspect the filename to determine if it should be hooked or
// not. Just return a truthy/falsey. Files in node_modules are automatically ignored,
// unless otherwise specified in options (see below).
// TODO: Implement your logic here
return true;
}
Dependencies
Declared by pirates v4.0.7. Runtime dependencies are installed with the package; dev dependencies are not.
Dev (2)
Used by
Popular packages that depend on pirates.
Relationship graph
Dependencies (left) and dependents (right) of pirates.
Frequently installed together
deterministic `JSON.stringify()` - a faster version of substack's json-stable-strigify without jsonify
This packages is a collection of utilities and helper functions
No description provided.
TypeScript definitions for @babel/core
Trace the original position through a source map
Convert Windows backslash paths to slash paths
`jest-haste-map` is a module used by Jest, a popular JavaScript testing framework, to create a fast lookup of files in a project. It helps Jest efficiently locate and track changes in files during testing, making it particularly useful for large projects
A drop-in replacement for fs, making various improvements.
A babel plugin that adds istanbul instrumentation to ES6 code
Write files in an atomic fashion w/configurable ownership
This package contains shared types of Jest's packages.
Converts a source-map from/to different formats and allows adding/changing properties.
Release history
1 release in the last two years, typically about 41 days apart.
| Version | Published | Size | License |
|---|---|---|---|
| 4.0.7latest | 1 year ago | 12 KB | MIT |
| 4.0.6 | 3 years ago | 13 KB | MIT |
| 4.0.5 | 4 years ago | 13 KB | MIT |
| 4.0.4 | 4 years ago | 13 KB | MIT |
| 4.0.3 | 4 years ago | 13 KB | MIT |
| 4.0.2 | 4 years ago | 7.6 KB | MIT |
| 4.0.1 | 7 years ago | 12 KB | MIT |
| 4.0.0 | 8 years ago | 11 KB | MIT |
| 3.0.2 | 8 years ago | — | MIT |
| 3.0.1 | 9 years ago | — | MIT |
| 3.0.0 | 9 years ago | — | MIT |
| 2.1.2 | 10 years ago | — | MIT |
| 2.1.1 | 10 years ago | — | MIT |
| 2.1.0 | 10 years ago | — | MIT |
| 2.0.1 | 10 years ago | — | MIT |
Overview
pirates is an npm package that properly hijack require, i.e., properly define require hooks and customizations. It has 2 known dependents in the graph. The latest version is 4.0.7, released under the MIT license.
Who should use it
Teams working in the npm ecosystem who need properly hijack require, i.e., properly define require hooks and customizations and value a focused solution.
When not to use it
Consider an alternative if you need to or if a more actively-maintained option better fits your npm stack.
Pros
- Ships TypeScript type definitions.
- Clear open-source license (MIT).
- Lean dependency tree (2 direct dependencies).
Cons
- No significant drawbacks detected from available metadata.
Auto-generated from collected registry metadata. No external claims are inferred.
Frequently asked questions
Should I use pirates?
pirates is usable, with caveats. Last published 531 days ago.
How do I install pirates?
Run `npm install pirates` to add pirates to your npm project.
What license is pirates released under?
pirates is distributed under the MIT license.
How popular is pirates?
npm does not publish download counts. Within PackageGraph's crawl, 2 known packages depend on pirates.
Is pirates still maintained?
The most recent release of pirates (v4.0.7) was published 1 year ago.
Does pirates run install scripts?
No. pirates does not define preinstall, install, or postinstall scripts, so installing it does not execute publisher-supplied code.