Skip to content

Commit

Permalink
refactor: upgraded dependencies and babel config for volto 16 (#47)
Browse files Browse the repository at this point in the history
* refactor: upgraded dependencies and babel config for volto 16

* chore: updated yarn.lock

* chore: moved volto-subblocks to peer dependencies

* fix: added new peer dependency in the readme
  • Loading branch information
pnicolli authored Oct 30, 2022
1 parent 64b5bf0 commit 5ec2bb6
Show file tree
Hide file tree
Showing 4 changed files with 535 additions and 7,617 deletions.
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@ Intended to be used with [collective.volto.formsupport](https://github.com/colle
Install with mrs-developer (see [Volto docs](https://docs.voltocms.com/customizing/add-ons/)) or with:

```bash
yarn add volto-form-block
yarn add volto-form-block volto-subblocks
```

> **Note**: Since version v2.0.0 of this addon, it's required [collective.volto.formsupport](https://github.com/collective/collective.volto.formsupport) 2.0.0 or higher (and its upgrade steps).
>
> **Note**: Since version v2.1.2 of this addon, it's required Volto 14.2.0
>
> **Note**: Since version v3.0.0 of this addon, it's required Volto >= 16.0.0-alpha.38
## Features

Expand Down Expand Up @@ -70,10 +72,10 @@ If you need a field that is not supported, PRs are always welcome, but if you ha

```jsx
config.blocks.blocksConfig.form.additionalFields.push({
id: "field type id",
id: 'field type id',
label:
intl.formatMessage(messages.customFieldLabel) ||
"Label for field type select, translation obj or string",
'Label for field type select, translation obj or string',
component: MyCustomWidget,
isValid: (formData, name) => true,
});
Expand Down Expand Up @@ -114,7 +116,7 @@ i.e.: aggregated data from user federated authentication:

![Static fields](./docs/form-static-fields.png)

## Upgrade guide:
## Upgrade guide

To upgrade to version 2.4.0 you need to:

Expand All @@ -128,6 +130,6 @@ To upgrade to version 2.4.0 you need to:
- [Form editing](https://youtu.be/wmTpzYBtNCQ)
- [Export stored data](https://youtu.be/3zVUaGaaVOg)

## VERSIONS:
## VERSIONS

With volto-form-block@2.5.0 you need to upgrade collective.volto.formsupport to version 2.4.0
2 changes: 1 addition & 1 deletion babel.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module.exports = function (api) {
api.cache(true);
const presets = ['razzle/babel'];
const presets = ['razzle'];
const plugins = [
[
'react-intl', // React Intl extractor, required for the whole i18n infrastructure to work
Expand Down
9 changes: 6 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,19 @@
},
"dependencies": {
"@hcaptcha/react-hcaptcha": "^0.3.6",
"@plone/scripts": "^1.0.3",
"file-saver": "^2.0.5",
"react-google-recaptcha-v3": "^1.8.0",
"volto-subblocks": "collective/volto-subblocks#v1.2.3"
"react-google-recaptcha-v3": "^1.8.0"
},
"devDependencies": {
"@commitlint/cli": "^12.1.4",
"@commitlint/config-conventional": "^12.1.4",
"@plone/scripts": "^2.0.0",
"@release-it/conventional-changelog": "^2.0.1",
"husky": "^6.0.0",
"release-it": "^14.11.5"
},
"peerDependencies": {
"@plone/volto": ">=16.0.0-alpha.38",
"volto-subblocks": "^2.0.0"
}
}
Loading

0 comments on commit 5ec2bb6

Please sign in to comment.