mirror of
https://gitlab.com/PronounsPage/PronounsPage.git
synced 2025-09-24 05:05:20 -04:00
Merge branch 'upgrade-node' into 'main'
upgrade node to 18.20.1 See merge request PronounsPage/PronounsPage!438
This commit is contained in:
commit
df2d9a521d
@ -1,6 +1,6 @@
|
|||||||
check:
|
check:
|
||||||
stage: test
|
stage: test
|
||||||
image: node:18.17.1
|
image: node:18.20.1
|
||||||
before_script:
|
before_script:
|
||||||
- set -o pipefail
|
- set -o pipefail
|
||||||
- export NODE_ENV=development
|
- export NODE_ENV=development
|
||||||
@ -57,12 +57,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 ts-node server/migrate.ts || record_failure "Smoke test migrate"
|
- yarn run-script server/migrate.ts || record_failure "Smoke test migrate"
|
||||||
- yarn ts-node 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/calendarBot.js en,pl,es,pt,de,nl,fr,ja,ru,sv,lad,ua,vi "" || record_failure "Smoke test calendarBot"
|
||||||
- yarn ts-node server/cleanupAccounts.js || record_failure "Smoke test cleanupAccounts"
|
- yarn run-script server/cleanupAccounts.js || record_failure "Smoke test cleanupAccounts"
|
||||||
- yarn ts-node server/notify.js || record_failure "Smoke test notify"
|
- yarn run-script server/notify.js || record_failure "Smoke test notify"
|
||||||
- yarn ts-node server/stats.ts || record_failure "Smoke test stats"
|
- yarn run-script server/stats.ts || record_failure "Smoke test stats"
|
||||||
- yarn ts-node server/subscriptions.js || record_failure "Smoke test subscriptions"
|
- yarn run-script server/subscriptions.js || record_failure "Smoke test subscriptions"
|
||||||
- end_section
|
- end_section
|
||||||
|
|
||||||
- >
|
- >
|
||||||
|
10
Makefile
10
Makefile
@ -12,8 +12,8 @@ install:
|
|||||||
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
|
yarn
|
||||||
yarn ts-node server/migrate.ts
|
yarn run-script server/migrate.ts
|
||||||
yarn ts-node locale/generateSchemas.ts
|
yarn run-script locale/generateSchemas.ts
|
||||||
|
|
||||||
lint:
|
lint:
|
||||||
yarn lint
|
yarn lint
|
||||||
@ -34,10 +34,10 @@ 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
|
yarn build
|
||||||
yarn ts-node server/migrate.ts
|
yarn run-script 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 ts-node server/sentry.ts
|
yarn run-script 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 ts-node server/migrate.ts
|
yarn run-script server/migrate.ts
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
## Dependencies
|
## Dependencies
|
||||||
|
|
||||||
- [NodeJS](https://nodejs.org/en) version 18.17.1
|
- [NodeJS](https://nodejs.org/en) version 18.20.1
|
||||||
- [Yarn](https://yarnpkg.com/getting-started/install) or other package manager
|
- [Yarn](https://yarnpkg.com/getting-started/install) or other package manager
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
@ -213,10 +213,6 @@ If you experience a `JavaScript heap out of memory` error, it may help to disabl
|
|||||||
},
|
},
|
||||||
```
|
```
|
||||||
|
|
||||||
#### `ts-node` on another Node version
|
|
||||||
If you use another node version and run into an error when using `yarn ts-node` (e.g. `Unknown file extension ".ts"`), then either use the recommended node version or use `ts-node` via an experimental loader:
|
|
||||||
`node --loader ts-node/esm`.
|
|
||||||
|
|
||||||
## Translation
|
## Translation
|
||||||
|
|
||||||
### Contributing to an existing language version
|
### Contributing to an existing language version
|
||||||
|
@ -9,6 +9,7 @@
|
|||||||
"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",
|
||||||
"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 --experimental-vm-modules $(yarn bin jest)"
|
||||||
},
|
},
|
||||||
|
4
server/ts-node-esm.js
Normal file
4
server/ts-node-esm.js
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
import { register } from 'node:module';
|
||||||
|
import { pathToFileURL } from 'node:url';
|
||||||
|
|
||||||
|
register('ts-node/esm', pathToFileURL('./'));
|
@ -36,7 +36,6 @@
|
|||||||
"census"
|
"census"
|
||||||
],
|
],
|
||||||
"ts-node": {
|
"ts-node": {
|
||||||
"esm": true,
|
|
||||||
// skip type checking as it causes some problems with CommonJS dependencies; type checking happens separately
|
// skip type checking as it causes some problems with CommonJS dependencies; type checking happens separately
|
||||||
"transpileOnly": true
|
"transpileOnly": true
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user