Skip to content
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
4 changes: 2 additions & 2 deletions apps/site/hooks/react-client/__tests__/useDetectOS.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ describe('useDetectOS', () => {
await waitFor(() => {
assert.deepEqual(result.current, {
os: 'MAC',
bitness: '32',
architecture: 'x86',
bitness: '64',
architecture: 'arm',
});
});
});
Expand Down
11 changes: 7 additions & 4 deletions apps/site/hooks/react-client/useDetectOS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import type {
Bitness,
OperatingSystem,
} from '#site/types/userAgent';
import { getHighEntropyValues, detectOS } from '#site/util/userAgent';
import { detectOS, getHighEntropyValues } from '#site/util/userAgent';

type UserOSState = {
os: OperatingSystem | 'LOADING';
Expand All @@ -28,10 +28,12 @@ const useDetectOS = () => {
navigator.userAgent
);

const os = detectOS();

// We immediately set the OS to LOADING, and then we update it with the detected OS.
// This is due to that initial render set within the state will indicate a mismatch from
// the server-side rendering versus what the initial state is from the client-side
setUserOSState(current => ({ ...current, os: detectOS() }));
setUserOSState(current => ({ ...current, os }));

// We attempt to get the high entropy values from the Browser and set the User OS State
// based from the values we get from the Browser, if it fails we fallback to the User Agent
Expand All @@ -40,8 +42,9 @@ const useDetectOS = () => {
({
// If there is no getHighEntropyValues API on the Browser or it failed to resolve
// we attempt to fallback to what the User Agent indicates
bitness = uaIndicates64 ? '64' : '32',
architecture = 'x86',
bitness = os === 'MAC' || uaIndicates64 ? '64' : '32',
// we assume that MacOS has moved to arm64 by default now
architecture = os === 'MAC' ? 'arm' : 'x86',
}) => {
setUserOSState(current => ({
...current,
Expand Down
4 changes: 2 additions & 2 deletions apps/site/pages/en/blog/migrations/v22-to-v24.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -157,10 +157,10 @@ The [`fs.truncate`](https://nodejs.org/api/fs.html#fs_fs_truncate_path_len_callb

The source code for this codemod can be found in the [fs-truncate-fd-deprecation directory](https://github.com/nodejs/userland-migrations/tree/main/recipes/fs-truncate-fd-deprecation).

You can find this codemod in the [Codemod Registry](https://app.codemod.com/registry/@nodejs/fs-truncate-to-ftruncate).
You can find this codemod in the [Codemod Registry](https://app.codemod.com/registry/@nodejs/fs-truncate-fd-deprecation).

```bash
npx codemod run @nodejs/fs-truncate-to-ftruncate
npx codemod run @nodejs/fs-truncate-fd-deprecation
```

#### Example:
Expand Down
172 changes: 172 additions & 0 deletions apps/site/pages/en/blog/release/v24.11.1.md

Large diffs are not rendered by default.

198 changes: 198 additions & 0 deletions apps/site/pages/en/blog/release/v25.2.0.md

Large diffs are not rendered by default.

14 changes: 12 additions & 2 deletions packages/ui-components/.storybook/preview.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { withThemeByDataAttribute } from '@storybook/addon-themes';
import type { Preview, ReactRenderer } from '@storybook/react';
import type { Preview, ReactRenderer } from '@storybook/react-webpack5';

import { NotificationProvider } from '#ui/Providers/NotificationProvider';

Expand All @@ -10,8 +10,11 @@ import '#ui/styles/index.css';
const preview: Preview = {
parameters: {
chromatic: { modes: STORYBOOK_MODES },
viewport: { defaultViewport: 'large', viewports: STORYBOOK_SIZES },
viewport: {
options: STORYBOOK_SIZES,
},
},

decorators: [
Story => (
<NotificationProvider>
Expand All @@ -27,6 +30,13 @@ const preview: Preview = {
// this can be removed, since `withThemeByDataAttribute`
// will return the same type that is accepted by `Preview`
] as Preview['decorators'],

initialGlobals: {
viewport: {
value: 'large',
isRotated: false,
},
},
};

export default preview;
2 changes: 1 addition & 1 deletion packages/ui-components/__design__/colors.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Meta as MetaObj, StoryObj } from '@storybook/react';
import type { Meta as MetaObj, StoryObj } from '@storybook/react-webpack5';

export const Colors: StoryObj = {
render: () => (
Expand Down
2 changes: 1 addition & 1 deletion packages/ui-components/__design__/effects.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Meta as MetaObj, StoryObj } from '@storybook/react';
import type { Meta as MetaObj, StoryObj } from '@storybook/react-webpack5';

export const H1Special: StoryObj = {
render: () => <h1 className="special">Special H1</h1>,
Expand Down
2 changes: 1 addition & 1 deletion packages/ui-components/__design__/font-family.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Meta as MetaObj, StoryObj } from '@storybook/react';
import type { Meta as MetaObj, StoryObj } from '@storybook/react-webpack5';

export const FontFamily: StoryObj = {
render: () => (
Expand Down
2 changes: 1 addition & 1 deletion packages/ui-components/__design__/list.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Meta as MetaObj, StoryObj } from '@storybook/react';
import type { Meta as MetaObj, StoryObj } from '@storybook/react-webpack5';

export const OrderedLists: StoryObj = {
render: () => (
Expand Down
2 changes: 1 addition & 1 deletion packages/ui-components/__design__/node-logos.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Meta as MetaObj, StoryObj } from '@storybook/react';
import type { Meta as MetaObj, StoryObj } from '@storybook/react-webpack5';

import { JsWhite, Nodejs } from '#ui/Icons/Logos';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Meta as MetaObj, StoryObj } from '@storybook/react';
import type { Meta as MetaObj, StoryObj } from '@storybook/react-webpack5';

import {
Docker,
Expand Down
2 changes: 1 addition & 1 deletion packages/ui-components/__design__/social-logos.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Meta as MetaObj, StoryObj } from '@storybook/react';
import type { Meta as MetaObj, StoryObj } from '@storybook/react-webpack5';

import {
Bluesky,
Expand Down
2 changes: 1 addition & 1 deletion packages/ui-components/__design__/table.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Meta as MetaObj, StoryObj } from '@storybook/react';
import type { Meta as MetaObj, StoryObj } from '@storybook/react-webpack5';

const tableData = [
['Data 1', 'Data 2', 'Data 3'],
Expand Down
2 changes: 1 addition & 1 deletion packages/ui-components/__design__/text.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Meta as MetaObj, StoryObj } from '@storybook/react';
import type { Meta as MetaObj, StoryObj } from '@storybook/react-webpack5';

export const Anchor: StoryObj = {
render: () => (
Expand Down
9 changes: 4 additions & 5 deletions packages/ui-components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,23 +53,22 @@
},
"devDependencies": {
"@storybook/addon-styling-webpack": "^2.0.0",
"@storybook/addon-themes": "^9.1.10",
"@storybook/addon-themes": "^10.0.2",
"@storybook/addon-webpack5-compiler-swc": "^4.0.1",
"@storybook/react": "^9.1.10",
"@storybook/react-webpack5": "^9.1.10",
"@storybook/react-webpack5": "^10.0.2",
"@testing-library/user-event": "~14.6.1",
"@types/node": "catalog:",
"@types/react": "catalog:",
"cross-env": "catalog:",
"css-loader": "~7.1.2",
"eslint-plugin-react": "~7.37.5",
"eslint-plugin-react-hooks": "^5.2.0",
"eslint-plugin-storybook": "~9.0.3",
"eslint-plugin-storybook": "~10.0.2",
"global-jsdom": "^27.0.0",
"postcss-cli": "^11.0.1",
"postcss-loader": "~8.2.0",
"react": "catalog:",
"storybook": "^9.1.10",
"storybook": "^10.0.2",
"style-loader": "~4.0.0",
"stylelint": "^16.24.0",
"stylelint-config-standard": "^39.0.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ExclamationCircleIcon } from '@heroicons/react/24/solid';
import type { Meta as MetaObj, StoryObj } from '@storybook/react';
import type { Meta as MetaObj, StoryObj } from '@storybook/react-webpack5';

import AlertBox from '#ui/Common/AlertBox';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Meta as MetaObj, StoryObj } from '@storybook/react';
import type { Meta as MetaObj, StoryObj } from '@storybook/react-webpack5';

import Avatar from '#ui/Common/AvatarGroup/Avatar';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Meta as MetaObj, StoryObj } from '@storybook/react';
import type { Meta as MetaObj, StoryObj } from '@storybook/react-webpack5';

import AvatarOverlay from '#ui/Common/AvatarGroup/Overlay';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Meta as MetaObj, StoryObj } from '@storybook/react';
import type { Meta as MetaObj, StoryObj } from '@storybook/react-webpack5';

import AvatarGroup from '#ui/Common/AvatarGroup';

Expand Down
2 changes: 1 addition & 1 deletion packages/ui-components/src/Common/Badge/index.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Meta as MetaObj, StoryObj } from '@storybook/react';
import type { Meta as MetaObj, StoryObj } from '@storybook/react-webpack5';

import Badge from '#ui/Common/Badge';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Meta as MetaObj, StoryObj } from '@storybook/react';
import type { Meta as MetaObj, StoryObj } from '@storybook/react-webpack5';

import BadgeGroup from '#ui/Common/BadgeGroup';

Expand Down
2 changes: 1 addition & 1 deletion packages/ui-components/src/Common/Banner/index.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Meta as MetaObj, StoryObj } from '@storybook/react';
import type { Meta as MetaObj, StoryObj } from '@storybook/react-webpack5';

import Banner from '#ui/Common/Banner';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ArrowRightIcon } from '@heroicons/react/24/solid';
import type { Meta as MetaObj, StoryObj } from '@storybook/react';
import type { Meta as MetaObj, StoryObj } from '@storybook/react-webpack5';

import BaseButton from '#ui/Common/BaseButton';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Meta as MetaObj, StoryObj } from '@storybook/react';
import type { Meta as MetaObj, StoryObj } from '@storybook/react-webpack5';

import BaseCodeBox from '#ui/Common/BaseCodeBox';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Meta as MetaObj, StoryObj } from '@storybook/react';
import type { Meta as MetaObj, StoryObj } from '@storybook/react-webpack5';

import BaseCrossLink from '#ui/Common/BaseCrossLink';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Meta as MetaObj, StoryObj } from '@storybook/react';
import type { Meta as MetaObj, StoryObj } from '@storybook/react-webpack5';

import BaseLinkTabs from '#ui/Common/BaseLinkTabs';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Meta as MetaObj, StoryObj } from '@storybook/react';
import type { Meta as MetaObj, StoryObj } from '@storybook/react-webpack5';

import Ellipsis from '#ui/Common/BasePagination/Ellipsis';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Meta as MetaObj, StoryObj } from '@storybook/react';
import type { Meta as MetaObj, StoryObj } from '@storybook/react-webpack5';

import PaginationListItem from '#ui/Common/BasePagination/PaginationListItem';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Meta as MetaObj, StoryObj } from '@storybook/react';
import type { Meta as MetaObj, StoryObj } from '@storybook/react-webpack5';

import BasePagination from '#ui/Common/BasePagination';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Meta as MetaObj, StoryObj } from '@storybook/react';
import type { Meta as MetaObj, StoryObj } from '@storybook/react-webpack5';

import Blockquote from '#ui/Common/Blockquote';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Meta as MetaObj, StoryObj } from '@storybook/react';
import type { Meta as MetaObj, StoryObj } from '@storybook/react-webpack5';

import Breadcrumbs from '#ui/Common/Breadcrumbs';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Meta as MetaObj, StoryObj } from '@storybook/react';
import type { Meta as MetaObj, StoryObj } from '@storybook/react-webpack5';

import ChangeHistory from '#ui/Common/ChangeHistory';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as TabsPrimitive from '@radix-ui/react-tabs';
import type { Meta as MetaObj, StoryObj } from '@storybook/react';
import type { Meta as MetaObj, StoryObj } from '@storybook/react-webpack5';
import type { FC } from 'react';

import BaseCodeBox from '#ui/Common/BaseCodeBox';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Meta as MetaObj, StoryObj } from '@storybook/react';
import type { Meta as MetaObj, StoryObj } from '@storybook/react-webpack5';

import DataTag, { type DataTagProps } from '#ui/Common/DataTag';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Meta as MetaObj, StoryObj } from '@storybook/react';
import type { Meta as MetaObj, StoryObj } from '@storybook/react-webpack5';

import GlowingBackdrop from '#ui/Common/GlowingBackdrop';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Meta as MetaObj, StoryObj } from '@storybook/react';
import type { Meta as MetaObj, StoryObj } from '@storybook/react-webpack5';

import LanguageDropDown from '#ui/Common/LanguageDropDown';

Expand Down
2 changes: 1 addition & 1 deletion packages/ui-components/src/Common/Modal/index.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Meta as MetaObj, StoryObj } from '@storybook/react';
import type { Meta as MetaObj, StoryObj } from '@storybook/react-webpack5';

import { Modal, Title, Description, Content } from '#ui/Common/Modal';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Meta as MetaObj, StoryObj } from '@storybook/react';
import type { Meta as MetaObj, StoryObj } from '@storybook/react-webpack5';

import NodejsLogo from '#ui/Common/NodejsLogo';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { CodeBracketIcon } from '@heroicons/react/24/solid';
import type { Meta as MetaObj, StoryObj } from '@storybook/react';
import type { Meta as MetaObj, StoryObj } from '@storybook/react-webpack5';

import Notification from '#ui/Common/Notification';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Meta as MetaObj, StoryObj } from '@storybook/react';
import type { Meta as MetaObj, StoryObj } from '@storybook/react-webpack5';

import Preview from '#ui/Common/Preview';

Expand Down
2 changes: 1 addition & 1 deletion packages/ui-components/src/Common/Select/index.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Meta as MetaObj, StoryObj } from '@storybook/react';
import type { Meta as MetaObj, StoryObj } from '@storybook/react-webpack5';

import Select from '#ui/Common/Select';
import StatelessSelect from '#ui/Common/Select/StatelessSelect';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Meta as MetaObj, StoryObj } from '@storybook/react';
import type { Meta as MetaObj, StoryObj } from '@storybook/react-webpack5';

import Separator from '#ui/Common/Separator';

Expand Down
2 changes: 1 addition & 1 deletion packages/ui-components/src/Common/Tabs/index.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as TabsPrimitive from '@radix-ui/react-tabs';
import type { Meta as MetaObj, StoryObj } from '@storybook/react';
import type { Meta as MetaObj, StoryObj } from '@storybook/react-webpack5';
import type { ComponentProps } from 'react';

import Tabs from '#ui/Common/Tabs';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Meta as MetaObj, StoryObj } from '@storybook/react';
import type { Meta as MetaObj, StoryObj } from '@storybook/react-webpack5';

import ThemeToggle from '#ui/Common/ThemeToggle';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Meta as MetaObj, StoryObj } from '@storybook/react';
import type { Meta as MetaObj, StoryObj } from '@storybook/react-webpack5';

import Tooltip from '#ui/Common/Tooltip';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Meta as MetaObj, StoryObj } from '@storybook/react';
import type { Meta as MetaObj, StoryObj } from '@storybook/react-webpack5';

import Article from '.';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Meta as MetaObj, StoryObj } from '@storybook/react';
import type { Meta as MetaObj, StoryObj } from '@storybook/react-webpack5';

import Footer from '#ui/Containers/Footer';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { CodeBracketIcon } from '@heroicons/react/24/outline';
import type { Meta as MetaObj, StoryObj } from '@storybook/react';
import type { Meta as MetaObj, StoryObj } from '@storybook/react-webpack5';

import MetaBar from '#ui/Containers/MetaBar';
import GitHubIcon from '#ui/Icons/Social/GitHub';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Meta as MetaObj, StoryObj } from '@storybook/react';
import type { Meta as MetaObj, StoryObj } from '@storybook/react-webpack5';

import NavItem from '#ui/Containers/NavBar/NavItem';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Meta as MetaObj, StoryObj } from '@storybook/react';
import type { Meta as MetaObj, StoryObj } from '@storybook/react-webpack5';

import NavBar from '#ui/Containers/NavBar';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Meta as MetaObj, StoryObj } from '@storybook/react';
import type { Meta as MetaObj, StoryObj } from '@storybook/react-webpack5';

import SidebarGroup from '#ui/Containers/Sidebar/SidebarGroup';

Expand Down
Loading
Loading