Skip to content

Commit

Permalink
fix(ts): ensure non-conflicting dirs for patches preservation (#184)
Browse files Browse the repository at this point in the history
also improve formatting to make sure it works from the root dir
  • Loading branch information
ygrishajev committed May 3, 2024
1 parent eae7288 commit f3eb061
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -90,4 +90,3 @@ clean:
rm -rf $(AKASH_DEVCACHE)
rm -rf $(AKASH_TS_ROOT)/node_modules
rm -rf $(AKASH_TS_ROOT)/dist
rm -rf $(AKASH_TS_ROOT)/src/generated
2 changes: 1 addition & 1 deletion script/protocgen-legacy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -150,4 +150,4 @@ cp -rv github.com/akash-network/akash-api/* ./

script/ts-patches.sh restore

(cd "$AKASH_TS_ROOT" && npm run format)
npm run format --prefix $AKASH_TS_ROOT
2 changes: 1 addition & 1 deletion script/ts-patches.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
set -eo pipefail

generated_dir="$AKASH_TS_ROOT/src/generated"
tmp_dir="$AKASH_DEVCACHE_BASE/tmp/ts"
tmp_dir="$AKASH_DEVCACHE_TS_TMP/ts/patches"

if [ ! -d "$generated_dir" ]; then
echo "Directory $generated_dir does not exist. Skipping..."
Expand Down
2 changes: 1 addition & 1 deletion ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"scripts": {
"build": "rimraf dist && tsc -p tsconfig.build.json && npm run format",
"postbuild": "script/generate-exports.js",
"format": "prettier --write './**/*.{js,jsx,ts,tsx,css,json}' --config ./.prettierrc",
"format": "prettier --write \"$AKASH_TS_ROOT/**/*.{js,jsx,ts,tsx,css,json}\" --config ./.prettierrc --log-level silent",
"lint": "eslint src",
"lint:fix": "npm run lint -- --fix",
"test": "jest --selectProjects unit functional",
Expand Down

0 comments on commit f3eb061

Please sign in to comment.