-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
fix(config): improved warning when root path includes bad characters #15761
Conversation
Previously a warning was only issued when the root path included the `#` character, but the `?` character is equally bad.
|
This is pretty much a dummy commit to get the CI checks to run again. The previous one failed, I would say, intermittently and unrelated to any code changes.
I can't see that the failing test on Windows has anything to do with this PR?
|
Build&Test broke on Windows with the following error: ``` jq: error: syntax error, unexpected INVALID_CHARACTER (Windows cmd shell quoting issues?) at <top-level>, line 1: .[0].devDependencies[\"playwright-chromium\"].version ``` Seems strange this would break now since the escaped quotes had been there for at least 14 months.
Well, that was something unrelated, which I seem to have fixed. |
So, how does this error happen?
There seems to be some intermittent errors occuring in the test suite overall. I get this intermittently when running the test suite locally:
|
$env:PLAYWRIGHT_VERSION="$(pnpm ls --depth 0 --json -w playwright-chromium | jq --raw-output '.[0].devDependencies[\"playwright-chromium\"].version')" | ||
$env:PLAYWRIGHT_VERSION="$(pnpm ls --depth 0 --json -w playwright-chromium | jq --raw-output '.[0].devDependencies["playwright-chromium"].version')" |
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 for fixing this! The issue has been haunting us in CI for many weeks now.
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.
Oh, nice!
const logger = createLogger('info') | ||
logger.warn = (str) => { | ||
expect(normalizeString(str)).toEqual( | ||
'The project root contains the "?" character (/inc?udes), which may ' + |
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 we may be introducing to many, too specific, tests here for this feature. I would be ok with a single one and to have a includes instead of equal test so we avoid having to maintain all this in sync if we later change the wording.
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.
Agree 👍 I moved this as a unit test with only a single.
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.
ok, let's merge it so we can unblock CI for others
Previously a warning was only issued when the root path included the
#
character, but the?
character is equally bad.Description
This should fix #15726.
Root paths can not include the
#
nor the?
character. ESM is using URLs to resolve imports, and in an URL what follows those characters is not part of the path.Additional context
I saw there's another PR for this (#15755), but this PR is a bit more elaborative and includes some tests as well.
What is the purpose of this pull request?
I would consider it an overall improvement.
Before submitting the PR, please make sure you do the following
fixes #123
).