Socket
Socket
Sign inDemoInstall

@rollup/plugin-node-resolve

Package Overview
Dependencies
37
Maintainers
4
Versions
45
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 15.1.0 to 15.2.0

4

dist/cjs/index.js

@@ -15,3 +15,3 @@ 'use strict';

var version = "15.1.0";
var version = "15.2.0";
var peerDependencies = {

@@ -1249,3 +1249,3 @@ rollup: "^2.78.0||^3.0.0"

...resolveOptions,
custom: { ...custom, 'node-resolve': { ...custom['node-resolve'], resolved } }
custom: { ...custom, 'node-resolve': { ...custom['node-resolve'], resolved, importee } }
});

@@ -1252,0 +1252,0 @@ if (resolvedResolved) {

@@ -11,3 +11,3 @@ import path, { dirname, resolve, extname, normalize, sep } from 'path';

var version = "15.1.0";
var version = "15.2.0";
var peerDependencies = {

@@ -1245,3 +1245,3 @@ rollup: "^2.78.0||^3.0.0"

...resolveOptions,
custom: { ...custom, 'node-resolve': { ...custom['node-resolve'], resolved } }
custom: { ...custom, 'node-resolve': { ...custom['node-resolve'], resolved, importee } }
});

@@ -1248,0 +1248,0 @@ if (resolvedResolved) {

{
"name": "@rollup/plugin-node-resolve",
"version": "15.1.0",
"version": "15.2.0",
"publishConfig": {

@@ -5,0 +5,0 @@ "access": "public"

@@ -237,2 +237,21 @@ [npm]: https://img.shields.io/npm/v/@rollup/plugin-node-resolve

## Resolve Options
After this plugin resolved an import id to its target file in `node_modules`, it will invoke `this.resolve` again with the resolved id. It will pass the following information in the resolve options:
```js
this.resolve(resolved.id, importer, {
custom: {
'node-resolve': {
resolved, // the object with information from node.js resolve
importee // the original import id
}
}
});
```
Your plugin can use the `importee` information to map an original import to its resolved file in `node_modules`, in a plugin hook such as `resolveId`.
The `resolved` object contains the resolved id, which is passed as the first parameter. It also has a property `moduleSideEffects`, which may contain the value from the npm `package.json` field `sideEffects` or `null`.
## Meta

@@ -239,0 +258,0 @@

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc