Skip to content

Commit 5989bc4

Browse files
committed
chore: resolve conflict
2 parents f4074d2 + 25167af commit 5989bc4

6 files changed

Lines changed: 20 additions & 36 deletions

File tree

.github/workflows/publish-packages.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ on:
1717

1818
permissions:
1919
contents: read
20+
# For npm OIDC (https://docs.npmjs.com/trusted-publishers)
21+
id-token: write
2022

2123
env:
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
Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
import BaseButton from '@node-core/ui-components/Common/BaseButton';
22
import type { ButtonProps } from '@node-core/ui-components/Common/BaseButton';
3-
import type { FC, ComponentProps } from 'react';
3+
import type { FC } from 'react';
44

55
import 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

119
export default Button;

apps/site/components/Link.tsx

Lines changed: 9 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,17 @@
1-
import type { FC, HTMLProps } from 'react';
1+
import type { FC, AnchorHTMLAttributes, ComponentProps } from 'react';
22

33
import { Link as LocalizedLink } from '#site/navigation.mjs';
44

5-
const Link: FC<HTMLProps<HTMLAnchorElement>> = ({
6-
children,
7-
href,
8-
...props
9-
}) => {
10-
if (!href || /^https?:/.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 || /^https?:/.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

2517
export default Link;

apps/site/components/LinkWithArrow.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
import { ArrowUpRightIcon } from '@heroicons/react/24/solid';
22
import type { SlotProps } from '@radix-ui/react-slot';
33
import { Slot } from '@radix-ui/react-slot';
4-
import type { ComponentProps, FC, PropsWithChildren } from 'react';
4+
import type { FC, PropsWithChildren } from 'react';
55

66
import Link from '#site/components/Link';
7+
import type { LinkProps } from '#site/components/Link';
78

89
type LinkWithArrowProps =
9-
| ({ asChild?: false } & ComponentProps<typeof Link>)
10+
| ({ asChild?: false } & LinkProps)
1011
| ({ asChild: true } & SlotProps);
1112

1213
const 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" />

apps/site/components/Releases/MinorReleasesTable/index.tsx

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff 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')}

apps/site/next.constants.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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
*/
175175
export 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

0 commit comments

Comments
 (0)