Closed dnicolson closed 1 year ago
Are there any plans to merge this soon? Would be great as I'm experiencing the issue mentioned in #58
I haven't looked it over thoroughly yet, but I'll do my best to get this moving along this week.
@dnicolson / @oliverschwendener - found some additional issues and ended up covering much of what was in this PR. Could either of you try v1.4.0 (simple-plist@next) and let me know if it solves the problems you're facing?
For me it works like a charm, thanks alot!
I get these errors with 1.4.0:
node_modules/simple-plist/dist/index.d.ts:1:10 - error TS2305: Module '"bplist-creator"' has no exported member 'default'.
1 export { default as bplistCreator } from "bplist-creator";
~~~~~~~
node_modules/simple-plist/dist/index.d.ts:2:10 - error TS2305: Module '"bplist-parser"' has no exported member 'default'.
2 export { default as bplistParser } from "bplist-parser";
~~~~~~~
node_modules/simple-plist/dist/parse.d.ts:3:33 - error TS7016: Could not find a declaration file for module 'plist'. 'node_modules/plist/index.js' implicitly has an 'any' type.
Try `npm i --save-dev @types/plist` if it exists or add a new declaration (.d.ts) file containing `declare module 'plist';`
3 import type { PlistValue } from "plist";
@dnicolson I'm not able to reproduce that. Is that in a clean project? I'm wondering if there might be some stale caches laying around on your local or something strange like that.
hmm...now that I've cleared my own caches I'm seeing similar errors, though not identical for some reason. I'll keep poking around a bit to see what I can find.
@dnicolson - I'm still having trouble reproducing that exact error, but I've just published 1.4.0-0
which moves the @types/plist
package to the dependencies instead of devDependencies. That seems like it should address at least 33% of what you're seeing.
Edit:
If I try your approach of using *
instead of default
, typescript is throwing an error
I'm not sure how you were able to get that to work - can you think of anything relevant?
I'm not sure our approaches are the same, it was a bplist-parser
import and not a bplist-creator
export.
I see similar errors with version 1.4.0-0:
node_modules/simple-plist/dist/index.d.ts:1:10 - error TS2305: Module '"bplist-creator"' has no exported member 'default'.
1 export { default as bplistCreator } from "bplist-creator";
~~~~~~~
node_modules/simple-plist/dist/index.d.ts:2:10 - error TS2305: Module '"bplist-parser"' has no exported member 'default'.
2 export { default as bplistParser } from "bplist-parser";
~~~~~~~
src/plist-file-format.ts:85:40 - error TS2345: Argument of type 'PlistValue' is not assignable to parameter of type 'PlistJsObj'.
Type 'string' is not assignable to type 'PlistJsObj'.
85 plist.writeBinaryFileSync(uri, object);
~~~~~~
This pull request removes TypeScript types in favor of types upstream (https://github.com/joeferner/node-bplist-creator/pull/22, https://github.com/joeferner/node-bplist-parser/pull/34) and also fixes the import of
bplist-parser
. It's possible that it resolves https://github.com/wollardj/simple-plist/issues/58.The following code works with version 1.3.0:
The following code with adjusted import doesn't work with version 1.3.1 and results in an error: