Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/deployFunction.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ jobs:
if: github.ref != 'refs/heads/main' || github.event.label.name == '!!_RELEASE_TO_QA'
environment: DEV
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
ref: ${{ github.event.pull_request.head.ref }}
- uses: actions/setup-node@v4
- uses: actions/setup-node@v6
with:
node-version-file: '.nvmrc'
- name: Install NPM packages
Expand All @@ -29,8 +29,8 @@ jobs:
# if: github.event.label.name == '!!_RELEASE_TO_QA'
# environment: QA
# steps:
# - uses: actions/checkout@v4
# - uses: actions/setup-node@v4
# - uses: actions/checkout@v6
# - uses: actions/setup-node@v6
# with:
# node-version-file: '.nvmrc'
# - name: Install NPM packages
Expand All @@ -44,8 +44,8 @@ jobs:
# if: github.ref == 'refs/heads/main'
# environment: PROD
# steps:
# - uses: actions/checkout@v4
# - uses: actions/setup-node@v4
# - uses: actions/checkout@v6
# - uses: actions/setup-node@v6
# with:
# node-version-file: '.nvmrc'
# - name: Install NPM packages
Expand Down
24 changes: 23 additions & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,26 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

# Load NVM and set up Node.js environment
# Support both homebrew and standard NVM installations
export NVM_DIR="${NVM_DIR:-$HOME/.nvm}"
if [ -s "/opt/homebrew/opt/nvm/nvm.sh" ]; then
. "/opt/homebrew/opt/nvm/nvm.sh"
elif [ -s "$NVM_DIR/nvm.sh" ]; then
. "$NVM_DIR/nvm.sh"
fi

# Use Node version from .nvmrc (required Node 22 for this project)
if command -v nvm >/dev/null 2>&1; then
nvm use >/dev/null 2>&1
fi

# Verify Node 22 is being used
NODE_VERSION=$(node -v 2>/dev/null | cut -d'.' -f1 | tr -d 'v')
if [ "$NODE_VERSION" != "22" ]; then
echo "Error: Node 22 is required but found Node $NODE_VERSION"
echo "Please install Node 22 and ensure it's active (e.g., 'nvm install 22 && nvm use 22')"
exit 1
fi

npx lint-staged
npm test
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18
22
Loading