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

911 lines
102 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 _ExportMap = require('../ExportMap');var _ExportMap2 = _interopRequireDefault(_ExportMap);
var _ignore = require('eslint-module-utils/ignore');
var _resolve = require('eslint-module-utils/resolve');var _resolve2 = _interopRequireDefault(_resolve);
var _docsUrl = require('../docsUrl');var _docsUrl2 = _interopRequireDefault(_docsUrl);
var _path = require('path');
var _readPkgUp = require('read-pkg-up');var _readPkgUp2 = _interopRequireDefault(_readPkgUp);
var _object = require('object.values');var _object2 = _interopRequireDefault(_object);
var _arrayIncludes = require('array-includes');var _arrayIncludes2 = _interopRequireDefault(_arrayIncludes);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
*/ // eslint/lib/util/glob-util has been moved to eslint/lib/util/glob-utils with version 5.3
// and has been moved to eslint/lib/cli-engine/file-enumerator in version 6
var listFilesToProcess = void 0;try {var FileEnumerator = require('eslint/lib/cli-engine/file-enumerator').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 };});
};
} catch (e1) {
// 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
var originalListFilesToProcess = void 0;
try {
originalListFilesToProcess = require('eslint/lib/util/glob-utils').listFilesToProcess;
listFilesToProcess = function listFilesToProcess(src, extensions) {
return originalListFilesToProcess(src, {
extensions: extensions });
};
} catch (e2) {
originalListFilesToProcess = require('eslint/lib/util/glob-util').listFilesToProcess;
listFilesToProcess = function listFilesToProcess(src, extensions) {
var patterns = src.reduce(function (carry, pattern) {
return carry.concat(extensions.map(function (extension) {
return (/\*\*|\*\./.test(pattern) ? pattern : String(pattern) + '/**/*' + String(extension));
}));
}, src.slice());
return originalListFilesToProcess(patterns);
};
}
}
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 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 {
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 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 srcFiles = new Set();
var srcFileList = listFilesToProcess(src, extensions);
// prepare list of ignored files
var ignoredFilesList = listFilesToProcess(ignoreExports, extensions);
ignoredFilesList.forEach(function (_ref3) {var filename = _ref3.filename;return ignoredFiles.add(filename);});
// prepare list of source files, don't consider files from node_modules
srcFileList.filter(function (_ref4) {var filename = _ref4.filename;return !isNodeModule(filename);}).forEach(function (_ref5) {var filename = _ref5.filename;
srcFiles.add(filename);
});
return srcFiles;
};
/**
* 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;
// 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;return (
importedSpecifiers.forEach(function (specifier) {return 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);
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$sync =
_readPkgUp2['default'].sync({ cwd: file, normalize: false }),path = _readPkgUp$sync.path,pkg = _readPkgUp$sync.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, _object2['default'])(pkgField).map(function (value) {return (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: { url: (0, _docsUrl2['default'])('no-unused-modules') },
schema: [{
properties: {
src: {
description: 'files/paths to be analyzed (only for unused exports)',
type: 'array',
minItems: 1,
items: {
type: 'string',
minLength: 1 } },
ignoreExports: {
description:
'files/paths for which unused exports will not be reported (e.g module entry points)',
type: 'array',
minItems: 1,
items: {
type: 'string',
minLength: 1 } },
missingExports: {
description: 'report modules without any exports',
type: 'boolean' },
unusedExports: {
description: 'report exports without any usage',
type: 'boolean' } },
not: {
properties: {
unusedExports: { 'enum': [false] },
missingExports: { 'enum': [false] } } },
anyOf: [{
not: {
properties: {
unusedExports: { 'enum': [true] } } },
required: ['missingExports'] },
{
not: {
properties: {
missingExports: { 'enum': [true] } } },
required: ['unusedExports'] },
{
properties: {
unusedExports: { 'enum': [true] } },
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);
}
});
}
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);
}
});
});
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;
if (specifier.local.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.forEach(function (specifier) {
if (specifier.type === IMPORT_DEFAULT_SPECIFIER ||
specifier.type === IMPORT_NAMESPACE_SPECIFIER) {
return;
}
newImports.set(specifier.imported.name, 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(node, specifier.exported.name);
});
forEachDeclarationIdentifier(node.declaration, function (name) {
checkUsage(node, name);
});
}return ExportNamedDeclaration;}() };
}return create;}() };
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9ydWxlcy9uby11bnVzZWQtbW9kdWxlcy5qcyJdLCJuYW1lcyI6WyJsaXN0RmlsZXNUb1Byb2Nlc3MiLCJGaWxlRW51bWVyYXRvciIsInJlcXVpcmUiLCJzcmMiLCJleHRlbnNpb25zIiwiZSIsIkFycmF5IiwiZnJvbSIsIml0ZXJhdGVGaWxlcyIsImZpbGVQYXRoIiwiaWdub3JlZCIsImZpbGVuYW1lIiwiZTEiLCJvcmlnaW5hbExpc3RGaWxlc1RvUHJvY2VzcyIsImUyIiwicGF0dGVybnMiLCJyZWR1Y2UiLCJjYXJyeSIsInBhdHRlcm4iLCJjb25jYXQiLCJtYXAiLCJleHRlbnNpb24iLCJ0ZXN0Iiwic2xpY2UiLCJFWFBPUlRfREVGQVVMVF9ERUNMQVJBVElPTiIsIkVYUE9SVF9OQU1FRF9ERUNMQVJBVElPTiIsIkVYUE9SVF9BTExfREVDTEFSQVRJT04iLCJJTVBPUlRfREVDTEFSQVRJT04iLCJJTVBPUlRfTkFNRVNQQUNFX1NQRUNJRklFUiIsIklNUE9SV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gICAgICAgICAgICdmaWxlcy9wYXRocyBmb3Igd2hpY2ggdW51c2VkIGV4cG9ydHMgd2lsbCBub3QgYmUgcmVwb3J0ZWQgKGUuZyBtb2R1bGUgZW50cnkgcG9pbnRzKScsXG4gICAgICAgICAgdHlwZTogJ2FycmF5JyxcbiAgICAgICAgICBtaW5JdGVtczogMSxcbiAgICAgICAgICBpdGVtczoge1xuICAgICAgICAgICAgdHlwZTogJ3N0cmluZycsXG4gICAgICAgICAgICBtaW5MZW5ndGg6IDEsXG4gICAgICAgICAgfSxcbiAgICAgICAgfSxcbiAgICAgICAgbWlzc2luZ0V4cG9ydHM6IHtcbiAgICAgICAgICBkZXNjcmlwdGlvbjogJ3JlcG9ydCBtb2R1bGVzIHdpdGhvdXQgYW55IGV4cG9ydHMnLFxuICAgICAgICAgIHR5cGU6ICdib29sZWFuJyxcbiAgICAgICAgfSxcbiAgICAgICAgdW51c2VkRXhwb3J0czoge1xuICAgICAgICAgIGRlc2NyaXB0aW9uOiAncmVwb3J0IGV4cG9ydHMgd2l0aG91dCBhbnkgdXNhZ2UnLFxuICAgICAgICAgIHR5cGU6ICdib29sZWFuJyxcbiAgICAgICAgfSxcbiAgICAgIH0sXG4gICAgICBub3Q6IHtcbiAgICAgICAgcHJvcGVydGllczoge1xuICAgICAgICAgIHVudXNlZEV4cG9ydHM6IHsgZW51bTogW2ZhbHNlXSB9LFxuICAgICAgICAgIG1pc3NpbmdFeHBvcnRzOiB7IGVudW06IFtmYWxzZV0gfSxcbiAgICAgICAgfSxcbiAgICAgIH0sXG4gICAgICBhbnlPZjpbe1xuICAgICAgICBub3Q6IHtcbiAgICAgICAgICBwcm9wZXJ0aWVzOiB7XG4gICAgICAgICAgICB1bnVzZWRFeHBvcnRzOiB7IGVudW06IFt0cnVlXSB9LFxuICAgICAgICAgIH0sXG4gICAgICAgIH0sXG4gICAgICAgIHJlcXVpcmVkOiBbJ21pc3NpbmdFeHBvcnRzJ10sXG4gICAgICB9LCB7XG4gICAgICA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LCBkZWNsYXJhdGlvbiwgc3BlY2lmaWVycyB9KSA9PiB7XG4gICAgICAgIGlmICh0eXBlID09PSBFWFBPUlRfREVGQVVMVF9ERUNMQVJBVElPTikge1xuICAgICAgICAgIG5ld0V4cG9ydElkZW50aWZpZXJzLmFkZChJTVBPUlRfREVGQVVMVF9TUEVDSUZJRVIpO1xuICAgICAgICB9XG4gICAgICAgIGlmICh0eXBlID09PSBFWFBPUlRfTkFNRURfREVDTEFSQVRJT04pIHtcbiAgICAgICAgICBpZiAoc3BlY2lmaWVycy5sZW5ndGggPiAwKSB7XG4gICAgICAgICAgICBzcGVjaWZpZXJzLmZvckVhY2goc3BlY2lmaWVyID0+IHtcbiAgICAgICAgICAgICAgaWYgKHNwZWNpZmllci5leHBvcnRlZCkge1xuICAgICAgICAgICAgICAgIG5ld0V4cG9ydElkZW50aWZpZXJzLmFkZChzcGVjaWZpZXIuZXhwb3J0ZWQubmFtZSk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgIH1cbiAgICAgICAgICBmb3JFYWNoRGVjbGFyYXRpb25JZGVudGlmaWVyKGRlY2xhcmF0aW9uLCAobmFtZSkgPT4ge1xuICAgICAgICAgICAgbmV3RXhwb3J0SWRlbnRpZmllcnMuYWRkKG5hbWUpO1xuICAgICAgICAgIH0pO1xuICAgICAgICB9XG4gICAgICB9KTtcblxuICAgICAgLy8gb2xkIGV4cG9ydHMgZXhpc3Qgd2l0aGluIGxpc3Qgb2YgbmV3IGV4cG9ydHMgaWRlbnRpZmllcnM6IGFkZCB0byBtYXAgb2YgbmV3IGV4cG9ydHNcbiAgICAgIGV4cG9ydHMuZm9yRWFjaCgodmFsdWUsIGtleSkgPT4ge1xuICAgICAgICBpZiAobmV3RXhwb3J0SWRlbnRpZmllcnMuaGFzKGtleSkpIHtcbiAgICAgICAgICBuZXdFeHBvcnRzLnNldChrZXksIHZhbHVlKTtcbiAgICAgICAgfVxuICAgICAgfSk7XG5cbiAg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mYXVsdEltcG9ydHMuYWRkKHJlc29sdmVkUGF0aCk7XG4gICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgbmV3SW1wb3J0cy5zZXQobmFtZSwgcmVzb2x2ZWRQYXRoKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgaWYgKGFzdE5vZGUudHlwZSA9PT0gRVhQT1JUX0FMTF9ERUNMQVJBVElPTikge1xuICAgICAgICAgIHJlc29sdmVkUGF0aCA9IHJlc29sdmUoYXN0Tm9kZS5zb3VyY2UucmF3LnJlcGxhY2UoLygnfFwiKS9nLCAnJyksIGNvbnRleHQpO1xuICAgICAgICAgIG5ld0V4cG9ydEFsbC5hZGQocmVzb2x2ZWRQYXRoKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChhc3ROb2RlLnR5cGUgPT09IElNUE9SVF9ERUNMQVJBVElPTikge1xuICAgICAgICAgIHJlc29sdmVkUGF0aCA9IHJlc29sdmUoYXN0Tm9kZS5zb3VyY2UucmF3LnJlcGxhY2UoLygnfFwiKS9nLCAnJyksIGNvbnRleHQpO1xuICAgICAgICAgIGlmICghcmVzb2x2ZWRQYXRoKSB7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgaWYgKGlzTm9kZU1vZHVsZShyZXNvbHZlZFBhdGgpKSB7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgaWYgKG5ld05hbWVzcGFjZUltcG9ydEV4aXN0cyhhc3ROb2RlLnNwZWNpZmllcnMpKSB7XG4gICAgICAgICAgICBuZXdOYW1lc3BhY2VJbXBvcnRzLmFkZChyZXNvbHZlZFBhdGgpO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIGlmIChuZXdEZWZhdWx0SW1wb3J0RXhpc3RzKGFzdE5vZGUuc3BlY2lmaWVycykpIHtcbiAgICAgICAgICAgIG5ld0RlZmF1bHRJbXBvcnRzLmFkZChyZXNvbHZlZFBhdGgpO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIGFzdE5vZGUuc3BlY2lmaWVycy5mb3JFYWNoKHNwZWNpZmllciA9PiB7XG4gICAgICAgICAgICBpZiAoc3BlY2lmaWVyLnR5cGUgPT09IElNUE9SVF9ERUZBVUxUX1NQRUNJRklFUiB8fFxuICAgICAgICAgICAgICAgIHNwZWNpZmllci50eXBlID09PSBJTVBPUlRfTkFNRVNQQUNFX1NQRUNJRklFUikge1xuICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBuZXdJbXBvcnRzLnNldChzcGVjaWZpZXIuaW1wb3J0ZWQubmFtZSwgcmVzb2x2ZWRQYXRoKTtcbiAgICAgICAgICB9KTtcbiAgICAgICAgfVxuICAgICAgfSk7XG5cbiAgICAgIG5ld0V4cG9ydEFsbC5mb3JFYWNoKHZhbHVlID0+IHtcbiAgICAgICAgaWYgKCFvbGRFeHBvcnRBbGwuaGFzKHZhbHVlKSkge1xuICAgICAgICAgIGxldCBpbXBvcnRzID0gb2xkSW1wb3J0UGF0aHMuZ2V0KHZhbHVlKTtcbiAgICAgICAgICBpZiAodHlwZW9mIGltcG9ydHMgPT09ICd1bmRlZmluZWQnKSB7XG4gICAgICAgICAgICBpbXBvcnRzID0gbmV3IFNldCgpO1xuICAgICAgICAgIH1cbiAgICAgICAgICBpbXBvcnRzLmFkZChFWFBPUlRfQUxMX0RFQ0xBUkFUSU9OKTtcbiAgICAgICAgICBvbGRJbXBvcnRQYXRocy5zZXQodmFsdWUsIGltcG9ydHMpO1xuXG4gICAgICAgICAgbGV0IGV4cG9ydHMgPSBleHBvcnRMaXN0LmdldCh2YWx1ZSk7XG4gICAgICAgICAgbGV0IGN1cnJlbnRFeHBvcnQ7XG4gICAgICAgICAgaWYgKHR5cGVvZiBleHBvcnRzICE9PSAndW5kZWZpbmVkJykge1xuICAg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uZGVmaW5lZCcpIHtcbiAgICAgICAgICAgIGN1cnJlbnRFeHBvcnQud2hlcmVVc2VkLmFkZChmaWxlKTtcbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgY29uc3Qgd2hlcmVVc2VkID0gbmV3IFNldCgpO1xuICAgICAgICAgICAgd2hlcmVVc2VkLmFkZChmaWxlKTtcbiAgICAgICAgICAgIGV4cG9ydHMuc2V0KElNUE9SVF9ERUZBVUxUX1NQRUNJRklFUiwgeyB3aGVyZVVzZWQgfSk7XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9KTtcblxuICAgICAgb2xkRGVmYXVsdEltcG9ydHMuZm9yRWFjaCh2YWx1ZSA9PiB7XG4gICAgICAgIGlmICghbmV3RGVmYXVsdEltcG9ydHMuaGFzKHZhbHVlKSkge1xuICAgICAgICAgIGNvbnN0IGltcG9ydHMgPSBvbGRJbXBvcnRQYXRocy5nZXQodmFsdWUpO1xuICAgICAgICAgIGltcG9ydHMuZGVsZXRlKElNUE9SVF9ERUZBVUxUX1NQRUNJRklFUik7XG5cbiAgICAgICAgICBjb25zdCBleHBvcnRzID0gZXhwb3J0TGlzdC5nZXQodmFsdWUpO1xuICAgICAgICAgIGlmICh0eXBlb2YgZXhwb3J0cyAhPT0gJ3VuZGVmaW5lZCcpIHtcbiAgICAgICAgICAgIGNvbnN0IGN1cnJlbnRFeHBvcnQgPSBleHBvcnRzLmdldChJTVBPUlRfREVGQVVMVF9TUEVDSUZJRVIpO1xuICAgICAgICAgICAgaWYgKHR5cGVvZiBjdXJyZW50RXhwb3J0ICE9PSAndW5kZWZpbmVkJykge1xuICAgICAgICAgICAgICBjdXJyZW50RXhwb3J0LndoZXJlVXNlZC5kZWxldGUoZmlsZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9KTtcblxuICAgICAgbmV3TmFtZXNwYWNlSW1wb3J0cy5mb3JFYWNoKHZhbHVlID0+IHtcbiAgICA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