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

fix: remove source code for GraphQLESTreeNode #17

Merged
merged 3 commits into from
Jun 10, 2024

Conversation

haifeng-li-at-salesforce
Copy link
Collaborator

Remove the source code file 'GraphQLESTreeNode'

@haifeng-li-at-salesforce haifeng-li-at-salesforce changed the title fix: avoid source code for GraphQLESTreeNode fix: remove source code for GraphQLESTreeNode Jun 7, 2024
"paths": {
/* TS complains not about to infer GraphQLESTreeNode */
"@graphql-eslint/eslint-plugin/estree-converter/*": [
"./node_modules/@graphql-eslint/eslint-plugin/cjs/estree-converter/*"
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like to point it out that using 'esm' instead of 'cjs' would not work. It would complain 'Could not find a declaration file'

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

look around bit more, lwc_mobile's "type" is "commonjs". graphql-eslint package.json has below.

"main": "cjs/index.js",  // for common.js
 "module": "esm/index.js",// for esm. 

commonjs consumer looks for commonjs dependency.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, that was my intuition too. But this is a great start! I going to poke around a bit on my own with regards to our overall project configuration. I wish it wasn't quite so tenuous to configure TypeScript projects. 🙄

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I.e. I'm not sure if we need to be a "commonjs" type of project, vs. reconfiguring our transpilation and/or packaging. If I look at ten different projects, I see ten different approaches to project configurations for issues like these. I imagine someday I'm going to have to work myself from the ground floor of the ECMAScript and modules spec, up through TypeScript specs and consumption, to module bundlers, to fully grasp how this is all supposed to work. 😭

Copy link
Collaborator

@ben-zhang-at-salesforce ben-zhang-at-salesforce left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good! very elegant way solve the types issue.
Wes used similar pattern in lds-lightning-platform 3 years ago

@haifeng-li-at-salesforce haifeng-li-at-salesforce merged commit 97a617f into main Jun 10, 2024
17 checks passed
@haifeng-li-at-salesforce haifeng-li-at-salesforce deleted the typeChange branch June 17, 2024 19:02
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

3 participants