Skip to content

Commit 8d3ad6d

Browse files
chore(deps): upgrade dependencies (#242)
* chore: upgrade development infrastructure - Migrate build tool from Vite to tsdown - Migrate linter from ESLint to oxlint - Update TypeScript to v5.9.3 - Update Prettier to v3.7.4 with import sorting - Update Node requirement to >=20 - Add release-please workflow for automated releases - Update CI workflow with parallel jobs and TypeScript matrix - Remove size-limit (not needed) - Remove standard-version (replaced by release-please) - Add explicit return types and type imports for oxlint compliance Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * chore: rename PLAYWRIGHT_ env vars to E2E_ Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * chore: sort package.json Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * chore: upgrade router-link example to React Router v7 - Replace react-router-dom v5 with react-router v7 - Update dev dependencies across examples and root package - Remove deprecated main/module fields from package.json Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix: update e2e test expectations for dependency changes Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 65c9c09 commit 8d3ad6d

50 files changed

Lines changed: 2364 additions & 7966 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.env.test.example

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44
###############################################################################
55

66
# The email address for your Prismic account.
7-
PLAYWRIGHT_PRISMIC_EMAIL=
7+
E2E_PRISMIC_EMAIL=
88
# The password to your Prismic account.
9-
PLAYWRIGHT_PRISMIC_PASSWORD=
9+
E2E_PRISMIC_PASSWORD=

.github/workflows/ci.yml

Lines changed: 0 additions & 40 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: release
2+
3+
permissions:
4+
contents: write
5+
issues: write
6+
pull-requests: write
7+
id-token: write
8+
9+
on:
10+
push:
11+
branches:
12+
- master
13+
14+
jobs:
15+
release-please:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: googleapis/release-please-action@v4
19+
id: release
20+
with:
21+
release-type: node
22+
- uses: actions/checkout@v6
23+
if: ${{ steps.release.outputs.release_created }}
24+
- uses: actions/setup-node@v6
25+
if: ${{ steps.release.outputs.release_created }}
26+
with:
27+
node-version: 24
28+
registry-url: "https://registry.npmjs.org"
29+
- run: npm ci
30+
if: ${{ steps.release.outputs.release_created }}
31+
- run: npm publish --provenance
32+
if: ${{ steps.release.outputs.release_created }}
33+
env:
34+
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

.github/workflows/validate.yml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
name: validate
2+
3+
on: push
4+
5+
jobs:
6+
lint:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v6
10+
- uses: actions/setup-node@v6
11+
with:
12+
node-version: 24
13+
cache: npm
14+
- run: npm ci
15+
- run: npm run lint
16+
17+
build:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@v6
21+
- uses: actions/setup-node@v6
22+
with:
23+
node-version: 24
24+
cache: npm
25+
- run: npm ci
26+
- run: npm run build
27+
28+
e2e:
29+
name: e2e (Node.js ${{ matrix.node }})
30+
runs-on: ubuntu-latest
31+
strategy:
32+
matrix:
33+
node: [20, 22, 24]
34+
fail-fast: false
35+
steps:
36+
- uses: actions/checkout@v6
37+
- uses: actions/setup-node@v6
38+
with:
39+
node-version: ${{ matrix.node }}
40+
cache: npm
41+
- run: npm ci
42+
- run: npx playwright install --with-deps
43+
- run: npm run e2e
44+
env:
45+
E2E_PRISMIC_EMAIL: ${{ secrets.E2E_PRISMIC_EMAIL }}
46+
E2E_PRISMIC_PASSWORD: ${{ secrets.E2E_PRISMIC_PASSWORD }}
47+
- uses: actions/upload-artifact@v4
48+
if: ${{ !cancelled() }}
49+
with:
50+
name: playwright-report (Node.js ${{ matrix.node }})
51+
path: playwright-report/
52+
retention-days: 30
53+
54+
types:
55+
name: "types (TypeScript ${{ matrix.typescript }})"
56+
runs-on: ubuntu-latest
57+
strategy:
58+
matrix:
59+
typescript: ["5.4", "5.6", "5.7", "5.8", "5.9"]
60+
fail-fast: false
61+
steps:
62+
- uses: actions/checkout@v6
63+
- uses: actions/setup-node@v6
64+
with:
65+
node-version: 24
66+
cache: npm
67+
- run: npm ci
68+
- run: npm install --no-save typescript@${{ matrix.typescript }} && npx tsc --version
69+
- run: npm run types

.oxlintrc.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"plugins": ["unicorn", "typescript", "oxc", "jsdoc", "react"],
3+
"rules": {
4+
"no-console": ["warn", { "allow": ["info", "warn", "error"] }],
5+
"no-debugger": "warn",
6+
"no-unused-vars": [
7+
"error",
8+
{
9+
"argsIgnorePattern": "^_",
10+
"varsIgnorePattern": "^_"
11+
}
12+
],
13+
"typescript/explicit-module-boundary-types": "error",
14+
"typescript/consistent-type-imports": "error",
15+
"typescript/no-explicit-any": "error",
16+
"typescript/ban-ts-comment": "error",
17+
"jsdoc/check-tag-names": [
18+
"warn",
19+
{
20+
"definedTags": ["typeParam", "remarks", "defaultValue", "experimental"]
21+
}
22+
],
23+
"react/rules-of-hooks": "error"
24+
}
25+
}

.prettierrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"plugins": ["prettier-plugin-jsdoc"],
2+
"plugins": ["prettier-plugin-jsdoc", "@trivago/prettier-plugin-sort-imports"],
33
"jsdocSeparateReturnsFromParam": true,
44
"jsdocSeparateTagGroups": true,
55
"jsdocSingleLineComment": false,

.size-limit.ts

Lines changed: 0 additions & 9 deletions
This file was deleted.

e2e-projects/nextjs/app/PrismicImage/client/ClientTest.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
"use client";
22

3+
import type { ReactNode } from "react";
34
import { useState } from "react";
4-
import { ImageField } from "@prismicio/client";
5+
import type { ImageField } from "@prismicio/client";
56
import { PrismicImage } from "@prismicio/react";
67

7-
export function ClientTest(props: { field: ImageField }) {
8+
export function ClientTest(props: { field: ImageField }): ReactNode {
89
const { field } = props;
910

1011
const [ref, setRef] = useState<Element | null>(null);

e2e-projects/nextjs/app/PrismicImage/client/page.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1+
import type { ReactNode } from "react";
12
import { isFilled } from "@prismicio/client";
23
import assert from "assert";
34

45
import { createClient } from "@/prismicio";
56
import { ClientTest } from "./ClientTest";
67

7-
export default async function Page() {
8+
export default async function Page(): Promise<ReactNode> {
89
const client = await createClient();
910
const { data: tests } = await client.getSingle("image_test");
1011

e2e-projects/nextjs/app/PrismicImage/page.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1+
import type { ReactNode } from "react";
12
import { isFilled } from "@prismicio/client";
23
import { PrismicImage } from "@prismicio/react";
34
import assert from "assert";
45

56
import { createClient } from "@/prismicio";
67

7-
export default async function Page() {
8+
export default async function Page(): Promise<ReactNode> {
89
const client = await createClient();
910
const { data: tests } = await client.getSingle("image_test");
1011

0 commit comments

Comments
 (0)