@pnpm/fs.packlist 1100.0.5 → 1100.0.6

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # @pnpm/fs.packlist
2
2
 
3
+ ## 1100.0.6
4
+
5
+ ### Patch Changes
6
+
7
+ - `pnpm install` now works in StackBlitz WebContainers on projects without a lockfile. It used to fail there with `ENOENT ... pnpm-lock.yaml`, because pnpm did not recognize the errors that WebContainers return from asynchronous file system calls [#15649](https://github.com/pnpm/pnpm/issues/15649).
8
+
9
+ - Updated dependencies:
10
+ - @pnpm/error@1100.2.1
11
+ - @pnpm/workspace.project-manifest-reader@1100.1.1
12
+
3
13
  ## 1100.0.5
4
14
 
5
15
  ### Patch Changes
package/lib/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import fs from 'node:fs';
2
2
  import path from 'node:path';
3
- import util from 'node:util';
3
+ import { isError } from '@pnpm/error';
4
4
  import { safeReadProjectManifestOnly } from '@pnpm/workspace.project-manifest-reader';
5
5
  import { isSubdir } from 'is-subdir';
6
6
  import npmPacklist from 'npm-packlist';
@@ -62,7 +62,7 @@ class PackWalker extends npmPacklist.Walker {
62
62
  stat = fs.lstatSync(path.join(this.path, file));
63
63
  }
64
64
  catch (err) {
65
- if (util.types.isNativeError(err) && 'code' in err && (err.code === 'ENOENT' || err.code === 'ENOTDIR'))
65
+ if (isError(err) && 'code' in err && (err.code === 'ENOENT' || err.code === 'ENOTDIR'))
66
66
  continue;
67
67
  throw err;
68
68
  }
@@ -108,7 +108,7 @@ export async function packlistWithSources(pkgDir, opts) {
108
108
  hasNpmIgnore = (await fs.promises.stat(path.join(resolvedPkgDir, '.npmignore'))).isFile();
109
109
  }
110
110
  catch (err) {
111
- if (!util.types.isNativeError(err) || !('code' in err) || err.code !== 'ENOENT')
111
+ if (!isError(err) || !('code' in err) || err.code !== 'ENOENT')
112
112
  throw err;
113
113
  }
114
114
  }
@@ -136,7 +136,7 @@ function isInternalFileOrSymlink(pkgDir, relFile) {
136
136
  lstat = fs.lstatSync(absPath);
137
137
  }
138
138
  catch (err) {
139
- if (util.types.isNativeError(err) && 'code' in err && err.code === 'ENOENT')
139
+ if (isError(err) && 'code' in err && err.code === 'ENOENT')
140
140
  return false;
141
141
  throw err;
142
142
  }
@@ -170,7 +170,7 @@ function isInternalFileOrSymlink(pkgDir, relFile) {
170
170
  }
171
171
  }
172
172
  catch (err) {
173
- if (!util.types.isNativeError(err) || !('code' in err) || err.code !== 'ENOENT') {
173
+ if (!isError(err) || !('code' in err) || err.code !== 'ENOENT') {
174
174
  throw err;
175
175
  }
176
176
  }
@@ -345,7 +345,7 @@ function resolveDependency(depName, fromDir, boundary) {
345
345
  }
346
346
  }
347
347
  catch (err) {
348
- if (!util.types.isNativeError(err) || !('code' in err) || err.code !== 'ENOENT') {
348
+ if (!isError(err) || !('code' in err) || err.code !== 'ENOENT') {
349
349
  throw err;
350
350
  }
351
351
  }
@@ -372,7 +372,7 @@ function realpathOrUndefined(dir) {
372
372
  return fs.realpathSync(dir);
373
373
  }
374
374
  catch (err) {
375
- if (util.types.isNativeError(err) && 'code' in err && err.code === 'ENOENT')
375
+ if (isError(err) && 'code' in err && err.code === 'ENOENT')
376
376
  return undefined;
377
377
  throw err;
378
378
  }
@@ -382,7 +382,7 @@ function readPackageJson(dir) {
382
382
  return JSON.parse(fs.readFileSync(path.join(dir, 'package.json'), 'utf8'));
383
383
  }
384
384
  catch (err) {
385
- if (util.types.isNativeError(err) && 'code' in err && err.code === 'ENOENT') {
385
+ if (isError(err) && 'code' in err && err.code === 'ENOENT') {
386
386
  return {};
387
387
  }
388
388
  throw err;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pnpm/fs.packlist",
3
- "version": "1100.0.5",
3
+ "version": "1100.0.6",
4
4
  "description": "Get a list of the files to add from a directory into an npm package",
5
5
  "keywords": [
6
6
  "pnpm",
@@ -27,12 +27,13 @@
27
27
  "!*.map"
28
28
  ],
29
29
  "dependencies": {
30
- "@pnpm/workspace.project-manifest-reader": "1100.1.0",
30
+ "@pnpm/error": "1100.2.1",
31
+ "@pnpm/workspace.project-manifest-reader": "1100.1.1",
31
32
  "is-subdir": "^2.0.0",
32
33
  "npm-packlist": "10.0.4"
33
34
  },
34
35
  "devDependencies": {
35
- "@pnpm/fs.packlist": "1100.0.5"
36
+ "@pnpm/fs.packlist": "1100.0.6"
36
37
  },
37
38
  "engines": {
38
39
  "node": ">=22.13"