File tree Expand file tree Collapse file tree
Releases/MinorReleasesTable Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1717
1818permissions :
1919 contents : read
20+ # For npm OIDC (https://docs.npmjs.com/trusted-publishers)
21+ id-token : write
2022
2123env :
2224 COMMIT_SHA : ${{ github.sha }}
@@ -115,8 +117,6 @@ jobs:
115117
116118 - name : Publish
117119 working-directory : packages/${{ matrix.package }}
118- env :
119- NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
120120 run : |
121121 # Install deps
122122 pnpm install --frozen-lockfile
Original file line number Diff line number Diff line change 11import BaseButton from '@node-core/ui-components/Common/BaseButton' ;
22import type { ButtonProps } from '@node-core/ui-components/Common/BaseButton' ;
3- import type { FC , ComponentProps } from 'react' ;
3+ import type { FC } from 'react' ;
44
55import Link from '#site/components/Link' ;
66
7- const Button : FC <
8- Omit < ButtonProps , 'as' > & Omit < ComponentProps < typeof Link > , 'as' | 'size' >
9- > = props => < BaseButton as = { Link } { ...props } /> ;
7+ const Button : FC < ButtonProps > = props => < BaseButton as = { Link } { ...props } /> ;
108
119export default Button ;
Original file line number Diff line number Diff line change 1- import type { FC , HTMLProps } from 'react' ;
1+ import type { FC , AnchorHTMLAttributes , ComponentProps } from 'react' ;
22
33import { Link as LocalizedLink } from '#site/navigation.mjs' ;
44
5- const Link : FC < HTMLProps < HTMLAnchorElement > > = ( {
6- children,
7- href,
8- ...props
9- } ) => {
10- if ( ! href || / ^ h t t p s ? : / . test ( href . toString ( ) ) ) {
11- return (
12- < a href = { href } { ...props } >
13- { children }
14- </ a >
15- ) ;
5+ export type LinkProps =
6+ | ComponentProps < typeof LocalizedLink >
7+ | AnchorHTMLAttributes < HTMLAnchorElement > ;
8+
9+ const Link : FC < LinkProps > = ( { href, ...props } ) => {
10+ if ( ! href || / ^ h t t p s ? : / . test ( href as string ) ) {
11+ return < a href = { href as string } { ...props } /> ;
1612 }
1713
18- return (
19- < LocalizedLink href = { href ?. toString ( ) } { ...props } >
20- { children }
21- </ LocalizedLink >
22- ) ;
14+ return < LocalizedLink href = { href } { ...props } /> ;
2315} ;
2416
2517export default Link ;
Original file line number Diff line number Diff line change 11import { ArrowUpRightIcon } from '@heroicons/react/24/solid' ;
22import type { SlotProps } from '@radix-ui/react-slot' ;
33import { Slot } from '@radix-ui/react-slot' ;
4- import type { ComponentProps , FC , PropsWithChildren } from 'react' ;
4+ import type { FC , PropsWithChildren } from 'react' ;
55
66import Link from '#site/components/Link' ;
7+ import type { LinkProps } from '#site/components/Link' ;
78
89type LinkWithArrowProps =
9- | ( { asChild ?: false } & ComponentProps < typeof Link > )
10+ | ( { asChild ?: false } & LinkProps )
1011 | ( { asChild : true } & SlotProps ) ;
1112
1213const LinkWithArrow : FC < PropsWithChildren < LinkWithArrowProps > > = ( {
@@ -17,7 +18,7 @@ const LinkWithArrow: FC<PropsWithChildren<LinkWithArrowProps>> = ({
1718 const Comp = asChild ? Slot : Link ;
1819
1920 return (
20- < Comp { ...props } >
21+ < Comp { ...( props as SlotProps ) } >
2122 < span >
2223 { children }
2324 < ArrowUpRightIcon className = "ml-1 inline w-3 fill-neutral-600 dark:fill-white" />
Original file line number Diff line number Diff line change @@ -34,10 +34,7 @@ const MinorReleasesTable: FC<MinorReleasesTableProps> = ({ releases }) => {
3434 { releases . map ( release => (
3535 < tr key = { release . version } >
3636 < td >
37- < Link
38- kind = "neutral"
39- href = { `/download/archive/v${ release . version } ` }
40- >
37+ < Link href = { `/download/archive/v${ release . version } ` } >
4138 v{ release . version }
4239 </ Link >
4340 </ td >
@@ -72,15 +69,11 @@ const MinorReleasesTable: FC<MinorReleasesTableProps> = ({ releases }) => {
7269 </ td >
7370 < td >
7471 < div className = { styles . additionalLinks } >
75- < Link
76- kind = "neutral"
77- href = { getNodeApiUrl ( `v${ release . version } ` ) }
78- >
72+ < Link href = { getNodeApiUrl ( `v${ release . version } ` ) } >
7973 { t ( 'components.minorReleasesTable.actions.docs' ) }
8074 </ Link >
8175 < Separator orientation = "vertical" />
8276 < LinkWithArrow
83- kind = "neutral"
8477 href = { `${ BASE_CHANGELOG_URL } ${ release . version } ` }
8578 >
8679 { t ( 'components.minorReleasesTable.actions.changelog' ) }
Original file line number Diff line number Diff line change @@ -173,7 +173,7 @@ export const GITHUB_API_KEY = process.env.NEXT_GITHUB_API_KEY || '';
173173 * The resource we point people to when discussing internationalization efforts.
174174 */
175175export const TRANSLATION_URL =
176- 'https://github.com/nodejs/nodejs.org/blob/main/TRANSLATION .md#how-to-translate' ;
176+ 'https://github.com/nodejs/nodejs.org/blob/main/docs/translation .md#how-to-translate' ;
177177
178178/**
179179 * Define the order in which vulnerabilities should be sorted
You can’t perform that action at this time.
0 commit comments