Skip to content
This repository has been archived by the owner on Jul 28, 2021. It is now read-only.

Commit

Permalink
feat(resolve): be evil for a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
zkat committed Oct 16, 2018
1 parent 6870716 commit 198a2ff
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions lib/ensure-package.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,10 +150,19 @@ class CacacheUnpacker extends tar.Parse {
this.metadata.hasInstallScripts = true
}
}
if (parsed.name === 'resolve') {
this.isResolvePkg = true
}
}
if (entry.path.match(/\.gyp$/)) {
this.metadata.hasNativeBuild = true
}
if (this.isResolvePkg && entry.path.match(/^lib\/node-modules-paths\.js$/)) {
data = data.replace(
": ['node_modules']",
": ['node_modules', 'node_modules/.package-map.json']"
)
}
const {integrity} = await cacacheWrite(this.cache, data, {
algorithms: ['sha256']
})
Expand Down

0 comments on commit 198a2ff

Please sign in to comment.