@primer/doctocat-nextjs 0.0.0-20250701082918 → 0.0.0-20250704161856

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/CHANGELOG.md CHANGED
@@ -1,11 +1,17 @@
1
1
  # @primer/doctocat-nextjs
2
2
 
3
- ## 0.0.0-20250701082918
3
+ ## 0.0.0-20250704161856
4
4
 
5
5
  ### Patch Changes
6
6
 
7
7
  - Fake entry to force publishing
8
8
 
9
+ ## 0.0.0-20250704161854
10
+
11
+ ### Patch Changes
12
+
13
+ - [#59](https://github.com/primer/doctocat-nextjs/pull/59) [`c24a5b9`](https://github.com/primer/doctocat-nextjs/commit/c24a5b98aad639b42213ad230d923907115eb864) Thanks [@danielguillan](https://github.com/danielguillan)! - Switched sidebar navigation and content document order for improved accessibility
14
+
9
15
  ## 0.5.7
10
16
 
11
17
  ### Patch Changes
@@ -9,7 +9,7 @@ export const codeTransformer = (sourceCode: string, basePath: string): string =>
9
9
 
10
10
  // Assumes all elements with a src attribute are trying to point at Next.js public folder
11
11
  return sourceCode.replace(
12
- /<(\w+)\s+([^>]*\s+)?src=["']([^"']+)["']([^>]*)/g,
12
+ /<([a-z]\w*|[A-Z]\w*(?:\.[A-Z]\w*)?)\s+([^>]*\s+)?src=["']([^"']+)["']([^>]*)/g,
13
13
  (match, tagName, before = '', src, after) => {
14
14
  if (!shouldTransform(src)) return match
15
15
 
package/package.json CHANGED
@@ -1,13 +1,16 @@
1
1
  {
2
2
  "name": "@primer/doctocat-nextjs",
3
- "version": "0.0.0-20250701082918",
3
+ "version": "0.0.0-20250704161856",
4
4
  "description": "A Next.js theme for building Primer documentation sites",
5
5
  "main": "index.js",
6
6
  "type": "module",
7
7
  "scripts": {
8
8
  "check": "tsc --noEmit",
9
9
  "lint": "eslint '**/*.{js,ts,tsx,md,mdx}' --max-warnings=0 --config ./.eslintrc.cjs",
10
- "test": "echo \"Error: no test specified\" && exit 1"
10
+ "test": "vitest",
11
+ "test:ui": "vitest --ui",
12
+ "test:no-watch": "vitest run",
13
+ "test:coverage": "vitest run --coverage"
11
14
  },
12
15
  "author": "GitHub, Inc.",
13
16
  "license": "MIT",
@@ -17,7 +20,7 @@
17
20
  "react-dom": ">=18.0.0 <20.0.0"
18
21
  },
19
22
  "dependencies": {
20
- "@next/mdx": "15.2.4",
23
+ "@next/mdx": "15.3.5",
21
24
  "@primer/octicons-react": "19.15.1",
22
25
  "@primer/react": "^37.11.0",
23
26
  "@primer/react-brand": "0.54.0",
@@ -32,12 +35,21 @@
32
35
  },
33
36
  "devDependencies": {
34
37
  "@github/prettier-config": "^0.0.6",
35
- "@types/node": "18.11.10",
38
+ "@testing-library/dom": "^10.4.0",
39
+ "@testing-library/jest-dom": "^6.6.3",
40
+ "@testing-library/react": "^16.1.0",
41
+ "@testing-library/user-event": "^14.5.2",
42
+ "@types/node": "^20.19.0",
36
43
  "@types/react": "18.3.12",
37
44
  "@types/react-dom": "18.3.1",
45
+ "@vitejs/plugin-react": "^4.3.3",
46
+ "@vitest/coverage-v8": "^3.2.4",
47
+ "@vitest/ui": "^3.2.4",
38
48
  "clsx": "2.1.1",
39
- "next": "15.2.4",
40
- "styled-components": "5.3.11"
49
+ "jsdom": "^26.0.1",
50
+ "next": "15.3.5",
51
+ "styled-components": "5.3.11",
52
+ "vitest": "^3.2.4"
41
53
  },
42
54
  "overrides": {
43
55
  "@types/react": "18.3.12",
package/.eslintrc.cjs DELETED
@@ -1,9 +0,0 @@
1
- const base = require('../../.eslintrc.cjs')
2
-
3
- module.exports = {
4
- ...base,
5
- plugins: ['react-hooks'],
6
- parserOptions: {
7
- tsconfigRootDir: __dirname,
8
- },
9
- }
@@ -1,5 +0,0 @@
1
- {
2
- "eslint.options": {
3
- "configFile": ".eslintrc.cjs"
4
- }
5
- }
@@ -1,3 +0,0 @@
1
- module.exports = {
2
- ...require('@github/prettier-config'),
3
- }
package/tsconfig.json DELETED
@@ -1,19 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "target": "es2016",
4
- "module": "ESNext",
5
- "declaration": false,
6
- "noEmit": true,
7
- "esModuleInterop": true,
8
- "strict": true,
9
- "skipLibCheck": true,
10
- "allowJs": true,
11
- "jsx": "react-jsx",
12
- "moduleResolution": "bundler",
13
- "lib": ["ESNext", "DOM", "DOM.Iterable"],
14
- "resolveJsonModule": true,
15
- "strictNullChecks": true,
16
- "strictFunctionTypes": true,
17
- "noImplicitAny": true
18
- }
19
- }