@hedia/recommendation-screen 2.1.21-alpha.8 → 2.1.21-alpha.9

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.
Files changed (45) hide show
  1. package/.github/workflows/on-open-pr-publish-alpha.yaml +11 -72
  2. package/.github/workflows/on-post-merge-publish-package.yaml +6 -29
  3. package/.github/workflows/on-push-commit-bump-and-publish-alpha.yaml +11 -84
  4. package/bump-package-version.sh +80 -0
  5. package/coverage/clover.xml +2 -2
  6. package/coverage/lcov-report/index.html +1 -1
  7. package/coverage/lcov-report/src/RecommendationScreen.tsx.html +1 -1
  8. package/coverage/lcov-report/src/__tests__/index.html +1 -1
  9. package/coverage/lcov-report/src/__tests__/utils.tsx.html +1 -1
  10. package/coverage/lcov-report/src/components/Header.tsx.html +1 -1
  11. package/coverage/lcov-report/src/components/InfoBars.tsx.html +1 -1
  12. package/coverage/lcov-report/src/components/InvisibleNumberInput.tsx.html +1 -1
  13. package/coverage/lcov-report/src/components/LimitationMessage.tsx.html +1 -1
  14. package/coverage/lcov-report/src/components/LineSeparator.tsx.html +1 -1
  15. package/coverage/lcov-report/src/components/RecentInsulin.tsx.html +1 -1
  16. package/coverage/lcov-report/src/components/RecommendationModal.tsx.html +1 -1
  17. package/coverage/lcov-report/src/components/RecommendedCarbs.tsx.html +1 -1
  18. package/coverage/lcov-report/src/components/RecommendedInsulin.tsx.html +1 -1
  19. package/coverage/lcov-report/src/components/Remeasure.tsx.html +1 -1
  20. package/coverage/lcov-report/src/components/TransferToLogbook.tsx.html +1 -1
  21. package/coverage/lcov-report/src/components/TwoOptionModal.tsx.html +1 -1
  22. package/coverage/lcov-report/src/components/activity/Activity.tsx.html +1 -1
  23. package/coverage/lcov-report/src/components/activity/ActivityIcon.tsx.html +1 -1
  24. package/coverage/lcov-report/src/components/activity/ActivityIntensity.tsx.html +1 -1
  25. package/coverage/lcov-report/src/components/activity/index.html +1 -1
  26. package/coverage/lcov-report/src/components/index.html +1 -1
  27. package/coverage/lcov-report/src/components/mood/Emotion.tsx.html +1 -1
  28. package/coverage/lcov-report/src/components/mood/MoodIcon.tsx.html +1 -1
  29. package/coverage/lcov-report/src/components/mood/index.html +1 -1
  30. package/coverage/lcov-report/src/index.html +1 -1
  31. package/coverage/lcov-report/src/locale/i18nUtils.ts.html +1 -1
  32. package/coverage/lcov-report/src/locale/index.html +1 -1
  33. package/coverage/lcov-report/src/utils/AttentionMessages.tsx.html +1 -1
  34. package/coverage/lcov-report/src/utils/Constants.ts.html +1 -1
  35. package/coverage/lcov-report/src/utils/RecommendationError.tsx.html +1 -1
  36. package/coverage/lcov-report/src/utils/RecommendationUtils.ts.html +1 -1
  37. package/coverage/lcov-report/src/utils/Translations.ts.html +1 -1
  38. package/coverage/lcov-report/src/utils/Utils.ts.html +1 -1
  39. package/coverage/lcov-report/src/utils/Validations.ts.html +1 -1
  40. package/coverage/lcov-report/src/utils/index.html +1 -1
  41. package/package.json +1 -2
  42. package/remove-alpha-tag.sh +5 -9
  43. package/.github/workflows/ci.yml +0 -32
  44. package/on-open-pr-bump-alpha-release.sh +0 -8
  45. package/on-push-commit-bump-alpha.sh +0 -8
@@ -39,82 +39,21 @@ jobs:
39
39
  with:
40
40
  node-version: ${{ matrix.node-version }}
41
41
 
42
- - name: Register NPM access token
43
- run: npm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}"
44
- env:
45
- NPM_TOKEN: ${{ env.NPM_TOKEN }}
46
-
47
- - name: ci
48
- run: npm ci --ignore-scripts
49
-
50
- - name: lint
51
- run: npm run lint
52
-
53
- - name: lint-pkg
54
- run: npm run lint-pkg
55
-
56
- - name: prettier
57
- run: npm run prettier
58
-
59
- - name: test
60
- run: npm run test-coverage
61
-
62
- - name: tsc
63
- run: npm run tsc
64
-
65
42
  - name: Set identity
66
43
  run: |
67
44
  git config --global user.email "ci@hedia.co"
68
45
  git config --global user.name "Hedia CI Bot"
69
46
 
70
- - name: Amend [major] to Latest Commit
71
- if: "contains(github.event.pull_request.labels.*.name, 'Major')"
72
- run: |
73
- npm version premajor --preid alpha
74
-
75
- - name: Amend [minor] to Latest Commit
76
- if: "!contains(github.event.pull_request.labels.*.name, 'Major') && contains(github.event.pull_request.labels.*.name, 'Minor')"
77
- run: |
78
- npm version preminor --preid alpha
79
-
80
- - name: Amend [patch] to Latest Commit
81
- if: "!contains(github.event.pull_request.labels.*.name, 'Major') && !contains(github.event.pull_request.labels.*.name, 'Minor')"
82
- run: |
83
- npm version prepatch --preid alpha
84
-
85
- - name: Bump alpha version
86
- run: |
87
- chmod +x ./on-open-pr-bump-alpha-release.sh && ./on-open-pr-bump-alpha-release.sh
88
-
89
- - name: Publish alpha version
90
- id: publish-alpha
91
- uses: JS-DevTools/npm-publish@v1
92
- with:
93
- token: ${{ env.NPM_TOKEN }}
94
- tag: alpha
95
-
96
- - name: Check if version exists
97
- if: steps.publish-alpha.outputs.type == 'none'
98
- run: |
99
- echo "Package JSON version is already published, please bump the version!"
100
- exit 1
101
-
102
- - name: Remove alpha tag
103
- run: |
104
- chmod +x ./remove-alpha-tag.sh && ./remove-alpha-tag.sh
105
- git push
106
-
107
- - name: Remove old comment from PR
108
- uses: izhangzhihao/delete-comment@master
109
- with:
110
- github_token: ${{ secrets.GITHUB_TOKEN }}
111
- delete_user_name: github-actions[bot]
112
- issue_number: ${{ github.event.number }} # remove comments from the current PR
113
-
114
- - name: Write comment on PR
115
- uses: peter-evans/create-or-update-comment@v1
47
+ - name: Autobump & Publish
48
+ uses: hedia-team/autobump-and-publish@master
116
49
  with:
50
+ label: ${{ toJson(github.event.pull_request.labels.*.name) }}
51
+ npm-token: ${{ env.NPM_TOKEN }}
117
52
  issue-number: ${{ github.event.number }}
118
- body: |
119
- 🎉 Successfully released alpha version 🎉
120
- ✅ ${{ steps.publish-alpha.outputs.version }}
53
+ github-token: ${{ secrets.GITHUB_TOKEN }}
54
+ run-ci: true
55
+ run-lint: true
56
+ run-lint-pkg: true
57
+ run-prettier: true
58
+ run-test-coverage: true
59
+ run-tsc: true
@@ -25,34 +25,11 @@ jobs:
25
25
  with:
26
26
  node-version: ${{ matrix.node-version }}
27
27
 
28
- - name: tsc
29
- run: npm run tsc
30
-
31
- - name: Publish package
32
- id: publish-package
33
- uses: JS-DevTools/npm-publish@v1
34
- with:
35
- token: ${{ env.NPM_TOKEN }}
36
-
37
- - name: Check if version exists
38
- if: steps.publish-package.outputs.type == 'none'
39
- run: |
40
- echo "Package JSON version is already published, please bump the version!"
41
- exit 1
42
-
43
- - name: Remove old comment from PR
44
- if: steps.publish-package.outputs.type != 'none'
45
- uses: izhangzhihao/delete-comment@master
46
- with:
47
- github_token: ${{ secrets.GITHUB_TOKEN }}
48
- delete_user_name: github-actions[bot]
49
- issue_number: ${{ github.event.number }} # remove comments from the current PR
50
-
51
- - name: Write comment on PR
52
- if: steps.publish-package.outputs.type != 'none'
53
- uses: peter-evans/create-or-update-comment@v1
28
+ - name: Publish
29
+ uses: hedia-team/autobump-and-publish@master
54
30
  with:
31
+ npm-token: ${{ env.NPM_TOKEN }}
55
32
  issue-number: ${{ github.event.number }}
56
- body: |
57
- 🎉 Successfully released package 🎉
58
- ✅ ${{ steps.publish-package.outputs.version }}
33
+ github-token: ${{ secrets.GITHUB_TOKEN }}
34
+ is-post-merge: true
35
+ run-tsc: true
@@ -13,11 +13,6 @@ jobs:
13
13
  on-push-commit-bump-and-publish-alpha:
14
14
  runs-on: ubuntu-latest
15
15
 
16
- outputs:
17
- type: ${{ steps.publish-alpha.outputs.type }}
18
- version: ${{ steps.publish-alpha.outputs.version }}
19
- skip: ${{ env.CI_SKIP }}
20
-
21
16
  strategy:
22
17
  matrix:
23
18
  node-version: [14.15]
@@ -38,91 +33,23 @@ jobs:
38
33
  with:
39
34
  node-version: ${{ matrix.node-version }}
40
35
 
41
- - name: Register NPM access token
42
- run: npm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}"
43
- env:
44
- NPM_TOKEN: ${{ env.NPM_TOKEN }}
45
-
46
- - name: ci
47
- if: ${{ env.CI_SKIP == 'false' }}
48
- run: npm ci --ignore-scripts
49
-
50
- - name: lint
51
- if: ${{ env.CI_SKIP == 'false' }}
52
- run: npm run lint
53
-
54
- - name: lint-pkg
55
- if: ${{ env.CI_SKIP == 'false' }}
56
- run: npm run lint-pkg
57
-
58
- - name: prettier
59
- if: ${{ env.CI_SKIP == 'false' }}
60
- run: npm run prettier
61
-
62
- - name: test
63
- if: ${{ env.CI_SKIP == 'false' }}
64
- run: npm run test-coverage
65
-
66
- - name: tsc
67
- if: ${{ env.CI_SKIP == 'false' }}
68
- run: npm run tsc
69
-
70
36
  - name: Set identity
71
37
  if: ${{ env.CI_SKIP == 'false' }}
72
38
  run: |
73
39
  git config --global user.email "ci@hedia.co"
74
40
  git config --global user.name "Hedia CI Bot"
75
41
 
76
- - name: Bump alpha version
42
+ - name: Autobump & Publish
77
43
  if: ${{ env.CI_SKIP == 'false' }}
78
- run: |
79
- chmod +x ./on-push-commit-bump-alpha.sh && ./on-push-commit-bump-alpha.sh
80
-
81
- - name: Publish alpha version
82
- if: ${{ env.CI_SKIP == 'false' }}
83
- id: publish-alpha
84
- uses: JS-DevTools/npm-publish@v1
85
- with:
86
- token: ${{ env.NPM_TOKEN }}
87
- tag: alpha
88
-
89
- - name: Check if version exists
90
- if: steps.publish-alpha.outputs.type == 'none'
91
- run: |
92
- echo "Package JSON version is already published, please bump the version!"
93
- exit 1
94
-
95
- - name: Remove alpha tag
96
- if: ${{ env.CI_SKIP == 'false' }}
97
- run: |
98
- chmod +x ./remove-alpha-tag.sh && ./remove-alpha-tag.sh
99
- git push
100
-
101
- after-publish:
102
- runs-on: ubuntu-latest
103
- needs: [on-push-commit-bump-and-publish-alpha]
104
- if: needs.on-push-commit-bump-and-publish-alpha.outputs.skip == 'false'
105
-
106
- strategy:
107
- matrix:
108
- node-version: [14.15]
109
-
110
- steps:
111
- - uses: actions/checkout@v2
112
- with:
113
- ref: ${{ github.event.pull_request.head.ref }}
114
-
115
- - name: Remove old comment from PR
116
- uses: izhangzhihao/delete-comment@master
117
- with:
118
- github_token: ${{ secrets.GITHUB_TOKEN }}
119
- delete_user_name: github-actions[bot]
120
- issue_number: ${{ github.event.number }} # remove comments from the current PR
121
-
122
- - name: Write comment on PR
123
- uses: peter-evans/create-or-update-comment@v1
44
+ uses: hedia-team/autobump-and-publish@master
124
45
  with:
46
+ label: ${{ toJson(github.event.pull_request.labels.*.name) }}
47
+ npm-token: ${{ env.NPM_TOKEN }}
125
48
  issue-number: ${{ github.event.number }}
126
- body: |
127
- 🎉 Successfully released alpha version 🎉
128
- ✅ ${{ needs.on-push-commit-bump-and-publish-alpha.outputs.version }}
49
+ github-token: ${{ secrets.GITHUB_TOKEN }}
50
+ run-ci: true
51
+ run-lint: true
52
+ run-lint-pkg: true
53
+ run-prettier: true
54
+ run-test-coverage: true
55
+ run-tsc: true
@@ -0,0 +1,80 @@
1
+ # @latest on npm
2
+ latestVersionNPM=$(npm show ./ dist-tags.latest --json)
3
+ echo "Latest dist-tag version on npm: $latestVersionNPM"
4
+
5
+ # Initial package.json version
6
+ packageJSONVersion=$(sed -nE 's/^\s*"version": "([0-9]+.[0-9]+.[0-9]+).*?",$/\1/p' package.json)
7
+ echo "Initial package.json version: $packageJSONVersion"
8
+
9
+ npmV=`echo $latestVersionNPM | sed 's/\.//g' | bc`
10
+ pkgV=`echo $packageJSONVersion | sed 's/\.//g' | bc`
11
+
12
+ # Check if the packageJSONVersion is up to date.
13
+ # Otherwise, bump the package.json version, accordingly to the label.
14
+ if [[ $npmV -lt $pkgV ]]; then
15
+ echo "package.json version is up to date"
16
+ else
17
+ # Set package.json to latest NPM version prior to bump version
18
+ sed -i 's/\("version": \)\("[0-9]\+.[0-9]\+.[0-9]\+\)\(\"\)/\1\'$latestVersionNPM'/' package.json
19
+ case "$1" in
20
+ *"major"*)
21
+ echo "Bumping pre-major version"
22
+ echo "$(npm version --no-git-tag-version premajor --preid alpha)"
23
+ ;;
24
+ *"minor"*)
25
+ echo "Bumping pre-minor version"
26
+ echo $(npm version --no-git-tag-version preminor --preid alpha)
27
+ ;;
28
+ *"patch"*)
29
+ echo "Bumping pre-patch version"
30
+ echo "$(npm version --no-git-tag-version prepatch --preid alpha)"
31
+ ;;
32
+ *)
33
+ echo "No [major, minor, patch] label has been set"
34
+ ;;
35
+ esac
36
+ fi
37
+
38
+ # Get all published versions on npm.
39
+ allVersionsArray=$(npm show ./ versions)
40
+ # Get the current version from the package.json
41
+ upToDatePackageJSON=$(sed -nE 's/^\s*"version": "([0-9]+.[0-9]+.[0-9]+).*?",$/\1/p' package.json)
42
+
43
+ # Identify the latest published alpha (if any) on npm, of the upToDatePackageJSON.
44
+ for i in ${allVersionsArray[@]}
45
+ do
46
+ if [[ $i == *$upToDatePackageJSON* ]]; then
47
+ latestAlphaVersion=$(echo $i)
48
+ fi
49
+ done
50
+
51
+ # Get the alpha counter value of the latest alpha version (for the upToDatePackageJSON version).
52
+ alphaVersionCounter="$(echo "$latestAlphaVersion" | grep -oP '(?:-alpha.)\K\d+')"
53
+
54
+ # Bumping the alphaVersionCounter by 1.
55
+ if [[ "$alphaVersionCounter" != "" ]];
56
+ then
57
+ alphaVersionCounter="$((alphaVersionCounter+1))"
58
+ else
59
+ alphaVersionCounter="0"
60
+ fi
61
+
62
+ # Get the current packageVersion and check if -alpha.X tag has been set (in case of package.json version bump (Open PR))
63
+ packageVersion=$(sed -nE 's/^\s*"version": "(.*?)",$/\1/p' package.json)
64
+ if [[ "$packageVersion" == *"-alpha"* ]];
65
+ then
66
+ # On open PR
67
+ # Set alpha tag to the correspondent version
68
+ echo "Setting alpha version to $alphaVersionCounter"
69
+ sed -i 's/\("version": "[0-9]\+.[0-9]\+.[0-9]\+\)\(-alpha.\)\([0-9]\)/\1\'-alpha.$alphaVersionCounter'/' package.json
70
+ bumpedPackageVersion=$(sed -nE 's/^\s*"version": "([0-9]+.[0-9]+.[0-9]+).*?",$/\1/p' package.json)
71
+ # Commit changes
72
+ git add package.json
73
+ git commit -m "autobump $bumpedPackageVersion"
74
+ else
75
+ echo "on push"
76
+ # On push commit
77
+ # Set alpha tag to the correspondent version
78
+ echo "Setting alpha version to $alphaVersionCounter"
79
+ sed -i 's/\("version": "\)\([0-9]\+\.[0-9]\+\.[0-9]\+\)\("\)/\1\2\-alpha.'$alphaVersionCounter'\3/' package.json
80
+ fi
@@ -1,6 +1,6 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
- <coverage generated="1630595110104" clover="3.2.0">
3
- <project timestamp="1630595110104" name="All files">
2
+ <coverage generated="1631706511741" clover="3.2.0">
3
+ <project timestamp="1631706511741" name="All files">
4
4
  <metrics statements="608" coveredstatements="608" conditionals="366" coveredconditionals="366" methods="197" coveredmethods="197" elements="1171" coveredelements="1171" complexity="0" loc="608" ncloc="608" packages="7" files="27" classes="27"/>
5
5
  <package name="src">
6
6
  <metrics statements="105" coveredstatements="105" conditionals="47" coveredconditionals="47" methods="35" coveredmethods="35"/>
@@ -185,7 +185,7 @@
185
185
  <div class='footer quiet pad2 space-top1 center small'>
186
186
  Code coverage generated by
187
187
  <a href="https://istanbul.js.org/" target="_blank">istanbul</a>
188
- at Thu Sep 02 2021 15:05:10 GMT+0000 (Coordinated Universal Time)
188
+ at Wed Sep 15 2021 11:48:31 GMT+0000 (Coordinated Universal Time)
189
189
  </div>
190
190
  </div>
191
191
  <script src="prettify.js"></script>
@@ -2467,7 +2467,7 @@ const containerStyles = StyleSheet.create({
2467
2467
  <div class='footer quiet pad2 space-top1 center small'>
2468
2468
  Code coverage generated by
2469
2469
  <a href="https://istanbul.js.org/" target="_blank">istanbul</a>
2470
- at Thu Sep 02 2021 15:05:10 GMT+0000 (Coordinated Universal Time)
2470
+ at Wed Sep 15 2021 11:48:31 GMT+0000 (Coordinated Universal Time)
2471
2471
  </div>
2472
2472
  </div>
2473
2473
  <script src="../prettify.js"></script>
@@ -95,7 +95,7 @@
95
95
  <div class='footer quiet pad2 space-top1 center small'>
96
96
  Code coverage generated by
97
97
  <a href="https://istanbul.js.org/" target="_blank">istanbul</a>
98
- at Thu Sep 02 2021 15:05:10 GMT+0000 (Coordinated Universal Time)
98
+ at Wed Sep 15 2021 11:48:31 GMT+0000 (Coordinated Universal Time)
99
99
  </div>
100
100
  </div>
101
101
  <script src="../../prettify.js"></script>
@@ -517,7 +517,7 @@ export function getIcon(wrapper: RenderAPI, name: string, active: boolean): Reac
517
517
  <div class='footer quiet pad2 space-top1 center small'>
518
518
  Code coverage generated by
519
519
  <a href="https://istanbul.js.org/" target="_blank">istanbul</a>
520
- at Thu Sep 02 2021 15:05:10 GMT+0000 (Coordinated Universal Time)
520
+ at Wed Sep 15 2021 11:48:31 GMT+0000 (Coordinated Universal Time)
521
521
  </div>
522
522
  </div>
523
523
  <script src="../../prettify.js"></script>
@@ -340,7 +340,7 @@ const headerStyles = StyleSheet.create({
340
340
  <div class='footer quiet pad2 space-top1 center small'>
341
341
  Code coverage generated by
342
342
  <a href="https://istanbul.js.org/" target="_blank">istanbul</a>
343
- at Thu Sep 02 2021 15:05:10 GMT+0000 (Coordinated Universal Time)
343
+ at Wed Sep 15 2021 11:48:31 GMT+0000 (Coordinated Universal Time)
344
344
  </div>
345
345
  </div>
346
346
  <script src="../../prettify.js"></script>
@@ -502,7 +502,7 @@ export const infoStyles = StyleSheet.create({
502
502
  <div class='footer quiet pad2 space-top1 center small'>
503
503
  Code coverage generated by
504
504
  <a href="https://istanbul.js.org/" target="_blank">istanbul</a>
505
- at Thu Sep 02 2021 15:05:10 GMT+0000 (Coordinated Universal Time)
505
+ at Wed Sep 15 2021 11:48:31 GMT+0000 (Coordinated Universal Time)
506
506
  </div>
507
507
  </div>
508
508
  <script src="../../prettify.js"></script>
@@ -550,7 +550,7 @@ const inputStyles = StyleSheet.create({
550
550
  <div class='footer quiet pad2 space-top1 center small'>
551
551
  Code coverage generated by
552
552
  <a href="https://istanbul.js.org/" target="_blank">istanbul</a>
553
- at Thu Sep 02 2021 15:05:10 GMT+0000 (Coordinated Universal Time)
553
+ at Wed Sep 15 2021 11:48:31 GMT+0000 (Coordinated Universal Time)
554
554
  </div>
555
555
  </div>
556
556
  <script src="../../prettify.js"></script>
@@ -193,7 +193,7 @@ export default class LimitationMessage extends React.Component&lt;ILimitationMes
193
193
  <div class='footer quiet pad2 space-top1 center small'>
194
194
  Code coverage generated by
195
195
  <a href="https://istanbul.js.org/" target="_blank">istanbul</a>
196
- at Thu Sep 02 2021 15:05:10 GMT+0000 (Coordinated Universal Time)
196
+ at Wed Sep 15 2021 11:48:31 GMT+0000 (Coordinated Universal Time)
197
197
  </div>
198
198
  </div>
199
199
  <script src="../../prettify.js"></script>
@@ -145,7 +145,7 @@ const lineSeparatorStyles = StyleSheet.create({
145
145
  <div class='footer quiet pad2 space-top1 center small'>
146
146
  Code coverage generated by
147
147
  <a href="https://istanbul.js.org/" target="_blank">istanbul</a>
148
- at Thu Sep 02 2021 15:05:10 GMT+0000 (Coordinated Universal Time)
148
+ at Wed Sep 15 2021 11:48:31 GMT+0000 (Coordinated Universal Time)
149
149
  </div>
150
150
  </div>
151
151
  <script src="../../prettify.js"></script>
@@ -394,7 +394,7 @@ const recentInsulinStyles = StyleSheet.create({
394
394
  <div class='footer quiet pad2 space-top1 center small'>
395
395
  Code coverage generated by
396
396
  <a href="https://istanbul.js.org/" target="_blank">istanbul</a>
397
- at Thu Sep 02 2021 15:05:10 GMT+0000 (Coordinated Universal Time)
397
+ at Wed Sep 15 2021 11:48:31 GMT+0000 (Coordinated Universal Time)
398
398
  </div>
399
399
  </div>
400
400
  <script src="../../prettify.js"></script>
@@ -907,7 +907,7 @@ export const stylesModal = StyleSheet.create({
907
907
  <div class='footer quiet pad2 space-top1 center small'>
908
908
  Code coverage generated by
909
909
  <a href="https://istanbul.js.org/" target="_blank">istanbul</a>
910
- at Thu Sep 02 2021 15:05:10 GMT+0000 (Coordinated Universal Time)
910
+ at Wed Sep 15 2021 11:48:31 GMT+0000 (Coordinated Universal Time)
911
911
  </div>
912
912
  </div>
913
913
  <script src="../../prettify.js"></script>
@@ -1045,7 +1045,7 @@ const calculationStyles = StyleSheet.create({
1045
1045
  <div class='footer quiet pad2 space-top1 center small'>
1046
1046
  Code coverage generated by
1047
1047
  <a href="https://istanbul.js.org/" target="_blank">istanbul</a>
1048
- at Thu Sep 02 2021 15:05:10 GMT+0000 (Coordinated Universal Time)
1048
+ at Wed Sep 15 2021 11:48:31 GMT+0000 (Coordinated Universal Time)
1049
1049
  </div>
1050
1050
  </div>
1051
1051
  <script src="../../prettify.js"></script>
@@ -763,7 +763,7 @@ const recommendedInsulinStyles = StyleSheet.create({
763
763
  <div class='footer quiet pad2 space-top1 center small'>
764
764
  Code coverage generated by
765
765
  <a href="https://istanbul.js.org/" target="_blank">istanbul</a>
766
- at Thu Sep 02 2021 15:05:10 GMT+0000 (Coordinated Universal Time)
766
+ at Wed Sep 15 2021 11:48:31 GMT+0000 (Coordinated Universal Time)
767
767
  </div>
768
768
  </div>
769
769
  <script src="../../prettify.js"></script>
@@ -535,7 +535,7 @@ const variantStyles = StyleSheet.create({
535
535
  <div class='footer quiet pad2 space-top1 center small'>
536
536
  Code coverage generated by
537
537
  <a href="https://istanbul.js.org/" target="_blank">istanbul</a>
538
- at Thu Sep 02 2021 15:05:10 GMT+0000 (Coordinated Universal Time)
538
+ at Wed Sep 15 2021 11:48:31 GMT+0000 (Coordinated Universal Time)
539
539
  </div>
540
540
  </div>
541
541
  <script src="../../prettify.js"></script>
@@ -427,7 +427,7 @@ const addToLogbookStyles = StyleSheet.create({
427
427
  <div class='footer quiet pad2 space-top1 center small'>
428
428
  Code coverage generated by
429
429
  <a href="https://istanbul.js.org/" target="_blank">istanbul</a>
430
- at Thu Sep 02 2021 15:05:10 GMT+0000 (Coordinated Universal Time)
430
+ at Wed Sep 15 2021 11:48:31 GMT+0000 (Coordinated Universal Time)
431
431
  </div>
432
432
  </div>
433
433
  <script src="../../prettify.js"></script>
@@ -649,7 +649,7 @@ export const modalStyle = StyleSheet.create({
649
649
  <div class='footer quiet pad2 space-top1 center small'>
650
650
  Code coverage generated by
651
651
  <a href="https://istanbul.js.org/" target="_blank">istanbul</a>
652
- at Thu Sep 02 2021 15:05:10 GMT+0000 (Coordinated Universal Time)
652
+ at Wed Sep 15 2021 11:48:31 GMT+0000 (Coordinated Universal Time)
653
653
  </div>
654
654
  </div>
655
655
  <script src="../../prettify.js"></script>
@@ -355,7 +355,7 @@ const activityStyles = StyleSheet.create({
355
355
  <div class='footer quiet pad2 space-top1 center small'>
356
356
  Code coverage generated by
357
357
  <a href="https://istanbul.js.org/" target="_blank">istanbul</a>
358
- at Thu Sep 02 2021 15:05:10 GMT+0000 (Coordinated Universal Time)
358
+ at Wed Sep 15 2021 11:48:31 GMT+0000 (Coordinated Universal Time)
359
359
  </div>
360
360
  </div>
361
361
  <script src="../../../prettify.js"></script>
@@ -265,7 +265,7 @@ const activityIconStyles = StyleSheet.create({
265
265
  <div class='footer quiet pad2 space-top1 center small'>
266
266
  Code coverage generated by
267
267
  <a href="https://istanbul.js.org/" target="_blank">istanbul</a>
268
- at Thu Sep 02 2021 15:05:10 GMT+0000 (Coordinated Universal Time)
268
+ at Wed Sep 15 2021 11:48:31 GMT+0000 (Coordinated Universal Time)
269
269
  </div>
270
270
  </div>
271
271
  <script src="../../../prettify.js"></script>
@@ -265,7 +265,7 @@ const activityIntensityStyles = StyleSheet.create({
265
265
  <div class='footer quiet pad2 space-top1 center small'>
266
266
  Code coverage generated by
267
267
  <a href="https://istanbul.js.org/" target="_blank">istanbul</a>
268
- at Thu Sep 02 2021 15:05:10 GMT+0000 (Coordinated Universal Time)
268
+ at Wed Sep 15 2021 11:48:31 GMT+0000 (Coordinated Universal Time)
269
269
  </div>
270
270
  </div>
271
271
  <script src="../../../prettify.js"></script>
@@ -125,7 +125,7 @@
125
125
  <div class='footer quiet pad2 space-top1 center small'>
126
126
  Code coverage generated by
127
127
  <a href="https://istanbul.js.org/" target="_blank">istanbul</a>
128
- at Thu Sep 02 2021 15:05:10 GMT+0000 (Coordinated Universal Time)
128
+ at Wed Sep 15 2021 11:48:31 GMT+0000 (Coordinated Universal Time)
129
129
  </div>
130
130
  </div>
131
131
  <script src="../../../prettify.js"></script>
@@ -260,7 +260,7 @@
260
260
  <div class='footer quiet pad2 space-top1 center small'>
261
261
  Code coverage generated by
262
262
  <a href="https://istanbul.js.org/" target="_blank">istanbul</a>
263
- at Thu Sep 02 2021 15:05:10 GMT+0000 (Coordinated Universal Time)
263
+ at Wed Sep 15 2021 11:48:31 GMT+0000 (Coordinated Universal Time)
264
264
  </div>
265
265
  </div>
266
266
  <script src="../../prettify.js"></script>
@@ -337,7 +337,7 @@ const emotionStyles = StyleSheet.create({
337
337
  <div class='footer quiet pad2 space-top1 center small'>
338
338
  Code coverage generated by
339
339
  <a href="https://istanbul.js.org/" target="_blank">istanbul</a>
340
- at Thu Sep 02 2021 15:05:10 GMT+0000 (Coordinated Universal Time)
340
+ at Wed Sep 15 2021 11:48:31 GMT+0000 (Coordinated Universal Time)
341
341
  </div>
342
342
  </div>
343
343
  <script src="../../../prettify.js"></script>
@@ -319,7 +319,7 @@ const moodIconStyles = StyleSheet.create({
319
319
  <div class='footer quiet pad2 space-top1 center small'>
320
320
  Code coverage generated by
321
321
  <a href="https://istanbul.js.org/" target="_blank">istanbul</a>
322
- at Thu Sep 02 2021 15:05:10 GMT+0000 (Coordinated Universal Time)
322
+ at Wed Sep 15 2021 11:48:31 GMT+0000 (Coordinated Universal Time)
323
323
  </div>
324
324
  </div>
325
325
  <script src="../../../prettify.js"></script>
@@ -110,7 +110,7 @@
110
110
  <div class='footer quiet pad2 space-top1 center small'>
111
111
  Code coverage generated by
112
112
  <a href="https://istanbul.js.org/" target="_blank">istanbul</a>
113
- at Thu Sep 02 2021 15:05:10 GMT+0000 (Coordinated Universal Time)
113
+ at Wed Sep 15 2021 11:48:31 GMT+0000 (Coordinated Universal Time)
114
114
  </div>
115
115
  </div>
116
116
  <script src="../../../prettify.js"></script>
@@ -95,7 +95,7 @@
95
95
  <div class='footer quiet pad2 space-top1 center small'>
96
96
  Code coverage generated by
97
97
  <a href="https://istanbul.js.org/" target="_blank">istanbul</a>
98
- at Thu Sep 02 2021 15:05:10 GMT+0000 (Coordinated Universal Time)
98
+ at Wed Sep 15 2021 11:48:31 GMT+0000 (Coordinated Universal Time)
99
99
  </div>
100
100
  </div>
101
101
  <script src="../prettify.js"></script>
@@ -190,7 +190,7 @@ export function changeLanguage(language: Languages): I18n {
190
190
  <div class='footer quiet pad2 space-top1 center small'>
191
191
  Code coverage generated by
192
192
  <a href="https://istanbul.js.org/" target="_blank">istanbul</a>
193
- at Thu Sep 02 2021 15:05:10 GMT+0000 (Coordinated Universal Time)
193
+ at Wed Sep 15 2021 11:48:31 GMT+0000 (Coordinated Universal Time)
194
194
  </div>
195
195
  </div>
196
196
  <script src="../../prettify.js"></script>
@@ -95,7 +95,7 @@
95
95
  <div class='footer quiet pad2 space-top1 center small'>
96
96
  Code coverage generated by
97
97
  <a href="https://istanbul.js.org/" target="_blank">istanbul</a>
98
- at Thu Sep 02 2021 15:05:10 GMT+0000 (Coordinated Universal Time)
98
+ at Wed Sep 15 2021 11:48:31 GMT+0000 (Coordinated Universal Time)
99
99
  </div>
100
100
  </div>
101
101
  <script src="../../prettify.js"></script>
@@ -538,7 +538,7 @@ export class Messages {
538
538
  <div class='footer quiet pad2 space-top1 center small'>
539
539
  Code coverage generated by
540
540
  <a href="https://istanbul.js.org/" target="_blank">istanbul</a>
541
- at Thu Sep 02 2021 15:05:10 GMT+0000 (Coordinated Universal Time)
541
+ at Wed Sep 15 2021 11:48:31 GMT+0000 (Coordinated Universal Time)
542
542
  </div>
543
543
  </div>
544
544
  <script src="../../prettify.js"></script>
@@ -232,7 +232,7 @@ export const ACTIVITY_SETTINGS_INTERVAL_LIMITS: IInterval = { min: 0, max: 1 };
232
232
  <div class='footer quiet pad2 space-top1 center small'>
233
233
  Code coverage generated by
234
234
  <a href="https://istanbul.js.org/" target="_blank">istanbul</a>
235
- at Thu Sep 02 2021 15:05:10 GMT+0000 (Coordinated Universal Time)
235
+ at Wed Sep 15 2021 11:48:31 GMT+0000 (Coordinated Universal Time)
236
236
  </div>
237
237
  </div>
238
238
  <script src="../../prettify.js"></script>
@@ -604,7 +604,7 @@ export const BloodKetonePropsError = (): RecommendationError =&gt;
604
604
  <div class='footer quiet pad2 space-top1 center small'>
605
605
  Code coverage generated by
606
606
  <a href="https://istanbul.js.org/" target="_blank">istanbul</a>
607
- at Thu Sep 02 2021 15:05:10 GMT+0000 (Coordinated Universal Time)
607
+ at Wed Sep 15 2021 11:48:31 GMT+0000 (Coordinated Universal Time)
608
608
  </div>
609
609
  </div>
610
610
  <script src="../../prettify.js"></script>
@@ -748,7 +748,7 @@ export function getLimitationMessage(wasLimited: boolean, activityReduction: num
748
748
  <div class='footer quiet pad2 space-top1 center small'>
749
749
  Code coverage generated by
750
750
  <a href="https://istanbul.js.org/" target="_blank">istanbul</a>
751
- at Thu Sep 02 2021 15:05:10 GMT+0000 (Coordinated Universal Time)
751
+ at Wed Sep 15 2021 11:48:31 GMT+0000 (Coordinated Universal Time)
752
752
  </div>
753
753
  </div>
754
754
  <script src="../../prettify.js"></script>
@@ -115,7 +115,7 @@ export const ActivityIntensityTranslations: Record&lt;Activity.Enums.ActivityInt
115
115
  <div class='footer quiet pad2 space-top1 center small'>
116
116
  Code coverage generated by
117
117
  <a href="https://istanbul.js.org/" target="_blank">istanbul</a>
118
- at Thu Sep 02 2021 15:05:10 GMT+0000 (Coordinated Universal Time)
118
+ at Wed Sep 15 2021 11:48:31 GMT+0000 (Coordinated Universal Time)
119
119
  </div>
120
120
  </div>
121
121
  <script src="../../prettify.js"></script>
@@ -529,7 +529,7 @@ export class Utils {
529
529
  <div class='footer quiet pad2 space-top1 center small'>
530
530
  Code coverage generated by
531
531
  <a href="https://istanbul.js.org/" target="_blank">istanbul</a>
532
- at Thu Sep 02 2021 15:05:10 GMT+0000 (Coordinated Universal Time)
532
+ at Wed Sep 15 2021 11:48:31 GMT+0000 (Coordinated Universal Time)
533
533
  </div>
534
534
  </div>
535
535
  <script src="../../prettify.js"></script>
@@ -1528,7 +1528,7 @@ export function checkCarbohydrates(carbohydrates: number): void {
1528
1528
  <div class='footer quiet pad2 space-top1 center small'>
1529
1529
  Code coverage generated by
1530
1530
  <a href="https://istanbul.js.org/" target="_blank">istanbul</a>
1531
- at Thu Sep 02 2021 15:05:10 GMT+0000 (Coordinated Universal Time)
1531
+ at Wed Sep 15 2021 11:48:31 GMT+0000 (Coordinated Universal Time)
1532
1532
  </div>
1533
1533
  </div>
1534
1534
  <script src="../../prettify.js"></script>
@@ -185,7 +185,7 @@
185
185
  <div class='footer quiet pad2 space-top1 center small'>
186
186
  Code coverage generated by
187
187
  <a href="https://istanbul.js.org/" target="_blank">istanbul</a>
188
- at Thu Sep 02 2021 15:05:10 GMT+0000 (Coordinated Universal Time)
188
+ at Wed Sep 15 2021 11:48:31 GMT+0000 (Coordinated Universal Time)
189
189
  </div>
190
190
  </div>
191
191
  <script src="../../prettify.js"></script>
package/package.json CHANGED
@@ -1,7 +1,6 @@
1
1
  {
2
2
  "name": "@hedia/recommendation-screen",
3
- "version": "2.1.21-alpha.8",
4
- "alphaVersionCounter": "8",
3
+ "version": "2.1.21-alpha.9",
5
4
  "description": "Hedia Recommendation Screen for Bolus and Carbohydrates",
6
5
  "main": "index.js",
7
6
  "scripts": {
@@ -1,19 +1,15 @@
1
- versionNumber=$(sed -nE 's/^\s*"version": "([0-9].[0-9].[0-9]).*?",$/\1/p' package.json)
2
1
  alphaNumber="$(sed -n 's/\("version": "[0-9]\+\.[0-9]\+\.[0-9]\+\-alpha\.\)\([0-9]\+\)\("\)\(,\)/\2/p' package.json)"
3
- alphaVersion="$(sed -nE 's/^\s*"alphaVersionCounter": "(.*?)",$/\1/p' package.json)"
4
2
 
3
+ previousCommit="$(git log -1 --pretty=%B)"
5
4
 
6
5
  if [ "$alphaNumber" != "" ];
7
6
  then
8
7
  sed -i 's/\("version": "[0-9]\+\.[0-9]\+\.[0-9]\+\)\(-alpha\.\)\([0-9]\+\)\("\)/\1\4/' package.json
9
8
  fi
10
9
 
11
- git add package.json
12
-
13
- if [ "$alphaVersion" = "" ] || [ $alphaVersion = "0" ];
10
+ if [[ "$previousCommit" == *"autobump"* ]];
14
11
  then
15
- git commit --amend -m "autobump ${versionNumber}-alpha.${alphaVersion}"
16
- else
17
- git commit -m "autobump ${versionNumber}-alpha.${alphaVersion}"
12
+ git add package.json
13
+ git commit --amend --no-edit
14
+ git push
18
15
  fi
19
-
@@ -1,32 +0,0 @@
1
- name: Node.js CI
2
-
3
- on:
4
- pull_request:
5
-
6
- env:
7
- NPM_TOKEN: ${{ secrets.HEDIA_BOT_NPM_TOKEN }}
8
-
9
- jobs:
10
- build:
11
- runs-on: ubuntu-latest
12
-
13
- strategy:
14
- matrix:
15
- node-version: [14.15]
16
-
17
- steps:
18
- - uses: actions/checkout@v2
19
-
20
- - name: Use Node.js ${{ matrix.node-version }}
21
- uses: actions/setup-node@v2
22
- with:
23
- node-version: ${{ matrix.node-version }}
24
-
25
- - name: Register NPM access token
26
- run: npm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}"
27
- env:
28
- NPM_TOKEN: ${{ env.NPM_TOKEN }}
29
-
30
- - run: npm ci
31
- env:
32
- CI: true
@@ -1,8 +0,0 @@
1
- alphaNumber="$(sed -n 's/\("version": "[0-9]\+\.[0-9]\+\.[0-9]\+\-alpha\.\)\([0-9]\+\)\("\)\(,\)/\2/p' package.json)"
2
- bumpedAlphaNumber="$((alphaNumber+1))"
3
-
4
- alphaVersion="$(sed -nE 's/^\s*"alphaVersionCounter": "(.*?)",$/\1/p' package.json)"
5
- bumpedAlphaVersion="$((alphaVersion+1))"
6
-
7
- sed -i 's/\("alphaVersionCounter": "\)\([0-9]\+\)\("\)/\1'0'\3/' package.json
8
- sed -i 's/\("version": "\)\([0-9]\+\.[0-9]\+\.[0-9]\+\)\("\)/\1\2\-alpha.'0'\3/' package.json
@@ -1,8 +0,0 @@
1
- alphaNumber="$(sed -n 's/\("version": "[0-9]\+\.[0-9]\+\.[0-9]\+\-alpha\.\)\([0-9]\+\)\("\)\(,\)/\2/p' package.json)"
2
- bumpedAlphaNumber="$((alphaNumber+1))"
3
-
4
- alphaVersion="$(sed -nE 's/^\s*"alphaVersionCounter": "(.*?)",$/\1/p' package.json)"
5
- bumpedAlphaVersion="$((alphaVersion+1))"
6
-
7
- sed -i 's/\("version": "\)\([0-9]\+\.[0-9]\+\.[0-9]\+\)\("\)/\1\2\-alpha.'$bumpedAlphaVersion'\3/' package.json
8
- sed -i 's/\("alphaVersionCounter": "\)\([0-9]\+\)\("\)/\1'$bumpedAlphaVersion'\3/' package.json