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

v5 #508

Merged
merged 26 commits into from
Nov 18, 2023
Merged

v5 #508

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
0c845ea
add nvmrc
nygardk Nov 18, 2023
dc2189e
migrate from yarn to npm
nygardk Nov 18, 2023
cc004ad
configure changesets
nygardk Nov 18, 2023
0d2e019
upgrade typescript
nygardk Nov 18, 2023
dcb64c5
add vscode settings
nygardk Nov 18, 2023
471510a
drop support for React 16
nygardk Nov 18, 2023
d4c192a
migrate from tsc and webpack to vite
nygardk Nov 18, 2023
7b38415
upgrade dependencies
nygardk Nov 18, 2023
01c82b3
add GitHub workflows
nygardk Nov 18, 2023
18f2de2
feat: add XIcon
nygardk Nov 18, 2023
14bbffa
fix defaultProps warning with React 18
nygardk Nov 18, 2023
c04c694
remove quote prop from FacebookShareButton
nygardk Nov 18, 2023
65b53c5
fix HatenaShareCoun to show 0
nygardk Nov 18, 2023
15fd50d
PinterestShareButton: add support for pinId
nygardk Nov 18, 2023
a8be70f
fix docs for TwitterShareButton
nygardk Nov 18, 2023
44c672f
refactor ShareButton to function component
nygardk Nov 18, 2023
dfa5c86
minor type improvements
nygardk Nov 18, 2023
0680822
remove docs site, build demo to demo/
nygardk Nov 18, 2023
4bb4e3f
minor demo improvements
nygardk Nov 18, 2023
f3f7c18
readme updates
nygardk Nov 18, 2023
2c0ab57
add GabShareButton and GabIcon
nygardk Nov 18, 2023
af3f770
move migration doc to docs/
nygardk Nov 18, 2023
41b1329
refactor demo to function component
nygardk Nov 18, 2023
77ecaa7
refactor SocialMediaShareCount to function component
nygardk Nov 18, 2023
17a3d7d
add codesandbox demo link to readme
nygardk Nov 18, 2023
043faa3
remove default aria-label from share buttons
nygardk Nov 18, 2023
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
5 changes: 5 additions & 0 deletions .changeset/angry-fireants-shop.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"react-share": major
---

Removed the `quote` prop from `FacebookShareButton` as it has been deprecated by Meta. See https://developers.facebook.com/support/bugs/734680371318112/?comment_id=743056360480513.
5 changes: 5 additions & 0 deletions .changeset/brave-chicken-train.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"react-share": minor
---

Added `GabShareButton` and `GabIcon` to share on [gab.com](https://gab.com). Originally implemented [here](https://github.com/nygardk/react-share/pull/425).
5 changes: 5 additions & 0 deletions .changeset/chilly-points-sip.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"react-share": patch
---

Fix `HatenaShareCount` to show also `0`. Originally fixed [here](https://github.com/nygardk/react-share/pull/429).
5 changes: 5 additions & 0 deletions .changeset/chilly-wolves-move.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"react-share": minor
---

Added `XIcon`.
11 changes: 11 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "https://unpkg.com/@changesets/config@2.3.1/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
"linked": [],
"access": "public",
"baseBranch": "master",
"updateInternalDependencies": "patch",
"ignore": []
}
5 changes: 5 additions & 0 deletions .changeset/fair-maps-thank.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"react-share": major
---

Removed default `aria-label` prop from `ShareButtons`. Before it defaulted to the name of the "network name" (e.g. "facebook" for Facebook). Issue explained [here](https://github.com/nygardk/react-share/issues/397).
5 changes: 5 additions & 0 deletions .changeset/fair-walls-shake.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"react-share": major
---

Compilation target is now ES2017 instead of ES5. The distributed files are built with Vite instead of TypeScript compiler.
5 changes: 5 additions & 0 deletions .changeset/late-chairs-learn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"react-share": patch
---

Fixed `createIcon` defaultProps warning with React 18.
5 changes: 5 additions & 0 deletions .changeset/many-lizards-dress.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"react-share": minor
---

Share counts are now created as function components instead of class components.
5 changes: 5 additions & 0 deletions .changeset/poor-lizards-run.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"react-share": minor
---

Added `pinId` prop for `PinterestShareButton`.
5 changes: 5 additions & 0 deletions .changeset/stale-peas-sip.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"react-share": major
---

Dropped support for React 16.
5 changes: 5 additions & 0 deletions .changeset/thirty-candles-shout.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"react-share": minor
---

Share buttons are now created as function components instead of class components.
15 changes: 15 additions & 0 deletions .github/actions/npm-install/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: npm install

description: Install NPM dependencies

runs:
using: composite
steps:
- uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
cache: 'npm'

- name: Install dependencies
shell: bash
run: npm ci
35 changes: 35 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: "CI"

on:
pull_request:
branches:
- "**"

env:
FORCE_COLOR: true

jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/npm-install
- run: npm run lint

check-types:
name: Check types
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/npm-install
- run: npm run check-types

build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/npm-install
- run: npm run build

27 changes: 27 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Release

on:
push:
branches:
- master
workflow_dispatch:

concurrency: ${{ github.workflow }}-${{ github.ref }}

jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: ./.github/actions/npm-install

- name: Create Release PR or publish to NPM
id: changesets
uses: changesets/action@v1
with:
publish: npm release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.DS_Store
node_modules/
lib/
es/
dist/
demo/
*.log
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
20.9.0
22 changes: 22 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"files.exclude": {
"**/node_modules": true
},
"search.exclude": {
"lib": true,
"**/node_modules": true
},
"[typescript]": {
"editor.formatOnSave": true
},
"[typescriptreact]": {
"editor.formatOnSave": true
},
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"editor.defaultFormatter": "esbenp.prettier-vscode",
"typescript.tsdk": "node_modules/typescript/lib",
"eslint.validate": ["typescript", "typescriptreact"],
"stylelint.validate": ["typescript", "typescriptreact"]
}
93 changes: 47 additions & 46 deletions README.md

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions demo/Demo.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
body {
font-family: 'Arial', sans-serif;
font-family: "Arial", sans-serif;
background-color: white;
padding: 20px;
}
Expand Down Expand Up @@ -30,6 +30,6 @@ body {
}

.Demo__some-network__custom-icon {
width:32px;
height:32px;
width: 32px;
height: 32px;
}
Loading