From 42c7437373b25bbb12eb4f53e4a730054a8645c6 Mon Sep 17 00:00:00 2001 From: hi-rustin Date: Fri, 16 Feb 2024 22:44:40 +0800 Subject: [PATCH 1/2] chore: add prettier as a CI action Signed-off-by: hi-rustin --- .github/workflows/ci.yml | 1 + package.json | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 25465b5a5c8..eef1d6d1c96 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -167,6 +167,7 @@ jobs: - run: pnpm lint:hbs - run: pnpm lint:js - run: pnpm lint:deps + - run: pnpm prettier:check frontend-test: name: Frontend / Test diff --git a/package.json b/package.json index 3294d88e17d..e26a978680d 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,8 @@ "lint:hbs": "ember-template-lint app", "lint:js": "eslint . --cache", "precompress": "node ./script/precompress-assets.mjs", - "prettier": "prettier --write package.json '**/*.js' '**/*.mjs' '**/*.md'", + "prettier:check": "prettier --check package.json '**/*.js' '**/*.mjs' '**/*.md'", + "prettier:write": "prettier --write package.json '**/*.js' '**/*.mjs' '**/*.md'", "start": "ember serve", "start:live": "PROXY_BACKEND=https://crates.io ember serve", "start:local": "PROXY_BACKEND=http://127.0.0.1:8888 ember serve", From 27b4991a2e6d6155ae8c2aecde1ebba190bcc374 Mon Sep 17 00:00:00 2001 From: hi-rustin Date: Fri, 16 Feb 2024 22:42:26 +0800 Subject: [PATCH 2/2] fix: prettier markdown files Signed-off-by: hi-rustin --- crates_io_cdn_logs/README.md | 3 +-- src/worker/jobs/dump_db/readme_for_tarball.md | 6 +++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/crates_io_cdn_logs/README.md b/crates_io_cdn_logs/README.md index bb0260176b3..5415fe3c136 100644 --- a/crates_io_cdn_logs/README.md +++ b/crates_io_cdn_logs/README.md @@ -1,5 +1,4 @@ -crates_io_cdn_logs -=============================================================================== +# crates_io_cdn_logs This package contains code to parse the log files from the crates.io CDNs (AWS CloudFront and Fastly) and to count how often crates/versions are diff --git a/src/worker/jobs/dump_db/readme_for_tarball.md b/src/worker/jobs/dump_db/readme_for_tarball.md index 1212a0d5e56..6257e18b3b5 100644 --- a/src/worker/jobs/dump_db/readme_for_tarball.md +++ b/src/worker/jobs/dump_db/readme_for_tarball.md @@ -17,9 +17,9 @@ This is a dump of the public information in the crates.io database. ## Less Obvious Database Fields -* `crate_owners.owner_kind` - if `0`, the crate owner is a user; if `1`, the crate owner is a team. (If another value, you should probably contact the crates.io team.) -* `crate_owners.owner_id` - if the owner is a user, this is their ID in `users.id`, otherwise it's the ID in `teams.id`. -* `teams.login` - this will look something like `github:foo:bar`, referring to the `bar` team in the `foo` organisation. At present, as we only support GitHub, the first component will always be `github`. +- `crate_owners.owner_kind` - if `0`, the crate owner is a user; if `1`, the crate owner is a team. (If another value, you should probably contact the crates.io team.) +- `crate_owners.owner_id` - if the owner is a user, this is their ID in `users.id`, otherwise it's the ID in `teams.id`. +- `teams.login` - this will look something like `github:foo:bar`, referring to the `bar` team in the `foo` organisation. At present, as we only support GitHub, the first component will always be `github`. ## Restoring to a Local crates.io Database