Skip to content

Commit b52a245

Browse files
committed
fix(bug): fixes a bug that could lead to missing exports
1 parent a6abc0c commit b52a245

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
"@wessberg/scaffold": "^1.0.17",
5252
"@wessberg/ts-config": "^0.0.39",
5353
"standard-changelog": "^2.0.7",
54-
"@wessberg/rollup-plugin-ts": "^1.1.47",
54+
"@wessberg/rollup-plugin-ts": "^1.1.48",
5555
"tslint": "^5.16.0",
5656
"prettier": "^1.17.0",
5757
"pretty-quick": "^1.10.0",

src/service/transformer/declaration-bundler/deconflict/visitor/trace-identifiers/trace-identifiers-for-import-declaration.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,12 @@ export function traceIdentifiersForImportDeclaration({
2020
if (node.importClause.namedBindings != null) {
2121
if (isNamedImports(node.importClause.namedBindings)) {
2222
for (const element of node.importClause.namedBindings.elements) {
23-
if (element.propertyName != null && !isIdentifierFree(element.name.text)) {
24-
updateIdentifierName(element.name.text, generateUniqueVariableName(element.name.text));
25-
} else {
26-
addIdentifier(element.name.text);
23+
if (element.propertyName != null) {
24+
if (!isIdentifierFree(element.name.text)) {
25+
updateIdentifierName(element.name.text, generateUniqueVariableName(element.name.text));
26+
} else {
27+
addIdentifier(element.name.text);
28+
}
2729
}
2830
}
2931
} else {

src/service/transformer/declaration-tree-shaker/reference/is-referenced/is-referenced.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export function isReferenced<T extends Node>({seenNodes = new Set(), ...options}
5656
seenNodes.add(options.node);
5757
}
5858

59-
// Collect all nods that references the given node
59+
// Collect all nodes that references the given node
6060
const referencingNodes = collectReferences(options);
6161

6262
// Compute the result

0 commit comments

Comments
 (0)