Skip to content

Commit

Permalink
Merge branch 'master' into typo-remove-documentdescription-class
Browse files Browse the repository at this point in the history
* master: (22 commits)
  Added CTRL+ENTER feature in text blocks by default. It creates a newline inside the same text chunk (`<p>`) (#1044)
  Revert "Fix make build on py3."
  Add plone.rest(api) to sources.
  Fix make build on py3.
  Fix lint check on bash condition (#1031)
  Further upgrade documentation
  Back to development
  Release 4.0.0-alpha.17
  Add docs for upgrade to alpha 17
  Reverteslintupgrade (#1028)
  Back to development
  Release 4.0.0-alpha.16
  Lodash improvements for decrease bundle size (#975)
  Fix small CSS issues in Blocks (#1023)
  Forked `react-helmet` since it seems unmaintained. Now it's a Named import in helpers (#1025)
  Solvepeerdependencies (#1026)
  Fix to a good know digest (#1022)
  Back to development
  Release 4.0.0-alpha.15
  Export the resetContent action (#1017)
  ...
  • Loading branch information
sneridagh committed Dec 9, 2019
2 parents 6d37a79 + aa5258b commit de3bd83
Show file tree
Hide file tree
Showing 50 changed files with 2,253 additions and 994 deletions.
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ install:
- yarn install --frozen-lockfile
- yarn cy:install
script:
- yarn run prettier
- yarn run lint
- yarn run code-analysis:i18n
- if [ "$TEST_SUITE" == "unit" ]; then
yarn run prettier &&
yarn run lint &&
yarn run code-analysis:i18n &&
yarn test:ci;
fi
- if [ "$TEST_SUITE" == "guillotina" ]; then
Expand Down
31 changes: 31 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,39 @@

### Added

- Added CTRL+ENTER feature in text blocks by default. It creates a newline inside the same text chunk (`<p>`) @sneridagh

### Changes

## 4.0.0-alpha.17 (2019-12-03)

### Internal

- Revert eslint upgrade, because of problems with the react-app preset typescript settings @sneridagh

## 4.0.0-alpha.16 (2019-12-02)

### Changes

- Fix small CSS issues in Blocks @sneridagh

### Internal

- Pin Guillotina docker image @sneridagh
- Forked `react-helmet` since it seems unmaintained. Now it's a Named import in helpers. @sneridagh
- Update internal dependencies, fix "unmet peer dependencies" console logs by adding the peer dependencies to the local dependencies @sneridagh
- Update some dependencies, including: react-router, eslint engine and plugins/config and others @sneridagh
- Lodash improvements for decrease bundle size @sneridagh

## 4.0.0-alpha.15 (2019-11-27)

### Internal

- Export the resetContent action @pnicolli
- Fix toolbar collapsed color @sneridagh
- Minor CSS fixes @sneridagh
- Remove @testing-library/cypress dep, as it breaks builds if the internal cypress release is different than the one in this package @sneridagh

## 4.0.0-alpha.14 (2019-11-24)

### Internal
Expand Down
2 changes: 2 additions & 0 deletions api/base.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ extensions =

[sources]
kitconcept.voltodemo = git [email protected]:kitconcept/kitconcept.voltodemo.git branch=master
plone.rest = git [email protected]:plone/plone.rest.git branch=master
plone.restapi = git [email protected]:plone/plone.restapi.git branch=master

[instance]
recipe = plone.recipe.zope2instance
Expand Down
1 change: 1 addition & 0 deletions babel.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ module.exports = function(api) {
api.cache(true);
const presets = ['razzle/babel'];
const plugins = [
'lodash',
'@babel/plugin-proposal-function-bind',
'@babel/plugin-proposal-do-expressions',
'@babel/plugin-proposal-export-default-from',
Expand Down
25 changes: 25 additions & 0 deletions docs/source/upgrade-guide/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,31 @@ First, update your `package.json` to Volto 4.x.x.
}
```

### Rebuild `yarn.lock` in Alpha 17

Due to changes in the dependency tree, it's required to reset `yarn.lock` file by deleting it before upgrading to Volto alpha 17.

### Forked Helmet into Volto core

Due to the inactivity of the Helmet project, we decided to fork it to the core. It's part of the Volto helpers now. You have to update your imports accordingly. Please notice that now it's a named import:

```diff
--- a/src/components/Views/ReportView.jsx
+++ b/src/components/Views/ReportView.jsx
@@ -1,6 +1,6 @@
import React from 'react';
import PropTypes from 'prop-types';
-import Helmet from 'react-helmet';
+import { Helmet } from '@plone/volto/helpers';
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
import { format, parse } from 'date-fns';
import { filter, map } from 'lodash';
```

### Alpha 16 is a brownbag release

There was a problem with the projects using Volto eslint config when upgrading to latest versions related to typescript, we will take of that in the near future. So skip this version.

### Stylelint and prettier config in Alpha 14

In your project's boilerplate, you need to update the stylelint and prettier configuration accordingly to the changes made in Alpha 14 in `package.json` like this:
Expand Down
2 changes: 1 addition & 1 deletion g-api/docker-compose-local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ services:
ports:
- 5432:5432
guillotina:
image: plone/guillotina_cms:master
image: plone/guillotina_cms:volto
command: sh -c "sleep 5 && g -c /usr/src/app/config.yml"
ports:
- "8081:8081"
Expand Down
2 changes: 1 addition & 1 deletion g-api/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ services:
POSTGRES_DB: guillotina
POSTGRES_USER: guillotina
guillotina:
image: plone/guillotina_cms:latest
image: plone/guillotina_cms:volto
command: sh -c "sleep 5 && g -c /usr/src/app/config.yml"
ports:
- "8081:8081"
Expand Down
104 changes: 55 additions & 49 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
}
],
"license": "MIT",
"version": "4.0.0-alpha.14",
"version": "4.0.0-alpha.17",
"repository": {
"type": "git",
"url": "[email protected]:plone/volto.git"
Expand Down Expand Up @@ -197,41 +197,42 @@
"node": "^10 || ^12"
},
"dependencies": {
"@babel/plugin-proposal-decorators": "7.4.0",
"@babel/plugin-proposal-do-expressions": "7.2.0",
"@babel/plugin-proposal-export-default-from": "7.2.0",
"@babel/plugin-proposal-export-namespace-from": "7.2.0",
"@babel/plugin-proposal-function-bind": "7.2.0",
"@babel/plugin-proposal-function-sent": "7.2.0",
"@babel/plugin-proposal-json-strings": "7.2.0",
"@babel/plugin-proposal-logical-assignment-operators": "7.2.0",
"@babel/plugin-proposal-nullish-coalescing-operator": "7.4.3",
"@babel/plugin-proposal-numeric-separator": "7.2.0",
"@babel/plugin-proposal-optional-chaining": "7.2.0",
"@babel/plugin-proposal-pipeline-operator": "7.3.2",
"@babel/plugin-proposal-throw-expressions": "7.2.0",
"@babel/plugin-syntax-import-meta": "7.2.0",
"@babel/core": "7.7.4",
"@babel/plugin-proposal-decorators": "7.7.4",
"@babel/plugin-proposal-do-expressions": "7.7.4",
"@babel/plugin-proposal-export-default-from": "7.7.4",
"@babel/plugin-proposal-export-namespace-from": "7.7.4",
"@babel/plugin-proposal-function-bind": "7.7.4",
"@babel/plugin-proposal-function-sent": "7.7.4",
"@babel/plugin-proposal-json-strings": "7.7.4",
"@babel/plugin-proposal-logical-assignment-operators": "7.7.4",
"@babel/plugin-proposal-nullish-coalescing-operator": "7.7.4",
"@babel/plugin-proposal-numeric-separator": "7.7.4",
"@babel/plugin-proposal-optional-chaining": "7.7.4",
"@babel/plugin-proposal-pipeline-operator": "7.7.4",
"@babel/plugin-proposal-throw-expressions": "7.7.4",
"@babel/plugin-syntax-import-meta": "7.7.4",
"@babel/preset-stage-0": "7.0.0",
"@testing-library/cypress": "5.0.2",
"@testing-library/jest-dom": "4.2.0",
"@testing-library/react": "9.3.0",
"autoprefixer": "9.7.1",
"axe-core": "3.2.2",
"@testing-library/jest-dom": "4.2.4",
"@testing-library/react": "9.3.2",
"autoprefixer": "9.7.3",
"axe-core": "3.4.0",
"babel-7-plugin-root-import": "5.4.0",
"babel-eslint": "10.0.1",
"babel-eslint": "10.0.3",
"babel-plugin-add-module-exports": "0.2.1",
"babel-plugin-lodash": "3.3.4",
"babel-plugin-react-intl": "3.0.1",
"babel-plugin-root-import": "6.1.0",
"bundlesize": "0.18.0",
"bundlewatch": "0.2.5",
"classnames": "2.2.6",
"connected-react-router": "6.5.2",
"connected-react-router": "6.6.1",
"coveralls": "3.0.2",
"css-loader": "2.1.1",
"cypress": "3.6.1",
"cypress-axe": "0.4.1",
"cypress-file-upload": "3.1.2",
"cypress-plugin-retries": "1.3.0",
"cypress-file-upload": "3.5.0",
"cypress-plugin-retries": "1.5.0",
"draft-js": "0.10.5",
"draft-js-block-breakout-plugin": "2.0.1",
"draft-js-buttons": "2.0.1",
Expand All @@ -245,89 +246,94 @@
"eslint-config-react-app": "4.0.1",
"eslint-import-resolver-alias": "1.1.2",
"eslint-import-resolver-babel-plugin-root-import": "1.1.1",
"express": "4.17.1",
"eslint-plugin-flowtype": "2.50.1",
"eslint-plugin-import": "2.17.2",
"eslint-plugin-jsx-a11y": "6.2.1",
"eslint-plugin-prettier": "3.0.1",
"eslint-plugin-react": "7.13.0",
"eslint-plugin-react-hooks": "1.6.0",
"express": "4.16.3",
"glob": "7.1.3",
"hamburgers": "1.1.3",
"handlebars": "4.1.2",
"history": "4.9.0",
"husky": "2.2.0",
"history": "4.10.1",
"husky": "3.1.0",
"jest-css-modules": "1.1.0",
"jest-file": "1.0.0",
"js-yaml": "3.13.1",
"jsonwebtoken": "8.3.0",
"jwt-decode": "2.2.0",
"less": "3.9.0",
"less-loader": "4.1.0",
"lint-staged": "8.1.6",
"less": "3.10.3",
"less-loader": "5.0.0",
"lint-staged": "9.5.0",
"locale": "0.1.0",
"lodash": "4.17.15",
"lodash-move": "1.1.1",
"lodash-webpack-plugin": "0.11.5",
"mem": "4.0.0",
"mini-css-extract-plugin": "0.8.0",
"moment": "2.22.2",
"pofile": "1.0.10",
"postcss-flexbugs-fixes": "4.1.0",
"postcss-loader": "3.0.0",
"postcss-overrides": "3.1.4",
"prettier": "1.19.1",
"pretty": "2.0.0",
"prismjs": "1.15.0",
"prismjs": "1.17.1",
"promise-file-reader": "1.0.2",
"prop-types": "15.7.2",
"query-string": "4.1.0",
"raven": "2.6.4",
"raven-js": "3.27.0",
"raven-js": "3.27.2",
"razzle": "3.0.0",
"razzle-plugin-bundle-analyzer": "1.0.2",
"razzle-plugin-bundle-analyzer": "1.1.3",
"react": "16.12.0",
"react-animate-height": "2.0.15",
"react-animate-height": "2.0.17",
"react-cookie": "1.0.5",
"react-dnd": "5.0.0",
"react-dnd-html5-backend": "5.0.1",
"react-dom": "16.12.0",
"react-dropzone": "5.1.0",
"react-helmet": "5.2.0",
"react-intl": "3.3.2",
"react-intl-redux": "2.1.1",
"react-fast-compare": "2.0.4",
"react-intl": "3.8.0",
"react-intl-redux": "2.2.0",
"react-medium-image-zoom": "3.0.15",
"react-portal": "4.1.5",
"react-redux": "7.1.1",
"react-router-config": "5.1.0",
"react-router-dom": "5.1.0",
"react-portal": "4.2.0",
"react-redux": "7.1.3",
"react-router": "5.1.2",
"react-router-config": "5.1.1",
"react-router-dom": "5.1.2",
"react-select": "2.4.2",
"react-select-async-paginate": "0.2.9",
"react-share": "2.3.1",
"react-side-effect": "2.1.0",
"react-simple-code-editor": "0.7.1",
"react-test-renderer": "16.8.6",
"react-toastify": "5.1.1",
"redraft": "0.10.1",
"redux": "4.0.1",
"react-test-renderer": "16.12.0",
"react-toastify": "5.4.1",
"redraft": "0.10.2",
"redux": "4.0.4",
"redux-actions": "2.6.5",
"redux-connect": "10.0.0",
"redux-devtools-extension": "2.13.8",
"redux-mock-store": "1.5.3",
"redux-thunk": "2.3.0",
"release-it": "12.4.0",
"release-it": "12.4.3",
"semantic-ui-less": "2.4.1",
"semantic-ui-react": "0.88.1",
"semver": "5.6.0",
"serialize-javascript": "1.5.0",
"start-server-and-test": "1.7.13",
"start-server-and-test": "1.10.6",
"style-loader": "0.23.0",
"stylelint": "11.1.1",
"stylelint-config-idiomatic-order": "6.2.0",
"stylelint-config-prettier": "6.0.0",
"stylelint-prettier": "1.1.1",
"superagent": "3.8.2",
"svg-loader": "0.0.2",
"svgo": "1.0.5",
"svgo-loader": "2.1.0",
"svgo": "1.3.2",
"svgo-loader": "2.2.1",
"tlds": "1.203.1",
"webpack": "4.41.2",
"xmlrpc": "1.3.2"
},
"devDependencies": {}
Expand Down
25 changes: 22 additions & 3 deletions razzle.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const autoprefixer = require('autoprefixer');
const makeLoaderFinder = require('razzle-dev-utils/makeLoaderFinder');
const nodeExternals = require('webpack-node-externals');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const LodashModuleReplacementPlugin = require('lodash-webpack-plugin');
const fs = require('fs');
const { map } = require('lodash');
const glob = require('glob').sync;
Expand Down Expand Up @@ -119,6 +120,26 @@ module.exports = {
__SERVER__: false,
}),
);
config.plugins.unshift(
new LodashModuleReplacementPlugin({
shorthands: true,
cloning: true,
currying: true,
caching: true,
collections: true,
exotics: true,
guards: true,
metadata: true,
deburring: true,
unicode: true,
chaining: true,
memoizing: true,
coercions: true,
flattening: true,
paths: true,
placeholders: true,
}),
);
}

if (target === 'node') {
Expand Down Expand Up @@ -155,9 +176,7 @@ module.exports = {
const jsConfig = require(`${projectRootPath}/jsconfig`).compilerOptions;
const pathsConfig = jsConfig.paths;
Object.keys(pathsConfig).forEach(packageName => {
const packagePath = `${projectRootPath}/${jsConfig.baseUrl}/${
pathsConfig[packageName][0]
}`;
const packagePath = `${projectRootPath}/${jsConfig.baseUrl}/${pathsConfig[packageName][0]}`;
jsconfigPaths[packageName] = packagePath;
if (packageName === '@plone/volto') {
voltoPath = packagePath;
Expand Down
1 change: 1 addition & 0 deletions src/actions/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export {
getContent,
orderContent,
sortContent,
resetContent,
} from '@plone/volto/actions/content/content';
export {
getControlpanel,
Expand Down
2 changes: 1 addition & 1 deletion src/components/manage/Add/Add.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import React, { Component } from 'react';
import PropTypes from 'prop-types';
import Helmet from 'react-helmet';
import { Helmet } from '@plone/volto/helpers';
import { connect } from 'react-redux';
import { compose } from 'redux';
import { keys } from 'lodash';
Expand Down
1 change: 1 addition & 0 deletions src/components/manage/Blocks/Image/Edit.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@ class Edit extends Component {
this.props.onChangeBlock(this.props.block, {
...this.props.data,
url: '',
align: '',
})
}
>
Expand Down
Loading

0 comments on commit de3bd83

Please sign in to comment.