payloadcms / payload

Payload is the open-source, fullstack Next.js framework, giving you instant backend superpowers. Get a full TypeScript backend and admin panel instantly. Use Payload as a headless CMS or for building powerful applications.
https://payloadcms.com
MIT License
24.55k stars 1.56k forks source link

@payloadcms/plugin-form-builder package.json version has not been updated since payload v2.14.2 #8679

Open markrbu opened 1 week ago

markrbu commented 1 week ago

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

Payload Version

v2.30.1

Adapters and Plugins

@payloadcms/plugin-form-builder

markrbu commented 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 || {}),