Skip to content

Commit da66fb9

Browse files
committed
fix(formatPkg): don't discard packages without author, but with owners[]
fixes yarnpkg/website#915
1 parent dbb7b98 commit da66fb9

3 files changed

Lines changed: 179 additions & 121 deletions

File tree

src/__tests__/__snapshots__/formatPkg.test.js.snap

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,82 @@ Object {
294294
}
295295
`;
296296
297+
exports[`transforms correctly: indexof 1`] = `
298+
Object {
299+
"_searchInternal": Object {
300+
"alternativeNames": Array [
301+
"indexof",
302+
"indexof",
303+
"indexof",
304+
],
305+
"concatenatedName": "indexof",
306+
},
307+
"computedKeywords": Array [],
308+
"computedMetadata": Object {},
309+
"created": 1346430013243,
310+
"dependencies": Object {},
311+
"deprecated": false,
312+
"description": "Microsoft sucks",
313+
"devDependencies": Object {},
314+
"downloadsLast30Days": 0,
315+
"downloadsRatio": 0,
316+
"gitHead": null,
317+
"githubRepo": null,
318+
"homepage": null,
319+
"humanDownloadsLast30Days": "0",
320+
"keywords": Array [
321+
"index",
322+
"array",
323+
"indexOf",
324+
],
325+
"lastCrawl": Any<String>,
326+
"lastPublisher": null,
327+
"license": null,
328+
"modified": 1424001480609,
329+
"name": "indexof",
330+
"objectID": "indexof",
331+
"originalAuthor": undefined,
332+
"owner": Object {
333+
"avatar": "https://gravatar.com/avatar/f1e3ab214a976a39cfd713bc93deb10f",
334+
"email": "[email protected]",
335+
"link": "https://www.npmjs.com/~tjholowaychuk",
336+
"name": "tjholowaychuk",
337+
},
338+
"owners": Array [
339+
Object {
340+
"avatar": "https://gravatar.com/avatar/f1e3ab214a976a39cfd713bc93deb10f",
341+
"email": "[email protected]",
342+
"link": "https://www.npmjs.com/~tjholowaychuk",
343+
"name": "tjholowaychuk",
344+
},
345+
],
346+
"popular": false,
347+
"readme": "
348+
# indexOf
349+
350+
Lame indexOf thing, thanks microsoft
351+
352+
## Example
353+
354+
\`\`\`js
355+
var index = require('indexof');
356+
index(arr, obj);
357+
\`\`\`
358+
359+
## License
360+
361+
MIT",
362+
"repository": null,
363+
"tags": Object {
364+
"latest": "0.0.1",
365+
},
366+
"version": "0.0.1",
367+
"versions": Object {
368+
"0.0.1": "2012-08-31T16:20:14.894Z",
369+
},
370+
}
371+
`;
372+
297373
exports[`truncates long readmes 1`] = `
298374
Object {
299375
"_searchInternal": Object {

0 commit comments

Comments
 (0)