-
-
Notifications
You must be signed in to change notification settings - Fork 602
Migrate to ESM only #1430
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
Migrate to ESM only #1430
Conversation
Switches the package to be ESM only. In CJS projects, you can still `require("chokidar")` as long as you're on Node 20.x.
Three things:
|
|
|
|
we can't actually do the typescript test since chokidar itself can't be loaded that way all of our imports correctly reference if we wanted to run chokidar itself from typescript sources, we'd need to configure typescript to use though im not sure any of this matters to us. anyone can import chokidar fine right now in their own typescript executed directly through node. the only people who would want to run chokidar itself on the command line are probably us we could have a test that runs some typescript that imports chokidar, but what have we achieved by doing that? it just means importing chokidar works and we already know that |
that’s what I do in all noble repos. Jsbt is already prepared for it. It’s just an option in typescript |
Where would we be executing chokidar itself through node? Won't it always be imported? I know we can flip the flag in tsconfig. Just want to understand where we'd use it though Either way we probably should tackle it in a separate issue/pr |
Fixes #1429
cc @paulmillr
i ran it through arethetypeswrong and all seems to be good