RSeidelsohn / license-checker-rseidelsohn

Extract NPM package licenses. Enhanced and updated fork of Dav Glass' original (but abandoned) license-checker.
https://www.npmjs.com/package/license-checker-rseidelsohn
Other
127 stars 34 forks source link

--production is falsely listing all non-prod packages. #109

Open geetee24 opened 7 months ago

geetee24 commented 7 months ago

Given: { "name": "combined PJ", "version": "1.0.5", "description": "Welcome", "src": "lib/typography.tsx", "main": "dist/cjs/typography.js", "module": "dist/esm/typography.js", "sideEffects": false, "scripts": {}, "devDependencies": { "@babel/runtime": "^7.20.6", "@emotion/react": "^11.10.4", "@emotion/styled": "^11.10.4", "@mui/material": "^5.10.3", "@mui/types": "^7.2.0", "@types/react": "^18.0.17", "react": "^18.2.0", "react-dom": "^18.2.0", "@mui/system": "^5.4.1", "@mui/x-data-grid-premium": "^6.0.3", "eslint-plugin-react": "^7.33.2", "svgson": "^5.2.1", "ts-node": "^10.9.1", "@mui/x-tree-view": "^6.17.0" }, "peerDependencies": { "@emotion/react": "^11.10.4", "@emotion/styled": "^11.10.4", "@mui/material": "^5.10.3", "react": "^18.2.0", "react-dom": "^18.2.0", "@mui/x-data-grid-premium": "^6.0.3", "@mui/lab": "^5.0.0-alpha.124", "@mui/x-tree-view": "^6.17.0" }, "dependencies": { "react-flip-move": "^3.0.5", "react-transition-group": "^4.4.5", "@mui/lab": "^5.0.0-alpha.124", "classnames": "2.3.2" } }

and command: license-checker-rseidelsohn --production --json --out out.json

output contains NON prod entries like babel......

output: out.zip

partial here: { "@aashutoshrathi/word-wrap@1.2.6": { "licenses": "MIT", "repository": "https://github.com/aashutoshrathi/word-wrap", "publisher": "Jon Schlinkert", "path": "D:\temp\A\node_modules\@aashutoshrathi\word-wrap", "licenseFile": "D:\temp\A\node_modules\@aashutoshrathi\word-wrap\LICENSE" }, "@babel/code-frame@7.23.5": { "licenses": "MIT", "repository": "https://github.com/babel/babel", "publisher": "The Babel Team", "path": "D:\temp\A\node_modules\@babel\code-frame", "licenseFile": "D:\temp\A\node_modules\@babel\code-frame\LICENSE" }, "@babel/helper-module-imports@7.22.15": { "licenses": "MIT", "repository": "https://github.com/babel/babel", "publisher": "The Babel Team", "path": "D:\temp\A\node_modules\@babel\helper-module-imports", "licenseFile": "D:\temp\A\node_modules\@babel\helper-module-imports\LICENSE" }, "@babel/helper-string-parser@7.23.4": { "licenses": "MIT", "repository": "https://github.com/babel/babel", "publisher": "The Babel Team", "path": "D:\temp\A\node_modules\@babel\helper-string-parser", "licenseFile": "D:\temp\A\node_modules\@babel\helper-string-parser\LICENSE" }, "@babel/helper-validator-identifier@7.22.20": { "licenses": "MIT", "repository": "https://github.com/babel/babel", "publisher": "The Babel Team", "path": "D:\temp\A\node_modules\@babel\helper-validator-identifier", "licenseFile": "D:\temp\A\node_modules\@babel\helper-validator-identifier\LICENSE" }, }

jakwarrior commented 5 months ago

Same problem here

s-weigand commented 1 month ago

I also encountered this today, but this isn't a bug, it's because of all the dependencies that the @emotion and @mui packages define.