mirror of
https://gitlab.com/PronounsPage/PronounsPage.git
synced 2025-09-22 20:24:18 -04:00
Merge branch 'pnpm' into 'main'
pnpm See merge request PronounsPage/PronounsPage!437
This commit is contained in:
commit
7ab70a9bf4
@ -18,7 +18,7 @@ module.exports = {
|
|||||||
'@stylistic',
|
'@stylistic',
|
||||||
'@stylistic/ts',
|
'@stylistic/ts',
|
||||||
],
|
],
|
||||||
ignorePatterns: ['cache', 'census', 'data', 'dist', 'keys', 'new', 'static'],
|
ignorePatterns: ['cache', 'census', 'data', 'dist', 'keys', 'new', 'static', 'pnpm-lock.yaml'],
|
||||||
parserOptions: {
|
parserOptions: {
|
||||||
ecmaVersion: 'latest',
|
ecmaVersion: 'latest',
|
||||||
sourceType: 'module',
|
sourceType: 'module',
|
||||||
|
@ -21,33 +21,35 @@ check:
|
|||||||
script:
|
script:
|
||||||
- start_section "Install Dependencies"
|
- start_section "Install Dependencies"
|
||||||
# temporarily replace FontAwesomePro dependency with its fake version as the CI can’t access it
|
# temporarily replace FontAwesomePro dependency with its fake version as the CI can’t access it
|
||||||
# the name needs to be changed in both package.json and yarn.lock
|
# the name needs to be changed in both package.json and pnpm-lock.yaml
|
||||||
- 'sed -i "s/git+ssh:\/\/git@gitlab.com:Avris\/FontAwesomePro.git/git+https:\/\/gitlab.com\/Avris\/FakeFontAwesomePro.git/" package.json yarn.lock'
|
- 'sed -i "s/git+ssh:\/\/git@gitlab.com:Avris\/FontAwesomePro.git/git+https:\/\/gitlab.com\/Avris\/FakeFontAwesomePro.git/" package.json pnpm-lock.yaml'
|
||||||
# the referenced SHA needs to be additionally changed in yarn.lock
|
# the referenced SHA needs to be additionally changed in pnpm-lock.yaml
|
||||||
- 'sed -i "s/f00db606f659dca78b143b7bcab5671b2cb459a8/0d322c775cbe9bf99da261700be30251291b51a8/" yarn.lock'
|
- 'sed -i "s/git@gitlab.com+Avris\/FontAwesomePro\/f00db606f659dca78b143b7bcab5671b2cb459a8/gitlab.com\/Avris\/FakeFontAwesomePro\/0d322c775cbe9bf99da261700be30251291b51a8/" pnpm-lock.yaml'
|
||||||
- yarn install --frozen-lockfile || record_failure
|
- 'sed -i "s/resolution: {commit: f00db606f659dca78b143b7bcab5671b2cb459a8, repo: git@gitlab.com:Avris\/FontAwesomePro.git, type: git}/resolution: { tarball: https:\/\/gitlab.com\/api\/v4\/projects\/Avris%2FFakeFontAwesomePro\/repository\/archive.tar.gz?sha=0d322c775cbe9bf99da261700be30251291b51a8 }/" pnpm-lock.yaml'
|
||||||
|
- corepack enable pnpm
|
||||||
|
- pnpm install || record_failure
|
||||||
- end_section
|
- end_section
|
||||||
|
|
||||||
- start_section "Setup"
|
- start_section "Setup"
|
||||||
- make install
|
- make install
|
||||||
# revert the changes for the FontAwesomePro dependency only now because `make install` calls `yarn`
|
# revert the changes for the FontAwesomePro dependency only now because `make install` calls `pnpm install`
|
||||||
- git restore package.json yarn.lock
|
- git restore package.json pnpm-lock.yaml
|
||||||
- make switch LANG=en
|
- make switch LANG=en
|
||||||
- end_section
|
- end_section
|
||||||
|
|
||||||
- start_section "Type checking"
|
- start_section "Type checking"
|
||||||
- yarn vue-tsc || record_failure
|
- pnpm vue-tsc || record_failure
|
||||||
- end_section
|
- end_section
|
||||||
|
|
||||||
- start_section "Unit Tests"
|
- start_section "Unit Tests"
|
||||||
- >
|
- >
|
||||||
yarn test --ci --reporters=default --reporters=jest-junit
|
pnpm run test --ci --reporters=default --reporters=jest-junit
|
||||||
--coverage --collect-coverage-from="./{plugins,server,src,store}/**"
|
--coverage --collect-coverage-from="./{plugins,server,src,store}/**"
|
||||||
--coverage-reporters=text --coverage-reporters=cobertura || record_failure
|
--coverage-reporters=text --coverage-reporters=cobertura || record_failure
|
||||||
- end_section
|
- end_section
|
||||||
|
|
||||||
- start_section "Check linting rules"
|
- start_section "Check linting rules"
|
||||||
- yarn lint --format gitlab --color --fix | grep -v "^\S*warn" || record_failure
|
- pnpm lint --format gitlab --color --fix | grep -v "^\S*warn" || record_failure
|
||||||
- end_section
|
- end_section
|
||||||
|
|
||||||
- start_section "Check for fixable problems"
|
- start_section "Check for fixable problems"
|
||||||
@ -57,12 +59,12 @@ check:
|
|||||||
# calls scripts to check for simple issues while disabling actual work (e.g. no publishing to third party)
|
# calls scripts to check for simple issues while disabling actual work (e.g. no publishing to third party)
|
||||||
# some scripts are left out because they need special configuration or are not safe to smoke test
|
# some scripts are left out because they need special configuration or are not safe to smoke test
|
||||||
- start_section "Smoke test server scripts"
|
- start_section "Smoke test server scripts"
|
||||||
- yarn run-script server/migrate.ts || record_failure "Smoke test migrate"
|
- pnpm run-file server/migrate.ts || record_failure "Smoke test migrate"
|
||||||
- yarn run-script server/calendarBot.js en,pl,es,pt,de,nl,fr,ja,ru,sv,lad,ua,vi "" || record_failure "Smoke test calendarBot"
|
- pnpm run-file server/calendarBot.js en,pl,es,pt,de,nl,fr,ja,ru,sv,lad,ua,vi "" || record_failure "Smoke test calendarBot"
|
||||||
- yarn run-script server/cleanupAccounts.js || record_failure "Smoke test cleanupAccounts"
|
- pnpm run-file server/cleanupAccounts.js || record_failure "Smoke test cleanupAccounts"
|
||||||
- yarn run-script server/notify.js || record_failure "Smoke test notify"
|
- pnpm run-file server/notify.js || record_failure "Smoke test notify"
|
||||||
- yarn run-script server/stats.ts || record_failure "Smoke test stats"
|
- pnpm run-file server/stats.ts || record_failure "Smoke test stats"
|
||||||
- yarn run-script server/subscriptions.js || record_failure "Smoke test subscriptions"
|
- pnpm run-file server/subscriptions.js || record_failure "Smoke test subscriptions"
|
||||||
- end_section
|
- end_section
|
||||||
|
|
||||||
- >
|
- >
|
||||||
|
2
.vscode/settings.json
vendored
2
.vscode/settings.json
vendored
@ -8,7 +8,7 @@
|
|||||||
"files.associations": {
|
"files.associations": {
|
||||||
"*.suml": "yaml"
|
"*.suml": "yaml"
|
||||||
},
|
},
|
||||||
"jest.jestCommandLine": "yarn test",
|
"jest.jestCommandLine": "pnpm test",
|
||||||
"[tsv]": {
|
"[tsv]": {
|
||||||
"files.trimTrailingWhitespace": false,
|
"files.trimTrailingWhitespace": false,
|
||||||
},
|
},
|
||||||
|
22
Makefile
22
Makefile
@ -11,21 +11,21 @@ install:
|
|||||||
if [ ! -d "${KEYS_DIR}" ]; then mkdir -p ${KEYS_DIR}; openssl genrsa -out ${KEYS_DIR}/private.pem 2048; openssl rsa -in ${KEYS_DIR}/private.pem -outform PEM -pubout -out ${KEYS_DIR}/public.pem; fi
|
if [ ! -d "${KEYS_DIR}" ]; then mkdir -p ${KEYS_DIR}; openssl genrsa -out ${KEYS_DIR}/private.pem 2048; openssl rsa -in ${KEYS_DIR}/private.pem -outform PEM -pubout -out ${KEYS_DIR}/public.pem; fi
|
||||||
mkdir -p moderation
|
mkdir -p moderation
|
||||||
touch moderation/sus.txt moderation/rules-users.md moderation/rules-terminology.md moderation/rules-sources.md
|
touch moderation/sus.txt moderation/rules-users.md moderation/rules-terminology.md moderation/rules-sources.md
|
||||||
yarn
|
pnpm install
|
||||||
yarn run-script server/migrate.ts
|
pnpm run-file server/migrate.ts
|
||||||
yarn run-script locale/generateSchemas.ts
|
pnpm run-file locale/generateSchemas.ts
|
||||||
|
|
||||||
lint:
|
lint:
|
||||||
yarn lint
|
pnpm lint
|
||||||
|
|
||||||
test:
|
test:
|
||||||
yarn test
|
pnpm test
|
||||||
|
|
||||||
run:
|
run:
|
||||||
yarn dev
|
pnpm dev
|
||||||
|
|
||||||
start:
|
start:
|
||||||
node_modules/.bin/avris-daemonise start webserver yarn dev
|
node_modules/.bin/avris-daemonise start webserver pnpm dev
|
||||||
|
|
||||||
stop:
|
stop:
|
||||||
node_modules/.bin/avris-daemonise stop webserver
|
node_modules/.bin/avris-daemonise stop webserver
|
||||||
@ -33,11 +33,11 @@ stop:
|
|||||||
deploy: install
|
deploy: install
|
||||||
mkdir -p ./cache
|
mkdir -p ./cache
|
||||||
git log -n 1 --pretty=format:"%H" > ./cache/version
|
git log -n 1 --pretty=format:"%H" > ./cache/version
|
||||||
yarn build
|
pnpm build
|
||||||
yarn run-script server/migrate.ts
|
pnpm run-file server/migrate.ts
|
||||||
ln -sfn ../data/img ./static/img-local
|
ln -sfn ../data/img ./static/img-local
|
||||||
ln -sfn ../data/docs ./static/docs-local
|
ln -sfn ../data/docs ./static/docs-local
|
||||||
yarn run-script server/sentry.ts
|
pnpm run-file server/sentry.ts
|
||||||
|
|
||||||
switch:
|
switch:
|
||||||
rm -rf cache
|
rm -rf cache
|
||||||
@ -47,4 +47,4 @@ switch:
|
|||||||
if [ -d ./locale/${LANG}/img/logo ]; then echo ""; else ln -s ../../_/img/logo ./locale/${LANG}/img/logo; fi
|
if [ -d ./locale/${LANG}/img/logo ]; then echo ""; else ln -s ../../_/img/logo ./locale/${LANG}/img/logo; fi
|
||||||
|
|
||||||
migrate:
|
migrate:
|
||||||
yarn run-script server/migrate.ts
|
pnpm run-file server/migrate.ts
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
## Dependencies
|
## Dependencies
|
||||||
|
|
||||||
- [NodeJS](https://nodejs.org/en) version 18.20.1
|
- [NodeJS](https://nodejs.org/en) version 18.20.1
|
||||||
- [Yarn](https://yarnpkg.com/getting-started/install) or other package manager
|
- [pnpm](https://pnpm.io/installation) or other package manager
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
@ -67,7 +67,8 @@ and give a user the `*` role in the `roles` column.
|
|||||||
|
|
||||||
### Package manager
|
### Package manager
|
||||||
|
|
||||||
If you're having problems using Yarn, npm is probably fine, but remember to switch any `yarn [x]` commands for `npm run [x]`.\
|
If you're having problems using pnpm, yarn or npm are probably fine,
|
||||||
|
but remember to switch any `pnpm [x]` commands for `yarn [x]` or `npm run [x]`.\
|
||||||
Remember to modify the `.env` file. You don't really need to set up any external APIs, just make up a secret.
|
Remember to modify the `.env` file. You don't really need to set up any external APIs, just make up a secret.
|
||||||
```text
|
```text
|
||||||
// ...
|
// ...
|
||||||
@ -205,7 +206,7 @@ If you're having issues with [HMR](https://webpack.js.org/concepts/hot-module-re
|
|||||||
```
|
```
|
||||||
|
|
||||||
#### Out-of-Memory in Nuxt development mode
|
#### Out-of-Memory in Nuxt development mode
|
||||||
If you experience a `JavaScript heap out of memory` error, it may help to disable typechecking (you can still typecheck via your editor or `yarn vue-ts`):
|
If you experience a `JavaScript heap out of memory` error, it may help to disable typechecking (you can still typecheck via your editor or `pnpm vue-ts`):
|
||||||
- add to `nuxt.config.ts`:
|
- add to `nuxt.config.ts`:
|
||||||
```js
|
```js
|
||||||
typescript: {
|
typescript: {
|
||||||
|
25
package.json
25
package.json
@ -9,9 +9,9 @@
|
|||||||
"start": "nuxt start",
|
"start": "nuxt start",
|
||||||
"export": "nuxt export",
|
"export": "nuxt export",
|
||||||
"serve": "nuxt serve",
|
"serve": "nuxt serve",
|
||||||
"run-script": "NODE_OPTIONS=\"--import ./server/ts-node-esm.js\" node",
|
"run-file": "NODE_OPTIONS=\"--import ./server/ts-node-esm.js\" node",
|
||||||
"lint": "eslint --ext .cjs,.js,.json,.suml,.ts,.yml,.vue --fix .",
|
"lint": "eslint --ext .cjs,.js,.json,.suml,.ts,.yml,.vue --fix .",
|
||||||
"test": "node --experimental-vm-modules $(yarn bin jest)"
|
"test": "NODE_OPTIONS=\"--experimental-vm-modules\" $(pnpm bin)/jest"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@aws-sdk/client-polly": "^3.525.0",
|
"@aws-sdk/client-polly": "^3.525.0",
|
||||||
@ -20,6 +20,10 @@
|
|||||||
"@nuxtjs/pwa": "3.3.5",
|
"@nuxtjs/pwa": "3.3.5",
|
||||||
"@nuxtjs/redirect-module": "^0.3.1",
|
"@nuxtjs/redirect-module": "^0.3.1",
|
||||||
"@privyid/nuxt-csrf": "^1.0.0",
|
"@privyid/nuxt-csrf": "^1.0.0",
|
||||||
|
"@sentry/browser": "^7.109.0",
|
||||||
|
"@sentry/cli": "^2.31.0",
|
||||||
|
"@sentry/node": "^7.109.0",
|
||||||
|
"@sentry/vue": "^7.109.0",
|
||||||
"abort-controller": "^3.0.0",
|
"abort-controller": "^3.0.0",
|
||||||
"autoprefixer": "^10.4.5",
|
"autoprefixer": "^10.4.5",
|
||||||
"avris-columnist": "^0.3.1",
|
"avris-columnist": "^0.3.1",
|
||||||
@ -47,13 +51,14 @@
|
|||||||
"markdown-it-mark": "^4.0.0",
|
"markdown-it-mark": "^4.0.0",
|
||||||
"markdown-it-sub": "^2.0.0",
|
"markdown-it-sub": "^2.0.0",
|
||||||
"markdown-it-sup": "^2.0.0",
|
"markdown-it-sup": "^2.0.0",
|
||||||
|
"marked": "0.7.0",
|
||||||
"mastodon": "^1.2.2",
|
"mastodon": "^1.2.2",
|
||||||
"memorystore": "^1.6.7",
|
"memorystore": "^1.6.7",
|
||||||
"multer": "^1.4.5-lts.1",
|
"multer": "^1.4.5-lts.1",
|
||||||
"nepali-calendar-js": "^1.0.4",
|
"nepali-calendar-js": "^1.0.4",
|
||||||
"node-fetch": "^2.6.12",
|
"node-fetch": "^2.6.12",
|
||||||
"nodemailer": "^6.7.8",
|
"nodemailer": "^6.7.8",
|
||||||
"nuxt": "^2.17.2",
|
"nuxt": "^2.17.3",
|
||||||
"pageres": "^6.3.1",
|
"pageres": "^6.3.1",
|
||||||
"papaparse": "^5.4.1",
|
"papaparse": "^5.4.1",
|
||||||
"plausible-api": "https://github.com/avo7/plausible-api.git#main",
|
"plausible-api": "https://github.com/avo7/plausible-api.git#main",
|
||||||
@ -71,12 +76,12 @@
|
|||||||
"twitter": "^1.7.1",
|
"twitter": "^1.7.1",
|
||||||
"ulid": "^2.3.0",
|
"ulid": "^2.3.0",
|
||||||
"uuid": "^8.3.2",
|
"uuid": "^8.3.2",
|
||||||
"vue": "2.7.15",
|
"vue": "2.7.16",
|
||||||
"vue-client-only": "^2.1.0",
|
"vue-client-only": "^2.1.0",
|
||||||
"vue-lazy-hydration": "^2.0.0-beta.4",
|
"vue-lazy-hydration": "^2.0.0-beta.4",
|
||||||
"vue-matomo": "^3.13.5-0",
|
"vue-matomo": "^3.13.5-0",
|
||||||
"vue-plausible": "^1.3.2",
|
"vue-plausible": "^1.3.2",
|
||||||
"vue-template-compiler": "2.7.15",
|
"vue-template-compiler": "2.7.16",
|
||||||
"vuedraggable": "^2.24.3",
|
"vuedraggable": "^2.24.3",
|
||||||
"vuejs-datepicker": "^1.6.2",
|
"vuejs-datepicker": "^1.6.2",
|
||||||
"vuex": "^3.6.2",
|
"vuex": "^3.6.2",
|
||||||
@ -84,16 +89,22 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@fortawesome/fontawesome-pro": "git+ssh://git@gitlab.com:Avris/FontAwesomePro.git",
|
"@fortawesome/fontawesome-pro": "git+ssh://git@gitlab.com:Avris/FontAwesomePro.git",
|
||||||
|
"@jest/globals": "^29.7.0",
|
||||||
"@nuxt/types": "2.17.2",
|
"@nuxt/types": "2.17.2",
|
||||||
"@nuxt/typescript-build": "^3.0.2",
|
"@nuxt/typescript-build": "^3.0.2",
|
||||||
"@nuxtjs/sentry": "^8.0.7",
|
"@nuxtjs/sentry": "^8.0.7",
|
||||||
|
"@sentry/types": "^7.109.0",
|
||||||
"@sentry/webpack-plugin": "^2.14.2",
|
"@sentry/webpack-plugin": "^2.14.2",
|
||||||
|
"@smithy/types": "^2.12.0",
|
||||||
"@stylistic/eslint-plugin": "^1.5.4",
|
"@stylistic/eslint-plugin": "^1.5.4",
|
||||||
"@types/autoprefixer": "^10.2.0",
|
"@types/autoprefixer": "^10.2.0",
|
||||||
|
"@types/connect": "^3.4.38",
|
||||||
"@types/cookie-parser": "^1.4.6",
|
"@types/cookie-parser": "^1.4.6",
|
||||||
|
"@types/express": "^4.17.21",
|
||||||
"@types/express-session": "^1.17.10",
|
"@types/express-session": "^1.17.10",
|
||||||
"@types/js-md5": "^0.7.2",
|
"@types/js-md5": "^0.7.2",
|
||||||
"@types/jsonwebtoken": "^8.5.9",
|
"@types/jsonwebtoken": "^8.5.9",
|
||||||
|
"@types/lodash": "^4.14.197",
|
||||||
"@types/luxon": "^1.27.1",
|
"@types/luxon": "^1.27.1",
|
||||||
"@types/multer": "1.4.5",
|
"@types/multer": "1.4.5",
|
||||||
"@types/node": "^20.11.5",
|
"@types/node": "^20.11.5",
|
||||||
@ -107,6 +118,7 @@
|
|||||||
"@typescript-eslint/eslint-plugin": "^6.19.0",
|
"@typescript-eslint/eslint-plugin": "^6.19.0",
|
||||||
"@typescript-eslint/parser": "^6.19.0",
|
"@typescript-eslint/parser": "^6.19.0",
|
||||||
"avris-daemonise": "^0.0.2",
|
"avris-daemonise": "^0.0.2",
|
||||||
|
"axios": "^0.21.4",
|
||||||
"bootstrap": "^5.3.1",
|
"bootstrap": "^5.3.1",
|
||||||
"clipboard": "^2.0.6",
|
"clipboard": "^2.0.6",
|
||||||
"css-loader": "^5.2.7",
|
"css-loader": "^5.2.7",
|
||||||
@ -119,11 +131,13 @@
|
|||||||
"eslint-plugin-jsonc": "^2.11.2",
|
"eslint-plugin-jsonc": "^2.11.2",
|
||||||
"eslint-plugin-vue": "^9.19.2",
|
"eslint-plugin-vue": "^9.19.2",
|
||||||
"eslint-plugin-yml": "^1.11.0",
|
"eslint-plugin-yml": "^1.11.0",
|
||||||
|
"expect": "^29.7.0",
|
||||||
"globals": "^13.24.0",
|
"globals": "^13.24.0",
|
||||||
"html-loader": "^1.3.2",
|
"html-loader": "^1.3.2",
|
||||||
"jest": "^29.7.0",
|
"jest": "^29.7.0",
|
||||||
"jest-junit": "^16.0.0",
|
"jest-junit": "^16.0.0",
|
||||||
"markdown-loader": "^6.0.0",
|
"markdown-loader": "^6.0.0",
|
||||||
|
"path-to-regexp": "0.1.7",
|
||||||
"postcss": "^8.2.15",
|
"postcss": "^8.2.15",
|
||||||
"postcss-import": "^13.0.0",
|
"postcss-import": "^13.0.0",
|
||||||
"postcss-loader": "^4.1.0",
|
"postcss-loader": "^4.1.0",
|
||||||
@ -136,6 +150,7 @@
|
|||||||
"ts-jest": "^29.1.1",
|
"ts-jest": "^29.1.1",
|
||||||
"ts-json-schema-generator": "^1.5.0",
|
"ts-json-schema-generator": "^1.5.0",
|
||||||
"typescript": "^5.3.3",
|
"typescript": "^5.3.3",
|
||||||
|
"vue-meta": "^2.4.0",
|
||||||
"vue-tsc": "^1.8.27",
|
"vue-tsc": "^1.8.27",
|
||||||
"webpack": "^4.47.0",
|
"webpack": "^4.47.0",
|
||||||
"yaml-loader": "^0.8.0"
|
"yaml-loader": "^0.8.0"
|
||||||
|
16963
pnpm-lock.yaml
generated
Normal file
16963
pnpm-lock.yaml
generated
Normal file
File diff suppressed because it is too large
Load Diff
5
run-wrapper.sh
Executable file
5
run-wrapper.sh
Executable file
@ -0,0 +1,5 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# wrapper for external contexts (cronjob, supervisor) which have no access to nvm to
|
||||||
|
# use the correct node version and execute pnpm
|
||||||
|
|
||||||
|
PATH=~/.nvm/versions/node/"$(<.nvmrc)"/bin:$PATH ./node_modules/.bin/"$1" "${@:2}"
|
Loading…
x
Reference in New Issue
Block a user