mirror of
https://gitlab.com/PronounsPage/PronounsPage.git
synced 2025-09-22 12:03:25 -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/ts',
|
||||
],
|
||||
ignorePatterns: ['cache', 'census', 'data', 'dist', 'keys', 'new', 'static'],
|
||||
ignorePatterns: ['cache', 'census', 'data', 'dist', 'keys', 'new', 'static', 'pnpm-lock.yaml'],
|
||||
parserOptions: {
|
||||
ecmaVersion: 'latest',
|
||||
sourceType: 'module',
|
||||
|
@ -21,33 +21,35 @@ check:
|
||||
script:
|
||||
- start_section "Install Dependencies"
|
||||
# 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
|
||||
- 'sed -i "s/git+ssh:\/\/git@gitlab.com:Avris\/FontAwesomePro.git/git+https:\/\/gitlab.com\/Avris\/FakeFontAwesomePro.git/" package.json yarn.lock'
|
||||
# the referenced SHA needs to be additionally changed in yarn.lock
|
||||
- 'sed -i "s/f00db606f659dca78b143b7bcab5671b2cb459a8/0d322c775cbe9bf99da261700be30251291b51a8/" yarn.lock'
|
||||
- yarn install --frozen-lockfile || record_failure
|
||||
# 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 pnpm-lock.yaml'
|
||||
# the referenced SHA needs to be additionally changed in pnpm-lock.yaml
|
||||
- 'sed -i "s/git@gitlab.com+Avris\/FontAwesomePro\/f00db606f659dca78b143b7bcab5671b2cb459a8/gitlab.com\/Avris\/FakeFontAwesomePro\/0d322c775cbe9bf99da261700be30251291b51a8/" pnpm-lock.yaml'
|
||||
- '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
|
||||
|
||||
- start_section "Setup"
|
||||
- make install
|
||||
# revert the changes for the FontAwesomePro dependency only now because `make install` calls `yarn`
|
||||
- git restore package.json yarn.lock
|
||||
# revert the changes for the FontAwesomePro dependency only now because `make install` calls `pnpm install`
|
||||
- git restore package.json pnpm-lock.yaml
|
||||
- make switch LANG=en
|
||||
- end_section
|
||||
|
||||
- start_section "Type checking"
|
||||
- yarn vue-tsc || record_failure
|
||||
- pnpm vue-tsc || record_failure
|
||||
- end_section
|
||||
|
||||
- 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-reporters=text --coverage-reporters=cobertura || record_failure
|
||||
- end_section
|
||||
|
||||
- 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
|
||||
|
||||
- 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)
|
||||
# some scripts are left out because they need special configuration or are not safe to smoke test
|
||||
- start_section "Smoke test server scripts"
|
||||
- yarn run-script 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"
|
||||
- yarn run-script server/cleanupAccounts.js || record_failure "Smoke test cleanupAccounts"
|
||||
- yarn run-script server/notify.js || record_failure "Smoke test notify"
|
||||
- yarn run-script server/stats.ts || record_failure "Smoke test stats"
|
||||
- yarn run-script server/subscriptions.js || record_failure "Smoke test subscriptions"
|
||||
- pnpm run-file server/migrate.ts || record_failure "Smoke test migrate"
|
||||
- pnpm run-file 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/cleanupAccounts.js || record_failure "Smoke test cleanupAccounts"
|
||||
- pnpm run-file server/notify.js || record_failure "Smoke test notify"
|
||||
- pnpm run-file server/stats.ts || record_failure "Smoke test stats"
|
||||
- pnpm run-file server/subscriptions.js || record_failure "Smoke test subscriptions"
|
||||
- end_section
|
||||
|
||||
- >
|
||||
|
2
.vscode/settings.json
vendored
2
.vscode/settings.json
vendored
@ -8,7 +8,7 @@
|
||||
"files.associations": {
|
||||
"*.suml": "yaml"
|
||||
},
|
||||
"jest.jestCommandLine": "yarn test",
|
||||
"jest.jestCommandLine": "pnpm test",
|
||||
"[tsv]": {
|
||||
"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
|
||||
mkdir -p moderation
|
||||
touch moderation/sus.txt moderation/rules-users.md moderation/rules-terminology.md moderation/rules-sources.md
|
||||
yarn
|
||||
yarn run-script server/migrate.ts
|
||||
yarn run-script locale/generateSchemas.ts
|
||||
pnpm install
|
||||
pnpm run-file server/migrate.ts
|
||||
pnpm run-file locale/generateSchemas.ts
|
||||
|
||||
lint:
|
||||
yarn lint
|
||||
pnpm lint
|
||||
|
||||
test:
|
||||
yarn test
|
||||
pnpm test
|
||||
|
||||
run:
|
||||
yarn dev
|
||||
pnpm dev
|
||||
|
||||
start:
|
||||
node_modules/.bin/avris-daemonise start webserver yarn dev
|
||||
node_modules/.bin/avris-daemonise start webserver pnpm dev
|
||||
|
||||
stop:
|
||||
node_modules/.bin/avris-daemonise stop webserver
|
||||
@ -33,11 +33,11 @@ stop:
|
||||
deploy: install
|
||||
mkdir -p ./cache
|
||||
git log -n 1 --pretty=format:"%H" > ./cache/version
|
||||
yarn build
|
||||
yarn run-script server/migrate.ts
|
||||
pnpm build
|
||||
pnpm run-file server/migrate.ts
|
||||
ln -sfn ../data/img ./static/img-local
|
||||
ln -sfn ../data/docs ./static/docs-local
|
||||
yarn run-script server/sentry.ts
|
||||
pnpm run-file server/sentry.ts
|
||||
|
||||
switch:
|
||||
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
|
||||
|
||||
migrate:
|
||||
yarn run-script server/migrate.ts
|
||||
pnpm run-file server/migrate.ts
|
||||
|
@ -3,7 +3,7 @@
|
||||
## Dependencies
|
||||
|
||||
- [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
|
||||
|
||||
@ -67,7 +67,8 @@ and give a user the `*` role in the `roles` column.
|
||||
|
||||
### 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.
|
||||
```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
|
||||
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`:
|
||||
```js
|
||||
typescript: {
|
||||
|
25
package.json
25
package.json
@ -9,9 +9,9 @@
|
||||
"start": "nuxt start",
|
||||
"export": "nuxt export",
|
||||
"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 .",
|
||||
"test": "node --experimental-vm-modules $(yarn bin jest)"
|
||||
"test": "NODE_OPTIONS=\"--experimental-vm-modules\" $(pnpm bin)/jest"
|
||||
},
|
||||
"dependencies": {
|
||||
"@aws-sdk/client-polly": "^3.525.0",
|
||||
@ -20,6 +20,10 @@
|
||||
"@nuxtjs/pwa": "3.3.5",
|
||||
"@nuxtjs/redirect-module": "^0.3.1",
|
||||
"@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",
|
||||
"autoprefixer": "^10.4.5",
|
||||
"avris-columnist": "^0.3.1",
|
||||
@ -47,13 +51,14 @@
|
||||
"markdown-it-mark": "^4.0.0",
|
||||
"markdown-it-sub": "^2.0.0",
|
||||
"markdown-it-sup": "^2.0.0",
|
||||
"marked": "0.7.0",
|
||||
"mastodon": "^1.2.2",
|
||||
"memorystore": "^1.6.7",
|
||||
"multer": "^1.4.5-lts.1",
|
||||
"nepali-calendar-js": "^1.0.4",
|
||||
"node-fetch": "^2.6.12",
|
||||
"nodemailer": "^6.7.8",
|
||||
"nuxt": "^2.17.2",
|
||||
"nuxt": "^2.17.3",
|
||||
"pageres": "^6.3.1",
|
||||
"papaparse": "^5.4.1",
|
||||
"plausible-api": "https://github.com/avo7/plausible-api.git#main",
|
||||
@ -71,12 +76,12 @@
|
||||
"twitter": "^1.7.1",
|
||||
"ulid": "^2.3.0",
|
||||
"uuid": "^8.3.2",
|
||||
"vue": "2.7.15",
|
||||
"vue": "2.7.16",
|
||||
"vue-client-only": "^2.1.0",
|
||||
"vue-lazy-hydration": "^2.0.0-beta.4",
|
||||
"vue-matomo": "^3.13.5-0",
|
||||
"vue-plausible": "^1.3.2",
|
||||
"vue-template-compiler": "2.7.15",
|
||||
"vue-template-compiler": "2.7.16",
|
||||
"vuedraggable": "^2.24.3",
|
||||
"vuejs-datepicker": "^1.6.2",
|
||||
"vuex": "^3.6.2",
|
||||
@ -84,16 +89,22 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@fortawesome/fontawesome-pro": "git+ssh://git@gitlab.com:Avris/FontAwesomePro.git",
|
||||
"@jest/globals": "^29.7.0",
|
||||
"@nuxt/types": "2.17.2",
|
||||
"@nuxt/typescript-build": "^3.0.2",
|
||||
"@nuxtjs/sentry": "^8.0.7",
|
||||
"@sentry/types": "^7.109.0",
|
||||
"@sentry/webpack-plugin": "^2.14.2",
|
||||
"@smithy/types": "^2.12.0",
|
||||
"@stylistic/eslint-plugin": "^1.5.4",
|
||||
"@types/autoprefixer": "^10.2.0",
|
||||
"@types/connect": "^3.4.38",
|
||||
"@types/cookie-parser": "^1.4.6",
|
||||
"@types/express": "^4.17.21",
|
||||
"@types/express-session": "^1.17.10",
|
||||
"@types/js-md5": "^0.7.2",
|
||||
"@types/jsonwebtoken": "^8.5.9",
|
||||
"@types/lodash": "^4.14.197",
|
||||
"@types/luxon": "^1.27.1",
|
||||
"@types/multer": "1.4.5",
|
||||
"@types/node": "^20.11.5",
|
||||
@ -107,6 +118,7 @@
|
||||
"@typescript-eslint/eslint-plugin": "^6.19.0",
|
||||
"@typescript-eslint/parser": "^6.19.0",
|
||||
"avris-daemonise": "^0.0.2",
|
||||
"axios": "^0.21.4",
|
||||
"bootstrap": "^5.3.1",
|
||||
"clipboard": "^2.0.6",
|
||||
"css-loader": "^5.2.7",
|
||||
@ -119,11 +131,13 @@
|
||||
"eslint-plugin-jsonc": "^2.11.2",
|
||||
"eslint-plugin-vue": "^9.19.2",
|
||||
"eslint-plugin-yml": "^1.11.0",
|
||||
"expect": "^29.7.0",
|
||||
"globals": "^13.24.0",
|
||||
"html-loader": "^1.3.2",
|
||||
"jest": "^29.7.0",
|
||||
"jest-junit": "^16.0.0",
|
||||
"markdown-loader": "^6.0.0",
|
||||
"path-to-regexp": "0.1.7",
|
||||
"postcss": "^8.2.15",
|
||||
"postcss-import": "^13.0.0",
|
||||
"postcss-loader": "^4.1.0",
|
||||
@ -136,6 +150,7 @@
|
||||
"ts-jest": "^29.1.1",
|
||||
"ts-json-schema-generator": "^1.5.0",
|
||||
"typescript": "^5.3.3",
|
||||
"vue-meta": "^2.4.0",
|
||||
"vue-tsc": "^1.8.27",
|
||||
"webpack": "^4.47.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