package.json 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  1. {
  2. "name": "libphonenumber-js",
  3. "version": "1.10.56",
  4. "description": "A simpler (and smaller) rewrite of Google Android's libphonenumber library in javascript",
  5. "main": "index.cjs",
  6. "module": "index.js",
  7. "type": "module",
  8. "exports": {
  9. ".": {
  10. "import": "./index.js",
  11. "require": "./index.cjs"
  12. },
  13. "./min": {
  14. "import": "./min/index.js",
  15. "require": "./min/index.cjs"
  16. },
  17. "./max": {
  18. "import": "./max/index.js",
  19. "require": "./max/index.cjs"
  20. },
  21. "./mobile": {
  22. "import": "./mobile/index.js",
  23. "require": "./mobile/index.cjs"
  24. },
  25. "./core": {
  26. "import": "./core/index.js",
  27. "require": "./core/index.cjs"
  28. },
  29. "./min/metadata": {
  30. "import": "./metadata.min.json.js",
  31. "require": "./metadata.min.json"
  32. },
  33. "./metadata.min": {
  34. "import": "./metadata.min.json.js",
  35. "require": "./metadata.min.json"
  36. },
  37. "./metadata.min.json": {
  38. "import": "./metadata.min.json.js",
  39. "require": "./metadata.min.json"
  40. },
  41. "./metadata.full": {
  42. "import": "./metadata.max.json.js",
  43. "require": "./metadata.max.json"
  44. },
  45. "./metadata.full.json": {
  46. "import": "./metadata.max.json.js",
  47. "require": "./metadata.max.json"
  48. },
  49. "./max/metadata": {
  50. "import": "./metadata.max.json.js",
  51. "require": "./metadata.max.json"
  52. },
  53. "./metadata.max": {
  54. "import": "./metadata.max.json.js",
  55. "require": "./metadata.max.json"
  56. },
  57. "./metadata.max.json": {
  58. "import": "./metadata.max.json.js",
  59. "require": "./metadata.max.json"
  60. },
  61. "./mobile/metadata": {
  62. "import": "./metadata.mobile.json.js",
  63. "require": "./metadata.mobile.json"
  64. },
  65. "./metadata.mobile": {
  66. "import": "./metadata.mobile.json.js",
  67. "require": "./metadata.mobile.json"
  68. },
  69. "./metadata.mobile.json": {
  70. "import": "./metadata.mobile.json.js",
  71. "require": "./metadata.mobile.json"
  72. },
  73. "./mobile/examples": {
  74. "import": "./examples.mobile.json.js",
  75. "require": "./examples.mobile.json"
  76. },
  77. "./examples.mobile": {
  78. "import": "./examples.mobile.json.js",
  79. "require": "./examples.mobile.json"
  80. },
  81. "./examples.mobile.json": {
  82. "import": "./examples.mobile.json.js",
  83. "require": "./examples.mobile.json"
  84. },
  85. "./package.json": "./package.json"
  86. },
  87. "sideEffects": false,
  88. "devDependencies": {
  89. "@babel/cli": "^7.17.10",
  90. "@babel/core": "^7.17.12",
  91. "@babel/plugin-syntax-import-assertions": "^7.18.6",
  92. "@babel/plugin-transform-for-of": "^7.17.12",
  93. "@babel/preset-env": "^7.17.12",
  94. "@babel/register": "^7.17.7",
  95. "babel-plugin-istanbul": "^6.1.1",
  96. "chai": "^4.3.6",
  97. "cpy-cli": "^5.0.0",
  98. "crlf": "^1.1.1",
  99. "cross-env": "^7.0.3",
  100. "istanbul": "^1.1.0-alpha.1",
  101. "libphonenumber-metadata-generator": "^1.0.1",
  102. "minimist": "^1.2.6",
  103. "mocha": "^10.0.0",
  104. "npm-run-all": "^4.1.5",
  105. "nyc": "^15.1.0",
  106. "renamer": "^4.0.0",
  107. "replace-in-file": "^7.0.2",
  108. "rimraf": "^3.0.2",
  109. "rollup": "^2.73.0",
  110. "rollup-plugin-json": "^4.0.0",
  111. "rollup-plugin-terser": "^7.0.2"
  112. },
  113. "scripts": {
  114. "metadata:update:job": "git reset --hard && git pull && npm install && npm run metadata:update:release",
  115. "metadata:pull-request": "node runnable/metadata-pull-request",
  116. "metadata:branch": "node runnable/metadata-branch",
  117. "metadata:unbranch": "node runnable/metadata-unbranch",
  118. "metadata:publish": "npm version patch && npm publish && git push",
  119. "metadata:update:release": "npm run metadata:download && node runnable/metadata-update-and-release",
  120. "metadata:update:branch": "npm run metadata:branch && npm run metadata:download && node runnable/metadata-update-and-push",
  121. "metadata:update:pull-request": "npm run metadata:branch && npm run metadata:download && node runnable/metadata-update-and-push-and-pull-request",
  122. "metadata:generate": "npm-run-all metadata:generate:min metadata:generate:full metadata:generate:max metadata:generate:mobile metadata:generate:min:js metadata:generate:full:js metadata:generate:max:js metadata:generate:mobile:js metadata:generate:mobile:examples:js",
  123. "metadata:generate:min": "node runnable/generate ../PhoneNumberMetadata.xml ../metadata.min.json --examples mobile",
  124. "metadata:generate:full": "node runnable/generate ../PhoneNumberMetadata.xml ../metadata.full.json --extended --debug",
  125. "metadata:generate:max": "node runnable/generate ../PhoneNumberMetadata.xml ../metadata.max.json --extended --debug",
  126. "metadata:generate:mobile": "node runnable/generate ../PhoneNumberMetadata.xml ../metadata.mobile.json --types mobile",
  127. "metadata:generate:min:js": "node runnable/json-to-js ./metadata.min.json",
  128. "metadata:generate:full:js": "node runnable/json-to-js ./metadata.full.json",
  129. "metadata:generate:max:js": "node runnable/json-to-js ./metadata.max.json",
  130. "metadata:generate:mobile:js": "node runnable/json-to-js ./metadata.mobile.json",
  131. "metadata:generate:mobile:examples:js": "node runnable/json-to-js ./examples.mobile.json",
  132. "metadata:download": "node runnable/download https://raw.githubusercontent.com/googlei18n/libphonenumber/master/resources/PhoneNumberMetadata.xml PhoneNumberMetadata.xml",
  133. "generate-country-codes": "node --experimental-json-modules runnable/generate-country-codes",
  134. "test": "node --experimental-json-modules node_modules/mocha/bin/_mocha --colors --bail --reporter spec --require ./test/setup.js \"source/**/*.test.js\" \"test/**/*.test.js\" --recursive",
  135. "test-coverage": "npm-run-all build:commonjs test-coverage:commonjs",
  136. "test-coverage:commonjs": "node --experimental-json-modules node_modules/istanbul/lib/cli.js cover -x \"*.test.js\" -x \"build/findNumbers/Leniency.js\" -x \"build/findNumbers/matchPhoneNumberStringAgainstPhoneNumber.js\" -x \"build/findNumbers/RegExpCache.js\" -x \"build/findNumbers/LRUCache.js\" -x \"build/PhoneNumberMatcher.js\" -x \"build/tools/semver-compare.js\" node_modules/mocha/bin/_mocha -- --colors --reporter dot --require ./test/setup.js \"build/**/*.test.js\" --recursive",
  137. "test-coverage--does-not-work-with-es-modules": "node --experimental-json-modules node_modules/istanbul/lib/cli.js cover -x \"build/**\" -x \"es6/**\" -x \"*.test.js\" -x \"source/findNumbers/Leniency.js\" -x \"source/findNumbers/matchPhoneNumberStringAgainstPhoneNumber.js\" -x \"source/findNumbers/RegExpCache.js\" -x \"source/findNumbers/LRUCache.js\" -x \"source/PhoneNumberMatcher.js\" -x \"source/tools/semver-compare.js\" node_modules/mocha/bin/_mocha -- --colors --reporter dot --require ./test/setup.js \"source/**/*.test.js\" \"test/**/*.test.js\" --recursive",
  138. "test-coverage--nyc--does-not-work-with-es-modules": "cross-env nyc node --experimental-json-modules node_modules/mocha/bin/_mocha --bail --require @babel/register --require ./test/setup.js \"source/**/*.test.js\" \"test/**/*.test.js\"",
  139. "coveralls--nyc-is-very-slow-and-is-not-used": "nyc report --reporter=text-lcov | coveralls",
  140. "test-travis": "node --experimental-json-modules node_modules/istanbul/lib/cli.js cover -x \"build/**\" -x \"es6/**\" -x \"*.test.js\" -x \"source/findNumbers/Leniency.js\" -x \"source/findNumbers/matchPhoneNumberStringAgainstPhoneNumber.js\" -x \"source/findNumbers/RegExpCache.js\" -x \"source/findNumbers/LRUCache.js\" -x \"source/PhoneNumberMatcher.js\" -x \"source/tools/semver-compare.js\" node_modules/mocha/bin/_mocha --report lcovonly -- --colors --reporter spec --require ./test/setup.js \"source/**/*.test.js\" \"test/**/*.test.js\" --recursive",
  141. "clean": "rimraf ./build/**/* ./es6/**/*",
  142. "build:commonjs": "npm-run-all build:commonjs:with-tests build:commonjs:package.json build:commonjs:create-typescript-definitions build:commonjs:patch-typescript-definitions",
  143. "build:commonjs:before-es-modules": "cross-env BABEL_ENV=commonjs babel ./source --out-dir ./build --source-maps --ignore test.js",
  144. "build:commonjs:with-tests": "cross-env BABEL_ENV=commonjs babel ./source --out-dir ./build --source-maps",
  145. "build:commonjs:package.json": "node runnable/create-commonjs-package-json.js",
  146. "build:commonjs:create-typescript-definitions": "rimraf --verbose --glob ./*.d.cts \"./!(node_modules)/**/*.d.cts\" && cpy **/{index,metadata*,examples*,types}.d.ts . --rename={{basename}}.cts && renamer --find d.cts.ts --replace d.cts ./*.d.cts.ts \"./!(node_modules)/**/*.d.cts.ts\"",
  147. "build:commonjs:patch-typescript-definitions": "replace-in-file \".d.js';\" \".d.cjs';\" **/*.d.cts",
  148. "build:modules:copy-typescript-definitions": "cpy --flat min/index.d.ts max && cpy --flat min/index.d.ts mobile",
  149. "build:modules": "cross-env BABEL_ENV=es6 babel ./source --out-dir ./es6 --source-maps --ignore test.js",
  150. "build:bundle": "rollup --config rollup.config.mjs",
  151. "build": "npm-run-all clean build:modules:copy-typescript-definitions build:modules build:commonjs build:bundle",
  152. "prepublishOnly": "npm run metadata:generate && npm run generate-country-codes && crlf --set=LF metadata.*.json && npm-run-all build test"
  153. },
  154. "repository": {
  155. "type": "git",
  156. "url": "git+https://gitlab.com/catamphetamine/libphonenumber-js.git"
  157. },
  158. "keywords": [
  159. "telephone",
  160. "phone",
  161. "number",
  162. "input",
  163. "mobile",
  164. "libphonenumber"
  165. ],
  166. "author": "catamphetamine <purecatamphetamine@gmail.com>",
  167. "license": "MIT",
  168. "bugs": {
  169. "url": "https://gitlab.com/catamphetamine/libphonenumber-js/issues"
  170. },
  171. "homepage": "https://gitlab.com/catamphetamine/libphonenumber-js#readme"
  172. }