about: |
Print a table of the exact versions installed in this command's pnpm env.
Declares `packages.pnpm: [lodash@4.17.21, cowsay@1.6.0]`, so jan materializes
a hash-keyed node_modules before run and puts `node_modules/.bin` on PATH.
packages:
pnpm:
- lodash@4.17.21
- cowsay@1.6.0
commands:
help:
about: Usage for pin-report
exec:
text: |
pin-report — show the versions pnpm installed for this command
usage:
jan pin-report run # version table via require()
jan pin-report cow # run cowsay from node_modules/.bin
run:
about: Report installed versions through NODE_PATH
exec:
argv:
- node
- -e
- |
const pkgs = ["lodash", "cowsay"];
const rows = pkgs.map((name) => {
const { version } = require(`${name}/package.json`);
return { package: name, version };
});
console.table(rows);
console.log("lodash runtime VERSION:", require("lodash").VERSION);
cow:
about: Run a binary from the env's node_modules/.bin
exec:
argv: ["cowsay", "pinned deps only"]