Repository navigation
Conversation
This test was not written properly, causing persistent changes to the process.platform which was breaking other tests. It was also not testing "darwin" properly. Change the code to properly restore the process.platform when it's finished, as well as testing "darwin". Remove the filepath comparison when testing non-Windows behavior, where the filepath is used as-is. Also update required rimraf usage for globs. Closes: typeorm#11272
The build was not working with the current rimraf package. Newer usage requires setting the `glob` option to use globs in the file path, otherwise you get an error with glob patterns. Update rimraf calls to have the glob option set.
If the test ormconfig uses a port other than the default 3306 for mysql/mariadb, this test won't work. Apply the correct port from the connectionOptions.
This test was setting the executable flag on the cli.js file and then running it. That doesn't work on Windows. Improve cross-platform build support. Change the cliPath to use `node`. Remove the `chmod` code as that is not necessary if calling node directly. Change fs.rmdir to fs.rm (other is deprecated).
This test was failing if your timezone was west of UTC. Add the current timezone offset to the date being checked.
|
possible duplicate of #11257 upd: looks like you are fixing several issues at once, I think we should either accumulate the changes in this PR or split this PR into multiple PRs, I'll look at the related issues and and review this PR. |
|
I think that the approach for Everything else looks fine. |
|
Thanks for the feedback. Admittedly I didn't do a very thorough search for duplicates of these fixes. I'm a bit of a foreigner to this area and I'm fine with any conventions in place to merge/split fixes (not sure if a merge commit is used or not either). I agree that touching process.platform is a bit iffy - the only upside is that it will increase test coverage |
alumni
left a comment
There was a problem hiding this comment.
Some of these were already fixed, would be great to update the branch and see what's left.
| } | ||
|
|
||
| await Promise.all([chmodCli(), copyPackageJson()]) | ||
| await Promise.all([copyPackageJson()]) |
There was a problem hiding this comment.
await copyPackageJson() is enough, no need to wrap it in Promise.all.
|
Yeah, looks like most of the fixes were introduced by other PRs. |
|
@mukunda- do you want to continue this, or someone else should take over? |
Description of change
While trying to build and test #11271, I ran into a handful of issues. This PR contains a list of commits to get the build process working on Windows, as well as some other fixes in the tests.
See the commit details for each one for additional info. Brief summary:
process.platformsetting for later tests. Also incorrect test logic. Broken test case for filepathToName #11272Only one of these fixes has a corresponding issue opened.
Fixes #11272
Pull-Request Checklist
masterbranchnpm run formatto apply prettier formattingnpm run testpasses with this changeFixes #0000