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
This is not a regular runtime bug, but I noticed in previous versions and now again in 3.5.0 that the "payload-types.ts" is changed without changing anything in the code. I reproduced this now with a fresh payload app.
Previous fields in meta was removed without having changed something myself:
With 3.5.0 its 46 changes, I think all are string to number, happening:
I think that's a process workflow issue: I guess people are making code changes in collections and so one, but then are not rerunning the "payload generate:types" process. As the changes often do not cause a runtime issue by the nature of the "flexible types handling", nobody is noticing that there is a drift.
My recommendation is that the "run payload generate:types" is put into the PR process and either it fails when there is a change needed, or it applies change automatically and if everything runs is merged.
Why we should care: The template should be consistent and correct from the beginning. Otherwise it will happen that developers waste time analysing why the types are changes to much after running "payload generate:types", only to find out it wasn't anything they have done in the code.
Describe the Bug
This is not a regular runtime bug, but I noticed in previous versions and now again in 3.5.0 that the "payload-types.ts" is changed without changing anything in the code. I reproduced this now with a fresh payload app.
Previous fields in meta was removed without having changed something myself:
With 3.5.0 its 46 changes, I think all are string to number, happening:
I think that's a process workflow issue: I guess people are making code changes in collections and so one, but then are not rerunning the "payload generate:types" process. As the changes often do not cause a runtime issue by the nature of the "flexible types handling", nobody is noticing that there is a drift.
My recommendation is that the "run payload generate:types" is put into the PR process and either it fails when there is a change needed, or it applies change automatically and if everything runs is merged.
Why we should care: The template should be consistent and correct from the beginning. Otherwise it will happen that developers waste time analysing why the types are changes to much after running "payload generate:types", only to find out it wasn't anything they have done in the code.
Link to the code that reproduces this issue
https://github.com/payloadcms/payload
Reproduction Steps
Which area(s) are affected? (Select all that apply)
Not sure
Environment Info
The text was updated successfully, but these errors were encountered: