Skip to content

Commit

Permalink
upgrade to node 22
Browse files Browse the repository at this point in the history
  • Loading branch information
vorant94 committed Jul 26, 2024
1 parent a280eaa commit c6e93d6
Show file tree
Hide file tree
Showing 12 changed files with 15 additions and 24 deletions.
2 changes: 1 addition & 1 deletion .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ runs:
steps:
- uses: actions/setup-node@v4
with:
node-version: 20
node-version: 22
cache: "npm"

- run: npm ci --ignore-scripts --no-audit
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20.12.2
22.5.1
2 changes: 1 addition & 1 deletion biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
}
},
{
"include": ["tsconfig.*.json"],
"include": ["**/tsconfig.json", "**/tsconfig.*.json"],
"json": {
"parser": {
"allowComments": true
Expand Down
8 changes: 1 addition & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"lefthook": "^1.7.5"
},
"engines": {
"node": ">=20"
"node": ">=22"
},
"os": ["darwin", "linux"]
}
2 changes: 1 addition & 1 deletion packages/blog/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:20-alpine as build
FROM node:22-alpine as build

WORKDIR /usr/local/blog

Expand Down
1 change: 0 additions & 1 deletion packages/blog/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
"fastify": "^4.26.2",
"hast": "^1.0.0",
"hastscript": "^9.0.0",
"lodash-es": "^4.17.21",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"rehype-autolink-headings": "^7.1.0",
Expand Down
3 changes: 1 addition & 2 deletions packages/blog/src/posts/handlers/posts.handler.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { format } from "date-fns";
import type { FastifyPluginCallback } from "fastify";
import { groupBy } from "lodash-es";
import { publishedAtFormat } from "../../content/globals/published-at-format.js";
import { contentType } from "../../http/types/content-type.js";
import { statusCode } from "../../http/types/status-code.js";
Expand All @@ -14,7 +13,7 @@ export const postsHandler: FastifyPluginCallback = (app, _opts, done) => {
app.get("/posts", async (_, reply) => {
const allPosts = await findPosts();

const postsByPublishedAt = groupBy(allPosts, (post) =>
const postsByPublishedAt = Object.groupBy(allPosts, (post) =>
format(post.matter.publishedAt, publishedAtFormat.year),
);
const years = Object.keys(postsByPublishedAt).reverse();
Expand Down
5 changes: 2 additions & 3 deletions packages/blog/src/projects/handlers/projects.handler.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import type { FastifyPluginCallback } from "fastify";
import { groupBy } from "lodash-es";
import { contentType } from "../../http/types/content-type.js";
import { statusCode } from "../../http/types/status-code.js";
import { DefaultLayout } from "../../ui/layouts/default.layout.js";
Expand All @@ -23,7 +22,7 @@ export const projectsHandler: FastifyPluginCallback = (app, _, done) => {
findChangelogs(),
]);

const projectsByStatus = groupBy(
const projectsByStatus = Object.groupBy(
allProjects,
(project) => project.matter.status,
);
Expand All @@ -32,7 +31,7 @@ export const projectsHandler: FastifyPluginCallback = (app, _, done) => {
Object.keys(projectsByStatus) as Array<ProjectStatus>
).toSorted((a, b) => projectStatusOrder[a] - projectStatusOrder[b]);

const changelogsByProject = groupBy(allChangelogs, (changelog) =>
const changelogsByProject = Object.groupBy(allChangelogs, (changelog) =>
getProjectIdFromChangelogPath(changelog.path),
);

Expand Down
4 changes: 2 additions & 2 deletions packages/blog/tsconfig.client.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/* Base */
"esModuleInterop": true,
"skipLibCheck": true,
"target": "ES2022",
"target": "ESNext",
"allowJs": true,
"resolveJsonModule": true,
"moduleDetection": "force",
Expand Down Expand Up @@ -32,7 +32,7 @@
"noEmit": true,

/* Runtime/Framework */
"lib": ["ES2020", "DOM", "DOM.Iterable"],
"lib": ["ESNext", "DOM", "DOM.Iterable"],

/* Misc */
"types": ["vite/client", "@total-typescript/ts-reset"]
Expand Down
4 changes: 2 additions & 2 deletions packages/blog/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/* Base */
"esModuleInterop": true,
"skipLibCheck": true,
"target": "ES2022",
"target": "ESNext",
"allowJs": true,
"resolveJsonModule": true,
"moduleDetection": "force",
Expand Down Expand Up @@ -34,7 +34,7 @@
"sourceMap": true,

/* Runtime/Framework */
"lib": ["ES2023"],
"lib": ["ESNext"],
"jsx": "react-jsx",

/* Misc */
Expand Down
4 changes: 2 additions & 2 deletions packages/canvas/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/* Base */
"esModuleInterop": true,
"skipLibCheck": true,
"target": "ES2022",
"target": "ESNext",
"allowJs": true,
"resolveJsonModule": true,
"moduleDetection": "force",
Expand Down Expand Up @@ -32,7 +32,7 @@
"noEmit": true,

/* Runtime/Framework */
"lib": ["ES2020", "DOM", "DOM.Iterable"],
"lib": ["ESNext", "DOM", "DOM.Iterable"],
"jsx": "react-jsx",
"allowImportingTsExtensions": true,

Expand Down

0 comments on commit c6e93d6

Please sign in to comment.