@@ -29,7 +29,7 @@ const completion = async (opts, cb) => {
2929 return cb ( )
3030 }
3131 // have the package, get the fields
32- const config = npm . flatOptions
32+ const config = { ... npm . flatOptions , fullMetadata : true , preferOnline : true }
3333 const { defaultTag } = config
3434 const spec = npa ( opts . conf . argv . remain [ 2 ] )
3535 const pckmnt = await packument ( spec , config )
@@ -63,7 +63,7 @@ const completion = async (opts, cb) => {
6363const view = async args => {
6464 if ( ! args . length ) args = [ '.' ]
6565
66- const opts = npm . flatOptions
66+ const opts = { ... npm . flatOptions , preferOnline : true , fullMetadata : true }
6767 const pkg = args . shift ( )
6868 let nv
6969 if ( / ^ [ . ] @ / . test ( pkg ) ) {
@@ -97,11 +97,7 @@ const fetchAndRead = async (nv, args, opts) => {
9797 // get the data about this package
9898 let version = nv . rawSpec || npm . flatOptions . defaultTag
9999
100- const pckmnt = await packument ( nv , {
101- ...opts ,
102- fullMetadata : true ,
103- 'prefer-online' : true
104- } )
100+ const pckmnt = await packument ( nv , opts )
105101
106102 if ( pckmnt [ 'dist-tags' ] && pckmnt [ 'dist-tags' ] [ version ] ) {
107103 version = pckmnt [ 'dist-tags' ] [ version ]
0 commit comments