@sanity/client 5.0.0-esm.2 → 5.0.0-esm.4

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sanity/client",
3
- "version": "5.0.0-esm.2",
3
+ "version": "5.0.0-esm.4",
4
4
  "description": "Client for retrieving, creating and patching data from Sanity.io",
5
5
  "keywords": [
6
6
  "sanity",
@@ -22,8 +22,8 @@
22
22
  },
23
23
  "license": "MIT",
24
24
  "author": "Sanity.io <hello@sanity.io>",
25
- "type": "module",
26
25
  "sideEffects": false,
26
+ "type": "module",
27
27
  "exports": {
28
28
  ".": {
29
29
  "types": "./dist/index.d.ts",
@@ -32,6 +32,8 @@
32
32
  "require": "./dist/index.browser.cjs",
33
33
  "import": "./dist/index.browser.js"
34
34
  },
35
+ "deno": "./dist/index.browser.js",
36
+ "worker": "./dist/index.browser.js",
35
37
  "source": "./src/index.ts",
36
38
  "require": "./dist/index.cjs",
37
39
  "node": {
@@ -44,9 +46,9 @@
44
46
  "./package.json": "./package.json"
45
47
  },
46
48
  "main": "./dist/index.cjs",
49
+ "unpkg": "umd/sanityClient.min.js",
47
50
  "module": "./dist/index.js",
48
51
  "source": "./src/index.ts",
49
- "unpkg": "umd/sanityClient.min.js",
50
52
  "browser": {
51
53
  "./dist/index.cjs": "./dist/index.browser.cjs",
52
54
  "./dist/index.js": "./dist/index.browser.js"
@@ -57,24 +59,28 @@
57
59
  "src",
58
60
  "umd"
59
61
  ],
60
- "browserslist": [
61
- "> 0.2% and supports es6-module and supports es6-module-dynamic-import and not dead and not IE 11",
62
- "maintained node versions"
63
- ],
64
62
  "scripts": {
65
63
  "prebuild": "npm run clean",
66
64
  "build": "pkg build --strict && pkg --strict && npm run rollup && npm run minify",
67
65
  "clean": "npx rimraf dist coverage umd/*.js",
68
66
  "coverage": "vitest run --coverage",
69
- "lint": "eslint . --ext .cjs,.js,.ts --report-unused-disable-directives",
67
+ "lint": "eslint . --ext .cjs,.js,.ts",
70
68
  "minify": "terser -c -m -- umd/sanityClient.js > umd/sanityClient.min.js",
71
69
  "prepublishOnly": "npm run build",
72
70
  "rollup": "NODE_ENV=production rollup -c rollup.config.cjs",
73
- "test": "vitest run",
74
- "test:deno": "deno test --allow-read --allow-net --allow-env --import-map=runtimes/deno/import_map.json runtimes/deno",
75
- "test:edge-runtime": "npm test -- --environment edge-runtime",
76
- "test:bun": "(cd runtimes/bun && bun wiptest)"
71
+ "test": "vitest",
72
+ "test:browser": "npm test -- --config ./vitest.browser.config.ts",
73
+ "test:bun": "(cd runtimes/bun && bun wiptest)",
74
+ "test:deno": "deno test --allow-read --allow-net --allow-env --fail-fast --import-map=runtimes/deno/import_map.json runtimes/deno",
75
+ "test:deno:update_import_map": "deno run --allow-read --allow-write runtimes/deno/update_import_map.ts",
76
+ "posttest:deno:update_import_map": "npx prettier --write runtimes/deno/import_map.json",
77
+ "test:edge-runtime": "npm test -- --config vitest.edge.config.ts",
78
+ "test:node-runtimes": "node --test runtimes/node | npx faucet"
77
79
  },
80
+ "browserslist": [
81
+ "> 0.2% and supports es6-module and supports es6-module-dynamic-import and not dead and not IE 11",
82
+ "maintained node versions"
83
+ ],
78
84
  "prettier": {
79
85
  "bracketSpacing": false,
80
86
  "printWidth": 100,
@@ -83,41 +89,38 @@
83
89
  },
84
90
  "dependencies": {
85
91
  "@sanity/eventsource": "^4.0.0",
86
- "get-it": "^8.0.1",
92
+ "@types/node": "^18",
93
+ "get-it": "^8.0.4",
87
94
  "make-error": "^1.3.6",
88
95
  "rxjs": "^7"
89
96
  },
90
97
  "devDependencies": {
91
- "@babel/cli": "^7.20.7",
92
- "@babel/core": "^7.20.12",
93
- "@babel/plugin-transform-object-assign": "^7.18.6",
94
- "@babel/preset-env": "^7.20.2",
98
+ "@edge-runtime/types": "^2.0.2",
99
+ "@edge-runtime/vm": "^2.0.2",
95
100
  "@rollup/plugin-commonjs": "^24.0.0",
96
101
  "@rollup/plugin-node-resolve": "^15.0.1",
97
102
  "@sanity/pkg-utils": "^2.1.1",
98
- "@sanity/semantic-release-preset": "^2.0.5",
99
- "@types/node": "^18.11.18",
100
- "@typescript-eslint/eslint-plugin": "^5.48.0",
101
- "@typescript-eslint/parser": "^5.48.0",
102
- "babel-plugin-add-module-exports": "^1.0.4",
103
- "babel-plugin-istanbul": "^6.1.1",
104
- "babel-tape-runner": "^3.0.0",
103
+ "@sanity/semantic-release-preset": "^3.0.2",
104
+ "@typescript-eslint/eslint-plugin": "^5.48.1",
105
+ "@typescript-eslint/parser": "^5.48.1",
106
+ "@vitest/coverage-c8": "^0.27.0",
105
107
  "eslint": "^8.31.0",
106
108
  "eslint-config-prettier": "^8.6.0",
107
109
  "eslint-plugin-prettier": "^4.2.1",
108
110
  "eslint-plugin-simple-import-sort": "^8.0.0",
111
+ "faucet": "^0.0.3",
112
+ "happy-dom": "^8.1.3",
113
+ "ls-engines": "^0.8.0",
109
114
  "nock": "^13.2.9",
110
- "nyc": "^15.1.0",
111
- "prettier": "^2.8.1",
115
+ "prettier": "^2.8.2",
112
116
  "prettier-plugin-packagejson": "^2.3.0",
113
117
  "rimraf": "^3.0.2",
114
118
  "rollup": "^3.9.1",
115
119
  "sse-channel": "^4.0.0",
116
- "tape": "^5.6.1",
117
120
  "terser": "^5.16.1",
118
121
  "typescript": "^4.9.4",
119
- "vitest": "^0.26.3",
120
- "xtend": "4.0.2"
122
+ "vitest": "^0.27.0",
123
+ "vitest-github-actions-reporter": "^0.9.0"
121
124
  },
122
125
  "engines": {
123
126
  "node": ">=14"