web-infra-dev / rspack

The fast Rust-based web bundler with webpack-compatible API 🦀️
https://rspack.dev
MIT License
8.58k stars 503 forks source link

[Tracking]: Dependencies related governance [JS/pnpm] [Rust/Cargo] #7156

Open SoonIter opened 1 month ago

SoonIter commented 1 month ago

What subject does this issue tracking?

Summary

Since Rspack contains a large number of phantom dependency problems, which is not conducive to developers, we need to govern the dependencies in both js and Rust sides.

benefits

  1. more stable CI test and e2e results
  2. more readable dependencies relationship and easier to update the deps version
  3. this is a pre-task for https://github.com/web-infra-dev/rspack/pull/6323, better and simple dependencies graph will enhance the install speed
### Tasks
- [ ] https://github.com/web-infra-dev/rspack/pull/7094
- [ ] https://github.com/web-infra-dev/rspack/pull/7178
- [x] deprecated: ci: `.pnpm/node_modules/<MODULE>/node_modules/dep_name` Snapshot serializer
- [ ] https://github.com/web-infra-dev/rspack/pull/7130
- [ ] https://github.com/web-infra-dev/rspack/pull/6323
- [ ] #7208
- [ ] https://github.com/web-infra-dev/rspack/issues/7341
- [ ] #7403
- [ ] https://github.com/web-infra-dev/rspack/pull/7211
- [ ] https://github.com/web-infra-dev/rspack/pull/7235
- [ ] Update the strategy of renovate in JS side https://github.com/web-infra-dev/rspack/pull/6429
- [ ] Update the strategy of renovate in Rust side https://github.com/web-infra-dev/rspack/pull/6596
- [ ] Upgrade to pnpm9.5 to use "catelog:" protocol https://pnpm.io/catalogs (pending by renovate support https://github.com/renovatebot/renovate/issues/30079 ) https://github.com/web-infra-dev/rspack/pull/7065
SoonIter commented 1 month ago

:D It should be emphasized that we have a killer tool for phantom dependencies. https://github.com/chengcyber/scan-deps

https://github.com/web-infra-dev/rspack/pull/7178 npx scan-deps --directory alert,debug,meta,release,test --extension ts,jsx,tsx,cjs,mjs,js --debug

SoonIter commented 6 days ago

https://github.com/web-infra-dev/rspack/pull/7638#issuecomment-2301666065

For renovate configuration -> regularly update:

  1. "easy-merge-weekly-batch" group like patch or minor change of sass file-loader less-loader postcss-loader webpack etc

  2. "hard-merge-weekly-or-monthly-seperate" group like major version of swc sass-embed skykv rspack-resolver etc (the developer needs to change the API call manually) each pr is separated