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

remove cwd option, or at least stop resolving entrypoint relative to it #1834

Open
Tracked by #1505
cspotcode opened this issue Jul 12, 2022 · 0 comments
Open
Tracked by #1505
Milestone

Comments

@cspotcode
Copy link
Collaborator

cspotcode commented Jul 12, 2022

Today, cwd affects resolution of the entrypoint so when you ts-node --cwd foo bar.ts then you run foo/bar.ts

Seems nice enough from a user perspective, but from a maintenance and compatibility perspective it gets hairy. Cuz what should happen when user code forks a child process in a different working directory, expecting the entrypoint for that child process to be resolved relative to that working directory.

#1814 (comment)

It's not clear we should even have a --cwd option. tsc and node do not. At the very least, it shouldn't be affecting the resolution of entrypoint scripts. That makes us incompatible with node and it's feature creep.

@cspotcode cspotcode added this to the v11 breaking changes milestone Jul 12, 2022
@cspotcode cspotcode changed the title remove (??) due to confusing behavior, to simplify, to reduce maintenance remove cwd option, or at least stop resolving entrypoint relative to it Jul 12, 2022
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

No branches or pull requests

1 participant