mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-08 04:31:48 +08:00
add node:
prefixes
This commit is contained in:
parent
f55504560f
commit
49036cb89a
@ -1,7 +1,8 @@
|
||||
import { platform } from 'node:os';
|
||||
|
||||
import { expect, it } from 'vitest';
|
||||
|
||||
import type { OutputFile } from 'esbuild';
|
||||
import { platform } from 'os';
|
||||
|
||||
import { sanitizePath } from './files';
|
||||
|
||||
|
@ -1,11 +1,11 @@
|
||||
import { existsSync, readFileSync } from 'node:fs';
|
||||
import { platform } from 'node:os';
|
||||
import { join } from 'node:path';
|
||||
|
||||
import { logger } from '@storybook/core/node-logger';
|
||||
import { FindPackageVersionsError } from '@storybook/core/server-errors';
|
||||
|
||||
import { findUp } from 'find-up';
|
||||
import { platform } from 'os';
|
||||
import sort from 'semver/functions/sort.js';
|
||||
import dedent from 'ts-dedent';
|
||||
|
||||
|
@ -1,10 +1,10 @@
|
||||
import { beforeEach, describe, expect, it, vi } from 'vitest';
|
||||
import os, { type NetworkInterfaceInfoIPv4 } from 'node:os';
|
||||
|
||||
import os, { type NetworkInterfaceInfoIPv4 } from 'os';
|
||||
import { beforeEach, describe, expect, it, vi } from 'vitest';
|
||||
|
||||
import { getServerAddresses } from '../server-address';
|
||||
|
||||
vi.mock('os');
|
||||
vi.mock('node:os');
|
||||
const mockedOs = vi.mocked(os);
|
||||
|
||||
describe('getServerAddresses', () => {
|
||||
|
@ -4,7 +4,7 @@ import detectPort from 'detect-port';
|
||||
|
||||
import { getServerAddresses, getServerChannelUrl, getServerPort } from './server-address';
|
||||
|
||||
vi.mock('os', () => ({
|
||||
vi.mock('node:os', () => ({
|
||||
default: { release: () => '' },
|
||||
}));
|
||||
vi.mock('detect-port');
|
||||
|
@ -1,7 +1,8 @@
|
||||
import os from 'node:os';
|
||||
|
||||
import { logger } from '@storybook/core/node-logger';
|
||||
|
||||
import detectFreePort from 'detect-port';
|
||||
import os from 'os';
|
||||
|
||||
export function getServerAddresses(
|
||||
port: number,
|
||||
|
@ -1,7 +1,8 @@
|
||||
/// <reference types="node" />
|
||||
import * as os from 'node:os';
|
||||
|
||||
import retry from 'fetch-retry';
|
||||
import { nanoid } from 'nanoid';
|
||||
import * as os from 'os';
|
||||
|
||||
import { getAnonymousProjectId } from './anonymous-id';
|
||||
import { set as saveToCache } from './event-cache';
|
||||
|
@ -1,9 +1,10 @@
|
||||
import { cpus } from 'node:os';
|
||||
|
||||
import { NextJsSharpError } from 'storybook/internal/preview-errors';
|
||||
|
||||
import imageSizeOf from 'image-size';
|
||||
import { interpolateName } from 'loader-utils';
|
||||
import type { NextConfig } from 'next';
|
||||
import { cpus } from 'os';
|
||||
import type { RawLoaderDefinition } from 'webpack';
|
||||
|
||||
interface LoaderOptions {
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { EOL } from 'os';
|
||||
import { EOL } from 'node:os';
|
||||
|
||||
// copied from https://github.com/chalk/ansi-regex
|
||||
// the package is ESM only so not compatible with jest
|
||||
|
@ -1,4 +1,4 @@
|
||||
import os from 'os';
|
||||
import os from 'node:os';
|
||||
|
||||
/**
|
||||
* The maximum number of concurrent tasks we want to have on some CLI and CI tasks.
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { cpus } from 'os';
|
||||
import { cpus } from 'node:os';
|
||||
|
||||
/**
|
||||
* The maximum number of concurrent tasks we want to have on some CLI and CI tasks.
|
||||
|
Loading…
x
Reference in New Issue
Block a user