ffc-pay-etl-framework 2.0.0 → 2.0.3

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.
@@ -122,7 +122,7 @@ function postgresDestination (options) {
122
122
  this.connection = connection
123
123
  }.bind(transform),
124
124
  getConnectionName: function () {
125
- return this.connection?.name
125
+ return this.connection?.name ?? connectionname
126
126
  }.bind(transform),
127
127
  setTasks: function (tasks) {
128
128
  this.tasks = tasks
@@ -27,7 +27,18 @@ function fakerTransformer (options) {
27
27
  throw new Error(`Locale "${options.locale}" is not supported by Faker v10.`)
28
28
  }
29
29
 
30
- faker = new Faker({ locale: selectedLocale })
30
+ // Build a fallback chain so undefined locale data (e.g. company.name_pattern in en_GB)
31
+ // falls back through en and finally base, matching Faker v10's locale resolution.
32
+ // Faker v10's allLocales registry always includes 'en' and 'base'.
33
+ const localeChain = [selectedLocale]
34
+ if (localeKey !== 'en') {
35
+ localeChain.push(allLocales.en)
36
+ }
37
+ if (localeKey !== 'base') {
38
+ localeChain.push(allLocales.base)
39
+ }
40
+
41
+ faker = new Faker({ locale: localeChain })
31
42
  } else {
32
43
  faker = defaultFaker
33
44
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ffc-pay-etl-framework",
3
- "version": "2.0.0",
3
+ "version": "2.0.3",
4
4
  "description": "A framework for creating ETL pipelines in node",
5
5
  "main": "index.js",
6
6
  "repository": "https://github.com/DEFRA/ffc-pay-etl-framework",
@@ -43,4 +43,4 @@
43
43
  "**/test-output/**"
44
44
  ]
45
45
  }
46
- }
46
+ }