Hi, I'm using licensed v5.0.1.
I found licensed cache returns an error in my project when I use pnpm v9.14.4.
❯ licensed cache --sources pnpm
Caching dependency records for hugill
pnpm
Error @tauri-apps/api@ ()
Error @tauri-apps/plugin-shell@ ()
Error @tauri-apps/plugin-store@ ()
Error bulma@ ()
* Errors:
* hugill.pnpm.@tauri-apps/api@
- dependency path not found
* hugill.pnpm.@tauri-apps/plugin-shell@
- dependency path not found
* hugill.pnpm.@tauri-apps/plugin-store@
- dependency path not found
* hugill.pnpm.bulma@
- dependency path not found
Caching dependency records for src-tauri
cargo
* Warnings:
* src-tauri.cargo
- skipped source
* 0 cargo dependencies
❯ licensed --version
5.0.1
❯ pnpm --version
9.14.4
I found the error reason by reading pnpm.rb.
https://github.com/github/licensed/blob/v5.0.1/lib/licensed/sources/pnpm.rb#L22
pnpm.rb expects pnpm license list --json --long returns packages which contains "version" key, but pnpm v9 returns "versions" key.
pnpm licenses list prints license information of all versions of the same package in case different versions use different licenses. The format of the pnpm licenses list --json output has been changed pnpm/pnpm#7528.
https://github.com/pnpm/pnpm/releases/tag/v9.0.0
pnpm licenses list --json --long formats in pnpm v9.14.4
{
"Apache-2.0": [
{
"name": "@ampproject/remapping",
"versions": [
"2.3.0"
],
"paths": [
"/Users/user/work/js/hugill/node_modules/.pnpm/@ampproject+remapping@2.3.0/node_modules/@ampproject/remapping"
],
"license": "Apache-2.0",
"author": "Justin Ridgewell",
"homepage": "https://github.com/ampproject/remapping#readme",
"description": "Remap sequential sourcemaps through transformations to point at the original source code"
},
...
Hi, I'm using licensed v5.0.1.
I found
licensed cachereturns an error in my project when I use pnpm v9.14.4.I found the error reason by reading pnpm.rb.
https://github.com/github/licensed/blob/v5.0.1/lib/licensed/sources/pnpm.rb#L22
pnpm.rb expects
pnpm license list --json --longreturns packages which contains "version" key, but pnpm v9 returns "versions" key.pnpm licenses list --json --longformats in pnpm v9.14.4