worldwide 2.0.1 → 2.1.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c1e48911b7e2ca19bd024f14a60068270a55cc29cedd342129cfaace9a963780
4
- data.tar.gz: f09993a550d2fc95ff3cb95b1c26682cd4e04acf00579c771db8d9d2171f7a17
3
+ metadata.gz: de8a80d57087c079ab1c023b73df7bab83b8e4d4efca610ada4fc1b36bf8a1fa
4
+ data.tar.gz: cb20c9fecdf12aaa8b8833deb5c19e7322e0799aa2f9bdb3fabba01d398d48f1
5
5
  SHA512:
6
- metadata.gz: efbf75640ba7d6281b7dd1ef56a0e1f9a01d8fb5ecbb5cf92d30b139cbe2d0f01d82622d17c841228ca39de9846b6486d4ac9c716d5ea70fa859d3861726190c
7
- data.tar.gz: 9962e78b12862e4bcfe3aa79a709b575dc0a405e402e23514c852ff14447109672d60d8a066d29d0941764dbf340204b531fed23d201c40ca3a1414475a75f4b
6
+ metadata.gz: 7bdd5c312d07f9ecf26be0ee0946d62d1d88980f9c071e8285972e85d68aa2cae9b236d053a6103098ceeef3246c7edf245c34873f3e06ad1b5cf86bc85869bf
7
+ data.tar.gz: b0a9fad71543e55efcb30e3fc3a2523602ca6f66e8f7455f19f5ab4101f6b0aadbe9f520259fc4d9776308d65fd9602fd0f98682cfa3faee6f5caa3bd434de2a
@@ -13,6 +13,12 @@ updates:
13
13
  update-types:
14
14
  - minor
15
15
  - patch
16
+ ignore:
17
+ # Dependabot resolves the bundle with Ruby 3.1.7, the lowest version
18
+ # worldwide.gemspec allows. pry-byebug >= 3.12 requires Ruby >= 3.2, so
19
+ # every attempt to update it fails. The Gemfile also caps it at < 3.12.
20
+ - dependency-name: "pry-byebug"
21
+ versions: [">= 3.12"]
16
22
  - package-ecosystem: npm
17
23
  directory: "/lang/typescript"
18
24
  schedule:
data/CHANGELOG.md CHANGED
@@ -29,6 +29,14 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
29
29
 
30
30
  ---
31
31
 
32
+ ## [2.1.0] - 2026-11-10
33
+
34
+ - Accept Panama's 10-character postal codes (`XXXXX-XXXXX`, for example `ADC96-M8H44`), as well as the 4-digit codes. `Zip.normalize` puts the hyphen after the 5th character. [#678](https://github.com/Shopify/worldwide/pull/678)
35
+ - Add street-first `address1` formats for AR, AT, BE, BR, CH, CL, CZ, ES, FI, HU, MX, NO, PT, SE, and UY.
36
+ - Add the XCG (Caribbean guilder) currency, which replaced ANG in Curaçao and Sint Maarten on 2025-03-31. XCG has English, Dutch and Spanish names, the symbol `Cg` and 2 decimal places. ANG is unchanged and still available. XCG has no numeric code yet, because ISO gives it 532, the code ANG uses, so `Worldwide::Currencies.alpha_code_for(532)` still returns `"ANG"`.
37
+
38
+ ---
39
+
32
40
  ## [2.0.1] - 2026-10-27
33
41
 
34
42
  - Dependabot now groups minor and patch updates into one pull request per ecosystem (bundler, npm, GitHub Actions) and limits open pull requests to 5. [#655](https://github.com/Shopify/worldwide/pull/655)
data/Gemfile CHANGED
@@ -20,7 +20,10 @@ group :development do
20
20
  gem "rubocop-shopify", require: false
21
21
  gem "rubocop", require: false
22
22
  gem "ruby-lsp", require: false
23
- gem "pry-byebug", require: false
23
+ # pry-byebug >= 3.12 requires Ruby >= 3.2, but the gemspec still supports Ruby 3.1.
24
+ # Keep the lockfile installable on Ruby 3.1. Dependabot ignores newer versions
25
+ # via .github/dependabot.yml.
26
+ gem "pry-byebug", "< 3.12", require: false
24
27
  end
25
28
 
26
29
  group :test do
data/Gemfile.lock CHANGED
@@ -13,7 +13,7 @@ GIT
13
13
  PATH
14
14
  remote: .
15
15
  specs:
16
- worldwide (2.0.1)
16
+ worldwide (2.1.0)
17
17
  activesupport (>= 7.0)
18
18
  i18n (>= 1.15)
19
19
  phonelib (~> 0.8)
@@ -82,7 +82,7 @@ GEM
82
82
  racc (1.8.1)
83
83
  rainbow (3.1.1)
84
84
  rake (13.4.2)
85
- rake-compiler (1.3.1)
85
+ rake-compiler (1.3.3)
86
86
  rake
87
87
  rbs (3.10.4)
88
88
  logger
@@ -145,7 +145,7 @@ DEPENDENCIES
145
145
  minitest-focus
146
146
  minitest-reporters
147
147
  mocha
148
- pry-byebug
148
+ pry-byebug (< 3.12)
149
149
  rake (~> 13.4)
150
150
  rake-compiler
151
151
  rubocop
@@ -1111,6 +1111,10 @@ en:
1111
1111
  name: East Caribbean Dollar
1112
1112
  one: East Caribbean dollar
1113
1113
  other: East Caribbean dollars
1114
+ XCG:
1115
+ name: Caribbean Guilder
1116
+ one: Caribbean guilder
1117
+ other: Caribbean guilders
1114
1118
  XDR:
1115
1119
  name: Special Drawing Rights
1116
1120
  one: special drawing rights
@@ -1477,6 +1477,11 @@ es:
1477
1477
  one: dólar del Caribe Oriental
1478
1478
  other: dólares del Caribe Oriental
1479
1479
  symbol: XCD
1480
+ XCG:
1481
+ many: florines caribeños
1482
+ name: florín caribeño
1483
+ one: florín caribeño
1484
+ other: florines caribeños
1480
1485
  XDR:
1481
1486
  name: derechos especiales de giro
1482
1487
  XEU:
@@ -1471,6 +1471,10 @@ nl:
1471
1471
  one: Oost-Caribische dollar
1472
1472
  other: Oost-Caribische dollar
1473
1473
  symbol: EC$
1474
+ XCG:
1475
+ name: Caribische gulden
1476
+ one: Caribische gulden
1477
+ other: Caribische gulden
1474
1478
  XDR:
1475
1479
  name: Special Drawing Rights
1476
1480
  one: Special Drawing Rights
@@ -217,6 +217,8 @@ root:
217
217
  XCD:
218
218
  narrow_symbol: "$"
219
219
  symbol: EC$
220
+ XCG:
221
+ symbol: Cg
220
222
  XOF:
221
223
  symbol: F CFA
222
224
  XPF:
@@ -393,6 +393,9 @@ XBD:
393
393
  three_digit_code: "958"
394
394
  XCD:
395
395
  three_digit_code: "951"
396
+ # XCG (Caribbean guilder) has ISO numeric code 532, which it shares with ANG, the currency it replaced in
397
+ # Curaçao and Sint Maarten on 2025-03-31. XCG is left out of this list so that numeric code 532 keeps
398
+ # resolving to ANG until ANG is retired.
396
399
  XDR:
397
400
  three_digit_code: "960"
398
401
  XOF:
@@ -311,6 +311,8 @@ XAF:
311
311
  digits: 0
312
312
  XCD:
313
313
  digits: 2
314
+ XCG:
315
+ digits: 2
314
316
  XOF:
315
317
  digits: 0
316
318
  XPF:
data/data/regions/AR.yml CHANGED
@@ -14,6 +14,7 @@ building_number_required: true
14
14
  zip_regex: "^[A-Z]?\\d{4}([A-Z]{3})?$"
15
15
  week_start_day: sunday
16
16
  format:
17
+ address1: "{street} {building_num}"
17
18
  edit: "{country}_{firstName}{lastName}_{company}_{address1}_{address2}_{zip}{city}{province}_{phone}"
18
19
  show: "{firstName} {lastName}_{company}_{address1}_{address2}_{zip} {city} {province}_{country}_{phone}"
19
20
  emoji: "\U0001F1E6\U0001F1F7"
data/data/regions/AT.yml CHANGED
@@ -24,6 +24,7 @@ example_address:
24
24
  zip: '1015'
25
25
  phone: "+43 1 53410"
26
26
  format:
27
+ address1: "{street} {building_num}"
27
28
  edit: "{country}_{firstName}{lastName}_{company}_{address1}_{address2}_{zip}{city}_{phone}"
28
29
  show: "{firstName} {lastName}_{company}_{address1}_{address2}_{zip} {city}_{country}_{phone}"
29
30
  emoji: "\U0001F1E6\U0001F1F9"
data/data/regions/BE.yml CHANGED
@@ -27,6 +27,7 @@ example_address:
27
27
  zip: '1000'
28
28
  phone: "+32 (0)2-551.20.20"
29
29
  format:
30
+ address1: "{street} {building_num}"
30
31
  edit: "{country}_{firstName}{lastName}_{company}_{address1}_{address2}_{zip}{city}_{phone}"
31
32
  show: "{firstName} {lastName}_{company}_{address1}_{address2}_{zip} {city}_{country}_{phone}"
32
33
  format_extended:
data/data/regions/BR.yml CHANGED
@@ -24,6 +24,7 @@ example_address:
24
24
  zip: 70050-000
25
25
  phone: "+55 61 3224-4073"
26
26
  format:
27
+ address1: "{street}, {building_num}"
27
28
  edit: "{country}_{firstName}{lastName}_{company}_{zip}_{address1}_{address2}_{city}{province}_{phone}"
28
29
  show: "{firstName} {lastName}_{company}_{address1}_{address2}_{zip} {city} {province}_{country}_{phone}"
29
30
  format_extended:
data/data/regions/CH.yml CHANGED
@@ -28,6 +28,7 @@ example_address:
28
28
  zip: '3003'
29
29
  phone: "+41 31 377 77 77"
30
30
  format:
31
+ address1: "{street} {building_num}"
31
32
  edit: "{country}_{firstName}{lastName}_{company}_{address1}_{address2}_{zip}{city}_{phone}"
32
33
  show: "{firstName} {lastName}_{company}_{address1}_{address2}_{zip} {city}_{country}_{phone}"
33
34
  emoji: "\U0001F1E8\U0001F1ED"
data/data/regions/CL.yml CHANGED
@@ -12,6 +12,7 @@ zip_example: '8340457'
12
12
  phone_number_prefix: 56
13
13
  week_start_day: sunday
14
14
  format:
15
+ address1: "{street} {building_num}"
15
16
  edit: "{country}_{firstName}{lastName}_{company}_{address1}_{address2}_{zip}{city}_{province}_{phone}"
16
17
  show: "{firstName} {lastName}_{company}_{address1}_{address2}_{zip} {city}_{province}_{country}_{phone}"
17
18
  format_extended:
data/data/regions/CZ.yml CHANGED
@@ -18,6 +18,7 @@ phone_number_prefix: 420
18
18
  building_number_required: true
19
19
  week_start_day: monday
20
20
  format:
21
+ address1: "{street} {building_num}"
21
22
  edit: "{country}_{firstName}{lastName}_{company}_{address1}_{address2}_{zip}{city}_{phone}"
22
23
  show: "{firstName} {lastName}_{company}_{address1}_{address2}_{zip} {city}_{country}_{phone}"
23
24
  emoji: "\U0001F1E8\U0001F1FF"
data/data/regions/ES.yml CHANGED
@@ -25,6 +25,7 @@ example_address:
25
25
  zip: '28004'
26
26
  phone: "+34 91 701 72 67"
27
27
  format:
28
+ address1: "{street} {building_num}"
28
29
  edit: "{country}_{firstName}{lastName}_{company}_{address1}_{address2}_{zip}{city}{province}_{phone}"
29
30
  show: "{firstName} {lastName}_{company}_{address1}_{address2}_{zip} {city}_{province}_{country}_{phone}"
30
31
  format_extended:
data/data/regions/FI.yml CHANGED
@@ -17,6 +17,7 @@ phone_number_prefix: 358
17
17
  building_number_required: true
18
18
  week_start_day: monday
19
19
  format:
20
+ address1: "{street} {building_num}"
20
21
  edit: "{country}_{firstName}{lastName}_{company}_{address1}_{address2}_{zip}{city}_{phone}"
21
22
  show: "{firstName} {lastName}_{company}_{address1}_{address2}_{zip} {city}_{country}_{phone}"
22
23
  emoji: "\U0001F1EB\U0001F1EE"
data/data/regions/HU.yml CHANGED
@@ -14,6 +14,7 @@ phone_number_prefix: 36
14
14
  building_number_required: true
15
15
  week_start_day: monday
16
16
  format:
17
+ address1: "{street} {building_num}"
17
18
  edit: "{country}_{firstName}{lastName}_{company}_{zip}{city}_{address1}_{address2}_{phone}"
18
19
  show: "{firstName} {lastName}_{company}_{zip} {city}_{address1}_{address2}_{country}_{phone}"
19
20
  tags:
data/data/regions/MX.yml CHANGED
@@ -14,6 +14,7 @@ phone_number_prefix: 52
14
14
  building_number_required: true
15
15
  week_start_day: sunday
16
16
  format:
17
+ address1: "{street} {building_num}"
17
18
  edit: "{country}_{firstName}{lastName}_{company}_{address1}_{address2}_{zip}{city}{province}_{phone}"
18
19
  show: "{firstName} {lastName}_{company}_{address1}_{address2}_{zip} {city} {province}_{country}_{phone}"
19
20
  format_extended:
data/data/regions/NO.yml CHANGED
@@ -24,6 +24,7 @@ example_address:
24
24
  zip: '0287'
25
25
  phone: "+47 22 13 52 80"
26
26
  format:
27
+ address1: "{street} {building_num}"
27
28
  edit: "{country}_{firstName}{lastName}_{company}_{address1}_{address2}_{zip}{city}_{phone}"
28
29
  show: "{firstName} {lastName}_{company}_{address1}_{address2}_{zip} {city}_{country}_{phone}"
29
30
  emoji: "\U0001F1F3\U0001F1F4"
data/data/regions/PA.yml CHANGED
@@ -7,8 +7,8 @@ unit_system: metric
7
7
  tax_name: ITBMS
8
8
  group: Central American Countries
9
9
  group_name: Central America
10
- zip_regex: "^\\d{4}$"
11
- zip_example: "0801"
10
+ zip_regex: "^(?:\\d{4}|[A-Z0-9]{2}[2-9A-HJ-NP-TV-XZ]{3}[ -]?[2-9A-HJ-NP-TV-XZ]{5})$"
11
+ zip_example: "ADC96-M8H44"
12
12
  zip_requirement: optional
13
13
  phone_number_prefix: 507
14
14
  week_start_day: sunday
@@ -45,7 +45,7 @@ example_address:
45
45
  address2: y entre calles 35 y, C. 36 Este, ⁠El Marañón
46
46
  city: Panamá
47
47
  province_code: PA-8
48
- zip: '0815'
48
+ zip: ADC96-M8H44
49
49
  phone: "+507 524-8900"
50
50
  zones:
51
51
  - name: Bocas del Toro
data/data/regions/PT.yml CHANGED
@@ -17,6 +17,7 @@ tags:
17
17
  - EU-member
18
18
  week_start_day: monday
19
19
  format:
20
+ address1: "{street} {building_num}"
20
21
  edit: "{country}_{firstName}{lastName}_{company}_{address1}_{address2}_{zip}{city}{province}_{phone}"
21
22
  show: "{firstName} {lastName}_{company}_{address1}_{address2}_{zip} {city}_{province}_{country}_{phone}"
22
23
  emoji: "\U0001F1F5\U0001F1F9"
data/data/regions/SE.yml CHANGED
@@ -24,6 +24,7 @@ example_address:
24
24
  zip: 103 16
25
25
  phone: "+46 8 534 818 00"
26
26
  format:
27
+ address1: "{street} {building_num}"
27
28
  edit: "{country}_{firstName}{lastName}_{company}_{address1}_{address2}_{zip}{city}_{phone}"
28
29
  show: "{firstName} {lastName}_{company}_{address1}_{address2}_{zip} {city}_{country}_{phone}"
29
30
  emoji: "\U0001F1F8\U0001F1EA"
data/data/regions/UY.yml CHANGED
@@ -11,6 +11,7 @@ zip_example: '11600'
11
11
  phone_number_prefix: 598
12
12
  week_start_day: monday
13
13
  format:
14
+ address1: "{street} {building_num}"
14
15
  edit: "{country}_{firstName}{lastName}_{company}_{address1}_{address2}_{zip}{city}{province}_{phone}"
15
16
  show: "{firstName} {lastName}_{company}_{address1}_{address2}_{zip} {city}, {province}_{country}_{phone}"
16
17
  emoji: "\U0001F1FA\U0001F1FE"
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Worldwide
4
- VERSION = "2.0.1"
4
+ VERSION = "2.1.0"
5
5
  end
data/lib/worldwide/zip.rb CHANGED
@@ -396,6 +396,7 @@ module Worldwide
396
396
  MT: [[7, " ", 3], [5, " ", 3]],
397
397
 
398
398
  NL: [[6, " ", 4]],
399
+ PA: [[10, "-", 5]],
399
400
  PL: [[5, "-", 2]],
400
401
  PN: [[7, " ", 4]],
401
402
  PT: [[7, "-", 4]],
@@ -515,7 +516,6 @@ module Worldwide
515
516
  "NP",
516
517
  "NZ",
517
518
  "OM",
518
- "PA",
519
519
  "PF",
520
520
  "PG",
521
521
  "PH",
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: worldwide
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.1
4
+ version: 2.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shopify