PageSourceSearch

https://pnpm.io/assets/js/a7ea735e.1e2d7f2e.js

js pnpm.io collected 2026-09-24 07:23:20 UTC 3,269 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([["1970"],{31057(e,n,s){s.r(n),s.d(n,{metadata:()=>i,default:()=>o,frontMatter:()=>r,contentTitle:()=>c,toc:()=>l,assets:()=>d});var i=JSON.parse('{"id":"cli/view","title":"pnpm view","description":"Added in: v11.0.0","source":"@site/versioned_docs/version-12.x/cli/view.md","sourceDirName":"cli","slug":"/cli/view","permalink":"/cli/view","draft":false,"unlisted":false,"editUrl":"https://github.com/pnpm/pnpm.io/edit/main/docs/cli/view.md","tags":[],"version":"12.x","lastUpdatedBy":null,"lastUpdatedAt":null,"frontMatter":{"id":"view","title":"pnpm view"},"sidebar":"docs","previous":{"title":"pnpm peers","permalink":"/cli/peers"},"next":{"title":"pnpm search","permalink":"/cli/search"}}'),t=s(91987),a=s(67008);let r={id:"view",title:"pnpm view"},c,d={},l=[{value:"Usage",id:"usage",level:2},{value:"Options",id:"options",level:2},{value:"--json",id:"--json",level:3}];function p(e){let n={code:"code",h2:"h2",h3:"h3",p:"p",pre:"pre",...(0,a.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.p,{children:"Added in: v11.0.0"}),"\n",(0,t.jsxs)(n.p,{children:["Aliases: ",(0,t.jsx)(n.code,{children:"info"}),", ",(0,t.jsx)(n.code,{children:"show"})]}),"\n",(0,t.jsx)(n.p,{children:"View package metadata from the registry."}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-sh",children:"pnpm view <pkg>\npnpm view <pkg> [field]\npnpm view [field]\n"})}),"\n",(0,t.jsx)(n.h2,{id:"usage",children:"Usage"}),"\n",(0,t.jsx)(n.p,{children:"Show all metadata for a package:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-sh",children:"pnpm view express\n"})}),"\n",(0,t.jsx)(n.p,{children:"Show a specific field:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-sh",children:"pnpm view express version\npnpm view express dependencies\npnpm view express dist-tags\n"})}),"\n",(0,t.jsx)(n.p,{children:"Show metadata for a specific version:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-sh",children:"pnpm view [email protected]\n"})}),"\n",(0,t.jsxs)(n.p,{children:["When no package name is provided, ",(0,t.jsx)(n.code,{children:"pnpm view"})," searches upward for the nearest project manifest (",(0,t.jsx)(n.code,{children:"package.json"}),", ",(0,t.jsx)(n.code,{children:"package.yaml"}),", or ",(0,t.jsx)(n.code,{children:"package.json5"}),") and uses its ",(0,t.jsx)(n.code,{children:"name"})," field. If the manifest exists but has no ",(0,t.jsx)(n.code,{children:"name"}),", the command fails."]}),"\n",(0,t.jsx)(n.h2,{id:"options",children:"Options"}),"\n",(0,t.jsx)(n.h3,{id:"--json",children:"--json"}),"\n",(0,t.jsx)(n.p,{children:"Output the metadata in JSON format."})]})}function o(e={}){let{wrapper:n}={...(0,a.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(p,{...e})}):p(e)}},67008(e,n,s){s.d(n,{R:()=>r,x:()=>c});var i=s(71763);let t={},a=i.createContext(t);function r(e){let n=i.useContext(a);return i.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:r(e.components),i.createElement(a.Provider,{value:n},e.children)}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.