yarn
yarn copied to clipboard
publish updates to @yarnpkg/lockfile
There have been several updates to lockfile logic: https://github.com/yarnpkg/yarn/commits/a75dbe36ca7f6d881d291a7231676d00d523bb39/src/lockfile
But it hasn't been published since 1.1.0
or since 2018: https://www.npmjs.com/package/@yarnpkg/lockfile/v/1.1.0
you might want to look at @yarnpkg/parsers instead
@naugtur that isn't published either :(
I used it. It's probably scoped
https://www.npmjs.com/package/@yarnpkg/parsers
Just a small bump to this issue.
https://www.npmjs.com/package/@yarnpkg/parsers
It has 0 documentation, and it looks like one cannot parse a lockfile using it
@yarnpkg/lockfile
It is still not updated.
Note that TypeScript declaration are too up-to-date in https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/yarnpkg__lockfile/index.d.ts
And version 1.1.0 of this declaration (https://github.com/DefinitelyTyped/DefinitelyTyped/blob/0773a10d017be0e80e473c16a9623487fdb4f4f0/types/yarnpkg__lockfile/index.d.ts) are wrong, I had to use the following declaration:
declare module '@yarnpkg/lockfile' {
interface Dependency {
[packageName: string]: string;
}
interface FirstLevelDependency {
version: string;
resolved?: string;
dependencies?: Dependency;
}
interface LockFileObject {
[packageName: string]: FirstLevelDependency;
}
// function parse(file: string): { object: LockFileObject }
// export = parse
namespace _exported { function parse(file: string): { object: LockFileObject } }
export = _exported;
}