package.json 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. {
  2. "name": "@sanity/client",
  3. "version": "5.4.2",
  4. "description": "Client for retrieving, creating and patching data from Sanity.io",
  5. "keywords": [
  6. "sanity",
  7. "cms",
  8. "headless",
  9. "realtime",
  10. "content",
  11. "client",
  12. "fetch",
  13. "api"
  14. ],
  15. "homepage": "https://www.sanity.io/",
  16. "bugs": {
  17. "url": "https://github.com/sanity-io/client/issues"
  18. },
  19. "repository": {
  20. "type": "git",
  21. "url": "git+ssh://git@github.com/sanity-io/client.git"
  22. },
  23. "license": "MIT",
  24. "author": "Sanity.io <hello@sanity.io>",
  25. "sideEffects": false,
  26. "type": "module",
  27. "exports": {
  28. ".": {
  29. "types": "./dist/index.d.ts",
  30. "browser": {
  31. "source": "./src/index.browser.ts",
  32. "require": "./dist/index.browser.cjs",
  33. "import": "./dist/index.browser.js"
  34. },
  35. "deno": "./dist/index.browser.js",
  36. "edge-light": "./dist/index.browser.js",
  37. "worker": "./dist/index.browser.js",
  38. "source": "./src/index.ts",
  39. "require": "./dist/index.cjs",
  40. "node": {
  41. "import": "./dist/index.cjs.js",
  42. "require": "./dist/index.cjs"
  43. },
  44. "import": "./dist/index.js",
  45. "default": "./dist/index.js"
  46. },
  47. "./package.json": "./package.json"
  48. },
  49. "main": "./dist/index.cjs",
  50. "unpkg": "umd/sanityClient.min.js",
  51. "module": "./dist/index.js",
  52. "source": "./src/index.ts",
  53. "browser": {
  54. "./dist/index.cjs": "./dist/index.browser.cjs",
  55. "./dist/index.js": "./dist/index.browser.js"
  56. },
  57. "types": "./dist/index.d.ts",
  58. "files": [
  59. "dist",
  60. "src",
  61. "umd"
  62. ],
  63. "scripts": {
  64. "prebuild": "npm run clean",
  65. "build": "pkg build --strict && pkg --strict && npm run rollup && npm run minify",
  66. "clean": "npx rimraf dist coverage umd/*.js",
  67. "coverage": "vitest run --coverage",
  68. "lint": "eslint . --ext .cjs,.js,.ts --max-warnings 0",
  69. "minify": "terser -c -m -- umd/sanityClient.js > umd/sanityClient.min.js",
  70. "prepublishOnly": "npm run build",
  71. "rollup": "NODE_ENV=production rollup -c rollup.config.cjs",
  72. "test": "vitest",
  73. "test:browser": "npm test -- --config ./vitest.browser.config.ts",
  74. "test:bun": "(cd runtimes/bun && bun wiptest)",
  75. "test:deno": "deno test --allow-read --allow-net --allow-env --fail-fast --import-map=runtimes/deno/import_map.json runtimes/deno",
  76. "test:deno:update_import_map": "deno run --allow-read --allow-write runtimes/deno/update_import_map.ts",
  77. "posttest:deno:update_import_map": "npx prettier --write runtimes/deno/import_map.json",
  78. "test:edge-runtime": "npm test -- --config vitest.edge.config.ts",
  79. "test:node-runtimes": "node --test runtimes/node | npx faucet"
  80. },
  81. "browserslist": [
  82. "> 0.2% and supports es6-module and supports es6-module-dynamic-import and not dead and not IE 11",
  83. "maintained node versions"
  84. ],
  85. "prettier": {
  86. "bracketSpacing": false,
  87. "printWidth": 100,
  88. "semi": false,
  89. "singleQuote": true
  90. },
  91. "dependencies": {
  92. "@sanity/eventsource": "5",
  93. "get-it": "^8.1",
  94. "rxjs": "7"
  95. },
  96. "devDependencies": {
  97. "@edge-runtime/types": "^2.0.8",
  98. "@edge-runtime/vm": "^2.1.2",
  99. "@rollup/plugin-commonjs": "^24.0.1",
  100. "@rollup/plugin-node-resolve": "^15.0.1",
  101. "@sanity/pkg-utils": "^2.2.13",
  102. "@sanity/semantic-release-preset": "^4.1.0",
  103. "@types/node": "^18.15.10",
  104. "@typescript-eslint/eslint-plugin": "^5.57.0",
  105. "@typescript-eslint/parser": "^5.57.0",
  106. "@vitest/coverage-c8": "^0.29.8",
  107. "eslint": "^8.36.0",
  108. "eslint-config-prettier": "^8.8.0",
  109. "eslint-plugin-prettier": "^4.2.1",
  110. "eslint-plugin-simple-import-sort": "^10.0.0",
  111. "faucet": "^0.0.4",
  112. "happy-dom": "^8.9.0",
  113. "ls-engines": "^0.9.0",
  114. "nock": "^13.3.0",
  115. "prettier": "^2.8.7",
  116. "prettier-plugin-packagejson": "^2.4.3",
  117. "rimraf": "^4.4.1",
  118. "rollup": "^3.20.2",
  119. "sse-channel": "^4.0.0",
  120. "terser": "^5.16.8",
  121. "typescript": "^5.0.2",
  122. "vitest": "^0.29.8",
  123. "vitest-github-actions-reporter": "^0.10.0"
  124. },
  125. "engines": {
  126. "node": ">=14.18"
  127. }
  128. }