You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To ensure that changes to code/types doesn't result in unwanted changes in type generation, or that bumps to dts-buddy don't cause unwanted regressions, we're checking in the generated types. Types should be committed as-is (don't format it with prettier!). CI is enhanced to check that git sees no changed files after generating the types, which would mean types have changed.
Copy file name to clipboardExpand all lines: .github/workflows/ci.yml
+10-1Lines changed: 10 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -49,4 +49,13 @@ jobs:
49
49
with:
50
50
node-version: 16
51
51
cache: pnpm
52
-
- run: 'pnpm i && pnpm check && pnpm lint'
52
+
- name: install
53
+
run: pnpm install --frozen-lockfile
54
+
- name: type check
55
+
run: pnpm check
56
+
- name: lint
57
+
if: (${{ success() }} || ${{ failure() }}) # ensures this step runs even if previous steps fail (avoids multiple runs uncovering different issues at different steps)
58
+
run: pnpm lint
59
+
- name: build and check generated types
60
+
if: (${{ success() }} || ${{ failure() }}) # ensures this step runs even if previous steps fail
61
+
run: pnpm build && { [ "`git status --porcelain=v1`" == "" ] || (echo "Generated types have changed — please regenerate types locally and commit the changes after you have reviewed them"; git diff; exit 1); }
0 commit comments