Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] main from nodejs:main #301

Merged
merged 4 commits into from
Nov 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:
# If the Workflow is running on `merge_group` or `push` events it fallsback to the base repository
repository: ${{ github.event.pull_request.head.repo.full_name || github.repository }}
# We checkout the branch itself instead of a specific SHA (Commit) as we want to ensure that this Workflow
# is always running with the latest `ref` (changes) of the Pull Request's branh
# is always running with the latest `ref` (changes) of the Pull Request's branch
# If the Workflow is running on `merge_group` or `push` events it fallsback to `github.ref` which will often be `main`
# or the merge_group `ref`
ref: ${{ github.event.pull_request.head.ref || github.ref }}
Expand All @@ -80,7 +80,7 @@ jobs:
fetch-depth: 1

- name: Restore Build Cache
uses: actions/cache/restore@704facf57e6136b1bc63b828d79edcd491f0ee84
uses: actions/cache/restore@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
with:
path: |
.turbo/cache
Expand All @@ -94,7 +94,7 @@ jobs:
cache-build-

- name: Set up Node.js
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0
with:
# We want to ensure that the Node.js version running here respects our supported versions
node-version-file: '.nvmrc'
Expand Down Expand Up @@ -138,7 +138,7 @@ jobs:
# since caches created on the `main` (default) branch can be reused on Pull Requests and PRs coming from forks
if: |
github.event_name == 'push' || github.event_name == 'pull_request_target'
uses: actions/cache/save@704facf57e6136b1bc63b828d79edcd491f0ee84
uses: actions/cache/save@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
with:
path: |
.turbo/cache
Expand Down
15 changes: 8 additions & 7 deletions .github/workflows/lint-and-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,13 @@ jobs:
# If the Workflow is running on `merge_group` or `push` events it fallsback to the base repository
repository: ${{ github.event.pull_request.head.repo.full_name || github.repository }}
# We checkout the branch itself instead of a specific SHA (Commit) as we want to ensure that this Workflow
# is always running with the latest `ref` (changes) of the Pull Request's branh
# is always running with the latest `ref` (changes) of the Pull Request's branch
# If the Workflow is running on `merge_group` or `push` events it fallsback to `github.ref` which will often be `main`
# or the merge_group `ref`
ref: ${{ github.event.pull_request.head.ref || github.ref }}

- name: Restore Lint Cache
uses: actions/cache/restore@704facf57e6136b1bc63b828d79edcd491f0ee84
uses: actions/cache/restore@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
with:
path: |
.turbo/cache
Expand All @@ -95,7 +95,7 @@ jobs:
cache-lint-

- name: Set up Node.js
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0
with:
# We want to ensure that the Node.js version running here respects our supported versions
node-version-file: '.nvmrc'
Expand Down Expand Up @@ -140,7 +140,7 @@ jobs:
(github.event_name == 'pull_request_target' &&
startsWith(github.event.pull_request.head.ref, 'dependabot/') == false &&
github.event.pull_request.head.ref != 'chore/crowdin')
uses: actions/cache/save@704facf57e6136b1bc63b828d79edcd491f0ee84
uses: actions/cache/save@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
with:
path: |
.turbo/cache
Expand Down Expand Up @@ -179,7 +179,7 @@ jobs:
# If the Workflow is running on `merge_group` or `push` events it fallsback to the base repository
repository: ${{ github.event.pull_request.head.repo.full_name || github.repository }}
# We checkout the branch itself instead of a specific SHA (Commit) as we want to ensure that this Workflow
# is always running with the latest `ref` (changes) of the Pull Request's branh
# is always running with the latest `ref` (changes) of the Pull Request's branch
# If the Workflow is running on `merge_group` or `push` events it fallsback to `github.ref` which will often be `main`
# or the merge_group `ref`
ref: ${{ github.event.pull_request.head.ref || github.ref }}
Expand All @@ -188,7 +188,7 @@ jobs:
fetch-depth: 0

- name: Set up Node.js
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0
with:
# We want to ensure that the Node.js version running here respects our supported versions
node-version-file: '.nvmrc'
Expand Down Expand Up @@ -216,6 +216,7 @@ jobs:
(github.event_name == 'pull_request_target' &&
startsWith(github.event.pull_request.head.ref, 'dependabot/') == false &&
github.event.pull_request.head.ref != 'chore/crowdin')
# sha reference has no stable git tag reference or URL. see https://github.com/chromaui/chromatic-cli/issues/797
uses: chromaui/action@807600692d28833b717c155e15ed20905cdc865c
with:
buildScriptName: storybook:build
Expand All @@ -230,7 +231,7 @@ jobs:
if: steps.chromatic-deploy.outcome == 'success'
# This comments the current Jest Coverage Report containing JUnit XML reports
# and a Code Coverage Summary
uses: MishaKav/jest-coverage-comment@41b5ca01d1250de84537448d248b8d18152cb277
uses: MishaKav/jest-coverage-comment@41b5ca01d1250de84537448d248b8d18152cb277 # v1.0.23
with:
title: 'Unit Test Coverage Report'
junitxml-path: ./junit.xml
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pull-request-label.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Remove GitHub Actions Label
uses: actions-ecosystem/action-remove-labels@2ce5d41b4b6aa8503e285553f75ed56e0a40bae0
uses: actions-ecosystem/action-remove-labels@2ce5d41b4b6aa8503e285553f75ed56e0a40bae0 # v1.3.0
with:
labels: github_actions:pull-request
10 changes: 5 additions & 5 deletions .github/workflows/translations-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: thollander/actions-comment-pull-request@1d3973dc4b8e1399c0620d3f2b1aa5e795465308
- uses: thollander/actions-comment-pull-request@1d3973dc4b8e1399c0620d3f2b1aa5e795465308 # v2.4.3
with:
message: |
> [!NOTE]\
Expand Down Expand Up @@ -64,7 +64,7 @@ jobs:
ref: ${{ github.event.pull_request.head.ref }}

- name: Restore Lint Cache
uses: actions/cache/restore@704facf57e6136b1bc63b828d79edcd491f0ee84
uses: actions/cache/restore@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
with:
path: |
.eslintmdcache
Expand All @@ -80,7 +80,7 @@ jobs:
cache-lint-

- name: Set up Node.js
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0
with:
# We want to ensure that the Node.js version running here respects our supported versions
node-version-file: '.nvmrc'
Expand All @@ -102,13 +102,13 @@ jobs:
run: npx prettier "{pages,i18n}/**/*.{json,md,mdx}" --check --write --cache --cache-strategy=metadata --cache-location=.prettiercache

- name: Push Changes back to Pull Request
uses: stefanzweifel/git-auto-commit-action@8756aa072ef5b4a080af5dc8fef36c5d586e521d
uses: stefanzweifel/git-auto-commit-action@8756aa072ef5b4a080af5dc8fef36c5d586e521d # v5.0.0
with:
commit_options: '--no-verify --signoff'
commit_message: 'chore: automated format of translated files'

- name: Save Lint Cache
uses: actions/cache/save@704facf57e6136b1bc63b828d79edcd491f0ee84
uses: actions/cache/save@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
with:
path: |
.eslintmdcache
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import Image from 'next/image';
import type { FC } from 'react';
import { FormattedMessage } from 'react-intl';

import NavItem from '@/components/sections/NavItem';
import NavItem from '@/components/Sections/NavItem';
import { useSiteConfig } from '@/hooks/useSiteConfig';

import styles from './index.module.css';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
dark:text-white;
}

&:active {
&.active {
@apply bg-green-600;

.label {
Expand All @@ -46,7 +46,7 @@
}

&:hover {
@apply dark:bg-neutral-900;
@apply bg-neutral-100 dark:bg-neutral-900;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import classNames from 'classnames';
import type { FC, PropsWithChildren } from 'react';
import { useMemo } from 'react';

import LocalizedLink from '@/components/LocalizedLink';
import ActiveLocalizedLink from '@/components/Common/ActiveLocalizedLink';

import styles from './index.module.css';

Expand All @@ -16,24 +16,25 @@ type NavItemProps = {
};

const NavItem: FC<PropsWithChildren<NavItemProps>> = ({
href,
href = '',
type = 'nav',
children,
className,
}) => {
const showIcon = useMemo(
() => type === 'nav' && /^https?:\/\//.test(href),
() => type === 'nav' && !href.toString().startsWith('/'),
[href, type]
);

return (
<LocalizedLink
<ActiveLocalizedLink
href={href}
className={classNames(styles.navItem, styles[type], className)}
activeClassName={styles.active}
>
<span className={styles.label}>{children}</span>
{showIcon && <ArrowUpRightIcon className={styles.icon} />}
</LocalizedLink>
</ActiveLocalizedLink>
);
};

Expand Down
Loading