Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] refactor: use pnpm and up-to-date vue3 #751

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
12 changes: 6 additions & 6 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js 14
- name: Use Node.js 16
uses: actions/setup-node@v2
with:
node-version: 14.x
cache: yarn
- name: Yarn Install
run: yarn install
node-version: 16.x
cache: pnpm
- name: pnpm install
run: pnpm install --frozen-lockfile
- name: Push translations
uses: transifex/cli-action@v1
with:
Expand All @@ -27,7 +27,7 @@ jobs:
token: ${{ secrets.TX_TOKEN }}
args: pull
- name: Build
run: yarn build
run: pnpm build
- name: Wait on tests
uses: lewagon/wait-on-check-action@v0.2
with:
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js 14
- name: Use Node.js 16
uses: actions/setup-node@v2
with:
node-version: 14.x
cache: yarn
- name: Yarn Install
run: yarn install --frozen-lockfile
node-version: 16.x
cache: pnpm
- name: pnpm install
run: pnpm install --frozen-lockfile
- name: Lint
run: yarn lint
run: pnpm lint
- name: Run unit tests
run: yarn test:unit
run: pnpm test:unit
10 changes: 5 additions & 5 deletions .github/workflows/updates-games.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js 14
- name: Use Node.js 16
uses: actions/setup-node@v2
with:
node-version: 14.x
cache: yarn
- name: Yarn Install
run: yarn install
node-version: 16.x
cache: pnpm
- name: pnpm install
run: pnpm install --frozen-lockfile
- run: ./generate-games.sh
- name: Create Pull Request
id: cpr
Expand Down
31 changes: 4 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,43 +7,20 @@
[![Liberapay](http://img.shields.io/liberapay/patrons/GreatWizard.svg?logo=liberapay)](https://liberapay.com/GreatWizard/)

## Project setup

```
yarn install
pnpm install
```

### Compiles and hot-reloads for development

```
yarn run serve
pnpm run serve
```

### Compiles and minifies for production

```
yarn run build
```

### Run your tests

```
yarn run test
pnpm run build
```

### Lints and fixes files

```
yarn run lint
```

### Run your end-to-end tests

```
yarn run test:e2e
```

### Run your unit tests

```
yarn run test:unit
```
pnpm run lint
14 changes: 14 additions & 0 deletions cypress.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
module.exports = {
fixturesFolder: 'tests/e2e/fixtures',
screenshotsFolder: 'tests/e2e/screenshots',
videosFolder: 'tests/e2e/videos',
e2e: {
// We've imported your old cypress plugins here.
// You may want to clean this up later by importing these.
setupNodeEvents(on, config) {
return require('./tests/e2e/plugins/index.js')(on, config)
},
specPattern: 'tests/e2e/specs/**/*.cy.{js,jsx,ts,tsx}',
supportFile: 'tests/e2e/support/index.js',
},
}
3 changes: 0 additions & 3 deletions cypress.json

This file was deleted.

3 changes: 3 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
preset: '@vue/cli-plugin-unit-jest'
}
72 changes: 33 additions & 39 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,52 +3,50 @@
"version": "0.1.0",
"license": "AGPL-3.0-or-later",
"scripts": {
"preserve": "node build-flags.js",
"serve": "vue-cli-service serve",
"prebuild": "node build-flags.js",
"build": "vue-cli-service build",
"test:unit": "vue-cli-service test:unit",
"test:e2e": "vue-cli-service test:e2e",
"lint": "vue-cli-service lint",
"i18n:report": "vue-cli-service i18n:report --src \"./src/**/*.?(js|vue)\" --locales \"./src/locales/**/*.json\""
},
"dependencies": {
"core-js": "^3.6.5",
"register-service-worker": "^1.7.1",
"vue": "^3.0.0",
"core-js": "^3.8.3",
"register-service-worker": "^1.7.2",
"vue": "^3.2.13",
"vue-gtag-next": "^1.14.0",
"vue-i18n": "^9.0.0-rc.7",
"vue-router": "^4.0.0-0",
"vuex": "^4.0.0-0"
"vue-i18n": "^9.5.0",
"vue-router": "^4.0.3",
"vuex": "^4.0.0"
},
"devDependencies": {
"@intlify/vue-i18n-loader": "^2.0.0-rc.1",
"@vue/cli-plugin-babel": "~4.5.0",
"@vue/cli-plugin-e2e-cypress": "~4.5.0",
"@vue/cli-plugin-eslint": "~4.5.0",
"@vue/cli-plugin-pwa": "~4.5.0",
"@vue/cli-plugin-router": "~4.5.0",
"@vue/cli-plugin-unit-jest": "~4.5.0",
"@vue/cli-plugin-vuex": "~4.5.0",
"@vue/cli-service": "~4.5.0",
"@vue/compiler-sfc": "^3.0.0",
"@vue/eslint-config-prettier": "^6.0.0",
"@babel/core": "^7.12.16",
"@babel/eslint-parser": "^7.12.16",
"@intlify/unplugin-vue-i18n": "^1.4.0",
"@vue/cli-plugin-babel": "~5.0.0",
"@vue/cli-plugin-e2e-cypress": "^5.0.8",
"@vue/cli-plugin-eslint": "~5.0.0",
"@vue/cli-plugin-pwa": "^5.0.8",
"@vue/cli-plugin-router": "~5.0.0",
"@vue/cli-plugin-unit-jest": "^5.0.8",
"@vue/cli-plugin-vuex": "~5.0.8",
"@vue/cli-service": "~5.0.0",
"@vue/test-utils": "^2.0.0-0",
"babel-eslint": "^10.1.0",
"eslint": "^6.7.2",
"@vue/vue3-jest": "^27.0.0-alpha.1",
"babel-jest": "^27.0.6",
"eslint": "^7.32.0",
"eslint-plugin-prettier": "^3.1.3",
"eslint-plugin-vue": "^7.0.0-0",
"eslint-plugin-vue": "^8.0.3",
"flagpack-core": "^1.0.0",
"geoip-country": "^4.0.11",
"he": "^1.2.0",
"node-sass": "^4.12.0",
"jest": "^27.0.5",
"vue-cli-plugin-i18n": "^2.3.2",
"prettier": "^1.19.1",
"sass-loader": "^8.0.2",
"sass": "^1.69.0",
"sass-loader": "^10",
"sitemap-webpack-plugin": "^1.1.0",
"svgo": "^2.2.2",
"typescript": "~3.9.3",
"vue-cli-plugin-i18n": "~2.0.0",
"vue-jest": "^5.0.0-0",
"xml2js": "^0.5.0"
},
"eslintConfig": {
Expand All @@ -58,13 +56,14 @@
},
"extends": [
"plugin:vue/vue3-essential",
"eslint:recommended",
"@vue/prettier"
"eslint:recommended"
],
"parserOptions": {
"parser": "babel-eslint"
"parser": "@babel/eslint-parser"
},
"rules": {
"vue/multi-word-component-names": 0
},
"rules": {},
"overrides": [
{
"files": [
Expand All @@ -80,12 +79,7 @@
"browserslist": [
"> 1%",
"last 2 versions",
"not dead"
],
"jest": {
"preset": "@vue/cli-plugin-unit-jest",
"transform": {
"^.+\\.vue$": "vue-jest"
}
}
"not dead",
"not ie 11"
]
}
Loading
Loading