@salesforce/core-bundle 8.8.3 → 8.8.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.
Files changed (2) hide show
  1. package/lib/index.js +3 -21
  2. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -10392,16 +10392,7 @@ var require_fileLocking = __commonJS({
10392
10392
  } catch (err) {
10393
10393
  throw sfError_12.SfError.wrap(err);
10394
10394
  }
10395
- const [unlock] = await Promise.all(fs.existsSync(filePath) ? (
10396
- // if the file exists, wait for it to be unlocked
10397
- [(0, proper_lockfile_1.lock)(filePath, lockRetryOptions_1.lockRetryOptions)]
10398
- ) : (
10399
- // lock the entire directory to keep others from trying to create the file while we are
10400
- [
10401
- (0, proper_lockfile_1.lock)((0, node_path_1.dirname)(filePath), lockRetryOptions_1.lockRetryOptions),
10402
- (await logger_12.Logger.child("fileLocking.lockInit")).debug(`No file found at ${filePath}. Write will create it. Locking the entire directory until file is written.`)
10403
- ]
10404
- ));
10395
+ const unlock = await (0, proper_lockfile_1.lock)(filePath, { ...lockRetryOptions_1.lockRetryOptions, realpath: false });
10405
10396
  return {
10406
10397
  writeAndUnlock: async (data) => {
10407
10398
  const logger = await logger_12.Logger.child("fileLocking.writeAndUnlock");
@@ -10422,16 +10413,7 @@ var require_fileLocking = __commonJS({
10422
10413
  } catch (err) {
10423
10414
  throw sfError_12.SfError.wrap(err);
10424
10415
  }
10425
- const [unlock] = fs.existsSync(filePath) ? (
10426
- // if the file exists, wait for it to be unlocked
10427
- [(0, proper_lockfile_1.lockSync)(filePath, lockRetryOptions_1.lockOptions)]
10428
- ) : (
10429
- // lock the entire directory to keep others from trying to create the file while we are
10430
- [
10431
- (0, proper_lockfile_1.lockSync)((0, node_path_1.dirname)(filePath), lockRetryOptions_1.lockOptions),
10432
- logger_12.Logger.childFromRoot("fileLocking.lockInit").debug(`No file found at ${filePath}. Write will create it. Locking the entire directory until file is written.`)
10433
- ]
10434
- );
10416
+ const unlock = (0, proper_lockfile_1.lockSync)(filePath, { ...lockRetryOptions_1.lockOptions, realpath: false });
10435
10417
  return {
10436
10418
  writeAndUnlock: (data) => {
10437
10419
  const logger = logger_12.Logger.childFromRoot("fileLocking.writeAndUnlock");
@@ -12328,7 +12310,7 @@ var require_package2 = __commonJS({
12328
12310
  "package.json"(exports2, module2) {
12329
12311
  module2.exports = {
12330
12312
  name: "@salesforce/core-bundle",
12331
- version: "8.8.3",
12313
+ version: "8.8.4",
12332
12314
  description: "Core libraries to interact with SFDX projects, orgs, and APIs.",
12333
12315
  main: "lib/index",
12334
12316
  types: "lib/index.d.ts",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/core-bundle",
3
- "version": "8.8.3",
3
+ "version": "8.8.4",
4
4
  "description": "Core libraries to interact with SFDX projects, orgs, and APIs.",
5
5
  "main": "lib/index",
6
6
  "types": "lib/index.d.ts",