generate-license-file
generate-license-file copied to clipboard
Packages are not sorted alphabetically in output anymore (post 3.0.0)
As title, it seems the output is generated consistently still, but in a different order with logic unknown to me.
Hey @Greg-NetDuma - we'll get back to you in the next few days.
In the meantime we're hoping you can provide us with a little more detail?
- What version of generate-license-file are you using? (3.0.1?)
- Which package manager are you using? (npm/yarn/pnpm)
- How are you using generate-license-file? (CLI or importing the functions/programmatic use; if programmatically, which function(s) are you calling?)
- What is your expectation for ordering? (Sorting by license content vs. npm package name vs. etc.)
Thanks :)
Hey @Greg-NetDuma ,
I'm just following up on this, are you able to provide us with a little more context regarding our questions above?
Thanks :)
Hi, sorry for the late reply (also I stopped using my work account got merged into my personal one so I'm using this account instead).
Version: 3.0.1
Package manager: npm
Command we are using: npx generate-license-file --eol lf --ci --input package.json --output build/licenses.txt --overwrite
My expectation was that licenses are sorted by packages names used are alphabetically sorted. This is something I prefer.
The alternative is that packages are grouped by licenses (if they are identical) and the packages themselves are sorted. The last group would be custom. But I'm not sure how would you sort by licenses themselves as I can't see the usefulness of sorting by license content.
Please point out any caveats/cons or problems with the expected outputs I described (because it is more than likely I missed some) or if I just misunderstood some things about how the file is generated.
Hey @Greg-NetDuma / @Gr3q,
Sorry we've let this issue go stale. It should be the case that if you're using our CLI then the output should be sorted.
Do you have a minimal repro that demonstrates packages or licenses out of order?
Thanks!
no problem.
the package.json in question with the command we are using:
{
"name": "test",
"version": "1.0.0",
"description": "",
"scripts": {
"gen-license": "npx generate-license-file --eol lf --ci --input package.json --output build/licenses.txt --overwrite"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"@emotion/react": "^11",
"@emotion/styled": "^11",
"@mui/icons-material": "^5.11.11",
"@mui/material": "5.11.16",
"@mui/styles": "^5.9.3",
"@mui/x-date-pickers": "^5.0.9",
"@netduma/map-geojson": "^1.4.0",
"@nivo/bar": "0.83.0",
"@nivo/core": "0.83.0",
"@nivo/line": "0.83.0",
"@nivo/pie": "0.83.0",
"@nivo/scales": "0.83.0",
"@nivo/scatterplot": "0.83.0",
"@tweenjs/tween.js": "^21.0.0",
"animated-scroll-to": "^2.3.0",
"async-mutex": "^0.4.1",
"autosuggest-highlight": "^3.3.4",
"bowser": "^2.11.0",
"cron-parser": "^4.8.1",
"d3": "^7.8.4",
"d3-array": "^3.2.3",
"d3-force": "^3.0.0",
"esbuild-loader": "^4.1.0",
"geojson": "^0.5.0",
"hammerjs": "^2.0.8",
"humanize-duration": "^3.29.0",
"i18next": "^23.11.1",
"i18next-browser-languagedetector": "^7.1.0",
"i18next-chained-backend": "^3.1.0",
"i18next-http-backend": "^2.4.2",
"i18next-resources-to-backend": "^1.2.0",
"imask": "^7.1.2",
"lodash-es": "^4.17.21",
"lottie-react": "^2.3.1",
"lottie-web": "^5.10.2",
"luxon": "^3.3.0",
"mobx": "^6.9.1",
"mobx-react": "^7.6.0",
"notistack": "^2.0.5",
"openpgp": "^5.11.1",
"path-normalize": "^6.0.12",
"path-to-regexp": "1.x.x",
"react": "^17",
"react-beautiful-dnd": "^13.1.1",
"react-dom": "^17",
"react-error-boundary": "^4.0.13",
"react-flip-toolkit": "^7.0.13",
"react-force-graph-2d": "^1.24.0",
"react-grid-layout": "1.2.0",
"react-i18next": "14.0.0",
"react-imask": "^7.1.2",
"react-router-dom": "^5.3.0",
"react-swipeable-views": "^0.14.0",
"react-transition-group": "^4.4.5",
"seedrandom": "3.0.5",
"semver": "^7.5.4",
"supercluster": "^8.0.1",
"svg-path-commander": "^2.0.9",
"three": "^0.154.0",
"uuid": "^9.0.0",
"weekstart": "^2.0.0",
"zod": "^3.23.8"
},
"devDependencies": {
"@axe-core/react": "^4.4.0",
"@babel/code-frame": "^7.18.6",
"@babel/core": "^7.14.8",
"@babel/preset-env": "^7.14.9",
"@babel/preset-react": "^7.14.5",
"@netduma/html-webpack-injector": "^1.1.5",
"@netduma/unit-configs": "^1.16.5",
"@openpgp/web-stream-tools": "^0.0.11-patch-0",
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.10",
"@principalstudio/html-webpack-inject-preload": "^1.2.7",
"@saithodev/semantic-release-gitea": "^2.1.0",
"@semantic-release/exec": "^6.0.3",
"@svgr/webpack": "^8.1.0",
"@swc/plugin-transform-imports": "^1.5.108",
"@types/archiver": "^5.3.1",
"@types/argparse": "^2.0.10",
"@types/autosuggest-highlight": "^3.2.0",
"@types/babel__code-frame": "^7.0.3",
"@types/d3": "^7.4.0",
"@types/d3-array": "^3.0.4",
"@types/d3-contour": "^3.0.2",
"@types/d3-force": "^3.0.4",
"@types/geojson": "^7946.0.10",
"@types/hammerjs": "^2.0.40",
"@types/humanize-duration": "^3.27.1",
"@types/lodash-es": "^4.17.12",
"@types/luxon": "^3.3.0",
"@types/node-fetch": "^2.6.2",
"@types/node-gzip": "^1.1.0",
"@types/react": "17.0.59",
"@types/react-beautiful-dnd": "^13.1.4",
"@types/react-dom": "17.0.19",
"@types/react-grid-layout": "1.1.1",
"@types/react-router-dom": "^5.1.8",
"@types/react-swipeable-views": "^0.13.1",
"@types/react-transition-group": "^4.4.6",
"@types/seedrandom": "2.4.28",
"@types/semver": "^7.5.0",
"@types/serialize-javascript": "^5.0.2",
"@types/supercluster": "^7.1.0",
"@types/three": "^0.160.0",
"@types/ttf2woff": "^2.0.2",
"@types/ttf2woff2": "^2.0.0",
"@types/uuid": "^9.0.2",
"@types/webpack-bundle-analyzer": "^4.4.1",
"@webpack-cli/init": "^1.1.3",
"archiver": "^5.3.1",
"argparse": "^2.0.1",
"babel-loader": "8.2.5",
"clean-webpack-plugin": "4.0.0",
"conventional-changelog-conventionalcommits": "^7.0.2",
"copy-webpack-plugin": "10.2.4",
"cross-env": "^7.0.3",
"css-loader": "6.7.1",
"del-cli": "3.0.1",
"eslint": "^8.56.0",
"eslint-plugin-jsx-a11y": "^6.8.0",
"eslint-plugin-react": "^7.34.1",
"eslint-plugin-react-hooks": "^4.6.2",
"eslint-plugin-unicorn": "^52.0.0",
"fast-circular-dependency-plugin": "^5.4.0",
"fork-ts-checker-webpack-plugin": "8.0.0",
"generate-json-webpack-plugin": "2.0.0",
"generate-license-file": "^3.0.1",
"html-loader": "^2.1.2",
"html-webpack-exclude-assets-plugin": "^0.0.7",
"html-webpack-plugin": "^5.3.2",
"html-webpack-tags-plugin": "3.0.1",
"http-proxy-middleware": "^2.0.6",
"jsonc-loader": "^0.1.1",
"merge-jsons-webpack-plugin": "^2.0.1",
"mini-css-extract-plugin": "^2.6.0",
"node-asana-api": "^1.0.0",
"node-gitea-api": "^1.20.2-1",
"node-gzip": "^1.1.2",
"patch-package": "^6.4.7",
"react-markdown": "^8.0.2",
"rehype-raw": "^6.1.1",
"remark-cli": "^10.0.1",
"remark-embed-images": "^3.1.0",
"remark-unwrap-images": "^3.0.1",
"responsive-loader": "^3.1.2",
"semantic-release": "^19.0.5",
"serialize-javascript": "^6.0.0",
"sharp": "^0.33.5",
"source-map-loader": "^3.0.0",
"string-replace-loader": "^3.1.0",
"style-loader": "2.0.0",
"swc-loader": "^0.2.3",
"thread-loader": "^3.0.4",
"ts-node": "10.9.2",
"tsconfig-paths": "^3.11.0",
"ttf2woff": "^3.0.0",
"ttf2woff2": "^5.0.0",
"typescript": "5.6.3",
"typescript-eslint": "^7.14.1",
"util": "^0.12.4",
"webpack": "5.86.0",
"webpack-bundle-analyzer": "4.5.0",
"webpack-cli": "4.9.2",
"webpack-dev-server": "4.13.2",
"webpack-preprocessor-loader": "^1.3.0",
"webpack-react-component-name": "^5.0.5",
"zod-to-json-schema": "3.22.4"
}
}
The output is always the same, but I'm not sure how things are sorted anymore in the file.