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] TanStack/query #88

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

[module-detection] TanStack/query #88

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

Comments

@0xdevalias
Copy link

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

Overview

  • https://github.com/TanStack/query
    • Powerful asynchronous state management, server-state utilities and data fetching for the web. TS/JS, React Query, Solid Query, Svelte Query and Vue Query.

    • Hooks for fetching, caching and updating asynchronous data in React, Solid, Svelte and Vue

Code

Unminifying this source (Ref), module-24396.js/module-55659.js/module-57457.js/etc:

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

Searching for some of the symbols from module-55659.js/module-57457.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 24396.svg stage3-unminified/pages/_app/module-24396.js

24396

(blue has dependencies, green doesn't)

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

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

{
  "module-1371.js": [
    "module-53729.js"
  ],
  "module-16456.js": [],
  "module-24396.js": [
    "module-16456.js",
    "module-55659.js",
    "module-57457.js"
  ],
  "module-28189.js": [],
  "module-28197.js": [],
  "module-31178.js": [],
  "module-35448.js": [],
  "module-36665.js": [],
  "module-37540.js": [
    "module-16456.js",
    "module-28197.js"
  ],
  "module-53729.js": [],
  "module-55659.js": [
    "module-1371.js",
    "module-28189.js",
    "module-35448.js",
    "module-36665.js",
    "module-59463.js",
    "module-67531.js",
    "module-84427.js"
  ],
  "module-57457.js": [
    "module-16456.js",
    "module-28197.js",
    "module-84427.js",
    "module-94402.js",
    "module-99475.js"
  ],
  "module-59463.js": [],
  "module-67531.js": [
    "module-31178.js"
  ],
  "module-84427.js": [
    "module-16456.js"
  ],
  "module-94402.js": [
    "module-16456.js",
    "module-37540.js",
    "module-99475.js"
  ],
  "module-99475.js": [
    "module-16456.js",
    "module-28197.js"
  ]
}
@pionxzh pionxzh mentioned this issue Dec 24, 2023
8 tasks
@pionxzh pionxzh added the enhancement New feature or request label Dec 24, 2023
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