sanity-plugin-singleton-management 1.0.0 → 1.0.1

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 (2) hide show
  1. package/README.md +24 -9
  2. package/package.json +14 -11
package/README.md CHANGED
@@ -50,14 +50,29 @@ export const structure = (S) =>
50
50
  **With This Plugin:**
51
51
 
52
52
  ```js
53
- // Schema configuration
54
- export const siteSettings = {
55
- name: 'siteSettings',
56
- type: 'document',
57
- options: { singleton: true } // That's it!
58
- }
59
-
60
- // Structure configuration
53
+ // schema/singletonType.js/ts
54
+ import { defineType } from 'sanity';
55
+
56
+ export const mySingleton = defineType({
57
+ name: 'mySingleton',
58
+ title: 'My Singleton',
59
+ type: 'document',
60
+ options: {
61
+ singleton: true, // Identify this document as a singleton
62
+ },
63
+ fields: [
64
+ {
65
+ name: 'title',
66
+ title: 'Title',
67
+ type: 'string',
68
+ },
69
+ ...
70
+ ],
71
+ });
72
+ ```
73
+
74
+ ```js
75
+ // structure.js/ts
61
76
  export const structure = (S, context) =>
62
77
  S.list()
63
78
  .items([
@@ -190,4 +205,4 @@ Other reading (Sanity docs):
190
205
 
191
206
  ## License
192
207
 
193
- [MIT](LICENSE) © RD Pennell & RC Maples
208
+ [MIT](LICENSE) © [RD Pennell](https://github.com/plsrd) & RC Maples
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sanity-plugin-singleton-management",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "A plugin to streamline singleton management in your Sanity Studio",
5
5
  "keywords": [
6
6
  "sanity",
@@ -33,6 +33,7 @@
33
33
  "scripts": {
34
34
  "build": "npm run clean && npx @sanity/pkg-utils build --strict",
35
35
  "clean": "rimraf dist",
36
+ "commit": "commit",
36
37
  "format": "prettier --write --cache --ignore-unknown .",
37
38
  "link-watch": "plugin-kit link-watch",
38
39
  "lint": "eslint .",
@@ -49,11 +50,12 @@
49
50
  "@sanity/incompatible-plugin": "^1.0.4"
50
51
  },
51
52
  "devDependencies": {
52
- "@commitlint/cli": "^19.8.1",
53
- "@commitlint/config-conventional": "^19.8.1",
53
+ "@commitlint/cli": "^20.1.0",
54
+ "@commitlint/config-conventional": "^20.0.0",
55
+ "@commitlint/prompt-cli": "^20.1.0",
54
56
  "@sanity/browserslist-config": "^1.0.5",
55
- "@sanity/pkg-utils": "^8.1.12",
56
- "@sanity/plugin-kit": "^4.0.19",
57
+ "@sanity/pkg-utils": "^8.1.24",
58
+ "@sanity/plugin-kit": "^4.0.20",
57
59
  "@semantic-release/changelog": "^6.0.3",
58
60
  "@semantic-release/git": "^10.0.1",
59
61
  "@semantic-release/github": "^11.0.6",
@@ -62,14 +64,14 @@
62
64
  "@types/react": "^19.1.13",
63
65
  "@typescript-eslint/eslint-plugin": "^8.44.0",
64
66
  "@typescript-eslint/parser": "^8.44.0",
65
- "@vitest/coverage-v8": "^3.2.4",
66
- "@vitest/ui": "^3.2.4",
67
+ "@vitest/coverage-v8": "^4.0.1",
68
+ "@vitest/ui": "^4.0.1",
67
69
  "eslint": "^9.35.0",
68
70
  "eslint-config-prettier": "^10.1.8",
69
71
  "eslint-config-sanity": "^7.1.1",
70
72
  "eslint-plugin-prettier": "^5.1.3",
71
73
  "eslint-plugin-react": "^7.34.0",
72
- "eslint-plugin-react-hooks": "^5.2.0",
74
+ "eslint-plugin-react-hooks": "^7.0.0",
73
75
  "husky": "^9.1.7",
74
76
  "jsdom": "^27.0.0",
75
77
  "npm-run-all": "^4.1.5",
@@ -79,17 +81,18 @@
79
81
  "react-dom": "^19.1.1",
80
82
  "react-is": "^19.1.1",
81
83
  "rimraf": "^6.0.1",
82
- "sanity": "^4.9.0",
84
+ "sanity": "^4.11.0",
83
85
  "semantic-release": "^24.2.8",
84
86
  "styled-components": "^6.1.15",
85
87
  "typescript": "^5.3.3",
86
88
  "typescript-eslint": "^8.44.0",
87
- "vitest": "^3.2.4"
89
+ "vitest": "^4.0.1"
88
90
  },
89
91
  "overrides": {
90
92
  "esbuild": "0.25.0",
91
93
  "prismjs": "1.30.0",
92
- "tmp": "0.2.4"
94
+ "tmp": "0.2.4",
95
+ "min-document": "2.19.0"
93
96
  },
94
97
  "peerDependencies": {
95
98
  "react": "^18 || ^19",