cacache 16.1.0 → 16.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -13,7 +13,7 @@ async function read (cache, integrity, opts = {}) {
13
13
  const { size } = opts
14
14
  const { stat, cpath, sri } = await withContentSri(cache, integrity, async (cpath, sri) => {
15
15
  // get size
16
- const stat = await fs.lstat(cpath)
16
+ const stat = await fs.stat(cpath)
17
17
  return { stat, cpath, sri }
18
18
  })
19
19
  if (typeof size === 'number' && stat.size !== size) {
@@ -73,8 +73,8 @@ function readStream (cache, integrity, opts = {}) {
73
73
  // Set all this up to run on the stream and then just return the stream
74
74
  Promise.resolve().then(async () => {
75
75
  const { stat, cpath, sri } = await withContentSri(cache, integrity, async (cpath, sri) => {
76
- // just lstat to ensure it exists
77
- const stat = await fs.lstat(cpath)
76
+ // just stat to ensure it exists
77
+ const stat = await fs.stat(cpath)
78
78
  return { stat, cpath, sri }
79
79
  })
80
80
  if (typeof size === 'number' && size !== stat.size) {
@@ -111,7 +111,7 @@ async function hasContent (cache, integrity) {
111
111
 
112
112
  try {
113
113
  return await withContentSri(cache, integrity, async (cpath, sri) => {
114
- const stat = await fs.lstat(cpath)
114
+ const stat = await fs.stat(cpath)
115
115
  return { size: stat.size, sri, stat }
116
116
  })
117
117
  } catch (err) {
@@ -139,7 +139,7 @@ function hasContentSync (cache, integrity) {
139
139
 
140
140
  return withContentSriSync(cache, integrity, (cpath, sri) => {
141
141
  try {
142
- const stat = fs.lstatSync(cpath)
142
+ const stat = fs.statSync(cpath)
143
143
  return { size: stat.size, sri, stat }
144
144
  } catch (err) {
145
145
  if (err.code === 'ENOENT') {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cacache",
3
- "version": "16.1.0",
3
+ "version": "16.1.1",
4
4
  "cache-version": {
5
5
  "content": "2",
6
6
  "index": "5"
@@ -69,7 +69,7 @@
69
69
  },
70
70
  "devDependencies": {
71
71
  "@npmcli/eslint-config": "^3.0.1",
72
- "@npmcli/template-oss": "3.4.3",
72
+ "@npmcli/template-oss": "3.5.0",
73
73
  "tap": "^16.0.0"
74
74
  },
75
75
  "engines": {
@@ -78,7 +78,7 @@
78
78
  "templateOSS": {
79
79
  "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
80
80
  "windowsCI": false,
81
- "version": "3.4.3"
81
+ "version": "3.5.0"
82
82
  },
83
83
  "author": "GitHub Inc."
84
84
  }