@sudoplatform/sudo-common 6.0.0 → 6.0.1
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,20 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
|
|
3
|
+
yarn outdated --json | jq -s -c 'map(select(.type == "table").data.body) | .[] | unique_by(.[0]) | .[] | .[0]' | (new=""; while read package_name ; do
|
|
4
|
+
suppression=$(jq ".outdatedSuppressions[$package_name] | select (. != null)" package.json)
|
|
5
|
+
if [ -z "$suppression" ]; then
|
|
6
|
+
echo "New outdated_package ${package_name}:"
|
|
7
|
+
echo "${package_name}" | jq .
|
|
8
|
+
new=1
|
|
9
|
+
elif [ $(date '+%s') -gt "$suppression" ]; then
|
|
10
|
+
echo "Suppression for outdated_package ${package_name} has expired. Please revisit:"
|
|
11
|
+
echo "${package_name}" | jq .
|
|
12
|
+
new=1
|
|
13
|
+
else
|
|
14
|
+
echo "outdated_package ${package_name} is suppressed"
|
|
15
|
+
fi
|
|
16
|
+
done
|
|
17
|
+
if [ -n "${new}" ]; then
|
|
18
|
+
exit 1
|
|
19
|
+
fi
|
|
20
|
+
)
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
#
|
|
3
|
+
# Insert a package name to suppress in outdated checks.
|
|
4
|
+
#
|
|
5
|
+
|
|
6
|
+
package_name=$1
|
|
7
|
+
PACKAGE_JSON="package.json"
|
|
8
|
+
|
|
9
|
+
if [ -z "$package_name" ]; then
|
|
10
|
+
echo "Usage: yarn suppress-outdated <package name>"
|
|
11
|
+
exit 1
|
|
12
|
+
fi
|
|
13
|
+
cp $PACKAGE_JSON $PACKAGE_JSON.old
|
|
14
|
+
cat $PACKAGE_JSON | jq ".outdatedSuppressions.\"$package_name\" = (now | floor | . + 1209600)" > $PACKAGE_JSON.staging
|
|
15
|
+
mv $PACKAGE_JSON.staging $PACKAGE_JSON
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
|
|
3
|
+
yarn outdated --json | jq -s -c 'map(select(.type == "table").data.body) | .[] | unique_by(.[0]) | .[] | .[0]' | (new=""; while read package_name ; do
|
|
4
|
+
suppression=$(jq ".outdatedSuppressions[$package_name] | select (. != null)" package.json)
|
|
5
|
+
if [ -z "$suppression" ]; then
|
|
6
|
+
echo "New outdated_package ${package_name}:"
|
|
7
|
+
echo "${package_name}" | jq .
|
|
8
|
+
new=1
|
|
9
|
+
elif [ $(date '+%s') -gt "$suppression" ]; then
|
|
10
|
+
echo "Suppression for outdated_package ${package_name} has expired. Please revisit:"
|
|
11
|
+
echo "${package_name}" | jq .
|
|
12
|
+
new=1
|
|
13
|
+
else
|
|
14
|
+
echo "outdated_package ${package_name} is suppressed"
|
|
15
|
+
fi
|
|
16
|
+
done
|
|
17
|
+
if [ -n "${new}" ]; then
|
|
18
|
+
exit 1
|
|
19
|
+
fi
|
|
20
|
+
)
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
#
|
|
3
|
+
# Insert a package name to suppress in outdated checks.
|
|
4
|
+
#
|
|
5
|
+
|
|
6
|
+
package_name=$1
|
|
7
|
+
PACKAGE_JSON="package.json"
|
|
8
|
+
|
|
9
|
+
if [ -z "$package_name" ]; then
|
|
10
|
+
echo "Usage: yarn suppress-outdated <package name>"
|
|
11
|
+
exit 1
|
|
12
|
+
fi
|
|
13
|
+
cp $PACKAGE_JSON $PACKAGE_JSON.old
|
|
14
|
+
cat $PACKAGE_JSON | jq ".outdatedSuppressions.\"$package_name\" = (now | floor | . + 1209600)" > $PACKAGE_JSON.staging
|
|
15
|
+
mv $PACKAGE_JSON.staging $PACKAGE_JSON
|
package/github/package.json
CHANGED
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
"license": "Apache-2.0",
|
|
10
10
|
"scripts": {
|
|
11
11
|
"audit-with-suppressions": "bin/yarn-audit-with-suppression.sh",
|
|
12
|
+
"outdated-with-suppressions": "bin/yarn-outdated-with-suppression.sh",
|
|
12
13
|
"clean": "rimraf ./lib ./test-lib",
|
|
13
14
|
"lint": "yarn lint:eslint && yarn lint:prettier",
|
|
14
15
|
"lint:eslint": "eslint \"{bin,integration-tests,src,test}/**/*.{ts,tsx}\"",
|
|
@@ -24,7 +25,9 @@
|
|
|
24
25
|
"types": "./lib/index.d.ts",
|
|
25
26
|
"bin": {
|
|
26
27
|
"audit-with-suppressions": "bin/yarn-audit-with-suppression.sh",
|
|
27
|
-
"suppress-audit": "bin/suppress-audit.sh"
|
|
28
|
+
"suppress-audit": "bin/suppress-audit.sh",
|
|
29
|
+
"outdated-with-suppressions": "bin/yarn-outdated-with-suppression.sh",
|
|
30
|
+
"suppress-outdated": "bin/suppress-outdated.sh"
|
|
28
31
|
},
|
|
29
32
|
"files": [
|
|
30
33
|
"lib",
|
|
@@ -72,4 +75,4 @@
|
|
|
72
75
|
"typedoc": "^0.22.6",
|
|
73
76
|
"typescript": "^4.4.4"
|
|
74
77
|
}
|
|
75
|
-
}
|
|
78
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sudoplatform/sudo-common",
|
|
3
|
-
"version": "6.0.
|
|
3
|
+
"version": "6.0.1",
|
|
4
4
|
"author": "Anonyome Labs, Inc.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
"license": "Apache-2.0",
|
|
10
10
|
"scripts": {
|
|
11
11
|
"audit-with-suppressions": "bin/yarn-audit-with-suppression.sh",
|
|
12
|
+
"outdated-with-suppressions": "bin/yarn-outdated-with-suppression.sh",
|
|
12
13
|
"clean": "rimraf ./lib ./test-lib",
|
|
13
14
|
"lint": "yarn lint:eslint && yarn lint:prettier",
|
|
14
15
|
"lint:eslint": "eslint \"{bin,integration-tests,src,test}/**/*.{ts,tsx}\"",
|
|
@@ -24,7 +25,9 @@
|
|
|
24
25
|
"types": "./lib/index.d.ts",
|
|
25
26
|
"bin": {
|
|
26
27
|
"audit-with-suppressions": "bin/yarn-audit-with-suppression.sh",
|
|
27
|
-
"suppress-audit": "bin/suppress-audit.sh"
|
|
28
|
+
"suppress-audit": "bin/suppress-audit.sh",
|
|
29
|
+
"outdated-with-suppressions": "bin/yarn-outdated-with-suppression.sh",
|
|
30
|
+
"suppress-outdated": "bin/suppress-outdated.sh"
|
|
28
31
|
},
|
|
29
32
|
"files": [
|
|
30
33
|
"lib",
|