@plone/volto 19.0.0-alpha.13 → 19.0.0-alpha.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc +0 -1
- package/CHANGELOG.md +43 -15
- package/babel.js +1 -3
- package/global-test-setup.js +1 -2
- package/package.json +19 -79
- package/razzle.config.js +2 -2
- package/src/components/manage/Actions/Actions.test.jsx +1 -5
- package/src/components/manage/Blocks/Block/BlocksForm.test.jsx +1 -5
- package/src/components/manage/Blocks/Block/Settings.test.jsx +1 -5
- package/src/components/manage/Blocks/HTML/Edit.test.jsx +1 -5
- package/src/components/manage/Blocks/Image/ImageSidebar.test.jsx +1 -5
- package/src/components/manage/Blocks/LeadImage/LeadImageSidebar.test.jsx +1 -5
- package/src/components/manage/Blocks/Maps/MapsSidebar.test.jsx +1 -5
- package/src/components/manage/Blocks/Search/components/DateRangeFacet.test.jsx +1 -6
- package/src/components/manage/Blocks/Search/components/SelectFacet.test.jsx +1 -6
- package/src/components/manage/Blocks/Video/VideoSidebar.test.jsx +1 -5
- package/src/components/manage/Contents/Contents.test.jsx +1 -5
- package/src/components/manage/Contents/ContentsPropertiesModal.test.jsx +1 -5
- package/src/components/manage/Contents/ContentsRenameModal.test.jsx +1 -5
- package/src/components/manage/Contents/ContentsTagsModal.test.jsx +1 -5
- package/src/components/manage/Contents/ContentsWorkflowModal.test.jsx +1 -5
- package/src/components/manage/Contents/__mocks__/index.tsx +2 -18
- package/src/components/manage/Controlpanels/Aliases.test.jsx +1 -5
- package/src/components/manage/Controlpanels/ContentType.test.jsx +1 -5
- package/src/components/manage/Controlpanels/Rules/AddRule.test.jsx +1 -5
- package/src/components/manage/Controlpanels/Rules/EditRule.test.jsx +1 -5
- package/src/components/manage/Controlpanels/UndoControlpanel.test.jsx +1 -5
- package/src/components/manage/Diff/Diff.test.jsx +1 -6
- package/src/components/manage/Diff/DiffField.test.jsx +1 -6
- package/src/components/manage/Display/Display.test.jsx +2 -11
- package/src/components/manage/Edit/Edit.test.jsx +1 -5
- package/src/components/manage/Form/BlockDataForm.test.jsx +1 -5
- package/src/components/manage/Form/Form.test.jsx +1 -5
- package/src/components/manage/Form/InlineForm.test.jsx +1 -5
- package/src/components/manage/Form/ModalForm.test.jsx +1 -5
- package/src/components/manage/Form/__mocks__/index.tsx +9 -27
- package/src/components/manage/Preferences/ChangePassword.test.jsx +1 -5
- package/src/components/manage/Preferences/PersonalPreferences.test.jsx +1 -17
- package/src/components/manage/Widgets/ArrayWidget.test.jsx +1 -6
- package/src/components/manage/Widgets/CheckboxGroupWidget.test.jsx +1 -6
- package/src/components/manage/Widgets/DatetimeWidget.test.jsx +1 -6
- package/src/components/manage/Widgets/ObjectListWidget.test.jsx +1 -11
- package/src/components/manage/Widgets/ObjectWidget.test.jsx +1 -5
- package/src/components/manage/Widgets/RadioGroupWidget.test.jsx +1 -6
- package/src/components/manage/Widgets/RecurrenceWidget/RecurrenceWidget.test.jsx +1 -6
- package/src/components/manage/Widgets/SchemaWidget.test.jsx +1 -6
- package/src/components/manage/Widgets/SchemaWidgetFieldset.test.jsx +1 -6
- package/src/components/manage/Widgets/SelectAutoComplete.test.jsx +1 -6
- package/src/components/manage/Widgets/SelectWidget.test.jsx +1 -6
- package/src/components/manage/Widgets/TimeWidget.test.jsx +1 -6
- package/src/components/manage/Widgets/TokenWidget.test.jsx +1 -6
- package/src/components/manage/Widgets/VocabularyTermsWidget.test.jsx +1 -11
- package/src/components/manage/Widgets/__mocks__/index.tsx +33 -51
- package/src/components/manage/Workflow/Workflow.test.jsx +2 -11
- package/src/components/theme/Comments/CommentEditModal.test.jsx +1 -5
- package/src/components/theme/Comments/Comments.test.jsx +1 -11
- package/src/components/theme/ContactForm/ContactForm.test.jsx +1 -5
- package/src/components/theme/PasswordReset/RequestPasswordReset.test.jsx +1 -5
- package/src/components/theme/Register/Register.test.jsx +1 -5
- package/src/components/theme/View/EventDatesInfo.test.jsx +1 -6
- package/src/components/theme/View/EventView.test.jsx +1 -6
- package/src/helpers/Loadable/__mocks__/Loadable.jsx +7 -22
- package/test-addons-loader.js +3 -0
- package/test-setup-globals.js +30 -2
- package/tsconfig.declarations.json +1 -1
- package/tsconfig.json +1 -1
- package/types/components/manage/Contents/__mocks__/index.d.ts +2 -2
- package/types/components/manage/Form/__mocks__/index.d.ts +8 -8
- package/types/components/manage/Widgets/__mocks__/index.d.ts +33 -33
- package/types/helpers/Loadable/__mocks__/Loadable.d.ts +2 -2
- package/vitest.config.mjs +4 -4
- package/webpack-plugins/webpack-scss-plugin.js +172 -0
- package/jest-addons-loader.js +0 -3
- package/jest-extender-plugin.js +0 -39
- package/jest-setup-afterenv.js +0 -2
- package/jest-svgsystem-transform.js +0 -10
- package/patches/patchit.sh +0 -2
- package/patches/razzle-jest.patch +0 -10
- package/src/components/manage/Contents/__mocks__/index.vitest.tsx +0 -5
- package/src/components/manage/Form/__mocks__/index.vitest.tsx +0 -73
- package/src/components/manage/Widgets/__mocks__/index.vitest.tsx +0 -41
- package/src/helpers/Loadable/__mocks__/Loadable.vitest.jsx +0 -39
- package/test-setup-globals-vitest.js +0 -46
package/.eslintrc
CHANGED
package/CHANGELOG.md
CHANGED
|
@@ -17,11 +17,39 @@ myst:
|
|
|
17
17
|
|
|
18
18
|
<!-- towncrier release notes start -->
|
|
19
19
|
|
|
20
|
+
## 19.0.0-alpha.15 (2025-11-19)
|
|
21
|
+
|
|
22
|
+
### Bugfix
|
|
23
|
+
|
|
24
|
+
- Pin the sass dependency to 1.58.0 @sneridagh
|
|
25
|
+
|
|
26
|
+
## 19.0.0-alpha.14 (2025-11-19)
|
|
27
|
+
|
|
28
|
+
### Breaking
|
|
29
|
+
|
|
30
|
+
- Add package `@plone/razzle`. It's a fork of `razzle`. @wesleybl [#7542](https://github.com/plone/volto/issues/7542)
|
|
31
|
+
- Fork `babel-razzle-preset` from Razzle. Update dependencies. @sneridagh [#7619](https://github.com/plone/volto/issues/7619)
|
|
32
|
+
- Removed Jest from build. @sneridagh [#7620](https://github.com/plone/volto/issues/7620)
|
|
33
|
+
- Forked Razzle SCSS plugin, pin the version to one that does not flood the log with useless deprecation warnings. @sneridagh [#7188](https://github.com/plone/volto/issues/7188)
|
|
34
|
+
|
|
35
|
+
### Bugfix
|
|
36
|
+
|
|
37
|
+
- Replaced `{term}` with `{ref}` to link to headings. @pratyush07-hub [#fix-glossary-terms](https://github.com/plone/volto/issues/fix-glossary-terms)
|
|
38
|
+
|
|
39
|
+
### Internal
|
|
40
|
+
|
|
41
|
+
- Add Cypress test to cover deleting at end of Slate block when next block is empty. @aryan7081 [#7263](https://github.com/plone/volto/issues/7263)
|
|
42
|
+
|
|
43
|
+
### Documentation
|
|
44
|
+
|
|
45
|
+
- Added missing steps for `babel-preset-razzle` in the upgrade guide. @sneridagh
|
|
46
|
+
- Added missing upgrade steps for 19 projects. @sneridagh
|
|
47
|
+
|
|
20
48
|
## 19.0.0-alpha.13 (2025-11-12)
|
|
21
49
|
|
|
22
50
|
### Internal
|
|
23
51
|
|
|
24
|
-
- Release with `@plone/components` 4a3. @sneridagh
|
|
52
|
+
- Release with `@plone/components` 4a3. @sneridagh
|
|
25
53
|
|
|
26
54
|
## 19.0.0-alpha.12 (2025-11-10)
|
|
27
55
|
|
|
@@ -63,9 +91,9 @@ myst:
|
|
|
63
91
|
- Move '.visually-hidden' class to 'main.less' and remove unused 'utils.less' and references @Wagner3UB [#7552](https://github.com/plone/volto/issues/7552)
|
|
64
92
|
- Improve some JSDocs for better typing. @sneridagh [#7560](https://github.com/plone/volto/issues/7560)
|
|
65
93
|
- Fix image upload inside `ImageWidget` component when used inside a non-folderish object. [@jnptk] [#7573](https://github.com/plone/volto/issues/7573)
|
|
66
|
-
- Avoid re-rendering a content item view while hydrating server-side rendered components. @reebalazs
|
|
67
|
-
- Fix failing cypress test on updating to Cypress 15 @Tishasoumya-02
|
|
68
|
-
- Fix infinite @users requests caused by anonymous useUser hook. @iFlameing
|
|
94
|
+
- Avoid re-rendering a content item view while hydrating server-side rendered components. @reebalazs
|
|
95
|
+
- Fix failing cypress test on updating to Cypress 15 @Tishasoumya-02
|
|
96
|
+
- Fix infinite @users requests caused by anonymous useUser hook. @iFlameing
|
|
69
97
|
|
|
70
98
|
### Internal
|
|
71
99
|
|
|
@@ -80,13 +108,13 @@ myst:
|
|
|
80
108
|
|
|
81
109
|
- Add Cypress for a subpath. @wesleybl [#6976](https://github.com/plone/volto/issues/6976)
|
|
82
110
|
- Serve API requests from a subpath. @davisagli [#7326](https://github.com/plone/volto/issues/7326)
|
|
83
|
-
- Add option to serve a Volto site on a subpath using the `RAZZLE_SUBPATH_PREFIX` environment variable. @nileshgulia1, @wesleybl, @davisagli
|
|
111
|
+
- Add option to serve a Volto site on a subpath using the `RAZZLE_SUBPATH_PREFIX` environment variable. @nileshgulia1, @wesleybl, @davisagli
|
|
84
112
|
|
|
85
113
|
### Internal
|
|
86
114
|
|
|
87
115
|
- Expires the cache if the root `package.json` is changed. @wesleybl [#7536](https://github.com/plone/volto/issues/7536)
|
|
88
|
-
- Move to `dependencies` some bad categorized dependencies in `devDependencies`. @sneridagh
|
|
89
|
-
- Run Cookieplone acceptance test with Node 24. @davisagli
|
|
116
|
+
- Move to `dependencies` some bad categorized dependencies in `devDependencies`. @sneridagh
|
|
117
|
+
- Run Cookieplone acceptance test with Node 24. @davisagli
|
|
90
118
|
|
|
91
119
|
## 19.0.0-alpha.8 (2025-10-22)
|
|
92
120
|
|
|
@@ -116,8 +144,8 @@ myst:
|
|
|
116
144
|
- Fix api middleware possible empty values error. @robgietema [#7433](https://github.com/plone/volto/issues/7433)
|
|
117
145
|
- Escape double quotes in POT / PO files @erral [#7476](https://github.com/plone/volto/issues/7476)
|
|
118
146
|
- Fixed corner case where RAZZLE_INTERNAL_API_PATH is set and id is still undefined on first SSR load. @sneridagh [#7478](https://github.com/plone/volto/issues/7478)
|
|
119
|
-
- Reset fieldset.invisible class definition in order to prevent clashes with other CSS frameworks that might have `invisible` as utility. @sneridagh
|
|
120
|
-
- Set type="button" for more widget buttons to prevent them from triggering when Enter is pressed elsewhere in the form. @davisagli
|
|
147
|
+
- Reset fieldset.invisible class definition in order to prevent clashes with other CSS frameworks that might have `invisible` as utility. @sneridagh
|
|
148
|
+
- Set type="button" for more widget buttons to prevent them from triggering when Enter is pressed elsewhere in the form. @davisagli
|
|
121
149
|
|
|
122
150
|
### Internal
|
|
123
151
|
|
|
@@ -126,8 +154,8 @@ myst:
|
|
|
126
154
|
- Makes the Cypress commands `getSlateEditorAndType` and `getSlateEditorSelectorAndType` more robust. @wesleybl [#7503](https://github.com/plone/volto/issues/7503)
|
|
127
155
|
- Enhance Cypress commands to trigger focus before typing in Slate editor. @wesleybl [#7506](https://github.com/plone/volto/issues/7506)
|
|
128
156
|
- Fix error and rename test to "should save typed content in the Slate editor". @wesleybl [#7507](https://github.com/plone/volto/issues/7507)
|
|
129
|
-
- Skip link check for URL which blocks traffic from GitHub. @davisagli
|
|
130
|
-
- Use Plone 6.1.3. @sneridagh
|
|
157
|
+
- Skip link check for URL which blocks traffic from GitHub. @davisagli
|
|
158
|
+
- Use Plone 6.1.3. @sneridagh
|
|
131
159
|
|
|
132
160
|
### Documentation
|
|
133
161
|
|
|
@@ -155,7 +183,7 @@ myst:
|
|
|
155
183
|
- Update folder content search input to announce result count for screen readers on search or input change. @Wagner3UB [#7364](https://github.com/plone/volto/issues/7364)
|
|
156
184
|
- Check if we are editing a content type before rendering the Content Type control panel form. @ericof [#7396](https://github.com/plone/volto/issues/7396)
|
|
157
185
|
- Added guard in API REDUX middleware. @sneridagh [#7412](https://github.com/plone/volto/issues/7412)
|
|
158
|
-
- Ensure the Refresh Content button correctly loads the preview image when using preview_image_link for Teaser block. @iFlameing
|
|
186
|
+
- Ensure the Refresh Content button correctly loads the preview image when using preview_image_link for Teaser block. @iFlameing
|
|
159
187
|
|
|
160
188
|
### Internal
|
|
161
189
|
|
|
@@ -218,7 +246,7 @@ myst:
|
|
|
218
246
|
|
|
219
247
|
- Update eslint-config-prettier past malware versions to "^9.1.2". @kittauri [#7254](https://github.com/plone/volto/issues/7254)
|
|
220
248
|
- Update @testing-library/react to 14.3.1. @wesleybl [#7260](https://github.com/plone/volto/issues/7260)
|
|
221
|
-
- Test with Plone 6.1.2. @davisagli
|
|
249
|
+
- Test with Plone 6.1.2. @davisagli
|
|
222
250
|
|
|
223
251
|
### Documentation
|
|
224
252
|
|
|
@@ -243,7 +271,7 @@ myst:
|
|
|
243
271
|
- Added the `.error` class to blocks with errors, highlighting them with a red border in edit mode. @alexandreIFB [#7138](https://github.com/plone/volto/issues/7138)
|
|
244
272
|
- Synchronizes versions of Volto dependencies with other packages in the monorepo. @wesleybl [#7184](https://github.com/plone/volto/issues/7184)
|
|
245
273
|
- In the contents view, add a pill to indicate working copies.
|
|
246
|
-
This only works with `plone.app.iterate` >= 6.2.0. @davisagli
|
|
274
|
+
This only works with `plone.app.iterate` >= 6.2.0. @davisagli
|
|
247
275
|
|
|
248
276
|
### Bugfix
|
|
249
277
|
|
|
@@ -310,7 +338,7 @@ myst:
|
|
|
310
338
|
|
|
311
339
|
### Internal
|
|
312
340
|
|
|
313
|
-
- Fixed types of #6826 in build:types. @sneridagh
|
|
341
|
+
- Fixed types of #6826 in build:types. @sneridagh
|
|
314
342
|
|
|
315
343
|
### Documentation
|
|
316
344
|
|
package/babel.js
CHANGED
|
@@ -2,7 +2,7 @@ module.exports = function (api) {
|
|
|
2
2
|
api.cache(true);
|
|
3
3
|
const presets = [
|
|
4
4
|
[
|
|
5
|
-
'razzle/babel',
|
|
5
|
+
'@plone/razzle/babel',
|
|
6
6
|
{
|
|
7
7
|
'@babel/preset-react': { runtime: 'automatic' },
|
|
8
8
|
},
|
|
@@ -11,9 +11,7 @@ module.exports = function (api) {
|
|
|
11
11
|
const plugins = [
|
|
12
12
|
'lodash',
|
|
13
13
|
'@babel/plugin-proposal-export-default-from', // Stage 1
|
|
14
|
-
'@babel/plugin-syntax-export-namespace-from', // Stage 4
|
|
15
14
|
'@babel/plugin-proposal-throw-expressions', // Stage 2
|
|
16
|
-
'@babel/plugin-proposal-nullish-coalescing-operator', // Stage 4
|
|
17
15
|
[
|
|
18
16
|
'babel-plugin-root-import', // Required for the ~ imports to work
|
|
19
17
|
{
|
package/global-test-setup.js
CHANGED
package/package.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
}
|
|
10
10
|
],
|
|
11
11
|
"license": "MIT",
|
|
12
|
-
"version": "19.0.0-alpha.
|
|
12
|
+
"version": "19.0.0-alpha.15",
|
|
13
13
|
"repository": {
|
|
14
14
|
"type": "git",
|
|
15
15
|
"url": "git@github.com:plone/volto.git"
|
|
@@ -42,58 +42,6 @@
|
|
|
42
42
|
}
|
|
43
43
|
]
|
|
44
44
|
},
|
|
45
|
-
"jest": {
|
|
46
|
-
"transform": {
|
|
47
|
-
"^.+\\.js(x)?$": "babel-jest",
|
|
48
|
-
"^.+\\.ts(x)?$": "ts-jest",
|
|
49
|
-
"^.+\\.(png)$": "jest-file",
|
|
50
|
-
"^.+\\.(jpg)$": "jest-file",
|
|
51
|
-
"^.+\\.(svg)$": "./jest-svgsystem-transform.js"
|
|
52
|
-
},
|
|
53
|
-
"moduleNameMapper": {
|
|
54
|
-
"@plone/volto/package.json": "<rootDir>/package.json",
|
|
55
|
-
"@plone/volto/babel": "<rootDir>/babel.js",
|
|
56
|
-
"@plone/volto/(.*)$": "<rootDir>/src/$1",
|
|
57
|
-
"@plone/volto-slate/(.*)$": "<rootDir>/../volto-slate/src/$1",
|
|
58
|
-
"@plone/registry/addon-registry$": "<rootDir>/node_modules/@plone/registry/dist/addon-registry/addon-registry.js",
|
|
59
|
-
"@plone/registry/create-addons-loader$": "<rootDir>/node_modules/@plone/registry/dist/addon-registry/create-addons-loader.js",
|
|
60
|
-
"@plone/registry": "<rootDir>/../registry/src",
|
|
61
|
-
"@plone/registry/(.*)$": "<rootDir>/../registry/src/$1",
|
|
62
|
-
"@plone/volto": "<rootDir>/src/index.js",
|
|
63
|
-
"~/config": "<rootDir>/src/config",
|
|
64
|
-
"~/../locales/${lang}.json": "<rootDir>/locales/en.json",
|
|
65
|
-
"(.*)/locales/(.*)": "<rootDir>/locales/$2",
|
|
66
|
-
"load-volto-addons": "<rootDir>/jest-addons-loader.js",
|
|
67
|
-
"@package/(.*)$": "<rootDir>/src/$1",
|
|
68
|
-
"@root/config": "<rootDir>/jest-addons-loader.js",
|
|
69
|
-
"@root/(.*)$": "<rootDir>/src/$1",
|
|
70
|
-
"@voltoconfig": "<rootDir>/jest-addons-loader.js",
|
|
71
|
-
"\\.(css|less|scss|sass)$": "identity-obj-proxy"
|
|
72
|
-
},
|
|
73
|
-
"coverageThreshold": {
|
|
74
|
-
"global": {
|
|
75
|
-
"branches": 10,
|
|
76
|
-
"functions": 10,
|
|
77
|
-
"lines": 10,
|
|
78
|
-
"statements": 10
|
|
79
|
-
}
|
|
80
|
-
},
|
|
81
|
-
"setupFiles": [
|
|
82
|
-
"./test-setup-globals.js",
|
|
83
|
-
"./test-setup-config.jsx"
|
|
84
|
-
],
|
|
85
|
-
"globalSetup": "./global-test-setup.js",
|
|
86
|
-
"setupFilesAfterEnv": [
|
|
87
|
-
"<rootDir>/jest-setup-afterenv.js"
|
|
88
|
-
],
|
|
89
|
-
"globals": {
|
|
90
|
-
"__DEV__": true
|
|
91
|
-
},
|
|
92
|
-
"testMatch": [
|
|
93
|
-
"<rootDir>/__tests__/**/?(*.)(spec|test).{js,jsx,mjs,ts,tsx}",
|
|
94
|
-
"<rootDir>/../**/?(*.)(spec|test).{js,jsx,mjs,ts,tsx}"
|
|
95
|
-
]
|
|
96
|
-
},
|
|
97
45
|
"stylelint": {
|
|
98
46
|
"extends": [
|
|
99
47
|
"stylelint-config-idiomatic-order"
|
|
@@ -240,24 +188,19 @@
|
|
|
240
188
|
"url": "^0.11.3",
|
|
241
189
|
"use-deep-compare-effect": "1.8.1",
|
|
242
190
|
"uuid": "^8.3.2",
|
|
243
|
-
"@plone/
|
|
191
|
+
"@plone/scripts": "4.0.0-alpha.4",
|
|
192
|
+
"@plone/volto-slate": "19.0.0-alpha.8",
|
|
244
193
|
"@plone/registry": "3.0.0-alpha.8",
|
|
245
|
-
"@plone/
|
|
246
|
-
"@plone/scripts": "4.0.0-alpha.3"
|
|
194
|
+
"@plone/components": "4.0.0-alpha.4"
|
|
247
195
|
},
|
|
248
196
|
"devDependencies": {
|
|
249
|
-
"@babel/core": "^7.
|
|
250
|
-
"@babel/eslint-parser": "7.
|
|
251
|
-
"@babel/plugin-proposal-export-default-from": "7.
|
|
252
|
-
"@babel/plugin-proposal-
|
|
253
|
-
"@babel/
|
|
254
|
-
"@babel/plugin-proposal-nullish-coalescing-operator": "7.18.6",
|
|
255
|
-
"@babel/plugin-proposal-throw-expressions": "7.18.6",
|
|
256
|
-
"@babel/plugin-syntax-export-namespace-from": "7.8.3",
|
|
257
|
-
"@babel/runtime": "7.20.6",
|
|
197
|
+
"@babel/core": "^7.28.5",
|
|
198
|
+
"@babel/eslint-parser": "^7.28.5",
|
|
199
|
+
"@babel/plugin-proposal-export-default-from": "^7.27.1",
|
|
200
|
+
"@babel/plugin-proposal-throw-expressions": "^7.27.1",
|
|
201
|
+
"@babel/runtime": "^7.28.4",
|
|
258
202
|
"@babel/types": "7.20.5",
|
|
259
203
|
"@fiverr/afterbuild-webpack-plugin": "^1.0.0",
|
|
260
|
-
"@jest/globals": "^29.7.0",
|
|
261
204
|
"@loadable/babel-plugin": "5.13.2",
|
|
262
205
|
"@loadable/webpack-plugin": "5.15.2",
|
|
263
206
|
"@sinonjs/fake-timers": "^6.0.1",
|
|
@@ -275,7 +218,6 @@
|
|
|
275
218
|
"@testing-library/react": "14.3.1",
|
|
276
219
|
"@testing-library/react-hooks": "8.0.1",
|
|
277
220
|
"@types/history": "^4.7.11",
|
|
278
|
-
"@types/jest": "^29.5.8",
|
|
279
221
|
"@types/loadable__component": "^5.13.9",
|
|
280
222
|
"@types/lodash": "^4.14.201",
|
|
281
223
|
"@types/node": "^24",
|
|
@@ -297,7 +239,6 @@
|
|
|
297
239
|
"babel-plugin-lodash": "3.3.4",
|
|
298
240
|
"babel-plugin-react-intl": "5.1.17",
|
|
299
241
|
"babel-plugin-root-import": "6.1.0",
|
|
300
|
-
"babel-preset-razzle": "4.2.18",
|
|
301
242
|
"bundlewatch": "0.3.3",
|
|
302
243
|
"circular-dependency-plugin": "5.2.2",
|
|
303
244
|
"css-loader": "5.2.7",
|
|
@@ -305,6 +246,7 @@
|
|
|
305
246
|
"cypress-axe": "1.7.0",
|
|
306
247
|
"cypress-file-upload": "5.0.8",
|
|
307
248
|
"deep-freeze": "0.0.1",
|
|
249
|
+
"deepmerge": "^4.2.2",
|
|
308
250
|
"eslint": "^8.57.0",
|
|
309
251
|
"eslint-config-prettier": "^9.1.2",
|
|
310
252
|
"eslint-config-react-app": "^7.0.1",
|
|
@@ -319,9 +261,6 @@
|
|
|
319
261
|
"eslint-plugin-react-hooks": "^4.6.0",
|
|
320
262
|
"html-webpack-plugin": "5.5.0",
|
|
321
263
|
"identity-obj-proxy": "3.0.0",
|
|
322
|
-
"jest": "26.6.3",
|
|
323
|
-
"jest-environment-jsdom": "^26",
|
|
324
|
-
"jest-file": "1.0.0",
|
|
325
264
|
"jiti": "^2.4.2",
|
|
326
265
|
"jsdom": "^16.7.0",
|
|
327
266
|
"jsonwebtoken": "9.0.0",
|
|
@@ -338,13 +277,14 @@
|
|
|
338
277
|
"postcss-overrides": "3.1.4",
|
|
339
278
|
"postcss-scss": "4.0.6",
|
|
340
279
|
"prettier": "3.2.5",
|
|
341
|
-
"razzle": "4.2.18",
|
|
342
280
|
"razzle-dev-utils": "4.2.18",
|
|
343
|
-
"razzle-plugin-scss": "4.2.18",
|
|
344
281
|
"react-docgen-typescript-plugin": "^1.0.5",
|
|
345
282
|
"react-error-overlay": "6.0.9",
|
|
346
283
|
"react-is": "^18.2.0",
|
|
347
284
|
"release-it": "^19.0.4",
|
|
285
|
+
"resolve-url-loader": "^3.1.2",
|
|
286
|
+
"sass": "1.58.0",
|
|
287
|
+
"sass-loader": "^10.0.3",
|
|
348
288
|
"semver": "^7.5.4",
|
|
349
289
|
"start-server-and-test": "1.14.0",
|
|
350
290
|
"storybook": "^8.0.4",
|
|
@@ -357,7 +297,6 @@
|
|
|
357
297
|
"svgo-loader": "3.0.3",
|
|
358
298
|
"terser-webpack-plugin": "5.3.6",
|
|
359
299
|
"tmp": "0.2.1",
|
|
360
|
-
"ts-jest": "^26.4.2",
|
|
361
300
|
"ts-loader": "9.4.4",
|
|
362
301
|
"typescript": "^5.7.3",
|
|
363
302
|
"use-trace-update": "1.3.2",
|
|
@@ -367,8 +306,10 @@
|
|
|
367
306
|
"webpack-bundle-analyzer": "4.10.1",
|
|
368
307
|
"webpack-dev-server": "4.11.1",
|
|
369
308
|
"webpack-node-externals": "3.0.0",
|
|
370
|
-
"@plone/
|
|
371
|
-
"@plone/
|
|
309
|
+
"@plone/babel-preset-razzle": "^1.0.0-alpha.0",
|
|
310
|
+
"@plone/razzle": "1.0.0-alpha.0",
|
|
311
|
+
"@plone/volto-coresandbox": "1.0.0",
|
|
312
|
+
"@plone/types": "2.0.0-alpha.11"
|
|
372
313
|
},
|
|
373
314
|
"volta": {
|
|
374
315
|
"node": "20.9.0"
|
|
@@ -379,10 +320,9 @@
|
|
|
379
320
|
"start:coresandbox": "make build-deps && ADDONS=coresandbox razzle start",
|
|
380
321
|
"build": "make build-deps && razzle build --noninteractive",
|
|
381
322
|
"build:types": "tsc --project tsconfig.declarations.json",
|
|
382
|
-
"
|
|
323
|
+
"test": "vitest",
|
|
383
324
|
"coverage": "vitest run --coverage",
|
|
384
|
-
"test": "
|
|
385
|
-
"test:ci": "CI=true NODE_ICU_DATA=node_modules/full-icu razzle test",
|
|
325
|
+
"test:ci": "CI=true NODE_ICU_DATA=node_modules/full-icu vitest run",
|
|
386
326
|
"test:husky": "CI=true yarn test --bail --findRelatedTests",
|
|
387
327
|
"start:prod": "NODE_ENV=production node build/server.js",
|
|
388
328
|
"prettier": "prettier --single-quote --check '{src,cypress}/**/*.{js,jsx,ts,tsx}' --check '*.js'",
|
package/razzle.config.js
CHANGED
|
@@ -121,6 +121,7 @@ const defaultModify = ({
|
|
|
121
121
|
// Using the default provided (cssnano) by css-minimizer-webpack-plugin
|
|
122
122
|
// should be enough see:
|
|
123
123
|
// (https://github.com/clean-css/clean-css/discussions/1209)
|
|
124
|
+
// TODO: remove this before merging the Razzle fork into Volto 19
|
|
124
125
|
delete options.webpackOptions.terserPluginOptions?.sourceMap;
|
|
125
126
|
if (!dev) {
|
|
126
127
|
config.optimization = Object.assign({}, config.optimization, {
|
|
@@ -439,8 +440,7 @@ const defaultPlugins = [
|
|
|
439
440
|
{ object: require('./webpack-plugins/webpack-less-plugin')({ registry }) },
|
|
440
441
|
{ object: require('./webpack-plugins/webpack-svg-plugin') },
|
|
441
442
|
{ object: require('./webpack-plugins/webpack-bundle-analyze-plugin') },
|
|
442
|
-
{ object: require('./
|
|
443
|
-
'scss',
|
|
443
|
+
{ object: require('./webpack-plugins/webpack-scss-plugin') },
|
|
444
444
|
];
|
|
445
445
|
|
|
446
446
|
const plugins = addonExtenders.reduce(
|
|
@@ -8,11 +8,7 @@ import Actions from './Actions';
|
|
|
8
8
|
|
|
9
9
|
const mockStore = configureStore();
|
|
10
10
|
|
|
11
|
-
vi.mock('@plone/volto/components/manage/Contents'
|
|
12
|
-
return await import(
|
|
13
|
-
'@plone/volto/components/manage/Contents/__mocks__/index.vitest.tsx'
|
|
14
|
-
);
|
|
15
|
-
});
|
|
11
|
+
vi.mock('@plone/volto/components/manage/Contents');
|
|
16
12
|
|
|
17
13
|
describe('Actions', () => {
|
|
18
14
|
it('renders an actions component', () => {
|
|
@@ -7,11 +7,7 @@ import config from '@plone/volto/registry';
|
|
|
7
7
|
|
|
8
8
|
config.experimental = { addBlockButton: { enabled: false } };
|
|
9
9
|
|
|
10
|
-
vi.mock('@plone/volto/helpers/Loadable/Loadable'
|
|
11
|
-
return await import(
|
|
12
|
-
'@plone/volto/helpers/Loadable/__mocks__/Loadable.vitest.jsx'
|
|
13
|
-
);
|
|
14
|
-
});
|
|
10
|
+
vi.mock('@plone/volto/helpers/Loadable/Loadable');
|
|
15
11
|
|
|
16
12
|
beforeAll(async () => {
|
|
17
13
|
const { __setLoadables } = await import(
|
|
@@ -5,11 +5,7 @@ import configureStore from 'redux-mock-store';
|
|
|
5
5
|
import config from '@plone/volto/registry';
|
|
6
6
|
import { Provider } from 'react-intl-redux';
|
|
7
7
|
|
|
8
|
-
vi.mock('@plone/volto/components/manage/Form'
|
|
9
|
-
return await import(
|
|
10
|
-
'@plone/volto/components/manage/Form/__mocks__/index.vitest.tsx'
|
|
11
|
-
);
|
|
12
|
-
});
|
|
8
|
+
vi.mock('@plone/volto/components/manage/Form');
|
|
13
9
|
|
|
14
10
|
const mockStore = configureStore();
|
|
15
11
|
|
|
@@ -7,11 +7,7 @@ import Edit from './Edit';
|
|
|
7
7
|
|
|
8
8
|
const mockStore = configureStore();
|
|
9
9
|
|
|
10
|
-
vi.mock('@plone/volto/helpers/Loadable/Loadable'
|
|
11
|
-
return await import(
|
|
12
|
-
'@plone/volto/helpers/Loadable/__mocks__/Loadable.vitest.jsx'
|
|
13
|
-
);
|
|
14
|
-
});
|
|
10
|
+
vi.mock('@plone/volto/helpers/Loadable/Loadable');
|
|
15
11
|
|
|
16
12
|
beforeAll(async () => {
|
|
17
13
|
const { __setLoadables } = await import(
|
|
@@ -5,11 +5,7 @@ import { Provider } from 'react-intl-redux';
|
|
|
5
5
|
|
|
6
6
|
import ImageSidebar from './ImageSidebar';
|
|
7
7
|
|
|
8
|
-
vi.mock('@plone/volto/components/manage/Form'
|
|
9
|
-
return await import(
|
|
10
|
-
'@plone/volto/components/manage/Form/__mocks__/index.vitest.tsx'
|
|
11
|
-
);
|
|
12
|
-
});
|
|
8
|
+
vi.mock('@plone/volto/components/manage/Form');
|
|
13
9
|
|
|
14
10
|
const mockStore = configureStore();
|
|
15
11
|
|
|
@@ -6,11 +6,7 @@ import { Provider } from 'react-intl-redux';
|
|
|
6
6
|
import LeadImageSidebar from './LeadImageSidebar';
|
|
7
7
|
|
|
8
8
|
vi.mock('@plone/volto/components/manage/Widgets');
|
|
9
|
-
vi.mock('@plone/volto/components/manage/Widgets'
|
|
10
|
-
return await import(
|
|
11
|
-
'@plone/volto/components/manage/Widgets/__mocks__/index.vitest.tsx'
|
|
12
|
-
);
|
|
13
|
-
});
|
|
9
|
+
vi.mock('@plone/volto/components/manage/Widgets');
|
|
14
10
|
|
|
15
11
|
const mockStore = configureStore();
|
|
16
12
|
|
|
@@ -5,11 +5,7 @@ import { Provider } from 'react-intl-redux';
|
|
|
5
5
|
|
|
6
6
|
import MapsSidebar from './MapsSidebar';
|
|
7
7
|
|
|
8
|
-
vi.mock('@plone/volto/components/manage/Form'
|
|
9
|
-
return await import(
|
|
10
|
-
'@plone/volto/components/manage/Form/__mocks__/index.vitest.tsx'
|
|
11
|
-
);
|
|
12
|
-
});
|
|
8
|
+
vi.mock('@plone/volto/components/manage/Form');
|
|
13
9
|
|
|
14
10
|
const mockStore = configureStore();
|
|
15
11
|
|
|
@@ -6,12 +6,7 @@ import DateRangeFacet from './DateRangeFacet';
|
|
|
6
6
|
|
|
7
7
|
const mockStore = configureStore();
|
|
8
8
|
|
|
9
|
-
vi.mock('@plone/volto/helpers/Loadable/Loadable'
|
|
10
|
-
return await import(
|
|
11
|
-
'@plone/volto/helpers/Loadable/__mocks__/Loadable.vitest.jsx'
|
|
12
|
-
);
|
|
13
|
-
});
|
|
14
|
-
|
|
9
|
+
vi.mock('@plone/volto/helpers/Loadable/Loadable');
|
|
15
10
|
beforeAll(async () => {
|
|
16
11
|
const { __setLoadables } = await import(
|
|
17
12
|
'@plone/volto/helpers/Loadable/Loadable'
|
|
@@ -6,12 +6,7 @@ import SelectFacet from './SelectFacet';
|
|
|
6
6
|
|
|
7
7
|
const mockStore = configureStore();
|
|
8
8
|
|
|
9
|
-
vi.mock('@plone/volto/helpers/Loadable/Loadable'
|
|
10
|
-
return await import(
|
|
11
|
-
'@plone/volto/helpers/Loadable/__mocks__/Loadable.vitest.jsx'
|
|
12
|
-
);
|
|
13
|
-
});
|
|
14
|
-
|
|
9
|
+
vi.mock('@plone/volto/helpers/Loadable/Loadable');
|
|
15
10
|
beforeAll(async () => {
|
|
16
11
|
const { __setLoadables } = await import(
|
|
17
12
|
'@plone/volto/helpers/Loadable/Loadable'
|
|
@@ -5,11 +5,7 @@ import { Provider } from 'react-intl-redux';
|
|
|
5
5
|
|
|
6
6
|
import VideoSidebar from './VideoSidebar';
|
|
7
7
|
|
|
8
|
-
vi.mock('@plone/volto/components/manage/Form'
|
|
9
|
-
return await import(
|
|
10
|
-
'@plone/volto/components/manage/Form/__mocks__/index.vitest.tsx'
|
|
11
|
-
);
|
|
12
|
-
});
|
|
8
|
+
vi.mock('@plone/volto/components/manage/Form');
|
|
13
9
|
|
|
14
10
|
const mockStore = configureStore();
|
|
15
11
|
|
|
@@ -8,11 +8,7 @@ import { __test__ as Contents } from './Contents';
|
|
|
8
8
|
|
|
9
9
|
const mockStore = configureStore();
|
|
10
10
|
|
|
11
|
-
vi.mock('@plone/volto/helpers/Loadable/Loadable'
|
|
12
|
-
return await import(
|
|
13
|
-
'@plone/volto/helpers/Loadable/__mocks__/Loadable.vitest.jsx'
|
|
14
|
-
);
|
|
15
|
-
});
|
|
11
|
+
vi.mock('@plone/volto/helpers/Loadable/Loadable');
|
|
16
12
|
|
|
17
13
|
beforeAll(async () => {
|
|
18
14
|
const { __setLoadables } = await import(
|
|
@@ -7,11 +7,7 @@ import ContentsPropertiesModal from './ContentsPropertiesModal';
|
|
|
7
7
|
|
|
8
8
|
const mockStore = configureStore();
|
|
9
9
|
|
|
10
|
-
vi.mock('@plone/volto/components/manage/Form'
|
|
11
|
-
return await import(
|
|
12
|
-
'@plone/volto/components/manage/Form/__mocks__/index.vitest.tsx'
|
|
13
|
-
);
|
|
14
|
-
});
|
|
10
|
+
vi.mock('@plone/volto/components/manage/Form');
|
|
15
11
|
|
|
16
12
|
describe('ContentsPropertiesModal', () => {
|
|
17
13
|
it('renders a contents properties modal component', () => {
|
|
@@ -7,11 +7,7 @@ import ContentsRenameModal from './ContentsRenameModal';
|
|
|
7
7
|
|
|
8
8
|
const mockStore = configureStore();
|
|
9
9
|
|
|
10
|
-
vi.mock('@plone/volto/components/manage/Form'
|
|
11
|
-
return await import(
|
|
12
|
-
'@plone/volto/components/manage/Form/__mocks__/index.vitest.tsx'
|
|
13
|
-
);
|
|
14
|
-
});
|
|
10
|
+
vi.mock('@plone/volto/components/manage/Form');
|
|
15
11
|
|
|
16
12
|
describe('ContentsRenameModal', () => {
|
|
17
13
|
it('renders a contents rename modal component', () => {
|
|
@@ -7,11 +7,7 @@ import ContentsTagsModal from './ContentsTagsModal';
|
|
|
7
7
|
|
|
8
8
|
const mockStore = configureStore();
|
|
9
9
|
|
|
10
|
-
vi.mock('@plone/volto/components/manage/Form'
|
|
11
|
-
return await import(
|
|
12
|
-
'@plone/volto/components/manage/Form/__mocks__/index.vitest.tsx'
|
|
13
|
-
);
|
|
14
|
-
});
|
|
10
|
+
vi.mock('@plone/volto/components/manage/Form');
|
|
15
11
|
|
|
16
12
|
describe('ContentsTagsModal', () => {
|
|
17
13
|
it('renders a contents tags modal component', () => {
|
|
@@ -7,11 +7,7 @@ import ContentsWorkflowModal from './ContentsWorkflowModal';
|
|
|
7
7
|
|
|
8
8
|
const mockStore = configureStore();
|
|
9
9
|
|
|
10
|
-
vi.mock('@plone/volto/components/manage/Form'
|
|
11
|
-
return await import(
|
|
12
|
-
'@plone/volto/components/manage/Form/__mocks__/index.vitest.tsx'
|
|
13
|
-
);
|
|
14
|
-
});
|
|
10
|
+
vi.mock('@plone/volto/components/manage/Form');
|
|
15
11
|
|
|
16
12
|
describe('ContentsWorkflowModal', () => {
|
|
17
13
|
it('renders a contents workflow modal component', () => {
|
|
@@ -1,21 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
Then, in the tests, we need to replace:
|
|
1
|
+
export const Contents = vi.fn(() => <div className="Contents" />);
|
|
3
2
|
|
|
4
|
-
vi.
|
|
5
|
-
return await import(
|
|
6
|
-
'@plone/volto/components/manage/Contents/__mocks__/index.vitest.tsx'
|
|
7
|
-
);
|
|
8
|
-
});
|
|
9
|
-
|
|
10
|
-
with the following:
|
|
11
|
-
|
|
12
|
-
vi.mock('@plone/volto/components/manage/Contents');
|
|
13
|
-
|
|
14
|
-
Finally, remove this comment.
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
export const Contents = jest.fn(() => <div className="Contents" />);
|
|
18
|
-
|
|
19
|
-
export const ContentsRenameModal = jest.fn(() => (
|
|
3
|
+
export const ContentsRenameModal = vi.fn(() => (
|
|
20
4
|
<div className="ContentsRenameModal" />
|
|
21
5
|
));
|
|
@@ -10,11 +10,7 @@ import { MemoryRouter } from 'react-router';
|
|
|
10
10
|
const middlewares = [thunk];
|
|
11
11
|
const mockStore = configureMockStore(middlewares);
|
|
12
12
|
|
|
13
|
-
vi.mock('@plone/volto/components/manage/Widgets'
|
|
14
|
-
return await import(
|
|
15
|
-
'@plone/volto/components/manage/Widgets/__mocks__/index.vitest.tsx'
|
|
16
|
-
);
|
|
17
|
-
});
|
|
13
|
+
vi.mock('@plone/volto/components/manage/Widgets');
|
|
18
14
|
|
|
19
15
|
vi.mock('../../Toolbar/Toolbar', () => ({
|
|
20
16
|
default: vi.fn(() => <div id="Portal" />),
|
|
@@ -8,11 +8,7 @@ import ContentType from './ContentType';
|
|
|
8
8
|
|
|
9
9
|
const mockStore = configureStore();
|
|
10
10
|
|
|
11
|
-
vi.mock('@plone/volto/components/manage/Form'
|
|
12
|
-
return await import(
|
|
13
|
-
'@plone/volto/components/manage/Form/__mocks__/index.vitest.tsx'
|
|
14
|
-
);
|
|
15
|
-
});
|
|
11
|
+
vi.mock('@plone/volto/components/manage/Form');
|
|
16
12
|
vi.mock('../../Toolbar/Toolbar', () => ({
|
|
17
13
|
default: vi.fn(() => <div id="Portal" />),
|
|
18
14
|
}));
|
|
@@ -9,11 +9,7 @@ import AddRule from './AddRule';
|
|
|
9
9
|
const middlewares = [thunk];
|
|
10
10
|
const mockStore = configureMockStore(middlewares);
|
|
11
11
|
|
|
12
|
-
vi.mock('@plone/volto/components/manage/Form'
|
|
13
|
-
return await import(
|
|
14
|
-
'@plone/volto/components/manage/Form/__mocks__/index.vitest.tsx'
|
|
15
|
-
);
|
|
16
|
-
});
|
|
12
|
+
vi.mock('@plone/volto/components/manage/Form');
|
|
17
13
|
|
|
18
14
|
vi.mock('../../Toolbar/Toolbar', () => ({
|
|
19
15
|
default: vi.fn(() => <div id="Toolbar" />),
|