internet-programming/lab3/node_modules/eslint-plugin-import/lib/rules/no-unused-modules.js

940 lines
106 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 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 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 (_ref3) {var filename = _ref3.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 (_ref4) {var filename = _ref4.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 (_ref5) {var importedSpecifiers = _ref5.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 (_ref6) {var type = _ref6.type;return type === IMPORT_NAMESPACE_SPECIFIER;});};
var newDefaultImportExists = function newDefaultImportExists(specifiers) {return specifiers.some(function (_ref7) {var type = _ref7.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 _ref8 =
context.options[0] || {},src = _ref8.src,_ref8$ignoreExports = _ref8.ignoreExports,ignoreExports = _ref8$ignoreExports === undefined ? [] : _ref8$ignoreExports,missingExports = _ref8.missingExports,unusedExports = _ref8.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 (_ref9) {var type = _ref9.type,declaration = _ref9.declaration,specifiers = _ref9.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,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9ydWxlcy9uby11bnVzZWQtbW9kdWxlcy5qcyJdLCJuYW1lcyI6WyJGaWxlRW51bWVyYXRvciIsImxpc3RGaWxlc1RvUHJvY2VzcyIsInJlcX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SU1QT1JUX05BTUVTUEFDRV9TUEVDSUZJRVIpKSB7XG4gICAgICAgICAgb2xkTmFtZXNwYWNlSW1wb3J0cy5hZGQoa2V5KTtcbiAgICAgICAgfVxuICAgICAgICBpZiAodmFsdWUuaGFzKElNUE9SVF9ERUZBVUxUX1NQRUNJRklFUikpIHtcbiAgICAgICAgICBvbGREZWZhdWx0SW1wb3J0cy5hZGQoa2V5KTtcbiAgICAgICAgfVxuICAgICAgICB2YWx1ZS5mb3JFYWNoKCh2YWwpID0+IHtcbiAgICAgICAgICBpZiAoXG4gICAgICAgICAgICB2YWwgIT09IElNUE9SVF9OQU1FU1BBQ0VfU1BFQ0lGSUVSXG4gICAgICAgICAgICAmJiB2YWwgIT09IElNUE9SVF9ERUZBVUxUX1NQRUNJRklFUlxuICAgICAgICAgICkge1xuICAgICAgICAgICAgb2xkSW1wb3J0cy5zZXQodmFsLCBrZXkpO1xuICAgICAgICAgIH1cbiAgICAgICAgfSk7XG4gICAgICB9KTtcblxuICAgICAgZnVuY3Rpb24gcHJvY2Vzc0R5bmFtaWNJbXBvcnQoc291cmNlKSB7XG4gICAgICAgIGlmIChzb3VyY2UudHlwZSAhPT0gJ0xpdGVyYWwnKSB7XG4gICAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgICAgIH1cbiAgICAgICAgY29uc3QgcCA9IHJlc29sdmUoc291cmNlLnZhbHVlLCBjb250ZXh0KTtcbiAgICAgICAgaWYgKHAgPT0gbnVsbCkge1xuICAgICAgICAgIHJldHVybiBudWxsO1xuICAgICAgICB9XG4gICAgICAgIG5ld05hbWVzcGFjZUltcG9ydHMuYWRkKHApO1xuICAgICAgfVxuXG4gICAgICB2aXNpdChub2RlLCB2aXNpdG9yS2V5TWFwLmdldChmaWxlKSwge1xuICAgICAgICBJbXBvcnRFeHByZXNzaW9uKGNoaWxkKSB7XG4gICAgICAgICAgcHJvY2Vzc0R5bmFtaWNJbXBvcnQoY2hpbGQuc291cmNlKTtcbiAgICAgICAgfSxcb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xuXG4gICAgICAgIGlmIChhc3ROb2RlLnR5cGUgPT09IEVYUE9SVF9BTExfREVDTEFSQVRJT04pIHtcbiAgICAgICAgICByZXNvbHZlZFBhdGggPSByZXNvbHZlKGFzdE5vZGUuc291cmNlLnJhdy5yZXBsYWNlKC8oJ3xcIikvZywgJycpLCBjb250ZXh0KTtcbiAgICAgICAgICBuZXdFeHBvcnRBbGwuYWRkKHJlc29sdmVkUGF0aCk7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoYXN0Tm9kZS50eXBlID09PSBJTVBPUlRfREVDTEFSQVRJT04pIHtcbiAgICAgICAgICByZXNvbHZlZFBhdGggPSByZXNvbHZlKGFzdE5vZGUuc291cmNlLnJhdy5yZXBsYWNlKC8oJ3xcIikvZywgJycpLCBjb250ZXh0KTtcbiAgICAgICAgICBpZiAoIXJlc29sdmVkUGF0aCkge1xuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIGlmIChpc05vZGVNb2R1bGUocmVzb2x2ZWRQYXRoKSkge1xuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIGlmIChuZXdOYW1lc3BhY2VJbXBvcnRFeGlzdHMoYXN0Tm9kZS5zcGVjaWZpZXJzKSkge1xuICAgICAgICAgICAgbmV3TmFtZXNwYWNlSW1wb3J0cy5hZGQocmVzb2x2ZWRQYXRoKTtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICBpZiAobmV3RGVmYXVsdEltcG9ydEV4aXN0cyhhc3ROb2RlLnNwZWNpZmllcnMpKSB7XG4gICAgICAgICAgICBuZXdEZWZhdWx0SW1wb3J0cy5hZGQocmVzb2x2ZWRQYXRoKTtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICBhc3ROb2RlLnNwZWNpZmllcnNcbiAgICAgICAgICAgIC5maWx0ZXIoKHNwZWNpZmllcikgPT4gc3BlY2lmaWVyLnR5cGUgIT09IElNUE9SVF9ERUZBVUxUX1N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