Skip to content

Commit 457220a

Browse files
committed
chore: update TypeScript and type definitions in package.json and package-lock.json
- Add @types/node, @types/react, and @types/react-dom to dependencies for improved type support. - Ensure TypeScript is included in the main dependencies for better development experience. - Adjust GitHub Actions workflow to enhance caching strategy for Next.js builds.
1 parent 1a15c93 commit 457220a

File tree

3 files changed

+18
-23
lines changed

3 files changed

+18
-23
lines changed

.github/workflows/nextjs.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,22 +57,24 @@ jobs:
5757
uses: actions/configure-pages@v3
5858
# Removed static_site_generator to prevent auto-injection of conflicting configs
5959
# We manage our own Next.js configuration in next.config.js
60-
- name: Restore cache
60+
- name: Cache Next.js build
6161
uses: actions/cache@v3
6262
with:
6363
path: |
64-
.next/cache
64+
${{ github.workspace }}/.next/cache
6565
# Generate a new cache whenever packages or source files change.
66-
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }}
66+
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**/*.[jt]s', '**/*.[jt]sx', '!node_modules/**') }}
6767
# If source files changed but packages didn't, rebuild from a prior cache.
6868
restore-keys: |
69-
${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}-
69+
${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-
7070
- name: Install dependencies
7171
run: ${{ steps.detect-package-manager.outputs.manager }} ${{ steps.detect-package-manager.outputs.command }}
7272
env:
7373
NODE_ENV: ${{ secrets.NODE_ENV }}
7474
- name: Build with Next.js
7575
run: ${{ steps.detect-package-manager.outputs.runner }} next build
76+
env:
77+
NEXT_TELEMETRY_DISABLED: 1
7678
#- name: Static HTML export with Next.js
7779
#run: ${{ steps.detect-package-manager.outputs.runner }} next export
7880
- name: Upload artifact

package-lock.json

Lines changed: 6 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@
2020
"@radix-ui/react-tooltip": "^1.1.3",
2121
"@stackblitz/sdk": "^1.11.0",
2222
"@tabler/icons-react": "^3.30.0",
23+
"@types/node": "^22.10.1",
24+
"@types/react": "^18.3.12",
25+
"@types/react-dom": "^18.3.1",
2326
"@uidotdev/usehooks": "^2.4.0",
2427
"autoprefixer": "^10.4.20",
2528
"clsx": "^2.1.1",
@@ -29,12 +32,10 @@
2932
"react-dom": "^18.3.1",
3033
"scrollen": "^0.0.2",
3134
"tailwind-merge": "^2.5.2",
32-
"tailwindcss": "^3.4.14"
35+
"tailwindcss": "^3.4.14",
36+
"typescript": "^5.6.3"
3337
},
3438
"devDependencies": {
35-
"@types/node": "^22.10.1",
36-
"@types/react": "^18.3.12",
37-
"@types/react-dom": "^18.3.1",
3839
"@typescript-eslint/eslint-plugin": "^8.24.1",
3940
"cross-env": "^7.0.3",
4041
"eslint": "^8.57.0",
@@ -49,7 +50,6 @@
4950
"eslint-plugin-react": "^7.32.2",
5051
"eslint-plugin-react-hooks": "^5.0.0",
5152
"prettier": "^3.5.1",
52-
"prettier-plugin-tailwindcss": "^0.6.6",
53-
"typescript": "^5.6.3"
53+
"prettier-plugin-tailwindcss": "^0.6.6"
5454
}
5555
}

0 commit comments

Comments
 (0)