Open achou11 opened 1 year ago
looks like backend tests are failing due to upgrading Node version from 12 to 16. seems to be related to different streams behavior.
beforeAfterStream
tests, this test is failing:seems like the main reason is the result of this line:
In node 12, ok
is true
but in node 16, ok
is false
. seems like 16 actually has the behavior I would expect for this test's case.
upgrade-storage
tests are failing:I'm noticing that this listener in beforeAfterStream
is not being triggered as expected in node 16, causing the tests to fail I guess:
In both cases, I'm able to add a couple of lines to fix them, but they're very uninformed and while all of the backend tests pass as a result (locally), I still lack confidence.
Created a branch with these "fixes": https://github.com/digidem/mapeo-mobile/compare/1100/upgrade-nodejs-mobile-rn...ac/node-16-upgrade-backend-tests
cc @gmaclennan
not going to merge this but keeping it as a draft for the foreseeable future. refer to https://github.com/digidem/mapeo-mobile/issues/1100#issuecomment-1593522398 for more details
Closes #1100
Notes:
x86
architecture entirely (for now).nodejs-mobile
v16.17.0 dropped support for this, although it may reintroduce it later. according to our download statistics, not many devices using mapeo have this architecture (~7 active installations as of this week) but this is a notable change that's being introduced, so should be approached carefully.nodejs-mobile-react-native
and our project due to issues introduced in npm v7+. basically, this updated nmrn version attempts to workaround the npm issue but it specifically doesn't work forbetter-sqlite3
because of the way that project is structured (additional context here). as a result, we upgrade to node 16 but developers need to explicitly use npm v6 for now.