@eeacms/volto-citation 0.1.3 → 0.1.5

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,41 @@ 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.1.5](https://github.com/eea/volto-citation/compare/0.1.4...0.1.5) - 17 January 2024
8
+
9
+ #### :house: Internal changes
10
+
11
+ - chore: [JENKINS] Refactor automated testing [valentinab25 - [`6571949`](https://github.com/eea/volto-citation/commit/6571949941593affae952a5e2539182c8937a89d)]
12
+ - chore: husky, lint-staged use fixed versions [valentinab25 - [`fe169f6`](https://github.com/eea/volto-citation/commit/fe169f675d540495272d60469024082aa5077095)]
13
+ - chore:volto 16 in tests, update docs, fix stylelint overrides [valentinab25 - [`79683d8`](https://github.com/eea/volto-citation/commit/79683d85b71803b96ef31b754bede458f7001c50)]
14
+
15
+ #### :hammer_and_wrench: Others
16
+
17
+ - test: [JENKINS] Use java17 for sonarqube scanner [valentinab25 - [`e5725a1`](https://github.com/eea/volto-citation/commit/e5725a1c8b9d7a5d0574a40fe785015db99ef33a)]
18
+ - test: [JENKINS] Run cypress in started frontend container [valentinab25 - [`2196015`](https://github.com/eea/volto-citation/commit/2196015f5752129aebc5e35e0df465e070b9a09f)]
19
+ - test: [JENKINS] Add cpu limit on cypress docker [valentinab25 - [`e0b9cf2`](https://github.com/eea/volto-citation/commit/e0b9cf2f1a8a20f4ab32ee357f6a1bab2637c9b1)]
20
+ - test: [JENKINS] Increase shm-size to cypress docker [valentinab25 - [`dca3755`](https://github.com/eea/volto-citation/commit/dca375521c18d1d6fb64ece80ddb9a1db7f166f5)]
21
+ - test: [JENKINS] Improve cypress time [valentinab25 - [`7100915`](https://github.com/eea/volto-citation/commit/7100915a460506b44ead3295a220c0ec9caa6279)]
22
+ ### [0.1.4](https://github.com/eea/volto-citation/compare/0.1.3...0.1.4) - 29 September 2023
23
+
24
+ #### :house: Internal changes
25
+
26
+ - style: lint-staged reorder in package.json [Alin Voinea - [`b05d983`](https://github.com/eea/volto-citation/commit/b05d983e283811a20679c44254c55e549462028a)]
27
+
28
+ #### :house: Documentation changes
29
+
30
+ - docs: Update README and DEVELOP [Alin Voinea - [`7cdf143`](https://github.com/eea/volto-citation/commit/7cdf14349b4f08f09acb5b57525c79d307d1b254)]
31
+ - docs: Update README and DEVELOP [Alin Voinea - [`a124382`](https://github.com/eea/volto-citation/commit/a1243827ef8a4ad7d4f804af8a8d05f96f59c477)]
32
+
33
+ #### :hammer_and_wrench: Others
34
+
35
+ - test: EN locales, pre-commit fix, feature PRs checks Refs #257193 [valentinab25 - [`adbc1b5`](https://github.com/eea/volto-citation/commit/adbc1b5359b70e16510b764eb42c1c52778536ab)]
36
+ - test: Fix eslint and yarn i18n [Alin Voinea - [`d8f5cd1`](https://github.com/eea/volto-citation/commit/d8f5cd1fab04c42e354af4ecd640e2f9d1202e38)]
37
+ - i18n: Add en [Alin Voinea - [`9100e04`](https://github.com/eea/volto-citation/commit/9100e04e4de63f607a3867eaf45161b90d0985be)]
38
+ - test: Update Makefile and docker-compose to align it with Jenkinsfile [valentinab25 - [`766a456`](https://github.com/eea/volto-citation/commit/766a456f3ab988aa916feaae5fab9f2f894390fe)]
39
+ - Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`44b2af5`](https://github.com/eea/volto-citation/commit/44b2af58fe025442100ef0c52c45154b2d74e267)]
40
+ - Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`8f0a7e2`](https://github.com/eea/volto-citation/commit/8f0a7e2713a1a2a7ecf34bd3f7dc23e61b815283)]
41
+ - Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`c2597b9`](https://github.com/eea/volto-citation/commit/c2597b9778a2515e0b015b39a983add268f5c29a)]
7
42
  ### [0.1.3](https://github.com/eea/volto-citation/compare/0.1.2...0.1.3) - 3 August 2023
8
43
 
9
44
  #### :house: Documentation changes
package/DEVELOP.md CHANGED
@@ -16,12 +16,14 @@
16
16
 
17
17
  1. Go to http://localhost:3000
18
18
 
19
- 1. Happy hacking!
19
+ 1. Initialize git hooks
20
20
 
21
21
  ```Bash
22
- cd src/addons/volto-citation/
22
+ yarn prepare
23
23
  ```
24
24
 
25
+ 1. Happy hacking!
26
+
25
27
  ### Or add @eeacms/volto-citation to your Volto project
26
28
 
27
29
  Before starting make sure your development environment is properly set. See [Volto Developer Documentation](https://docs.voltocms.com/getting-started/install/)
@@ -48,18 +50,15 @@ Before starting make sure your development environment is properly set. See [Vol
48
50
 
49
51
  1. Install
50
52
 
51
- yarn develop
53
+ make develop
52
54
  yarn
53
55
 
54
56
  1. Start backend
55
57
 
56
- docker pull plone
57
- 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
58
59
 
59
60
  ...wait for backend to setup and start - `Ready to handle requests`:
60
61
 
61
- docker logs -f plone
62
-
63
62
  ...you can also check http://localhost:8080/Plone
64
63
 
65
64
  1. Start frontend
package/README.md CHANGED
@@ -19,7 +19,7 @@
19
19
 
20
20
  ## Features
21
21
 
22
- ![screen-capture](https://github.com/eea/volto-citation/assets/50819975/3aa06125-6736-4e64-9ede-9006b6219ec9)
22
+ ![screen-capture](https://raw.githubusercontent.com/eea/volto-citation/master/docs/volto-citation.gif)
23
23
 
24
24
  Volto Citation shows users how to cite an article. It supports four types of citation: HTML, TEXT, RIS and BibTeX. On top of that you can copy the citation by pressing on the copy button
25
25
 
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
@@ -5,9 +5,9 @@ module.exports = defineConfig({
5
5
  defaultCommandTimeout: 8888,
6
6
  chromeWebSecurity: false,
7
7
  reporter: 'junit',
8
- video: true,
8
+ video: false,
9
9
  retries: {
10
- runMode: 8,
10
+ runMode: 2,
11
11
  openMode: 0,
12
12
  },
13
13
  reporterOptions: {
@@ -1,11 +1,12 @@
1
1
  version: "3"
2
2
  services:
3
3
  backend:
4
- image: plone/plone-backend:${PLONE_VERSION:-6}
4
+ image: eeacms/plone-backend
5
5
  ports:
6
6
  - "8080:8080"
7
7
  environment:
8
8
  SITE: "Plone"
9
+ PROFILES: "eea.kitkat:testing"
9
10
 
10
11
  frontend:
11
12
  build:
@@ -23,6 +24,9 @@ services:
23
24
  volumes:
24
25
  - ./:/app/src/addons/${ADDON_PATH}
25
26
  environment:
27
+ CI: "true"
28
+ NODE_ENV: "development"
29
+ RAZZLE_JEST_CONFIG: "src/addons/${ADDON_PATH}/jest-addon.config.js"
26
30
  RAZZLE_INTERNAL_API_PATH: "http://backend:8080/Plone"
27
31
  RAZZLE_DEV_PROXY_API_PATH: "http://backend:8080/Plone"
28
32
  HOST: "0.0.0.0"
@@ -11,4 +11,63 @@ msgstr ""
11
11
  "Content-Transfer-Encoding: \n"
12
12
  "Plural-Forms: \n"
13
13
 
14
+ #: schema
15
+ # defaultMessage: The authors that have contributed to the article
16
+ msgid "AauthorsDescription"
17
+ msgstr ""
18
+
19
+ #: schema
20
+ # defaultMessage: One of the authors
21
+ msgid "AuthorDescription"
22
+ msgstr ""
23
+
24
+ #: Citation/CitationSidebar
25
+ #: schema
26
+ # defaultMessage: Citation
27
+ msgid "Citation"
28
+ msgstr ""
29
+
30
+ #: Citation/CitationSidebar
31
+ # defaultMessage: No Citation selected
32
+ msgid "No Citation selected"
33
+ msgstr ""
34
+
35
+ #: schema
36
+ # defaultMessage: The title of the article
37
+ msgid "TitleDescription"
38
+ msgstr ""
39
+
40
+ #: schema
41
+ # defaultMessage: URL
42
+ msgid "URL"
43
+ msgstr ""
14
44
 
45
+ #: schema
46
+ # defaultMessage: The url where the article can be found
47
+ msgid "URLDescription"
48
+ msgstr ""
49
+
50
+ #: schema
51
+ # defaultMessage: The year when the article was published
52
+ msgid "YearDescription"
53
+ msgstr ""
54
+
55
+ #: schema
56
+ # defaultMessage: Author
57
+ msgid "author"
58
+ msgstr ""
59
+
60
+ #: schema
61
+ # defaultMessage: Authors
62
+ msgid "authors"
63
+ msgstr ""
64
+
65
+ #: schema
66
+ # defaultMessage: Title
67
+ msgid "title"
68
+ msgstr ""
69
+
70
+ #: schema
71
+ # defaultMessage: Year
72
+ msgid "year"
73
+ msgstr ""
@@ -0,0 +1,73 @@
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
+ #: schema
15
+ # defaultMessage: The authors that have contributed to the article
16
+ msgid "AauthorsDescription"
17
+ msgstr ""
18
+
19
+ #: schema
20
+ # defaultMessage: One of the authors
21
+ msgid "AuthorDescription"
22
+ msgstr ""
23
+
24
+ #: Citation/CitationSidebar
25
+ #: schema
26
+ # defaultMessage: Citation
27
+ msgid "Citation"
28
+ msgstr ""
29
+
30
+ #: Citation/CitationSidebar
31
+ # defaultMessage: No Citation selected
32
+ msgid "No Citation selected"
33
+ msgstr ""
34
+
35
+ #: schema
36
+ # defaultMessage: The title of the article
37
+ msgid "TitleDescription"
38
+ msgstr ""
39
+
40
+ #: schema
41
+ # defaultMessage: URL
42
+ msgid "URL"
43
+ msgstr ""
44
+
45
+ #: schema
46
+ # defaultMessage: The url where the article can be found
47
+ msgid "URLDescription"
48
+ msgstr ""
49
+
50
+ #: schema
51
+ # defaultMessage: The year when the article was published
52
+ msgid "YearDescription"
53
+ msgstr ""
54
+
55
+ #: schema
56
+ # defaultMessage: Author
57
+ msgid "author"
58
+ msgstr ""
59
+
60
+ #: schema
61
+ # defaultMessage: Authors
62
+ msgid "authors"
63
+ msgstr ""
64
+
65
+ #: schema
66
+ # defaultMessage: Title
67
+ msgid "title"
68
+ msgstr ""
69
+
70
+ #: schema
71
+ # defaultMessage: Year
72
+ msgid "year"
73
+ msgstr ""
@@ -11,4 +11,63 @@ msgstr ""
11
11
  "Content-Transfer-Encoding: \n"
12
12
  "Plural-Forms: \n"
13
13
 
14
+ #: schema
15
+ # defaultMessage: The authors that have contributed to the article
16
+ msgid "AauthorsDescription"
17
+ msgstr ""
18
+
19
+ #: schema
20
+ # defaultMessage: One of the authors
21
+ msgid "AuthorDescription"
22
+ msgstr ""
23
+
24
+ #: Citation/CitationSidebar
25
+ #: schema
26
+ # defaultMessage: Citation
27
+ msgid "Citation"
28
+ msgstr ""
29
+
30
+ #: Citation/CitationSidebar
31
+ # defaultMessage: No Citation selected
32
+ msgid "No Citation selected"
33
+ msgstr ""
34
+
35
+ #: schema
36
+ # defaultMessage: The title of the article
37
+ msgid "TitleDescription"
38
+ msgstr ""
39
+
40
+ #: schema
41
+ # defaultMessage: URL
42
+ msgid "URL"
43
+ msgstr ""
14
44
 
45
+ #: schema
46
+ # defaultMessage: The url where the article can be found
47
+ msgid "URLDescription"
48
+ msgstr ""
49
+
50
+ #: schema
51
+ # defaultMessage: The year when the article was published
52
+ msgid "YearDescription"
53
+ msgstr ""
54
+
55
+ #: schema
56
+ # defaultMessage: Author
57
+ msgid "author"
58
+ msgstr ""
59
+
60
+ #: schema
61
+ # defaultMessage: Authors
62
+ msgid "authors"
63
+ msgstr ""
64
+
65
+ #: schema
66
+ # defaultMessage: Title
67
+ msgid "title"
68
+ msgstr ""
69
+
70
+ #: schema
71
+ # defaultMessage: Year
72
+ msgid "year"
73
+ msgstr ""
@@ -11,4 +11,63 @@ msgstr ""
11
11
  "Content-Transfer-Encoding: \n"
12
12
  "Plural-Forms: \n"
13
13
 
14
+ #: schema
15
+ # defaultMessage: The authors that have contributed to the article
16
+ msgid "AauthorsDescription"
17
+ msgstr ""
18
+
19
+ #: schema
20
+ # defaultMessage: One of the authors
21
+ msgid "AuthorDescription"
22
+ msgstr ""
23
+
24
+ #: Citation/CitationSidebar
25
+ #: schema
26
+ # defaultMessage: Citation
27
+ msgid "Citation"
28
+ msgstr ""
29
+
30
+ #: Citation/CitationSidebar
31
+ # defaultMessage: No Citation selected
32
+ msgid "No Citation selected"
33
+ msgstr ""
34
+
35
+ #: schema
36
+ # defaultMessage: The title of the article
37
+ msgid "TitleDescription"
38
+ msgstr ""
39
+
40
+ #: schema
41
+ # defaultMessage: URL
42
+ msgid "URL"
43
+ msgstr ""
14
44
 
45
+ #: schema
46
+ # defaultMessage: The url where the article can be found
47
+ msgid "URLDescription"
48
+ msgstr ""
49
+
50
+ #: schema
51
+ # defaultMessage: The year when the article was published
52
+ msgid "YearDescription"
53
+ msgstr ""
54
+
55
+ #: schema
56
+ # defaultMessage: Author
57
+ msgid "author"
58
+ msgstr ""
59
+
60
+ #: schema
61
+ # defaultMessage: Authors
62
+ msgid "authors"
63
+ msgstr ""
64
+
65
+ #: schema
66
+ # defaultMessage: Title
67
+ msgid "title"
68
+ msgstr ""
69
+
70
+ #: schema
71
+ # defaultMessage: Year
72
+ msgid "year"
73
+ msgstr ""
package/locales/volto.pot CHANGED
@@ -1,7 +1,7 @@
1
1
  msgid ""
2
2
  msgstr ""
3
3
  "Project-Id-Version: Plone\n"
4
- "POT-Creation-Date: 2023-06-28T10:48:22.678Z\n"
4
+ "POT-Creation-Date: 2023-08-29T17:31:41.550Z\n"
5
5
  "Last-Translator: Plone i18n <plone-i18n@lists.sourceforge.net>\n"
6
6
  "Language-Team: Plone i18n <plone-i18n@lists.sourceforge.net>\n"
7
7
  "MIME-Version: 1.0\n"
@@ -13,4 +13,63 @@ msgstr ""
13
13
  "Preferred-Encodings: utf-8\n"
14
14
  "Domain: volto\n"
15
15
 
16
+ #: schema
17
+ # defaultMessage: The authors that have contributed to the article
18
+ msgid "AauthorsDescription"
19
+ msgstr ""
20
+
21
+ #: schema
22
+ # defaultMessage: One of the authors
23
+ msgid "AuthorDescription"
24
+ msgstr ""
25
+
26
+ #: Citation/CitationSidebar
27
+ #: schema
28
+ # defaultMessage: Citation
29
+ msgid "Citation"
30
+ msgstr ""
31
+
32
+ #: Citation/CitationSidebar
33
+ # defaultMessage: No Citation selected
34
+ msgid "No Citation selected"
35
+ msgstr ""
36
+
37
+ #: schema
38
+ # defaultMessage: The title of the article
39
+ msgid "TitleDescription"
40
+ msgstr ""
41
+
42
+ #: schema
43
+ # defaultMessage: URL
44
+ msgid "URL"
45
+ msgstr ""
16
46
 
47
+ #: schema
48
+ # defaultMessage: The url where the article can be found
49
+ msgid "URLDescription"
50
+ msgstr ""
51
+
52
+ #: schema
53
+ # defaultMessage: The year when the article was published
54
+ msgid "YearDescription"
55
+ msgstr ""
56
+
57
+ #: schema
58
+ # defaultMessage: Author
59
+ msgid "author"
60
+ msgstr ""
61
+
62
+ #: schema
63
+ # defaultMessage: Authors
64
+ msgid "authors"
65
+ msgstr ""
66
+
67
+ #: schema
68
+ # defaultMessage: Title
69
+ msgid "title"
70
+ msgstr ""
71
+
72
+ #: schema
73
+ # defaultMessage: Year
74
+ msgid "year"
75
+ msgstr ""
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-citation",
3
- "version": "0.1.3",
3
+ "version": "0.1.5",
4
4
  "description": "@eeacms/volto-citation: Volto add-on",
5
5
  "main": "src/index.js",
6
6
  "author": "European Environment Agency: IDM2 A-Team",
@@ -25,8 +25,31 @@
25
25
  "@plone/scripts": "*",
26
26
  "babel-plugin-transform-class-properties": "^6.24.1",
27
27
  "cypress-fail-fast": "^5.0.1",
28
+ "husky": "^8.0.3",
29
+ "lint-staged": "^14.0.1",
28
30
  "md5": "^2.3.0"
29
31
  },
32
+ "lint-staged": {
33
+ "src/**/*.{js,jsx,ts,tsx,json}": [
34
+ "make lint-fix",
35
+ "make prettier-fix"
36
+ ],
37
+ "src/**/*.{jsx}": [
38
+ "make i18n"
39
+ ],
40
+ "theme/**/*.{css,less}": [
41
+ "make stylelint-fix"
42
+ ],
43
+ "src/**/*.{css,less}": [
44
+ "make stylelint-fix"
45
+ ],
46
+ "theme/**/*.overrides": [
47
+ "make stylelint-fix"
48
+ ],
49
+ "src/**/*.overrides": [
50
+ "make stylelint-fix"
51
+ ]
52
+ },
30
53
  "scripts": {
31
54
  "release": "release-it",
32
55
  "release-major-beta": "release-it major --preRelease=beta",
@@ -44,6 +67,7 @@
44
67
  "lint:fix": "make lint-fix",
45
68
  "i18n": "make i18n",
46
69
  "cypress:run": "make cypress-run",
47
- "cypress:open": "make cypress-open"
70
+ "cypress:open": "make cypress-open",
71
+ "prepare": "husky install"
48
72
  }
49
73
  }
@@ -1 +1 @@
1
- export useCopyToClipboard from './useCopyToClipboard';
1
+ export { default as useCopyToClipboard } from './useCopyToClipboard';