snyk 1.1146.0 → 1.1147.0

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.
@@ -158304,7 +158304,7 @@ class GoBinary {
158304
158304
  // (github.com/my/pkg@v0.0.1/a.go), the path.parse expression returns
158305
158305
  // just a slash. This would result in a package name with a trailing
158306
158306
  // slash, which is incorrect.
158307
- let dirName = path.parse(parts[1]).dir;
158307
+ let dirName = path.posix.parse(parts[1]).dir;
158308
158308
  if (dirName === "/") {
158309
158309
  dirName = "";
158310
158310
  }
@@ -158556,7 +158556,10 @@ function determineVendorPath(modules, files) {
158556
158556
  // We check for other files in that root to make sure that we really got the
158557
158557
  // right vendor folder, and not just a random folder named `vendor` somewhere.
158558
158558
  for (const [, mod] of Object.entries(modules)) {
158559
- const vendoredModulePath = path.join("vendor", mod.name) + "/";
158559
+ // use path.posix.join so that we will always get linux-style paths even if
158560
+ // the plugin runs on Windows. This is necessary because the Go binaries
158561
+ // always contain linux-style path separators.
158562
+ const vendoredModulePath = path.posix.join("vendor", mod.name) + "/";
158560
158563
  const file = files.find((file) => file.includes(vendoredModulePath));
158561
158564
  if (file) {
158562
158565
  // make sure that we find other files in that path not in the vendor
@@ -158564,7 +158567,7 @@ function determineVendorPath(modules, files) {
158564
158567
  const mainModulePath = file.split(vendoredModulePath)[0];
158565
158568
  const success = files.find((file) => file.includes(mainModulePath) && !file.includes(vendoredModulePath));
158566
158569
  if (success) {
158567
- return path.join(mainModulePath, "vendor") + "/";
158570
+ return path.posix.join(mainModulePath, "vendor") + "/";
158568
158571
  }
158569
158572
  }
158570
158573
  }