Skip to content

Commit

Permalink
[Closes #471] Update project dependencies (#472)
Browse files Browse the repository at this point in the history
* Ran npm audit fix

* Update minor/patch versions of dependencies

* Update devdependencies

* Revert next-auth

* Bump next/next-auth versions

* Run storybook upgrade

* Fix types in implementation to support latest next-auth

* Switch to ESM project-wide

* Upgrade typescript

* Bump node version to latest LTS

* Update ava testrunner

* Force peer dependency override

* Replace rewiremock with quibble

* Remove nextjs-server-modules

* Remove npm install --force

* Bump a few more dependencies

* Bump @tanstack/react-query, note locked to v4 due to trpc dependency

* Bump version for more tools

* Bump mui
  • Loading branch information
francisli authored Dec 4, 2024
1 parent 0c798b0 commit ddefaa8
Show file tree
Hide file tree
Showing 20 changed files with 10,547 additions and 17,626 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: 18
node-version: 22
cache: "npm"
- name: Install dependencies & generate css types
run: npm ci
Expand All @@ -26,10 +26,10 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: 18
node-version: 22
cache: "npm"
- name: Install dependencies
run: npm i --ci
run: npm ci
- name: Run format:check
run: |
npm run format:version
Expand All @@ -46,10 +46,10 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: 18
node-version: 22
cache: "npm"
- name: Install dependencies
run: npm i --ci
run: npm ci
- name: Pre-pull Postgres image
run: docker pull postgres:15
- name: Run tests
Expand Down
3 changes: 0 additions & 3 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
#!/usr/bin/env sh
. "$(dirname "$0")/_/husky.sh"

npx lint-staged
7 changes: 7 additions & 0 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import type { StorybookConfig } from "@storybook/nextjs";
const config: StorybookConfig = {
staticDirs: ["../public"],
stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|mjs|ts|tsx)"],

addons: [
"@storybook/addon-links",
"@storybook/addon-essentials",
Expand All @@ -11,10 +12,16 @@ const config: StorybookConfig = {
"@tomfreudenberg/next-auth-mock/storybook",
"@chromatic-com/storybook",
],

framework: {
name: "@storybook/nextjs",
options: {},
},

docs: {},

typescript: {
reactDocgen: "react-docgen-typescript",
},
};
export default config;
3 changes: 3 additions & 0 deletions .storybook/preview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ const preview: Preview = {
},
},
},

decorators: [
(Story) => (
<FontProvider>
Expand All @@ -27,6 +28,8 @@ const preview: Preview = {
</FontProvider>
),
],

tags: ["autodocs"],
};

export default preview;
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@


# Start with the latest Node.js LTS release
FROM --platform=linux/amd64 node:18-bullseye-slim
FROM --platform=linux/amd64 node:22-bullseye-slim

# Set env variables
ENV NODE_ENV production
Expand Down
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,6 @@ The database container does not need to be started to run tests, but Docker Desk

Run all tests with `npm run test`. An individual test file can be run with `npm run test <path/to/file>` (e.x. `npm run test src/routes/students.test.ts`).

To run tests in watch mode, use `npm run test:watch`. This will run tests whenever a file is changed, but will not take database schema changes into account.

### Database

#### Creating migrations
Expand Down
10 changes: 7 additions & 3 deletions ava.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
module.exports = {
const avaConfig = {
timeout: "90s",
files: ["src/**/*.test.ts"],
extensions: ["ts"],
require: ["@esbuild-kit/cjs-loader"],
ignoredByWatcher: ["**/.next/**"],
require: ["tsx"],
nodeArguments: ["--no-warnings"],
watchMode: {
ignoreChanges: ["**/.next/**"],
},
};
export default avaConfig;
2 changes: 1 addition & 1 deletion next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ const nextConfig = {
},
};

module.exports = nextConfig;
export default nextConfig;
Loading

0 comments on commit ddefaa8

Please sign in to comment.