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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions apps/api-documenter/src/cli/ApiDocumenterCommandLine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// See LICENSE in the project root for license information.

import { CommandLineParser } from '@rushstack/ts-command-line';

import { MarkdownAction } from './MarkdownAction';
import { YamlAction } from './YamlAction';
import { GenerateAction } from './GenerateAction';
Expand Down
4 changes: 2 additions & 2 deletions apps/api-documenter/src/cli/BaseAction.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
// See LICENSE in the project root for license information.

import * as path from 'path';
import type * as tsdoc from '@microsoft/tsdoc';
import * as path from 'node:path';

import type * as tsdoc from '@microsoft/tsdoc';
import {
CommandLineAction,
type CommandLineStringParameter,
Expand Down
6 changes: 3 additions & 3 deletions apps/api-documenter/src/cli/GenerateAction.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
// See LICENSE in the project root for license information.

import * as path from 'path';
import * as path from 'node:path';

import { FileSystem } from '@rushstack/node-core-library';

import type { ApiDocumenterCommandLine } from './ApiDocumenterCommandLine';
import { BaseAction } from './BaseAction';
import { DocumenterConfig } from '../documenters/DocumenterConfig';
import { ExperimentalYamlDocumenter } from '../documenters/ExperimentalYamlDocumenter';

import { FileSystem } from '@rushstack/node-core-library';
import { MarkdownDocumenter } from '../documenters/MarkdownDocumenter';

export class GenerateAction extends BaseAction {
Expand Down
1 change: 0 additions & 1 deletion apps/api-documenter/src/cli/YamlAction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import type {

import type { ApiDocumenterCommandLine } from './ApiDocumenterCommandLine';
import { BaseAction } from './BaseAction';

import { YamlDocumenter, type YamlFormat } from '../documenters/YamlDocumenter';
import { OfficeYamlDocumenter } from '../documenters/OfficeYamlDocumenter';

Expand Down
4 changes: 3 additions & 1 deletion apps/api-documenter/src/documenters/DocumenterConfig.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
// See LICENSE in the project root for license information.

import * as path from 'path';
import * as path from 'node:path';

import { JsonSchema, JsonFile, NewlineKind } from '@rushstack/node-core-library';

import type { IConfigFile } from './IConfigFile';
import apiDocumenterSchema from '../schemas/api-documenter.schema.json';

Expand Down
3 changes: 2 additions & 1 deletion apps/api-documenter/src/documenters/MarkdownDocumenter.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
// See LICENSE in the project root for license information.

import * as path from 'path';
import * as path from 'node:path';

import { PackageName, FileSystem, NewlineKind } from '@rushstack/node-core-library';
import {
DocSection,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
// See LICENSE in the project root for license information.

import * as path from 'path';
import * as path from 'node:path';

import yaml = require('js-yaml');

import type { ApiModel } from '@microsoft/api-extractor-model';
Expand Down
4 changes: 3 additions & 1 deletion apps/api-documenter/src/documenters/YamlDocumenter.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
// See LICENSE in the project root for license information.

import * as path from 'path';
import * as path from 'node:path';

import yaml = require('js-yaml');

import {
JsonFile,
JsonSchema,
Expand Down Expand Up @@ -50,6 +51,7 @@ import {
Navigation,
Meaning
} from '@microsoft/tsdoc/lib-commonjs/beta/DeclarationReference';

import type {
IYamlApiFile,
IYamlItem,
Expand Down
1 change: 1 addition & 0 deletions apps/api-documenter/src/nodes/CustomDocNodeKind.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// See LICENSE in the project root for license information.

import { TSDocConfiguration, DocNodeKind } from '@microsoft/tsdoc';

import { DocEmphasisSpan } from './DocEmphasisSpan';
import { DocHeading } from './DocHeading';
import { DocNoteBox } from './DocNoteBox';
Expand Down
1 change: 1 addition & 0 deletions apps/api-documenter/src/nodes/DocEmphasisSpan.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// See LICENSE in the project root for license information.

import { type DocNode, DocNodeContainer, type IDocNodeContainerParameters } from '@microsoft/tsdoc';

import { CustomDocNodeKind } from './CustomDocNodeKind';

/**
Expand Down
1 change: 1 addition & 0 deletions apps/api-documenter/src/nodes/DocHeading.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// See LICENSE in the project root for license information.

import { type IDocNodeParameters, DocNode } from '@microsoft/tsdoc';

import { CustomDocNodeKind } from './CustomDocNodeKind';

/**
Expand Down
1 change: 1 addition & 0 deletions apps/api-documenter/src/nodes/DocNoteBox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// See LICENSE in the project root for license information.

import { type IDocNodeParameters, DocNode, DocSection } from '@microsoft/tsdoc';

import { CustomDocNodeKind } from './CustomDocNodeKind';

/**
Expand Down
1 change: 1 addition & 0 deletions apps/api-documenter/src/nodes/DocTable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// See LICENSE in the project root for license information.

import { type IDocNodeParameters, DocNode } from '@microsoft/tsdoc';

import { CustomDocNodeKind } from './CustomDocNodeKind';
import { DocTableRow } from './DocTableRow';
import type { DocTableCell } from './DocTableCell';
Expand Down
1 change: 1 addition & 0 deletions apps/api-documenter/src/nodes/DocTableCell.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// See LICENSE in the project root for license information.

import { type IDocNodeParameters, DocNode, DocSection } from '@microsoft/tsdoc';

import { CustomDocNodeKind } from './CustomDocNodeKind';

/**
Expand Down
1 change: 1 addition & 0 deletions apps/api-documenter/src/nodes/DocTableRow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// See LICENSE in the project root for license information.

import { type IDocNodeParameters, DocNode, DocPlainText } from '@microsoft/tsdoc';

import { CustomDocNodeKind } from './CustomDocNodeKind';
import { DocTableCell } from './DocTableCell';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

import type { ApiItem, ApiModel } from '@microsoft/api-extractor-model';
import { TypeUuid } from '@rushstack/node-core-library';

import { PluginFeature } from './PluginFeature';
import type { MarkdownDocumenterAccessor } from './MarkdownDocumenterAccessor';

Expand Down
3 changes: 2 additions & 1 deletion apps/api-documenter/src/plugin/PluginLoader.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
// See LICENSE in the project root for license information.

import * as path from 'path';
import * as path from 'node:path';

import * as resolve from 'resolve';

import type { IApiDocumenterPluginManifest, IFeatureDefinition } from './IApiDocumenterPluginManifest';
Expand Down
2 changes: 1 addition & 1 deletion apps/api-documenter/src/start.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
// See LICENSE in the project root for license information.

import * as os from 'os';
import * as os from 'node:os';

import { PackageJsonLookup } from '@rushstack/node-core-library';
import { Colorize } from '@rushstack/terminal';
Expand Down
9 changes: 6 additions & 3 deletions apps/api-documenter/src/utils/ToSdpConvertHelper.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
// See LICENSE in the project root for license information.

import path from 'node:path';

import yaml = require('js-yaml');

import { FileSystem, Encoding, NewlineKind } from '@rushstack/node-core-library';

import type {
IYamlItem,
IYamlApiFile,
Expand All @@ -17,9 +23,6 @@ import type {
FunctionYamlModel,
CommonYamlModel
} from '../yaml/ISDPYamlFile';
import path from 'path';
import { FileSystem, Encoding, NewlineKind } from '@rushstack/node-core-library';
import yaml = require('js-yaml');

export function convertUDPYamlToSDP(folderPath: string): void {
convert(folderPath, folderPath);
Expand Down
1 change: 1 addition & 0 deletions apps/api-extractor/src/aedoc/PackageDocComment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// See LICENSE in the project root for license information.

import * as ts from 'typescript';

import type { Collector } from '../collector/Collector';
import { ExtractorMessageId } from '../api/ExtractorMessageId';

Expand Down
4 changes: 3 additions & 1 deletion apps/api-extractor/src/analyzer/AstDeclaration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@
// See LICENSE in the project root for license information.

import * as ts from 'typescript';

import { InternalError } from '@rushstack/node-core-library';

import type { AstSymbol } from './AstSymbol';
import { Span } from './Span';
import { InternalError } from '@rushstack/node-core-library';
import type { AstEntity } from './AstEntity';

/**
Expand Down
3 changes: 2 additions & 1 deletion apps/api-extractor/src/analyzer/AstImport.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
// See LICENSE in the project root for license information.

import type { AstSymbol } from './AstSymbol';
import { InternalError } from '@rushstack/node-core-library';

import type { AstSymbol } from './AstSymbol';
import { AstSyntheticEntity } from './AstEntity';

/**
Expand Down
1 change: 1 addition & 0 deletions apps/api-extractor/src/analyzer/AstReferenceResolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// See LICENSE in the project root for license information.

import * as ts from 'typescript';

import * as tsdoc from '@microsoft/tsdoc';

import type { AstSymbolTable } from './AstSymbolTable';
Expand Down
4 changes: 3 additions & 1 deletion apps/api-extractor/src/analyzer/AstSymbol.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
// See LICENSE in the project root for license information.

import type * as ts from 'typescript';
import type { AstDeclaration } from './AstDeclaration';

import { InternalError } from '@rushstack/node-core-library';

import type { AstDeclaration } from './AstDeclaration';
import { AstEntity } from './AstEntity';

/**
Expand Down
1 change: 1 addition & 0 deletions apps/api-extractor/src/analyzer/AstSymbolTable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
/* eslint-disable no-bitwise */ // for ts.SymbolFlags

import * as ts from 'typescript';

import { type PackageJsonLookup, InternalError } from '@rushstack/node-core-library';

import { AstDeclaration } from './AstDeclaration';
Expand Down
1 change: 1 addition & 0 deletions apps/api-extractor/src/analyzer/ExportAnalyzer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// See LICENSE in the project root for license information.

import * as ts from 'typescript';

import { InternalError } from '@rushstack/node-core-library';

import { TypeScriptHelpers } from './TypeScriptHelpers';
Expand Down
4 changes: 3 additions & 1 deletion apps/api-extractor/src/analyzer/PackageMetadataManager.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
// See LICENSE in the project root for license information.

import path from 'path';
import path from 'node:path';

import semver from 'semver';

import {
Expand All @@ -13,6 +14,7 @@ import {
type JsonObject,
type IPackageJsonExports
} from '@rushstack/node-core-library';

import { Extractor } from '../api/Extractor';
import type { MessageRouter } from '../collector/MessageRouter';
import { ConsoleMessageId } from '../api/ConsoleMessageId';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
// See LICENSE in the project root for license information.

import * as path from 'node:path';

import type * as ts from 'typescript';
import * as path from 'path';

import { Path, Text } from '@rushstack/node-core-library';

export interface ISourceFileLocationFormatOptions {
Expand Down
1 change: 1 addition & 0 deletions apps/api-extractor/src/analyzer/Span.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// See LICENSE in the project root for license information.

import * as ts from 'typescript';

import { InternalError, Sort, Text } from '@rushstack/node-core-library';

import { IndentedWriter } from '../generators/IndentedWriter';
Expand Down
4 changes: 3 additions & 1 deletion apps/api-extractor/src/analyzer/TypeScriptHelpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@
/* eslint-disable no-bitwise */

import * as ts from 'typescript';

import { InternalError } from '@rushstack/node-core-library';

import { SourceFileLocationFormatter } from './SourceFileLocationFormatter';
import { TypeScriptInternals } from './TypeScriptInternals';
import { InternalError } from '@rushstack/node-core-library';

export class TypeScriptHelpers {
// Matches TypeScript's encoded names for well-known ECMAScript symbols like
Expand Down
1 change: 1 addition & 0 deletions apps/api-extractor/src/analyzer/TypeScriptInternals.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
/* eslint-disable @typescript-eslint/no-explicit-any */

import * as ts from 'typescript';

import { InternalError } from '@rushstack/node-core-library';

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
// See LICENSE in the project root for license information.

jest.mock('path', () => {
const actualPath: typeof import('path') = jest.requireActual('path');
jest.mock('node:path', () => {
const actualPath: typeof import('path') = jest.requireActual('node:path');
return {
...actualPath,
resolve: actualPath.posix.resolve
Expand Down
5 changes: 3 additions & 2 deletions apps/api-extractor/src/api/CompilerState.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
// See LICENSE in the project root for license information.

import * as path from 'path';
import * as path from 'node:path';

import * as ts from 'typescript';

import { JsonFile } from '@rushstack/node-core-library';
import { Colorize } from '@rushstack/terminal';

import { ExtractorConfig } from './ExtractorConfig';
import type { IExtractorInvokeOptions } from './Extractor';
import { Colorize } from '@rushstack/terminal';

/**
* Options for {@link CompilerState.create}
Expand Down
8 changes: 5 additions & 3 deletions apps/api-extractor/src/api/Extractor.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
// See LICENSE in the project root for license information.

import * as path from 'path';
import * as path from 'node:path';

import * as semver from 'semver';
import * as ts from 'typescript';
import * as resolve from 'resolve';

import type { ApiPackage } from '@microsoft/api-extractor-model';
import { TSDocConfigFile } from '@microsoft/tsdoc-config';
import {
FileSystem,
type NewlineKind,
Expand All @@ -18,7 +22,6 @@ import { ExtractorConfig, type IExtractorConfigApiReport } from './ExtractorConf
import { Collector } from '../collector/Collector';
import { DtsRollupGenerator, DtsRollupKind } from '../generators/DtsRollupGenerator';
import { ApiModelGenerator } from '../generators/ApiModelGenerator';
import type { ApiPackage } from '@microsoft/api-extractor-model';
import { ApiReportGenerator } from '../generators/ApiReportGenerator';
import { PackageMetadataManager } from '../analyzer/PackageMetadataManager';
import { ValidationEnhancer } from '../enhancers/ValidationEnhancer';
Expand All @@ -27,7 +30,6 @@ import { CompilerState } from './CompilerState';
import type { ExtractorMessage } from './ExtractorMessage';
import { MessageRouter } from '../collector/MessageRouter';
import { ConsoleMessageId } from './ConsoleMessageId';
import { TSDocConfigFile } from '@microsoft/tsdoc-config';
import { SourceMapper } from '../collector/SourceMapper';

/**
Expand Down
Loading