Skip to content

Commit

Permalink
Merge pull request #59 from eruptionjs/rc/bun
Browse files Browse the repository at this point in the history
RC/Bun - Testing bun features as package manager and runtime for projects as a default solution
  • Loading branch information
devmozao authored Apr 11, 2024
2 parents f9d82ff + 9ab8af2 commit 8364667
Show file tree
Hide file tree
Showing 17 changed files with 49 additions and 103 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.lockb binary diff=lockb
17 changes: 9 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,19 @@ jobs:
- name: Checkout repo
uses: actions/checkout@v3

- name: Setup Node and install project dependencies
uses: actions/setup-node@v3
# bun install
- uses: oven-sh/setup-bun@v1
with:
node-version: ${{ matrix.node }}
cache: 'npm'
- run: npm install
bun-version: latest

- name: Install
run: bun install

- name: Lint
run: npm run lint
run: bun run lint

- name: Test
run: npm run test
run: bun run test

- name: Build
run: npm run build
run: bun run build
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ coverage
.env
.env.local
.env.production
.env.staging

# PWA dev files
/dev-dist
2 changes: 1 addition & 1 deletion .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1 +1 @@
npx --no -- commitlint --edit "$1"
bun --no -- commitlint --edit "$1"
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1 +1 @@
npm run lint-staged && npm run build
bun run lint-staged && bun run test && bun run build
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
engine-strict=true
1 change: 0 additions & 1 deletion .nvmrc

This file was deleted.

19 changes: 17 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,23 @@
# Changelog

## v1.7.1
## v1.11.0

-
- uses bun as default on project config

## v1.10.0

- chore(rc/1.10): upgrade deps to latest by @devmozao in #61

## v1.9.0

Bump on dependencies to latest. Only major change that's worth noting: husky v9.

## v1.8.0

- feat(dx): add qr-code on the dev server by @raisiqueira in #55
- chore(packages): update msw version by @raisiqueira in #54
- chore(ci): remove ci cache by @raisiqueira in #57
- chore(rc-v1.8): first rc with dep bumps, everything working as - - expected on dev by @devmozao in #56

## v1.7.0

Expand Down
23 changes: 0 additions & 23 deletions Dockerfile

This file was deleted.

Binary file added bun.lockb
Binary file not shown.
Empty file added bunfig.toml
Empty file.
14 changes: 0 additions & 14 deletions docker-compose-dev.yml

This file was deleted.

11 changes: 0 additions & 11 deletions docker-compose.yml

This file was deleted.

15 changes: 0 additions & 15 deletions dockerfile.dev

This file was deleted.

30 changes: 17 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "eruption",
"description": "Next Generation Boilerplate for React/Typescript, built on top of Vite ⚡️",
"private": false,
"version": "1.9",
"version": "1.11",
"type": "module",
"main": "src/main.tsx",
"license": "MIT",
Expand All @@ -14,31 +14,35 @@
"dev": "vite --host",
"start": "vite --host",
"build": "tsc && vite build",
"preview": "vite preview",
"preview": "vite preview --host",
"test": "vitest",
"treemap": "vite-bundle-visualizer --open --template=treemap --output='./dist/treemap.html'",
"prune": "rm -rf node_modules yarn.lock package-lock.json pnpm-lock.yaml bun.lockb dist coverage build dev-dist",
"preupdate": "npm cache clean --force",
"preupdate": "bun pm cache rm",
"update": "ncu --interactive --format group --install never",
"postupdate": "npm install",
"upgrade": "npm run prune && npm run update",
"postupdate": "bun install",
"upgrade": "bun run prune && bun run update",
"test:watch": "vitest --watch",
"test:coverage": "vitest --watch --coverage",
"test:ui": "vitest --watch --coverage --ui",
"lint": "eslint src --no-inline-config --report-unused-disable-directives --max-warnings 0",
"lint:fix": "npm run lint -- --fix",
"lint:fix": "bun run lint -- --fix",
"lint:css": "stylelint **/*.css --aei --color",
"prettier": "prettier src --check",
"prettier:fix": "npm run prettier -- --write",
"format": "npm run prettier && npm run lint",
"format:fix": "npm run prettier:fix && npm run lint:fix",
"prettier:fix": "bun run prettier -- --write",
"format": "bun run prettier && bun run lint",
"format:fix": "bun run prettier:fix && bun run lint:fix",
"lint-staged": "lint-staged && tsc",
"prebuild": "npm run lint-staged",
"prepare": "husky",
"commit": "commit"
},
"engines": {
"node": "^20.x.x",
"npm": "^10.x.x"
"node": "!^x",
"npm": "!^x",
"yarn": "!^x",
"pnpm": "!^x",
"bun": "^1.0.x"
},
"dependencies": {
"react": "^18.x",
Expand All @@ -50,10 +54,10 @@
"@commitlint/prompt-cli": "^19.x",
"@commitlint/types": "^19.x",
"@testing-library/jest-dom": "^6.x",
"@testing-library/react": "^14.x",
"@testing-library/react": "^15.x",
"@testing-library/user-event": "^14.x",
"@trivago/prettier-plugin-sort-imports": "^4.x",
"@types/node": "^20.x",
"@types/bun": "^1.x",
"@types/react": "^18.x",
"@types/react-dom": "^18.x",
"@typescript-eslint/eslint-plugin": "^7.x",
Expand Down
2 changes: 1 addition & 1 deletion public/mockServiceWorker.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* - Please do NOT serve this file on production.
*/

const PACKAGE_VERSION = '2.2.9'
const PACKAGE_VERSION = '2.2.13'
const INTEGRITY_CHECKSUM = '26357c79639bfa20d64c0efca2a87423'
const IS_MOCKED_RESPONSE = Symbol('isMockedResponse')
const activeClientIds = new Set()
Expand Down
13 changes: 0 additions & 13 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,6 @@ export default defineConfig({
exclude: [/\.(br)$/, /\.(gz)$/],
}),
],
server: {
watch: {
usePolling: true,
},
host: true, // needed for the Docker Container port mapping to work
strictPort: true,
port: 3000, // you can replace this port with any port
},
preview: {
host: true, // needed for the Docker Container port mapping to work
strictPort: true,
port: 3000, // you can replace this port with any port
},
test: {
globals: true,
watch: false,
Expand Down

0 comments on commit 8364667

Please sign in to comment.