Skip to content

Commit 69eb721

Browse files
fix: remove unnecessary property descriptor spread (#4403)
* fix: remove unnecessary property descriptor spread * Simplify import Co-authored-by: Lukas Taegert-Atkinson <[email protected]> Co-authored-by: Lukas Taegert-Atkinson <[email protected]>
1 parent 61d6820 commit 69eb721

2 files changed

Lines changed: 1 addition & 3 deletions

File tree

src/ExternalModule.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ export default class ExternalModule {
7373
});
7474
// Hide the deprecated key so that it only warns when accessed explicitly
7575
Object.defineProperty(this.info, 'hasModuleSideEffects', {
76-
...Object.getOwnPropertyDescriptor(this.info, 'hasModuleSideEffects'),
7776
enumerable: false
7877
});
7978
}

src/Module.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import MagicString from 'magic-string';
55
import ExternalModule from './ExternalModule';
66
import type Graph from './Graph';
77
import { createHasEffectsContext, createInclusionContext } from './ast/ExecutionContext';
8+
import { nodeConstructors } from './ast/nodes';
89
import ExportAllDeclaration from './ast/nodes/ExportAllDeclaration';
910
import ExportDefaultDeclaration from './ast/nodes/ExportDefaultDeclaration';
1011
import type ExportNamedDeclaration from './ast/nodes/ExportNamedDeclaration';
@@ -17,7 +18,6 @@ import * as NodeType from './ast/nodes/NodeType';
1718
import Program from './ast/nodes/Program';
1819
import TemplateLiteral from './ast/nodes/TemplateLiteral';
1920
import VariableDeclaration from './ast/nodes/VariableDeclaration';
20-
import { nodeConstructors } from './ast/nodes/index';
2121
import type { ExpressionNode, NodeBase } from './ast/nodes/shared/Node';
2222
import ModuleScope from './ast/scopes/ModuleScope';
2323
import { type PathTracker, UNKNOWN_PATH } from './ast/utils/PathTracker';
@@ -335,7 +335,6 @@ export default class Module {
335335
};
336336
// Hide the deprecated key so that it only warns when accessed explicitly
337337
Object.defineProperty(this.info, 'hasModuleSideEffects', {
338-
...Object.getOwnPropertyDescriptor(this.info, 'hasModuleSideEffects'),
339338
enumerable: false
340339
});
341340
}

0 commit comments

Comments
 (0)