Skip to content

Commit 9383dca

Browse files
Merge pull request #13 from CrunchyData/upgrade_node22
Upgrade to Node22
2 parents fadba1b + 25341eb commit 9383dca

9 files changed

Lines changed: 36 additions & 19 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
- name: ⎔ Setup node
2424
uses: actions/setup-node@v3
2525
with:
26-
node-version: 20
26+
node-version: 22
2727

2828
- name: 📥 Download deps
2929
uses: bahmutov/npm-install@v1
@@ -41,7 +41,7 @@ jobs:
4141
- name: ⎔ Setup node
4242
uses: actions/setup-node@v3
4343
with:
44-
node-version: 20
44+
node-version: 22
4545

4646
- name: 📥 Download deps
4747
uses: bahmutov/npm-install@v1

.tool-versions

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
nodejs 20.12.0
1+
nodejs 22.22.3
22
java openjdk-17

app/lib/docs/pdf/index.server.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import yaml from 'js-yaml'
55
import { type Root, type Text } from 'mdast'
66
import { fromMarkdown } from 'mdast-util-from-markdown'
77
import {
8-
MdxJsxAttributeValueExpression,
8+
type MdxJsxAttributeValueExpression,
99
type MdxJsxFlowElement,
1010
type MdxJsxTextElement,
1111
mdxJsxFromMarkdown,
@@ -16,9 +16,7 @@ import remarkFrontmatter from 'remark-frontmatter'
1616
import remarkGfm from 'remark-gfm'
1717
import { visit } from 'unist-util-visit'
1818
import { docAttributes } from '../attrs.server.ts'
19-
import path from 'path'
2019
import safeEval from 'safe-eval'
21-
import { isArray } from 'util'
2220

2321

2422
export async function parseMdxToPdf(mdx: string) {

package-lock.json

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

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@
101101
"@types/js-yaml": "^4.0.5",
102102
"@types/lunr": "^2.3.4",
103103
"@types/morgan": "^1.9.4",
104-
"@types/node": "^20.12.7",
104+
"@types/node": "^22.18.12",
105105
"@types/react": "^18.2.6",
106106
"@types/react-dom": "^18.2.4",
107107
"@types/remark-prism": "^1.3.4",
@@ -136,6 +136,6 @@
136136
"vfile-matter": "^4.0.1"
137137
},
138138
"engines": {
139-
"node": "20"
139+
"node": "22"
140140
}
141141
}

safe-eval.d.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
declare module 'safe-eval' {
2+
function safeEval(
3+
code: string,
4+
context?: Record<string, unknown>,
5+
opts?: Record<string, unknown>,
6+
): unknown
7+
export default safeEval
8+
}

scripts/crd-builder/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ function buildProperties(
129129
schemas.push({
130130
...base,
131131
type: intOrString
132-
? `map[string]: int\|string`
132+
? `map[string]: int|string`
133133
: 'map[string]: string',
134134
})
135135
break

scripts/migrate-docs.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ function replaceParams(file: string): string {
9797
}
9898

9999
function replaceRefs(file: string, filepath: string): string {
100-
const regex = /\[([^\]]+)\]\(\{\{\s?<\s?(?:relref|ref)\s"([^"]+)"[^\)]+\)/gm
100+
const regex = /\[([^\]]+)\]\(\{\{\s?<\s?(?:relref|ref)\s"([^"]+)"[^)]+\)/gm
101101
return file.replace(regex, (match, label, to, id) => {
102102
if (typeof to !== 'string') return match
103103
to = to.replace(/^\//gm, '').replace('/_index.md', '').replace('.md', '')
@@ -142,7 +142,7 @@ function replaceNotices(file: string): string {
142142

143143
function replaceIdHeadings(file: string): string {
144144
return file.replace(
145-
/(#+)\s([^\{|\n]+){#([^\}]+)}/gm,
145+
/(#+)\s([^{|\n]+){#([^}]+)}/gm,
146146
(match, size, heading, id) => {
147147
const level = size.length
148148
return `<h${level} id="${id}">${heading.trim()}</h${level}>`

tailwind.config.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,11 @@ import tailwindcssAspect from '@tailwindcss/aspect-ratio'
22
import tailwindcssForms from '@tailwindcss/forms'
33
import tailwindcssTypography from '@tailwindcss/typography'
44
import type { Config } from 'tailwindcss'
5-
import { emerald, orange, zinc } from 'tailwindcss/colors.js'
6-
import { fontFamily, spacing } from 'tailwindcss/defaultTheme.js'
5+
import colors from 'tailwindcss/colors.js'
6+
import defaultTheme from 'tailwindcss/defaultTheme.js'
7+
8+
const { emerald, orange, zinc } = colors
9+
const { fontFamily, spacing } = defaultTheme
710

811
function withOpacityValue(variable: string) {
912
return ({ opacityValue }: { opacityValue: number }) => {

0 commit comments

Comments
 (0)