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

Windows special character parsing bug #283

Closed
philsturgeon opened this issue Oct 12, 2022 · 5 comments
Closed

Windows special character parsing bug #283

philsturgeon opened this issue Oct 12, 2022 · 5 comments

Comments

@philsturgeon
Copy link
Member

The test suite is failing on windows for node v14 and we need to get that working before we can release a new version.

Run npm run coverage:node

> @apidevtools/[email protected] coverage:node D:\a\json-schema-ref-parser\json-schema-ref-parser
> nyc node_modules/mocha/bin/mocha



  File names with special characters
    1) should parse successfully


  0 passing (47ms)
  1 failing

  1) File names with special characters
       should parse successfully:
     TypeError [ERR_INVALID_URL]: Invalid URL: specs/__(%7B%5B%20%25%20&%20$%20%23%20@%20%60%20~%20,)%7D%5D__/__(%7B%5B%20%25%20&%20$%20%23%20@%20%60%20~%20,)%7D%5D__.yaml
      at new NodeError (internal/errors.js:322:7)
      at onParseError (internal/url.js:270:9)
      at new URL (internal/url.js:346:5)
      at Object.resolve (lib\util\url.js:8:137)
      at $RefParser.parse (lib\index.js:46:39)
      at Context.<anonymous> (test\specs\__({[ % & $ # @ ` ~ ,)}]__\special-characters.spec.js:13:33)
      at processImmediate (internal/timers.js:464:21)

Originally posted by @philsturgeon in #280 (comment)

@wparad
Copy link
Contributor

wparad commented Oct 27, 2022

I'm no windows expert, but I tried to repro the bug and I couldn't do it. What stack are you using? windows subsystem? git bash through mingw via git for windows or something else?

@danielfcollier
Copy link
Contributor

@wparad, that's odd. I've run on Windows 10, and Node.js 14, then got the errors. I've opened this PR #286 to fix this bug, but there are some skipped problems on Windows. On Linux (Fedora), it works without any bugs.

@wparad
Copy link
Contributor

wparad commented Oct 27, 2022

@wparad, that's odd. I've run on Windows 10, and Node.js 14, then got the errors. I've opened this PR #286 to fix this bug, but there are some skipped problems on Windows. On Linux (Fedora), it works without any bugs.

Stack is important, are you using cmd? how did you install node, etc... etc... For instance I explicitly tried on nodejs 14 installed through nvm on git bash using git for windows. But that doesn't really matter now if you've figured out how to repro the problem.

@danielfcollier
Copy link
Contributor

Simple Windows 10 setup, VSCode installed, Node.js v14, Git Bash, and terminal with Power Shell (built-in). I'm not a Windows developer, but this is the setup that I used on a VM with Fedora 36.

@philsturgeon
Copy link
Member Author

Closed by #286.

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

3 participants