8000 chore(deps): bump the github-actions group with 5 updates by dependabot[bot] · Pull Request #235 · awesome-reveal/awesome-reveal · GitHub
[go: up one dir, main page]

Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
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
7 changes: 7 additions & 0 deletions .changeset/esm-only.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"react-awesome-reveal": major
---

Publish the package as ESM only.

- **Breaking:** the CommonJS build (`dist/index.cjs`) is removed. The `main` and `module` fields and the `require` export condition are removed.
10 changes: 10 additions & 0 deletions .changeset/fragment-detection-react-18.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
"react-awesome-reveal": major
---

Support React 19 and update `react-intersection-observer` to v11.

- **Breaking:** the `react` peer dependency is now `>=17.0.0`. `react-intersection-observer` already required React 17 or later.
- **Breaking:** `onVisibilityChange` no longer fires with `false` on mount for elements that start off-screen. It first fires when the element becomes visible. Later enter and leave changes fire as before.
- Fragment and text children with `triggerOnce` and a non-zero `fraction` now animate. Before, they could stay hidden.
- Fragment children are detected on React 17 and 18 again. The `react-is` dependency is removed.
26 changes: 14 additions & 12 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

title: ""
labels: ""
assignees: ""
---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

CodeSandbox link: *put here the CodeSandbox link to reproduce the issue (starter template [here](https://codesandbox.io/s/react-awesome-reveal-typescript-177uom?file=/src/App.tsx))*
CodeSandbox link: _put here the CodeSandbox link to reproduce the issue (starter template [here](https://codesandbox.io/s/react-awesome-reveal-typescript-177uom?file=/src/App.tsx))_

**Expected behavior**
A clear and concise description of what you expected to happen.
Expand All @@ -26,15 +26,17 @@ A clear and concise description of what you expected to happen.
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
99 changes: 99 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
name: CI

on:
push:
branches:
- main
- v5
pull_request:

permissions: {}

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
HUSKY: 0

jobs:
test:
name: Test (React ${{ matrix.react }})
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
contents: read
strategy:
fail-fast: false
matrix:
react: [17, 18, 19]
include:
- react: 17
deps: react@17 react-dom@17 @testing-library/react@12
- react: 18
deps: react@18 react-dom@18
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false

- name: Install pnpm
uses: pnpm/action-setup@0977fd99725f1db4007ccb2928dbb4e90d06cc86 # v6.0.10

- name: Setup Node.js
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version-file: .nvmrc
cache: pnpm

- name: Install dependencies
if: ${{ !matrix.deps }}
run: pnpm install --frozen-lockfile

# pnpm add installs the rest of the dependencies too.
- name: Install dependencies with React ${{ matrix.react }}
if: ${{ matrix.deps }}
run: pnpm add -D -w ${{ matrix.deps }}

- name: Test
run: pnpm test --coverage

- name: Add coverage to the job summary
run: |
{
echo "### Coverage"
echo
echo "| Metric | Coverage | Covered |"
echo "| --- | ---: | ---: |"
jq -r '.total | to_entries[] | select(.key != "branchesTrue")
| "| \((.key[:1] | ascii_upcase) + .key[1:]) | \(.value.pct)% | \(.value.covered) / \(.value.total) |"' \
coverage/coverage-summary.json
} >> "$GITHUB_STEP_SUMMARY"

package:
name: Package
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false

- name: Install pnpm
uses: pnpm/action-setup@0977fd99725f1db4007ccb2928dbb4e90d06cc86 # v6.0.10

- name: Setup Node.js
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version-file: .nvmrc
cache: pnpm

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Test package
run: pnpm test:package
12 changes: 6 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4
uses: actions/checkout@v7

- name: Setup Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@v7
with:
node-version: 20
node-version-file: .nvmrc

- name: Install pnpm
uses: pnpm/action-setup@v3
uses: pnpm/action-setup@v6
with:
run_install: false

Expand All @@ -31,7 +31,7 @@ jobs:
echo "PNPM_STORE=$(pnpm store path --silent)" >> $GITHUB_ENV

- name: Setup pnpm Cache
uses: actions/cache@v4
uses: actions/cache@v6
with:
path: ${{ env.PNPM_STORE }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
Expand All @@ -44,7 +44,7 @@ jobs:
run: pnpm install

- name: Create Release Pull Request or Publish to npm
uses: changesets/action@v1
uses: changesets/action@v2
with:
publish: pnpm release
env:
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
*.log
.DS_Store
node_modules
dist
dist
coverage
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1 +1 @@
npx lint-staged
lint-staged
14 changes: 13 additions & 1 deletion .lintstagedrc.mjs
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
// A task in the "*" list runs after the formatter; a separate glob would run at the same time.
const testRelated = (files) => {
const sources = files.filter((file) => /\.tsx?$/.test(file));
return sources.length
? `vitest related --run --project unit ${sources.map((file) => JSON.stringify(file)).join(" ")}`
: [];
};

export default {
"*.{json,md,mdx,html}": "prettier --write",
"*": [
"oxlint --fix --no-error-on-unmatched-pattern",
"oxfmt --no-error-on-unmatched-pattern",
testRelated,
],
};
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20
24
2 changes: 0 additions & 2 deletions .prettierignore

This file was deleted.

1 change: 0 additions & 1 deletion .prettierrc

This file was deleted.

3 changes: 3 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"recommendations": ["oxc.oxc-vscode"]
}
4 changes: 3 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
"source.fixAll.oxc": "explicit"
},
"editor.defaultFormatter": "oxc.oxc-vscode",
"editor.formatOnSave": true,
"typescript.tsdk": "node_modules/typescript/lib"
}
File renamed without changes.
1 change: 0 additions & 1 deletion README.md

This file was deleted.

Loading
Loading
0