@myparcel-dev/pdk-checkout-common 2.1.1 → 2.1.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/CHANGELOG.md CHANGED
@@ -2,6 +2,16 @@
2
2
 
3
3
  <!-- MONOWEAVE:BELOW -->
4
4
 
5
+ ## [2.1.2](https://github.com/myparcelnl/js-pdk/compare/@myparcel-dev/pdk-checkout-common@2.1.1...@myparcel-dev/pdk-checkout-common@2.1.2) "@myparcel-dev/pdk-checkout-common" (2026-08-13)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * prevent using stale address data ([#358](https://github.com/myparcelnl/js-pdk/issues/358)) ([1231e1c](https://github.com/myparcelnl/js-pdk/commit/1231e1c1456f6759e87bcbb5496658c58b6a973a))
11
+
12
+
13
+
14
+
5
15
  ## [2.1.1](https://github.com/myparcelnl/js-pdk/compare/@myparcel-dev/pdk-checkout-common@2.1.0...@myparcel-dev/pdk-checkout-common@2.1.1) "@myparcel-dev/pdk-checkout-common" (2026-08-07)
6
16
 
7
17
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@myparcel-dev/pdk-checkout-common",
3
- "version": "2.1.1",
3
+ "version": "2.1.3",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/myparcelnl/js-pdk.git",
@@ -29,7 +29,7 @@
29
29
  "dependencies": {
30
30
  "@myparcel-dev/constants": "^2.7.0",
31
31
  "@myparcel-dev/delivery-options": "^7.5.0",
32
- "@myparcel-dev/pdk-common": "^2.1.1",
32
+ "@myparcel-dev/pdk-common": "^2.1.2",
33
33
  "radash": "^12.1.0"
34
34
  },
35
35
  "devDependencies": {
@@ -1,6 +1,6 @@
1
- import {getAddressType, useCheckoutStore, useConfig} from '../utils';
1
+ import {useCheckoutStore, useConfig} from '../utils';
2
2
  import {type PdkCheckoutForm, type PdkFormData} from '../types';
3
- import {type AddressField, AddressType, type PdkField} from '../data';
3
+ import {type AddressField, AddressType, PdkField} from '../data';
4
4
 
5
5
  const getEntry = (data: PdkFormData, value: undefined | string): string => {
6
6
  return (data[value as string] as string | undefined) ?? '';
@@ -28,11 +28,11 @@ export const updateCheckoutForm = (): void => {
28
28
  return;
29
29
  }
30
30
 
31
- transformedData[key as PdkField] = getEntry(data, value as string);
31
+ (transformedData as Record<PdkField, string>)[key as PdkField] = getEntry(data, value as string);
32
32
  });
33
33
 
34
34
  void checkout.set({
35
- addressType: getAddressType(),
35
+ addressType: config.getAddressType(transformedData[PdkField.AddressType]),
36
36
  form: Object.freeze({...transformedData}),
37
37
  });
38
38
  };