@artilleryio/int-core 2.13.0-e1fa2a7 → 2.14.0-d77b7a2

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/runner.js +9 -9
  2. package/package.json +2 -2
package/lib/runner.js CHANGED
@@ -407,23 +407,23 @@ function datafileVariables(script) {
407
407
  let result = {};
408
408
  if (script.config.payload) {
409
409
  _.each(script.config.payload, function (el) {
410
- //when loading all the csv, we don't set individual fields
411
410
  if (!el.loadAll) {
411
+ // Load individual fields from the CSV into VU context variables
412
412
  // If data = [] (i.e. the CSV file is empty, or only has headers and
413
413
  // skipHeaders = true), then row could = undefined
414
414
  let row = el.reader(el.data) || [];
415
415
  _.each(el.fields, function (fieldName, j) {
416
416
  result[fieldName] = row[j];
417
417
  });
418
- }
419
-
420
- if (typeof el.name !== 'undefined') {
421
- // Make the entire CSV available
422
- result[el.name] = el.reader(el.data);
423
418
  } else {
424
- console.log(
425
- 'WARNING: loadAll is set to true but no name is provided for the CSV data'
426
- );
419
+ if (typeof el.name !== 'undefined') {
420
+ // Make the entire CSV available
421
+ result[el.name] = el.reader(el.data);
422
+ } else {
423
+ console.log(
424
+ 'WARNING: loadAll is set to true but no name is provided for the CSV data'
425
+ );
426
+ }
427
427
  }
428
428
  });
429
429
  }
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@artilleryio/int-core",
3
- "version": "2.13.0-e1fa2a7",
3
+ "version": "2.14.0-d77b7a2",
4
4
  "main": "./index.js",
5
5
  "license": "MPL-2.0",
6
6
  "dependencies": {
7
- "@artilleryio/int-commons": "2.9.0-e1fa2a7",
7
+ "@artilleryio/int-commons": "2.10.0-d77b7a2",
8
8
  "@artilleryio/sketches-js": "^2.1.1",
9
9
  "agentkeepalive": "^4.1.0",
10
10
  "arrivals": "^2.1.2",