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

feat: analyze node modules #129

Closed
wants to merge 1 commit into from
Closed

Conversation

thepassle
Copy link
Member

No description provided.

@netlify
Copy link

netlify bot commented Oct 5, 2021

✔️ Deploy Preview for custom-elements-manifest-analyzer ready!

🔨 Explore the source changes: fed4221

🔍 Inspect the deploy log: https://app.netlify.com/sites/custom-elements-manifest-analyzer/deploys/615c91668fc8ef0007e1c3eb

😎 Browse the preview: https://deploy-preview-129--custom-elements-manifest-analyzer.netlify.app

@thepassle
Copy link
Member Author

closes #123

@thepassle
Copy link
Member Author

TODO:
Some considerations as brought up in #130:
Getting the CEM from a third-party module is hard. We either have to analyze stuff in node_modules/, which may be minified code, or built code (TS) in which case we may lose type information/completeness of the CEM.

Alternatively, we could try to find the third-party's custom-elements-manifest.json file, which is also hard; if the third-party uses package exports, but doesnt list their CEM in the package exports, there's virtually no way for us to get it.

We could always try to see if the third party has a CEM (either by checking the package exports or see if they have a customElements field in the package.json), and if all else fails; analyze the package.

If a CEM does exist in the third party package, we have to merge two CEMs together:

  • Change filepaths of the third party package to where we found it (e.g.: node_modules/foo)
  • Apply inheritance
  • Remove anything from node_modules from the 'main' projects CEM

@thepassle
Copy link
Member Author

closing in favour of #142

@thepassle thepassle closed this Oct 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant