Skip to content

Commit

Permalink
Enhancement - Dead Code Removal & Postinstall Checks (#28)
Browse files Browse the repository at this point in the history
  • Loading branch information
PritishBudhiraja authored Nov 29, 2023
1 parent cb68ffa commit b55155a
Show file tree
Hide file tree
Showing 34 changed files with 181 additions and 1,881 deletions.
6 changes: 3 additions & 3 deletions .githooks/commit-msg
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ npx prettier --write .
npm run re:format

# Define your commit message convention (e.g., starts with "feature:", "fix:", etc.)
commit_regex="^(merge-commit|feat|fix|chore|docs|style|refactor|test|enhancement).+"
commit_regex="^(Merge branch|feat|fix|chore|docs|style|refactor|test|enhancement).+"

if ! echo "$commit_msg" | grep -E "$commit_regex" ; then
if ! echo "$commit_msg" | grep -Ei "$commit_regex" ; then
echo "Aborting commit. Your commit message does not follow the conventional format."
echo "Example - <feature>: <subject> - <description>"
echo "Example - <feat>: <subject> - <description>"
exit 1
fi

Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ yarn.lock
#package-lock.json
user_data.sh
*.pem
.bsb.lock
169 changes: 155 additions & 14 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"author": "Shiva Nandan <[email protected]>",
"license": "MIT",
"scripts": {
"pre-commit": "git config core.hooksPath .githooks && chmod +x .githooks/commit-msg && bash .githooks/commit-msg",
"pre-commit": "bash .githooks/commit-msg",
"start": "chmod +x ./replace_env.sh && ./replace_env.sh && cp env-config.js ./public/hyperswitch && APP_VERSION=$npm_package_version && appName=hyperswitch webpack serve --config webpack.dev.js",
"start:server_compiler": "webpack --config webpack.server.js --watch",
"prod:start": "webpack serve --config webpack.dev.js",
Expand All @@ -22,7 +22,8 @@
"build:test": "cd tests && npx rescript build -with-deps",
"clean:test": "cd tests && npx rescript clean -with-deps",
"unit:test": "cd tests && npx rescript build -with-deps && jest unit_test",
"revert:test": "cd tests && npx rescript clean -with-deps && cd .. && npx rescript build -with-deps"
"revert:test": "cd tests && npx rescript clean -with-deps && cd .. && npx rescript build -with-deps",
"postinstall": "git config core.hooksPath .githooks && chmod +x .githooks/commit-msg"
},
"husky": {
"hooks": {
Expand Down
8 changes: 0 additions & 8 deletions src/components/ActionsContainer.res

This file was deleted.

17 changes: 0 additions & 17 deletions src/components/AdvancedSearchComponent.res
Original file line number Diff line number Diff line change
Expand Up @@ -25,23 +25,6 @@ let make = (
let (showModal, setShowModal) = React.useState(_ => false)

let onSubmit = (values, form: ReactFinalForm.formApi) => {
let _otherQueries = switch values->Js.Json.decodeObject {
| Some(dict) =>
dict
->Js.Dict.entries
->Belt.Array.keepMap(entry => {
let (key, value) = entry
let stringVal = LogicUtils.getStringFromJson(value, "")
if stringVal !== "" {
Some(`${key}=${stringVal}`)
} else {
None
}
})
->Js.Array2.joinWith("&")
| _ => ""
}

open Promise

fetchApi(url, ~bodyStr=Js.Json.stringify(values), ~method_=Fetch.Post, ())
Expand Down
35 changes: 0 additions & 35 deletions src/components/Alert.res

This file was deleted.

2 changes: 1 addition & 1 deletion src/components/AuthWrapperUtils.res
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
type parent = {postMessage: (. string, string) => unit}
type parent

@val external window: 'a = "window"
@val @scope("window") external parent: parent = "parent"
Expand Down
37 changes: 0 additions & 37 deletions src/components/Banner.res

This file was deleted.

Loading

0 comments on commit b55155a

Please sign in to comment.