-
Notifications
You must be signed in to change notification settings - Fork 372
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Upgrade dependencies and use hooks in demo (#405)
- Loading branch information
Showing
27 changed files
with
1,469 additions
and
3,475 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: Test | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: pnpm/action-setup@v2 | ||
with: | ||
version: 8 | ||
run_install: false | ||
|
||
- name: Get pnpm store directory | ||
id: pnpm-store | ||
run: echo "pnpm_cache_dir=$(pnpm store path)" >> $GITHUB_OUTPUT | ||
|
||
- name: Use pnpm store | ||
uses: actions/cache@v3 | ||
id: pnpm-cache | ||
with: | ||
path: ${{ steps.pnpm-store.outputs.pnpm_cache_dir }} | ||
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
restore-keys: | | ||
${{ runner.os }}-pnpm- | ||
- name: Install Dependencies | ||
run: pnpm install --frozen-lockfile --prefer-offline | ||
|
||
- name: Install Playwright | ||
run: pnpm --filter react-avatar-editor exec playwright install | ||
|
||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
cache: 'pnpm' | ||
|
||
- name: Run test | ||
run: pnpm --filter react-avatar-editor test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ logs | |
*.log | ||
.eslintcache | ||
test-results | ||
screenshot-*.png | ||
screenshot-*. | ||
|
||
# Runtime data | ||
pids | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[build.environment] | ||
NODE_VERSION = "16" | ||
NODE_VERSION = "18" | ||
NPM_FLAGS = "--version" # prevent Netlify npm install | ||
[build] | ||
publish = "packages/demo/dist" | ||
command = "npx -y pnpm@7 install --store=node_modules/.pnpm-store && npx -y pnpm@7 demo:build" | ||
command = "npx -y pnpm@8 install --store=node_modules/.pnpm-store && npx -y pnpm@8 demo:build" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,24 @@ | ||
{ | ||
"name": "react-avatar-editor-demo", | ||
"private": true, | ||
"type": "module", | ||
"scripts": { | ||
"dev": "vite --port 3000", | ||
"build": "vite build", | ||
"clean": "rm -rf dist" | ||
}, | ||
"exports": { | ||
"./serve": "./serve.ts" | ||
"clean": "rm -rf dist", | ||
"preview": "vite preview" | ||
}, | ||
"dependencies": { | ||
"react": "18.2.0", | ||
"react-avatar-editor": "workspace:*", | ||
"react-dom": "18.2.0", | ||
"react-dropzone": "^14.2.2" | ||
"react-dropzone": "^14.2.3" | ||
}, | ||
"devDependencies": { | ||
"@types/react": "18.0.21", | ||
"@types/react-dom": "18.0.6", | ||
"@vitejs/plugin-react": "2.1.0", | ||
"typescript": "4.8.4", | ||
"vite": "3.1.4" | ||
"@types/react": "18.2.38", | ||
"@types/react-dom": "18.2.17", | ||
"@vitejs/plugin-react": "4.2.0", | ||
"typescript": "5.3.2", | ||
"vite": "5.0.2" | ||
} | ||
} |
Oops, something went wrong.