MCPcopy
hub / github.com/yarnpkg/yarn / addPattern

Method addPattern

src/package-reference.js:103–114  ·  view source on GitHub ↗
(pattern: string, manifest: Manifest)

Source from the content-addressed store, hash-verified

101 }
102
103 addPattern(pattern: string, manifest: Manifest) {
104 this.resolver.addPattern(pattern, manifest);
105
106 this.patterns.push(pattern);
107
108 const shrunk = this.lockfile.getLocked(pattern);
109 if (shrunk && shrunk.permissions) {
110 for (const [key, perm] of entries(shrunk.permissions)) {
111 this.setPermission(key, perm);
112 }
113 }
114 }
115
116 addOptional(optional: boolean) {
117 if (this.optional == null) {

Callers 1

findMethod · 0.95

Calls 4

setPermissionMethod · 0.95
entriesFunction · 0.90
pushMethod · 0.80
getLockedMethod · 0.45

Tested by

no test coverage detected