Skip to content

Commit

Permalink
deps: cacache@16.1.1 (#4985)
Browse files Browse the repository at this point in the history
* read: change lstat to stat to correctly evaluate file size
  • Loading branch information
wraithgar committed Jun 14, 2022
1 parent 053dffe commit d404c8c
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 16 deletions.
10 changes: 5 additions & 5 deletions node_modules/cacache/lib/content/read.js
Expand Up @@ -13,7 +13,7 @@ async function read (cache, integrity, opts = {}) {
const { size } = opts
const { stat, cpath, sri } = await withContentSri(cache, integrity, async (cpath, sri) => {
// get size
const stat = await fs.lstat(cpath)
const stat = await fs.stat(cpath)
return { stat, cpath, sri }
})
if (typeof size === 'number' && stat.size !== size) {
Expand Down Expand Up @@ -73,8 +73,8 @@ function readStream (cache, integrity, opts = {}) {
// Set all this up to run on the stream and then just return the stream
Promise.resolve().then(async () => {
const { stat, cpath, sri } = await withContentSri(cache, integrity, async (cpath, sri) => {
// just lstat to ensure it exists
const stat = await fs.lstat(cpath)
// just stat to ensure it exists
const stat = await fs.stat(cpath)
return { stat, cpath, sri }
})
if (typeof size === 'number' && size !== stat.size) {
Expand Down Expand Up @@ -111,7 +111,7 @@ async function hasContent (cache, integrity) {

try {
return await withContentSri(cache, integrity, async (cpath, sri) => {
const stat = await fs.lstat(cpath)
const stat = await fs.stat(cpath)
return { size: stat.size, sri, stat }
})
} catch (err) {
Expand Down Expand Up @@ -139,7 +139,7 @@ function hasContentSync (cache, integrity) {

return withContentSriSync(cache, integrity, (cpath, sri) => {
try {
const stat = fs.lstatSync(cpath)
const stat = fs.statSync(cpath)
return { size: stat.size, sri, stat }
} catch (err) {
if (err.code === 'ENOENT') {
Expand Down
6 changes: 3 additions & 3 deletions node_modules/cacache/package.json
@@ -1,6 +1,6 @@
{
"name": "cacache",
"version": "16.1.0",
"version": "16.1.1",
"cache-version": {
"content": "2",
"index": "5"
Expand Down Expand Up @@ -69,7 +69,7 @@
},
"devDependencies": {
"@npmcli/eslint-config": "^3.0.1",
"@npmcli/template-oss": "3.4.3",
"@npmcli/template-oss": "3.5.0",
"tap": "^16.0.0"
},
"engines": {
Expand All @@ -78,7 +78,7 @@
"templateOSS": {
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
"windowsCI": false,
"version": "3.4.3"
"version": "3.5.0"
},
"author": "GitHub Inc."
}
14 changes: 7 additions & 7 deletions package-lock.json
Expand Up @@ -96,7 +96,7 @@
"@npmcli/run-script": "^3.0.1",
"abbrev": "~1.1.1",
"archy": "~1.0.0",
"cacache": "^16.1.0",
"cacache": "^16.1.1",
"chalk": "^4.1.2",
"chownr": "^2.0.0",
"cli-columns": "^4.0.0",
Expand Down Expand Up @@ -1579,9 +1579,9 @@
}
},
"node_modules/cacache": {
"version": "16.1.0",
"resolved": "https://registry.npmjs.org/cacache/-/cacache-16.1.0.tgz",
"integrity": "sha512-Pk4aQkwCW82A4jGKFvcGkQFqZcMspfP9YWq9Pr87/ldDvlWf718zeI6KWCdKt/jeihu6BytHRUicJPB1K2k8EQ==",
"version": "16.1.1",
"resolved": "https://registry.npmjs.org/cacache/-/cacache-16.1.1.tgz",
"integrity": "sha512-VDKN+LHyCQXaaYZ7rA/qtkURU+/yYhviUdvqEv2LT6QPZU8jpyzEkEVAcKlKLt5dJ5BRp11ym8lo3NKLluEPLg==",
"inBundle": true,
"dependencies": {
"@npmcli/fs": "^2.1.0",
Expand Down Expand Up @@ -11239,9 +11239,9 @@
}
},
"cacache": {
"version": "16.1.0",
"resolved": "https://registry.npmjs.org/cacache/-/cacache-16.1.0.tgz",
"integrity": "sha512-Pk4aQkwCW82A4jGKFvcGkQFqZcMspfP9YWq9Pr87/ldDvlWf718zeI6KWCdKt/jeihu6BytHRUicJPB1K2k8EQ==",
"version": "16.1.1",
"resolved": "https://registry.npmjs.org/cacache/-/cacache-16.1.1.tgz",
"integrity": "sha512-VDKN+LHyCQXaaYZ7rA/qtkURU+/yYhviUdvqEv2LT6QPZU8jpyzEkEVAcKlKLt5dJ5BRp11ym8lo3NKLluEPLg==",
"requires": {
"@npmcli/fs": "^2.1.0",
"@npmcli/move-file": "^2.0.0",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -65,7 +65,7 @@
"@npmcli/run-script": "^3.0.1",
"abbrev": "~1.1.1",
"archy": "~1.0.0",
"cacache": "^16.1.0",
"cacache": "^16.1.1",
"chalk": "^4.1.2",
"chownr": "^2.0.0",
"cli-columns": "^4.0.0",
Expand Down

0 comments on commit d404c8c

Please sign in to comment.