Skip to content

Commit 458c304

Browse files
committed
chore: resolve conflict
2 parents 316741f + 5a401ab commit 458c304

File tree

66 files changed

+2192
-313
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+2192
-313
lines changed

.github/CODEOWNERS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44
# Infrastructure
55
.github @nodejs/web-infra
66
.husky @nodejs/web-infra
7+
.nvmrc @nodejs/web-infra
78
codecov.yml @nodejs/web-infra
9+
packages/ui-components/scripts/publish.mjs @nodejs/web-infra
810

911
# Dependencies
1012
pnpm-workspace.yaml @nodejs/nodejs-website @nodejs/web-infra

.github/workflows/publish-packages.yml

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,13 +74,25 @@ jobs:
7474
# If a specific package is requested via workflow_dispatch, just publish that one
7575
echo "matrix={\"package\":[\"$PACKAGE\"]}" >> $GITHUB_OUTPUT
7676
else
77-
# Otherwise, identify all packages with changes since the last commit
7877
CHANGED_PACKAGES=()
7978
for pkg in $(ls -d packages/*); do
8079
PKG_NAME=$(basename "$pkg")
81-
# For manual runs, include all packages. For automatic runs, only include packages with changes
80+
PKG_JSON="$pkg/package.json"
81+
82+
# Determine if the package has changed (or include all on manual trigger)
8283
if [ "$EVENT_NAME" == "workflow_dispatch" ] || ! git diff --quiet $COMMIT_SHA~1 $COMMIT_SHA -- "$pkg/"; then
83-
CHANGED_PACKAGES+=("$PKG_NAME")
84+
HAS_VERSION=$(jq 'has("version")' "$PKG_JSON")
85+
if [ "$HAS_VERSION" == "false" ]; then
86+
# Include packages without version field
87+
CHANGED_PACKAGES+=("$PKG_NAME")
88+
else
89+
# For packages with version field, include only if version changed
90+
OLD_VERSION=$(git show $COMMIT_SHA~1:$PKG_JSON | jq -r '.version')
91+
NEW_VERSION=$(jq -r '.version' "$PKG_JSON")
92+
if [ "$OLD_VERSION" != "$NEW_VERSION" ]; then
93+
CHANGED_PACKAGES+=("$PKG_NAME")
94+
fi
95+
fi
8496
fi
8597
done
8698
@@ -115,13 +127,22 @@ jobs:
115127
node-version-file: '.nvmrc'
116128
registry-url: 'https://registry.npmjs.org'
117129

130+
- name: Re-install npm
131+
# TODO: OIDC requires npm >=11.5.1.
132+
# Until Node.js v24 is LTS (with npm 11 as the default), we need to bump.
133+
run: npm install -g npm@11
134+
118135
- name: Publish
119136
working-directory: packages/${{ matrix.package }}
120137
run: |
121138
# Install deps
122139
pnpm install --frozen-lockfile
123-
# Create a unique version using the commit SHA as a prerelease identifier
124-
npm version --no-git-tag-version 1.0.1-$COMMIT_SHA
140+
141+
HAS_VERSION=$(jq 'has("version")' package.json)
142+
if [ "$HAS_VERSION" == "false" ]; then
143+
# Only bump version if package has no version field
144+
npm version --no-git-tag-version 1.0.1-$COMMIT_SHA
145+
fi
125146
126147
# Check if a custom publish script exists in package.json
127148
if jq -e '.scripts.publish' package.json > /dev/null; then

apps/site/.remarkrc.json

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,3 @@
11
{
2-
"settings": {
3-
"bullet": "-",
4-
"resourceLink": true
5-
},
6-
"plugins": [
7-
"remark-frontmatter",
8-
"remark-preset-lint-node",
9-
["remark-gfm", false],
10-
["remark-lint-fenced-code-flag", false],
11-
["remark-lint-first-heading-level", false],
12-
["remark-lint-maximum-line-length", false],
13-
["remark-lint-no-file-name-articles", false],
14-
["remark-lint-no-literal-urls", false],
15-
["remark-lint-no-unused-definitions", false],
16-
["remark-lint-no-undefined-references", false],
17-
["remark-lint-prohibited-strings", false],
18-
["remark-lint-unordered-list-marker-style", "-"],
19-
["remark-preset-lint-node/remark-lint-nodejs-links.js", false]
20-
]
2+
"plugins": ["remark-frontmatter", "@node-core/remark-lint"]
213
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
@reference "../../../styles/index.css";
2+
3+
.icon {
4+
@apply ml-1
5+
inline
6+
w-3
7+
fill-neutral-600
8+
dark:fill-white;
9+
}
10+
11+
.button {
12+
@apply text-green-600
13+
hover:text-green-900
14+
dark:text-green-400
15+
dark:hover:text-green-200;
16+
}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
import { ArrowUpRightIcon } from '@heroicons/react/24/solid';
2+
import classNames from 'classnames';
3+
import type {
4+
ButtonHTMLAttributes,
5+
ComponentProps,
6+
FC,
7+
PropsWithChildren,
8+
} from 'react';
9+
10+
import Link from '#site/components/Link';
11+
12+
import styles from './index.module.css';
13+
14+
type LinkWithArrowProps =
15+
| ComponentProps<typeof Link>
16+
| ButtonHTMLAttributes<HTMLButtonElement>;
17+
18+
const LinkWithArrow: FC<PropsWithChildren<LinkWithArrowProps>> = ({
19+
children,
20+
className,
21+
...props
22+
}) =>
23+
'href' in props ? (
24+
<Link {...props} className={className}>
25+
{children}
26+
<ArrowUpRightIcon className={styles.icon} />
27+
</Link>
28+
) : (
29+
<button
30+
className={classNames(className, styles.button)}
31+
{...(props as ButtonHTMLAttributes<HTMLButtonElement>)}
32+
>
33+
{children}
34+
<ArrowUpRightIcon className={styles.icon} />
35+
</button>
36+
);
37+
38+
export default LinkWithArrow;

apps/site/components/Downloads/DownloadLink.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import type { FC, PropsWithChildren } from 'react';
44

5-
import LinkWithArrow from '#site/components/LinkWithArrow';
5+
import LinkWithArrow from '#site/components/Common/LinkWithArrow';
66
import { useClientContext } from '#site/hooks';
77
import type { DownloadKind, NodeRelease } from '#site/types';
88
import { getNodeDownloadUrl } from '#site/util/url';

apps/site/components/Downloads/Release/ChangelogLink.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,16 @@
33
import type { FC, PropsWithChildren } from 'react';
44
import { useContext } from 'react';
55

6-
import Link from '#site/components/Link';
7-
import LinkWithArrow from '#site/components/LinkWithArrow';
6+
import LinkWithArrow from '#site/components/Common/LinkWithArrow';
87
import { BASE_CHANGELOG_URL } from '#site/next.constants.mjs';
98
import { ReleaseContext } from '#site/providers/releaseProvider';
109

1110
const ChangelogLink: FC<PropsWithChildren> = ({ children }) => {
1211
const { release } = useContext(ReleaseContext);
1312

1413
return (
15-
<LinkWithArrow asChild>
16-
<Link href={`${BASE_CHANGELOG_URL}${release.version}`}>{children}</Link>
14+
<LinkWithArrow href={`${BASE_CHANGELOG_URL}${release.version}`}>
15+
{children}
1716
</LinkWithArrow>
1817
);
1918
};

apps/site/components/Downloads/Release/ReleaseCodeBox.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ import type { FC } from 'react';
88
import { useContext, useMemo } from 'react';
99

1010
import CodeBox from '#site/components/Common/CodeBox';
11+
import LinkWithArrow from '#site/components/Common/LinkWithArrow';
1112
import Link from '#site/components/Link';
12-
import LinkWithArrow from '#site/components/LinkWithArrow';
1313
import WithReleaseAlertBox from '#site/components/withReleaseAlertBox';
1414
import { createSval } from '#site/next.jsx.compiler.mjs';
1515
import {

apps/site/components/EOL/EOLReleaseTable.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ import { Fragment, useState } from 'react';
55
import type { FC } from 'react';
66

77
import FormattedTime from '#site/components/Common/FormattedTime';
8+
import LinkWithArrow from '#site/components/Common/LinkWithArrow';
89
import EOLModal from '#site/components/EOL/EOLModal';
910
import VulnerabilityChips from '#site/components/EOL/VulnerabilityChips';
10-
import LinkWithArrow from '#site/components/LinkWithArrow';
1111
import provideReleaseData from '#site/next-data/providers/releaseData';
1212
import provideVulnerabilities from '#site/next-data/providers/vulnerabilities';
1313
import { EOL_VERSION_IDENTIFIER } from '#site/next.constants.mjs';

apps/site/components/EOL/VulnerabilitiesTable.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import classNames from 'classnames';
22
import { useTranslations } from 'next-intl';
33
import type { FC } from 'react';
44

5+
import LinkWithArrow from '#site/components/Common/LinkWithArrow';
56
import VulnerabilityChip from '#site/components/EOL/VulnerabilityChips/VulnerabilityChip';
6-
import LinkWithArrow from '#site/components/LinkWithArrow';
77
import type { Vulnerability } from '#site/types/vulnerabilities';
88

99
const VulnerabilitiesTable: FC<{

0 commit comments

Comments
 (0)