@prismicio/vue 3.0.0-beta.7 → 3.0.0

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": "@prismicio/vue",
3
- "version": "3.0.0-beta.7",
3
+ "version": "3.0.0",
4
4
  "description": "Vue plugin, components, and composables to fetch and present Prismic content",
5
5
  "keywords": [
6
6
  "typescript",
@@ -45,45 +45,43 @@
45
45
  "release:dry": "standard-version --dry-run",
46
46
  "size": "size-limit",
47
47
  "test": "npm run lint && npm run unit && npm run build && npm run size",
48
- "unit": "nyc --reporter=lcovonly --reporter=text --exclude-after-remap=false ava"
48
+ "unit": "vitest run --coverage",
49
+ "unit:watch": "vitest watch"
49
50
  },
50
51
  "dependencies": {
51
- "@prismicio/client": "^6.5.1",
52
- "@prismicio/helpers": "^2.3.1",
53
- "@prismicio/types": "^0.1.28",
52
+ "@prismicio/client": "^6.6.1",
53
+ "@prismicio/helpers": "^2.3.2",
54
+ "@prismicio/types": "^0.2.0",
54
55
  "isomorphic-unfetch": "^3.1.0",
55
- "vue-router": "^4.0.15"
56
+ "vue-router": "^4.1.2"
56
57
  },
57
58
  "devDependencies": {
58
59
  "@prismicio/mock": "^0.0.10",
59
60
  "@size-limit/preset-small-lib": "^7.0.8",
60
61
  "@types/escape-html": "^1.0.2",
61
62
  "@types/jsdom-global": "^3.0.2",
62
- "@types/sinon": "^10.0.11",
63
- "@typescript-eslint/eslint-plugin": "^5.27.1",
64
- "@typescript-eslint/parser": "^5.27.1",
65
- "@vitejs/plugin-vue": "^2.3.3",
63
+ "@typescript-eslint/eslint-plugin": "^5.30.6",
64
+ "@typescript-eslint/parser": "^5.30.6",
65
+ "@vitejs/plugin-vue": "^3.0.1",
66
66
  "@vue/compiler-sfc": "^3.2.37",
67
- "@vue/eslint-config-typescript": "^10.0.0",
68
- "@vue/test-utils": "^2.0.0",
69
- "ava": "^3.15.0",
70
- "eslint": "^8.17.0",
67
+ "@vue/eslint-config-typescript": "^11.0.0",
68
+ "@vue/test-utils": "^2.0.2",
69
+ "c8": "^7.11.3",
70
+ "eslint": "^8.20.0",
71
71
  "eslint-config-prettier": "^8.5.0",
72
- "eslint-plugin-prettier": "^4.0.0",
72
+ "eslint-plugin-prettier": "^4.2.1",
73
73
  "eslint-plugin-tsdoc": "^0.2.16",
74
- "eslint-plugin-vue": "^9.1.0",
75
- "jsdom": "^19.0.0",
74
+ "eslint-plugin-vue": "^9.2.0",
75
+ "jsdom": "^20.0.0",
76
76
  "jsdom-global": "^3.0.2",
77
- "nyc": "^15.1.0",
78
- "prettier": "^2.6.2",
77
+ "prettier": "^2.7.1",
79
78
  "prettier-plugin-jsdoc": "^0.3.38",
80
- "sinon": "^14.0.0",
81
79
  "siroc": "^0.16.0",
82
80
  "size-limit": "^7.0.8",
83
81
  "standard-version": "^9.5.0",
84
- "ts-eager": "^2.0.2",
85
- "typescript": "^4.7.3",
86
- "vite": "^2.9.10",
82
+ "typescript": "^4.7.4",
83
+ "vite": "^3.0.1",
84
+ "vitest": "^0.18.1",
87
85
  "vue": "^3.2.37"
88
86
  },
89
87
  "peerDependencies": {
@@ -137,7 +137,8 @@ export const PrismicRichTextImpl = /*#__PURE__*/ defineComponent({
137
137
  props: {
138
138
  field: {
139
139
  type: Array as unknown as PropType<RichTextField | null | undefined>,
140
- required: true,
140
+ default: undefined,
141
+ required: false,
141
142
  },
142
143
  linkResolver: {
143
144
  type: Function as PropType<LinkResolverFunction>,
@@ -168,7 +169,7 @@ export const PrismicRichTextImpl = /*#__PURE__*/ defineComponent({
168
169
  const root = ref<HTMLElement | Comment | Component | null>(null);
169
170
 
170
171
  const maybeRouter = inject(routerKey, null);
171
- if (maybeRouter && html.value) {
172
+ if (maybeRouter) {
172
173
  type InternalLink = {
173
174
  element: HTMLAnchorElement;
174
175
  listener: EventListener;
@@ -104,7 +104,8 @@ export const PrismicTextImpl = /*#__PURE__*/ defineComponent({
104
104
  props: {
105
105
  field: {
106
106
  type: Array as unknown as PropType<RichTextField | null | undefined>,
107
- required: true,
107
+ default: undefined,
108
+ required: false,
108
109
  },
109
110
  separator: {
110
111
  type: String as PropType<string>,
@@ -124,7 +124,8 @@ export type SliceComponentProps<
124
124
  * available to all Slice components
125
125
  */
126
126
  export type DefineComponentSliceComponentProps<
127
- TSlice extends SliceLike = SliceLike,
127
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
128
+ TSlice extends SliceLike = any,
128
129
  TContext = unknown,
129
130
  > = {
130
131
  slice: {
@@ -317,7 +318,8 @@ export type SliceZoneComponents<
317
318
  * @returns A new optimized record of {@link SliceZoneComponents}
318
319
  */
319
320
  export const defineSliceZoneComponents = <
320
- TSlice extends SliceLike = SliceLike,
321
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
322
+ TSlice extends SliceLike = any,
321
323
  TContext = unknown,
322
324
  >(
323
325
  components: SliceZoneComponents<TSlice, TContext>,