gt-sanity 1.0.0 → 1.0.2

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": "gt-sanity",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "General Translation integration with Sanity",
5
5
  "keywords": [
6
6
  "sanity",
@@ -39,43 +39,30 @@
39
39
  "src",
40
40
  "v2-incompatible.js"
41
41
  ],
42
- "scripts": {
43
- "release": "npm run build && npm publish --access public",
44
- "release:alpha": "npm run build && npm publish --access public --tag alpha",
45
- "release:beta": "npm run build && npm publish --access public --tag beta",
46
- "release:latest": "npm run build && npm publish --access public --tag latest",
47
- "build": "plugin-kit verify-package --silent && pkg-utils build --strict --check --clean",
48
- "format": "prettier --write --cache --ignore-unknown .",
49
- "link-watch": "plugin-kit link-watch",
50
- "lint": "eslint .",
51
- "lint:fix": "eslint . --fix",
52
- "prepublishOnly": "npm run build",
53
- "test": "vitest run",
54
- "watch": "pkg-utils watch --strict"
55
- },
56
42
  "dependencies": {
43
+ "@portabletext/block-tools": "^3.5.5",
57
44
  "@portabletext/to-html": "^2.0.14",
58
- "@sanity/block-tools": "^3.70.0",
59
45
  "@sanity/icons": "^3.7.4",
60
46
  "@sanity/incompatible-plugin": "^1.0.5",
61
47
  "@sanity/mutator": "^3.98.1",
62
48
  "@sanity/schema": "^3.98.1",
63
49
  "@sanity/ui": "^2.16.4",
64
50
  "@sanity/util": "^3.98.1",
65
- "generaltranslation": "^7.6.3",
66
51
  "jsonpath-plus": "^10.3.0",
67
52
  "jsonpointer": "^5.0.1",
68
- "lodash.merge": "^4.6.2"
53
+ "lodash.merge": "^4.6.2",
54
+ "generaltranslation": "7.6.4"
69
55
  },
70
56
  "devDependencies": {
57
+ "@portabletext/types": "^2.0.15",
71
58
  "@sanity/pkg-utils": "^8.1.6",
72
59
  "@sanity/plugin-kit": "^4.0.19",
73
60
  "@types/lodash.merge": "^4.6.9",
74
61
  "@types/react": "^19.1.12",
75
- "jsdom": "^26.1.0",
76
62
  "@typescript-eslint/eslint-plugin": "^8.43.0",
77
63
  "@typescript-eslint/parser": "^8.43.0",
78
64
  "eslint-config-sanity": "^7.1.4",
65
+ "jsdom": "^26.1.0",
79
66
  "just-clone": "^6.2.0",
80
67
  "prettier-plugin-packagejson": "^2.5.19",
81
68
  "react": "^19.1.1",
@@ -95,5 +82,18 @@
95
82
  },
96
83
  "engines": {
97
84
  "node": ">=18"
85
+ },
86
+ "scripts": {
87
+ "release": "pnpm run build && pnpm publish --access public",
88
+ "release:alpha": "pnpm run build && pnpm publish --access public --tag alpha",
89
+ "release:beta": "pnpm run build && pnpm publish --access public --tag beta",
90
+ "release:latest": "pnpm run build && pnpm publish --access public --tag latest",
91
+ "build": "plugin-kit verify-package --silent && pkg-utils build --strict --check --clean",
92
+ "format": "prettier --write --cache --ignore-unknown .",
93
+ "link-watch": "plugin-kit link-watch",
94
+ "lint": "eslint .",
95
+ "lint:fix": "eslint . --fix",
96
+ "test": "vitest run",
97
+ "watch": "pkg-utils watch --strict"
98
98
  }
99
- }
99
+ }
@@ -1,6 +1,6 @@
1
1
  // Adapted from https://github.com/sanity-io/sanity-naive-html-serializer
2
2
 
3
- import { PortableTextBlockStyle } from '@portabletext/types';
3
+ import type { PortableTextBlockStyle } from '@portabletext/types';
4
4
 
5
5
  import {
6
6
  PortableTextBlockComponent,
@@ -30,13 +30,13 @@ const customStyles = require('../__fixtures__/customStyles');
30
30
 
31
31
  let mockTestKey = 0;
32
32
 
33
- vi.mock('@sanity/block-tools', async () => {
33
+ vi.mock('@portabletext/block-tools', async () => {
34
34
  const originalModule = await vi.importActual<
35
- typeof import('@sanity/block-tools')
36
- >('@sanity/block-tools');
35
+ typeof import('@portabletext/block-tools')
36
+ >('@portabletext/block-tools');
37
37
  return {
38
38
  ...originalModule,
39
- //not ideal but vi.mock('@sanity/block-tools/src/util/randomKey.ts' is not working
39
+ //not ideal but vi.mock('@portabletext/block-tools/src/util/randomKey.ts' is not working
40
40
  htmlToBlocks: (html: string, blockContentType: any, options: any) => {
41
41
  const blocks = originalModule.htmlToBlocks(
42
42
  html,
@@ -13,7 +13,7 @@ vi.mock('@portabletext/block-tools', async () => {
13
13
  >('@portabletext/block-tools');
14
14
  return {
15
15
  ...originalModule,
16
- //not ideal but vi.mock('@sanity/block-tools/src/util/randomKey.ts' is not working
16
+ //not ideal but vi.mock('@portabletext/block-tools/src/util/randomKey.ts' is not working
17
17
  htmlToBlocks: (html: string, blockContentType: any, options: any) => {
18
18
  const blocks = originalModule.htmlToBlocks(
19
19
  html,
@@ -8,7 +8,7 @@ import {
8
8
  } from '../serialization/';
9
9
  import { PortableTextHtmlComponents } from '@portabletext/to-html';
10
10
  import { pluginConfig } from '../adapter/core';
11
- import { merge } from 'lodash';
11
+ import merge from 'lodash.merge';
12
12
 
13
13
  export function deserializeDocument(document: string) {
14
14
  const deserializers = merge(