remotestorage / remotestorage.js

⬡ JavaScript client library for integrating remoteStorage in apps
https://remotestoragejs.readthedocs.io
MIT License
2.3k stars 141 forks source link

Improve sync events #1290

Closed raucao closed 1 year ago

raucao commented 1 year ago
raucao commented 1 year ago

I added a fix for a subtle bug in the finishTask function, which made my new tests fail for no obvious reason: https://github.com/remotestorage/remotestorage.js/pull/1290/commits/d740c0cc722610f2c01446924bb6129f81a29574

DougReeder commented 1 year ago

The changes look good, but when I run npm ci and npm run test:mocha with this branch under Node 14 or 16, I get the error:

TSError: ⨯ Unable to compile TypeScript: test/helpers/location.ts:90:5 - error TS2322: Type 'Document' is not assignable to type 'never'.

90 global["document"] = {} as Document;



I don't get that error with the master branch; I'm not certain what's different.
raucao commented 1 year ago

Thanks. I did not change anything in that file, so it's unlikely that this error is related to my changes.

What's also weird is that GitHub didn't run the test actions for the last couple of commits. It still works fine for me on node 16 locally.

raucao commented 1 year ago

@DougReeder Could you try removing your node_modules folder and re-installing all modules from npm?

DougReeder commented 1 year ago

I deleted node-modules and updated npm to 9.6.4, and now when I run npm ci or npm i I get these errors:

npm ERR! code ERESOLVE npm ERR! ERESOLVE could not resolve npm ERR! npm ERR! While resolving: typedoc@0.19.2 npm ERR! Found: typescript@4.8.4 npm ERR! node_modules/typescript npm ERR! dev typescript@"^4.8.3" from the root project npm ERR! peer typescript@"*" from ts-loader@8.4.0 npm ERR! node_modules/ts-loader npm ERR! dev ts-loader@"^8.4.0" from the root project npm ERR! 2 more (ts-node, tsutils) npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer typescript@"3.9.x || 4.0.x" from typedoc@0.19.2 npm ERR! node_modules/typedoc npm ERR! dev typedoc@"^0.19.2" from the root project npm ERR! npm ERR! Conflicting peer dependency: typescript@4.0.8 npm ERR! node_modules/typescript npm ERR! peer typescript@"3.9.x || 4.0.x" from typedoc@0.19.2 npm ERR! node_modules/typedoc npm ERR! dev typedoc@"^0.19.2" from the root project

As noted, this PR doesn't change the dependencies, so I don't see how this issue could have been introduced by it. However. until I figure out what's going on, I can't sign off on this PR. :-(

raucao commented 1 year ago

Ah. You need to use the --force flag with those currently

https://remotestoragejs.readthedocs.io/en/latest/contributing/building.html#setup

See also #1276