Skip to content

Commit

Permalink
Fix GitHub workflows and improve repo docs
Browse files Browse the repository at this point in the history
  • Loading branch information
wycats committed Jan 20, 2025
1 parent e24bd66 commit 6595006
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
pnpm-args: '--ignore-scripts'
node-version: 22.13.0
repo-token: ${{ secrets.GITHUB_TOKEN }}
- run: pnpm turbo build
- run: pnpm turbo prepack
- run: node ./bin/build-verify.mjs

lint:
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ jobs:
# This creates an .npmrc that reads the NODE_AUTH_TOKEN environment variable
node-registry-url: 'https://registry.npmjs.org'

- run: pnpm turbo build --force --no-cache
- name: npm publish
run: pnpm release-plan publish
env:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/size.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
repo-token: ${{ secrets.GITHUB_TOKEN }}
ref: ${{ inputs.BRANCH }}

- run: pnpm turbo build
- run: pnpm turbo prepack
- run: sudo snap install dust

- name: "Get sizes for development outputs"
Expand Down Expand Up @@ -77,7 +77,7 @@ jobs:
git checkout main
git clean -Xfd
pnpm install
pnpm turbo build
pnpm turbo prepack
- name: "[Main] Get sizes for development outputs"
id: main-dev
Expand Down
52 changes: 49 additions & 3 deletions guides/workspace/workspace-management.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,54 @@ These annotations identify areas of code in a structured way.
## Turbo Workflows

### `build`
### `pnpm repo:prepack`

### `lint`
| Runs | Depends On |
| -------------------- | -------------- |
| `prepack`, `prepare` | `repo:prepack` |

### `publint`
Runs the lifecycle scripts `prepack` and `prepare` in each workspace package. This produces the same
`dist` directory as the published packages, which is perfect for verifying the results of the build
process.

### Linting

#### `pnpm repo:lint:files`

| Runs | Depends On |
| -------------- | ---------- |
| `test:publint` | 🛇 Nothing |

Verifies that all files in the repository are properly linted.

Runs `pnpm test:lint` in each workspace package.

#### `pnpm repo:lint:pub`

| Runs | Depends On |
| -------------- | -------------- |
| `test:publint` | `repo:prepack` |

Verifies that all **published** packages have the correct metadata for `npm publish`.

#### `pnpm repo:lint:all`

| Depends On |
| ----------------- |
| `repo:lint:files` |
| `repo:lint:pub` |

A shortcut for running `repo:lint:files` and `repo:lint:pub`.

#### `pnpm repo:lint:fix`

| Runs |
| ----------------------------------------------------- |
| `repo:lint:files` (with `--fix` arg for each package) |
| `prettier -w` |

<!-- @bandaid(until: prettier is a turbo task) -->

> [!NOTE]
>
> `prettier -w` should really be a `turbo` task, and this should happen as follow-up work soon.
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,15 @@
"build:flags": "RETAIN_FLAGS=true ember build --env production --suppress-sizes",
"clean": "node ./bin/clean.mjs",
"link:all": "esyes ./bin/link-all.mts",
"lint": "npm-run-all lint:*",
"lint:files": "turbo lint",
"lint:fix": "turbo test:lint -- --fix && prettier -w .",
"lint:format": "prettier -c .",
"lint:types": "tsc -b",
"postinstall": "node --disable-warning=ExperimentalWarning --experimental-strip-types ./bin/bench-packages.mts",
"repo:lint:all": "turbo run lint:all",
"repo:lint:files": "turbo run test:lint",
"repo:lint:fix": "turbo run test:lint -- --fix && prettier -w .",
"repo:lint:pub": "turbo run test:publint",
"repo:publint": "turbo run test:publint",
"repo:prepack": "turbo run prepack",
"repo:update-meta": "node --experimental-strip-types --no-warnings ./repo-metadata/lib/update.ts",
"start": "vite",
"test": "node bin/run-tests.mjs",
Expand Down

0 comments on commit 6595006

Please sign in to comment.