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

@optimize-lodash/rollup-plugin

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@optimize-lodash/rollup-plugin - npm Package Compare versions

Comparing version 3.1.0 to 3.2.0

4

dist/index.d.ts

@@ -1,2 +0,2 @@

import type { Plugin } from "rollup";
import type { PluginImpl } from "rollup";
import { FilterPattern } from "@rollup/pluginutils";

@@ -45,3 +45,3 @@ export declare type OptimizeLodashOptions = {

*/
export declare function optimizeLodashImports({ include, exclude, useLodashEs, appendDotJs, }?: OptimizeLodashOptions): Plugin & Required<Pick<Plugin, "transform">>;
export declare const optimizeLodashImports: PluginImpl<OptimizeLodashOptions>;
//# sourceMappingURL=index.d.ts.map

@@ -7,3 +7,5 @@ "use strict";

const UNCHANGED = null;
const ROLLUP_ESM_FORMATS = new Set(["es", "esm", "module"]);
// for small numbers of items, arrays are faster than hash tables
// eslint-disable-next-line unicorn/prefer-set-has
const ROLLUP_ESM_FORMATS = ["es", "esm", "module"];
/**

@@ -30,3 +32,3 @@ * Converts lodash imports to be specific, enabling better tree-shaking:

*/
function optimizeLodashImports({ include, exclude, useLodashEs, appendDotJs, } = {}) {
const optimizeLodashImports = ({ include, exclude, useLodashEs, appendDotJs, } = {}) => {
const filter = (0, pluginutils_1.createFilter)(include, exclude);

@@ -39,3 +41,3 @@ return {

options.format &&
!ROLLUP_ESM_FORMATS.has(options.format)) {
!ROLLUP_ESM_FORMATS.includes(options.format)) {
this.error(`'useLodashEs' is true but the output format is not 'es', 'esm' or 'module', it's ${(_a = options.format) !== null && _a !== void 0 ? _a : "undefined"}`);

@@ -62,4 +64,4 @@ }

};
}
};
exports.optimizeLodashImports = optimizeLodashImports;
//# sourceMappingURL=index.js.map
{
"name": "@optimize-lodash/rollup-plugin",
"version": "3.1.0",
"version": "3.2.0",
"description": "Rewrite lodash imports with Rollup for improved tree-shaking.",

@@ -34,36 +34,33 @@ "keywords": [

"preset": "ts-jest",
"globals": {
"ts-jest": {}
},
"testTimeout": 10000
},
"peerDependencies": {
"rollup": "2.x"
"rollup": ">=2.x"
},
"devDependencies": {
"@rollup/plugin-commonjs": "22.0.2",
"@rollup/plugin-node-resolve": "13.3.0",
"@rollup/plugin-commonjs": "23.0.2",
"@rollup/plugin-node-resolve": "15.0.1",
"@rollup/plugin-terser": "0.1.0",
"@tsconfig/node12": "1.0.11",
"@types/estree": "1.0.0",
"@types/jest": "28.1.8",
"@types/lodash": "4.14.186",
"@types/jest": "29.2.2",
"@types/lodash": "4.14.188",
"@types/node": "12.20.55",
"@typescript-eslint/eslint-plugin": "5.38.0",
"@typescript-eslint/parser": "5.38.0",
"@typescript-eslint/eslint-plugin": "5.42.0",
"@typescript-eslint/parser": "5.42.0",
"depcheck": "1.4.3",
"eslint": "8.24.0",
"eslint": "8.27.0",
"eslint-config-prettier": "8.5.0",
"eslint-plugin-jest": "27.0.4",
"eslint-plugin-jest": "27.1.4",
"eslint-plugin-unicorn": "43.0.2",
"jest": "28.1.3",
"jest": "29.2.2",
"lodash": "4.17.21",
"prettier": "2.7.1",
"rollup": "2.77.3",
"rollup-plugin-terser": "7.0.2",
"ts-jest": "28.0.8",
"typescript": "4.8.3"
"rollup": "3.2.5",
"ts-jest": "29.0.3",
"typescript": "4.8.4"
},
"dependencies": {
"@optimize-lodash/transform": "3.x",
"@rollup/pluginutils": "4.x"
"@rollup/pluginutils": "~5.0.2"
},

@@ -70,0 +67,0 @@ "scripts": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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