From 2f424739c9410ae52b2fb89bb71c78bce82e645c Mon Sep 17 00:00:00 2001 From: Aviv Keller Date: Tue, 19 Aug 2025 13:54:38 -0400 Subject: [PATCH 1/3] chore(types): improve `Link` types (#8081) --- apps/site/components/Common/Button.tsx | 6 ++--- apps/site/components/Link.tsx | 26 +++++++------------ apps/site/components/LinkWithArrow.tsx | 7 ++--- .../Releases/MinorReleasesTable/index.tsx | 11 ++------ 4 files changed, 17 insertions(+), 33 deletions(-) diff --git a/apps/site/components/Common/Button.tsx b/apps/site/components/Common/Button.tsx index 11768132a2d07..74b89251ad706 100644 --- a/apps/site/components/Common/Button.tsx +++ b/apps/site/components/Common/Button.tsx @@ -1,11 +1,9 @@ import BaseButton from '@node-core/ui-components/Common/BaseButton'; import type { ButtonProps } from '@node-core/ui-components/Common/BaseButton'; -import type { FC, ComponentProps } from 'react'; +import type { FC } from 'react'; import Link from '#site/components/Link'; -const Button: FC< - Omit & Omit, 'as' | 'size'> -> = props => ; +const Button: FC = props => ; export default Button; diff --git a/apps/site/components/Link.tsx b/apps/site/components/Link.tsx index b7d32ff911acd..63fcecdcb6087 100644 --- a/apps/site/components/Link.tsx +++ b/apps/site/components/Link.tsx @@ -1,25 +1,17 @@ -import type { FC, HTMLProps } from 'react'; +import type { FC, AnchorHTMLAttributes, ComponentProps } from 'react'; import { Link as LocalizedLink } from '#site/navigation.mjs'; -const Link: FC> = ({ - children, - href, - ...props -}) => { - if (!href || /^https?:/.test(href.toString())) { - return ( - - {children} - - ); +export type LinkProps = + | ComponentProps + | AnchorHTMLAttributes; + +const Link: FC = ({ href, ...props }) => { + if (!href || /^https?:/.test(href as string)) { + return ; } - return ( - - {children} - - ); + return ; }; export default Link; diff --git a/apps/site/components/LinkWithArrow.tsx b/apps/site/components/LinkWithArrow.tsx index 12eb3cdf5472d..8e9cc3abb91bd 100644 --- a/apps/site/components/LinkWithArrow.tsx +++ b/apps/site/components/LinkWithArrow.tsx @@ -1,12 +1,13 @@ import { ArrowUpRightIcon } from '@heroicons/react/24/solid'; import type { SlotProps } from '@radix-ui/react-slot'; import { Slot } from '@radix-ui/react-slot'; -import type { ComponentProps, FC, PropsWithChildren } from 'react'; +import type { FC, PropsWithChildren } from 'react'; import Link from '#site/components/Link'; +import type { LinkProps } from '#site/components/Link'; type LinkWithArrowProps = - | ({ asChild?: false } & ComponentProps) + | ({ asChild?: false } & LinkProps) | ({ asChild: true } & SlotProps); const LinkWithArrow: FC> = ({ @@ -17,7 +18,7 @@ const LinkWithArrow: FC> = ({ const Comp = asChild ? Slot : Link; return ( - + {children} diff --git a/apps/site/components/Releases/MinorReleasesTable/index.tsx b/apps/site/components/Releases/MinorReleasesTable/index.tsx index 8cfbafcf91000..8aaa68f42562f 100644 --- a/apps/site/components/Releases/MinorReleasesTable/index.tsx +++ b/apps/site/components/Releases/MinorReleasesTable/index.tsx @@ -36,23 +36,16 @@ export const MinorReleasesTable: FC = ({
{t('components.minorReleasesTable.actions.release')} - + {t('components.minorReleasesTable.actions.changelog')} - + {t('components.minorReleasesTable.actions.docs')}
From e97931b1a13ff64d9510712146f070c531e45d16 Mon Sep 17 00:00:00 2001 From: Aviv Keller Date: Tue, 19 Aug 2025 13:54:55 -0400 Subject: [PATCH 2/3] chore(publishing): use oidc (#8085) --- .github/workflows/publish-packages.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish-packages.yml b/.github/workflows/publish-packages.yml index 7c9a0bc6f6a15..dcccabed6b39c 100644 --- a/.github/workflows/publish-packages.yml +++ b/.github/workflows/publish-packages.yml @@ -17,6 +17,8 @@ on: permissions: contents: read + # For npm OIDC (https://docs.npmjs.com/trusted-publishers) + id-token: write env: COMMIT_SHA: ${{ github.sha }} @@ -115,8 +117,6 @@ jobs: - name: Publish working-directory: packages/${{ matrix.package }} - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} run: | # Install deps pnpm install --frozen-lockfile From 25167af0475f619d22406778a4d9f9a7c18d691c Mon Sep 17 00:00:00 2001 From: Yukihiro Hasegawa <49516827+y-hsgw@users.noreply.github.com> Date: Wed, 20 Aug 2025 03:00:03 +0900 Subject: [PATCH 3/3] fix: Update TRANSLATION_URL to new docs path (#8090) fix: update translation URL to point to the correct documentation path --- apps/site/next.constants.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/site/next.constants.mjs b/apps/site/next.constants.mjs index 0ff5b27102530..6a6c184aa79b9 100644 --- a/apps/site/next.constants.mjs +++ b/apps/site/next.constants.mjs @@ -173,7 +173,7 @@ export const GITHUB_API_KEY = process.env.NEXT_GITHUB_API_KEY || ''; * The resource we point people to when discussing internationalization efforts. */ export const TRANSLATION_URL = - 'https://github.com/nodejs/nodejs.org/blob/main/TRANSLATION.md#how-to-translate'; + 'https://github.com/nodejs/nodejs.org/blob/main/docs/translation.md#how-to-translate'; /** * Define the order in which vulnerabilities should be sorted