package.json 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. {
  2. "name": "urlpattern-polyfill",
  3. "version": "10.0.0",
  4. "description": "Polyfill for the URLPattern API",
  5. "repository": {
  6. "type": "git",
  7. "url": "https://github.com/kenchris/urlpattern-polyfill"
  8. },
  9. "type": "module",
  10. "main": "./index.cjs",
  11. "module": "./index.js",
  12. "types": "./dist/index.d.ts",
  13. "exports": {
  14. "./urlpattern": {
  15. "types": "./dist/index.d.ts",
  16. "import": "./dist/urlpattern.js",
  17. "require": "./dist/urlpattern.cjs"
  18. },
  19. ".": {
  20. "types": "./dist/index.d.ts",
  21. "import": "./index.js",
  22. "require": "./index.cjs"
  23. }
  24. },
  25. "tags": [
  26. "url",
  27. "urlpattern",
  28. "url-pattern",
  29. "browser",
  30. "node",
  31. "polyfill",
  32. "w3c",
  33. "wicg"
  34. ],
  35. "files": [
  36. "dist",
  37. "index.js",
  38. "index.cjs"
  39. ],
  40. "devDependencies": {
  41. "@ava/typescript": "^4.0.0",
  42. "ava": "^5.3.0",
  43. "esbuild": "^0.17.19",
  44. "rimraf": "^5.0.1",
  45. "typescript": "^5.1.3",
  46. "wireit": "^0.9.5"
  47. },
  48. "ava": {
  49. "files": [
  50. "test/**/*",
  51. "!test/wpt"
  52. ],
  53. "typescript": {
  54. "rewritePaths": {
  55. "src/": "dist/"
  56. },
  57. "compile": false
  58. }
  59. },
  60. "scripts": {
  61. "build": "wireit",
  62. "sync-wpt": "wireit",
  63. "test": "wireit",
  64. "manual-test": "wireit",
  65. "publish-dev": "wireit",
  66. "publish-patch": "wireit",
  67. "publish-major": "wireit"
  68. },
  69. "wireit": {
  70. "build:esm": {
  71. "command": "esbuild --bundle --format=esm src/url-pattern.ts --outfile=dist/urlpattern.js --minify --target=es2022",
  72. "output": [
  73. "dist/urlpattern.js"
  74. ],
  75. "files": [
  76. "src/**/*"
  77. ]
  78. },
  79. "build:cjs": {
  80. "command": "esbuild --bundle --format=cjs src/url-pattern.ts --outfile=dist/urlpattern.cjs --minify --target=es2022",
  81. "output": [
  82. "dist/urlpattern.cjs"
  83. ],
  84. "files": [
  85. "src/**/*"
  86. ]
  87. },
  88. "copyTypeFiles": {
  89. "command": "cp ./src/index.d.ts ./src/types.d.ts ./dist",
  90. "output": [
  91. "dist/index.d.ts",
  92. "dist/types.d.ts"
  93. ],
  94. "dependencies": [
  95. "build:esm",
  96. "build:cjs"
  97. ]
  98. },
  99. "build": {
  100. "dependencies": [
  101. "copyTypeFiles"
  102. ]
  103. },
  104. "prepFakeNodeModules": {
  105. "command": "rm -rf node_modules/urlpattern-polyfill; ln -s $(pwd) node_modules/urlpattern-polyfill"
  106. },
  107. "sync-wpt": {
  108. "command": "cd test && wget http://wpt.live/urlpattern/resources/urlpatterntestdata.json && wget http://wpt.live/urlpattern/resources/urlpattern-compare-test-data.json"
  109. },
  110. "test": {
  111. "command": "ava --timeout=60s",
  112. "watch": "test/**/*",
  113. "files": [
  114. "test/**/*"
  115. ],
  116. "dependencies": [
  117. "prepFakeNodeModules",
  118. "build"
  119. ]
  120. },
  121. "manual-test": {
  122. "command": "npx http-server -o /index.html -p 4203",
  123. "dependencies": [
  124. "test"
  125. ]
  126. },
  127. "publish-dev": {
  128. "command": "VERSION=${npm_package_version%-*}-dev.`git rev-parse --short HEAD` && npm version --no-git-tag-version $VERSION && npm publish --tag dev",
  129. "dependencies": [
  130. "test"
  131. ]
  132. },
  133. "publish-patch": {
  134. "command": "npm version patch && npm publish",
  135. "dependencies": [
  136. "test"
  137. ]
  138. },
  139. "publish-major": {
  140. "command": "npm version major && npm publish",
  141. "dependencies": [
  142. "test"
  143. ]
  144. }
  145. },
  146. "author": "",
  147. "license": "MIT",
  148. "dependencies": {}
  149. }