Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce v4 dependency tree #172

Closed
avaly opened this issue Jan 15, 2025 · 4 comments · Fixed by #173 or #174
Closed

Reduce v4 dependency tree #172

avaly opened this issue Jan 15, 2025 · 4 comments · Fixed by #173 or #174

Comments

@avaly
Copy link

avaly commented Jan 15, 2025

We're using node-vibrant in a node.js project. During the upgrade from v3 to v4 we saw a huge number of dependencies added to our lockfile (2500 lines added in yarn.lock). Upon inspecting why there are so many packages added, we identified the source of those being @vibrant/generator-default which has a dependency on vite.

vite brings in a ton of packages: esbuild, rollup, less, sass, etc. Those packages are suited for a development front-end tool. We're using vibrant in a node.js environment. All these packages (since they're production dependencies), are added in our Docker image thus increasing its size unnecessarily.

Please reduce the dependency tree or provide a slim node only variant of the package.

@crutchcorn
Copy link
Member

Thank you for raising! This was a mistake on my end. Fixing now

@crutchcorn
Copy link
Member

@avaly please test against 4.0.2 and let me know if this has solved the problem for you 😊

@avaly
Copy link
Author

avaly commented Jan 15, 2025

While vite & most of esbuild & vite packages have been removed from v4.0.2, I still think all these new packages are not supposed to be added (e.g. @microsoft/api-extractor, @vue/compiler-dom, typedoc*, @typescript-eslint/*, @tanstack/config):

Full list of packages added
$ git diff -U0 | grep "+\""
+"@babel/parser@npm:^7.25.3":
+"@babel/types@npm:^7.26.5":
+"@commitlint/parse@npm:^19.5.0":
+"@commitlint/types@npm:^19.5.0":
+"@eslint-community/eslint-utils@npm:^4.1.2, @eslint-community/eslint-utils@npm:^4.4.1":
+"@eslint-community/regexpp@npm:^4.11.0":
+"@eslint/js@npm:^9.18.0":
+"@gerrit0/mini-shiki@npm:^1.24.0":
+"@jimp/bmp@npm:^0.22.12":
+"@jimp/core@npm:^0.22.12":
+"@jimp/custom@npm:^0.22.12":
+"@jimp/gif@npm:^0.22.12":
+"@jimp/jpeg@npm:^0.22.12":
+"@jimp/plugin-resize@npm:^0.22.12":
+"@jimp/png@npm:^0.22.12":
+"@jimp/tiff@npm:^0.22.12":
+"@jimp/types@npm:^0.22.12":
+"@jimp/utils@npm:^0.22.12":
+"@jridgewell/sourcemap-codec@npm:^1.5.0":
+"@microsoft/api-extractor-model@npm:7.29.4":
+"@microsoft/api-extractor@npm:7.47.4":
+"@microsoft/tsdoc-config@npm:~0.17.0":
+"@microsoft/tsdoc@npm:0.15.1, @microsoft/tsdoc@npm:~0.15.0":
+"@rollup/pluginutils@npm:^5.1.0":
+"@rushstack/node-core-library@npm:5.5.1":
+"@rushstack/rig-package@npm:0.5.3":
+"@rushstack/terminal@npm:0.13.3":
+"@rushstack/ts-command-line@npm:4.22.3":
+"@shikijs/engine-oniguruma@npm:^1.27.0":
+"@shikijs/types@npm:1.27.2, @shikijs/types@npm:^1.27.0":
+"@shikijs/vscode-textmate@npm:^10.0.1":
+"@stylistic/eslint-plugin-js@npm:^2.13.0":
+"@tanstack/config@npm:^0.15.0":
+"@types/argparse@npm:1.0.38":
+"@types/conventional-commits-parser@npm:^5.0.0":
+"@types/doctrine@npm:^0.0.9":
+"@types/estree@npm:^1.0.0":
+"@types/hast@npm:^3.0.4":
+"@types/lodash@npm:4.17.14":
+"@types/node@npm:^18.15.3":
+"@types/unist@npm:*":
+"@typescript-eslint/eslint-plugin@npm:8.20.0":
+"@typescript-eslint/parser@npm:8.20.0":
+"@typescript-eslint/scope-manager@npm:8.20.0, @typescript-eslint/scope-manager@npm:^8.1.0":
+"@typescript-eslint/type-utils@npm:8.20.0":
+"@typescript-eslint/types@npm:8.20.0":
+"@typescript-eslint/typescript-estree@npm:8.19.0":
+"@typescript-eslint/typescript-estree@npm:8.20.0":
+"@typescript-eslint/utils@npm:8.19.0, @typescript-eslint/utils@npm:^6.0.0 || ^7.0.0 || ^8.0.0, @typescript-eslint/utils@npm:^8.0.0":
+"@typescript-eslint/utils@npm:8.20.0, @typescript-eslint/utils@npm:^8.1.0":
+"@typescript-eslint/visitor-keys@npm:8.19.0":
+"@typescript-eslint/visitor-keys@npm:8.20.0":
+"@ungap/structured-clone@npm:^1.2.0":
+"@vibrant/color@npm:^4.0.0":
+"@vibrant/core@npm:^4.0.0":
+"@vibrant/generator-default@npm:^4.0.2":
+"@vibrant/generator@npm:^4.0.0":
+"@vibrant/image-browser@npm:^4.0.0":
+"@vibrant/image-node@npm:^4.0.0":
+"@vibrant/image@npm:^4.0.0":
+"@vibrant/quantizer-mmcq@npm:^4.0.0":
+"@vibrant/quantizer@npm:^4.0.0":
+"@vibrant/types@npm:^4.0.0":
+"@vibrant/worker@npm:^4.0.0":
+"@volar/language-core@npm:2.4.11, @volar/language-core@npm:~2.4.0-alpha.18":
+"@volar/source-map@npm:2.4.11":
+"@volar/typescript@npm:^2.3.4, @volar/typescript@npm:~2.4.0-alpha.18":
+"@vue/compiler-core@npm:3.5.13":
+"@vue/compiler-dom@npm:^3.4.0":
+"@vue/compiler-vue2@npm:^2.7.16":
+"@vue/language-core@npm:2.0.29":
+"@vue/shared@npm:3.5.13, @vue/shared@npm:^3.4.0":
+"acorn@npm:^8.14.0":
+"ajv-draft-04@npm:^1.0.0, ajv-draft-04@npm:~1.0.0":
+"ajv-formats@npm:^3.0.1, ajv-formats@npm:~3.0.1":
+"ajv@npm:~8.12.0":
+"ajv@npm:~8.13.0":
+"argparse@npm:^1.0.7, argparse@npm:~1.0.9":
+"array-each@npm:^1.0.1":
+"array-slice@npm:^1.0.0":
+"commander@npm:13.0.0, commander@npm:^13.0.0":
+"compare-versions@npm:^6.1.1":
+"computeds@npm:^0.0.1":
+"confbox@npm:^0.1.8":
+"de-indent@npm:^1.0.2":
+"debug@npm:4, debug@npm:^4, debug@npm:^4.0.0, debug@npm:^4.1.0, debug@npm:^4.1.1, debug@npm:^4.3.1, debug@npm:^4.3.2, debug@npm:^4.3.4, debug@npm:^4.3.5, debug@npm:^4.3.6, debug@npm:~4.4.0":
+"enhanced-resolve@npm:^5.17.1":
+"entities@npm:^4.4.0, entities@npm:^4.5.0":
+"esbuild-register@npm:^3.6.0":
+"eslint-compat-utils@npm:^0.5.1":
+"eslint-plugin-es-x@npm:^7.8.0":
+"eslint-plugin-import-x@npm:^4.6.1":
+"eslint-plugin-n@npm:^17.15.1":
+"eslint-scope@npm:^7.1.1, eslint-scope@npm:^7.2.2":
+"espree@npm:^10.3.0":
+"espree@npm:^9.0.0, espree@npm:^9.3.1, espree@npm:^9.6.0, espree@npm:^9.6.1":
+"estree-walker@npm:^2.0.2":
+"findup-sync@npm:^5.0.0":
+"fined@npm:^2.0.0":
+"flagged-respawn@npm:^2.0.0":
+"for-in@npm:^1.0.1":
+"for-own@npm:^1.0.0":
+"fs-extra@npm:~7.0.1":
+"get-tsconfig@npm:^4.7.3, get-tsconfig@npm:^4.8.1":
+"gifwrap@npm:^0.10.1":
+"globals@npm:^15.11.0, globals@npm:^15.14.0":
+"globrex@npm:^0.1.2":
+"graceful-fs@npm:^4.1.2, graceful-fs@npm:^4.1.6, graceful-fs@npm:^4.2.0, graceful-fs@npm:^4.2.4, graceful-fs@npm:^4.2.6, graceful-fs@npm:^4.2.9":
+"he@npm:^1.2.0":
+"ignore@npm:^5.0.4, ignore@npm:^5.1.8, ignore@npm:^5.2.0, ignore@npm:^5.2.4, ignore@npm:^5.3.1, ignore@npm:^5.3.2":
+"import-lazy@npm:~4.0.0":
+"interpret@npm:^3.1.1":
+"is-core-module@npm:^2.16.0":
+"is-plain-object@npm:^5.0.0":
+"isobject@npm:^3.0.0, isobject@npm:^3.0.1":
+"isomorphic-fetch@npm:>=3.0.0, isomorphic-fetch@npm:^3.0.0":
+"jju@npm:~1.4.0":
+"jpeg-js@npm:^0.4.4":
+"jsonfile@npm:^6.0.1, jsonfile@npm:^6.1.0":
+"kolorist@npm:^1.8.0":
+"liftoff@npm:^5.0.0":
+"linkify-it@npm:^5.0.0":
+"local-pkg@npm:^0.5.0":
+"magic-string@npm:^0.30.11, magic-string@npm:^0.30.5":
+"markdown-it@npm:^14.1.0":
+"mdurl@npm:^2.0.0":
+"mime@npm:1.6.0":
+"minimatch@npm:^9.0.1, minimatch@npm:^9.0.3, minimatch@npm:^9.0.4, minimatch@npm:^9.0.5":
+"minimatch@npm:~3.0.3":
+"minimist@npm:^1.2.0, minimist@npm:^1.2.5, minimist@npm:^1.2.6, minimist@npm:^1.2.8, minimist@npm:~1.2.8":
+"mkdirp@npm:^0.5.4":
+"mlly@npm:^1.7.3, mlly@npm:^1.7.4":
+"muggle-string@npm:^0.4.1":
+"node-vibrant@npm:4.0.2":
+"object.defaults@npm:^1.1.0":
+"object.pick@npm:^1.3.0":
+"pako@npm:^1.0.11":
+"pathe@npm:^2.0.1":
+"pkg-types@npm:^1.2.1, pkg-types@npm:^1.3.0":
+"pngjs@npm:^3.0.0":
+"pngjs@npm:^6.0.0":
+"punycode.js@npm:^2.3.1":
+"qs@npm:6.13.0, qs@npm:^6.11.0, qs@npm:^6.7.0":
+"rechoir@npm:^0.8.0":
+"resolve-pkg-maps@npm:^1.0.0":
+"resolve@npm:~1.22.1, resolve@npm:~1.22.2":
+"resolve@patch:resolve@npm%3A~1.22.1#optional!builtin<compat/resolve>, resolve@patch:resolve@npm%3A~1.22.2#optional!builtin<compat/resolve>":
+"rollup-plugin-preserve-directives@npm:^0.4.0":
+"semver@npm:7.6.3, semver@npm:^7.3.2, semver@npm:^7.3.4, semver@npm:^7.3.5, semver@npm:^7.3.6, semver@npm:^7.5.2, semver@npm:^7.5.3, semver@npm:^7.5.4, semver@npm:^7.6.0, semver@npm:^7.6.3":
+"semver@npm:~7.5.4":
+"simple-git@npm:3.27.0, simple-git@npm:^3.27.0":
+"source-map@npm:^0.6.0, source-map@npm:^0.6.1, source-map@npm:~0.6.1":
+"stable-hash@npm:^0.0.4":
+"string-argv@npm:~0.3.1, string-argv@npm:~0.3.2":
+"strip-json-comments@npm:3.1.1, strip-json-comments@npm:^3.1.1, strip-json-comments@npm:~3.1.1":
+"supports-color@npm:^8.0.0, supports-color@npm:~8.1.1":
+"tapable@npm:^2.2.0":
+"tinycolor2@npm:1.6.0, tinycolor2@npm:^1.6.0":
+"ts-api-utils@npm:^2.0.0":
+"tsconfck@npm:^3.0.3":
+"typedoc-plugin-frontmatter@npm:^1.1.2":
+"typedoc-plugin-markdown@npm:^4.4.1":
+"typedoc@npm:^0.27.6":
+"typescript-eslint@npm:^8.19.1":
+"typescript@npm:5.4.2":
+"typescript@patch:typescript@npm%3A5.4.2#optional!builtin<compat/typescript>":
+"uc.micro@npm:^2.0.0, uc.micro@npm:^2.1.0":
+"ufo@npm:^1.5.4":
+"uri-js@npm:^4.2.2, uri-js@npm:^4.4.1":
+"utif2@npm:^4.0.1":
+"v8flags@npm:^4.0.1":
+"vite-plugin-dts@npm:4.0.3":
+"vite-plugin-externalize-deps@npm:^0.8.0":
+"vite-tsconfig-paths@npm:^5.1.4":
+"vscode-uri@npm:^3.0.8":
+"vue-eslint-parser@npm:^9.4.3":
+"vue-tsc@npm:2.0.29":
+"yaml@npm:2.7.0, yaml@npm:^2.3.1, yaml@npm:^2.3.4, yaml@npm:^2.6.0, yaml@npm:^2.6.1":

PS: Please re-open this issue until these are also addressed.

@crutchcorn
Copy link
Member

Should be fixed in 4.0.3.

PS: Please make a new issue should anything else arise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants