Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions data-migration/package-lock.json

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

4 changes: 2 additions & 2 deletions data-migration/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@
"yarn": "1.22.19"
},
"overrides": {
"@hono/node-server": "2.1.3",
"@hono/node-server": "2.1.8",
"deepmerge-ts": "8.0.0",
"effect": "3.22.0",
"glob": "14.0.2",
"hono": "4.13.11",
"hono": "4.13.18",
"lodash": "4.18.1",
"valibot": "1.4.2",
"mysql2": "3.23.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -283,19 +283,19 @@ const convertRichTextSectionToMarkdown = (value) => {
.replace(/<br\s*\/?>\s*(?:<\/br>)?/gi, "\n")
.replace(/<(tt|code|type)\b[^>]*>([\s\S]*?)<\/\1>/gi, (_, __, content) => {
const inline = toInlineText(content);
return inline ? `\`${inline}\`` : "";
return inline ? `\`${inline}\`` : " ";
})
.replace(/<(b|strong)\b[^>]*>([\s\S]*?)<\/\1>/gi, (_, __, content) => {
const inline = toInlineText(content);
return inline ? `**${inline}**` : "";
return inline ? `**${inline}**` : " ";
})
.replace(/<(i|em)\b[^>]*>([\s\S]*?)<\/\1>/gi, (_, __, content) => {
const inline = toInlineText(content);
return inline ? `*${inline}*` : "";
return inline ? `*${inline}*` : " ";
})
.replace(/<sup\b[^>]*>([\s\S]*?)<\/sup>/gi, (_, content) => {
const inline = toInlineText(content);
return inline ? `^${inline}^` : "";
return inline ? `^${inline}^` : " ";
})
.replace(/<li\b[^>]*>/gi, "\n- ")
.replace(/<\/li>/gi, "\n")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,18 @@ describe("importHistoricalMarathonMatches description sourcing", () => {
source: "legacy-component-text-markdown",
});
});

test.each(["tt", "code", "type", "b", "strong", "i", "em", "sup"])(
"keeps a separator when an empty %s element interrupts an HTML tag",
(tag) => {
const markdown = convertComponentXmlToMarkdown(
`<problem><statement>before &lt;${tag}></${tag}>iframe src='https://evil.example'&gt;after</statement></problem>`
);

expect(markdown).toContain("before");
expect(markdown).toContain("after");
expect(markdown).toContain("iframe src='https://evil.example'>after");
expect(markdown).not.toMatch(/<iframe\b/i);
}
);
});
6 changes: 3 additions & 3 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# syntax=docker/dockerfile:1.7

ARG NODE_VERSION=26.12.1
ARG NODE_VERSION=26.13.1
ARG ALPINE_VERSION=3.24
ARG PNPM_VERSION=11.15.1

Expand All @@ -11,7 +11,7 @@ FROM node-base AS build-base
ARG PNPM_VERSION

RUN apk upgrade --no-cache \
&& apk add --no-cache openssl
&& apk add --no-cache 'zlib>=1.4-r0' openssl
WORKDIR /challenge-api
RUN npm install --global pnpm@${PNPM_VERSION}

Expand Down Expand Up @@ -41,7 +41,7 @@ FROM alpine:${ALPINE_VERSION} AS runtime
COPY --from=node-base /usr/local/bin/node /usr/local/bin/node
ARG NODE_VERSION
RUN apk upgrade --no-cache \
&& apk add --no-cache ca-certificates libatomic libstdc++ openssl \
&& apk add --no-cache 'zlib>=1.4-r0' ca-certificates libatomic libstdc++ openssl \
&& test "$(node --version)" = "v${NODE_VERSION}" \
&& addgroup -S app \
&& adduser -S -D -u 10001 -G app app
Expand Down
6 changes: 3 additions & 3 deletions mock-api/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG NODE_VERSION=26.5.1
ARG NODE_VERSION=26.13.1
ARG ALPINE_VERSION=3.24
ARG PNPM_VERSION=11.15.1

Expand All @@ -9,7 +9,7 @@ FROM node-base AS build
ARG PNPM_VERSION

RUN apk upgrade --no-cache \
&& apk add --no-cache openssl \
&& apk add --no-cache 'zlib>=1.4-r0' openssl \
&& npm install --global pnpm@${PNPM_VERSION}

WORKDIR /challenge-api
Expand Down Expand Up @@ -38,7 +38,7 @@ FROM alpine:${ALPINE_VERSION} AS runtime
COPY --from=node-base /usr/local/bin/node /usr/local/bin/node
ARG NODE_VERSION
RUN apk upgrade --no-cache \
&& apk add --no-cache ca-certificates libatomic libstdc++ openssl \
&& apk add --no-cache 'zlib>=1.4-r0' ca-certificates libatomic libstdc++ openssl \
&& test "$(node --version)" = "v${NODE_VERSION}" \
&& addgroup -S app \
&& adduser -S -D -u 10001 -G app app
Expand Down
27 changes: 15 additions & 12 deletions pnpm-lock.yaml

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

6 changes: 4 additions & 2 deletions pnpm-workspace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ allowBuilds:
dtrace-provider: false

overrides:
# Keep linked service packages on the same hardened JWT verifier as this API.
tc-core-library-js: github:topcoder-platform/tc-core-library-js#v4.0.0-rc.2
'baseline-browser-mapping': 2.11.0
'browserslist': 4.28.8
'proxy-addr': 2.0.8
Expand All @@ -22,8 +24,8 @@ overrides:
'joi': 18.3.1
'moment': 2.31.0
'mysql2': 3.23.1
'hono': 4.13.11
'@hono/node-server': 2.1.3
'hono': 4.13.18
'@hono/node-server': 2.1.8
'js-yaml@^3': 3.15.2
'js-yaml@^4': 4.3.2
'js-yaml@^5': 5.4.1
Expand Down
Loading