chore: commit types (#9862)

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.
pull/10107/head
Simon H 12 months ago committed by GitHub
parent c717a4df7c
commit 89db4b5d99
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -49,4 +49,13 @@ jobs:
with:
node-version: 16
cache: pnpm
- run: 'pnpm i && pnpm check && pnpm lint'
- name: install
run: pnpm install --frozen-lockfile
- name: type check
run: pnpm check
- name: lint
if: (${{ success() }} || ${{ failure() }}) # ensures this step runs even if previous steps fail (avoids multiple runs uncovering different issues at different steps)
run: pnpm lint
- name: build and check generated types
if: (${{ success() }} || ${{ failure() }}) # ensures this step runs even if previous steps fail
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); }

@ -28,7 +28,11 @@ jobs:
node-version: 18.x
cache: pnpm
- run: pnpm install --frozen-lockfile
- name: Install
run: pnpm install --frozen-lockfile
- name: Build
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); }
- name: Create Release Pull Request or Publish to npm
id: changesets

@ -6,13 +6,13 @@
/test/runtime/shards
_actual*.*
_output
/types
/types/compiler
action.d.ts
animate.d.ts
compiler.d.ts
easing.d.ts
index.d.ts
motion.d.ts
store.d.ts
transition.d.ts
/action.d.ts
/animate.d.ts
/compiler.d.ts
/easing.d.ts
/index.d.ts
/motion.d.ts
/store.d.ts
/transition.d.ts

@ -127,7 +127,7 @@
"@types/estree": "^1.0.1",
"@types/node": "^14.18.51",
"agadoo": "^3.0.0",
"dts-buddy": "^0.4.1",
"dts-buddy": "^0.4.3",
"esbuild": "^0.18.11",
"eslint-plugin-lube": "^0.1.7",
"happy-dom": "^9.20.3",

File diff suppressed because it is too large Load Diff

@ -106,7 +106,7 @@ importers:
specifier: ^3.0.0
version: 3.0.0
dts-buddy:
specifier: ^0.4.1
specifier: ^0.4.3
version: 0.4.3(typescript@5.3.3)
esbuild:
specifier: ^0.18.11

Loading…
Cancel
Save