mirror of
https://github.com/zkldi/Tachi.git
synced 2026-10-07 06:18:03 +03:00
docs: enforce pnpm run <scriptname>
Can you believe it? pnpm <scriptname> goes through this bizarre anti-logic wrt. running scripts. If the script is a dedicated pnpm command, it will run that command. Else if the script exists in package.json, it will run it. At this point, it then tries to run it as a normal shell command. By checking if <scriptname> is in $PATH and then executing that. What the hell? This was helpfully revealed to my by a tester who found `pnpm sort` was taking too long. That's because it was running `sort(1)`. Absolutely insane behaviour. Why???
This commit is contained in:
@@ -60,12 +60,12 @@ We also maintain a bit more human readable form for schemas in this documentatio
|
||||
|
||||
## Important Scripts
|
||||
|
||||
After doing **anything** to the collections, such as adding a new item to the database, you **MUST** run `pnpm sort` inside the `scripts/` folder.
|
||||
After doing **anything** to the collections, such as adding a new item to the database, you **MUST** run `pnpm run sort` inside the `scripts/` folder.
|
||||
|
||||
This will deterministically sort the data you put into the collections, making sure that `git` history stays sane (i.e. it only says things that actually changed, changed).
|
||||
|
||||
!!! info
|
||||
`pnpm sort` is an alias for `node deterministic-collection-sort.js`
|
||||
`pnpm run sort` is an alias for `node deterministic-collection-sort.js`
|
||||
|
||||
Before sending any changes, run `pnpm test` to check all your data. If anything you've sent is invalid, it'll be logged in `failed-tests.log`, and the command won't pass.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user