@bigbinary/neeto-audit-frontend 2.1.0 → 2.1.2
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/.neetoci/bump_version.yml +14 -0
- package/.nvmrc +1 -1
- package/.scripts/bump_version.sh +67 -0
- package/common/.husky/common/helpers/lint_staged.sh +0 -0
- package/common/.husky/common/helpers/neeto_audit_frontend.sh +0 -0
- package/common/.husky/common/helpers/prevent_conflict_markers.sh +0 -0
- package/common/.husky/common/helpers/prevent_pushing_to_main.sh +0 -0
- package/common/.husky/common/pre-commit +0 -0
- package/common/.husky/extension/pre-push +0 -0
- package/common/.husky/frontend/pre-push +0 -0
- package/common/.husky/nano/pre-push +0 -0
- package/common/.husky/widget/pre-push +0 -0
- package/common/recommendedDependencies/common.js +0 -2
- package/common/recommendedDependencies/frontend.js +3 -1
- package/common/recommendedDependencies/nano.js +0 -2
- package/dist/index.js +63 -253
- package/package.json +8 -8
- package/src/cli.js +0 -0
- package/src/verifiers/recommendedPackageVersions/constants.js +6 -0
- package/src/verifiers/recommendedPackageVersions/index.js +2 -1
- package/src/verifiers/recommendedPackageVersions/utils.js +22 -21
- package/.github/workflows/auto_rebase_from_main.yml +0 -15
- package/.github/workflows/create_and_publish_release.yml +0 -99
package/.nvmrc
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
22.13
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
install_gh() {
|
|
2
|
+
type -p curl >/dev/null || sudo apt install curl -y
|
|
3
|
+
curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg
|
|
4
|
+
sudo chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg
|
|
5
|
+
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list >/dev/null
|
|
6
|
+
sudo apt update
|
|
7
|
+
sudo apt install gh -y
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
bump_package() {
|
|
11
|
+
echo "== Bump the PNPM package version =="
|
|
12
|
+
npm install -g pnpm
|
|
13
|
+
pnpm install
|
|
14
|
+
pnpm build
|
|
15
|
+
pnpm config set version-tag-prefix "v"
|
|
16
|
+
pnpm version "$VERSION_LABEL" --no-git-tag-version
|
|
17
|
+
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" >~/.npmrc
|
|
18
|
+
pnpm publish --no-git-checks
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
raise_pr() {
|
|
22
|
+
git config user.name "Thejus Paul"
|
|
23
|
+
git config user.email "thejuspaul@pm.me"
|
|
24
|
+
git config core.hooksPath /dev/null
|
|
25
|
+
git push origin --delete bump-version
|
|
26
|
+
git checkout -b bump-version
|
|
27
|
+
git add -A
|
|
28
|
+
git commit -m "Bump version"
|
|
29
|
+
git push --set-upstream origin bump-version
|
|
30
|
+
gh pr create -B main -H bump-version -t "Bump version" -b "This is an automated PR." -l mergepr -a @me
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
install_gh
|
|
34
|
+
|
|
35
|
+
LATEST_COMMIT_SHA=$(git log -1 --pretty=format:"%H")
|
|
36
|
+
echo "Latest commit SHA: $LATEST_COMMIT_SHA"
|
|
37
|
+
|
|
38
|
+
PR_NUMBER=$(gh pr list --state merged --search "$LATEST_COMMIT_SHA" --json number --jq ".[0].number")
|
|
39
|
+
echo "Last merged PR number: $PR_NUMBER"
|
|
40
|
+
|
|
41
|
+
PR_LABELS=$(gh pr view $PR_NUMBER --json labels --jq ".labels[].name" | tr "\n" " " | cut -d " " -f 1-)
|
|
42
|
+
echo "PR labels: $PR_LABELS"
|
|
43
|
+
|
|
44
|
+
[[ -z "$PR_LABELS" ]] && exit 0
|
|
45
|
+
|
|
46
|
+
ALL_VERSION_LABELS=(major minor patch)
|
|
47
|
+
|
|
48
|
+
PR_VERSION_LABELS=()
|
|
49
|
+
for version_label in "${ALL_VERSION_LABELS[@]}"; do
|
|
50
|
+
if echo "$PR_LABELS" | grep -q -o "$version_label"; then
|
|
51
|
+
PR_VERSION_LABELS+=("$version_label")
|
|
52
|
+
fi
|
|
53
|
+
done
|
|
54
|
+
|
|
55
|
+
PR_VERSION_LABELS_STR="${PR_VERSION_LABELS[*]}"
|
|
56
|
+
echo "Semantic versions present in PR labels: $PR_VERSION_LABELS_STR"
|
|
57
|
+
|
|
58
|
+
VERSION_LABEL=$(echo "${PR_VERSION_LABELS[0]}" | xargs)
|
|
59
|
+
echo "Version label selected: $VERSION_LABEL"
|
|
60
|
+
|
|
61
|
+
if [[ -n "$VERSION_LABEL" ]]; then
|
|
62
|
+
bump_package
|
|
63
|
+
else
|
|
64
|
+
echo "PR label doesn't exist"
|
|
65
|
+
fi
|
|
66
|
+
|
|
67
|
+
raise_pr
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -8,8 +8,6 @@ const DEV_DEPENDENCIES = {
|
|
|
8
8
|
"@babel/preset-react": "7.25.9",
|
|
9
9
|
"@babel/preset-typescript": "7.26.0",
|
|
10
10
|
"@babel/runtime": "7.26.0",
|
|
11
|
-
"@bigbinary/babel-preset-neeto": "1.0.8",
|
|
12
|
-
"@bigbinary/eslint-plugin-neeto": "1.5.2",
|
|
13
11
|
"autoprefixer": "10.4.20",
|
|
14
12
|
"babel-loader": "^8.2.5",
|
|
15
13
|
"babel-plugin-istanbul": "^6.1.1",
|
|
@@ -22,6 +22,8 @@ const DEV_DEPENDENCIES = {
|
|
|
22
22
|
"classnames": "2.5.1",
|
|
23
23
|
"crypto-browserify": "3.12.1",
|
|
24
24
|
"dayjs": "1.11.13",
|
|
25
|
+
"dompurify": "^2.4.0",
|
|
26
|
+
"emoji-mart": "5.6.0",
|
|
25
27
|
"formik": "2.4.6",
|
|
26
28
|
"framer-motion": "11.11.11",
|
|
27
29
|
"husky": "7.0.4",
|
|
@@ -54,7 +56,7 @@ const DEV_DEPENDENCIES = {
|
|
|
54
56
|
"sass-loader": "^13.0.2",
|
|
55
57
|
"stream-browserify": "^3.0.0",
|
|
56
58
|
"stream-http": "3.2.0",
|
|
57
|
-
"tailwindcss": "
|
|
59
|
+
"tailwindcss": "3.4.14",
|
|
58
60
|
"tippy.js": "6.3.7",
|
|
59
61
|
"tty-browserify": "0.0.1",
|
|
60
62
|
"url": "0.11.4",
|
package/dist/index.js
CHANGED
|
@@ -645,37 +645,6 @@ createChalk({level: stderrColor ? stderrColor.level : 0});
|
|
|
645
645
|
|
|
646
646
|
var chalk$1 = chalk;
|
|
647
647
|
|
|
648
|
-
/**
|
|
649
|
-
* A special placeholder value used to specify "gaps" within curried functions,
|
|
650
|
-
* allowing partial application of any combination of arguments, regardless of
|
|
651
|
-
* their positions.
|
|
652
|
-
*
|
|
653
|
-
* If `g` is a curried ternary function and `_` is `R.__`, the following are
|
|
654
|
-
* equivalent:
|
|
655
|
-
*
|
|
656
|
-
* - `g(1, 2, 3)`
|
|
657
|
-
* - `g(_, 2, 3)(1)`
|
|
658
|
-
* - `g(_, _, 3)(1)(2)`
|
|
659
|
-
* - `g(_, _, 3)(1, 2)`
|
|
660
|
-
* - `g(_, 2, _)(1, 3)`
|
|
661
|
-
* - `g(_, 2)(1)(3)`
|
|
662
|
-
* - `g(_, 2)(1, 3)`
|
|
663
|
-
* - `g(_, 2)(_, 3)(1)`
|
|
664
|
-
*
|
|
665
|
-
* @name __
|
|
666
|
-
* @constant
|
|
667
|
-
* @memberOf R
|
|
668
|
-
* @since v0.6.0
|
|
669
|
-
* @category Function
|
|
670
|
-
* @example
|
|
671
|
-
*
|
|
672
|
-
* const greet = R.replace('{name}', R.__, 'Hello, {name}!');
|
|
673
|
-
* greet('Alice'); //=> 'Hello, Alice!'
|
|
674
|
-
*/
|
|
675
|
-
var __ = {
|
|
676
|
-
'@@functional/placeholder': true
|
|
677
|
-
};
|
|
678
|
-
|
|
679
648
|
function _isPlaceholder(a) {
|
|
680
649
|
return a != null && typeof a === 'object' && a['@@functional/placeholder'] === true;
|
|
681
650
|
}
|
|
@@ -1038,13 +1007,6 @@ function _dispatchable(methodNames, transducerCreator, fn) {
|
|
|
1038
1007
|
};
|
|
1039
1008
|
}
|
|
1040
1009
|
|
|
1041
|
-
function _reduced(x) {
|
|
1042
|
-
return x && x['@@transducer/reduced'] ? x : {
|
|
1043
|
-
'@@transducer/value': x,
|
|
1044
|
-
'@@transducer/reduced': true
|
|
1045
|
-
};
|
|
1046
|
-
}
|
|
1047
|
-
|
|
1048
1010
|
var _xfBase = {
|
|
1049
1011
|
init: function () {
|
|
1050
1012
|
return this.xf['@@transducer/init']();
|
|
@@ -2168,63 +2130,6 @@ var complement =
|
|
|
2168
2130
|
/*#__PURE__*/
|
|
2169
2131
|
lift(not$1);
|
|
2170
2132
|
|
|
2171
|
-
/**
|
|
2172
|
-
* This checks whether a function has a [methodname] function. If it isn't an
|
|
2173
|
-
* array it will execute that function otherwise it will default to the ramda
|
|
2174
|
-
* implementation.
|
|
2175
|
-
*
|
|
2176
|
-
* @private
|
|
2177
|
-
* @param {Function} fn ramda implementation
|
|
2178
|
-
* @param {String} methodname property to check for a custom implementation
|
|
2179
|
-
* @return {Object} Whatever the return value of the method is.
|
|
2180
|
-
*/
|
|
2181
|
-
|
|
2182
|
-
function _checkForMethod(methodname, fn) {
|
|
2183
|
-
return function () {
|
|
2184
|
-
var length = arguments.length;
|
|
2185
|
-
|
|
2186
|
-
if (length === 0) {
|
|
2187
|
-
return fn();
|
|
2188
|
-
}
|
|
2189
|
-
|
|
2190
|
-
var obj = arguments[length - 1];
|
|
2191
|
-
return _isArray(obj) || typeof obj[methodname] !== 'function' ? fn.apply(this, arguments) : obj[methodname].apply(obj, Array.prototype.slice.call(arguments, 0, length - 1));
|
|
2192
|
-
};
|
|
2193
|
-
}
|
|
2194
|
-
|
|
2195
|
-
/**
|
|
2196
|
-
* Returns the elements of the given list or string (or object with a `slice`
|
|
2197
|
-
* method) from `fromIndex` (inclusive) to `toIndex` (exclusive).
|
|
2198
|
-
*
|
|
2199
|
-
* Dispatches to the `slice` method of the third argument, if present.
|
|
2200
|
-
*
|
|
2201
|
-
* @func
|
|
2202
|
-
* @memberOf R
|
|
2203
|
-
* @since v0.1.4
|
|
2204
|
-
* @category List
|
|
2205
|
-
* @sig Number -> Number -> [a] -> [a]
|
|
2206
|
-
* @sig Number -> Number -> String -> String
|
|
2207
|
-
* @param {Number} fromIndex The start index (inclusive).
|
|
2208
|
-
* @param {Number} toIndex The end index (exclusive).
|
|
2209
|
-
* @param {*} list
|
|
2210
|
-
* @return {*}
|
|
2211
|
-
* @example
|
|
2212
|
-
*
|
|
2213
|
-
* R.slice(1, 3, ['a', 'b', 'c', 'd']); //=> ['b', 'c']
|
|
2214
|
-
* R.slice(1, Infinity, ['a', 'b', 'c', 'd']); //=> ['b', 'c', 'd']
|
|
2215
|
-
* R.slice(0, -1, ['a', 'b', 'c', 'd']); //=> ['a', 'b', 'c']
|
|
2216
|
-
* R.slice(-3, -1, ['a', 'b', 'c', 'd']); //=> ['b', 'c']
|
|
2217
|
-
* R.slice(0, 3, 'ramda'); //=> 'ram'
|
|
2218
|
-
*/
|
|
2219
|
-
|
|
2220
|
-
var slice =
|
|
2221
|
-
/*#__PURE__*/
|
|
2222
|
-
_curry3(
|
|
2223
|
-
/*#__PURE__*/
|
|
2224
|
-
_checkForMethod('slice', function slice(fromIndex, toIndex, list) {
|
|
2225
|
-
return Array.prototype.slice.call(list, fromIndex, toIndex);
|
|
2226
|
-
}));
|
|
2227
|
-
|
|
2228
2133
|
function _identity(x) {
|
|
2229
2134
|
return x;
|
|
2230
2135
|
}
|
|
@@ -2309,85 +2214,6 @@ _curry1(function curry(fn) {
|
|
|
2309
2214
|
return curryN$1(fn.length, fn);
|
|
2310
2215
|
});
|
|
2311
2216
|
|
|
2312
|
-
var XTake =
|
|
2313
|
-
/*#__PURE__*/
|
|
2314
|
-
function () {
|
|
2315
|
-
function XTake(n, xf) {
|
|
2316
|
-
this.xf = xf;
|
|
2317
|
-
this.n = n;
|
|
2318
|
-
this.i = 0;
|
|
2319
|
-
}
|
|
2320
|
-
|
|
2321
|
-
XTake.prototype['@@transducer/init'] = _xfBase.init;
|
|
2322
|
-
XTake.prototype['@@transducer/result'] = _xfBase.result;
|
|
2323
|
-
|
|
2324
|
-
XTake.prototype['@@transducer/step'] = function (result, input) {
|
|
2325
|
-
this.i += 1;
|
|
2326
|
-
var ret = this.n === 0 ? result : this.xf['@@transducer/step'](result, input);
|
|
2327
|
-
return this.n >= 0 && this.i >= this.n ? _reduced(ret) : ret;
|
|
2328
|
-
};
|
|
2329
|
-
|
|
2330
|
-
return XTake;
|
|
2331
|
-
}();
|
|
2332
|
-
|
|
2333
|
-
function _xtake(n) {
|
|
2334
|
-
return function (xf) {
|
|
2335
|
-
return new XTake(n, xf);
|
|
2336
|
-
};
|
|
2337
|
-
}
|
|
2338
|
-
|
|
2339
|
-
/**
|
|
2340
|
-
* Returns the first `n` elements of the given list, string, or
|
|
2341
|
-
* transducer/transformer (or object with a `take` method).
|
|
2342
|
-
*
|
|
2343
|
-
* Dispatches to the `take` method of the second argument, if present.
|
|
2344
|
-
*
|
|
2345
|
-
* @func
|
|
2346
|
-
* @memberOf R
|
|
2347
|
-
* @since v0.1.0
|
|
2348
|
-
* @category List
|
|
2349
|
-
* @sig Number -> [a] -> [a]
|
|
2350
|
-
* @sig Number -> String -> String
|
|
2351
|
-
* @param {Number} n
|
|
2352
|
-
* @param {*} list
|
|
2353
|
-
* @return {*}
|
|
2354
|
-
* @see R.drop
|
|
2355
|
-
* @example
|
|
2356
|
-
*
|
|
2357
|
-
* R.take(1, ['foo', 'bar', 'baz']); //=> ['foo']
|
|
2358
|
-
* R.take(2, ['foo', 'bar', 'baz']); //=> ['foo', 'bar']
|
|
2359
|
-
* R.take(3, ['foo', 'bar', 'baz']); //=> ['foo', 'bar', 'baz']
|
|
2360
|
-
* R.take(4, ['foo', 'bar', 'baz']); //=> ['foo', 'bar', 'baz']
|
|
2361
|
-
* R.take(3, 'ramda'); //=> 'ram'
|
|
2362
|
-
*
|
|
2363
|
-
* const personnel = [
|
|
2364
|
-
* 'Dave Brubeck',
|
|
2365
|
-
* 'Paul Desmond',
|
|
2366
|
-
* 'Eugene Wright',
|
|
2367
|
-
* 'Joe Morello',
|
|
2368
|
-
* 'Gerry Mulligan',
|
|
2369
|
-
* 'Bob Bates',
|
|
2370
|
-
* 'Joe Dodge',
|
|
2371
|
-
* 'Ron Crotty'
|
|
2372
|
-
* ];
|
|
2373
|
-
*
|
|
2374
|
-
* const takeFive = R.take(5);
|
|
2375
|
-
* takeFive(personnel);
|
|
2376
|
-
* //=> ['Dave Brubeck', 'Paul Desmond', 'Eugene Wright', 'Joe Morello', 'Gerry Mulligan']
|
|
2377
|
-
* @symb R.take(-1, [a, b]) = [a, b]
|
|
2378
|
-
* @symb R.take(0, [a, b]) = []
|
|
2379
|
-
* @symb R.take(1, [a, b]) = [a]
|
|
2380
|
-
* @symb R.take(2, [a, b]) = [a, b]
|
|
2381
|
-
*/
|
|
2382
|
-
|
|
2383
|
-
var take =
|
|
2384
|
-
/*#__PURE__*/
|
|
2385
|
-
_curry2(
|
|
2386
|
-
/*#__PURE__*/
|
|
2387
|
-
_dispatchable(['take'], _xtake, function take(n, xs) {
|
|
2388
|
-
return slice(0, n < 0 ? Infinity : n, xs);
|
|
2389
|
-
}));
|
|
2390
|
-
|
|
2391
2217
|
/**
|
|
2392
2218
|
* Returns the last element of the given list or string.
|
|
2393
2219
|
*
|
|
@@ -2526,33 +2352,6 @@ _curry1(function fromPairs(pairs) {
|
|
|
2526
2352
|
return result;
|
|
2527
2353
|
});
|
|
2528
2354
|
|
|
2529
|
-
/**
|
|
2530
|
-
* Returns `true` if the specified value is equal, in [`R.equals`](#equals)
|
|
2531
|
-
* terms, to at least one element of the given list; `false` otherwise.
|
|
2532
|
-
* Also works with strings.
|
|
2533
|
-
*
|
|
2534
|
-
* @func
|
|
2535
|
-
* @memberOf R
|
|
2536
|
-
* @since v0.26.0
|
|
2537
|
-
* @category List
|
|
2538
|
-
* @sig a -> [a] -> Boolean
|
|
2539
|
-
* @param {Object} a The item to compare against.
|
|
2540
|
-
* @param {Array} list The array to consider.
|
|
2541
|
-
* @return {Boolean} `true` if an equivalent item is in the list, `false` otherwise.
|
|
2542
|
-
* @see R.any
|
|
2543
|
-
* @example
|
|
2544
|
-
*
|
|
2545
|
-
* R.includes(3, [1, 2, 3]); //=> true
|
|
2546
|
-
* R.includes(4, [1, 2, 3]); //=> false
|
|
2547
|
-
* R.includes({ name: 'Fred' }, [{ name: 'Fred' }]); //=> true
|
|
2548
|
-
* R.includes([42], [[42]]); //=> true
|
|
2549
|
-
* R.includes('ba', 'banana'); //=>true
|
|
2550
|
-
*/
|
|
2551
|
-
|
|
2552
|
-
var includes =
|
|
2553
|
-
/*#__PURE__*/
|
|
2554
|
-
_curry2(_includes);
|
|
2555
|
-
|
|
2556
2355
|
/**
|
|
2557
2356
|
* Creates an object containing a single key:value pair.
|
|
2558
2357
|
*
|
|
@@ -2852,6 +2651,45 @@ _curry2(function mergeDeepRight(lObj, rObj) {
|
|
|
2852
2651
|
}, lObj, rObj);
|
|
2853
2652
|
});
|
|
2854
2653
|
|
|
2654
|
+
/**
|
|
2655
|
+
* Returns a partial copy of an object omitting the keys specified.
|
|
2656
|
+
*
|
|
2657
|
+
* @func
|
|
2658
|
+
* @memberOf R
|
|
2659
|
+
* @since v0.1.0
|
|
2660
|
+
* @category Object
|
|
2661
|
+
* @sig [String] -> {String: *} -> {String: *}
|
|
2662
|
+
* @param {Array} names an array of String property names to omit from the new object
|
|
2663
|
+
* @param {Object} obj The object to copy from
|
|
2664
|
+
* @return {Object} A new object with properties from `names` not on it.
|
|
2665
|
+
* @see R.pick
|
|
2666
|
+
* @example
|
|
2667
|
+
*
|
|
2668
|
+
* R.omit(['a', 'd'], {a: 1, b: 2, c: 3, d: 4}); //=> {b: 2, c: 3}
|
|
2669
|
+
*/
|
|
2670
|
+
|
|
2671
|
+
var omit =
|
|
2672
|
+
/*#__PURE__*/
|
|
2673
|
+
_curry2(function omit(names, obj) {
|
|
2674
|
+
var result = {};
|
|
2675
|
+
var index = {};
|
|
2676
|
+
var idx = 0;
|
|
2677
|
+
var len = names.length;
|
|
2678
|
+
|
|
2679
|
+
while (idx < len) {
|
|
2680
|
+
index[names[idx]] = 1;
|
|
2681
|
+
idx += 1;
|
|
2682
|
+
}
|
|
2683
|
+
|
|
2684
|
+
for (var prop in obj) {
|
|
2685
|
+
if (!index.hasOwnProperty(prop)) {
|
|
2686
|
+
result[prop] = obj[prop];
|
|
2687
|
+
}
|
|
2688
|
+
}
|
|
2689
|
+
|
|
2690
|
+
return result;
|
|
2691
|
+
});
|
|
2692
|
+
|
|
2855
2693
|
/**
|
|
2856
2694
|
* Returns a partial copy of an object containing only the keys specified. If
|
|
2857
2695
|
* the key does not exist, the property is ignored.
|
|
@@ -2948,35 +2786,6 @@ var split =
|
|
|
2948
2786
|
/*#__PURE__*/
|
|
2949
2787
|
invoker(1, 'split');
|
|
2950
2788
|
|
|
2951
|
-
/**
|
|
2952
|
-
* Checks if a list starts with the provided sublist.
|
|
2953
|
-
*
|
|
2954
|
-
* Similarly, checks if a string starts with the provided substring.
|
|
2955
|
-
*
|
|
2956
|
-
* @func
|
|
2957
|
-
* @memberOf R
|
|
2958
|
-
* @since v0.24.0
|
|
2959
|
-
* @category List
|
|
2960
|
-
* @sig [a] -> [a] -> Boolean
|
|
2961
|
-
* @sig String -> String -> Boolean
|
|
2962
|
-
* @param {*} prefix
|
|
2963
|
-
* @param {*} list
|
|
2964
|
-
* @return {Boolean}
|
|
2965
|
-
* @see R.endsWith
|
|
2966
|
-
* @example
|
|
2967
|
-
*
|
|
2968
|
-
* R.startsWith('a', 'abc') //=> true
|
|
2969
|
-
* R.startsWith('b', 'abc') //=> false
|
|
2970
|
-
* R.startsWith(['a'], ['a', 'b', 'c']) //=> true
|
|
2971
|
-
* R.startsWith(['b'], ['a', 'b', 'c']) //=> false
|
|
2972
|
-
*/
|
|
2973
|
-
|
|
2974
|
-
var startsWith =
|
|
2975
|
-
/*#__PURE__*/
|
|
2976
|
-
_curry2(function (prefix, list) {
|
|
2977
|
-
return equals(take(prefix.length, list), prefix);
|
|
2978
|
-
});
|
|
2979
|
-
|
|
2980
2789
|
/**
|
|
2981
2790
|
* Converts an object into an array of key, value arrays. Only the object's
|
|
2982
2791
|
* own properties are used.
|
|
@@ -3855,9 +3664,6 @@ var findBy = /*#__PURE__*/curry(function (pattern, array) {
|
|
|
3855
3664
|
var existsBy = /*#__PURE__*/curry(function (pattern, array) {
|
|
3856
3665
|
return array.some(matches(pattern));
|
|
3857
3666
|
});
|
|
3858
|
-
var filterBy = /*#__PURE__*/curry(function (pattern, array) {
|
|
3859
|
-
return array.filter(matches(pattern));
|
|
3860
|
-
});
|
|
3861
3667
|
|
|
3862
3668
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
3863
3669
|
|
|
@@ -16106,8 +15912,6 @@ const DEV_DEPENDENCIES$4 = {
|
|
|
16106
15912
|
"@babel/preset-react": "7.25.9",
|
|
16107
15913
|
"@babel/preset-typescript": "7.26.0",
|
|
16108
15914
|
"@babel/runtime": "7.26.0",
|
|
16109
|
-
"@bigbinary/babel-preset-neeto": "1.0.8",
|
|
16110
|
-
"@bigbinary/eslint-plugin-neeto": "1.5.2",
|
|
16111
15915
|
"autoprefixer": "10.4.20",
|
|
16112
15916
|
"babel-loader": "^8.2.5",
|
|
16113
15917
|
"babel-plugin-istanbul": "^6.1.1",
|
|
@@ -16203,6 +16007,8 @@ const DEV_DEPENDENCIES$2 = {
|
|
|
16203
16007
|
"classnames": "2.5.1",
|
|
16204
16008
|
"crypto-browserify": "3.12.1",
|
|
16205
16009
|
"dayjs": "1.11.13",
|
|
16010
|
+
"dompurify": "^2.4.0",
|
|
16011
|
+
"emoji-mart": "5.6.0",
|
|
16206
16012
|
"formik": "2.4.6",
|
|
16207
16013
|
"framer-motion": "11.11.11",
|
|
16208
16014
|
"husky": "7.0.4",
|
|
@@ -16235,7 +16041,7 @@ const DEV_DEPENDENCIES$2 = {
|
|
|
16235
16041
|
"sass-loader": "^13.0.2",
|
|
16236
16042
|
"stream-browserify": "^3.0.0",
|
|
16237
16043
|
"stream-http": "3.2.0",
|
|
16238
|
-
"tailwindcss": "
|
|
16044
|
+
"tailwindcss": "3.4.14",
|
|
16239
16045
|
"tippy.js": "6.3.7",
|
|
16240
16046
|
"tty-browserify": "0.0.1",
|
|
16241
16047
|
"url": "0.11.4",
|
|
@@ -16305,8 +16111,6 @@ var frontend = {
|
|
|
16305
16111
|
const DEPENDENCIES$1 = {};
|
|
16306
16112
|
|
|
16307
16113
|
const DEV_DEPENDENCIES$1 = {
|
|
16308
|
-
"@bigbinary/neeto-filters-frontend": "latest",
|
|
16309
|
-
"@bigbinary/neeto-molecules": "latest",
|
|
16310
16114
|
"@faker-js/faker": "8.2.0",
|
|
16311
16115
|
"@honeybadger-io/js": "6.10.1",
|
|
16312
16116
|
"@honeybadger-io/react": "6.1.25",
|
|
@@ -34026,12 +33830,13 @@ const MAX_RETRIES = 3;
|
|
|
34026
33830
|
|
|
34027
33831
|
const REQUEST_DELAY = 5_000;
|
|
34028
33832
|
|
|
34029
|
-
const
|
|
34030
|
-
|
|
34031
|
-
|
|
34032
|
-
|
|
33833
|
+
const BIGBINARY_DEV_PACKAGES = [
|
|
33834
|
+
"@bigbinary/eslint-plugin-neeto",
|
|
33835
|
+
"@bigbinary/babel-preset-neeto",
|
|
33836
|
+
"@bigbinary/neeto-audit-frontend",
|
|
33837
|
+
];
|
|
34033
33838
|
|
|
34034
|
-
|
|
33839
|
+
const addBigbinaryPackagesToRecommendedList = async (recommendedList) => {
|
|
34035
33840
|
let retries = 0;
|
|
34036
33841
|
|
|
34037
33842
|
while (retries < MAX_RETRIES) {
|
|
@@ -34040,12 +33845,7 @@ const updateBigbinaryPackages = async (recommendedList) => {
|
|
|
34040
33845
|
data: { nanos },
|
|
34041
33846
|
} = await axios.get("https://ops.neetotower.com/api/v1/public/nanos");
|
|
34042
33847
|
|
|
34043
|
-
|
|
34044
|
-
{ name: includes(__, auditPackages) },
|
|
34045
|
-
nanos
|
|
34046
|
-
);
|
|
34047
|
-
|
|
34048
|
-
trackedPackages.forEach(({ name, current_version }) => {
|
|
33848
|
+
nanos.forEach(({ name, current_version }) => {
|
|
34049
33849
|
recommendedList[name] = current_version;
|
|
34050
33850
|
});
|
|
34051
33851
|
|
|
@@ -34065,9 +33865,13 @@ const updateBigbinaryPackages = async (recommendedList) => {
|
|
|
34065
33865
|
}
|
|
34066
33866
|
};
|
|
34067
33867
|
|
|
34068
|
-
const getOutdatedPackages = (
|
|
33868
|
+
const getOutdatedPackages = (
|
|
33869
|
+
recommendedVersions,
|
|
33870
|
+
packageJson,
|
|
33871
|
+
repoType
|
|
33872
|
+
) => {
|
|
34069
33873
|
const packagesToUpdate = Object.keys(DEPENDENCY_TYPES).map(async (type) => {
|
|
34070
|
-
const recommendedList = await
|
|
33874
|
+
const recommendedList = await addBigbinaryPackagesToRecommendedList(
|
|
34071
33875
|
recommendedVersions[type]
|
|
34072
33876
|
);
|
|
34073
33877
|
|
|
@@ -34077,12 +33881,17 @@ const getOutdatedPackages = (recommendedVersions, packageJson) => {
|
|
|
34077
33881
|
let dependenciesToCheck = {};
|
|
34078
33882
|
|
|
34079
33883
|
if (type === "peerDependencies") {
|
|
33884
|
+
if (repoType !== "frontend") return { type, outdatedPackages: [] };
|
|
33885
|
+
|
|
34080
33886
|
const installedDependencies = [
|
|
34081
33887
|
...Object.keys(packageJson.dependencies || {}),
|
|
34082
33888
|
...Object.keys(packageJson.devDependencies || {}),
|
|
34083
33889
|
];
|
|
34084
33890
|
|
|
34085
|
-
dependenciesToCheck =
|
|
33891
|
+
dependenciesToCheck = omit(
|
|
33892
|
+
BIGBINARY_DEV_PACKAGES,
|
|
33893
|
+
pick$1(installedDependencies, recommendedList)
|
|
33894
|
+
);
|
|
34086
33895
|
} else {
|
|
34087
33896
|
dependenciesToCheck = pick$1(
|
|
34088
33897
|
Object.keys(dependencyTypePackages),
|
|
@@ -34143,7 +33952,8 @@ const recommendedPackageVersions = async (debug) => {
|
|
|
34143
33952
|
|
|
34144
33953
|
const packagesToUpdate = await getOutdatedPackages(
|
|
34145
33954
|
recommendedVersions,
|
|
34146
|
-
packageJson
|
|
33955
|
+
packageJson,
|
|
33956
|
+
type
|
|
34147
33957
|
);
|
|
34148
33958
|
|
|
34149
33959
|
const fix = async (debug) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bigbinary/neeto-audit-frontend",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.2",
|
|
4
4
|
"description": "Audits neeto frontend codebase for issues and suggests a fix.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": "./dist/index.js",
|
|
@@ -9,10 +9,6 @@
|
|
|
9
9
|
"audit",
|
|
10
10
|
"frontend"
|
|
11
11
|
],
|
|
12
|
-
"scripts": {
|
|
13
|
-
"build": "rollup -c",
|
|
14
|
-
"release": "rollup -c && yalc push --sig"
|
|
15
|
-
},
|
|
16
12
|
"author": "Thejus Paul <thejuspaul@protonmail.ch>",
|
|
17
13
|
"license": "UNLICENSED",
|
|
18
14
|
"devDependencies": {
|
|
@@ -40,8 +36,12 @@
|
|
|
40
36
|
"@bigbinary/neeto-commons-frontend": "^3.1.10",
|
|
41
37
|
"ramda": "^0.29.1"
|
|
42
38
|
},
|
|
43
|
-
"packageManager": "pnpm@8.
|
|
39
|
+
"packageManager": "pnpm@8.15.9+sha512.499434c9d8fdd1a2794ebf4552b3b25c0a633abcee5bb15e7b5de90f32f47b513aca98cd5cfd001c31f0db454bc3804edccd578501e4ca293a6816166bbd9f81",
|
|
44
40
|
"engines": {
|
|
45
|
-
"node": ">=
|
|
41
|
+
"node": ">=22"
|
|
42
|
+
},
|
|
43
|
+
"scripts": {
|
|
44
|
+
"build": "rollup -c",
|
|
45
|
+
"release": "rollup -c && yalc push --sig"
|
|
46
46
|
}
|
|
47
|
-
}
|
|
47
|
+
}
|
package/src/cli.js
CHANGED
|
File without changes
|
|
@@ -11,3 +11,9 @@ export const DEPENDENCY_TYPES = {
|
|
|
11
11
|
export const MAX_RETRIES = 3;
|
|
12
12
|
|
|
13
13
|
export const REQUEST_DELAY = 5_000;
|
|
14
|
+
|
|
15
|
+
export const BIGBINARY_DEV_PACKAGES = [
|
|
16
|
+
"@bigbinary/eslint-plugin-neeto",
|
|
17
|
+
"@bigbinary/babel-preset-neeto",
|
|
18
|
+
"@bigbinary/neeto-audit-frontend",
|
|
19
|
+
];
|
|
@@ -10,22 +10,19 @@ import {
|
|
|
10
10
|
fromPairs,
|
|
11
11
|
toPairs,
|
|
12
12
|
isEmpty,
|
|
13
|
-
startsWith,
|
|
14
|
-
includes,
|
|
15
13
|
pick,
|
|
16
|
-
|
|
14
|
+
omit,
|
|
17
15
|
} from "ramda";
|
|
18
|
-
import {
|
|
16
|
+
import { findBy } from "@bigbinary/neeto-cist";
|
|
19
17
|
|
|
20
|
-
import {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
if (isEmpty(auditPackages)) return recommendedList;
|
|
18
|
+
import {
|
|
19
|
+
BIGBINARY_DEV_PACKAGES,
|
|
20
|
+
DEPENDENCY_TYPES,
|
|
21
|
+
MAX_RETRIES,
|
|
22
|
+
REQUEST_DELAY,
|
|
23
|
+
} from "./constants";
|
|
28
24
|
|
|
25
|
+
const addBigbinaryPackagesToRecommendedList = async (recommendedList) => {
|
|
29
26
|
let success = false;
|
|
30
27
|
let retries = 0;
|
|
31
28
|
|
|
@@ -35,12 +32,7 @@ const updateBigbinaryPackages = async (recommendedList) => {
|
|
|
35
32
|
data: { nanos },
|
|
36
33
|
} = await axios.get("https://ops.neetotower.com/api/v1/public/nanos");
|
|
37
34
|
|
|
38
|
-
|
|
39
|
-
{ name: includes(__, auditPackages) },
|
|
40
|
-
nanos
|
|
41
|
-
);
|
|
42
|
-
|
|
43
|
-
trackedPackages.forEach(({ name, current_version }) => {
|
|
35
|
+
nanos.forEach(({ name, current_version }) => {
|
|
44
36
|
recommendedList[name] = current_version;
|
|
45
37
|
});
|
|
46
38
|
|
|
@@ -60,9 +52,13 @@ const updateBigbinaryPackages = async (recommendedList) => {
|
|
|
60
52
|
}
|
|
61
53
|
};
|
|
62
54
|
|
|
63
|
-
export const getOutdatedPackages = (
|
|
55
|
+
export const getOutdatedPackages = (
|
|
56
|
+
recommendedVersions,
|
|
57
|
+
packageJson,
|
|
58
|
+
repoType
|
|
59
|
+
) => {
|
|
64
60
|
const packagesToUpdate = Object.keys(DEPENDENCY_TYPES).map(async (type) => {
|
|
65
|
-
const recommendedList = await
|
|
61
|
+
const recommendedList = await addBigbinaryPackagesToRecommendedList(
|
|
66
62
|
recommendedVersions[type]
|
|
67
63
|
);
|
|
68
64
|
|
|
@@ -72,12 +68,17 @@ export const getOutdatedPackages = (recommendedVersions, packageJson) => {
|
|
|
72
68
|
let dependenciesToCheck = {};
|
|
73
69
|
|
|
74
70
|
if (type === "peerDependencies") {
|
|
71
|
+
if (repoType !== "frontend") return { type, outdatedPackages: [] };
|
|
72
|
+
|
|
75
73
|
const installedDependencies = [
|
|
76
74
|
...Object.keys(packageJson.dependencies || {}),
|
|
77
75
|
...Object.keys(packageJson.devDependencies || {}),
|
|
78
76
|
];
|
|
79
77
|
|
|
80
|
-
dependenciesToCheck =
|
|
78
|
+
dependenciesToCheck = omit(
|
|
79
|
+
BIGBINARY_DEV_PACKAGES,
|
|
80
|
+
pick(installedDependencies, recommendedList)
|
|
81
|
+
);
|
|
81
82
|
} else {
|
|
82
83
|
dependenciesToCheck = pick(
|
|
83
84
|
Object.keys(dependencyTypePackages),
|
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
name: "Create and publish releases"
|
|
2
|
-
on:
|
|
3
|
-
pull_request:
|
|
4
|
-
branches:
|
|
5
|
-
- main
|
|
6
|
-
types:
|
|
7
|
-
- closed
|
|
8
|
-
jobs:
|
|
9
|
-
release:
|
|
10
|
-
name: "Create Release"
|
|
11
|
-
runs-on: ubuntu-latest
|
|
12
|
-
if: >-
|
|
13
|
-
${{ github.event.pull_request.merged == true && (
|
|
14
|
-
contains(github.event.pull_request.labels.*.name, 'patch') ||
|
|
15
|
-
contains(github.event.pull_request.labels.*.name, 'minor') ||
|
|
16
|
-
contains(github.event.pull_request.labels.*.name, 'major') ) }}
|
|
17
|
-
steps:
|
|
18
|
-
- name: Checkout the repository
|
|
19
|
-
uses: actions/checkout@v4
|
|
20
|
-
|
|
21
|
-
- name: Setup git user
|
|
22
|
-
run: |
|
|
23
|
-
git config user.name "Thejus Paul"
|
|
24
|
-
git config user.email "thejuspaul@pm.me"
|
|
25
|
-
|
|
26
|
-
- name: Setup NodeJS LTS version
|
|
27
|
-
uses: actions/setup-node@v4
|
|
28
|
-
with:
|
|
29
|
-
node-version: "20"
|
|
30
|
-
|
|
31
|
-
- name: Install PNPM
|
|
32
|
-
uses: pnpm/action-setup@v4
|
|
33
|
-
id: pnpm-install
|
|
34
|
-
with:
|
|
35
|
-
run_install: false
|
|
36
|
-
|
|
37
|
-
- name: Get pnpm store directory
|
|
38
|
-
id: pnpm-cache
|
|
39
|
-
shell: bash
|
|
40
|
-
run: |
|
|
41
|
-
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
|
|
42
|
-
|
|
43
|
-
- uses: actions/cache@v4
|
|
44
|
-
name: Setup pnpm cache
|
|
45
|
-
with:
|
|
46
|
-
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
|
|
47
|
-
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
|
48
|
-
restore-keys: |
|
|
49
|
-
${{ runner.os }}-pnpm-store-
|
|
50
|
-
|
|
51
|
-
- name: Install dependencies
|
|
52
|
-
run: pnpm install
|
|
53
|
-
|
|
54
|
-
- name: Generate production build
|
|
55
|
-
run: pnpm build
|
|
56
|
-
|
|
57
|
-
- name: Disable Git commit hooks
|
|
58
|
-
run: git config core.hooksPath /dev/null
|
|
59
|
-
|
|
60
|
-
- name: Bump the patch version and create git tag on release
|
|
61
|
-
if: ${{ contains(github.event.pull_request.labels.*.name, 'patch') }}
|
|
62
|
-
run: pnpm version patch
|
|
63
|
-
|
|
64
|
-
- name: Bump the minor version and create git tag on release
|
|
65
|
-
if: ${{ contains(github.event.pull_request.labels.*.name, 'minor') }}
|
|
66
|
-
run: pnpm version minor
|
|
67
|
-
|
|
68
|
-
- name: Bump the major version and create git tag on release
|
|
69
|
-
if: ${{ contains(github.event.pull_request.labels.*.name, 'major') }}
|
|
70
|
-
run: pnpm version major
|
|
71
|
-
|
|
72
|
-
- name: Get the package version from package.json
|
|
73
|
-
uses: tyankatsu0105/read-package-version-actions@5aad2bb630a577ee4255546eb3ee0593df68f6ca
|
|
74
|
-
id: package-version
|
|
75
|
-
|
|
76
|
-
- name: Create a new version release commit
|
|
77
|
-
uses: EndBug/add-and-commit@050a66787244b10a4874a2a5f682130263edc192
|
|
78
|
-
with:
|
|
79
|
-
message: "New version release"
|
|
80
|
-
|
|
81
|
-
- name: Push the commit to main
|
|
82
|
-
uses: ad-m/github-push-action@492de9080c3179a3187bd456763f988f9a06e196
|
|
83
|
-
with:
|
|
84
|
-
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
85
|
-
branch: main
|
|
86
|
-
|
|
87
|
-
- name: Create a release draft on release
|
|
88
|
-
uses: release-drafter/release-drafter@ac463ffd9cc4c6ad5682af93dc3e3591c4657ee3
|
|
89
|
-
env:
|
|
90
|
-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
91
|
-
with:
|
|
92
|
-
tag: v${{ steps.package-version.outputs.version }}
|
|
93
|
-
publish: true
|
|
94
|
-
|
|
95
|
-
- name: Publish the package on NPM
|
|
96
|
-
uses: JS-DevTools/npm-publish@22595ff8c4d0d9f53cef0656fbb90fbe06ee885c
|
|
97
|
-
with:
|
|
98
|
-
access: "public"
|
|
99
|
-
token: ${{ secrets.NPM_TOKEN }}
|