ga4-export-fixer 0.4.3-dev.2 → 0.4.3-dev.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ga4-export-fixer",
3
- "version": "0.4.3-dev.2",
3
+ "version": "0.4.3-dev.3",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "files": [
@@ -343,12 +343,11 @@ const createEnhancedEventsTable = (dataformPublish, config) => {
343
343
  columns: documentation.getColumnDescriptions(mergedConfig),
344
344
  };
345
345
 
346
- // Build dataformTableConfig: static defaults (from defaultConfig.js) → dynamic fields → user overrides
347
- // Uses defaultConfig.dataformTableConfig directly for defaults and config.dataformTableConfig
348
- // directly for user overrides, bypassing mergeSQLConfigurations for this merge to ensure
349
- // defaults are always applied and mergeDataformTableConfigurations handles tags correctly.
346
+ // Build dataformTableConfig: static defaults (from defaultConfig.js) → dynamic fields → user overrides.
347
+ // Deep-clone defaults to prevent Dataform's publish() from mutating nested objects (e.g. bigquery)
348
+ // across multiple createTable calls in the same process.
350
349
  const dataformTableConfig = utils.mergeDataformTableConfigurations(
351
- { ...(defaultConfig.dataformTableConfig || {}), ...dynamicFields },
350
+ { ...JSON.parse(JSON.stringify(defaultConfig.dataformTableConfig || {})), ...dynamicFields },
352
351
  config.dataformTableConfig
353
352
  );
354
353