Skip to content

Commit

Permalink
yarn v4.0.0 migration
Browse files Browse the repository at this point in the history
  • Loading branch information
Emre Kılınç committed Oct 27, 2023
1 parent f86236b commit 9bf3482
Show file tree
Hide file tree
Showing 8 changed files with 4,487 additions and 9,526 deletions.
1 change: 0 additions & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
PORT=3245
VITE_REACT_APP_VERSION=$npm_package_version
VITE_REACT_APP_NAME=$npm_package_name
6 changes: 3 additions & 3 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ jobs:
node-version: ${{ matrix.node-version }}
- name: Update yarn @v2
run: corepack enable
- run: corepack prepare yarn@3.2.4 --activate
- run: corepack prepare yarn@4.0.0 --activate
- run: yarn -v
- name: Install dependencies
run: rm -rf node_modules && yarn install --immutable
- run: npm run build
- run: touch ./build/.nojekyll
- run: touch ./dist/.nojekyll

- name: Deploy 🚀
uses: JamesIves/[email protected]
with:
branch: gh-pages # The branch the action should deploy to.
folder: build # The folder the action should deploy.
folder: dist # The folder the action should deploy.
21 changes: 1 addition & 20 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -49,31 +49,12 @@ npm-debug.log*
yarn-debug.log*
yarn-error.log*

.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions

.history
package-lock.json
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions

.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
.yarn/releases/*
!.yarn/sdks
!.yarn/versions

.history
package-lock.json
6 changes: 6 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
compressionLevel: mixed

enableGlobalCache: false

nodeLinker: node-modules

yarnPath: .yarn/releases/yarn-4.0.0.cjs
22 changes: 11 additions & 11 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<!doctype html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite + React + TS</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.jsx"></script>
</body>
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/png" href="/favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Comfor React</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.jsx"></script>
</body>
</html>
35 changes: 17 additions & 18 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@
"name": "comfort-react-demo",
"version": "3.2.2",
"type": "module",
"private": false,
"homepage": "http://obss.github.io/comfort-react-demo",
"license": "MIT",
"scripts": {
"dev": "vite",
"dev": "vite --port 3245",
"build": "vite build",
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
"preview": "vite preview"
Expand Down Expand Up @@ -43,32 +41,32 @@
"web-vitals": "3.0.1"
},
"devDependencies": {
"@babel/core": "7.19.3",
"@babel/eslint-parser": "7.19.1",
"@babel/plugin-proposal-class-properties": "7.18.6",
"@babel/plugin-proposal-function-bind": "7.18.9",
"@babel/preset-env": "7.19.4",
"@babel/preset-react": "7.18.6",
"@types/react": "^18.2.15",
"@types/react-dom": "^18.2.7",
"@typescript-eslint/eslint-plugin": "^6.0.0",
"@typescript-eslint/parser": "^6.0.0",
"@vitejs/plugin-react": "^4.0.4",
"eslint": "8.23.1",
"eslint-config-airbnb": "18.2.1",
"eslint-config-prettier": "8.5.0",
"eslint-config-react-app": "6.0.0",
"eslint-plugin-flowtype": "5.10.0",
"eslint-plugin-import": "2.25.4",
"eslint-plugin-jsx-a11y": "6.5.1",
"eslint-plugin-react-refresh": "^0.4.3",
"lint-staged": "11.2.0",
"typescript": "^5.0.2",
"vite": "^4.4.5",
"@babel/core": "7.19.3",
"@babel/eslint-parser": "7.19.1",
"@babel/plugin-proposal-class-properties": "7.18.6",
"@babel/plugin-proposal-function-bind": "7.18.9",
"@babel/preset-env": "7.19.4",
"@babel/preset-react": "7.18.6",
"eslint": "8.23.1",
"eslint-config-prettier": "8.5.0",
"eslint-plugin-prettier": "4.2.1",
"eslint-plugin-react": "7.31.8",
"eslint-plugin-react-hooks": "4.6.0",
"prettier": "2.7.1"
"eslint-plugin-react-refresh": "^0.4.3",
"lint-staged": "11.2.0",
"prettier": "2.7.1",
"typescript": "^5.0.2",
"vite": "^4.4.5"
},
"babel": {
"presets": [
Expand All @@ -86,5 +84,6 @@
"last 1 firefox version",
"last 1 safari version"
]
}
}
},
"packageManager": "[email protected]"
}
2 changes: 1 addition & 1 deletion src/components/ValidationResult.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import './ValidationResult.css';

const ValidationResult = ({ isValid }) => {
let imgSrc = process.env.PUBLIC_URL + '/';
let imgSrc = '/';
let validationResultText = '';
if (isValid) {
imgSrc += 'valid.png';
Expand Down
Loading

0 comments on commit 9bf3482

Please sign in to comment.