Skip to content

Conversation

@lishaduck
Copy link
Contributor

Fixes #1432.

I think it'd make more sense to use files instead here, but πŸ€·β€β™‚οΈ

@lishaduck
Copy link
Contributor Author

lishaduck commented Jul 29, 2025

Updated attw output:

eslint-plugin-jsdoc v1.0.0

Build tools:
- [email protected]

πŸ‘Ί Import resolved to an ESM type declaration file, but a CommonJS JavaScript file. https://github.com/arethetypeswrong/arethetypeswrong.github.io/blob/main/docs/problems/FalseESM.md

πŸ’€ Import failed to resolve to type declarations or JavaScript files. https://github.com/arethetypeswrong/arethetypeswrong.github.io/blob/main/docs/problems/NoResolution.md

⚠️ A require call resolved to an ESM JavaScript file, which is an error in Node and some bundlers. CommonJS consumers will need to use
 a dynamic import. https://github.com/arethetypeswrong/arethetypeswrong.github.io/blob/main/docs/problems/CJSResolvesToESM.md

πŸ₯΄  Import found in a type declaration file failed to resolve. Either this indicates that runtime resolution errors will occur, or (mor
e likely) the types misrepresent the contents of the JavaScript files. Use -f json to see the imports that failed to resolve. https://github.com/arethetypeswrong/arethetypeswrong.github.io/blob/main/docs/problems/InternalResolutionError.md

🀨 CommonJS module simulates a default export with exports.default and exports.__esModule, but does not also set module.exports for compatibility with Node. Node, and some bundlers under certain conditions, do not respect the __esModule marker, so accessing the intended default export will require a .default property access on the default import. https://github.com/arethetypeswrong/arethetypeswrong.github.io/blob/main/docs/problems/CJSOnlyExportsDefault.md


"eslint-plugin-jsdoc"

node10: 🟒
node16 (from CJS): πŸ‘Ί Masquerading as ESM
node16 (from ESM): 🟒 (ESM)
bundler: 🟒

***********************************

"eslint-plugin-jsdoc/getJsdocProcessorPlugin.js"

node10: πŸ’€ Resolution failed
node16 (from CJS): ⚠️ ESM (dynamic import only)
node16 (from ESM): πŸ‘Ί Masquerading as ESM
bundler: 🟒

***********************************

"eslint-plugin-jsdoc/iterateJsdoc.js"

node10: πŸ’€ Resolution failed
node16 (from CJS): ⚠️ ESM (dynamic import only)
πŸ₯΄ Internal resolution error
node16 (from ESM): πŸ₯΄ Internal resolution error
πŸ‘Ί Masquerading as ESM
bundler: 🀨 CJS default export
πŸ₯΄ Internal resolution error

***********************************

I'd be happy to move it to tsdown or zshy, but I'm not going to refactor all of the package's tooling without prior agreement.

@brettz9
Copy link
Collaborator

brettz9 commented Jul 29, 2025

As I recall, where files is present, referencing a GitHub fork as a package.json dependency had problems as the desired files weren't present. In any case, I'd like to keep it as is for now.

Re: tsdown or zshy, how bad are the diffs expected to be?

@brettz9 brettz9 merged commit da66683 into gajus:main Jul 29, 2025
4 checks passed
@github-actions
Copy link

πŸŽ‰ This PR is included in version 52.0.1 πŸŽ‰

The release is available on:

Your semantic-release bot πŸ“¦πŸš€

@lishaduck lishaduck deleted the dts branch July 29, 2025 21:59
@lishaduck
Copy link
Contributor Author

As I recall, where files is present, referencing a GitHub fork as a package.json dependency had problems as the desired files weren't present. In any case, I'd like to keep it as is for now.

Makes sense πŸ‘
(although, that is what pkg.pr.new is for...)

Re: tsdown or zshy, how bad are the diffs expected to be?

Not awful?
Shouldn't require too many (any?) changes to src/, just the dist/ & associated configs.

@brettz9
Copy link
Collaborator

brettz9 commented Jul 29, 2025

Re: tsdown or zshy, how bad are the diffs expected to be?

Not awful? Shouldn't require too many (any?) changes to src/, just the dist/ & associated configs.

If it can improve our TS output without switching to TS source (like #1223), that'd be great.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Publish dts for the other entrypoints?

2 participants