Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@microsoft/api-extractor

Package Overview
Dependencies
Maintainers
2
Versions
489
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@microsoft/api-extractor - npm Package Compare versions

Comparing version 7.46.2 to 7.47.0

lib/analyzer/AstNamespaceExport.d.ts

2

dist/tsdoc-metadata.json

@@ -8,5 +8,5 @@ // This file is read by tools that parse documentation comments conforming to the TSDoc standard.

"packageName": "@microsoft/api-extractor",
"packageVersion": "7.46.1"
"packageVersion": "7.46.2"
}
]
}

@@ -94,3 +94,5 @@ import * as ts from 'typescript';

private _tryMatchExportDeclaration;
private _getAstNamespaceExport;
private _tryMatchImportDeclaration;
private _getAstNamespaceImport;
private static _getIsTypeOnly;

@@ -97,0 +99,0 @@ private _getExportOfSpecifierAstModule;

@@ -39,2 +39,3 @@ "use strict";

const SyntaxHelpers_1 = require("./SyntaxHelpers");
const AstNamespaceExport_1 = require("./AstNamespaceExport");
/**

@@ -424,5 +425,4 @@ * The ExportAnalyzer is an internal part of AstSymbolTable that has been moved out into its own source file

// Issue tracking this feature: https://github.com/microsoft/rushstack/issues/2780
throw new Error(`The "export * as ___" syntax is not supported yet; as a workaround,` +
` use "import * as ___" with a separate "export { ___ }" declaration\n` +
SourceFileLocationFormatter_1.SourceFileLocationFormatter.formatDeclaration(declaration));
const astModule = this._fetchSpecifierAstModule(exportDeclaration, declarationSymbol);
return this._getAstNamespaceExport(astModule, declarationSymbol, declaration);
}

@@ -449,2 +449,11 @@ else {

}
_getAstNamespaceExport(astModule, declarationSymbol, declaration) {
const imoprtNamespace = this._getAstNamespaceImport(astModule, declarationSymbol, declaration);
return new AstNamespaceExport_1.AstNamespaceExport({
namespaceName: imoprtNamespace.localName,
astModule: astModule,
declaration,
symbol: declarationSymbol
});
}
_tryMatchImportDeclaration(declaration, declarationSymbol) {

@@ -470,13 +479,3 @@ const importDeclaration = TypeScriptHelpers_1.TypeScriptHelpers.findFirstParent(declaration, ts.SyntaxKind.ImportDeclaration);

const astModule = this._fetchSpecifierAstModule(importDeclaration, declarationSymbol);
let namespaceImport = this._astNamespaceImportByModule.get(astModule);
if (namespaceImport === undefined) {
namespaceImport = new AstNamespaceImport_1.AstNamespaceImport({
namespaceName: declarationSymbol.name,
astModule: astModule,
declaration: declaration,
symbol: declarationSymbol
});
this._astNamespaceImportByModule.set(astModule, namespaceImport);
}
return namespaceImport;
return this._getAstNamespaceImport(astModule, declarationSymbol, declaration);
}

@@ -590,2 +589,15 @@ // Here importSymbol=undefined because {@inheritDoc} and such are not going to work correctly for

}
_getAstNamespaceImport(astModule, declarationSymbol, declaration) {
let namespaceImport = this._astNamespaceImportByModule.get(astModule);
if (namespaceImport === undefined) {
namespaceImport = new AstNamespaceImport_1.AstNamespaceImport({
namespaceName: declarationSymbol.name,
astModule: astModule,
declaration: declaration,
symbol: declarationSymbol
});
this._astNamespaceImportByModule.set(astModule, namespaceImport);
}
return namespaceImport;
}
static _getIsTypeOnly(importDeclaration) {

@@ -592,0 +604,0 @@ if (importDeclaration.importClause) {

@@ -33,2 +33,3 @@ "use strict";

const node_core_library_1 = require("@rushstack/node-core-library");
const AstNamespaceExport_1 = require("../analyzer/AstNamespaceExport");
/**

@@ -95,2 +96,6 @@ * This is a data structure used by the Collector to track an AstEntity that may be emitted in the *.d.ts file.

get shouldInlineExport() {
// We export the namespace directly
if (this.astEntity instanceof AstNamespaceExport_1.AstNamespaceExport) {
return true;
}
// We don't inline an AstImport

@@ -97,0 +102,0 @@ if (this.astEntity instanceof AstSymbol_1.AstSymbol) {

{
"name": "@microsoft/api-extractor",
"version": "7.46.2",
"version": "7.47.0",
"description": "Analyze the exported API for a TypeScript library and generate reviews, documentation, and .d.ts rollups",

@@ -44,10 +44,10 @@ "keywords": [

"@microsoft/api-extractor-model": "7.29.2",
"@rushstack/terminal": "0.13.0",
"@rushstack/node-core-library": "5.4.1",
"@rushstack/rig-package": "0.5.2",
"@rushstack/ts-command-line": "4.22.0",
"@rushstack/node-core-library": "5.4.1",
"@rushstack/rig-package": "0.5.2"
"@rushstack/terminal": "0.13.0"
},
"devDependencies": {
"@rushstack/heft-node-rig": "2.6.14",
"@rushstack/heft": "0.66.16",
"@rushstack/heft-node-rig": "2.6.15",
"@rushstack/heft": "0.66.17",
"@types/heft-jest": "1.0.1",

@@ -54,0 +54,0 @@ "@types/lodash": "4.14.116",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc