securityos/node_modules/eslint-plugin-import/lib/rules/no-unused-modules.js

945 lines
107 KiB
JavaScript

'use strict';var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) {return typeof obj;} : function (obj) {return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;};
var _ignore = require('eslint-module-utils/ignore');
var _resolve = require('eslint-module-utils/resolve');var _resolve2 = _interopRequireDefault(_resolve);
var _visit = require('eslint-module-utils/visit');var _visit2 = _interopRequireDefault(_visit);
var _path = require('path');
var _readPkgUp2 = require('eslint-module-utils/readPkgUp');var _readPkgUp3 = _interopRequireDefault(_readPkgUp2);
var _object = require('object.values');var _object2 = _interopRequireDefault(_object);
var _arrayIncludes = require('array-includes');var _arrayIncludes2 = _interopRequireDefault(_arrayIncludes);
var _arrayPrototype = require('array.prototype.flatmap');var _arrayPrototype2 = _interopRequireDefault(_arrayPrototype);
var _ExportMap = require('../ExportMap');var _ExportMap2 = _interopRequireDefault(_ExportMap);
var _docsUrl = require('../docsUrl');var _docsUrl2 = _interopRequireDefault(_docsUrl);function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { 'default': obj };}function _toConsumableArray(arr) {if (Array.isArray(arr)) {for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) {arr2[i] = arr[i];}return arr2;} else {return Array.from(arr);}} /**
* @fileOverview Ensures that modules contain exports and/or all
* modules are consumed within other modules.
* @author René Fermann
*/var FileEnumerator = void 0;var listFilesToProcess = void 0;
try {var _require =
require('eslint/use-at-your-own-risk');FileEnumerator = _require.FileEnumerator;
} catch (e) {
try {var _require2 =
require('eslint/lib/cli-engine/file-enumerator'); // has been moved to eslint/lib/cli-engine/file-enumerator in version 6
FileEnumerator = _require2.FileEnumerator;} catch (e) {
try {
// eslint/lib/util/glob-util has been moved to eslint/lib/util/glob-utils with version 5.3
var _require3 = require('eslint/lib/util/glob-utils'),originalListFilesToProcess = _require3.listFilesToProcess;
// Prevent passing invalid options (extensions array) to old versions of the function.
// https://github.com/eslint/eslint/blob/v5.16.0/lib/util/glob-utils.js#L178-L280
// https://github.com/eslint/eslint/blob/v5.2.0/lib/util/glob-util.js#L174-L269
listFilesToProcess = function listFilesToProcess(src, extensions) {
return originalListFilesToProcess(src, {
extensions: extensions });
};
} catch (e) {var _require4 =
require('eslint/lib/util/glob-util'),_originalListFilesToProcess = _require4.listFilesToProcess;
listFilesToProcess = function listFilesToProcess(src, extensions) {
var patterns = src.concat((0, _arrayPrototype2['default'])(src, function (pattern) {return extensions.map(function (extension) {return (/\*\*|\*\./.test(pattern) ? pattern : String(pattern) + '/**/*' + String(extension));});}));
return _originalListFilesToProcess(patterns);
};
}
}
}
if (FileEnumerator) {
listFilesToProcess = function listFilesToProcess(src, extensions) {
var e = new FileEnumerator({
extensions: extensions });
return Array.from(e.iterateFiles(src), function (_ref) {var filePath = _ref.filePath,ignored = _ref.ignored;return {
ignored: ignored,
filename: filePath };});
};
}
var EXPORT_DEFAULT_DECLARATION = 'ExportDefaultDeclaration';
var EXPORT_NAMED_DECLARATION = 'ExportNamedDeclaration';
var EXPORT_ALL_DECLARATION = 'ExportAllDeclaration';
var IMPORT_DECLARATION = 'ImportDeclaration';
var IMPORT_NAMESPACE_SPECIFIER = 'ImportNamespaceSpecifier';
var IMPORT_DEFAULT_SPECIFIER = 'ImportDefaultSpecifier';
var VARIABLE_DECLARATION = 'VariableDeclaration';
var FUNCTION_DECLARATION = 'FunctionDeclaration';
var CLASS_DECLARATION = 'ClassDeclaration';
var IDENTIFIER = 'Identifier';
var OBJECT_PATTERN = 'ObjectPattern';
var ARRAY_PATTERN = 'ArrayPattern';
var TS_INTERFACE_DECLARATION = 'TSInterfaceDeclaration';
var TS_TYPE_ALIAS_DECLARATION = 'TSTypeAliasDeclaration';
var TS_ENUM_DECLARATION = 'TSEnumDeclaration';
var DEFAULT = 'default';
function forEachDeclarationIdentifier(declaration, cb) {
if (declaration) {
if (
declaration.type === FUNCTION_DECLARATION ||
declaration.type === CLASS_DECLARATION ||
declaration.type === TS_INTERFACE_DECLARATION ||
declaration.type === TS_TYPE_ALIAS_DECLARATION ||
declaration.type === TS_ENUM_DECLARATION)
{
cb(declaration.id.name);
} else if (declaration.type === VARIABLE_DECLARATION) {
declaration.declarations.forEach(function (_ref2) {var id = _ref2.id;
if (id.type === OBJECT_PATTERN) {
(0, _ExportMap.recursivePatternCapture)(id, function (pattern) {
if (pattern.type === IDENTIFIER) {
cb(pattern.name);
}
});
} else if (id.type === ARRAY_PATTERN) {
id.elements.forEach(function (_ref3) {var name = _ref3.name;
cb(name);
});
} else {
cb(id.name);
}
});
}
}
}
/**
* List of imports per file.
*
* Represented by a two-level Map to a Set of identifiers. The upper-level Map
* keys are the paths to the modules containing the imports, while the
* lower-level Map keys are the paths to the files which are being imported
* from. Lastly, the Set of identifiers contains either names being imported
* or a special AST node name listed above (e.g ImportDefaultSpecifier).
*
* For example, if we have a file named foo.js containing:
*
* import { o2 } from './bar.js';
*
* Then we will have a structure that looks like:
*
* Map { 'foo.js' => Map { 'bar.js' => Set { 'o2' } } }
*
* @type {Map<string, Map<string, Set<string>>>}
*/
var importList = new Map();
/**
* List of exports per file.
*
* Represented by a two-level Map to an object of metadata. The upper-level Map
* keys are the paths to the modules containing the exports, while the
* lower-level Map keys are the specific identifiers or special AST node names
* being exported. The leaf-level metadata object at the moment only contains a
* `whereUsed` property, which contains a Set of paths to modules that import
* the name.
*
* For example, if we have a file named bar.js containing the following exports:
*
* const o2 = 'bar';
* export { o2 };
*
* And a file named foo.js containing the following import:
*
* import { o2 } from './bar.js';
*
* Then we will have a structure that looks like:
*
* Map { 'bar.js' => Map { 'o2' => { whereUsed: Set { 'foo.js' } } } }
*
* @type {Map<string, Map<string, object>>}
*/
var exportList = new Map();
var visitorKeyMap = new Map();
var ignoredFiles = new Set();
var filesOutsideSrc = new Set();
var isNodeModule = function isNodeModule(path) {return (/\/(node_modules)\//.test(path));};
/**
* read all files matching the patterns in src and ignoreExports
*
* return all files matching src pattern, which are not matching the ignoreExports pattern
*/
var resolveFiles = function resolveFiles(src, ignoreExports, context) {
var extensions = Array.from((0, _ignore.getFileExtensions)(context.settings));
var srcFileList = listFilesToProcess(src, extensions);
// prepare list of ignored files
var ignoredFilesList = listFilesToProcess(ignoreExports, extensions);
ignoredFilesList.forEach(function (_ref4) {var filename = _ref4.filename;return ignoredFiles.add(filename);});
// prepare list of source files, don't consider files from node_modules
return new Set(
(0, _arrayPrototype2['default'])(srcFileList, function (_ref5) {var filename = _ref5.filename;return isNodeModule(filename) ? [] : filename;}));
};
/**
* parse all source files and build up 2 maps containing the existing imports and exports
*/
var prepareImportsAndExports = function prepareImportsAndExports(srcFiles, context) {
var exportAll = new Map();
srcFiles.forEach(function (file) {
var exports = new Map();
var imports = new Map();
var currentExports = _ExportMap2['default'].get(file, context);
if (currentExports) {var
dependencies =
currentExports.dependencies,reexports = currentExports.reexports,localImportList = currentExports.imports,namespace = currentExports.namespace,visitorKeys = currentExports.visitorKeys;
visitorKeyMap.set(file, visitorKeys);
// dependencies === export * from
var currentExportAll = new Set();
dependencies.forEach(function (getDependency) {
var dependency = getDependency();
if (dependency === null) {
return;
}
currentExportAll.add(dependency.path);
});
exportAll.set(file, currentExportAll);
reexports.forEach(function (value, key) {
if (key === DEFAULT) {
exports.set(IMPORT_DEFAULT_SPECIFIER, { whereUsed: new Set() });
} else {
exports.set(key, { whereUsed: new Set() });
}
var reexport = value.getImport();
if (!reexport) {
return;
}
var localImport = imports.get(reexport.path);
var currentValue = void 0;
if (value.local === DEFAULT) {
currentValue = IMPORT_DEFAULT_SPECIFIER;
} else {
currentValue = value.local;
}
if (typeof localImport !== 'undefined') {
localImport = new Set([].concat(_toConsumableArray(localImport), [currentValue]));
} else {
localImport = new Set([currentValue]);
}
imports.set(reexport.path, localImport);
});
localImportList.forEach(function (value, key) {
if (isNodeModule(key)) {
return;
}
var localImport = imports.get(key) || new Set();
value.declarations.forEach(function (_ref6) {var importedSpecifiers = _ref6.importedSpecifiers;
importedSpecifiers.forEach(function (specifier) {
localImport.add(specifier);
});
});
imports.set(key, localImport);
});
importList.set(file, imports);
// build up export list only, if file is not ignored
if (ignoredFiles.has(file)) {
return;
}
namespace.forEach(function (value, key) {
if (key === DEFAULT) {
exports.set(IMPORT_DEFAULT_SPECIFIER, { whereUsed: new Set() });
} else {
exports.set(key, { whereUsed: new Set() });
}
});
}
exports.set(EXPORT_ALL_DECLARATION, { whereUsed: new Set() });
exports.set(IMPORT_NAMESPACE_SPECIFIER, { whereUsed: new Set() });
exportList.set(file, exports);
});
exportAll.forEach(function (value, key) {
value.forEach(function (val) {
var currentExports = exportList.get(val);
if (currentExports) {
var currentExport = currentExports.get(EXPORT_ALL_DECLARATION);
currentExport.whereUsed.add(key);
}
});
});
};
/**
* traverse through all imports and add the respective path to the whereUsed-list
* of the corresponding export
*/
var determineUsage = function determineUsage() {
importList.forEach(function (listValue, listKey) {
listValue.forEach(function (value, key) {
var exports = exportList.get(key);
if (typeof exports !== 'undefined') {
value.forEach(function (currentImport) {
var specifier = void 0;
if (currentImport === IMPORT_NAMESPACE_SPECIFIER) {
specifier = IMPORT_NAMESPACE_SPECIFIER;
} else if (currentImport === IMPORT_DEFAULT_SPECIFIER) {
specifier = IMPORT_DEFAULT_SPECIFIER;
} else {
specifier = currentImport;
}
if (typeof specifier !== 'undefined') {
var exportStatement = exports.get(specifier);
if (typeof exportStatement !== 'undefined') {var
whereUsed = exportStatement.whereUsed;
whereUsed.add(listKey);
exports.set(specifier, { whereUsed: whereUsed });
}
}
});
}
});
});
};
var getSrc = function getSrc(src) {
if (src) {
return src;
}
return [process.cwd()];
};
/**
* prepare the lists of existing imports and exports - should only be executed once at
* the start of a new eslint run
*/
var srcFiles = void 0;
var lastPrepareKey = void 0;
var doPreparation = function doPreparation(src, ignoreExports, context) {
var prepareKey = JSON.stringify({
src: (src || []).sort(),
ignoreExports: (ignoreExports || []).sort(),
extensions: Array.from((0, _ignore.getFileExtensions)(context.settings)).sort() });
if (prepareKey === lastPrepareKey) {
return;
}
importList.clear();
exportList.clear();
ignoredFiles.clear();
filesOutsideSrc.clear();
srcFiles = resolveFiles(getSrc(src), ignoreExports, context);
prepareImportsAndExports(srcFiles, context);
determineUsage();
lastPrepareKey = prepareKey;
};
var newNamespaceImportExists = function newNamespaceImportExists(specifiers) {return specifiers.some(function (_ref7) {var type = _ref7.type;return type === IMPORT_NAMESPACE_SPECIFIER;});};
var newDefaultImportExists = function newDefaultImportExists(specifiers) {return specifiers.some(function (_ref8) {var type = _ref8.type;return type === IMPORT_DEFAULT_SPECIFIER;});};
var fileIsInPkg = function fileIsInPkg(file) {var _readPkgUp =
(0, _readPkgUp3['default'])({ cwd: file }),path = _readPkgUp.path,pkg = _readPkgUp.pkg;
var basePath = (0, _path.dirname)(path);
var checkPkgFieldString = function checkPkgFieldString(pkgField) {
if ((0, _path.join)(basePath, pkgField) === file) {
return true;
}
};
var checkPkgFieldObject = function checkPkgFieldObject(pkgField) {
var pkgFieldFiles = (0, _arrayPrototype2['default'])((0, _object2['default'])(pkgField), function (value) {return typeof value === 'boolean' ? [] : (0, _path.join)(basePath, value);});
if ((0, _arrayIncludes2['default'])(pkgFieldFiles, file)) {
return true;
}
};
var checkPkgField = function checkPkgField(pkgField) {
if (typeof pkgField === 'string') {
return checkPkgFieldString(pkgField);
}
if ((typeof pkgField === 'undefined' ? 'undefined' : _typeof(pkgField)) === 'object') {
return checkPkgFieldObject(pkgField);
}
};
if (pkg['private'] === true) {
return false;
}
if (pkg.bin) {
if (checkPkgField(pkg.bin)) {
return true;
}
}
if (pkg.browser) {
if (checkPkgField(pkg.browser)) {
return true;
}
}
if (pkg.main) {
if (checkPkgFieldString(pkg.main)) {
return true;
}
}
return false;
};
module.exports = {
meta: {
type: 'suggestion',
docs: {
category: 'Helpful warnings',
description: 'Forbid modules without exports, or exports without matching import in another module.',
url: (0, _docsUrl2['default'])('no-unused-modules') },
schema: [{
properties: {
src: {
description: 'files/paths to be analyzed (only for unused exports)',
type: 'array',
uniqueItems: true,
items: {
type: 'string',
minLength: 1 } },
ignoreExports: {
description: 'files/paths for which unused exports will not be reported (e.g module entry points)',
type: 'array',
uniqueItems: true,
items: {
type: 'string',
minLength: 1 } },
missingExports: {
description: 'report modules without any exports',
type: 'boolean' },
unusedExports: {
description: 'report exports without any usage',
type: 'boolean' } },
anyOf: [
{
properties: {
unusedExports: { 'enum': [true] },
src: {
minItems: 1 } },
required: ['unusedExports'] },
{
properties: {
missingExports: { 'enum': [true] } },
required: ['missingExports'] }] }] },
create: function () {function create(context) {var _ref9 =
context.options[0] || {},src = _ref9.src,_ref9$ignoreExports = _ref9.ignoreExports,ignoreExports = _ref9$ignoreExports === undefined ? [] : _ref9$ignoreExports,missingExports = _ref9.missingExports,unusedExports = _ref9.unusedExports;
if (unusedExports) {
doPreparation(src, ignoreExports, context);
}
var file = context.getPhysicalFilename ? context.getPhysicalFilename() : context.getFilename();
var checkExportPresence = function () {function checkExportPresence(node) {
if (!missingExports) {
return;
}
if (ignoredFiles.has(file)) {
return;
}
var exportCount = exportList.get(file);
var exportAll = exportCount.get(EXPORT_ALL_DECLARATION);
var namespaceImports = exportCount.get(IMPORT_NAMESPACE_SPECIFIER);
exportCount['delete'](EXPORT_ALL_DECLARATION);
exportCount['delete'](IMPORT_NAMESPACE_SPECIFIER);
if (exportCount.size < 1) {
// node.body[0] === 'undefined' only happens, if everything is commented out in the file
// being linted
context.report(node.body[0] ? node.body[0] : node, 'No exports found');
}
exportCount.set(EXPORT_ALL_DECLARATION, exportAll);
exportCount.set(IMPORT_NAMESPACE_SPECIFIER, namespaceImports);
}return checkExportPresence;}();
var checkUsage = function () {function checkUsage(node, exportedValue) {
if (!unusedExports) {
return;
}
if (ignoredFiles.has(file)) {
return;
}
if (fileIsInPkg(file)) {
return;
}
if (filesOutsideSrc.has(file)) {
return;
}
// make sure file to be linted is included in source files
if (!srcFiles.has(file)) {
srcFiles = resolveFiles(getSrc(src), ignoreExports, context);
if (!srcFiles.has(file)) {
filesOutsideSrc.add(file);
return;
}
}
exports = exportList.get(file);
// special case: export * from
var exportAll = exports.get(EXPORT_ALL_DECLARATION);
if (typeof exportAll !== 'undefined' && exportedValue !== IMPORT_DEFAULT_SPECIFIER) {
if (exportAll.whereUsed.size > 0) {
return;
}
}
// special case: namespace import
var namespaceImports = exports.get(IMPORT_NAMESPACE_SPECIFIER);
if (typeof namespaceImports !== 'undefined') {
if (namespaceImports.whereUsed.size > 0) {
return;
}
}
// exportsList will always map any imported value of 'default' to 'ImportDefaultSpecifier'
var exportsKey = exportedValue === DEFAULT ? IMPORT_DEFAULT_SPECIFIER : exportedValue;
var exportStatement = exports.get(exportsKey);
var value = exportsKey === IMPORT_DEFAULT_SPECIFIER ? DEFAULT : exportsKey;
if (typeof exportStatement !== 'undefined') {
if (exportStatement.whereUsed.size < 1) {
context.report(
node, 'exported declaration \'' +
value + '\' not used within other modules');
}
} else {
context.report(
node, 'exported declaration \'' +
value + '\' not used within other modules');
}
}return checkUsage;}();
/**
* only useful for tools like vscode-eslint
*
* update lists of existing exports during runtime
*/
var updateExportUsage = function () {function updateExportUsage(node) {
if (ignoredFiles.has(file)) {
return;
}
var exports = exportList.get(file);
// new module has been created during runtime
// include it in further processing
if (typeof exports === 'undefined') {
exports = new Map();
}
var newExports = new Map();
var newExportIdentifiers = new Set();
node.body.forEach(function (_ref10) {var type = _ref10.type,declaration = _ref10.declaration,specifiers = _ref10.specifiers;
if (type === EXPORT_DEFAULT_DECLARATION) {
newExportIdentifiers.add(IMPORT_DEFAULT_SPECIFIER);
}
if (type === EXPORT_NAMED_DECLARATION) {
if (specifiers.length > 0) {
specifiers.forEach(function (specifier) {
if (specifier.exported) {
newExportIdentifiers.add(specifier.exported.name || specifier.exported.value);
}
});
}
forEachDeclarationIdentifier(declaration, function (name) {
newExportIdentifiers.add(name);
});
}
});
// old exports exist within list of new exports identifiers: add to map of new exports
exports.forEach(function (value, key) {
if (newExportIdentifiers.has(key)) {
newExports.set(key, value);
}
});
// new export identifiers added: add to map of new exports
newExportIdentifiers.forEach(function (key) {
if (!exports.has(key)) {
newExports.set(key, { whereUsed: new Set() });
}
});
// preserve information about namespace imports
var exportAll = exports.get(EXPORT_ALL_DECLARATION);
var namespaceImports = exports.get(IMPORT_NAMESPACE_SPECIFIER);
if (typeof namespaceImports === 'undefined') {
namespaceImports = { whereUsed: new Set() };
}
newExports.set(EXPORT_ALL_DECLARATION, exportAll);
newExports.set(IMPORT_NAMESPACE_SPECIFIER, namespaceImports);
exportList.set(file, newExports);
}return updateExportUsage;}();
/**
* only useful for tools like vscode-eslint
*
* update lists of existing imports during runtime
*/
var updateImportUsage = function () {function updateImportUsage(node) {
if (!unusedExports) {
return;
}
var oldImportPaths = importList.get(file);
if (typeof oldImportPaths === 'undefined') {
oldImportPaths = new Map();
}
var oldNamespaceImports = new Set();
var newNamespaceImports = new Set();
var oldExportAll = new Set();
var newExportAll = new Set();
var oldDefaultImports = new Set();
var newDefaultImports = new Set();
var oldImports = new Map();
var newImports = new Map();
oldImportPaths.forEach(function (value, key) {
if (value.has(EXPORT_ALL_DECLARATION)) {
oldExportAll.add(key);
}
if (value.has(IMPORT_NAMESPACE_SPECIFIER)) {
oldNamespaceImports.add(key);
}
if (value.has(IMPORT_DEFAULT_SPECIFIER)) {
oldDefaultImports.add(key);
}
value.forEach(function (val) {
if (
val !== IMPORT_NAMESPACE_SPECIFIER &&
val !== IMPORT_DEFAULT_SPECIFIER)
{
oldImports.set(val, key);
}
});
});
function processDynamicImport(source) {
if (source.type !== 'Literal') {
return null;
}
var p = (0, _resolve2['default'])(source.value, context);
if (p == null) {
return null;
}
newNamespaceImports.add(p);
}
(0, _visit2['default'])(node, visitorKeyMap.get(file), {
ImportExpression: function () {function ImportExpression(child) {
processDynamicImport(child.source);
}return ImportExpression;}(),
CallExpression: function () {function CallExpression(child) {
if (child.callee.type === 'Import') {
processDynamicImport(child.arguments[0]);
}
}return CallExpression;}() });
node.body.forEach(function (astNode) {
var resolvedPath = void 0;
// support for export { value } from 'module'
if (astNode.type === EXPORT_NAMED_DECLARATION) {
if (astNode.source) {
resolvedPath = (0, _resolve2['default'])(astNode.source.raw.replace(/('|")/g, ''), context);
astNode.specifiers.forEach(function (specifier) {
var name = specifier.local.name || specifier.local.value;
if (name === DEFAULT) {
newDefaultImports.add(resolvedPath);
} else {
newImports.set(name, resolvedPath);
}
});
}
}
if (astNode.type === EXPORT_ALL_DECLARATION) {
resolvedPath = (0, _resolve2['default'])(astNode.source.raw.replace(/('|")/g, ''), context);
newExportAll.add(resolvedPath);
}
if (astNode.type === IMPORT_DECLARATION) {
resolvedPath = (0, _resolve2['default'])(astNode.source.raw.replace(/('|")/g, ''), context);
if (!resolvedPath) {
return;
}
if (isNodeModule(resolvedPath)) {
return;
}
if (newNamespaceImportExists(astNode.specifiers)) {
newNamespaceImports.add(resolvedPath);
}
if (newDefaultImportExists(astNode.specifiers)) {
newDefaultImports.add(resolvedPath);
}
astNode.specifiers.
filter(function (specifier) {return specifier.type !== IMPORT_DEFAULT_SPECIFIER && specifier.type !== IMPORT_NAMESPACE_SPECIFIER;}).
forEach(function (specifier) {
newImports.set(specifier.imported.name || specifier.imported.value, resolvedPath);
});
}
});
newExportAll.forEach(function (value) {
if (!oldExportAll.has(value)) {
var imports = oldImportPaths.get(value);
if (typeof imports === 'undefined') {
imports = new Set();
}
imports.add(EXPORT_ALL_DECLARATION);
oldImportPaths.set(value, imports);
var _exports = exportList.get(value);
var currentExport = void 0;
if (typeof _exports !== 'undefined') {
currentExport = _exports.get(EXPORT_ALL_DECLARATION);
} else {
_exports = new Map();
exportList.set(value, _exports);
}
if (typeof currentExport !== 'undefined') {
currentExport.whereUsed.add(file);
} else {
var whereUsed = new Set();
whereUsed.add(file);
_exports.set(EXPORT_ALL_DECLARATION, { whereUsed: whereUsed });
}
}
});
oldExportAll.forEach(function (value) {
if (!newExportAll.has(value)) {
var imports = oldImportPaths.get(value);
imports['delete'](EXPORT_ALL_DECLARATION);
var _exports2 = exportList.get(value);
if (typeof _exports2 !== 'undefined') {
var currentExport = _exports2.get(EXPORT_ALL_DECLARATION);
if (typeof currentExport !== 'undefined') {
currentExport.whereUsed['delete'](file);
}
}
}
});
newDefaultImports.forEach(function (value) {
if (!oldDefaultImports.has(value)) {
var imports = oldImportPaths.get(value);
if (typeof imports === 'undefined') {
imports = new Set();
}
imports.add(IMPORT_DEFAULT_SPECIFIER);
oldImportPaths.set(value, imports);
var _exports3 = exportList.get(value);
var currentExport = void 0;
if (typeof _exports3 !== 'undefined') {
currentExport = _exports3.get(IMPORT_DEFAULT_SPECIFIER);
} else {
_exports3 = new Map();
exportList.set(value, _exports3);
}
if (typeof currentExport !== 'undefined') {
currentExport.whereUsed.add(file);
} else {
var whereUsed = new Set();
whereUsed.add(file);
_exports3.set(IMPORT_DEFAULT_SPECIFIER, { whereUsed: whereUsed });
}
}
});
oldDefaultImports.forEach(function (value) {
if (!newDefaultImports.has(value)) {
var imports = oldImportPaths.get(value);
imports['delete'](IMPORT_DEFAULT_SPECIFIER);
var _exports4 = exportList.get(value);
if (typeof _exports4 !== 'undefined') {
var currentExport = _exports4.get(IMPORT_DEFAULT_SPECIFIER);
if (typeof currentExport !== 'undefined') {
currentExport.whereUsed['delete'](file);
}
}
}
});
newNamespaceImports.forEach(function (value) {
if (!oldNamespaceImports.has(value)) {
var imports = oldImportPaths.get(value);
if (typeof imports === 'undefined') {
imports = new Set();
}
imports.add(IMPORT_NAMESPACE_SPECIFIER);
oldImportPaths.set(value, imports);
var _exports5 = exportList.get(value);
var currentExport = void 0;
if (typeof _exports5 !== 'undefined') {
currentExport = _exports5.get(IMPORT_NAMESPACE_SPECIFIER);
} else {
_exports5 = new Map();
exportList.set(value, _exports5);
}
if (typeof currentExport !== 'undefined') {
currentExport.whereUsed.add(file);
} else {
var whereUsed = new Set();
whereUsed.add(file);
_exports5.set(IMPORT_NAMESPACE_SPECIFIER, { whereUsed: whereUsed });
}
}
});
oldNamespaceImports.forEach(function (value) {
if (!newNamespaceImports.has(value)) {
var imports = oldImportPaths.get(value);
imports['delete'](IMPORT_NAMESPACE_SPECIFIER);
var _exports6 = exportList.get(value);
if (typeof _exports6 !== 'undefined') {
var currentExport = _exports6.get(IMPORT_NAMESPACE_SPECIFIER);
if (typeof currentExport !== 'undefined') {
currentExport.whereUsed['delete'](file);
}
}
}
});
newImports.forEach(function (value, key) {
if (!oldImports.has(key)) {
var imports = oldImportPaths.get(value);
if (typeof imports === 'undefined') {
imports = new Set();
}
imports.add(key);
oldImportPaths.set(value, imports);
var _exports7 = exportList.get(value);
var currentExport = void 0;
if (typeof _exports7 !== 'undefined') {
currentExport = _exports7.get(key);
} else {
_exports7 = new Map();
exportList.set(value, _exports7);
}
if (typeof currentExport !== 'undefined') {
currentExport.whereUsed.add(file);
} else {
var whereUsed = new Set();
whereUsed.add(file);
_exports7.set(key, { whereUsed: whereUsed });
}
}
});
oldImports.forEach(function (value, key) {
if (!newImports.has(key)) {
var imports = oldImportPaths.get(value);
imports['delete'](key);
var _exports8 = exportList.get(value);
if (typeof _exports8 !== 'undefined') {
var currentExport = _exports8.get(key);
if (typeof currentExport !== 'undefined') {
currentExport.whereUsed['delete'](file);
}
}
}
});
}return updateImportUsage;}();
return {
'Program:exit': function () {function ProgramExit(node) {
updateExportUsage(node);
updateImportUsage(node);
checkExportPresence(node);
}return ProgramExit;}(),
ExportDefaultDeclaration: function () {function ExportDefaultDeclaration(node) {
checkUsage(node, IMPORT_DEFAULT_SPECIFIER);
}return ExportDefaultDeclaration;}(),
ExportNamedDeclaration: function () {function ExportNamedDeclaration(node) {
node.specifiers.forEach(function (specifier) {
checkUsage(specifier, specifier.exported.name || specifier.exported.value);
});
forEachDeclarationIdentifier(node.declaration, function (name) {
checkUsage(node, name);
});
}return ExportNamedDeclaration;}() };
}return create;}() };
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9ydWxlcy9uby11bnVzZWQtbW9kdW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3J0ZWQgKGUuZyBtb2R1bGUgZW50cnkgcG9pbnRzKScsXG4gICAgICAgICAgdHlwZTogJ2FycmF5JyxcbiAgICAgICAgICB1bmlxdWVJdGVtczogdHJ1ZSxcbiAgICAgICAgICBpdGVtczoge1xuICAgICAgICAgICAgdHlwZTogJ3N0cmluZycsXG4gICAgICAgICAgICBtaW5MZW5ndGg6IDEsXG4gICAgICAgICAgfSxcbiAgICAgICAgfSxcbiAgICAgICAgbWlzc2luZ0V4cG9ydHM6IHtcbiAgICAgICAgICBkZXNjcmlwdGlvbjogJ3JlcG9ydCBtb2R1bGVzIHdpdGhvdXQgYW55IGV4cG9ydHMnLFxuICAgICAgICAgIHR5cGU6ICdib29sZWFuJyxcbiAgICAgICAgfSxcbiAgICAgICAgdW51c2VkRXhwb3J0czoge1xuICAgICAgICAgIGRlc2NyaXB0aW9uOiAncmVwb3J0IGV4cG9ydHMgd2l0aG91dCBhbnkgdXNhZ2UnLFxuICAgICAgICAgIHR5cGU6ICdib29sZWFuJyxcbiAgICAgICAgfSxcbiAgICAgIH0sXG4gICAgICBhbnlPZjogW1xuICAgICAgICB7XG4gICAgICAgICAgcHJvcGVydGllczoge1xuICAgICAgICAgICAgdW51c2VkRXhwb3J0czogeyBlbnVtOiBbdHJ1ZV0gfSxcbiAgICAgICAgICAgIHNyYzoge1xuICAgICAgICAgICAgICBtaW5JdGVtczogMSxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgfSxcbiAgICAgICAgICByZXF1aXJlZDogWyd1bnVzZWRFeHBvcnRzJ10sXG4gICAgICAgIH0sXG4gICAgICAgIHtcbiAgICAgICAgICBwcm9wZXJ0aWVzOiB7XG4gICAgICAgICAgICBtaXNzaW5nRXhwb3J0czogeyBlbnVtOiBbdHJ1ZV0gfSxcbiAgICAgICAgICB9LFxuICAgICAgICAgIHJlcXVpcmVkOiBbJ21pc3NpbmdFeHBvcnRzJ10sXG4gICAgICAgIH0sXG4gICAgICBdLFxuICAgIH1dLFxuICB9L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2Nlc3NEeW5hbWljSW1wb3J0KHNvdXJjZSkge1xuICAgICAgICBpZiAoc291cmNlLnR5cGUgIT09ICdMaXRlcmFsJykge1xuICAgICAgICAgIHJldHVybiBudWxsO1xuICAgICAgICB9XG4gICAgICAgIGNvbnN0IHAgPSByZXNvbHZlKHNvdXJjZS52YWx1ZSwgY29udGV4dCk7XG4gICAgICAgIGlmIChwID09IG51bGwpIHtcbiAgICAgICAgICByZXR1cm4gbnVsbDtcbiAgICAgICAgfVxuICAgICAgICBuZXdOYW1lc3BhY2VJbXBvcnRzLmFkZChwKTtcbiAgICAgIH1cblxuICAgICAgdmlzaXQobm9kZSwgdmlzaXRvcktleU1hcC5nZXQoZmlsZSksIHtcbiAgICAgICAgSW1wb3J0RXhwcmVzc2lvbihjaGlsZCkge1xuICAgICAgICAgIHByb2Nlc3NEeW5hbWljSW1wb3J0KGNoaWxkLnNvdXJjZSk7XG4gICAgICAgIH0sXG4gICAgICAgIENhbGxFeHByZXNzaW9uKGNoaWxkKSB7XG4gICAgICAgICAgaWYgKGNoaWxkLmNhbGxlZS50eXBlID09PSAnSW1wb3J0Jykge1xuICAgICAgICAgICAgcHJvY2Vzc0R5bmFtaWNJbXBvcnQoY2hpbGQuYXJndW1lbnRzWzBdKTtcbiAgICAgICAgICB9XG4gICAgICAgIH0sXG4gICAgICB9KTtcblxuICAgICAgbm9kZS5ib2R5LmZvckVhY2goKGFzdE5vZGUpID0+IHtcbiAgICAgICAgbGV0IHJlc29sdmVkUGF0aDtcblxuICAgICAgICAvLyBzdXBwb3J0IGZvciBleHBvcnQgeyB2YWx1ZSB9IGZyb20gJ21vZHVsZSdcbiAgICAgICAgaWYgKGFzdE5vZGUudHlwZSA9PT0gRVhQT1JUX05BTUVEX0RFQ0xBUkFUSU9OKSB7XG4gICAgICAgICAgaWYgKGFzdE5vZGUuc291cmNlKSB7XG4gICAgICAgICAgICByZXNvbHZlZFBhdGggPSByZXNvbHZlKGFzdE5vZGUuc291cmNlLnJhdy5y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kSW1wb3J0UGF0aHMuZ2V0KHZhbHVlKTtcbiAgICAgICAgICBpbXBvcnRzLmRlbGV0ZShFWFBPUlRfQUxMX0RFQ0xBUkFUSU9OKTtcblxuICAgICAgICAgIGNvbnN0IGV4cG9ydHMgPSBleHBvcnRMaXN0LmdldCh2YWx1ZSk7XG4gICAgICAgICAgaWYgKHR5cGVvZiBleHBvcnRzICE9PSAndW5kZWZpbmVkJykge1xuICAgICAgICAgICAgY29uc3QgY3VycmVudEV4cG9ydCA9IGV4cG9ydHMuZ2V0KEVYUE9SVF9BTExfREVDTEFSQVRJT04pO1xuICAgICAgICAgICAgaWYgKHR5cGVvZiBjdXJyZW50RXhwb3J0ICE9PSAndW5kZWZpbmVkJykge1xuICAgICAgICAgICAgICBjdXJyZW50RXhwb3J0LndoZXJlVXNlZC5kZWxldGUoZmlsZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9KTtcblxuICAgICAgbmV3RGVmYXVsdEltcG9ydHMuZm9yRWFjaCgodmFsdWUpID0+IHtcbiAgICAgICAgaWYgKCFvbGREZWZhdWx0SW1wb3J0cy5oYXModmFsdWUpKSB7XG4gICAgICAgICAgbGV0IGltcG9ydHMgPSBvbGRJbXBvcnRQYXRocy5nZXQodmFsdWUpO1xuICAgICAgICAgIGlmICh0eXBlb2YgaW1wb3J0cyA9PT0gJ3VuZGVmaW5lZCcpIHtcbiAgICAgICAgICAgIGltcG9ydHMgPSBuZXcgU2V0KCk7XG4gICAgICAgICAgfVxuICAgICAgICAgIGltcG9ydHMuYWRkKElNUE9SVF9ERUZBVUxUX1NQRUNJRklFUik7XG4gICAgICAgICAgb2xkSW1wb3J0UGF0aHMuc2V0KHZhbHVlLCBpbXBvcnRzKTtcblxuICAgICAgICAgIGxldCBleHBvcnRzID0gZXhwb3J0TGlzdC5nZXQodmFsdWUpO1xuICAgICAgICAgIGxldCBjdXJyZW50RXhwb3J0O1xuICAgICAgICAgIGlmICh0eXBl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ICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfSk7XG5cbiAgICAgIG5ld0ltcG9ydHMuZm9yRWFjaCgodmFsdWUsIGtleSkgPT4ge1xuICAgICAgICBpZiAoIW9sZEltcG9ydHMuaGFzKGtleSkpIHtcbiAgICAgICAgICBsZXQgaW1wb3J0cyA9IG9sZEltcG9ydFBhdGhzLmdldCh2YWx1ZSk7XG4gICAgICAgICAgaWYgKHR5cGVvZiBpbXBvcnRzID09PSAndW5kZWZpbmVkJykge1xuICAgICAgICAgICAgaW1wb3J0cyA9IG5ldyBTZXQoKTtcbiAgICAgICAgICB9XG4gICAgICAgICAgaW1wb3J0cy5hZGQoa2V5KTtcbiAgICAgICAgICBvbGRJbXBvcnRQYXRocy5zZXQodmFsdWUsIGltcG9ydHMpO1xuXG4gICAgICAgICAgbGV0IGV4cG9ydHMgPSBleHBvcnRMaXN0LmdldCh2YWx1ZSk7XG4gICAgICAgICAgbGV0IGN1cnJlbnRFeHBvcnQ7XG4gICAgICAgICAgaWYgKHR5cGVvZiBleHBvcnRzICE9PSAndW5kZWZpbmVkJykge1xuICAgICAgICAgICAgY3VycmVudEV4cG9ydCA9IGV4cG9ydHMuZ2V0KGtleSk7XG4gICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIGV4cG9ydHMgPSBuZXcgTWFwKCk7XG4gICAgICAgICAgICBleHBvcnRMaXN0LnNldCh2YWx1ZSwgZXhwb3J0cyk7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgaWYgKHR5cGVvZiBjdXJyZW50RXhwb3J0ICE9PSAndW5kZWZpbmVkJykge1xuICAgICAgICAgICAgY3VycmVudEV4cG9ydC53aGVyZVVzZWQuYWRkKGZpbGUpO1xuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBjb25zdCB3aGVyZVVzZWQgPSBuZXcgU2V0KCk7XG4gICAgICAgICAgICB3aGVyZVVzZWQuYWRkKGZpbGUpO1xuICAgICAgICAg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