Open markrbu opened 1 week ago
Example of code differences can be found in packages/plugin-form-builder/src/collections/FormSubmissions/index.ts
v2.14.2
and here v2.30.1
Lines 93 to 100 In version v2.14.2:
hooks: { beforeChange: [ (data) => createCharge(data, formConfig), (data) => sendEmail(data, formConfig), ...(formConfig?.formSubmissionOverrides?.hooks?.beforeChange || []), ], ...(formConfig?.formSubmissionOverrides?.hooks || {}), },
In version v2.30.1:
hooks: { ...(formConfig?.formSubmissionOverrides?.hooks || {}), beforeChange: [ (data) => createCharge(data, formConfig), (data) => sendEmail(data, formConfig), ...(formConfig?.formSubmissionOverrides?.hooks?.beforeChange || []), ], },
The order of the hooks is different ...(formConfig?.formSubmissionOverrides?.hooks || {}),
Link to reproduction
No response
Describe the Bug
The @payloadcms/plugin-form-builder plugin for payload version v2 has not been updated even through the code has been. NPM is tracking the current version as 1.2.2 and is pulling the code from playload v2.14.2 which is not the same code as what can be found in v2.30.1. This means that any bug fixes for the form builder plugin since v2.14.2 are not accessible via npm.
To Reproduce
npx create-payload-app@latest
which will install v2.30.1 code base.yarn add @payloadcms/plugin-form-builder
."@payloadcms/plugin-form-builder": "^1.2.2"
. Then check the actual package that was installed "node_modules/@payloadcms/plugin-form-builder/package.json" and you will see that it is version 1.2.2, but looking at the devDependencies in this file you can see that it is"payload": "2.14.2"
where as the current version found under the v2.30.1 tag has the payload devDependencies set to"payload": "workspace:*"
.Payload Version
v2.30.1
Adapters and Plugins
@payloadcms/plugin-form-builder