Skip to content

Commit

Permalink
feat!: update yarn version and deps (#2006)
Browse files Browse the repository at this point in the history
* feat!: update yarn version and deps

* fix: fix lint

* fix: temporary disable eslint by react scripts
  • Loading branch information
berviantoleo authored Jul 18, 2023
1 parent 5ff9dfe commit 6d68dc8
Show file tree
Hide file tree
Showing 12 changed files with 25,460 additions and 17,872 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
*/*/node_modules
key: ${{ runner.os }}-${{ env.NODE_VERSION }}-${{ hashFiles('**/yarn.lock') }}
- name: Install dependencies
run: yarn --frozen-lockfile
run: corepack enable && corepack prepare yarn@stable --activate && yarn --immutable
- name: Build Package
run: yarn lerna run build --scope @berviantoleo/react-multi-crop
- name: Git Identity
Expand All @@ -53,6 +53,7 @@ jobs:
env:
SKIP_PREFLIGHT_CHECK: true
PUBLIC_URL: /
DISABLE_ESLINT_PLUGIN: true
- name: Publish Demo
uses: JamesIves/github-pages-deploy-action@v4.4.2
with:
Expand Down Expand Up @@ -80,7 +81,7 @@ jobs:
*/*/node_modules
key: ${{ runner.os }}-${{ env.NODE_VERSION }}-${{ hashFiles('**/yarn.lock') }}
- name: Install dependencies
run: yarn --frozen-lockfile
run: corepack enable && corepack prepare yarn@stable --activate && yarn --immutable
- name: Build Documentation
run: |
yarn docs
Expand Down Expand Up @@ -114,7 +115,7 @@ jobs:
~/.cache/Cypress
key: ${{ runner.os }}-${{ env.NODE_VERSION }}-${{ hashFiles('**/yarn.lock') }}
- name: Install dependencies
run: yarn --frozen-lockfile
run: corepack enable && corepack prepare yarn@stable --activate && yarn --immutable
- name: Lint
run: yarn lint
- name: Test & Build Package
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
~/.cache/Cypress
key: ${{ runner.os }}-${{ matrix.node_version }}-${{ hashFiles('**/yarn.lock') }}
- name: Install dependencies
run: yarn --frozen-lockfile
run: corepack enable && corepack prepare yarn@stable --activate && yarn --immutable
- name: Lint
run: yarn lint
- name: Test & Build Package
Expand All @@ -49,6 +49,7 @@ jobs:
env:
SKIP_PREFLIGHT_CHECK: true
PUBLIC_URL: /
DISABLE_ESLINT_PLUGIN: true
# TODO; will give the docs to artifacts
- name: Cypress run
uses: cypress-io/github-action@v5
Expand Down
10 changes: 9 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,12 @@ coverage/
.env
*.ignore
docs/
*.log
*.log

.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
1 change: 1 addition & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nodeLinker: node-modules
16 changes: 8 additions & 8 deletions examples/demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@
"@berviantoleo/react-multi-crop": "^0.31.12",
"@emotion/react": "^11.11.1",
"@emotion/styled": "^11.11.0",
"@mui/icons-material": "^5.11.16",
"@mui/material": "^5.13.5",
"@mui/styles": "^5.13.2",
"@types/jest": "^29.5.2",
"@types/node": "^20.3.1",
"@types/react": "^18.2.13",
"@types/react-dom": "^18.2.6",
"cypress": "~12.14.0",
"@mui/icons-material": "^5.14.0",
"@mui/material": "^5.14.0",
"@mui/styles": "^5.14.0",
"@types/jest": "^29.5.3",
"@types/node": "^20.4.2",
"@types/react": "^18.2.15",
"@types/react-dom": "^18.2.7",
"cypress": "~12.17.1",
"fabric": "^5.3.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
Expand Down
4 changes: 2 additions & 2 deletions examples/demo/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export default function App(): JSX.Element {
setMode((prevMode) => (prevMode === "light" ? "dark" : "light"));
},
}),
[]
[],
);

const theme = React.useMemo(
Expand All @@ -22,7 +22,7 @@ export default function App(): JSX.Element {
mode,
},
}),
[mode]
[mode],
);
return (
<ColorModeContext.Provider value={colorMode}>
Expand Down
2 changes: 1 addition & 1 deletion examples/demo/src/MainPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const useStyles = makeStyles(() =>
title: {
flexGrow: 1,
},
})
}),
);

export default function MainPage(): JSX.Element {
Expand Down
4 changes: 2 additions & 2 deletions examples/demo/src/components/Readonly.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { ReactMultiCrop, IOutputData } from "@berviantoleo/react-multi-crop";

function convertToImage(
name: string,
output: IOutputData
output: IOutputData,
): JSX.Element | undefined {
const canvasElement = output.canvasElement?.toDataURL();

Expand All @@ -18,7 +18,7 @@ function convertToImage(

export default function Readonly(): JSX.Element {
const [selectedValue, setSelectedValue] = React.useState<IOutputData | null>(
null
null,
);
const [hoverValue, setHoverValue] = React.useState<IOutputData | null>(null);

Expand Down
10 changes: 5 additions & 5 deletions examples/demo/src/serviceWorker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ const isLocalhost = Boolean(
window.location.hostname === "[::1]" ||
// 127.0.0.1/8 is considered localhost for IPv4.
window.location.hostname.match(
/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/
)
/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/,
),
);

// eslint-disable-next-line @typescript-eslint/no-explicit-any
Expand All @@ -44,7 +44,7 @@ export function register(config: Record<string, any>): void {
navigator.serviceWorker.ready.then(() => {
console.log(
"This web app is being served cache-first by a service " +
"worker. To learn more, visit https://bit.ly/CRA-PWA"
"worker. To learn more, visit https://bit.ly/CRA-PWA",
);
});
} else {
Expand Down Expand Up @@ -73,7 +73,7 @@ function registerValidSW(swUrl: string, config: Record<string, any>) {
// content until all client tabs are closed.
console.log(
"New content is available and will be used when all " +
"tabs for this page are closed. See https://bit.ly/CRA-PWA."
"tabs for this page are closed. See https://bit.ly/CRA-PWA.",
);

// Execute callback
Expand Down Expand Up @@ -124,7 +124,7 @@ function checkValidServiceWorker(swUrl: string, config: Record<string, any>) {
})
.catch(() => {
console.log(
"No internet connection found. App is running in offline mode."
"No internet connection found. App is running in offline mode.",
);
});
}
Expand Down
20 changes: 10 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,22 @@
},
"private": true,
"devDependencies": {
"@commitlint/cli": "^17.6.5",
"@commitlint/config-lerna-scopes": "^17.6.3",
"@typescript-eslint/eslint-plugin": "^5.60.0",
"@typescript-eslint/parser": "^5.60.0",
"@commitlint/cli": "^17.6.6",
"@commitlint/config-lerna-scopes": "^17.6.6",
"@typescript-eslint/eslint-plugin": "^6.1.0",
"@typescript-eslint/parser": "^6.1.0",
"cross-env": "^7.0.3",
"eslint": "^8.43.0",
"eslint": "^8.45.0",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-cypress": "^2.13.3",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-prettier": "^5.0.0",
"eslint-plugin-react": "^7.32.2",
"eslint-plugin-react-hooks": "^4.6.0",
"husky": "^8.0.3",
"lerna": "^7.0.2",
"prettier": "^2.8.8",
"typescript": "^5.1.3",
"vitepress": "^1.0.0-beta.2",
"lerna": "^7.1.4",
"prettier": "^3.0.0",
"typescript": "^5.1.6",
"vitepress": "^1.0.0-beta.5",
"vue": "^3.3.4"
},
"husky": {
Expand Down
44 changes: 22 additions & 22 deletions packages/react-multi-crop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,43 +25,43 @@
"url": "https://github.com/berviantoleo"
},
"devDependencies": {
"@babel/cli": "^7.22.5",
"@babel/core": "^7.22.5",
"@babel/cli": "^7.22.9",
"@babel/core": "^7.22.9",
"@babel/plugin-proposal-class-properties": "^7.18.6",
"@babel/plugin-transform-runtime": "^7.22.5",
"@babel/preset-env": "^7.22.5",
"@babel/plugin-transform-runtime": "^7.22.9",
"@babel/preset-env": "^7.22.9",
"@babel/preset-react": "^7.22.5",
"@babel/preset-typescript": "^7.22.5",
"@babel/runtime": "^7.22.5",
"@babel/runtime": "^7.22.6",
"@rollup/plugin-babel": "^6.0.3",
"@rollup/plugin-node-resolve": "^15.1.0",
"@storybook/addon-essentials": "^7.0.22",
"@storybook/addon-links": "^7.0.22",
"@storybook/addon-storysource": "^7.0.22",
"@storybook/addons": "^7.0.22",
"@storybook/react": "^7.0.22",
"@storybook/react-webpack5": "7.0.22",
"@storybook/source-loader": "^7.0.22",
"@storybook/addon-essentials": "^7.0.27",
"@storybook/addon-links": "^7.0.27",
"@storybook/addon-storysource": "^7.0.27",
"@storybook/addons": "^7.0.27",
"@storybook/react": "^7.0.27",
"@storybook/react-webpack5": "7.0.27",
"@storybook/source-loader": "^7.0.27",
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^14.0.0",
"@types/fabric": "^5.3.3",
"@types/jest": "^29.5.2",
"@types/jest": "^29.5.3",
"@types/uuid": "^9.0.2",
"babel-jest": "^29.5.0",
"babel-loader": "^9.1.2",
"clsx": "^1.2.1",
"jest": "^29.5.0",
"jest-environment-jsdom": "^29.5.0",
"babel-jest": "^29.6.1",
"babel-loader": "^9.1.3",
"clsx": "^2.0.0",
"jest": "^29.6.1",
"jest-environment-jsdom": "^29.6.1",
"node-sass": "^9.0.0",
"react-test-renderer": "^18.2.0",
"rollup": "^3.25.1",
"rollup": "^3.26.3",
"rollup-plugin-delete": "^2.0.0",
"rollup-plugin-peer-deps-external": "^2.2.4",
"rollup-plugin-sizes": "^1.0.5",
"rollup-plugin-terser": "^7.0.2",
"rollup-plugin-typescript2": "^0.34.1",
"storybook": "7.0.22",
"ts-jest": "^29.1.0"
"rollup-plugin-typescript2": "^0.35.0",
"storybook": "7.0.27",
"ts-jest": "^29.1.1"
},
"peerDependencies": {
"fabric": "^4.4.0 || ^5.0.0",
Expand Down
Loading

0 comments on commit 6d68dc8

Please sign in to comment.