@eeacms/volto-eea-website-policy 0.4.2 → 1.0.0

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.
@@ -2,7 +2,7 @@ const defaultBabel = require('@plone/volto/babel');
2
2
 
3
3
  function applyDefault(api) {
4
4
  const voltoBabel = defaultBabel(api);
5
- voltoBabel.plugins.push('@babel/plugin-transform-modules-commonjs', 'transform-class-properties', 'istanbul');
5
+ voltoBabel.plugins.push('istanbul');
6
6
  return voltoBabel;
7
7
  }
8
8
 
@@ -0,0 +1 @@
1
+ module.exports = require('@plone/volto/babel');
package/CHANGELOG.md CHANGED
@@ -4,11 +4,17 @@ All notable changes to this project will be documented in this file. Dates are d
4
4
 
5
5
  Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
6
6
 
7
- ### [0.4.2](https://github.com/eea/volto-eea-website-policy/compare/0.4.1...0.4.2) - 28 September 2022
7
+ ### [1.0.0](https://github.com/eea/volto-eea-website-policy/compare/0.4.2...1.0.0) - 28 October 2022
8
+
9
+ #### :nail_care: Enhancements
8
10
 
9
- #### :rocket: New Features
11
+ - refactor(cypress): Cypress 10 / Razzle 4 [Alin Voinea - [`12ab932`](https://github.com/eea/volto-eea-website-policy/commit/12ab932bd0e66c2990a5e02e04025c58f50fb1a9)]
12
+ - refactor(volto-slate): Upgrade to @plone/volto-slate - refs #153447 [Alin Voinea - [`e642f85`](https://github.com/eea/volto-eea-website-policy/commit/e642f85f2a57131c7a84dbc22f17e5c1a34a7dc2)]
10
13
 
11
- - feat(accordion): Most used - refs #148213 [Alin Voinea - [`46a160c`](https://github.com/eea/volto-eea-website-policy/commit/46a160c97ae958df2e14d684bd2f9133f8a8497d)]
14
+ #### :hammer_and_wrench: Others
15
+
16
+ - Cleanup [Alin Voinea - [`624f797`](https://github.com/eea/volto-eea-website-policy/commit/624f797b6ac4f46fb1a5699a22f966d0579953d3)]
17
+ ### [0.4.2](https://github.com/eea/volto-eea-website-policy/compare/0.4.1...0.4.2) - 28 September 2022
12
18
 
13
19
  ### [0.4.1](https://github.com/eea/volto-eea-website-policy/compare/0.4.0...0.4.1) - 28 September 2022
14
20
 
@@ -18,7 +24,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
18
24
 
19
25
  #### :hammer_and_wrench: Others
20
26
 
21
- - Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`d153f54`](https://github.com/eea/volto-eea-website-policy/commit/d153f54e55e918fa4746e05488c734624eaf14a9)]
22
27
  ### [0.4.0](https://github.com/eea/volto-eea-website-policy/compare/0.3.3...0.4.0) - 19 September 2022
23
28
 
24
29
  #### :hammer_and_wrench: Others
@@ -94,7 +99,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
94
99
  - format index.js [Andrei Grigore - [`db4481a`](https://github.com/eea/volto-eea-website-policy/commit/db4481aeeba59a769272659f33278c902fc69bec)]
95
100
  - Update index.js [Alexandru Ghica - [`dc09886`](https://github.com/eea/volto-eea-website-policy/commit/dc0988640a76a9914381b120f58bb61a9ab1eb39)]
96
101
  - Added externalRoutes [Alexandru Ghica - [`b68135b`](https://github.com/eea/volto-eea-website-policy/commit/b68135b013fafa93a41ea602ea2fad30879abe0f)]
97
- - Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`575cca6`](https://github.com/eea/volto-eea-website-policy/commit/575cca674602ca2e1c2a41300c47ba594ff49aa0)]
98
102
  ### [0.1.1](https://github.com/eea/volto-eea-website-policy/compare/0.1.0...0.1.1) - 4 March 2022
99
103
 
100
104
  #### :hammer_and_wrench: Others
@@ -107,5 +111,4 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
107
111
 
108
112
  #### :hammer_and_wrench: Others
109
113
 
110
- - yarn bootstrap [Alin Voinea - [`9b4d197`](https://github.com/eea/volto-eea-website-policy/commit/9b4d197cbc7992566cb36524d190078d5ad21a44)]
111
114
  - Initial commit [Alin Voinea - [`3800692`](https://github.com/eea/volto-eea-website-policy/commit/3800692f7a4de6460815bd6061facacb986cbef0)]
package/README.md CHANGED
@@ -23,28 +23,6 @@ EEA Main Website (Plone 6) [Volto](https://github.com/plone/volto) Frontend Poli
23
23
 
24
24
  ## Getting started
25
25
 
26
- ### Try volto-eea-website-policy with Docker
27
-
28
- 1. Get the latest Docker images
29
-
30
- ```
31
- docker pull plone
32
- docker pull plone/volto
33
- ```
34
-
35
- 1. Start Plone backend
36
- ```
37
- docker run -d --name plone -p 8080:8080 -e SITE=Plone eeacms/eea-website-backend
38
- ```
39
-
40
- 1. Start Volto frontend
41
-
42
- ```
43
- docker run -it --rm -p 3000:3000 --link plone -e ADDONS="@eeacms/volto-eea-website-policy" plone/volto
44
- ```
45
-
46
- 1. Go to http://localhost:3000
47
-
48
26
  ### Add volto-eea-website-policy to your Volto project
49
27
 
50
28
  1. Make sure you have a [Plone backend](https://plone.org/download) up-and-running at http://localhost:8080/Plone
package/babel.config.js CHANGED
@@ -1,6 +1,6 @@
1
1
  module.exports = function (api) {
2
2
  api.cache(true);
3
- const presets = ['razzle/babel'];
3
+ const presets = ['razzle'];
4
4
  const plugins = [
5
5
  [
6
6
  'react-intl', // React Intl extractor, required for the whole i18n infrastructure to work
@@ -0,0 +1,26 @@
1
+ const { defineConfig } = require('cypress');
2
+
3
+ module.exports = defineConfig({
4
+ viewportWidth: 1280,
5
+ defaultCommandTimeout: 8888,
6
+ chromeWebSecurity: false,
7
+ reporter: 'junit',
8
+ video: true,
9
+ retries: {
10
+ runMode: 8,
11
+ openMode: 0,
12
+ },
13
+ reporterOptions: {
14
+ mochaFile: 'cypress/reports/cypress-[hash].xml',
15
+ jenkinsMode: true,
16
+ toConsole: true,
17
+ },
18
+ e2e: {
19
+ setupNodeEvents(on, config) {
20
+ // e2e testing node events setup code
21
+ require('@cypress/code-coverage/task')(on, config);
22
+ return config;
23
+ },
24
+ baseUrl: 'http://localhost:3000',
25
+ },
26
+ });
@@ -12,16 +12,15 @@ module.exports = {
12
12
  '@root/(.*)$': '<rootDir>/src/$1',
13
13
  '@plone/volto-quanta/(.*)$': '<rootDir>/src/addons/volto-quanta/src/$1',
14
14
  '@eeacms/(.*?)/(.*)$': '<rootDir>/src/addons/$1/src/$2',
15
- 'volto-slate/(.*)$': '<rootDir>/src/addons/volto-slate/src/$1',
15
+ '@plone/volto-slate':
16
+ '<rootDir>/node_modules/@plone/volto/packages/volto-slate/src',
16
17
  '~/(.*)$': '<rootDir>/src/$1',
17
18
  'load-volto-addons':
18
19
  '<rootDir>/node_modules/@plone/volto/jest-addons-loader.js',
20
+ '\\.(css|less|scss|sass)$': 'identity-obj-proxy',
19
21
  },
20
22
  transform: {
21
23
  '^.+\\.js(x)?$': 'babel-jest',
22
- '^.+\\.css$': 'jest-css-modules',
23
- '^.+\\.less$': 'jest-css-modules',
24
- '^.+\\.scss$': 'jest-css-modules',
25
24
  '^.+\\.(png)$': 'jest-file',
26
25
  '^.+\\.(jpg)$': 'jest-file',
27
26
  '^.+\\.(svg)$': './node_modules/@plone/volto/jest-svgsystem-transform.js',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-eea-website-policy",
3
- "version": "0.4.2",
3
+ "version": "1.0.0",
4
4
  "description": "@eeacms/volto-eea-website-policy: Volto add-on",
5
5
  "main": "src/index.js",
6
6
  "author": "European Environment Agency: IDM2 A-Team",
@@ -16,32 +16,31 @@
16
16
  "type": "git",
17
17
  "url": "git@github.com:eea/volto-eea-website-policy.git"
18
18
  },
19
- "addons": [
20
- "volto-slate"
21
- ],
22
- "dependencies": {
23
- "@plone/scripts": "*",
24
- "volto-slate": "*"
25
- },
19
+ "addons": [],
20
+ "dependencies": {},
26
21
  "devDependencies": {
27
- "@cypress/code-coverage": "^3.9.5",
28
- "babel-plugin-transform-class-properties": "^6.24.1"
22
+ "@plone/scripts": "*",
23
+ "@cypress/code-coverage": "^3.10.0",
24
+ "babel-plugin-transform-class-properties": "^6.24.1",
25
+ "md5": "^2.3.0"
29
26
  },
30
27
  "scripts": {
31
28
  "release": "release-it",
29
+ "release-major-beta": "release-it major --preRelease=beta",
30
+ "release-beta": "release-it --preRelease=beta",
32
31
  "bootstrap": "npm install -g ejs; npm link ejs; node bootstrap",
33
32
  "test": "make test",
34
33
  "test:fix": "make test-update",
35
34
  "pre-commit": "yarn stylelint:fix && yarn prettier:fix && yarn lint:fix",
36
- "stylelint": "if [ -d ./project ]; then ./project/node_modules/stylelint/bin/stylelint.js --allow-empty-input 'src/**/*.{css,less}'; else ../../../node_modules/stylelint/bin/stylelint.js --allow-empty-input 'src/**/*.{css,less}'; fi",
37
- "stylelint:overrides": "if [ -d ./project ]; then ./project/node_modules/.bin/stylelint --syntax less --allow-empty-input 'theme/**/*.overrides' 'src/**/*.overrides'; else ../../../node_modules/.bin/stylelint --syntax less --allow-empty-input 'theme/**/*.overrides' 'src/**/*.overrides'; fi",
38
- "stylelint:fix": "yarn stylelint --fix && yarn stylelint:overrides --fix",
39
- "prettier": "if [ -d ./project ]; then ./project/node_modules/.bin/prettier --single-quote --check 'src/**/*.{js,jsx,json,css,less,md}'; else ../../../node_modules/.bin/prettier --single-quote --check 'src/**/*.{js,jsx,json,css,less,md}'; fi",
40
- "prettier:fix": "if [ -d ./project ]; then ./project/node_modules/.bin/prettier --single-quote --write 'src/**/*.{js,jsx,json,css,less,md}'; else ../../../node_modules/.bin/prettier --single-quote --write 'src/**/*.{js,jsx,json,css,less,md}'; fi",
41
- "lint": "if [ -d ./project ]; then ./project/node_modules/eslint/bin/eslint.js --max-warnings=0 'src/**/*.{js,jsx}'; else ../../../node_modules/eslint/bin/eslint.js --max-warnings=0 'src/**/*.{js,jsx}'; fi",
42
- "lint:fix": "if [ -d ./project ]; then ./project/node_modules/eslint/bin/eslint.js --fix 'src/**/*.{js,jsx}'; else ../../../node_modules/eslint/bin/eslint.js --fix 'src/**/*.{js,jsx}'; fi",
43
- "i18n": "rm -rf build/messages && NODE_ENV=production i18n --addon",
44
- "cypress:run": "if [ -d ./project ]; then NODE_ENV=development ./project/node_modules/cypress/bin/cypress run; else NODE_ENV=development ../../../node_modules/cypress/bin/cypress run; fi",
45
- "cypress:open": "if [ -d ./project ]; then NODE_ENV=development ./project/node_modules/cypress/bin/cypress open; else NODE_ENV=development ../../../node_modules/cypress/bin/cypress open; fi"
35
+ "stylelint": "make stylelint",
36
+ "stylelint:overrides": "make stylelint-overrides",
37
+ "stylelint:fix": "make stylelint-fix",
38
+ "prettier": "make prettier",
39
+ "prettier:fix": "make prettier-fix",
40
+ "lint": "make lint",
41
+ "lint:fix": "make lint-fix",
42
+ "i18n": "make i18n",
43
+ "cypress:run": "make cypress-run",
44
+ "cypress:open": "make cypress-open"
46
45
  }
47
46
  }
package/src/helpers.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { isArray } from 'lodash';
2
2
  import config from '@plone/volto/registry';
3
- import { serializeNodes } from 'volto-slate/editor/render';
3
+ import { serializeNodes } from '@plone/volto-slate/editor/render';
4
4
 
5
5
  export const createSlateParagraph = (text) => {
6
6
  return isArray(text) ? text : config.settings.slate.defaultValue();
package/src/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { runtimeConfig } from '@plone/volto/runtime_config';
2
- import installCallout from 'volto-slate/editor/plugins/Callout';
2
+ import installCallout from '@plone/volto-slate/editor/plugins/Callout';
3
3
  import installContextNavigationBlock from '@eeacms/volto-eea-website-policy/components/Blocks/ContextNavigation';
4
4
 
5
5
  const applyConfig = (config) => {
package/cypress.json DELETED
@@ -1,17 +0,0 @@
1
- {
2
- "baseUrl": "http://localhost:3000",
3
- "viewportWidth": 1280,
4
- "defaultCommandTimeout": 8888,
5
- "chromeWebSecurity": false,
6
- "reporter": "junit",
7
- "video": true,
8
- "retries": {
9
- "runMode": 8,
10
- "openMode": 0
11
- },
12
- "reporterOptions": {
13
- "mochaFile": "cypress/reports/cypress-[hash].xml",
14
- "jenkinsMode": true,
15
- "toConsole": true
16
- }
17
- }