@redocly/openapi-docs 3.16.0 → 3.17.0-next.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": "@redocly/openapi-docs",
3
- "version": "3.16.0",
3
+ "version": "3.17.0-next.0",
4
4
  "description": "Redocly OpenAPI Docs",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
@@ -14,14 +14,14 @@
14
14
  "npm": ">=10.0.0"
15
15
  },
16
16
  "peerDependencies": {
17
- "@redocly/theme": ">=0.60.0-next.0",
17
+ "@redocly/theme": ">=0.61.0-next.0",
18
18
  "react": "^19.2.1",
19
19
  "react-dom": "^19.2.1",
20
20
  "styled-components": "^4.1.1 || ^5.3.11 || ^6.0.0"
21
21
  },
22
22
  "dependencies": {
23
23
  "@markdoc/markdoc": "0.5.2",
24
- "@redocly/openapi-core": "2.12.3",
24
+ "@redocly/openapi-core": "2.12.5",
25
25
  "deepmerge": "^4.2.2",
26
26
  "dompurify": "3.2.7",
27
27
  "fast-deep-equal": "^3.1.3",
@@ -36,17 +36,14 @@
36
36
  "url-template": "^2.0.8",
37
37
  "util": "~0.12.5",
38
38
  "web-vitals": "3.3.1",
39
- "@redocly/replay": "0.19.0",
40
- "@redocly/config": "0.41.0"
39
+ "@redocly/config": "0.41.0",
40
+ "@redocly/replay": "0.20.0-next.0"
41
41
  },
42
42
  "devDependencies": {
43
- "@jest/globals": "29.5.0",
44
43
  "@shikijs/transformers": "1.24.0",
45
44
  "@testing-library/jest-dom": "6.6.3",
46
45
  "@testing-library/react": "16.3.0",
47
46
  "@testing-library/user-event": "14.6.1",
48
- "@types/jest": "29.5.11",
49
- "@types/jest-when": "3.5.5",
50
47
  "@types/json-pointer": "1.0.34",
51
48
  "@types/json-schema": "^7.0.15",
52
49
  "@types/node": "22.18.13",
@@ -54,11 +51,9 @@
54
51
  "@types/react-dom": "^19.2.3",
55
52
  "@types/styled-components": "5.1.34",
56
53
  "@vitejs/plugin-react": "5.1.1",
54
+ "@vitest/coverage-v8": "^4.0.10",
57
55
  "esbuild": "0.27.0",
58
- "jest": "29.5.0",
59
- "jest-environment-jsdom": "29.5.0",
60
56
  "jest-styled-components": "7.2.0",
61
- "jest-when": "3.6.0",
62
57
  "js-yaml": "4.1.0",
63
58
  "json-schema": "0.4.0",
64
59
  "outdent": "0.8.0",
@@ -70,30 +65,29 @@
70
65
  "rollup-plugin-bundle-stats": "^4.20.2",
71
66
  "shiki": "1.24.4",
72
67
  "styled-components": "5.3.11",
73
- "ts-jest": "29.1.2",
74
- "ts-jest-mock-import-meta": "1.1.0",
75
68
  "tsx": "4.20.3",
76
69
  "typescript": "5.9.3",
77
70
  "url": "~0.11.0",
78
71
  "vite": "7.2.6",
79
- "@redocly/theme": "0.60.0"
72
+ "vitest": "4.0.10",
73
+ "@redocly/theme": "0.61.0-next.0"
80
74
  },
81
75
  "scripts": {
82
76
  "start": "npm run copy-highlight-hook && vite",
83
77
  "build": "npm run clean && npm run build:lib && npm run build:standalone",
84
- "build:lib": "tsc -p tsconfig.json && node scripts/minify.js lib",
78
+ "build:lib": "tsc -p tsconfig.build.json && node scripts/minify.js lib",
85
79
  "build:standalone": "vite build && node scripts/minify.js dist",
86
80
  "prepare:community-source": "npx tsx scripts/prepare-community-source.ts --",
87
81
  "prepare:community-source-only": "npm run prepare:community-source --ignore /src/* private-readme.md",
88
82
  "prepare:community-dependencies": "npx tsx scripts/prepare-community-dependencies.ts",
89
83
  "apply:community-source": "npx tsx scripts/apply-changes-from-community-source.ts",
90
- "test": "npm run prepare:community-source && npm run test:redoc && jest -w 2",
84
+ "test": "npm run prepare:community-source && npm run test:redoc && vitest run",
91
85
  "test:redoc": "cd redoc && pnpm install && npm run lint && npm run unit",
92
- "unit": "jest -w 2",
93
- "test:update": "jest -u",
94
- "test:watch": "jest --watch",
95
- "test:coverage": "jest --coverage",
96
- "test:coverage:html": "jest --coverage --coverageReporters html",
86
+ "unit": "vitest run",
87
+ "unit:update": "vitest run -u",
88
+ "unit:watch": "vitest",
89
+ "unit:coverage": "vitest run --coverage",
90
+ "unit:coverage:html": "vitest run --coverage --coverage.reporter=html",
97
91
  "ts:check": "tsc --noEmit --skipLibCheck",
98
92
  "clean": "rimraf bin dist lib redocly-static",
99
93
  "clear:cache": "scripts/clear-cache.sh",
@@ -1 +0,0 @@
1
- import{jsx as t}from"react/jsx-runtime";import{render as s,fireEvent as l}from"@testing-library/react";import*as o from"jotai";import{SchemaCatalogLink as a}from"../SchemaCatalogLink";jest.mock("jotai",()=>({...jest.requireActual("jotai"),useAtomValue:jest.fn()})),jest.mock("../../../utils/dom",()=>({...jest.requireActual("../../../utils/dom"),IS_BROWSER:!0})),describe("SchemaCatalogLink",()=>{beforeEach(()=>{jest.clearAllMocks(),jest.useFakeTimers(),Object.defineProperty(global,"navigator",{value:{clipboard:{writeText:jest.fn()}},writable:!0})}),afterEach(()=>{jest.useRealTimers()}),it("should render correctly",()=>{jest.spyOn(o,"useAtomValue").mockReturnValue({parser:{definition:{"x-schema-catalog-link":"/_bundle/test.yaml"}}});const e=s(t(a,{schemaRef:"#/components/schemas/test"}));expect(e.baseElement).toMatchSnapshot()}),it("should not render if x-schema-catalog-link is not defined",()=>{jest.spyOn(o,"useAtomValue").mockReturnValue({parser:{definition:{}}});const e=s(t(a,{schemaRef:"#/components/schemas/test"}));expect(e.baseElement).toMatchSnapshot()}),it("should render correctly on server",()=>{jest.mock("../../../utils/dom",()=>({...jest.requireActual("../../../utils/dom"),IS_BROWSER:jest.fn().mockReturnValue(!1)})),jest.spyOn(o,"useAtomValue").mockReturnValue({parser:{definition:{"x-schema-catalog-link":"/_bundle/test.yaml"}}});const e=s(t(a,{schemaRef:"#/components/schemas/test"}));expect(e.baseElement).toMatchSnapshot()}),it("should copy link to clipboard when copy button is clicked",async()=>{jest.mock("../../../utils/dom",()=>({...jest.requireActual("../../../utils/dom"),IS_BROWSER:jest.fn().mockReturnValue(!0)})),jest.spyOn(o,"useAtomValue").mockReturnValue({parser:{definition:{"x-schema-catalog-link":"/_bundle/test.yaml"}}});const{getByRole:e,findByText:n}=s(t(a,{schemaRef:"#/components/schemas/test"})),c=e("button");l.click(c),expect(await n("Copied!")).toBeDefined()})});
@@ -1 +0,0 @@
1
- export declare function filterPropsDeep<T extends GenericObject>(component: T, paths: string[]): T;
@@ -1 +0,0 @@
1
- import{objectHas as n,objectSet as o}from"./object.js";function t(r,f){if(r&&(f(r),r.children))for(const e of r.children)t(e,f)}function s(r,f){return t(r,e=>{if(e.props)for(const i of f)n(e.props,i)&&o(e.props,i,"<<<filtered>>>")}),r}export{s as filterPropsDeep};