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

[module-detection] radix-ui/primitives #89

Open
Tracked by #41
0xdevalias opened this issue Dec 24, 2023 · 0 comments
Open
Tracked by #41

[module-detection] radix-ui/primitives #89

0xdevalias opened this issue Dec 24, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@0xdevalias
Copy link

0xdevalias commented Dec 24, 2023

This relates to the 'module-detection' feature described in the following issue:

Overview

Code

Unminifying this source (Ref), module-15838.js/etc:

Note: Not including the unminified examples here currently as the file is quite large

Searching for some of the symbols from module-15838.js on GitHub code search:

Of those results, these look the most promising:


Using the madge CLI/lib that I mentioned in another issue (Ref), I was able to automatically find/generate a graph of all of the module dependencies related to this.

I narrowed down on this by first creating a larger image of all the dependencies in a chunk/etc, finding something that looked like a lib like this, then running it again on that module.

Note also that I haven't manually checked through all of the modules mentioned here yet.

.madgerc
// See: https://github.com/pahen/madge#configuration
{
  "fileExtensions": ["js"],
  "detectiveOptions": {
    "es6": {
      "mixedImports": true,
      "skipTypeImports": true
    },
    "ts": {
      "mixedImports": true,
      "skipTypeImports": true
    }
  }
}
⇒ npx madge --image 15838.svg stage3-unminified/pages/_app/module-15838.js

15838

(blue has dependencies, green doesn't)

madge --json output
⇒ npm run-script madge:json stage3-unminified/pages/_app/module-15838.js

> chatgpt-source-watch@0.0.1 madge:json
> f() { MODULE_PATH="$1"; npx madge --json "$MODULE_PATH"; }; f stage3-unminified/pages/_app/module-15838.js

{
  "module-15838.js": [
    "module-36646.js",
    "module-37812.js",
    "module-45675.js",
    "module-49270.js",
    "module-63543.js",
    "module-70007.js",
    "module-72901.js",
    "module-74039.js",
    "module-7824.js",
    "module-86004.js",
    "module-88817.js",
    "module-9235.js",
    "module-94251.js"
  ],
  "module-36646.js": [],
  "module-37812.js": [
    "module-45675.js",
    "module-7824.js"
  ],
  "module-45675.js": [],
  "module-49270.js": [],
  "module-63543.js": [
    "module-36646.js",
    "module-45675.js",
    "module-49270.js",
    "module-7824.js",
    "module-79388.js",
    "module-82094.js",
    "module-9137.js"
  ],
  "module-70007.js": [
    "module-45675.js",
    "module-7824.js"
  ],
  "module-72901.js": [],
  "module-74039.js": [
    "module-45675.js",
    "module-49270.js",
    "module-72901.js",
    "module-7824.js",
    "module-9137.js"
  ],
  "module-7824.js": [
    "module-45675.js",
    "module-94251.js"
  ],
  "module-79388.js": [],
  "module-82094.js": [
    "module-79388.js"
  ],
  "module-86004.js": [
    "module-9137.js"
  ],
  "module-88817.js": [
    "module-79388.js"
  ],
  "module-9137.js": [],
  "module-9235.js": [
    "module-49270.js",
    "module-79388.js"
  ],
  "module-94251.js": [
    "module-45675.js",
    "module-49270.js"
  ]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants