Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion lib/registry.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,11 +127,12 @@ class RegistryFetcher extends Fetcher {
}

const packument = await this.packument()
const steps = PackageJson.normalizeSteps.filter(s => s !== '_attributes')
const mani = await new PackageJson().fromContent(pickManifest(packument, this.spec.fetchSpec, {
...this.opts,
defaultTag: this.defaultTag,
before: this.before,
})).normalize().then(p => p.content)
})).normalize({ steps }).then(p => p.content)

/* XXX add ETARGET and E403 revalidation of cached packuments here */

Expand Down
2 changes: 2 additions & 0 deletions test/registry.js
Original file line number Diff line number Diff line change
Expand Up @@ -1267,6 +1267,7 @@ t.test('option replaceRegistryHost', rhTest => {
dist: {
tarball: 'https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz',
},
_test: true,
},
},
})
Expand All @@ -1291,6 +1292,7 @@ t.test('option replaceRegistryHost', rhTest => {
const manifest = await fetcher.manifest()
ct.equal(manifest.dist.tarball, 'https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz')
const tarball = await fetcher.tarball()
ct.equal(manifest._test, true, 'Underscores are preserved')
ct.match(tarball, abbrevTGZ)
})

Expand Down