Skip to content

Commit 481ad32

Browse files
committed
chore: 🔧 rename & refactor
1 parent 4e0dbc1 commit 481ad32

8 files changed

Lines changed: 33 additions & 21 deletions

File tree

‎.devcontainer/devcontainer.json‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,9 @@
4646
"github.copilot",
4747
"github.copilot-chat",
4848
"github.vscode-github-actions",
49-
"foxundermoon.shell-format"
49+
"gitHub.vscode-pull-request-github",
50+
"foxundermoon.shell-format",
51+
"richie5um2.vscode-sort-json"
5052
]
5153
}
5254
},
@@ -56,4 +58,4 @@
5658
"remoteEnv": {},
5759
// Ensure the container is correctly configured for the workspace.
5860
"postStartCommand": "sh .devcontainer/start.sh"
59-
}
61+
}

‎src/githooks/_pre-commit.sh‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ if git diff ${@:---cached --name-only} | grep -q "package.json"; then
2121
# ensure that the package.json is valid and package-lock.json is up-to-date
2222
npx --yes chalk-cli --no-stdin -t "{blue →} Ensure that the package.json is valid and package-lock.json is up-to-date..."
2323

24-
WORKSP=$(cat package.json | npx --yes jqn '.workspaces' | tr -d "'[]:")
25-
if test "$WORKSP" = "undefined"; then
24+
ws=$(npm pkg get workspaces)
25+
if test "$ws" = "undefined" || test "$ws" = "{}"; then
2626
npm install --package-lock || true
2727
else
2828
npm install --package-lock --ws --if-present --include-workspace-root || true

‎src/githooks/devcontainer-feature.json‎

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,21 @@
88
"conventionalCommits.gitmoji": false
99
},
1010
"extensions": [
11-
"vivaxy.vscode-conventional-commits"
11+
"vivaxy.vscode-conventional-commits",
12+
"softwareape.rebaser",
13+
"tomblind.scm-buttons-vscode"
1214
]
1315
}
1416
},
1517
"dependsOn": {
1618
"ghcr.io/devcontainers/features/node": {},
17-
"ghcr.io/tomgrv/devcontainer-features/common-utils": {}
19+
"ghcr.io/tomgrv/devcontainer-features/common-utils": {},
20+
"ghcr.io/tomgrv/devcontainer-features/gitutils": {}
1821
},
1922
"id": "githooks",
2023
"installsAfter": [
21-
"ghcr.io/tomgrv/devcontainer-features/common-utils"
24+
"ghcr.io/tomgrv/devcontainer-features/common-utils",
25+
"ghcr.io/tomgrv/devcontainer-features/gitutils"
2226
],
2327
"postCreateCommand": "configure-feature githooks"
2428
}
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@ echo "Fixing commit: $sha"
2222
git filter-branch --tree-filter '
2323
composer validate --no-check-all --strict 2>&1 | grep -oP "Required package \"\K[^\"]+" | while read -r package; do
2424
composer require --ignore-platform-reqs --no-scripts --no-interaction --no-progress --no-install "$package"
25-
done
25+
done;
26+
npm install --ws --package-lock-only;
27+
git add $(find . -name "composer.lock") $(find . -name "package-lock.json") || true
2628
' $sha..HEAD
2729

2830
### Unstash changes

‎src/gitutils/alias.json‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
"conflict": "git diff --name-only --diff-filter=U",
77
"continue": "git checkout -- . && git rebase --continue",
88
"crush": "git stash save --keep-index --include-untracked && git reset --hard $(git rev-parse --abbrev-ref --symbolic-full-name @{u})",
9-
"discardMode": "git diff -p -R --no-color | grep -E \"^(diff|(old|new) mode)\" --color=never | git apply",
109
"edit": "git commit --amend --edit",
10+
"fixMode": "git diff -p -R --no-color | grep -E \"^(diff|(old|new) mode)\" --color=never | git apply",
1111
"fixable": "git log --oneline $(git rev-parse --abbrev-ref --symbolic-full-name @{u})..HEAD",
1212
"forceable": "git log --oneline $(echo $(git rev-parse --abbrev-ref --symbolic-full-name @{u};git log --merges --first-parent -1 --pretty=%h)| tail -1)..HEAD $*",
1313
"go": "git commit -m \"$1\" --all",
@@ -20,6 +20,7 @@
2020
"isFixup": "git log -1 --pretty=%s | grep -q fixup! && exit 0 || exit 1",
2121
"isRebase": "git rev-parse --git-dir | grep -q rebase-merge || git rev-parse --git-dir | grep -q rebase-apply",
2222
"prod": "git release-prod",
23+
"recallId": "git config \"$1\" user.name \"$(git log -1 --pretty=format:'%an')\" && git config \"$1\" user.email \"$(git log -1 --pretty=format:'%ae')\"",
2324
"renameTag": "set -e;git tag $2 $1; git tag -d $1;git push origin :refs/tags/$1;git push --tags",
2425
"stack": "git commit --amend --no-verify -C HEAD",
2526
"sync": "git fetch --progress --prune --recurse-submodules=no origin && git stash save --keep-index --include-untracked && git merge --ff-only @{u} && git stash pop --index || git stash drop",

‎src/gitutils/devcontainer-feature.json‎

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "Git Aliases",
3-
"version": "3.4.0",
3+
"version": "3.4.2",
44
"description": "A feature to add useful Git aliases to your shell.",
55
"customizations": {
66
"vscode": {
@@ -12,8 +12,13 @@
1212
"donjayamanne.githistory",
1313
"tomblind.scm-buttons-vscode",
1414
"mhutchie.git-graph",
15-
"softwareape.rebaser",
16-
"arturock.gitstash"
15+
"arturock.gitstash",
16+
"github.copilot",
17+
"github.copilot-chat",
18+
"github.vscode-github-actions",
19+
"gitHub.vscode-pull-request-github",
20+
"github.codespaces",
21+
"waderyan.gitblame"
1722
]
1823
}
1924
},
@@ -29,5 +34,8 @@
2934
"ghcr.io/tomgrv/devcontainer-features/common-utils",
3035
"ghcr.io/tomgrv/devcontainer-features/gitversion"
3136
],
32-
"postCreateCommand": "configure-feature gitutils"
37+
"postCreateCommand": "configure-feature gitutils",
38+
"postStartCommand": [
39+
"git discardMode"
40+
]
3341
}

‎src/larasets/devcontainer-feature.json‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,7 @@
2626
"art-cache-routes": [
2727
"**/[Rr]outes/*.php"
2828
]
29-
},
30-
"LaravelExtraIntellisense.phpCommand": "docker-compose exec -w /var/www/html laravel.test php -r \"{code}\"",
31-
"LaravelExtraIntellisense.basePathForCode": "/var/www/html"
29+
}
3230
},
3331
"extensions": [
3432
"actboy168.tasks",

‎stubs/.devcontainer/devcontainer.json‎

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,12 @@
3939
"actboy168.tasks",
4040
"spmeesseman.vscode-taskexplorer",
4141
"gruntfuggly.triggertaskonsave",
42-
"github.codespaces",
4342
"natizyskunk.sftp",
4443
"formulahendry.auto-rename-tag",
4544
"formulahendry.auto-close-tag",
4645
"gruntfuggly.todo-tree",
47-
"github.copilot",
48-
"github.copilot-chat",
49-
"github.vscode-github-actions",
50-
"foxundermoon.shell-format"
46+
"foxundermoon.shell-format",
47+
"richie5um2.vscode-sort-json"
5148
]
5249
}
5350
},

0 commit comments

Comments
 (0)