btrz-liquid-templates 2.0.1 → 2.1.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/.githooks/pre-commit +18 -0
- package/package.json +5 -4
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
# btrz-banned-libs-hook-v1
|
|
3
|
+
set -eu
|
|
4
|
+
|
|
5
|
+
DIFF_CONTENT=$(git diff --cached -U0 -- package.json package-lock.json npm-shrinkwrap.json yarn.lock pnpm-lock.yaml 2>/dev/null || true)
|
|
6
|
+
|
|
7
|
+
if [ -z "$DIFF_CONTENT" ]; then
|
|
8
|
+
exit 0
|
|
9
|
+
fi
|
|
10
|
+
|
|
11
|
+
if printf '%s
|
|
12
|
+
' "$DIFF_CONTENT" | rg -q '^\+.*("(lodash|mocha|chai|sinon)"|lodash@|mocha@|chai@|sinon@)'; then
|
|
13
|
+
echo ""
|
|
14
|
+
echo "Commit blocked: adding banned libraries is not allowed (lodash, mocha, chai, sinon)."
|
|
15
|
+
echo "Remove the staged dependency/lockfile additions and retry."
|
|
16
|
+
echo ""
|
|
17
|
+
exit 1
|
|
18
|
+
fi
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "btrz-liquid-templates",
|
|
3
|
-
"version": "2.0
|
|
3
|
+
"version": "2.1.0",
|
|
4
4
|
"description": "Extension and helpers for liquid templates to deal with our data and other things we need to encapsulate",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -8,7 +8,8 @@
|
|
|
8
8
|
"test": "node --test test/*-test.js",
|
|
9
9
|
"preversion": "npm test",
|
|
10
10
|
"postversion": "git push origin main && git push --tags",
|
|
11
|
-
"version": "git tag $1"
|
|
11
|
+
"version": "git tag $1",
|
|
12
|
+
"prepare": "git config core.hooksPath .githooks"
|
|
12
13
|
},
|
|
13
14
|
"repository": {
|
|
14
15
|
"type": "git",
|
|
@@ -22,9 +23,9 @@
|
|
|
22
23
|
"homepage": "https://github.com/Betterez/btrz-liquid-templates#readme",
|
|
23
24
|
"dependencies": {
|
|
24
25
|
"axios": "1.18.1",
|
|
25
|
-
"btrz-formatter": "1.
|
|
26
|
+
"btrz-formatter": "1.8.0",
|
|
26
27
|
"bwip-js": "^4.11.2",
|
|
27
|
-
"bz-date": "2.
|
|
28
|
+
"bz-date": "2.4.0",
|
|
28
29
|
"liquidjs": "10.27.1",
|
|
29
30
|
"moment": "2.30.1",
|
|
30
31
|
"moment-timezone": "0.6.2",
|