npm->pnpm (#2929)
Some checks are pending
E2E Tests / e2e (push) Waiting to run
Tests and checks on push / run-checks-and-tests (push) Waiting to run
Updates translation progress / update-translation-progress-issue (push) Waiting to run

This commit is contained in:
Kalle
2026-03-31 20:38:22 +03:00
committed by GitHub
parent 9b1960bbde
commit bd688d637c
27 changed files with 10782 additions and 15837 deletions

View File

@@ -567,7 +567,7 @@ NOTE: before adding a new one, verify one does not already exist.
- Select options: `options.fieldName.value`
- Mode names: `modes.SZ`, `modes.TC`, etc.
Run `npm run i18n:sync` after adding English translations to initialize other language files.
Run `pnpm run i18n:sync` after adding English translations to initialize other language files.
## E2E Testing

View File

@@ -4,7 +4,7 @@ Guides on how to do different things when developing sendou.ink
## Fix style/lint errors (Biome)
Run the `npm run biome:fix` command. Also you might want to set up Biome as an extension to your IDE and run automatically when you save a file.
Run the `pnpm run biome:fix` command. Also you might want to set up Biome as an extension to your IDE and run automatically when you save a file.
## Add a new database migration
@@ -22,8 +22,8 @@ export function up(db) {
Note: No need to implement the "down" migration
3) Update the typings in `app/db/tables.ts`
4) Run `npm run migrate up` to apply your migration
4) Set env var `DB_PATH=db-test.sqlite3` in `.env` file & run the `npm run migrate up` command again to update the database used in unit tests
4) Run `pnpm run migrate up` to apply your migration
4) Set env var `DB_PATH=db-test.sqlite3` in `.env` file & run the `pnpm run migrate up` command again to update the database used in unit tests
## Add a new translation string
@@ -55,4 +55,4 @@ When utilizing feature specific translations ensure the json is loaded. This is
### Sync
Use the `npm run i18n:sync` command to sync translation jsons with English (removing and adding keys for each language as needed). There is not currently a check in the pipeline that this was done but it should always be ran when a new translation string has been added or removed.
Use the `pnpm run i18n:sync` command to sync translation jsons with English (removing and adding keys for each language as needed). There is not currently a check in the pipeline that this was done but it should always be ran when a new translation string has been added or removed.

View File

@@ -7,19 +7,19 @@ Note: These are mostly useful if you are running the site in production as an ad
## Add new badge to the database
```bash
npx tsx scripts/add-badge.ts fire_green "Octofin Eliteboard"
pnpm exec tsx scripts/add-badge.ts fire_green "Octofin Eliteboard"
```
## Rename display name of a badge
```bash
npx tsx scripts/rename-badge.ts 10 "New 4v4 Sundaes"
pnpm exec tsx scripts/rename-badge.ts 10 "New 4v4 Sundaes"
```
## Add many badge owners
```bash
npx tsx scripts/add-badge-winners.ts 10 "750705955909664791,79237403620945920"
pnpm exec tsx scripts/add-badge-winners.ts 10 "750705955909664791,79237403620945920"
```
## Converting gifs (badges) to thumbnail (.png)
@@ -33,7 +33,7 @@ sips -s format png ./sundae.gif --out .
While in the folder with the images:
```bash
for i in *.png; do npx @squoosh/cli --avif '{"cqLevel":33,"cqAlphaLevel":-1,"denoiseLevel":0,"tileColsLog2":0,"tileRowsLog2":0,"speed":6,"subsample":1,"chromaDeltaQ":false,"sharpness":0,"tune":0}' $i; done
for i in *.png; do pnpm dlx @squoosh/cli --avif '{"cqLevel":33,"cqAlphaLevel":-1,"denoiseLevel":0,"tileColsLog2":0,"tileRowsLog2":0,"speed":6,"subsample":1,"chromaDeltaQ":false,"sharpness":0,"tune":0}' $i; done
```
Note: it only works with Node 16.
@@ -48,19 +48,19 @@ Note: it only works with Node 16.
1. Update `CURRENT_PATCH` constants
1. Update `PATCHES` constant with the late patch + remove the oldest
1. Update the stage list in `stage-ids.ts` and `create-misc-json.ts`. Add images from Lean's repository and avify them.
1. `npx tsx scripts/create-misc-json.ts`
1. `npx tsx scripts/create-gear-json.ts`
1. `npx tsx scripts/create-analyzer-json.ts`
1. `pnpm exec tsx scripts/create-misc-json.ts`
1. `pnpm exec tsx scripts/create-gear-json.ts`
1. `pnpm exec tsx scripts/create-analyzer-json.ts`
8a. Double check that no hard-coded special damages changed
1. `npx tsx scripts/create-object-dmg-json.ts`
1. `pnpm exec tsx scripts/create-object-dmg-json.ts`
1. Fill new weapon IDs by category to `weapon-ids.ts` (easy to take from the diff of English weapons.json)
1. Get gear IDs for each slot from /output folder and update `gear-ids.ts`.
1. Replace `object-dmg.json` with the `object-dmg.json` in /output folder
1. Replace `weapon-params.ts` with the `params.json` in /output folder
1. Delete all images inside `main-weapons`, `main-weapons-outlined`, `main-weapons-outlined-2` and `gear` folders.
1. Replace with images from Lean's repository.
1. Run the `npx tsx scripts/replace-img-names.ts` command
1. Run the `npx tsx scripts/replace-weapon-names.ts` command
1. Run the `pnpm exec tsx scripts/replace-img-names.ts` command
1. Run the `pnpm exec tsx scripts/replace-weapon-names.ts` command
1. Run the .avif generating command in each image folder.
2. Update manually any languages that use English `gear.json` and `weapons.json` files