@zimbra/zimlet-cli 12.10.0 → 12.13.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zimbra/zimlet-cli",
3
- "version": "12.10.0",
3
+ "version": "12.13.0",
4
4
  "description": "Develop, Build, and Package Zimbra X compatible zimlets for development and production.",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
@@ -16,8 +16,7 @@
16
16
  "lint": "eslint src",
17
17
  "lint:fix": "eslint src --fix",
18
18
  "prepublishOnly": "npm run -s test && git commit -am $npm_package_version && git tag $npm_package_version && git push && git push --tags",
19
- "release": "npm publish",
20
- "release-beta": "npm publish --tag beta"
19
+ "prepare": "is-ci || husky install"
21
20
  },
22
21
  "babel": {
23
22
  "presets": [
@@ -42,26 +41,34 @@
42
41
  "@babel/plugin-proposal-export-default-from"
43
42
  ]
44
43
  },
44
+ "lint-staged": {
45
+ "*.js": [
46
+ "eslint"
47
+ ]
48
+ },
45
49
  "devDependencies": {
46
50
  "@apollo/client": "^3.2.5",
47
51
  "@babel/cli": "^7.12.1",
48
52
  "@babel/plugin-proposal-optional-chaining": "^7.12.7",
49
- "audit-ci": "^3.1.1",
53
+ "audit-ci": "^4.1.0",
50
54
  "babel-eslint": "^10.1.0",
51
- "eslint": "^7.12.1",
55
+ "eslint": "^7.29.0",
52
56
  "eslint-config-synacor": "^3.0.5",
53
57
  "graphql": "^15.4.0",
58
+ "husky": "^6.0.0",
59
+ "is-ci": "^3.0.0",
60
+ "lint-staged": "^11.0.0",
54
61
  "mkdirp": "^1.0.4",
55
62
  "mockery": "^2.1.0",
56
63
  "moment": "^2.29.1",
57
- "preact": "^10.5.5",
64
+ "preact": "^10.5.13",
58
65
  "preact-context-provider": "^2.0.0-preactx.2",
59
- "preact-i18n": "^2.3.0-preactx",
66
+ "preact-i18n": "^2.4.0-preactx",
60
67
  "preact-render-to-string": "^5.1.11",
61
- "preact-router": "github:zimbra/preact-router#3.1.0_base_path_support",
68
+ "preact-router": "github:zimbra/preact-router#3.1.1_base_path_support",
62
69
  "react-redux": "^7.2.2",
63
- "redux-actions": "^2.6.5",
64
70
  "recompose": "^0.30.0",
71
+ "redux-actions": "^2.6.5",
65
72
  "rimraf": "^3.0.2"
66
73
  },
67
74
  "license": "GPL-3.0",
@@ -97,7 +104,7 @@
97
104
  "loader-utils": "^2.0.0",
98
105
  "log-symbols": "^4.0.0",
99
106
  "ora": "^5.1.0",
100
- "postcss": "^8.1.6",
107
+ "postcss": "^8.3.5",
101
108
  "postcss-discard-comments": "^4.0.2",
102
109
  "postcss-loader": "^4.0.4",
103
110
  "postcss-preset-env": "^6.7.0",
@@ -109,7 +116,7 @@
109
116
  "validate-npm-package-name": "^3.0.0",
110
117
  "webpack": "^4.44.2",
111
118
  "webpack-cli": "^3.3.12",
112
- "webpack-dev-server": "^3.11.0",
119
+ "webpack-dev-server": "^3.11.3",
113
120
  "which": "^2.0.2",
114
121
  "yargs": "^16.1.0"
115
122
  }
@@ -0,0 +1,20 @@
1
+ #!/bin/bash
2
+
3
+ # This way you can customize which branches should be skipped when
4
+ # prepending commit message.
5
+ if [ -z "$BRANCHES_TO_SKIP" ]; then
6
+ BRANCHES_TO_SKIP=(master)
7
+ fi
8
+
9
+ # Get the current branch name
10
+ BRANCH_NAME=$(git symbolic-ref --short HEAD)
11
+
12
+ # Strip any leading prefix, up to and including, the last "/". e.g. turn "feature/ISSUE-1234" into "ISSUE-1234"
13
+ BRANCH_NAME="${BRANCH_NAME##*/}"
14
+
15
+ BRANCH_EXCLUDED=$(printf "%s\n" "${BRANCHES_TO_SKIP[@]}" | grep -c "^$BRANCH_NAME$")
16
+ BRANCH_IN_COMMIT=$(grep -c "^$BRANCH_NAME" $1)
17
+
18
+ if [ -n "$BRANCH_NAME" ] && ! [[ $BRANCH_EXCLUDED -eq 1 ]] && ! [[ $BRANCH_IN_COMMIT -ge 1 ]]; then
19
+ sed -i.bak -e "1s/^/$BRANCH_NAME /" $1
20
+ fi