From a6df174e8e9b6d9c41928434047cee70c97f53bc Mon Sep 17 00:00:00 2001 From: tommytrg Date: Tue, 23 Jul 2024 19:34:29 +0200 Subject: [PATCH] chore: use pnpm instead of yarn --- .github/PULL_REQUEST_TEMPLATE.md | 2 +- README.md | 22 +++++++++++----------- lint-staged.config.js | 10 +++++----- package.json | 20 ++++++++++---------- 4 files changed, 27 insertions(+), 27 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index ac33e37a4..4afe4a828 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -8,7 +8,7 @@ Thank you for contributing to sheikah! :) - [ ] I have read and understood [CONTRIBUTING][cont] document. - [ ] I have read and understood [STYLEGUIDE][style] document. - [ ] I have included tests for the changes in my PR. If not, I have included a rationale for why I haven't. -- [ ] My code is formatted and is accepted by `yarn lint`. +- [ ] My code is formatted and is accepted by `pnpm lint`. - [ ] **I understand my PR may be closed if it becomes obvious I didn't actually perform all of these steps.** # Why this change is necessary and useful diff --git a/README.md b/README.md index d4f2dc61a..5da0ba612 100644 --- a/README.md +++ b/README.md @@ -35,16 +35,16 @@ git clone git@github.com:witnet/sheikah.git cd sheikah # install application dependencies -yarn +pnpm install # launch development application -yarn electron:serve:wallet +pnpm dev ``` ### Formatter -- Verify files are correctly formatted with `yarn lint` -- Repair lint errors with (**this operation modifies your files!**) `yarn lint!` +- Verify files are correctly formatted with `pnpm lint:check` +- Repair lint errors with (**this operation modifies your files!**) `pnpm lint` ### Test @@ -52,14 +52,14 @@ We use [Jest](https://facebook.github.io/jest/) for testing. ```bash # run unit tests -yarn test +pnpm test ``` ### Build #### Production -To build the application run: `yarn electron:build`, the build files are written to `dist_electron` directory. +To build the application run: `pnpm build`, the build files are written to `dist_electron` directory. ### Contributing @@ -67,15 +67,15 @@ You can read the [contributing guide](https://github.com/witnet/sheikah/blob/mas #### Github Actions (continuous integration) -When opening a pull request a job in [Github Actions](https://github.com/features/actions) will be fired off to check the changes. To avoid wasting time waiting for Github Actions output we provide the command `yarn ci` that will perform almost the same checks but it'll run in your computer. +When opening a pull request a job in [Github Actions](https://github.com/features/actions) will be fired off to check the changes. To avoid wasting time waiting for Github Actions output we provide the command `pnpm ci` that will perform almost the same checks but it'll run in your computer. #### Troubleshooting -- Use `yarn clean` to remove the contents of the build directory (`dist_electron`) -- Use `yarn clean-deps` to remove all installed dependencies -- Use `yarn reinstall` to remove all installed dependencies and install them again +- Use `pnpm clean` to remove the contents of the build directory (`dist_electron`) +- Use `pnpm clean-deps` to remove all installed dependencies +- Use `pnpm reinstall` to remove all installed dependencies and install them again -If the application doesn't boot correctly and no error is reported in the terminal, try running `yarn reinstall` and try again. +If the application doesn't boot correctly and no error is reported in the terminal, try running `pnpm reinstall` and try again. ## Release diff --git a/lint-staged.config.js b/lint-staged.config.js index 45325279e..f9476c967 100644 --- a/lint-staged.config.js +++ b/lint-staged.config.js @@ -1,9 +1,9 @@ module.exports = { - '*.js': ['yarn lint:eslint', 'yarn lint:prettier'], + '*.js': ['pnpm lint:eslint', 'pnpm lint:prettier'], '{!(package)*.json,.!(browserslist)*rc}': [ - 'yarn lint:prettier --parser json', + 'pnpm lint:prettier --parser json', ], - 'package.json': ['yarn lint:prettier'], - '*.vue': ['yarn lint:eslint', 'yarn lint:stylelint', 'yarn lint:prettier'], - '*.scss': ['yarn lint:stylelint', 'yarn lint:prettier'], + 'package.json': ['pnpm lint:prettier'], + '*.vue': ['pnpm lint:eslint', 'pnpm lint:stylelint', 'pnpm lint:prettier'], + '*.scss': ['pnpm lint:stylelint', 'pnpm lint:prettier'], } diff --git a/package.json b/package.json index 3b9e3708f..b67d802fb 100644 --- a/package.json +++ b/package.json @@ -14,26 +14,26 @@ "dev": "vite", "build": "vue-tsc --noEmit && vite build && electron-builder", "preview": "vite preview", - "test": "yarn test:unit", - "lint": "yarn lint:fix:eslint && yarn lint:fix:prettier", - "ci": "yarn lint:check && yarn test && yarn electron:build --publish=never", - "clean": "yarn clean-deps && rm -rf dist_electron", + "test": "pnpm test:unit", + "lint": "pnpm lint:fix:eslint && pnpm lint:fix:prettier", + "ci": "pnpm lint:check && pnpm test && pnpm electron:build --publish=never", + "clean": "pnpm clean-deps && rm -rf dist_electron", "clean-deps": "rm -rf node_modules", "electron:build": "vue-cli-service electron:build", "electron:generate-icons": "electron-icon-builder --input=./public/icon.png --output=build --flatten", "electron:serve": "vue-cli-service electron:serve", "electron:serve:wallet": "vue-cli-service electron:serve --wallet", "i18n:report": "vue-cli-service i18n:report --src './src/**/*.?(js|ts|vue)' --locales './src/locales/**/*.json'", - "lint:check": "yarn lint:check:eslint && yarn lint:check:prettier", - "lint:check:eslint": "yarn lint:eslint --ext .js,.ts,.vue .", - "lint:check:prettier": "yarn lint:prettier --check \"**/*.{ts,js,json,css,scss,vue,html}\"", + "lint:check": "pnpm lint:check:eslint && pnpm lint:check:prettier", + "lint:check:eslint": "pnpm lint:eslint --ext .js,.ts,.vue .", + "lint:check:prettier": "pnpm lint:prettier --check \"**/*.{ts,js,json,css,scss,vue,html}\"", "lint:eslint": "eslint", - "lint:fix:eslint": "yarn lint:eslint --fix --ext .js,.ts,.vue .", - "lint:fix:prettier": "yarn lint:prettier --write \"**/*.{ts,js,json,css,scss,vue,html}\"", + "lint:fix:eslint": "pnpm lint:eslint --fix --ext .js,.ts,.vue .", + "lint:fix:prettier": "pnpm lint:prettier --write \"**/*.{ts,js,json,css,scss,vue,html}\"", "lint:prettier": "prettier --loglevel warn", "postinstall": "electron-builder install-app-deps", "postuninstall": "electron-builder install-app-deps", - "reinstall": "yarn clean-deps && yarn", + "reinstall": "pnpm clean-deps && pnpm", "test:unit": "vitest" }, "main": "dist-electron/main/index.js",