intl-tel-input 18.1.5 → 18.1.7

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.
Files changed (164) hide show
  1. package/.github/CONTRIBUTING.md +1 -0
  2. package/build/js/data.js +1 -1
  3. package/build/js/data.min.js +1 -1
  4. package/build/js/intlTelInput-jquery.js +25 -11
  5. package/build/js/intlTelInput-jquery.min.js +3 -3
  6. package/build/js/intlTelInput.js +25 -11
  7. package/build/js/intlTelInput.min.js +3 -3
  8. package/build/js/utils.js +85 -85
  9. package/composer.json +1 -1
  10. package/package.json +10 -2
  11. package/src/js/intlTelInput.js +27 -12
  12. package/src/spec/tests/methods/setCountry.js +44 -0
  13. package/third_party/libphonenumber/.github/CODEOWNERS +3 -0
  14. package/third_party/libphonenumber/.github/dependabot.yml +81 -0
  15. package/third_party/libphonenumber/.github/workflows/codeql.yml +83 -0
  16. package/third_party/libphonenumber/.github/workflows/dependency-review.yml +27 -0
  17. package/third_party/libphonenumber/.github/workflows/scorecards.yml +76 -0
  18. package/third_party/libphonenumber/.github/workflows/unit-test.yml +16 -3
  19. package/third_party/libphonenumber/README.md +5 -1
  20. package/third_party/libphonenumber/cpp/src/phonenumbers/lite_metadata.cc +12143 -12138
  21. package/third_party/libphonenumber/cpp/src/phonenumbers/metadata.cc +12188 -12184
  22. package/third_party/libphonenumber/cpp/src/phonenumbers/short_metadata.cc +2955 -2955
  23. package/third_party/libphonenumber/java/carrier/pom.xml +4 -4
  24. package/third_party/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/226_en +0 -0
  25. package/third_party/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/227_en +0 -0
  26. package/third_party/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/229_en +0 -0
  27. package/third_party/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/230_en +0 -0
  28. package/third_party/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/252_en +0 -0
  29. package/third_party/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/32_en +0 -0
  30. package/third_party/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/33_en +0 -0
  31. package/third_party/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/351_en +0 -0
  32. package/third_party/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/372_en +0 -0
  33. package/third_party/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/420_en +0 -0
  34. package/third_party/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/51_en +0 -0
  35. package/third_party/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/686_en +0 -0
  36. package/third_party/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/692_en +0 -0
  37. package/third_party/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/968_en +0 -0
  38. package/third_party/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/972_en +0 -0
  39. package/third_party/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/98_en +0 -0
  40. package/third_party/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/98_fa +0 -0
  41. package/third_party/libphonenumber/java/demo/pom.xml +5 -5
  42. package/third_party/libphonenumber/java/geocoder/pom.xml +4 -4
  43. package/third_party/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1472_en +0 -0
  44. package/third_party/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/61_en +0 -0
  45. package/third_party/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/686_en +0 -0
  46. package/third_party/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/95_en +0 -0
  47. package/third_party/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/config +0 -0
  48. package/third_party/libphonenumber/java/internal/prefixmapper/pom.xml +3 -3
  49. package/third_party/libphonenumber/java/libphonenumber/pom.xml +2 -2
  50. package/third_party/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AU +0 -0
  51. package/third_party/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BD +0 -0
  52. package/third_party/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BE +0 -0
  53. package/third_party/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BF +0 -0
  54. package/third_party/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BJ +0 -0
  55. package/third_party/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BL +0 -0
  56. package/third_party/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CC +0 -0
  57. package/third_party/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CG +0 -0
  58. package/third_party/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CX +0 -0
  59. package/third_party/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_EE +0 -0
  60. package/third_party/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_ET +0 -0
  61. package/third_party/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GB +0 -0
  62. package/third_party/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GF +0 -0
  63. package/third_party/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GP +0 -0
  64. package/third_party/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_IL +0 -0
  65. package/third_party/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_IR +0 -0
  66. package/third_party/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KI +0 -0
  67. package/third_party/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_LR +0 -0
  68. package/third_party/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MF +0 -0
  69. package/third_party/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MH +0 -0
  70. package/third_party/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MM +0 -0
  71. package/third_party/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MN +0 -0
  72. package/third_party/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MU +0 -0
  73. package/third_party/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_NE +0 -0
  74. package/third_party/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_NO +0 -0
  75. package/third_party/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_NZ +0 -0
  76. package/third_party/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_OM +0 -0
  77. package/third_party/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_QA +0 -0
  78. package/third_party/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_RE +0 -0
  79. package/third_party/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SG +0 -0
  80. package/third_party/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SO +0 -0
  81. package/third_party/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SV +0 -0
  82. package/third_party/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TJ +0 -0
  83. package/third_party/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_US +0 -0
  84. package/third_party/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_YT +0 -0
  85. package/third_party/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_CZ +0 -0
  86. package/third_party/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_QA +0 -0
  87. package/third_party/libphonenumber/java/pom.xml +2 -2
  88. package/third_party/libphonenumber/javascript/i18n/phonenumbers/demo-compiled.js +91 -91
  89. package/third_party/libphonenumber/javascript/i18n/phonenumbers/metadata.js +45 -45
  90. package/third_party/libphonenumber/javascript/i18n/phonenumbers/metadatalite.js +45 -45
  91. package/third_party/libphonenumber/javascript/i18n/phonenumbers/shortnumbermetadata.js +6 -6
  92. package/third_party/libphonenumber/metadata/metadata.zip +0 -0
  93. package/third_party/libphonenumber/release_notes.txt +36 -0
  94. package/third_party/libphonenumber/resources/PhoneNumberMetadata.xml +230 -231
  95. package/third_party/libphonenumber/resources/ShortNumberMetadata.xml +19 -6
  96. package/third_party/libphonenumber/resources/carrier/en/226.txt +1 -0
  97. package/third_party/libphonenumber/resources/carrier/en/227.txt +1 -0
  98. package/third_party/libphonenumber/resources/carrier/en/229.txt +3 -0
  99. package/third_party/libphonenumber/resources/carrier/en/230.txt +3 -0
  100. package/third_party/libphonenumber/resources/carrier/en/252.txt +2 -4
  101. package/third_party/libphonenumber/resources/carrier/en/32.txt +1 -0
  102. package/third_party/libphonenumber/resources/carrier/en/33.txt +2 -0
  103. package/third_party/libphonenumber/resources/carrier/en/351.txt +1 -2
  104. package/third_party/libphonenumber/resources/carrier/en/372.txt +4 -1
  105. package/third_party/libphonenumber/resources/carrier/en/420.txt +2 -0
  106. package/third_party/libphonenumber/resources/carrier/en/51.txt +3 -0
  107. package/third_party/libphonenumber/resources/carrier/en/686.txt +165 -0
  108. package/third_party/libphonenumber/resources/carrier/en/692.txt +3 -1
  109. package/third_party/libphonenumber/resources/carrier/en/968.txt +1 -0
  110. package/third_party/libphonenumber/resources/carrier/en/972.txt +2 -0
  111. package/third_party/libphonenumber/resources/carrier/en/98.txt +1 -0
  112. package/third_party/libphonenumber/resources/carrier/fa/98.txt +1 -0
  113. package/third_party/libphonenumber/resources/geocoding/en/1.txt +1 -6
  114. package/third_party/libphonenumber/resources/geocoding/en/61.txt +331 -245
  115. package/third_party/libphonenumber/resources/geocoding/en/686.txt +11 -8
  116. package/third_party/libphonenumber/resources/geocoding/en/95.txt +0 -1
  117. package/third_party/libphonenumber/resources/metadata/1/ranges.csv +1 -6
  118. package/third_party/libphonenumber/resources/metadata/226/ranges.csv +1 -0
  119. package/third_party/libphonenumber/resources/metadata/227/ranges.csv +1 -0
  120. package/third_party/libphonenumber/resources/metadata/229/ranges.csv +2 -2
  121. package/third_party/libphonenumber/resources/metadata/230/ranges.csv +4 -1
  122. package/third_party/libphonenumber/resources/metadata/231/ranges.csv +0 -1
  123. package/third_party/libphonenumber/resources/metadata/242/ranges.csv +1 -1
  124. package/third_party/libphonenumber/resources/metadata/251/ranges.csv +3 -2
  125. package/third_party/libphonenumber/resources/metadata/252/ranges.csv +5 -6
  126. package/third_party/libphonenumber/resources/metadata/262/ranges.csv +3 -3
  127. package/third_party/libphonenumber/resources/metadata/27/ranges.csv +28 -26
  128. package/third_party/libphonenumber/resources/metadata/32/ranges.csv +4 -14
  129. package/third_party/libphonenumber/resources/metadata/33/operators.csv +1 -0
  130. package/third_party/libphonenumber/resources/metadata/33/ranges.csv +22 -20
  131. package/third_party/libphonenumber/resources/metadata/351/ranges.csv +1 -1
  132. package/third_party/libphonenumber/resources/metadata/353/ranges.csv +174 -207
  133. package/third_party/libphonenumber/resources/metadata/372/ranges.csv +1 -1
  134. package/third_party/libphonenumber/resources/metadata/41/ranges.csv +6 -6
  135. package/third_party/libphonenumber/resources/metadata/420/ranges.csv +2 -1
  136. package/third_party/libphonenumber/resources/metadata/420/shortcodes.csv +1 -1
  137. package/third_party/libphonenumber/resources/metadata/44/ranges.csv +1 -1
  138. package/third_party/libphonenumber/resources/metadata/47/formats.csv +3 -3
  139. package/third_party/libphonenumber/resources/metadata/47/ranges.csv +278 -278
  140. package/third_party/libphonenumber/resources/metadata/503/ranges.csv +2 -1
  141. package/third_party/libphonenumber/resources/metadata/51/ranges.csv +2 -1
  142. package/third_party/libphonenumber/resources/metadata/590/ranges.csv +1 -1
  143. package/third_party/libphonenumber/resources/metadata/594/ranges.csv +2 -2
  144. package/third_party/libphonenumber/resources/metadata/61/ranges.csv +316 -320
  145. package/third_party/libphonenumber/resources/metadata/64/ranges.csv +1 -0
  146. package/third_party/libphonenumber/resources/metadata/65/ranges.csv +1 -1
  147. package/third_party/libphonenumber/resources/metadata/686/ranges.csv +62 -48
  148. package/third_party/libphonenumber/resources/metadata/692/ranges.csv +1 -0
  149. package/third_party/libphonenumber/resources/metadata/880/ranges.csv +1 -0
  150. package/third_party/libphonenumber/resources/metadata/95/ranges.csv +2 -5
  151. package/third_party/libphonenumber/resources/metadata/968/ranges.csv +28 -27
  152. package/third_party/libphonenumber/resources/metadata/972/operators.csv +1 -0
  153. package/third_party/libphonenumber/resources/metadata/972/ranges.csv +126 -123
  154. package/third_party/libphonenumber/resources/metadata/974/ranges.csv +1 -1
  155. package/third_party/libphonenumber/resources/metadata/974/shortcodes.csv +8 -5
  156. package/third_party/libphonenumber/resources/metadata/976/ranges.csv +4 -2
  157. package/third_party/libphonenumber/resources/metadata/98/ranges.csv +2 -0
  158. package/third_party/libphonenumber/resources/metadata/992/ranges.csv +1 -0
  159. package/third_party/libphonenumber/tools/java/cpp-build/target/cpp-build-1.0-SNAPSHOT-jar-with-dependencies.jar +0 -0
  160. package/third_party/libphonenumber/tools/java/java-build/target/java-build-1.0-SNAPSHOT-jar-with-dependencies.jar +0 -0
  161. package/third_party/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/33_en +0 -0
  162. package/third_party/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/33_fr +0 -0
  163. package/third_party/libphonenumber/resources/geocoding/en/33.txt +0 -13939
  164. package/third_party/libphonenumber/resources/geocoding/fr/33.txt +0 -13940
package/composer.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jackocnr/intl-tel-input",
3
- "version": "18.1.5",
3
+ "version": "18.1.7",
4
4
  "description": "A JavaScript plugin for entering and validating international telephone numbers",
5
5
  "keywords": [
6
6
  "international",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "intl-tel-input",
3
- "version": "18.1.5",
3
+ "version": "18.1.7",
4
4
  "description": "A JavaScript plugin for entering and validating international telephone numbers",
5
5
  "keywords": [
6
6
  "international",
@@ -9,9 +9,17 @@
9
9
  "dial",
10
10
  "code",
11
11
  "telephone",
12
+ "phone",
12
13
  "mobile",
13
14
  "input",
14
- "flag"
15
+ "flag",
16
+ "dropdown",
17
+ "javascript",
18
+ "plugin",
19
+ "css",
20
+ "html",
21
+ "validation",
22
+ "formatting"
15
23
  ],
16
24
  "license": "MIT",
17
25
  "author": "Jack O'Connor (http://jackocnr.com)",
@@ -412,7 +412,6 @@ class Iti {
412
412
  role: "combobox",
413
413
  "aria-haspopup": "listbox",
414
414
  "aria-controls": `iti-${this.id}__country-listbox`,
415
- "aria-owns": `iti-${this.id}__country-listbox`,
416
415
  "aria-expanded": "false",
417
416
  "aria-label": "Telephone country code"
418
417
  })
@@ -1166,9 +1165,11 @@ class Iti {
1166
1165
  throw new Error(`No country data for '${countryCode}'`);
1167
1166
  }
1168
1167
 
1169
- // select the given flag, update the placeholder and the active list item
1168
+ // select the given flag, update the placeholder, title, and the active list item
1170
1169
  // Note: called from _setInitialState, _updateFlagFromNumber, _selectListItem, setCountry
1171
1170
  _setFlag(countryCode) {
1171
+ const { allowDropdown, separateDialCode, showFlags } = this.options;
1172
+
1172
1173
  const prevCountry = this.selectedCountryData.iso2
1173
1174
  ? this.selectedCountryData
1174
1175
  : {};
@@ -1182,21 +1183,16 @@ class Iti {
1182
1183
  this.defaultCountry = this.selectedCountryData.iso2;
1183
1184
  }
1184
1185
 
1185
- if (this.options.showFlags) {
1186
+ if (showFlags) {
1186
1187
  this.selectedFlagInner.setAttribute(
1187
1188
  "class",
1188
1189
  `iti__flag iti__${countryCode}`
1189
1190
  );
1190
1191
  }
1191
- // update the selected country's title attribute
1192
- if (this.selectedFlag) {
1193
- const title = countryCode
1194
- ? `${this.selectedCountryData.name}: +${this.selectedCountryData.dialCode}`
1195
- : "Unknown";
1196
- this.selectedFlag.setAttribute("title", title);
1197
- }
1198
1192
 
1199
- if (this.options.separateDialCode) {
1193
+ this._setSelectedCountryFlagTitleAttribute(countryCode, separateDialCode);
1194
+
1195
+ if (separateDialCode) {
1200
1196
  const dialCode = this.selectedCountryData.dialCode
1201
1197
  ? `+${this.selectedCountryData.dialCode}`
1202
1198
  : "";
@@ -1213,7 +1209,7 @@ class Iti {
1213
1209
  this._updatePlaceholder();
1214
1210
 
1215
1211
  // update the active list item
1216
- if (this.options.allowDropdown) {
1212
+ if (allowDropdown) {
1217
1213
  const prevItem = this.activeItem;
1218
1214
  if (prevItem) {
1219
1215
  prevItem.classList.remove("iti__active");
@@ -1238,6 +1234,25 @@ class Iti {
1238
1234
  return prevCountry.iso2 !== countryCode;
1239
1235
  }
1240
1236
 
1237
+ _setSelectedCountryFlagTitleAttribute(countryCode, separateDialCode) {
1238
+ if (!this.selectedFlag) {
1239
+ return;
1240
+ }
1241
+
1242
+ let title;
1243
+ if (countryCode && !separateDialCode) {
1244
+ title = `${this.selectedCountryData.name}: +${this.selectedCountryData.dialCode}`;
1245
+ } else if (countryCode) {
1246
+ // For screen reader output, we don't want to include the dial code in the reader output twice
1247
+ // so just use the selected country name here:
1248
+ title = this.selectedCountryData.name;
1249
+ } else {
1250
+ title = "Unknown";
1251
+ }
1252
+
1253
+ this.selectedFlag.setAttribute("title", title);
1254
+ }
1255
+
1241
1256
  // when the input is in a hidden container during initialisation, we must inject some markup
1242
1257
  // into the end of the DOM to calculate the correct offsetWidth
1243
1258
  // NOTE: this is only used when separateDialCode is enabled, so flagsContainer and selectedFlag
@@ -23,4 +23,48 @@ describe("setCountry: init plugin and calling public method setCountry()", funct
23
23
  expect(getInputVal()).toEqual("");
24
24
  });
25
25
 
26
+ describe("setting title attribute on flag container", function() {
27
+ describe("when separateDialCode is false", function() {
28
+ beforeEach(function() {
29
+ iti = window.intlTelInput(input[0], {
30
+ showFlags: true,
31
+ separateDialCode: false,
32
+ });
33
+ iti.setCountry(countryCode);
34
+ });
35
+
36
+ it("has the country name and dial code in the flag's title", function() {
37
+ expect(getSelectedFlagContainer().attr("title")).toEqual("United Kingdom: +44");
38
+ });
39
+ });
40
+
41
+ describe("when separateDialCode is true", function() {
42
+ beforeEach(function() {
43
+ iti = window.intlTelInput(input[0], {
44
+ showFlags: true,
45
+ separateDialCode: true,
46
+ });
47
+ iti.setCountry(countryCode);
48
+ });
49
+
50
+ it("has the country name but not the dial code in the flag's title", function() {
51
+ expect(getSelectedFlagContainer().attr("title")).toEqual("United Kingdom");
52
+ });
53
+ });
54
+
55
+
56
+ // setCountry errors out when country code is undefined, so we can likely remove this scenario and make country code a required param
57
+ describe("when countryCode is falsey", function() {
58
+ // beforeEach(function() {
59
+ // iti = window.intlTelInput(input[0], {
60
+ // showFlags: true,
61
+ // });
62
+ // iti.setCountry();
63
+ // });
64
+
65
+ it("sets the flag's title as Unknown", function() {
66
+ // expect(getSelectedFlagContainer().attr("title")).toEqual("Unknown");
67
+ });
68
+ })
69
+ });
26
70
  });
@@ -0,0 +1,3 @@
1
+ # The libphonenumber team can approve changes in all the paths in the project.
2
+ # This is done to make maintainance easy. Eg: Release cop can also approve changes going in.
3
+ * @google/libphonenumber
@@ -0,0 +1,81 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: github-actions
4
+ directory: /
5
+ schedule:
6
+ interval: daily
7
+
8
+ - package-ecosystem: maven
9
+ directory: /java/carrier
10
+ schedule:
11
+ interval: daily
12
+
13
+ - package-ecosystem: maven
14
+ directory: /java/demo
15
+ schedule:
16
+ interval: daily
17
+
18
+ - package-ecosystem: maven
19
+ directory: /java/geocoder
20
+ schedule:
21
+ interval: daily
22
+
23
+ - package-ecosystem: maven
24
+ directory: /java/internal/prefixmapper
25
+ schedule:
26
+ interval: daily
27
+
28
+ - package-ecosystem: maven
29
+ directory: /java/libphonenumber
30
+ schedule:
31
+ interval: daily
32
+
33
+ - package-ecosystem: maven
34
+ directory: /java
35
+ schedule:
36
+ interval: daily
37
+
38
+ - package-ecosystem: maven
39
+ directory: /metadata
40
+ schedule:
41
+ interval: daily
42
+
43
+ - package-ecosystem: maven
44
+ directory: /migrator/migrator-servlet
45
+ schedule:
46
+ interval: daily
47
+
48
+ - package-ecosystem: maven
49
+ directory: /migrator
50
+ schedule:
51
+ interval: daily
52
+
53
+ - package-ecosystem: maven
54
+ directory: /
55
+ schedule:
56
+ interval: daily
57
+
58
+ - package-ecosystem: maven
59
+ directory: /tools/java/common
60
+ schedule:
61
+ interval: daily
62
+
63
+ - package-ecosystem: maven
64
+ directory: /tools/java/cpp-build
65
+ schedule:
66
+ interval: daily
67
+
68
+ - package-ecosystem: maven
69
+ directory: /tools/java/data
70
+ schedule:
71
+ interval: daily
72
+
73
+ - package-ecosystem: maven
74
+ directory: /tools/java/java-build
75
+ schedule:
76
+ interval: daily
77
+
78
+ - package-ecosystem: maven
79
+ directory: /tools/java
80
+ schedule:
81
+ interval: daily
@@ -0,0 +1,83 @@
1
+ # For most projects, this workflow file will not need changing; you simply need
2
+ # to commit it to your repository.
3
+ #
4
+ # You may wish to alter this file to override the set of languages analyzed,
5
+ # or to provide custom queries or build logic.
6
+ #
7
+ # ******** NOTE ********
8
+ # We have attempted to detect the languages in your repository. Please check
9
+ # the `language` matrix defined below to confirm you have the correct set of
10
+ # supported CodeQL languages.
11
+ #
12
+ name: "CodeQL"
13
+
14
+ on:
15
+ push:
16
+ branches: ["master"]
17
+ pull_request:
18
+ # The branches below must be a subset of the branches above
19
+ branches: ["master"]
20
+ schedule:
21
+ - cron: "0 0 * * 1"
22
+
23
+ permissions:
24
+ contents: read
25
+
26
+ jobs:
27
+ analyze:
28
+ name: Analyze
29
+ runs-on: ubuntu-latest
30
+ permissions:
31
+ actions: read
32
+ contents: read
33
+ security-events: write
34
+
35
+ strategy:
36
+ fail-fast: false
37
+ matrix:
38
+ language: ["java", "javascript"]
39
+ # CodeQL supports [ $supported-codeql-languages ]
40
+ # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
41
+
42
+ steps:
43
+ - name: Harden Runner
44
+ uses: step-security/harden-runner@1f99358870fe1c846a3ccba386cc2b2246836776 # v2.2.1
45
+ with:
46
+ egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
47
+
48
+ - name: Checkout repository
49
+ uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0
50
+
51
+ - name: Install Protoc
52
+ uses: arduino/setup-protoc@v1
53
+ with:
54
+ version: '3.x'
55
+
56
+ # Initializes the CodeQL tools for scanning.
57
+ - name: Initialize CodeQL
58
+ uses: github/codeql-action/init@04df1262e6247151b5ac09cd2c303ac36ad3f62b # v2.2.9
59
+ with:
60
+ languages: ${{ matrix.language }}
61
+ # If you wish to specify custom queries, you can do so here or in a config file.
62
+ # By default, queries listed here will override any specified in a config file.
63
+ # Prefix the list here with "+" to use these queries and those in the config file.
64
+
65
+ # Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
66
+ # If this step fails, then you should remove it and run the build manually (see below)
67
+ - name: Autobuild
68
+ uses: github/codeql-action/autobuild@04df1262e6247151b5ac09cd2c303ac36ad3f62b # v2.2.9
69
+
70
+ # ℹ️ Command-line programs to run using the OS shell.
71
+ # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
72
+
73
+ # If the Autobuild fails above, remove it and uncomment the following three lines.
74
+ # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
75
+
76
+ # - run: |
77
+ # echo "Run, Build Application using script"
78
+ # ./location_of_script_within_repo/buildscript.sh
79
+
80
+ - name: Perform CodeQL Analysis
81
+ uses: github/codeql-action/analyze@04df1262e6247151b5ac09cd2c303ac36ad3f62b # v2.2.9
82
+ with:
83
+ category: "/language:${{matrix.language}}"
@@ -0,0 +1,27 @@
1
+ # Dependency Review Action
2
+ #
3
+ # This Action will scan dependency manifest files that change as part of a Pull Request,
4
+ # surfacing known-vulnerable versions of the packages declared or updated in the PR.
5
+ # Once installed, if the workflow run is marked as required,
6
+ # PRs introducing known-vulnerable packages will be blocked from merging.
7
+ #
8
+ # Source repository: https://github.com/actions/dependency-review-action
9
+ name: 'Dependency Review'
10
+ on: [pull_request]
11
+
12
+ permissions:
13
+ contents: read
14
+
15
+ jobs:
16
+ dependency-review:
17
+ runs-on: ubuntu-latest
18
+ steps:
19
+ - name: Harden Runner
20
+ uses: step-security/harden-runner@1f99358870fe1c846a3ccba386cc2b2246836776 # v2.2.1
21
+ with:
22
+ egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
23
+
24
+ - name: 'Checkout Repository'
25
+ uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0
26
+ - name: 'Dependency Review'
27
+ uses: actions/dependency-review-action@0efb1d1d84fc9633afcdaad14c485cbbc90ef46c # v2.5.1
@@ -0,0 +1,76 @@
1
+ # This workflow uses actions that are not certified by GitHub. They are provided
2
+ # by a third-party and are governed by separate terms of service, privacy
3
+ # policy, and support documentation.
4
+
5
+ name: Scorecard supply-chain security
6
+ on:
7
+ # For Branch-Protection check. Only the default branch is supported. See
8
+ # https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection
9
+ branch_protection_rule:
10
+ # To guarantee Maintained check is occasionally updated. See
11
+ # https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained
12
+ schedule:
13
+ - cron: '20 7 * * 2'
14
+ push:
15
+ branches: ["master"]
16
+
17
+ # Declare default permissions as read only.
18
+ permissions: read-all
19
+
20
+ jobs:
21
+ analysis:
22
+ name: Scorecard analysis
23
+ runs-on: ubuntu-latest
24
+ permissions:
25
+ # Needed to upload the results to code-scanning dashboard.
26
+ security-events: write
27
+ # Needed to publish results and get a badge (see publish_results below).
28
+ id-token: write
29
+ contents: read
30
+ actions: read
31
+
32
+ steps:
33
+ - name: Harden Runner
34
+ uses: step-security/harden-runner@1f99358870fe1c846a3ccba386cc2b2246836776 # v2.2.1
35
+ with:
36
+ egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
37
+
38
+ - name: "Checkout code"
39
+ uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0
40
+ with:
41
+ persist-credentials: false
42
+
43
+ - name: "Run analysis"
44
+ uses: ossf/scorecard-action@99c53751e09b9529366343771cc321ec74e9bd3d # v2.0.6
45
+ with:
46
+ results_file: results.sarif
47
+ results_format: sarif
48
+ # (Optional) "write" PAT token. Uncomment the `repo_token` line below if:
49
+ # - you want to enable the Branch-Protection check on a *public* repository, or
50
+ # - you are installing Scorecards on a *private* repository
51
+ # To create the PAT, follow the steps in https://github.com/ossf/scorecard-action#authentication-with-pat.
52
+ # repo_token: ${{ secrets.SCORECARD_TOKEN }}
53
+
54
+ # Public repositories:
55
+ # - Publish results to OpenSSF REST API for easy access by consumers
56
+ # - Allows the repository to include the Scorecard badge.
57
+ # - See https://github.com/ossf/scorecard-action#publishing-results.
58
+ # For private repositories:
59
+ # - `publish_results` will always be set to `false`, regardless
60
+ # of the value entered here.
61
+ publish_results: true
62
+
63
+ # Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
64
+ # format to the repository Actions tab.
65
+ - name: "Upload artifact"
66
+ uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
67
+ with:
68
+ name: SARIF file
69
+ path: results.sarif
70
+ retention-days: 5
71
+
72
+ # Upload the results to GitHub's code scanning dashboard.
73
+ - name: "Upload to code-scanning"
74
+ uses: github/codeql-action/upload-sarif@04df1262e6247151b5ac09cd2c303ac36ad3f62b # v2.2.9
75
+ with:
76
+ sarif_file: results.sarif
@@ -2,13 +2,21 @@
2
2
 
3
3
  name: Testing Java API
4
4
  on: pull_request
5
+ permissions:
6
+ contents: read
7
+
5
8
  jobs:
6
9
  java-test:
7
10
  runs-on: ubuntu-latest
8
11
  steps:
9
- - uses: actions/checkout@v2
12
+ - name: Harden Runner
13
+ uses: step-security/harden-runner@1f99358870fe1c846a3ccba386cc2b2246836776 # v2.2.1
14
+ with:
15
+ egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
16
+
17
+ - uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2.7.0
10
18
  - name: Set up JDK 8 and Maven
11
- uses: actions/setup-java@v2
19
+ uses: actions/setup-java@91d3aa4956ec4a53e477c4907347b5e3481be8c9 # v2.5.1
12
20
  with:
13
21
  java-version: '8'
14
22
  distribution: 'adopt'
@@ -30,7 +38,12 @@ jobs:
30
38
  js-files-ascii-check:
31
39
  runs-on: ubuntu-latest
32
40
  steps:
33
- - uses: actions/checkout@v2
41
+ - name: Harden Runner
42
+ uses: step-security/harden-runner@1f99358870fe1c846a3ccba386cc2b2246836776 # v2.2.1
43
+ with:
44
+ egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
45
+
46
+ - uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2.7.0
34
47
  - name: Install ascii-safe-cli
35
48
  run: npm install -g is-ascii-safe-cli
36
49
  - name: Check whether .js api files are ascii safe or not.
@@ -55,7 +55,7 @@ Cream Sandwich).
55
55
  The [Java demo](https://libphonenumber.appspot.com/) is updated with a slight
56
56
  delay after the GitHub release.
57
57
 
58
- Last demo update: v8.13.9.
58
+ Last demo update: v8.13.14.
59
59
 
60
60
  Note: Eventhough the library (main branch/[maven release](https://repo1.maven.org/maven2/com/googlecode/libphonenumber/libphonenumber/8.12.56/))
61
61
  is at v8.12.57, because of some deployment issues, we were unable to update the
@@ -259,3 +259,7 @@ Alternatives to our own versions:
259
259
  https://github.com/seegno/google-libphonenumber - a browserify-compatible
260
260
  wrapper around the original unmodified library installable via npm, which
261
261
  packs the Google Closure library, about 420 KB in size.
262
+
263
+ Tools based on libphonenumber metadata:
264
+
265
+ * Scala: https://github.com/mr-tolmach/raf - library for generating valid phone numbers in the E.164 format