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

pnp-webpack-plugin

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pnp-webpack-plugin - npm Package Compare versions

Comparing version 1.6.0 to 1.6.1

28

index.js
const path = require(`path`);
const {resolveModuleName} = require(`ts-pnp`);
let pnp;
try {
pnp = require(`pnpapi`);
} catch (error) {
// not in PnP; not a problem
}
function nothing() {

@@ -17,2 +9,4 @@ // ¯\_(ツ)_/¯

function getModuleLocator(module) {
const pnp = require(`pnpapi`);
const moduleLocation = typeof module === `string`

@@ -34,2 +28,4 @@ ? module

function getDependencyLocator(sourceLocator, name) {
const pnp = require(`pnpapi`);
const {packageDependencies} = pnp.getPackageInformation(sourceLocator);

@@ -45,2 +41,4 @@ const reference = packageDependencies.get(name);

const pnp = require(`pnpapi`);
const sourceInformation = pnp.getPackageInformation(sourceLocator);

@@ -58,2 +56,4 @@

function makeResolver(sourceLocator, filter) {
const pnp = require(`pnpapi`);
const sourceLocation = getSourceLocation(sourceLocator);

@@ -131,3 +131,3 @@

module.exports = pnp ? {
module.exports = process.versions.pnp ? {
apply: makeResolver(null),

@@ -138,3 +138,3 @@ } : {

module.exports.makePlugin = (locator, filter) => pnp ? {
module.exports.makePlugin = (locator, filter) => process.versions.pnp ? {
apply: makeResolver(locator, filter),

@@ -145,3 +145,3 @@ } : {

module.exports.moduleLoader = module => pnp ? {
module.exports.moduleLoader = module => process.versions.pnp ? {
apply: makeResolver(getModuleLocator(module)),

@@ -152,4 +152,4 @@ } : {

module.exports.topLevelLoader = pnp ? {
apply: makeResolver(pnp.topLevel),
module.exports.topLevelLoader = process.versions.pnp ? {
apply: makeResolver({name: null, reference: null}),
} : {

@@ -159,3 +159,3 @@ apply: nothing,

module.exports.bind = (filter, module, dependency) => pnp ? {
module.exports.bind = (filter, module, dependency) => process.versions.pnp ? {
apply: makeResolver(dependency ? getDependencyLocator(getModuleLocator(module), dependency) : getModuleLocator(module), filter),

@@ -162,0 +162,0 @@ } : {

{
"name": "pnp-webpack-plugin",
"version": "1.6.0",
"version": "1.6.1",
"description": "plug'n'play resolver for Webpack",

@@ -5,0 +5,0 @@ "license": "MIT",

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