@pnpm/lockfile-types: add new versions#4521
Conversation
f0fed07 to
9150983
Compare
|
The versions are documented here: https://github.com/pnpm/spec/tree/master/lockfile But I am not sure why you need this. We only support the two last major versions of pnpm. And including two versions of |
to write a pnpm lockfile parser for snyk/nodejs-lockfile-parser#111 ideally the parser should support multiple lockfile versions the alternative to maintaining multiple
|
|
ok |
|
Is this dead? Can I help in any way? |
|
this has low priority for me, so practically its abandoned if you need this, feel free to continue my devloop was something like
here are 150 MB of pnpm lockfiles: scrape-pnpm-lockfiles there is some related work in nodejs-lockfile-parser/parse-pnpm-lockfiles |
fix #4517
i opted to include old versions in
src/version/*.tsas some consumers may neeed them
and this is easier than installing many different versions of the
@pnpm/lockfile-typespackageone
src/version/*.tsfile has just 3000 bytes, so ... the space-overhead is acceptablethe additional exports are useful for tools like
ts-json-schema-generatorwhich take a
*.tsfile and atsconfig.jsonfile, and generate a schema validatorsee
validate-lockfile.mjsin #4517todo: add more old versions, at least between 5 and 5.3
todo: tests. maybe use the existing tests to generate lockfiles
then use these valid lockfiles to validate the lockfile-types.
these tests are time-consuming so they would run manually.
todo: what pnpm-version generates what lockfile-version?
→
LOCKFILE_VERSIONin packages/constants/src/index.tsedit: version map: https://github.com/pnpm/spec/tree/master/lockfile
version map
TypeError: cb.apply is not a functionshrinkwrapVersion: 3andshrinkwrapMinorVersion: 9shrinkwrapMinorVersioncome from?shrinkwrapMinorVersionshrinkwrapVersion: 4todo: make the
src/version/*.tsfiles available in the published packagemaybe just add
srcto the files array in package.json?