Skip to content

Commit d999c39

Browse files
committed
Update metadata to libphonenumber v9.0.30
1 parent c4816b9 commit d999c39

46 files changed

Lines changed: 6203 additions & 6071 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/METADATA_UPDATE_LOG.md

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# Metadata Update Log
2+
3+
This file records upstream comparison results for metadata updates. Keep entries concise, command-based, and reviewable so future updates do not need to rediscover the same baseline.
4+
5+
## 2026-05-12: Google libphonenumber v9.0.30
6+
7+
### Scope
8+
9+
- Previous local main and short-number metadata matched Google libphonenumber `v9.0.25`.
10+
- Updated main phone-number metadata to `v9.0.30`.
11+
- Updated short-number metadata to `v9.0.30`.
12+
- Updated testing metadata to `v9.0.30`.
13+
- Updated geocoding metadata to `v9.0.30`.
14+
- Added geocoding locale database `kk.db`.
15+
16+
### Upstream Logic And Test Comparison
17+
18+
Compared these JavaScript files between `v9.0.25` and `v9.0.30`:
19+
20+
- `javascript/i18n/phonenumbers/phonenumberutil.js`
21+
- `javascript/i18n/phonenumbers/phonenumberutil_test.js`
22+
- `javascript/i18n/phonenumbers/asyoutypeformatter.js`
23+
- `javascript/i18n/phonenumbers/asyoutypeformatter_test.js`
24+
- `javascript/i18n/phonenumbers/shortnumberinfo.js`
25+
- `javascript/i18n/phonenumbers/shortnumberinfo_test.js`
26+
27+
Result: all files were unchanged. No required ObjC logic port or new upstream JS test port was identified for this metadata update.
28+
29+
Upstream Java had a `PhoneNumberUtil.formatInOriginalFormat` refactor between `v9.0.25` and `v9.0.30`, but the JavaScript implementation remained unchanged. This project tracks Google JavaScript parity, so no immediate ObjC change was applied for that Java-only diff.
30+
31+
Carrier and timezone data changed upstream, but this project does not currently package carrier mapper or timezone metadata.
32+
33+
### Commands
34+
35+
```bash
36+
swift scripts/metadataGenerator.swift v9.0.30 --pretty
37+
swift scripts/updateGeocodingMetadata.swift v9.0.30 --replace-bundle
38+
39+
swift scripts/checkUpstreamTestParity.swift --upstream-ref v9.0.30
40+
swift scripts/checkUpstreamAPIParity.swift --upstream-ref v9.0.30
41+
swift scripts/checkVersionConsistency.swift
42+
swift test
43+
LC_ALL=ko_KR.UTF-8 LANG=ko_KR.UTF-8 swift test
44+
swift build -c release
45+
git diff --check
46+
47+
pod lib lint libPhoneNumber-iOS.podspec --allow-warnings
48+
pod lib lint libPhoneNumberGeocoding.podspec --allow-warnings --include-podspecs='*.podspec'
49+
pod lib lint libPhoneNumberShortNumber.podspec --allow-warnings --include-podspecs='*.podspec'
50+
pod lib lint libPhoneNumberSwift.podspec --allow-warnings --include-podspecs='*.podspec'
51+
```
52+
53+
### Results
54+
55+
- Upstream JS test parity: passed, 172 upstream JS tests and 180 local ObjC tests.
56+
- Upstream JS API parity: passed, 66 upstream JS public prototype methods and 93 local ObjC public selectors.
57+
- Version consistency: passed for `1.4.0`.
58+
- SwiftPM default locale tests: passed, 204 tests.
59+
- SwiftPM Korean locale tests: passed, 204 tests.
60+
- Release build: passed.
61+
- Whitespace check: passed.
62+
- CocoaPods lint: all four podspecs passed validation.
63+
- Geocoding database sanity check: 34 databases, `en.db` has 151 geocoding tables, `kk.db` has 1 geocoding table.
64+
65+
### Notes
66+
67+
- `libPhoneNumberGeocoding` and `libPhoneNumberShortNumber` still emit CocoaPods Swift version warnings because those podspecs do not specify Swift version metadata. Validation passes with `--allow-warnings`.
68+
- No malformed geocoding database names such as `(null)*.db` were generated.

docs/TESTING.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ For metadata updates:
9898
- `swift scripts/checkUpstreamAPIParity.swift --upstream-ref <metadata-ref>`
9999
- `swift scripts/updateGeocodingMetadata.swift <metadata-ref> --output /tmp/geocoding-review` if geocoding metadata changed upstream.
100100
- `scripts/testGeocodingMetadataUpdater.sh` if the geocoding updater changed.
101+
- Update `docs/METADATA_UPDATE_LOG.md` with the upstream comparison and validation results.
101102
- `swift test`
102103
- `LC_ALL=ko_KR.UTF-8 LANG=ko_KR.UTF-8 swift test`
103104
- `swift build -c release`

docs/UPSTREAM_PARITY.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ After updating metadata:
145145
2. Run the upstream test and API parity checks against the same upstream ref used for metadata.
146146
3. Run the full test matrix in `docs/TESTING.md`.
147147
4. If upstream tests changed, port the new or renamed tests before merging.
148+
5. Record the upstream comparison and validation results in `docs/METADATA_UPDATE_LOG.md`.
148149

149150
Geocoding metadata is maintained through the command-line updater:
150151

@@ -159,6 +160,7 @@ Use `--output <dir>` to inspect generated databases before replacing the checked
159160
Every PR that updates metadata or upstream-synced behavior should include:
160161

161162
- The Google libphonenumber ref used.
163+
- The `docs/METADATA_UPDATE_LOG.md` entry added or updated for the change.
162164
- The test parity and API parity commands and results.
163165
- The test commands and result.
164166
- Any intentional ObjC/API naming differences.

0 commit comments

Comments
 (0)