@pnpm/exe 11.0.0-beta.3 → 11.0.0-beta.4

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/dist/worker.js CHANGED
@@ -5684,7 +5684,7 @@ function fastPathTemp(file) {
5684
5684
  return path.join(path.dirname(file), `${path.basename(file)}_tmp_${process.pid}_${threadId}`);
5685
5685
  }
5686
5686
 
5687
- // ../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/rename-overwrite/7.0.0/a4f8a57172d73bd6a783f66c5c67f30a08b506d232c93f661c85f144f0c6fbba/node_modules/rename-overwrite/index.js
5687
+ // ../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/rename-overwrite/7.0.1/3efc3b19aca71e74676ce1c36430113a31230880e0e5af3f55b4d0b6c45d0926/node_modules/rename-overwrite/index.js
5688
5688
  var import_fs_extra = __toESM(require_lib(), 1);
5689
5689
  import crypto2 from "node:crypto";
5690
5690
  import fs2 from "node:fs";
@@ -5701,7 +5701,7 @@ function rimrafSync(p) {
5701
5701
  }
5702
5702
  }
5703
5703
 
5704
- // ../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/rename-overwrite/7.0.0/a4f8a57172d73bd6a783f66c5c67f30a08b506d232c93f661c85f144f0c6fbba/node_modules/rename-overwrite/index.js
5704
+ // ../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/rename-overwrite/7.0.1/3efc3b19aca71e74676ce1c36430113a31230880e0e5af3f55b4d0b6c45d0926/node_modules/rename-overwrite/index.js
5705
5705
  var { copySync, copy } = import_fs_extra.default;
5706
5706
  function renameOverwriteSync(oldPath, newPath, retry = 0) {
5707
5707
  try {
@@ -5714,7 +5714,10 @@ function renameOverwriteSync(oldPath, newPath, retry = 0) {
5714
5714
  case "EPERM":
5715
5715
  case "EACCESS":
5716
5716
  case "EBUSY": {
5717
- rimrafSync(newPath);
5717
+ try {
5718
+ rimrafSync(newPath);
5719
+ } catch {
5720
+ }
5718
5721
  const start = Date.now();
5719
5722
  let backoff = 0;
5720
5723
  let lastError = err;
@@ -5968,7 +5971,7 @@ function winResolve(p) {
5968
5971
  return path4.resolve(p);
5969
5972
  }
5970
5973
 
5971
- // ../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/symlink-dir/10.0.1/9cb8644b76e7467ba8dad80f6bf8473ead76caa2ad576233ee72ff1ebe6a51ee/node_modules/symlink-dir/dist/index.js
5974
+ // ../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/symlink-dir/10.0.1/085e7b881ffc832043bec4977cf787e0ed2eebab22b7f38bb80ac9985b6625ef/node_modules/symlink-dir/dist/index.js
5972
5975
  import { promises as fs4, symlinkSync, mkdirSync, readlinkSync, unlinkSync } from "fs";
5973
5976
  import { types } from "util";
5974
5977
  import pathLib from "path";
@@ -7071,7 +7074,7 @@ function createImportPackage(packageImportMethod) {
7071
7074
  switch (packageImportMethod ?? "auto") {
7072
7075
  case "clone":
7073
7076
  packageImportMethodLogger.debug({ method: "clone" });
7074
- return clonePkg.bind(null, createCloneFunction());
7077
+ return createClonePkg();
7075
7078
  case "hardlink":
7076
7079
  packageImportMethodLogger.debug({ method: "hardlink" });
7077
7080
  return hardlinkPkg.bind(null, linkOrCopy2);
@@ -7093,7 +7096,7 @@ function createAutoImporter() {
7093
7096
  function initialAuto(to, opts2) {
7094
7097
  if (process.platform !== "win32") {
7095
7098
  try {
7096
- const _clonePkg = clonePkg.bind(null, createCloneFunction());
7099
+ const _clonePkg = createClonePkg();
7097
7100
  if (!_clonePkg(to, opts2))
7098
7101
  return void 0;
7099
7102
  packageImportMethodLogger.debug({ method: "clone" });
@@ -7128,7 +7131,7 @@ function createCloneOrCopyImporter() {
7128
7131
  return (to, opts2) => auto(to, opts2);
7129
7132
  function initialAuto(to, opts2) {
7130
7133
  try {
7131
- const _clonePkg = clonePkg.bind(null, createCloneFunction());
7134
+ const _clonePkg = createClonePkg();
7132
7135
  if (!_clonePkg(to, opts2))
7133
7136
  return void 0;
7134
7137
  packageImportMethodLogger.debug({ method: "clone" });
@@ -7141,12 +7144,30 @@ function createCloneOrCopyImporter() {
7141
7144
  return auto(to, opts2);
7142
7145
  }
7143
7146
  }
7144
- function clonePkg(clone, to, opts2) {
7145
- if (opts2.resolvedFrom !== "store" || opts2.force || !pkgExistsAtTargetDir(to, opts2.filesMap)) {
7146
- importIndexedDir({ importFile: clone, importFileAtomic: clone }, to, opts2.filesMap, opts2);
7147
- return "clone";
7148
- }
7149
- return void 0;
7147
+ function createClonePkg() {
7148
+ const clone = createCloneFunction();
7149
+ const withFallback = (fallback) => (src2, dest) => {
7150
+ try {
7151
+ clone(src2, dest);
7152
+ } catch (err) {
7153
+ if (util7.types.isNativeError(err) && "code" in err && err.code === "ENOTSUP") {
7154
+ fallback(src2, dest);
7155
+ return;
7156
+ }
7157
+ throw err;
7158
+ }
7159
+ };
7160
+ const importer = {
7161
+ importFile: withFallback(resilientCopyFileSync),
7162
+ importFileAtomic: withFallback(atomicCopyFileSync)
7163
+ };
7164
+ return (to, opts2) => {
7165
+ if (opts2.resolvedFrom !== "store" || opts2.force || !pkgExistsAtTargetDir(to, opts2.filesMap)) {
7166
+ importIndexedDir(importer, to, opts2.filesMap, opts2);
7167
+ return "clone";
7168
+ }
7169
+ return void 0;
7170
+ };
7150
7171
  }
7151
7172
  function pkgExistsAtTargetDir(targetDir, filesMap) {
7152
7173
  return existsSync(path14.join(targetDir, pickFileFromFilesMap(filesMap)));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pnpm/exe",
3
- "version": "11.0.0-beta.3",
3
+ "version": "11.0.0-beta.4",
4
4
  "description": "Fast, disk space efficient package manager",
5
5
  "keywords": [
6
6
  "pnpm",
@@ -24,17 +24,17 @@
24
24
  "@reflink/reflink": "0.1.19"
25
25
  },
26
26
  "optionalDependencies": {
27
- "@pnpm/linux-arm64": "11.0.0-beta.3",
28
- "@pnpm/linux-x64": "11.0.0-beta.3",
29
- "@pnpm/macos-x64": "11.0.0-beta.3",
30
- "@pnpm/win-arm64": "11.0.0-beta.3",
31
- "@pnpm/win-x64": "11.0.0-beta.3",
32
- "@pnpm/macos-arm64": "11.0.0-beta.3"
27
+ "@pnpm/linux-arm64": "11.0.0-beta.4",
28
+ "@pnpm/linux-x64": "11.0.0-beta.4",
29
+ "@pnpm/macos-arm64": "11.0.0-beta.4",
30
+ "@pnpm/macos-x64": "11.0.0-beta.4",
31
+ "@pnpm/win-x64": "11.0.0-beta.4",
32
+ "@pnpm/win-arm64": "11.0.0-beta.4"
33
33
  },
34
34
  "devDependencies": {
35
35
  "execa": "npm:safe-execa@0.3.0",
36
36
  "tar": "^7.5.10",
37
- "@pnpm/exe": "11.0.0-beta.3"
37
+ "@pnpm/exe": "11.0.0-beta.4"
38
38
  },
39
39
  "preferGlobal": true,
40
40
  "publishConfig": {
@@ -1,15 +0,0 @@
1
- The ISC License
2
-
3
- Copyright (c) Isaac Z. Schlueter and Contributors
4
-
5
- Permission to use, copy, modify, and/or distribute this software for any
6
- purpose with or without fee is hereby granted, provided that the above
7
- copyright notice and this permission notice appear in all copies.
8
-
9
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10
- WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11
- MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12
- ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13
- WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14
- ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
15
- IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.