Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 3 additions & 3 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

## Setting Up the project locally

To install the project you need to have `yarn` and `node`
To install the project you need to have `pnpm` and `node`

1. [Fork](https://help.github.com/articles/fork-a-repo/) the project, clone your fork:

Expand All @@ -16,8 +16,8 @@ To install the project you need to have `yarn` and `node`
cd react-easy-crop
```

2. `yarn` to install dependencies
3. `yarn start` to start the example app
2. `pnpm install` to install dependencies
3. `pnpm start` to start the example app

> Tip: Keep your `main` branch pointing at the original repository and make
> pull requests from branches on your fork. To do this, run:
Expand Down
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ Thanks a lot for contributing to react-easy-crop :beers:
Before submitting the Pull Request, please:

- write a clear description of what this Pull Request is trying to achieve
- run `yarn start` and open the demo to see that you didn't break anything
- run `pnpm start` and open the demo to see that you didn't break anything
25 changes: 14 additions & 11 deletions .github/workflows/quality-gate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,29 @@ jobs:
quality-gate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- name: Prepare repository
run: git fetch --unshallow --tags

- name: Use Node.js 20.x
uses: actions/setup-node@v4
- name: Use Node.js 24.x
uses: actions/setup-node@v6
with:
node-version: 20.x
node-version: 24.x

- name: Setup pnpm
uses: pnpm/action-setup@v4

- name: Cache node modules
uses: actions/cache@v4
with:
path: node_modules
key: yarn-deps-${{ hashFiles('yarn.lock') }}
key: pnpm-deps-${{ hashFiles('pnpm-lock.yaml') }}
restore-keys: |
yarn-deps-${{ hashFiles('yarn.lock') }}
- run: yarn install --frozen-lockfile
pnpm-deps-${{ hashFiles('pnpm-lock.yaml') }}
- run: pnpm install --frozen-lockfile

- name: Create Build
run: yarn build
run: pnpm build
- name: Archive build artifacts
uses: actions/upload-artifact@v4
with:
Expand All @@ -39,15 +42,15 @@ jobs:
dist

- name: Run linting
run: yarn lint
run: pnpm lint

- name: Run unit tests
run: yarn unit
run: pnpm unit

- name: Cypress run
uses: cypress-io/github-action@v6
with:
start: yarn start:ci
start: pnpm start:ci
record: true
env:
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
28 changes: 19 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,43 @@ name: Release

on: [push]


permissions:
id-token: write # Required for OIDC
contents: write
issues: write
pull-requests: write

jobs:
release:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'ci skip') && !contains(github.event.head_commit.message, 'skip ci') && github.repository == 'ValentinH/react-easy-crop'"
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

- name: Prepare repository
run: git fetch --unshallow --tags

- name: Use Node.js 20.x
uses: actions/setup-node@v4
- name: Use Node.js 24.x
uses: actions/setup-node@v6
with:
node-version: 20.x
node-version: 24.x
registry-url: https://registry.npmjs.org

- name: Setup pnpm
uses: pnpm/action-setup@v4

- name: Cache node modules
uses: actions/cache@v4
with:
path: node_modules
key: yarn-deps-${{ hashFiles('yarn.lock') }}
key: pnpm-deps-${{ hashFiles('pnpm-lock.yaml') }}
restore-keys: |
yarn-deps-${{ hashFiles('yarn.lock') }}
pnpm-deps-${{ hashFiles('pnpm-lock.yaml') }}

- run: yarn install --frozen-lockfile
- run: pnpm install --frozen-lockfile

- name: Create Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npx auto shipit
run: pnpm exec auto shipit
1 change: 0 additions & 1 deletion .npmrc

This file was deleted.

6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Pintura features cropping, rotating, flipping, filtering, annotating, and lots o
## Installation

```shell
yarn add react-easy-crop
pnpm add react-easy-crop
```

or
Expand Down Expand Up @@ -233,8 +233,8 @@ See `getInitialCropFromCroppedAreaPercentages`.
## Development

```shell
yarn
yarn start
pnpm install
pnpm start
```

Now, open `http://localhost:3001/index.html` and start hacking!
Expand Down
2 changes: 2 additions & 0 deletions auto.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

const npmOptions = {
publishFolder: './dist',
// OIDC trusted publishing should not require NPM_TOKEN injection in .npmrc
setRcToken: false,
}

module.exports = function rc() {
Expand Down
2 changes: 1 addition & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"develop": "gatsby develop",
"start": "npm run develop",
"serve": "gatsby serve",
"deploy": "yarn build --prefix-paths && gh-pages -d public"
"deploy": "pnpm build --prefix-paths && gh-pages -d public"
},
"engines": {
"node": "^14.0.0"
Expand Down
Loading
Loading