-
Notifications
You must be signed in to change notification settings - Fork 26
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: enable running on Windows #89
Conversation
Thank you for submitting this! @giltayar can you take a look? |
i apparently had the power to rebase it! |
If you are willing to make node v14 the minimum engine, then the non-windows compatible I ran with this in the
However, as I said earlier, |
Yeah, totally ok with that. That's what the matrix already does
Sorry, I totally missed that. Hmm |
I went back to specifying relative paths in teenytest\lib\prepare\modules\load.js to verify windows was working and this appears to need more work. Setting to draft. Sorry about that. Edit: |
Initial testing shows positive results changing this line to:
may resolve the teenytest issue by 'require'ing relative to the loading file. |
`import` on Windows requires using the `file://` url. This can be used on all platforms for absolute paths. `hackErrorStackToGetCallerFile()` returns a pathname which includes a leading '/'. This must be removed on Windows for `path.resolve` but added back along with converting '\' to '/' for the import path. In other words, the code must handle multiple forms of paths. Signed-off-by: Chris. Webster <chris@webstech.net>
PR #92 has been opened for this, It is competing with PR #91 but rebasing should not be an issue. |
import
on Windows requires using thefile://
url. This can be used on all platforms for absolute paths.hackErrorStackToGetCallerFile()
returns a pathname which includes a leading '/'. This must be removed on Windows forpath.resolve
but added back along with converting '\' to '/' for the import path.This is to support the CI run of semantic-release v20 which uses
testdouble
. There are a couple of PRs for that project for Windows support as well. The CI runs under Windows with these changes and the other changes.The tests have been run under Windows wsl. The
esm
andno-loader-esm
tests fail on native Windows due toteenytest
issues with Windows. The remaining tests run on Windows.