MCPcopy Index your code
hub / github.com/adobe/react-spectrum / getExportNotes

Function getExportNotes

scripts/reportExports.js:171–198  ·  view source on GitHub ↗
(entry, exportName, packageData)

Source from the content-addressed store, hash-verified

169}
170
171function getExportNotes(entry, exportName, packageData) {
172 let data = packageData.get(entry.packageName);
173 let notes = [];
174
175 if (entry.isRoot) {
176 if (data.privateExports.has(exportName)) {
177 notes.push(
178 `also exported from private subpath: ${formatSpecifierList(data.privateExportPaths.get(exportName))}`
179 );
180 }
181
182 if (!data.subpathExports.has(exportName)) {
183 notes.push('not exported from a subpath');
184 }
185 } else {
186 if (entry.isPrivate && data.rootExports.has(exportName)) {
187 notes.push(
188 `also exported from index via private subpath: ${formatSpecifierList(data.privateExportPaths.get(exportName))}`
189 );
190 }
191
192 if (!entry.isPrivate && !data.rootExports.has(exportName)) {
193 notes.push('not exported from index');
194 }
195 }
196
197 return notes;
198}
199
200function getPackageName(specifier) {
201 if (specifier.startsWith('@')) {

Callers 1

mainFunction · 0.85

Calls 3

formatSpecifierListFunction · 0.85
pushMethod · 0.80
hasMethod · 0.65

Tested by

no test coverage detected