1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889 |
- "use strict";
- const util = require("util");
- const compareLocations = require("./compareLocations");
- const DependencyReference = require("./dependencies/DependencyReference");
- class Dependency {
- constructor() {
-
- this.module = null;
-
-
- this.weak = false;
-
- this.optional = false;
-
- this.loc = undefined;
- }
- getResourceIdentifier() {
- return null;
- }
-
- getReference() {
- if (!this.module) return null;
- return new DependencyReference(this.module, true, this.weak);
- }
-
- getExports() {
- return null;
- }
- getWarnings() {
- return null;
- }
- getErrors() {
- return null;
- }
- updateHash(hash) {
- hash.update((this.module && this.module.id) + "");
- }
- disconnect() {
- this.module = null;
- }
- }
- Dependency.compare = util.deprecate(
- (a, b) => compareLocations(a.loc, b.loc),
- "Dependency.compare is deprecated and will be removed in the next major version"
- );
- module.exports = Dependency;
|