Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remove unnecessary property descriptor spread #4403

Merged
merged 3 commits into from Feb 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 0 additions & 1 deletion src/ExternalModule.ts
Expand Up @@ -73,7 +73,6 @@ export default class ExternalModule {
});
// Hide the deprecated key so that it only warns when accessed explicitly
Object.defineProperty(this.info, 'hasModuleSideEffects', {
...Object.getOwnPropertyDescriptor(this.info, 'hasModuleSideEffects'),
enumerable: false
});
}
Expand Down
3 changes: 1 addition & 2 deletions src/Module.ts
Expand Up @@ -5,6 +5,7 @@ import MagicString from 'magic-string';
import ExternalModule from './ExternalModule';
import type Graph from './Graph';
import { createHasEffectsContext, createInclusionContext } from './ast/ExecutionContext';
import { nodeConstructors } from './ast/nodes';
import ExportAllDeclaration from './ast/nodes/ExportAllDeclaration';
import ExportDefaultDeclaration from './ast/nodes/ExportDefaultDeclaration';
import type ExportNamedDeclaration from './ast/nodes/ExportNamedDeclaration';
Expand All @@ -17,7 +18,6 @@ import * as NodeType from './ast/nodes/NodeType';
import Program from './ast/nodes/Program';
import TemplateLiteral from './ast/nodes/TemplateLiteral';
import VariableDeclaration from './ast/nodes/VariableDeclaration';
import { nodeConstructors } from './ast/nodes/index';
import type { ExpressionNode, NodeBase } from './ast/nodes/shared/Node';
import ModuleScope from './ast/scopes/ModuleScope';
import { type PathTracker, UNKNOWN_PATH } from './ast/utils/PathTracker';
Expand Down Expand Up @@ -335,7 +335,6 @@ export default class Module {
};
// Hide the deprecated key so that it only warns when accessed explicitly
Object.defineProperty(this.info, 'hasModuleSideEffects', {
...Object.getOwnPropertyDescriptor(this.info, 'hasModuleSideEffects'),
enumerable: false
});
}
Expand Down