@optimize-lodash/rollup-plugin
Advanced tools
Comparing version 3.1.0 to 3.2.0
@@ -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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
107
15062
+ Added@rollup/pluginutils@5.0.5(transitive)
+ Added@rollup/rollup-android-arm-eabi@4.28.1(transitive)
+ Added@rollup/rollup-android-arm64@4.28.1(transitive)
+ Added@rollup/rollup-darwin-arm64@4.28.1(transitive)
+ Added@rollup/rollup-darwin-x64@4.28.1(transitive)
+ Added@rollup/rollup-freebsd-arm64@4.28.1(transitive)
+ Added@rollup/rollup-freebsd-x64@4.28.1(transitive)
+ Added@rollup/rollup-linux-arm-gnueabihf@4.28.1(transitive)
+ Added@rollup/rollup-linux-arm-musleabihf@4.28.1(transitive)
+ Added@rollup/rollup-linux-arm64-gnu@4.28.1(transitive)
+ Added@rollup/rollup-linux-arm64-musl@4.28.1(transitive)
+ Added@rollup/rollup-linux-loongarch64-gnu@4.28.1(transitive)
+ Added@rollup/rollup-linux-powerpc64le-gnu@4.28.1(transitive)
+ Added@rollup/rollup-linux-riscv64-gnu@4.28.1(transitive)
+ Added@rollup/rollup-linux-s390x-gnu@4.28.1(transitive)
+ Added@rollup/rollup-linux-x64-gnu@4.28.1(transitive)
+ Added@rollup/rollup-linux-x64-musl@4.28.1(transitive)
+ Added@rollup/rollup-win32-arm64-msvc@4.28.1(transitive)
+ Added@rollup/rollup-win32-ia32-msvc@4.28.1(transitive)
+ Added@rollup/rollup-win32-x64-msvc@4.28.1(transitive)
+ Added@types/estree@1.0.6(transitive)
+ Addedrollup@4.28.1(transitive)
- Removed@rollup/pluginutils@4.2.1(transitive)
- Removedrollup@2.79.2(transitive)
Updated@rollup/pluginutils@~5.0.2