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

Update esm-d-ts to generate .d.cts file / update dependencies #19

Merged
merged 6 commits into from
Oct 25, 2024

Conversation

typhonrt
Copy link
Contributor

@typhonrt typhonrt commented Oct 24, 2024

  • This update refreshes / grabs the latest esm-d-ts which has a new --emitCTS option to generate a duplicate output / .d.cts file to reference in package.json / require export ensuring that downstream Typescript projects that are configured for CJS work correctly.

  • Updated all dependencies / fresh lock file. PNPM apparently has this issue where pnpm up does not update peer dependencies. In this case creating a fresh lock file from the latest dependency update was necessary to get the most recent of TypeDoc installed which is a peer dependency of typedoc-pkg.

  • Updated export conditions in package.json to point to separate .d.cts file for the require export condition.

  • Regenerated docs (this accounts for the majority of files changed).

  • Update CI / dropping Node 16.x for automatic testing as vitest and possibly other dependencies require Node 18+. I added Node 22.x to the testing matrix and all is good.

@brettz9
Copy link
Contributor

brettz9 commented Oct 24, 2024

LGTM, thanks!

@brettz9
Copy link
Contributor

brettz9 commented Oct 24, 2024

Actually, one other to-do. Let's bump package.json engines to >=18 in this PR as well.

@typhonrt
Copy link
Contributor Author

typhonrt commented Oct 24, 2024

Will do this soon; usually unless the package being developed actually fails / requires that bump it wouldn't really be necessary. Sometimes it can be a pain when the basic dev tooling requires more recent versions when it comes to supporting the long tail. Even the latest Rollup / ESLint is v18+. jsdoccomment being tied into the ESLint ecosystem is where it makes the most sense for the bump.

@brettz9
Copy link
Contributor

brettz9 commented Oct 25, 2024

It's healthy I think on our part to have a bump anyways since it allows us not to be tied to older language features. (It also of course lets us avoid testing older versions.)

Actually, speaking of which, if you could also bump targets in .babelrc.json to 18 as well, we can also let Babel avoid the extra cruft which a lower target requires.

@typhonrt
Copy link
Contributor Author

As far as browserslist goes in package.json. Not sure how much that would affect any Babel build as that can have more affect over say PostCSS pipelines and such. I use "browserslist": [">5%", "not IE 11"] in my web related projects. Explicitly denying IE 11 is the important part; all of my efforts are ES2022+.

@brettz9
Copy link
Contributor

brettz9 commented Oct 25, 2024

Using defaults per https://browsersl.ist/#q=defaults doesn't include Explorer thankfully, but Opera Mini is really a feature-sparse browser so explicitly rejecting that (it is apparently still heavily used in Africa, however).

@brettz9 brettz9 merged commit 47c59a9 into es-joy:main Oct 25, 2024
9 checks passed
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.

2 participants