Skip to content

Commit

Permalink
Merge pull request #13 from HarrisFauntleroy/renovate/lock-file-maint…
Browse files Browse the repository at this point in the history
…enance

chore(deps): lock file maintenance
  • Loading branch information
HarrisFauntleroy authored Sep 17, 2023
2 parents 0556ee0 + 9222c1a commit b348626
Showing 15 changed files with 131 additions and 19,941 deletions.
13 changes: 5 additions & 8 deletions .github/workflows/chromatic.yml
Original file line number Diff line number Diff line change
@@ -9,16 +9,13 @@ jobs:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: pnpm/action-setup@v2
with:
version: 8
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3

- uses: oven-sh/setup-bun@v1
with:
node-version: ${{ matrix.node-version }}
cache: "pnpm"
bun-version: latest

- name: Install dependencies 📦
run: pnpm install
run: bun install

- name: Publish to Chromatic
uses: chromaui/action@v1
22 changes: 8 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -16,30 +16,24 @@ jobs:
permissions: write-all
timeout-minutes: 15
runs-on: ubuntu-20.04
strategy:
matrix:
node-version: [18]
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 8
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3

- uses: oven-sh/setup-bun@v1
with:
node-version: ${{ matrix.node-version }}
cache: "pnpm"
bun-version: latest

- name: Install dependencies 📦
run: pnpm install
run: bun install

- name: Build 🏗️
run: pnpm run build
run: bun run build

- name: Lint 🧹
run: pnpm run lint
run: bun run lint

- name: Test Jest 🧪
run: pnpm run test
run: bun run test

- name: Publish to NPM 📦
uses: JS-DevTools/npm-publish@v2
29 changes: 26 additions & 3 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -2,12 +2,35 @@
set -e
. "$(dirname "$0")/_/husky.sh"

echo "🌳 This is a Trunk-Based Development branch."
echo "🔒 Therefore, tests, linting, and build must pass before pushing."
echo

echo "======== Starting Tests 🧪 ========"
if bun run test; then
echo "======== Tests Completed Successfully ✅ ========"
else
echo "❌ Tests Failed"
exit 1
fi

echo
echo "======== Starting Build 🏗️ ========"
if bun run build; then
echo "======== Build Completed Successfully ✅ ========"
else
echo "❌ Build Failed"
exit 1
fi

echo
echo "======== Starting Lint-Staged 🧐 ========"
if pnpm lint-staged; then
if bun run lint-staged; then
echo "======== Lint-Staged Completed Successfully ✅ ========"
echo
echo "Format ✅ Lint ✅ Commit ✅"
else
echo "❌ Lint-Staged Failed"
exit 1
fi

echo
echo "Test ✅ Build ✅ Format ✅ Lint ✅ Commit ✅"
26 changes: 0 additions & 26 deletions .husky/pre-push

This file was deleted.

10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -3,27 +3,27 @@
# Run the development server
dev:
@echo "Starting development server..."
pnpm run dev
bun run dev

# Install dependencies
install:
@echo "Installing dependencies..."
pnpm install
bun install

# Build the application
build:
@echo "Building the application..."
pnpm run build
bun run build

# Run tests
test:
@echo "Running tests..."
pnpm run test
bun run test

# Lint the codebase
lint:
@echo "Linting..."
pnpm run lint
bun run lint

# Clean up the node_modules directory
clean:
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -59,13 +59,13 @@ Here's how you can set up Design System in your local dev environment:
**Installation**

```zsh
# Install dependencies with pnpm
pnpm install
# Install dependencies with bun
bun install
```

```zsh
# Start development server with storybook
pnpm run storybook
bun run storybook
```

_Please refer to the package.json for additional details and scripts._
@@ -80,8 +80,10 @@ This repository adopts a **Trunk-Based Development** approach to encourage:

### Automated Git Hooks

To maintain code quality, we've set up automated Git hooks that perform the
following tasks before any `git push` operation:
To maintain code quality, we've set up automated Git hooks that perform various
tasks at different stages of the Git workflow:

Pre-Commit Hooks:

- **Linting**: Enforces a consistent code style across the codebase.
- **Formatting**: Applies standardized code formatting.
Binary file added bun.lockb
Binary file not shown.
34 changes: 14 additions & 20 deletions package.json
Original file line number Diff line number Diff line change
@@ -12,28 +12,25 @@
"chromatic": "chromatic --exit-zero-on-changes",
"dev": "storybook dev -p 6006",
"format": "prettier --write .",
"lint": "eslint . --color --plugin file-progress --rule \"file-progress/activate: 1\"",
"lint:fix": "pnpm lint --fix",
"lint": "eslint . --color",
"lint:fix": "bun run lint --fix",
"prepare": "husky install",
"preview": "vite preview",
"release": "pnpm build && pnpm publish --access public",
"release": "bun run run build && bun publish --access public",
"serve-storybook": "http-server storybook-static --port 6007 --silent",
"start": "NODE_ENV=production node dist/index.js",
"storybook": "storybook dev -p 6006 --no-open",
"build-storybook": "storybook build",
"storybook:serve": "http-server storybook-static --port 6006 --silent",
"test": "vitest --passWithNoTests",
"test-storybook": "test-storybook",
"test:ci": "pnpm test --ci --coverage --maxWorkers=2",
"test:cov": "vitest run --coverage",
"test:watch": "pnpm test --watchAll",
"type-check": "tsc --noEmit",
"watch": "pnpm type-check --watch"
"storybook:serve": "htp-server storybook-static --port 6006 --silent",
"test:storybook": "test-storybook",
"test": "bun test",
"test:watch": "bun --watch test",
"type-check": "tsc --noEmit"
},
"lint-staged": {
"*.{ts,tsx}": [
"pnpm format",
"pnpm lint:fix"
"bun run format",
"bun run lint:fix"
]
},
"browserslist": {
@@ -81,7 +78,8 @@
}
},
"plugins": [
"simple-import-sort"
"simple-import-sort",
"file-progress"
],
"extends": [
"plugin:@typescript-eslint/recommended",
@@ -96,10 +94,10 @@
"plugin:sonarjs/recommended",
"plugin:jsx-a11y/recommended",
"plugin:storybook/recommended",
"plugin:prettier/recommended",
"plugin:jest/recommended"
],
"rules": {
"file-progress/activate": 1,
"unicorn/filename-case": [
"error",
{
@@ -129,11 +127,9 @@
]
},
"ignorePatterns": [
".pnpm",
"dist",
"generated",
"node_modules",
"pnpm",
"storybook-static",
"styles"
],
@@ -191,14 +187,12 @@
"@typescript-eslint/parser": "^6.0.0",
"@vitejs/plugin-react": "^4.0.3",
"chromatic": "^6.21.0",
"eslint": "^8.45.0",
"eslint-config-prettier": "^8.8.0",
"eslint": "^8.49.0",
"eslint-import-resolver-typescript": "^3.5.5",
"eslint-plugin-file-progress": "^1.3.0",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-jest": "^27.2.1",
"eslint-plugin-jsx-a11y": "^6.7.1",
"eslint-plugin-prettier": "5.0.0",
"eslint-plugin-promise": "^6.1.1",
"eslint-plugin-react": "^7.32.2",
"eslint-plugin-react-hooks": "^4.6.0",
Loading
Oops, something went wrong.

0 comments on commit b348626

Please sign in to comment.