snyk 1.1061.0 → 1.1062.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.
@@ -2484,10 +2484,10 @@
2484
2484
  },
2485
2485
  {
2486
2486
  "name": "snyk-gradle-plugin",
2487
- "version": "3.24.5",
2487
+ "version": "3.24.6",
2488
2488
  "author": "snyk.io",
2489
2489
  "repository": "https://github.com/snyk/snyk-gradle-plugin",
2490
- "source": "https://registry.npmjs.org/snyk-gradle-plugin/-/snyk-gradle-plugin-3.24.5.tgz",
2490
+ "source": "https://registry.npmjs.org/snyk-gradle-plugin/-/snyk-gradle-plugin-3.24.6.tgz",
2491
2491
  "license": "Apache-2.0",
2492
2492
  "licenseText": "Copyright 2017 Snyk Ltd.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n"
2493
2493
  },
@@ -336,22 +336,29 @@ allprojects { Project currProj ->
336
336
  def resolvableConfigs = findProjectConfigs(proj, confNameFilter, confAttrSpec)
337
337
  def resolvedConfigs = []
338
338
  resolvableConfigs.each({ config ->
339
- def resConf = config.resolvedConfiguration
339
+ ResolvedConfiguration resConf = config.getResolvedConfiguration()
340
340
  debugLog("config `$config.name' resolution has errors: ${resConf.hasError()}")
341
341
  if (!resConf.hasError()) {
342
342
  resolvedConfigs.add(resConf)
343
- debugLog("first level module dependencies for config `$config.name': $resConf.firstLevelModuleDependencies")
343
+ debugLog("Fully resolved config `$config.name' with deps: $resConf.firstLevelModuleDependencies")
344
+ } else {
345
+ // even if some dependencies fail to resolve, we prefer a partial result to none
346
+ LenientConfiguration lenientConf = resConf.getLenientConfiguration()
347
+ debugLog("Partially resolved config `$config.name' with: $lenientConf.firstLevelModuleDependencies")
348
+ debugLog("Couldn't resolve: ${lenientConf.getUnresolvedModuleDependencies()}")
349
+ resolvedConfigs.add(lenientConf)
344
350
  }
345
351
  })
346
352
  if (resolvedConfigs.isEmpty() && !resolvableConfigs.isEmpty()) {
347
353
  throw new RuntimeException('Configurations: ' + resolvableConfigs.collect { it.name } +
348
354
  ' for project ' + proj + ' could not be resolved.')
349
355
  }
356
+ List nonemptyFirstLevelDeps = []
357
+ resolvedConfigs.each { nonemptyFirstLevelDeps.addAll(it.getFirstLevelModuleDependencies()) }
350
358
 
351
- def nonemptyFirstLevelDeps = resolvedConfigs.resolvedConfiguration.firstLevelModuleDependencies.findAll({ !it.isEmpty() })
352
359
  debugLog("non-empty first level deps for project `$proj.name': $nonemptyFirstLevelDeps")
353
-
354
360
  debugLog('converting gradle graph to snyk-graph format')
361
+
355
362
  def projGraph = getSnykGraph(nonemptyFirstLevelDeps)
356
363
  String projKey = formatPath(proj.path)
357
364
  // if project is root ":", it's formatted to "" - we can't have an empty string as a key so use default name
@@ -455,11 +462,16 @@ allprojects { Project currProj ->
455
462
  def resolvableConfigs = findProjectConfigs(proj, confNameFilter, confAttrSpec)
456
463
  def resolvedConfigs = []
457
464
  resolvableConfigs.each({ config ->
458
- def resConf = config.resolvedConfiguration
465
+ ResolvedConfiguration resConf = config.resolvedConfiguration
459
466
  debugLog("config `$config.name' resolution has errors: ${resConf.hasError()}")
460
467
  if (!resConf.hasError()) {
461
468
  resolvedConfigs.add(resConf)
462
- debugLog("first level module dependencies for config `$config.name': $resConf.firstLevelModuleDependencies")
469
+ debugLog("Fully resolved config `$config.name' with: $resConf.firstLevelModuleDependencies")
470
+ } else {
471
+ LenientConfiguration lenientConf = resConf.getLenientConfiguration()
472
+ debugLog("Partially resolved config `$config.name' with: $lenientConf.firstLevelModuleDependencies")
473
+ debugLog("Couldn't resolve: ${lenientConf.getUnresolvedModuleDependencies()}")
474
+ resolvedConfigs.add(lenientConf)
463
475
  }
464
476
  })
465
477
  if (!resolvableConfigs.isEmpty() && resolvedConfigs.isEmpty()) {
@@ -467,8 +479,9 @@ allprojects { Project currProj ->
467
479
  ' for project ' + proj + ' could not be resolved.')
468
480
  }
469
481
 
470
- def nonemptyFirstLevelDeps = resolvedConfigs.resolvedConfiguration.firstLevelModuleDependencies.findAll({ !it.isEmpty() })
471
-
482
+ List nonemptyFirstLevelDeps = []
483
+ resolvedConfigs.each { nonemptyFirstLevelDeps.addAll(it.getFirstLevelModuleDependencies()) }
484
+
472
485
  debugLog("non-empty first level deps for project `$proj.name': $nonemptyFirstLevelDeps")
473
486
  debugLog('converting gradle graph to snyk-graph format')
474
487
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "snyk",
3
- "version": "1.1061.0",
3
+ "version": "1.1062.0",
4
4
  "description": "snyk library and cli utility",
5
5
  "files": [
6
6
  "help/cli-commands",