-
Notifications
You must be signed in to change notification settings - Fork 26.2k
build(bazel): entry point file couldn't be resolved [ts-api-guardian] #25052
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
build(bazel): entry point file couldn't be resolved [ts-api-guardian] #25052
Conversation
* When using `ts-api-guardian` on Windows, the input file can't be found due to wrong normalized path delimiters.
const entrypoint = path.normalize(fileName); | ||
// Since the entry point will be compared with the source files from the TypeScript program, | ||
// the path needs to be normalized with forward slashes in order to work within Windows. | ||
const entrypoint = path.normalize(fileName).replace(/\\/g, '/'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or use canonical-path
😉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't want to introduce another dependency for something simple. Also I'd have preferred using ts.normalizePath
but that's apparently internal 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you can use path.posix.normaize
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thought that too, but unfortunately it doesn't work that way :/ (nodejs/node#12298)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!!
…angular#25052) * When using `ts-api-guardian` on Windows, the input file can't be found due to wrong normalized path delimiters. PR Close angular#25052
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
ts-api-guardian
on Windows, the input file can't be found due to wrong normalized path delimiters.PR Type
What kind of change does this PR introduce?
What is the current behavior?
Issue Number: N/A
What is the new behavior?
Does this PR introduce a breaking change?
Other information
cc. @alexeagle. Wasn't sure how to indicate that this affects ts-api-guardian, so I've added it as a suffix.