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 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')}
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