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

indexof package not visible #915

Closed
Daniel15 opened this issue Feb 2, 2019 · 5 comments
Closed

indexof package not visible #915

Daniel15 opened this issue Feb 2, 2019 · 5 comments

Comments

@Daniel15
Copy link
Member

Daniel15 commented Feb 2, 2019

This works: https://www.npmjs.com/package/indexof
This doesn't: https://yarnpkg.com/en/package/indexof

@Haroenv?

@Haroenv
Copy link
Member

Haroenv commented Feb 2, 2019

Hmm, that’s odd. Discrepancies are possible on recent packages but an old one like this is unexpected. I wonder if the name might cause a problem. A reminded is currently busy so in I think about 24h we can see if it’s a permanent problem

@Haroenv
Copy link
Member

Haroenv commented Mar 6, 2019

Actually it's a permanent problem, and probably one of the 1500 packages listed on http://search-status.yarnpkg.com

If we look at its registry file: http://registry.npmjs.org/indexof, it's clear that we discard it wrongly in the indexing process because it has no author.

{
  "_id": "indexof",
  "_rev": "5-3fd826d99ea92eb0a3423197ec995629",
  "name": "indexof",
  "description": "Microsoft sucks",
  "dist-tags": { "latest": "0.0.1" },
  "versions": {
    "0.0.1": {
      "name": "indexof",
      "description": "Microsoft sucks",
      "version": "0.0.1",
      "keywords": ["index", "array", "indexOf"],
      "dependencies": {},
      "component": { "scripts": { "indexof/index.js": "index.js" } },
      "_id": "[email protected]",
      "dist": {
        "shasum": "82dc336d232b9062179d05ab3293a66059fd435d",
        "tarball": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz"
      },
      "maintainers": [
        { "name": "tjholowaychuk", "email": "[email protected]" }
      ],
      "directories": {}
    }
  },
  "readme": "\n# indexOf\n\n  Lame indexOf thing, thanks microsoft\n\n## Example\n\n```js\nvar index = require('indexof');\nindex(arr, obj);\n```\n\n## License\n\n  MIT",
  "maintainers": [{ "name": "tjholowaychuk", "email": "[email protected]" }],
  "time": {
    "modified": "2015-02-15T11:58:00.609Z",
    "created": "2012-08-31T16:20:13.243Z",
    "0.0.1": "2012-08-31T16:20:14.894Z"
  },
  "users": { "pnevares": true, "synchronous": true },
  "keywords": ["index", "array", "indexOf"],
  "readmeFilename": "",
  "_attachments": {}
}

Our logic of inferring the author should take maintainers also in account, since likely that was the original required key.

  if (!githubRepo && !lastPublisher && !author) {
    return undefined; // ignore this package, we cannot link it to anyone
  }

https://github.com/algolia/npm-search/blob/dbb7b98bcf374a086a5bbc9753985a5b40810e2c/src/formatPkg.js#L34-L36

@Haroenv
Copy link
Member

Haroenv commented Mar 6, 2019

After next bootstrap I expect indexof to be included, and the 1542 packages missing to be significantly lower

@Haroenv
Copy link
Member

Haroenv commented Mar 13, 2019

there's been a new index, and this indeed made the https://yarnpkg.com/en/package/indexof package show again. Now the discrepancy is only 200 packages, and no longer 1500 :)

@Daniel15
Copy link
Member Author

Great, thanks @Haroenv!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants