Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat!: v3 #214

Merged
merged 29 commits into from
Jan 29, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
d253816
feat!: v3
angeloashmore Nov 16, 2024
b529909
feat: cleanup and remove context + hooks
angeloashmore Nov 16, 2024
8657f0c
chore: simplify tsconfig + vitest
angeloashmore Nov 27, 2024
13df48f
test: fix inaccurate tests
angeloashmore Nov 27, 2024
7c42523
test: use Vitest Browser Mode with Puppeteer
angeloashmore Nov 28, 2024
59f4ceb
chore: remove unused dev dependencies
angeloashmore Nov 28, 2024
d965eeb
test: fix tests
angeloashmore Nov 28, 2024
22c377b
chore: sort `package.json`
angeloashmore Nov 28, 2024
7df3d21
ci: install Puppeteer automatically
angeloashmore Nov 28, 2024
77813f5
ci: update step name
angeloashmore Nov 28, 2024
69e3607
fix: types
angeloashmore Jan 13, 2025
10e2778
test: add Playwright tests
angeloashmore Jan 15, 2025
e60fc07
ci: update workflow
angeloashmore Jan 15, 2025
795e670
chore: fix failing CI
angeloashmore Jan 15, 2025
7e4e503
test: fix PrismicRichText tests
angeloashmore Jan 15, 2025
1835b9d
chore: update GitHub templates
angeloashmore Jan 15, 2025
9448bf1
chore: update CONTRIBUTING.md
angeloashmore Jan 15, 2025
dcd87b5
chore: update README.md
angeloashmore Jan 15, 2025
8849187
chore: update dependencies
angeloashmore Jan 16, 2025
56653b7
chore: release alpha as major
angeloashmore Jan 20, 2025
5788471
chore: remove `vitest` config
angeloashmore Jan 20, 2025
a5a8d30
chore(release): 3.0.0-alpha.0
angeloashmore Jan 20, 2025
ede8485
chore: clean up peer dependency versions
angeloashmore Jan 20, 2025
a45fc39
refactor: use `FC`
angeloashmore Jan 29, 2025
71d6498
chore(release): 3.0.0-alpha.1
angeloashmore Jan 29, 2025
fe230c7
Merge branch 'master' into aa/v3
angeloashmore Jan 29, 2025
a0c62fe
chore: update dependencies
angeloashmore Jan 29, 2025
f9c0972
style: run Prettier
angeloashmore Jan 29, 2025
9b9923b
chore: remove `with-global-configuration` example
angeloashmore Jan 29, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .env.test.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
###############################################################################
# The following environment variables are used to run Playwright tests.
# Create a specific account for testing to avoid issues.
###############################################################################

# The email address for your Prismic account.
PLAYWRIGHT_PRISMIC_EMAIL=
# The password to your Prismic account.
PLAYWRIGHT_PRISMIC_PASSWORD=
40 changes: 0 additions & 40 deletions .eslintignore

This file was deleted.

45 changes: 0 additions & 45 deletions .eslintrc.cjs

This file was deleted.

6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ assignees: ""

### Versions

- @prismicio/react: <!-- ex: v0.1.0 -->
- react: <!-- ex: v17.0.0 -->
- node: <!-- ex: v12.14.0 -->
- `@prismicio/react`: <!-- ex: v0.1.0 -->
- `react`: <!-- ex: v17.0.0 -->
- Node.js: <!-- ex: v12.14.0 -->

### Reproduction

Expand Down
27 changes: 0 additions & 27 deletions .github/PULL_REQUEST_TEMPLATE.md

This file was deleted.

60 changes: 0 additions & 60 deletions .github/prismic-oss-ecosystem.svg

This file was deleted.

65 changes: 25 additions & 40 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,55 +1,40 @@
name: ci

on:
push:
branches:
- master
pull_request:
branches:
- master
on: push

jobs:
ci:
runs-on: ${{ matrix.os }}
name: Prepare (${{ matrix.os}}, Node.js ${{ matrix.node }})

strategy:
matrix:
os: [ubuntu-latest]
node: [18]
node: [18, 20, 22]
fail-fast: false

runs-on: ${{ matrix.os }}

steps:
- uses: actions/setup-node@v2
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}

- name: Checkout
uses: actions/checkout@master

- name: Cache node_modules
uses: actions/cache@v2
with:
path: node_modules
key: ${{ matrix.os }}-node-v${{ matrix.node }}-deps-${{ hashFiles(format('{0}{1}', github.workspace, '/package-lock.json')) }}

- name: Install dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: npm ci

- name: Lint
run: npm run lint

- name: Unit
run: npm run unit

- name: Build
run: npm run build

- name: Coverage
if: matrix.os == 'ubuntu-latest' && matrix.node == 18
uses: codecov/codecov-action@v1

- name: Size
if: github.event_name == 'pull_request' && matrix.os == 'ubuntu-latest' && matrix.node == 18
uses: andresz1/size-limit-action@v1
registry-url: "https://registry.npmjs.org/"
- run: npm ci
- run: npx playwright install --with-deps
- run: npm run lint
- run: npm run build
- uses: andresz1/size-limit-action@v1
if: ${{ github.event_name == 'pull_request' && matrix.os == 'ubuntu-latest' && matrix.node == 22 }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- run: npm run e2e
env:
PLAYWRIGHT_PRISMIC_EMAIL: ${{ secrets.PLAYWRIGHT_PRISMIC_EMAIL }}
PLAYWRIGHT_PRISMIC_PASSWORD: ${{ secrets.PLAYWRIGHT_PRISMIC_PASSWORD }}
- uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: playwright-report (${{ matrix.os }}, Node.js ${{ matrix.node }})
path: playwright-report/
retention-days: 30
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# custom
dist
examples/**/package-lock.json
*.tgz

# os
.DS_Store
Expand Down Expand Up @@ -36,3 +37,8 @@ coverage
!.vscode/tasks.json
!.vscode/launch.json
*.code-workspace
/test-results/
/playwright-report/
/blob-report/
/playwright/.cache/
/tests/infra/.storage-state.json
13 changes: 8 additions & 5 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
# custom
CHANGELOG.md

# .gitignore copy

# custom
dist
examples/**/package-lock.json
*.tgz
CHANGELOG.md
e2e-projects/**/.next

# os
.DS_Store
Expand Down Expand Up @@ -41,3 +39,8 @@ coverage
!.vscode/tasks.json
!.vscode/launch.json
*.code-workspace
/test-results/
/playwright-report/
/blob-report/
/playwright/.cache/
/tests/.storage-state.json
30 changes: 0 additions & 30 deletions .size-limit.cjs

This file was deleted.

9 changes: 9 additions & 0 deletions .size-limit.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import type { SizeLimitConfig } from "size-limit";
import { exports } from "./package.json";

module.exports = [
{
name: "@prismicio/react",
path: exports["."].default,
},
] satisfies SizeLimitConfig;
Loading