@eeacms/volto-timeline-block 1.1.2 → 1.1.4

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.
@@ -0,0 +1,2 @@
1
+ [ -n "$CI" ] && exit 0
2
+ yarn lint-staged
package/CHANGELOG.md CHANGED
@@ -4,6 +4,33 @@ 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
+ ### [1.1.4](https://github.com/eea/volto-timeline-block/compare/1.1.3...1.1.4) - 13 October 2023
8
+
9
+ #### :house: Internal changes
10
+
11
+ - chore:volto 16 in tests, update docs, fix stylelint overrides [valentinab25 - [`1b52c95`](https://github.com/eea/volto-timeline-block/commit/1b52c95638cc07e47b2b5e2b8dd29a0e490fe45e)]
12
+
13
+ #### :hammer_and_wrench: Others
14
+
15
+ - Update README [Cretu Mihaela - [`512d7aa`](https://github.com/eea/volto-timeline-block/commit/512d7aaafe7785c77b0db10b54fbdab3e0d97f0c)]
16
+ ### [1.1.3](https://github.com/eea/volto-timeline-block/compare/1.1.2...1.1.3) - 29 September 2023
17
+
18
+ #### :house: Internal changes
19
+
20
+ - style: lint-staged reorder in package.json [Alin Voinea - [`6689916`](https://github.com/eea/volto-timeline-block/commit/6689916e882299e8a18d4aa2d1a98e46e140cf54)]
21
+
22
+ #### :house: Documentation changes
23
+
24
+ - docs: Update README and DEVELOP [Alin Voinea - [`21e9ea6`](https://github.com/eea/volto-timeline-block/commit/21e9ea6989981a45395d3f8870fa2258187456ad)]
25
+ - docs: Cleanup Makefile, update DEVELOP documentation, i18n - refs #254894 [valentinab25 - [`8e0caf1`](https://github.com/eea/volto-timeline-block/commit/8e0caf1d0159eba30a65c9cff2b9499808264b1b)]
26
+
27
+ #### :hammer_and_wrench: Others
28
+
29
+ - test: EN locales, pre-commit fix, feature PRs checks Refs #257193 [valentinab25 - [`5779269`](https://github.com/eea/volto-timeline-block/commit/57792695b924b453f6069f4e700865ab9dc42623)]
30
+ - test: Add cypress test for timeline in DX Layout - refs #254894 [Crețu Mihaela - [`f144abd`](https://github.com/eea/volto-timeline-block/commit/f144abd41e77557cac5308b248d825b24c95893f)]
31
+ - i18n: Add en [Alin Voinea - [`eb85ad0`](https://github.com/eea/volto-timeline-block/commit/eb85ad074e8dfe027c4751ed4e7b99bf727ddc70)]
32
+ - test: Update Makefile and docker-compose to align it with Jenkinsfile [valentinab25 - [`2c84c80`](https://github.com/eea/volto-timeline-block/commit/2c84c80259b0d1aeaa397b80a563c4d863d6755f)]
33
+ - Add Sonarqube tag using freshwater-frontend addons list [EEA Jenkins - [`31e6132`](https://github.com/eea/volto-timeline-block/commit/31e613228a5a4ad1253914671bfb37b162b5c3a9)]
7
34
  ### [1.1.2](https://github.com/eea/volto-timeline-block/compare/1.1.1...1.1.2) - 24 July 2023
8
35
 
9
36
  ### [1.1.1](https://github.com/eea/volto-timeline-block/compare/1.1.0...1.1.1) - 12 June 2023
package/DEVELOP.md CHANGED
@@ -2,6 +2,30 @@
2
2
 
3
3
  ## Develop
4
4
 
5
+ 1. Make sure you have `docker` and `docker compose` installed and running on your machine:
6
+
7
+ ```Bash
8
+ git clone https://github.com/eea/volto-timeline-block.git
9
+ cd volto-timeline-block
10
+ git checkout -b bugfix-123456 develop
11
+ make
12
+ make start
13
+ ```
14
+
15
+ 1. Wait for `Volto started at 0.0.0.0:3000` meesage
16
+
17
+ 1. Go to http://localhost:3000
18
+
19
+ 1. Initialize git hooks
20
+
21
+ ```Bash
22
+ yarn prepare
23
+ ```
24
+
25
+ 1. Happy hacking!
26
+
27
+ ### Or add @eeacms/volto-timeline-block to your Volto project
28
+
5
29
  Before starting make sure your development environment is properly set. See [Volto Developer Documentation](https://docs.voltocms.com/getting-started/install/)
6
30
 
7
31
  1. Make sure you have installed `yo`, `@plone/generator-volto` and `mrs-developer`
@@ -26,18 +50,15 @@ Before starting make sure your development environment is properly set. See [Vol
26
50
 
27
51
  1. Install
28
52
 
29
- yarn develop
53
+ make develop
30
54
  yarn
31
55
 
32
56
  1. Start backend
33
57
 
34
- docker pull plone
35
- docker run -d --name plone -p 8080:8080 -e SITE=Plone -e PROFILES="profile-plone.restapi:blocks" plone
58
+ docker run --pull always -it --rm --name plone -p 8080:8080 -e SITE=Plone plone/plone-backend
36
59
 
37
60
  ...wait for backend to setup and start - `Ready to handle requests`:
38
61
 
39
- docker logs -f plone
40
-
41
62
  ...you can also check http://localhost:8080/Plone
42
63
 
43
64
  1. Start frontend
@@ -49,3 +70,37 @@ Before starting make sure your development environment is properly set. See [Vol
49
70
  1. Happy hacking!
50
71
 
51
72
  cd src/addons/volto-timeline-block/
73
+
74
+ ## Cypress
75
+
76
+ To run cypress locally, first make sure you don't have any Volto/Plone running on ports `8080` and `3000`.
77
+
78
+ You don't have to be in a `clean-volto-project`, you can be in any Volto Frontend
79
+ project where you added `volto-timeline-block` to `mrs.developer.json`
80
+
81
+ Go to:
82
+
83
+ ```BASH
84
+ cd src/addons/volto-timeline-block/
85
+ ```
86
+
87
+ Start:
88
+
89
+ ```Bash
90
+ make
91
+ make start
92
+ ```
93
+
94
+ This will build and start with Docker a clean `Plone backend` and `Volto Frontend` with `volto-timeline-block` block installed.
95
+
96
+ Open Cypress Interface:
97
+
98
+ ```Bash
99
+ make cypress-open
100
+ ```
101
+
102
+ Or run it:
103
+
104
+ ```Bash
105
+ make cypress-run
106
+ ```
package/README.md CHANGED
@@ -19,38 +19,28 @@
19
19
 
20
20
  ## Features
21
21
 
22
- ![Timeline Block](https://github.com/eea/volto-timeline-block/raw/develop/docs/timeline-block.png)
23
- ![Timeline Block Demo](https://github.com/eea/volto-timeline-block/raw/docs/docs/volto-timeline.gif)
24
-
22
+ ![Timeline Block](https://github.com/eea/volto-timeline-block/raw/master/docs/timeline-block.png)
23
+ ![Timeline Block Demo](https://github.com/eea/volto-timeline-block/raw/master/docs/volto-timeline.gif)
25
24
 
26
25
  ## Getting started
27
26
 
28
27
  ### Try volto-timeline-block with Docker
29
28
 
30
- 1. Get the latest Docker images
31
-
32
- ```
33
- docker pull plone
34
- docker pull plone/volto
35
- ```
36
-
37
- 1. Start Plone backend
38
- ```
39
- docker run -d --name plone -p 8080:8080 -e SITE=Plone -e PROFILES="profile-plone.restapi:blocks" plone
40
- ```
41
-
42
- 1. Start Volto frontend
43
-
44
- ```
45
- docker run -it --rm -p 3000:3000 --link plone -e ADDONS="@eeacms/volto-timeline-block" plone/volto
46
- ```
29
+ git clone https://github.com/eea/volto-timeline-block.git
30
+ cd volto-timeline-block
31
+ make
32
+ make start
47
33
 
48
- 1. Go to http://localhost:3000
34
+ Go to http://localhost:3000
49
35
 
50
36
  ### Add volto-timeline-block to your Volto project
51
37
 
52
38
  1. Make sure you have a [Plone backend](https://plone.org/download) up-and-running at http://localhost:8080/Plone
53
39
 
40
+ ```Bash
41
+ docker compose up backend
42
+ ```
43
+
54
44
  1. Start Volto frontend
55
45
 
56
46
  * If you already have a volto project, just update `package.json`:
@@ -61,7 +51,7 @@
61
51
  ],
62
52
 
63
53
  "dependencies": {
64
- "@eeacms/volto-timeline-block": "^1.0.0"
54
+ "@eeacms/volto-timeline-block": "*"
65
55
  }
66
56
  ```
67
57
 
@@ -69,7 +59,7 @@
69
59
 
70
60
  ```
71
61
  npm install -g yo @plone/generator-volto
72
- yo @plone/volto my-volto-project --addon @eeacms/volto-timeline-block
62
+ yo @plone/volto my-volto-project --canary --addon @eeacms/volto-timeline-block
73
63
  cd my-volto-project
74
64
  ```
75
65
 
@@ -102,4 +92,3 @@ See [LICENSE.md](https://github.com/eea/volto-timeline-block/blob/master/LICENSE
102
92
  ## Funding
103
93
 
104
94
  [European Environment Agency (EU)](http://eea.europa.eu)
105
-
package/RELEASE.md CHANGED
@@ -20,9 +20,9 @@ You need to first install the [release-it](https://github.com/release-it/release
20
20
  ```
21
21
  npm install -g release-it
22
22
  ```
23
-
23
+
24
24
  Release-it uses the configuration written in the [`.release-it.json`](./.release-it.json) file located in the root of the repository.
25
-
25
+
26
26
  Release-it is a tool that automates 4 important steps in the release process:
27
27
 
28
28
  1. Version increase in `package.json` ( increased from the current version in `package.json`)
@@ -30,45 +30,45 @@ Release-it is a tool that automates 4 important steps in the release process:
30
30
  3. GitHub release on the commit with the changelog and package.json modification on the develop branch
31
31
  4. NPM release ( by default it's disabled, but can be enabled in the configuration file )
32
32
 
33
- To configure the authentification, you need to export GITHUB_TOKEN for [GitHub](https://github.com/settings/tokens)
33
+ To configure the authentification, you need to export GITHUB_TOKEN for [GitHub](https://github.com/settings/tokens)
34
34
 
35
35
  ```
36
36
  export GITHUB_TOKEN=XXX-XXXXXXXXXXXXXXXXXXXXXX
37
37
  ```
38
-
38
+
39
39
  To configure npm, you can use the `npm login` command or use a configuration file with a TOKEN :
40
-
40
+
41
41
  ```
42
42
  echo "//registry.npmjs.org/:_authToken=YYYYYYYYYYYYYYYYYYYYYYYYYYYYYY" > .npmrc
43
43
  ```
44
44
 
45
45
  #### Using release-it tool
46
-
46
+
47
47
  There are 3 yarn scripts that can be run to do the release
48
48
 
49
49
  ##### yarn release-beta
50
50
 
51
- Automatically calculates and presents 3 beta versions - patch, minor and major for you to choose ( or Other for manual input).
51
+ Automatically calculates and presents 3 beta versions - patch, minor and major for you to choose ( or Other for manual input).
52
52
 
53
53
  ```
54
- ? Select increment (next version):
55
- ❯ prepatch (0.1.1-beta.0)
56
- preminor (0.2.0-beta.0)
57
- premajor (1.0.0-beta.0)
58
- Other, please specify...
54
+ ? Select increment (next version):
55
+ ❯ prepatch (0.1.1-beta.0)
56
+ preminor (0.2.0-beta.0)
57
+ premajor (1.0.0-beta.0)
58
+ Other, please specify...
59
59
  ```
60
60
 
61
61
  ##### yarn release-major-beta
62
62
 
63
63
  Same as `yarn release-beta`, but with premajor version pre-selected.
64
-
64
+
65
65
  ##### yarn release
66
66
 
67
67
  Generic command, does not automatically add the `beta` to version, but you can still manually write it if you choose Other.
68
68
 
69
69
  #### Important notes
70
70
 
71
- > Do not use release-it tool on master branch, the commit on CHANGELOG.md file and the version increase in the package.json file can't be done without a PULL REQUEST.
71
+ > Do not use release-it tool on master branch, the commit on CHANGELOG.md file and the version increase in the package.json file can't be done without a PULL REQUEST.
72
72
 
73
73
  > Do not keep Pull Requests from develop to master branches open when you are doing beta releases from the develop branch. As long as a PR to master is open, an automatic script will run on every commit and will update both the version and the changelog to a production-ready state - ( MAJOR.MINOR.PATCH mandatory format for version).
74
74
 
package/cypress.config.js CHANGED
@@ -2,12 +2,12 @@ const { defineConfig } = require('cypress');
2
2
 
3
3
  module.exports = defineConfig({
4
4
  viewportWidth: 1280,
5
- defaultCommandTimeout: 8888,
5
+ defaultCommandTimeout: 5000,
6
6
  chromeWebSecurity: false,
7
7
  reporter: 'junit',
8
8
  video: true,
9
9
  retries: {
10
- runMode: 8,
10
+ runMode: 1,
11
11
  openMode: 0,
12
12
  },
13
13
  reporterOptions: {
@@ -0,0 +1,32 @@
1
+ version: "3"
2
+ services:
3
+ backend:
4
+ image: eeacms/plone-backend
5
+ ports:
6
+ - "8080:8080"
7
+ environment:
8
+ SITE: "Plone"
9
+ PROFILES: "eea.kitkat:testing"
10
+
11
+ frontend:
12
+ build:
13
+ context: ./
14
+ dockerfile: ./Dockerfile
15
+ args:
16
+ ADDON_NAME: "${ADDON_NAME}"
17
+ ADDON_PATH: "${ADDON_PATH}"
18
+ VOLTO_VERSION: ${VOLTO_VERSION:-16}
19
+ ports:
20
+ - "3000:3000"
21
+ - "3001:3001"
22
+ depends_on:
23
+ - backend
24
+ volumes:
25
+ - ./:/app/src/addons/${ADDON_PATH}
26
+ environment:
27
+ CI: "true"
28
+ NODE_ENV: "development"
29
+ RAZZLE_JEST_CONFIG: "src/addons/${ADDON_PATH}/jest-addon.config.js"
30
+ RAZZLE_INTERNAL_API_PATH: "http://backend:8080/Plone"
31
+ RAZZLE_DEV_PROXY_API_PATH: "http://backend:8080/Plone"
32
+ HOST: "0.0.0.0"
@@ -0,0 +1,14 @@
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: \n"
4
+ "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: \n"
6
+ "PO-Revision-Date: \n"
7
+ "Last-Translator: \n"
8
+ "Language: \n"
9
+ "Language-Team: \n"
10
+ "Content-Type: \n"
11
+ "Content-Transfer-Encoding: \n"
12
+ "Plural-Forms: \n"
13
+
14
+
@@ -0,0 +1,14 @@
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: \n"
4
+ "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: \n"
6
+ "PO-Revision-Date: \n"
7
+ "Last-Translator: \n"
8
+ "Language: \n"
9
+ "Language-Team: \n"
10
+ "Content-Type: \n"
11
+ "Content-Transfer-Encoding: \n"
12
+ "Plural-Forms: \n"
13
+
14
+
@@ -0,0 +1,14 @@
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: \n"
4
+ "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: \n"
6
+ "PO-Revision-Date: \n"
7
+ "Last-Translator: \n"
8
+ "Language: \n"
9
+ "Language-Team: \n"
10
+ "Content-Type: \n"
11
+ "Content-Transfer-Encoding: \n"
12
+ "Plural-Forms: \n"
13
+
14
+
@@ -0,0 +1,14 @@
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: \n"
4
+ "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: \n"
6
+ "PO-Revision-Date: \n"
7
+ "Last-Translator: \n"
8
+ "Language: \n"
9
+ "Language-Team: \n"
10
+ "Content-Type: \n"
11
+ "Content-Transfer-Encoding: \n"
12
+ "Plural-Forms: \n"
13
+
14
+
package/locales/volto.pot CHANGED
@@ -0,0 +1,16 @@
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: Plone\n"
4
+ "POT-Creation-Date: 2023-06-28T10:48:22.678Z\n"
5
+ "Last-Translator: Plone i18n <plone-i18n@lists.sourceforge.net>\n"
6
+ "Language-Team: Plone i18n <plone-i18n@lists.sourceforge.net>\n"
7
+ "MIME-Version: 1.0\n"
8
+ "Content-Type: text/plain; charset=utf-8\n"
9
+ "Content-Transfer-Encoding: 8bit\n"
10
+ "Plural-Forms: nplurals=1; plural=0;\n"
11
+ "Language-Code: en\n"
12
+ "Language-Name: English\n"
13
+ "Preferred-Encodings: utf-8\n"
14
+ "Domain: volto\n"
15
+
16
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-timeline-block",
3
- "version": "1.1.2",
3
+ "version": "1.1.4",
4
4
  "description": "@eeacms/volto-timeline-block: Volto add-on",
5
5
  "main": "src/index.js",
6
6
  "author": "European Environment Agency: IDM2 A-Team",
@@ -20,8 +20,31 @@
20
20
  "@cypress/code-coverage": "^3.10.0",
21
21
  "@plone/scripts": "*",
22
22
  "babel-plugin-transform-class-properties": "^6.24.1",
23
+ "husky": "*",
24
+ "lint-staged": "*",
23
25
  "md5": "^2.3.0"
24
26
  },
27
+ "lint-staged": {
28
+ "src/**/*.{js,jsx,ts,tsx,json}": [
29
+ "make lint-fix",
30
+ "make prettier-fix"
31
+ ],
32
+ "src/**/*.{jsx}": [
33
+ "make i18n"
34
+ ],
35
+ "theme/**/*.{css,less}": [
36
+ "make stylelint-fix"
37
+ ],
38
+ "src/**/*.{css,less}": [
39
+ "make stylelint-fix"
40
+ ],
41
+ "theme/**/*.overrides": [
42
+ "make stylelint-fix"
43
+ ],
44
+ "src/**/*.overrides": [
45
+ "make stylelint-fix"
46
+ ]
47
+ },
25
48
  "scripts": {
26
49
  "release": "release-it",
27
50
  "release-major-beta": "release-it major --preRelease=beta",
@@ -39,6 +62,7 @@
39
62
  "lint:fix": "make lint-fix",
40
63
  "i18n": "make i18n",
41
64
  "cypress:run": "make cypress-run",
42
- "cypress:open": "make cypress-open"
65
+ "cypress:open": "make cypress-open",
66
+ "prepare": "husky install"
43
67
  }
44
68
  }
@@ -1 +0,0 @@
1
- module.exports = require('@plone/volto/babel');