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

npcheck reports no testing for 2 modules that look like they have testing #108

Open
mhdawson opened this issue Dec 6, 2021 · 3 comments

Comments

@mhdawson
Copy link
Contributor

mhdawson commented Dec 6, 2021

(40): The "jest" seems that is lacking appropriate testing (https://www.github.com/facebook/jest)
(53): The "@openapitools/openapi-generator-cli" seems that is lacking appropriate testing (https://www.github.com/OpenAPITools/openapi-generator-cli)

Looking at openapitools/openapi-generator-cli it has a 'test' script in the package.json so maybe we need to expand what we check for.

@richardlau
Copy link
Contributor

richardlau commented Dec 7, 2021

Taking a look at what happens when npcheck runs for jest...
src/plugins/tests.js's algorithm for checking for the presence of tests appears to be:

  1. See if it has a test script (i.e. script containing the word test)
    // Find npm test script (if exists)
    const npmScripts = pkg.scripts || [];
    const npmTestCommand = Object.keys(npmScripts).find((cmd) =>
    cmd.includes('test')
    );
  2. See if it has a test directory (i.e. directory containing the word test)
    // Test directory
    const githubTarget = pkg.repository.url
    .split('github.com/')[1]
    .replace('.git', '');
    const commitHistory = await fetchGithub(
    `/repos/${githubTarget}/commits`,
    options.githubToken
    );
    const repoTreeURL = commitHistory[0].commit.tree.url;
    const repoTree = await fetchGithub(repoTreeURL, options.githubToken, true);
    const testDirectory = repoTree.tree.find(
    ({ path, type }) => path.includes('test') && type === 'tree'
    );

There appear to be issues in both of these checks.

For 1. the pkg object is the result of npm show --json <package name>

getInfoFromNPM: (module) => {
const data = execSync(`npm show ${module} --json`, { encoding: 'utf-8' });
return JSON.parse(data);
},
. If I run npm show --json jest then we can see no scripts are returned (i.e. npm show isn't the same as the repository's root package.json file):

npm show --json jest
{
  "_id": "[email protected]",
  "_rev": "623-330f55374be9e5b7b3853b83f4be19a2",
  "name": "jest",
  "description": "Delightful JavaScript Testing.",
  "dist-tags": {
    "latest": "27.4.3",
    "next": "27.0.0-next.11"
  },
  "versions": [
    "0.0.6",
    "0.0.7",
    "0.0.61",
    "0.0.71",
    "0.0.72",
    "0.0.73",
    "0.0.74",
    "0.0.75",
    "0.0.76",
    "0.0.78",
    "0.0.79",
    "0.0.80",
    "0.0.81",
    "0.0.82",
    "0.0.83",
    "0.0.84",
    "0.0.85",
    "0.0.86",
    "0.0.87",
    "0.0.88",
    "0.0.89",
    "0.0.90",
    "0.0.91",
    "0.0.92",
    "0.0.93",
    "0.0.94",
    "0.0.95",
    "0.0.96",
    "0.0.97",
    "0.0.98",
    "0.0.99",
    "0.1.0",
    "0.1.1",
    "0.1.2",
    "0.1.21",
    "0.1.22",
    "0.1.30",
    "0.1.31",
    "0.1.32",
    "0.1.33",
    "0.1.34",
    "0.1.35",
    "0.1.37",
    "0.1.39",
    "0.1.40",
    "12.1.0-alpha1",
    "12.1.0",
    "12.1.1-alpha.2935e14d",
    "12.1.1",
    "12.1.2-alpha.6230044c",
    "12.1.2-alpha.a482b15c",
    "12.1.3-alpha.6230044c",
    "12.1.4-alpha.a737c6e5",
    "12.1.5-alpha.b5322422",
    "13.0.0",
    "13.1.0",
    "13.1.1",
    "13.1.2",
    "13.1.3",
    "13.2.0",
    "13.2.1",
    "13.2.2",
    "13.2.3-alpha.ffc7404b",
    "13.2.3",
    "13.3.0-alpha.4eb0c908",
    "13.3.0-alpha.8b48d59e",
    "13.3.0-alpha.a44f195f",
    "13.3.0-alpha.ffc7404b",
    "13.3.0-alpha.g8b48d59",
    "13.4.0-alpha.d2632006",
    "14.0.0",
    "14.0.1",
    "14.1.0",
    "14.2.0-alpha.ca8bfb6e",
    "14.2.1-alpha.e21d71a4",
    "14.2.2-alpha.22bd3c33",
    "14.3.0-alpha.d13c163e",
    "14.3.1-alpha.410cb91a",
    "14.3.2-alpha.83c25417",
    "15.0.0",
    "15.0.1",
    "15.0.2",
    "15.1.0",
    "15.1.1",
    "15.2.0-alpha.c681f819",
    "16.0.0",
    "16.0.1",
    "16.0.2",
    "16.1.0-alpha.691b0e22",
    "17.0.0",
    "17.0.1",
    "17.0.2",
    "17.0.3",
    "18.0.0",
    "18.1.0",
    "18.5.0-alpha.7da3df39",
    "19.0.0",
    "19.0.1",
    "19.0.2",
    "19.1.0-alpha.eed82034",
    "19.2.0-alpha.993e64af",
    "19.3.0-alpha.85402254",
    "20.0.0",
    "20.0.1",
    "20.0.2",
    "20.0.3",
    "20.0.4",
    "20.1.0-alpha.1",
    "20.1.0-alpha.2",
    "20.1.0-alpha.3",
    "20.1.0-beta.1",
    "20.1.0-chi.1",
    "20.1.0-delta.1",
    "20.1.0-delta.2",
    "20.1.0-delta.3",
    "20.1.0-delta.4",
    "20.1.0-delta.5",
    "20.1.0-echo.1",
    "21.0.0-alpha.1",
    "21.0.0-alpha.2",
    "21.0.0-beta.1",
    "21.0.0",
    "21.0.1",
    "21.0.2",
    "21.1.0",
    "21.2.0",
    "21.2.1",
    "21.3.0-alpha.1e3ee68e",
    "21.3.0-alpha.eff7a1cf",
    "21.3.0-beta.1",
    "21.3.0-beta.2",
    "21.3.0-beta.3",
    "21.3.0-beta.4",
    "21.3.0-beta.5",
    "21.3.0-beta.6",
    "21.3.0-beta.7",
    "21.3.0-beta.8",
    "21.3.0-beta.9",
    "21.3.0-beta.10",
    "21.3.0-beta.11",
    "21.3.0-beta.12",
    "21.3.0-beta.13",
    "21.3.0-beta.14",
    "21.3.0-beta.15",
    "22.0.0",
    "22.0.1",
    "22.0.2",
    "22.0.3",
    "22.0.4",
    "22.0.5",
    "22.0.6",
    "22.1.0",
    "22.1.1",
    "22.1.2",
    "22.1.3",
    "22.1.4",
    "22.2.0",
    "22.2.1",
    "22.2.2",
    "22.3.0",
    "22.4.0",
    "22.4.1",
    "22.4.2",
    "22.4.3",
    "22.4.4",
    "23.0.0-alpha.1",
    "23.0.0-alpha.2",
    "23.0.0-alpha.4",
    "23.0.0-alpha.5",
    "23.0.0-alpha.7",
    "23.0.0-alpha.3r",
    "23.0.0-alpha.5r",
    "23.0.0-alpha.6r",
    "23.0.0-beta.0",
    "23.0.0-beta.1",
    "23.0.0-beta.2",
    "23.0.0-beta.3r",
    "23.0.0-charlie.0",
    "23.0.0-charlie.1",
    "23.0.0-charlie.2",
    "23.0.0-charlie.3",
    "23.0.0-charlie.4",
    "23.0.0",
    "23.0.1",
    "23.1.0",
    "23.2.0",
    "23.3.0",
    "23.4.0",
    "23.4.1",
    "23.4.2",
    "23.5.0",
    "23.6.0",
    "24.0.0-alpha.0",
    "24.0.0-alpha.1",
    "24.0.0-alpha.2",
    "24.0.0-alpha.3",
    "24.0.0-alpha.4",
    "24.0.0-alpha.5",
    "24.0.0-alpha.6",
    "24.0.0-alpha.7",
    "24.0.0-alpha.8",
    "24.0.0-alpha.9",
    "24.0.0-alpha.10",
    "24.0.0-alpha.11",
    "24.0.0-alpha.12",
    "24.0.0-alpha.13",
    "24.0.0-alpha.14",
    "24.0.0-alpha.15",
    "24.0.0-alpha.16",
    "24.0.0",
    "24.1.0",
    "24.2.0-alpha.0",
    "24.3.0",
    "24.3.1",
    "24.4.0",
    "24.5.0",
    "24.6.0",
    "24.7.0",
    "24.7.1",
    "24.8.0",
    "24.9.0",
    "25.0.0",
    "25.1.0",
    "25.2.0-alpha.86",
    "25.2.0",
    "25.2.1-alpha.1",
    "25.2.1-alpha.2",
    "25.2.1",
    "25.2.2",
    "25.2.3",
    "25.2.4",
    "25.2.6",
    "25.2.7",
    "25.3.0",
    "25.4.0",
    "25.5.0",
    "25.5.1",
    "25.5.2",
    "25.5.3",
    "25.5.4",
    "26.0.0-alpha.0",
    "26.0.0-alpha.1",
    "26.0.0-alpha.2",
    "26.0.0",
    "26.0.1-alpha.0",
    "26.0.1",
    "26.1.0",
    "26.2.0",
    "26.2.1",
    "26.2.2",
    "26.3.0",
    "26.4.0",
    "26.4.1",
    "26.4.2",
    "26.5.0",
    "26.5.2",
    "26.5.3",
    "26.6.0",
    "26.6.1",
    "26.6.2",
    "26.6.3",
    "27.0.0-next.0",
    "27.0.0-next.1",
    "27.0.0-next.2",
    "27.0.0-next.3",
    "27.0.0-next.4",
    "27.0.0-next.5",
    "27.0.0-next.6",
    "27.0.0-next.7",
    "27.0.0-next.8",
    "27.0.0-next.9",
    "27.0.0-next.10",
    "27.0.0-next.11",
    "27.0.0",
    "27.0.1",
    "27.0.2",
    "27.0.3",
    "27.0.4",
    "27.0.5",
    "27.0.6",
    "27.1.0",
    "27.1.1",
    "27.2.0",
    "27.2.1",
    "27.2.2",
    "27.2.3",
    "27.2.4",
    "27.2.5",
    "27.3.0",
    "27.3.1",
    "27.4.0",
    "27.4.1",
    "27.4.2",
    "27.4.3"
  ],
  "maintainers": [
    "scotthovestadt <[email protected]>",
    "zpao <[email protected]>",
    "rubennorte <[email protected]>",
    "simenb <[email protected]>",
    "fb <[email protected]>",
    "aaronabramov <[email protected]>",
    "davidzilburg <[email protected]>"
  ],
  "time": {
    "modified": "2021-12-01T14:00:40.107Z",
    "created": "2012-02-22T15:25:44.365Z",
    "0.0.6": "2012-02-22T15:25:48.298Z",
    "0.0.7": "2012-03-05T14:08:50.290Z",
    "0.0.61": "2012-03-05T14:09:32.944Z",
    "0.0.71": "2012-03-07T14:01:15.473Z",
    "0.0.72": "2012-03-08T11:04:39.879Z",
    "0.0.73": "2012-03-08T15:40:52.200Z",
    "0.0.74": "2012-03-15T17:25:18.724Z",
    "0.0.75": "2012-03-19T10:33:00.155Z",
    "0.0.80": "2012-03-22T16:42:05.870Z",
    "0.0.81": "2012-03-22T18:02:18.604Z",
    "0.0.76": "2012-04-01T09:48:46.453Z",
    "0.0.78": "2012-04-15T10:44:49.336Z",
    "0.0.79": "2012-04-19T08:50:17.838Z",
    "0.0.82": "2012-04-19T17:01:48.507Z",
    "0.0.83": "2012-04-24T14:37:55.734Z",
    "0.0.84": "2012-04-30T09:40:36.071Z",
    "0.0.85": "2012-04-30T12:25:06.671Z",
    "0.0.86": "2012-04-30T13:44:26.210Z",
    "0.0.87": "2012-04-30T14:03:21.216Z",
    "0.0.88": "2012-05-01T17:37:58.760Z",
    "0.0.89": "2012-05-03T16:38:37.939Z",
    "0.0.90": "2012-05-06T09:41:37.550Z",
    "0.0.91": "2012-05-06T09:45:49.043Z",
    "0.0.92": "2012-05-08T10:01:22.385Z",
    "0.0.93": "2012-05-08T15:24:13.061Z",
    "0.0.94": "2012-05-08T18:53:45.946Z",
    "0.0.95": "2012-05-09T12:23:17.895Z",
    "0.0.96": "2012-05-10T11:57:08.499Z",
    "0.0.97": "2012-05-21T15:09:23.909Z",
    "0.0.98": "2012-06-04T13:27:18.307Z",
    "0.0.99": "2012-06-13T10:31:41.127Z",
    "0.1.0": "2012-07-04T13:46:58.896Z",
    "0.1.1": "2012-07-15T08:44:20.842Z",
    "0.1.2": "2012-07-17T08:38:38.181Z",
    "0.1.21": "2012-08-01T14:49:14.386Z",
    "0.1.22": "2012-08-02T13:15:21.985Z",
    "0.1.30": "2012-08-12T17:02:46.621Z",
    "0.1.31": "2012-08-16T12:29:09.086Z",
    "0.1.32": "2012-11-05T10:29:21.805Z",
    "0.1.33": "2013-01-30T07:58:35.137Z",
    "0.1.34": "2013-03-10T17:19:16.142Z",
    "0.1.35": "2013-05-26T08:36:10.513Z",
    "0.1.37": "2014-04-27T13:17:49.720Z",
    "0.1.39": "2015-03-10T12:32:30.132Z",
    "0.1.40": "2015-05-20T13:16:41.192Z",
    "12.1.0": "2016-05-20T18:43:25.262Z",
    "12.1.0-alpha1": "2016-05-20T18:47:27.150Z",
    "12.1.1": "2016-05-20T18:50:03.634Z",
    "12.1.1-alpha.2935e14d": "2016-06-17T05:33:15.282Z",
    "12.1.2-alpha.a482b15c": "2016-06-17T07:58:04.740Z",
    "12.1.2-alpha.6230044c": "2016-06-21T19:15:18.486Z",
    "12.1.3-alpha.6230044c": "2016-06-21T20:11:51.842Z",
    "12.1.4-alpha.a737c6e5": "2016-06-22T03:36:43.586Z",
    "12.1.5-alpha.b5322422": "2016-06-22T06:45:52.795Z",
    "13.0.0": "2016-06-22T20:18:17.045Z",
    "13.1.0": "2016-07-05T05:39:27.541Z",
    "13.1.1": "2016-07-06T09:11:55.647Z",
    "13.1.2": "2016-07-07T00:39:34.394Z",
    "13.1.3": "2016-07-07T01:06:32.900Z",
    "13.2.0": "2016-07-07T01:15:24.222Z",
    "13.2.1": "2016-07-07T01:59:35.894Z",
    "13.2.2": "2016-07-07T02:13:01.264Z",
    "13.2.3": "2016-07-07T06:39:40.102Z",
    "13.3.0-alpha.a44f195f": "2016-07-11T09:56:50.550Z",
    "13.3.0-alpha.4eb0c908": "2016-07-11T10:04:34.581Z",
    "13.2.3-alpha.ffc7404b": "2016-07-11T10:20:02.094Z",
    "13.3.0-alpha.ffc7404b": "2016-07-11T10:20:10.346Z",
    "13.3.0-alpha.8b48d59e": "2016-07-13T06:14:08.220Z",
    "13.3.0-alpha.g8b48d59": "2016-07-13T06:39:38.568Z",
    "13.4.0-alpha.d2632006": "2016-07-27T08:57:11.169Z",
    "14.0.0": "2016-07-27T09:14:40.136Z",
    "14.0.1": "2016-07-29T09:35:39.446Z",
    "14.1.0": "2016-08-01T10:26:31.309Z",
    "14.2.0-alpha.ca8bfb6e": "2016-08-15T18:54:35.461Z",
    "14.2.1-alpha.e21d71a4": "2016-08-16T21:18:35.693Z",
    "14.2.2-alpha.22bd3c33": "2016-08-16T22:54:51.484Z",
    "14.3.0-alpha.d13c163e": "2016-08-18T20:35:25.898Z",
    "14.3.1-alpha.410cb91a": "2016-08-30T21:52:08.566Z",
    "14.3.2-alpha.83c25417": "2016-08-31T18:50:36.401Z",
    "15.0.0": "2016-08-31T18:55:30.286Z",
    "15.0.1": "2016-09-01T01:00:46.325Z",
    "15.0.2": "2016-09-01T02:10:01.519Z",
    "15.1.0": "2016-09-01T16:27:39.446Z",
    "15.1.1": "2016-09-02T11:08:52.421Z",
    "15.2.0-alpha.c681f819": "2016-09-29T09:02:18.389Z",
    "16.0.0": "2016-10-03T08:38:28.092Z",
    "16.0.1": "2016-10-05T01:54:21.847Z",
    "16.0.2": "2016-10-20T08:17:41.299Z",
    "16.1.0-alpha.691b0e22": "2016-10-28T07:27:30.517Z",
    "17.0.0": "2016-11-08T14:12:21.964Z",
    "17.0.1": "2016-11-14T06:07:26.865Z",
    "17.0.2": "2016-11-15T00:39:19.521Z",
    "17.0.3": "2016-11-17T07:41:13.222Z",
    "18.0.0": "2016-12-15T11:24:24.818Z",
    "18.1.0": "2016-12-29T01:47:35.567Z",
    "18.5.0-alpha.7da3df39": "2017-02-17T16:57:56.007Z",
    "19.0.0": "2017-02-21T09:30:32.328Z",
    "19.0.1": "2017-02-22T11:01:48.948Z",
    "19.0.2": "2017-02-23T11:36:32.617Z",
    "19.1.0-alpha.eed82034": "2017-03-17T00:41:59.357Z",
    "19.2.0-alpha.993e64af": "2017-05-04T15:39:06.831Z",
    "19.3.0-alpha.85402254": "2017-05-05T11:48:55.854Z",
    "20.0.0": "2017-05-06T12:34:57.419Z",
    "20.0.1": "2017-05-11T10:50:46.256Z",
    "20.0.2": "2017-05-17T10:51:05.595Z",
    "20.0.3": "2017-05-17T10:57:51.655Z",
    "20.0.4": "2017-05-24T14:13:47.584Z",
    "20.1.0-alpha.1": "2017-06-28T10:16:53.459Z",
    "20.1.0-alpha.2": "2017-06-29T16:37:19.999Z",
    "20.1.0-alpha.3": "2017-06-30T14:21:27.239Z",
    "20.1.0-beta.1": "2017-07-13T10:34:17.036Z",
    "20.1.0-chi.1": "2017-07-14T10:25:44.034Z",
    "20.1.0-delta.1": "2017-07-18T08:47:30.689Z",
    "20.1.0-delta.2": "2017-07-19T12:57:18.531Z",
    "20.1.0-delta.3": "2017-07-25T22:12:41.678Z",
    "20.1.0-delta.4": "2017-07-27T17:19:26.780Z",
    "20.1.0-delta.5": "2017-08-01T16:33:48.973Z",
    "20.1.0-echo.1": "2017-08-08T16:50:38.900Z",
    "21.0.0-alpha.1": "2017-08-11T10:14:43.630Z",
    "21.0.0-alpha.2": "2017-08-21T22:07:02.070Z",
    "21.0.0-beta.1": "2017-08-24T21:27:54.500Z",
    "21.0.0": "2017-09-04T15:02:31.494Z",
    "21.0.1": "2017-09-04T17:12:17.183Z",
    "21.0.2": "2017-09-08T14:20:31.002Z",
    "21.1.0": "2017-09-14T01:50:47.038Z",
    "21.2.0": "2017-09-26T20:22:56.843Z",
    "21.2.1": "2017-09-27T22:15:39.768Z",
    "21.3.0-alpha.1e3ee68e": "2017-09-28T14:21:27.511Z",
    "21.3.0-alpha.eff7a1cf": "2017-10-01T16:47:35.145Z",
    "21.3.0-beta.1": "2017-10-04T10:49:20.941Z",
    "21.3.0-beta.2": "2017-10-13T09:54:53.483Z",
    "21.3.0-beta.3": "2017-10-25T19:34:50.952Z",
    "21.3.0-beta.4": "2017-10-26T13:27:44.546Z",
    "21.3.0-beta.5": "2017-11-02T13:18:17.055Z",
    "21.3.0-beta.6": "2017-11-03T16:22:25.162Z",
    "21.3.0-beta.7": "2017-11-06T09:40:27.719Z",
    "21.3.0-beta.8": "2017-11-07T17:45:00.276Z",
    "21.3.0-beta.9": "2017-11-22T13:18:21.947Z",
    "21.3.0-beta.10": "2017-11-25T12:40:09.119Z",
    "21.3.0-beta.11": "2017-11-29T14:32:00.725Z",
    "21.3.0-beta.12": "2017-12-05T18:49:15.594Z",
    "21.3.0-beta.13": "2017-12-06T14:38:18.757Z",
    "21.3.0-beta.14": "2017-12-12T10:53:17.580Z",
    "21.3.0-beta.15": "2017-12-15T13:28:17.775Z",
    "22.0.0": "2017-12-18T11:04:01.619Z",
    "22.0.1": "2017-12-18T20:30:05.633Z",
    "22.0.2": "2017-12-19T13:53:42.483Z",
    "22.0.3": "2017-12-19T14:59:39.422Z",
    "22.0.4": "2017-12-22T10:47:43.527Z",
    "22.0.5": "2018-01-09T15:10:26.603Z",
    "22.0.6": "2018-01-11T09:47:23.371Z",
    "22.1.0": "2018-01-15T11:58:15.415Z",
    "22.1.1": "2018-01-15T13:59:49.515Z",
    "22.1.2": "2018-01-17T12:57:59.978Z",
    "22.1.3": "2018-01-18T17:32:42.163Z",
    "22.1.4": "2018-01-19T14:38:46.220Z",
    "22.2.0": "2018-02-07T10:27:09.753Z",
    "22.2.1": "2018-02-07T13:52:25.959Z",
    "22.2.2": "2018-02-09T16:28:43.221Z",
    "22.3.0": "2018-02-13T18:35:41.499Z",
    "22.4.0": "2018-02-20T12:04:10.228Z",
    "22.4.1": "2018-02-22T21:29:28.520Z",
    "22.4.2": "2018-02-22T23:29:53.339Z",
    "23.0.0-alpha.0": "2018-03-15T14:56:09.202Z",
    "23.0.0-alpha.1": "2018-03-21T16:00:46.551Z",
    "22.4.3": "2018-03-21T16:09:41.341Z",
    "23.0.0-alpha.2": "2018-03-26T10:41:19.444Z",
    "23.0.0-alpha.4": "2018-03-26T12:32:33.433Z",
    "23.0.0-alpha.5": "2018-04-10T19:18:44.581Z",
    "23.0.0-alpha.5r": "2018-04-11T05:53:20.991Z",
    "23.0.0-alpha.6r": "2018-04-12T07:02:00.470Z",
    "23.0.0-alpha.7": "2018-04-17T18:56:57.421Z",
    "23.0.0-beta.0": "2018-04-20T10:12:43.435Z",
    "23.0.0-beta.1": "2018-04-21T15:45:33.812Z",
    "23.0.0-beta.2": "2018-04-26T21:19:47.882Z",
    "23.0.0-alpha.3r": "2018-04-30T13:11:32.046Z",
    "23.0.0-beta.3r": "2018-04-30T13:16:15.311Z",
    "23.0.0-charlie.0": "2018-05-02T10:58:42.949Z",
    "23.0.0-charlie.1": "2018-05-03T12:12:03.349Z",
    "23.0.0-charlie.2": "2018-05-15T09:53:04.222Z",
    "22.4.4": "2018-05-18T12:59:36.080Z",
    "23.0.0-charlie.3": "2018-05-22T15:00:52.683Z",
    "23.0.0-charlie.4": "2018-05-23T10:43:37.979Z",
    "23.0.0": "2018-05-24T17:27:46.042Z",
    "23.0.1": "2018-05-27T15:32:05.640Z",
    "23.1.0": "2018-05-30T18:06:24.784Z",
    "23.2.0": "2018-06-25T14:05:41.783Z",
    "23.3.0": "2018-07-04T12:23:05.972Z",
    "23.4.0": "2018-07-10T15:52:42.819Z",
    "23.4.1": "2018-07-13T16:05:23.785Z",
    "23.4.2": "2018-07-27T22:40:02.841Z",
    "23.5.0": "2018-08-10T13:52:58.379Z",
    "23.6.0": "2018-09-10T12:43:59.550Z",
    "24.0.0-alpha.0": "2018-10-19T12:19:16.638Z",
    "24.0.0-alpha.1": "2018-10-22T15:39:53.500Z",
    "24.0.0-alpha.2": "2018-10-25T10:50:57.282Z",
    "24.0.0-alpha.3": "2018-10-26T16:17:38.471Z",
    "24.0.0-alpha.4": "2018-10-26T16:36:13.212Z",
    "24.0.0-alpha.5": "2018-11-09T13:18:17.307Z",
    "24.0.0-alpha.6": "2018-11-09T17:51:41.680Z",
    "24.0.0-alpha.7": "2018-12-11T16:19:20.113Z",
    "24.0.0-alpha.8": "2018-12-13T19:48:40.292Z",
    "24.0.0-alpha.9": "2018-12-19T14:25:54.337Z",
    "24.0.0-alpha.10": "2019-01-09T17:04:24.933Z",
    "24.0.0-alpha.11": "2019-01-10T18:35:02.615Z",
    "24.0.0-alpha.12": "2019-01-11T15:01:13.202Z",
    "24.0.0-alpha.13": "2019-01-23T15:16:19.187Z",
    "24.0.0-alpha.14": "2019-01-24T16:29:53.862Z",
    "24.0.0-alpha.15": "2019-01-24T17:57:43.120Z",
    "24.0.0-alpha.16": "2019-01-25T13:42:49.101Z",
    "24.0.0": "2019-01-25T15:05:45.686Z",
    "24.1.0": "2019-02-05T15:07:12.977Z",
    "24.2.0-alpha.0": "2019-03-05T15:04:47.962Z",
    "24.3.0": "2019-03-07T13:00:29.974Z",
    "24.3.1": "2019-03-07T23:13:08.750Z",
    "24.4.0": "2019-03-11T14:58:34.124Z",
    "24.5.0": "2019-03-12T16:49:16.486Z",
    "24.6.0": "2019-04-01T22:27:11.818Z",
    "24.7.0": "2019-04-03T03:56:04.808Z",
    "24.7.1": "2019-04-04T01:19:20.466Z",
    "24.8.0": "2019-05-05T02:03:02.794Z",
    "24.9.0": "2019-08-16T06:19:42.975Z",
    "25.0.0": "2019-08-22T03:24:58.504Z",
    "25.1.0": "2020-01-22T01:16:45.990Z",
    "25.2.0-alpha.86": "2020-03-25T17:17:19.507Z",
    "25.2.0": "2020-03-25T17:59:11.165Z",
    "25.2.1-alpha.1": "2020-03-26T07:55:11.210Z",
    "25.2.1-alpha.2": "2020-03-26T08:11:27.208Z",
    "25.2.1": "2020-03-26T09:02:06.614Z",
    "25.2.2": "2020-03-26T15:56:22.023Z",
    "25.2.3": "2020-03-26T20:25:40.775Z",
    "25.2.4": "2020-03-29T19:39:13.030Z",
    "25.2.6": "2020-04-02T10:30:09.589Z",
    "25.2.7": "2020-04-03T07:51:40.872Z",
    "25.3.0": "2020-04-08T13:22:14.453Z",
    "25.4.0": "2020-04-19T21:51:11.626Z",
    "25.5.0": "2020-04-28T19:46:07.782Z",
    "25.5.1": "2020-04-29T10:55:33.477Z",
    "25.5.2": "2020-04-29T21:50:33.807Z",
    "25.5.3": "2020-04-30T22:13:44.365Z",
    "25.5.4": "2020-05-02T08:17:00.955Z",
    "26.0.0-alpha.0": "2020-05-02T12:13:47.787Z",
    "26.0.0-alpha.1": "2020-05-03T18:48:54.676Z",
    "26.0.0-alpha.2": "2020-05-04T16:06:17.241Z",
    "26.0.0": "2020-05-04T17:54:11.941Z",
    "26.0.1-alpha.0": "2020-05-04T22:16:37.188Z",
    "26.0.1": "2020-05-05T10:41:51.741Z",
    "26.1.0": "2020-06-23T15:16:03.909Z",
    "26.2.0": "2020-07-30T10:12:29.004Z",
    "26.2.1": "2020-07-30T11:36:08.679Z",
    "26.2.2": "2020-07-31T10:54:20.475Z",
    "26.3.0": "2020-08-10T11:32:36.432Z",
    "26.4.0": "2020-08-12T21:01:02.102Z",
    "26.4.1": "2020-08-20T08:32:04.216Z",
    "26.4.2": "2020-08-22T12:10:36.482Z",
    "26.5.0": "2020-10-05T09:28:58.666Z",
    "26.5.2": "2020-10-06T10:53:32.759Z",
    "26.5.3": "2020-10-11T17:49:44.828Z",
    "26.6.0": "2020-10-19T11:59:42.665Z",
    "26.6.1": "2020-10-23T09:07:30.040Z",
    "26.6.2": "2020-11-02T12:52:15.597Z",
    "26.6.3": "2020-11-04T06:18:16.883Z",
    "27.0.0-next.0": "2020-12-05T17:26:07.559Z",
    "27.0.0-next.1": "2020-12-07T12:44:14.350Z",
    "27.0.0-next.2": "2020-12-07T14:36:25.188Z",
    "27.0.0-next.3": "2021-02-18T22:10:48.863Z",
    "27.0.0-next.4": "2021-03-08T13:46:02.794Z",
    "27.0.0-next.5": "2021-03-15T13:04:23.354Z",
    "27.0.0-next.6": "2021-03-25T19:40:50.781Z",
    "27.0.0-next.7": "2021-04-02T13:48:43.145Z",
    "27.0.0-next.8": "2021-04-12T22:43:09.113Z",
    "27.0.0-next.9": "2021-05-04T06:25:51.991Z",
    "27.0.0-next.10": "2021-05-20T14:12:16.249Z",
    "27.0.0-next.11": "2021-05-20T22:29:30.793Z",
    "27.0.0": "2021-05-25T08:16:14.300Z",
    "27.0.1": "2021-05-25T10:07:16.246Z",
    "27.0.2": "2021-05-29T12:08:19.844Z",
    "27.0.3": "2021-05-29T17:48:11.901Z",
    "27.0.4": "2021-06-03T08:29:33.293Z",
    "27.0.5": "2021-06-22T11:11:16.064Z",
    "27.0.6": "2021-06-28T17:06:18.626Z",
    "27.1.0": "2021-08-27T10:00:15.661Z",
    "27.1.1": "2021-09-08T10:12:48.395Z",
    "27.2.0": "2021-09-13T08:07:22.287Z",
    "27.2.1": "2021-09-20T13:28:10.743Z",
    "27.2.2": "2021-09-25T13:35:22.376Z",
    "27.2.3": "2021-09-28T10:11:37.351Z",
    "27.2.4": "2021-09-29T14:05:12.963Z",
    "27.2.5": "2021-10-08T13:39:37.552Z",
    "27.3.0": "2021-10-17T18:34:59.202Z",
    "27.3.1": "2021-10-19T06:57:45.690Z",
    "27.4.0": "2021-11-29T13:38:13.036Z",
    "27.4.1": "2021-11-30T08:37:42.792Z",
    "27.4.2": "2021-11-30T11:54:27.408Z",
    "27.4.3": "2021-12-01T14:00:38.290Z"
  },
  "repository": {
    "type": "git",
    "url": "git+https://github.com/facebook/jest.git"
  },
  "users": {
    "fgribreau": true,
    "knoja4": true,
    "barbarosh": true,
    "nmccready": true,
    "panlw": true,
    "srikanth_loxa": true,
    "fabrianibrahim": true,
    "filipdanic": true,
    "mauriciolauffer": true,
    "isa424": true,
    "drewigg": true,
    "shanewholloway": true,
    "chrisakakay": true,
    "josokinas": true,
    "chinawolf_wyp": true,
    "guioconnor": true,
    "nilz3ro": true,
    "ridermansb": true,
    "poslinskinet": true,
    "ferchoriverar": true,
    "rubiadias": true,
    "blittle": true,
    "mattyboy": true,
    "shentengtu": true,
    "l3au": true,
    "michalskuza": true,
    "jamesbedont": true,
    "xtx1130": true,
    "manojkhannakm": true,
    "rdca84": true,
    "phixed": true,
    "phixid": true,
    "whathejoe": true,
    "daniellink": true,
    "moontahoe": true,
    "carlosvillademor": true,
    "abuelwafa": true,
    "leizongmin": true,
    "khai96_": true,
    "dwqs": true,
    "yeming": true,
    "cranndarach": true,
    "456wyc": true,
    "leonardorb": true,
    "kkho595": true,
    "kodekracker": true,
    "sayrilamar": true,
    "mrzmmr": true,
    "tztz": true,
    "sternelee": true,
    "tjfwalker": true,
    "icodeforcookies": true,
    "dbendy": true,
    "rahulraghavankklm": true,
    "danarthurgallagher": true,
    "tdmalone": true,
    "h1gdev": true,
    "jream": true,
    "danielheene": true,
    "harutsos": true,
    "iainhallam": true,
    "brandons42": true,
    "yinfxs": true,
    "sshrike": true,
    "cfleschhut": true,
    "eyson": true,
    "deneboulton": true,
    "hridoyryan": true,
    "migkjy": true,
    "severen": true,
    "pubudud": true,
    "mdedirudianto": true,
    "snazzah": true,
    "udaygowda": true,
    "salvationz": true,
    "tomgao365": true,
    "alexdreptu": true,
    "mhat": true,
    "natterstefan": true,
    "iamninad": true,
    "logol": true,
    "devtosystems": true,
    "amiziara": true,
    "angrynut": true,
    "jwv": true,
    "wlritchie33": true,
    "fearnbuster": true,
    "ltiveron": true,
    "raciat": true,
    "juanf03": true,
    "ayan4m1": true,
    "nbur4556": true,
    "aim97": true,
    "bcowgi11": true,
    "abhutch": true
  },
  "readmeFilename": "README.md",
  "homepage": "https://jestjs.io/",
  "license": "MIT",
  "keywords": [
    "ava",
    "babel",
    "coverage",
    "easy",
    "expect",
    "facebook",
    "immersive",
    "instant",
    "jasmine",
    "jest",
    "jsdom",
    "mocha",
    "mocking",
    "painless",
    "qunit",
    "runner",
    "sandboxed",
    "snapshot",
    "tap",
    "tape",
    "test",
    "testing",
    "typescript",
    "watch"
  ],
  "bugs": {
    "url": "https://github.com/facebook/jest/issues"
  },
  "_cached": true,
  "_contentLength": 0,
  "version": "27.4.3",
  "main": "./build/jest.js",
  "types": "./build/jest.d.ts",
  "exports": {
    ".": {
      "types": "./build/jest.d.ts",
      "default": "./build/jest.js"
    },
    "./package.json": "./package.json",
    "./bin/jest": "./bin/jest.js"
  },
  "dependencies": {
    "@jest/core": "^27.4.3",
    "import-local": "^3.0.2",
    "jest-cli": "^27.4.3"
  },
  "peerDependencies": {
    "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0"
  },
  "peerDependenciesMeta": {
    "node-notifier": {
      "optional": true
    }
  },
  "bin": {
    "jest": "bin/jest.js"
  },
  "engines": {
    "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0"
  },
  "publishConfig": {
    "access": "public"
  },
  "gitHead": "6b4fcbc13712d56d95dd245866e923ffae78a187",
  "_nodeVersion": "16.13.0",
  "_npmVersion": "lerna/4.0.0/[email protected]+x64 (darwin)",
  "dist": {
    "integrity": "sha512-jwsfVABBzuN3Atm+6h6vIEpTs9+VApODLt4dk2qv1WMOpb1weI1IIZfuwpMiWZ62qvWj78MvdvMHIYdUfqrFaA==",
    "shasum": "cf7d1876a84c70efece2e01e4f9dfc2e464d9cbb",
    "tarball": "https://registry.npmjs.org/jest/-/jest-27.4.3.tgz",
    "fileCount": 6,
    "unpackedSize": 4740,
    "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhp4AGCRA9TVsSAnZWagAAOr4P/i9ej8dB48nfN600xAQ4\nsWVs0kYsiQW3giJt+mjdaMwSybfe4zZDKimteSu0277KZyAmMWY4dX150x4I\nhLTm8qNoy0SkWOZklcS1pvPYyzpC3VkOi9qdJ+ZMeyZBcnnReTOQ4SDbg5n1\ngY6rFo4TZY9SMYmuK0WAxsdR2G8tMVqhuvYjm/zh1qTI+t6UMlllqPgicBZs\naeA1sZxbFDxb/VgCpbQKJuHofo2IzqPANdi9LHWIBO0WTcvQeWgTDWIuEKCh\ng/o16LVzB/MjIsjenPRwN4RRZ7X+xemF02AmktQM5gQTLLo+1a7KpznY1vQg\nI/gyR1lG5g5xS9aHF8Ld1nAqk9KFH5D8YukbKWHZjskAPEeGQ17qQHeduZHZ\nVjl4CjPGwahPxoJGjQqIL6WJQIZUVvrxhU/rl+lslphxSyGQNmkw+XteUA5H\n8HevEbBCzW4DV7v2OTq9W0IWPywA3bwRVhTi07sdhkrR5YL6E8JZUpeLpk4b\n0Ncs7ds1JDY9GXKdZaXT7+1uBvudqho2bkQeJYgmFFuWFgqStAc3ZclzsOcg\ndlM0qD2ZuGs3E95f5Vb0LwTLFK5ll6JDo6J27kmKUqz7MR0UtWjOCvZC4s7y\nc0Y+3/te92m/7dgTaz/wlMegNgr37gu/L+SzViOpZqeDLWDdQb5gYoplbs/2\nCSh+\r\n=5aBf\r\n-----END PGP SIGNATURE-----\r\n"
  },
  "_npmUser": "simenb <[email protected]>",
  "directories": {},
  "_npmOperationalInternal": {
    "host": "s3://npm-registry-packages",
    "tmp": "tmp/jest_27.4.3_1638367238118_0.41267358601754545"
  },
  "_hasShrinkwrap": false
}

For 2. the algorithm checks trees but isn't recursing so it will only detect directories containing the word test in the root directory of the repository.

@helio-frota
Copy link
Member

For 1. yeah there is no guarantee that the result will be the expected:

npm show @openapitools/openapi-generator-cli scripts
{ postinstall: 'opencollective || exit 0' }
~/code took 2s npm show jest scripts
~/code npm show opossum scripts
{
  prepare: 'husky install',
  prebuild: 'npm run pretest',
  build: './test/browser/generate-index.sh && npm run build:browser && npm run build:docs',
  'build:browser': 'webpack --config=config/webpack.config.js',
  'build:docs': 'npm run build:docs:html && npm run build:docs:markdown',
  'build:docs:html': 'documentation build index.js -f html -o docs --config documentation.yml',
  'build:docs:markdown': 'documentation build index.js -f md -o docs/opossum.md',
  pretest: 'eslint --ignore-path .gitignore .',
  test: 'nyc tape test/*.js | tap-spec',
  'test:headless': 'node test/browser/webpack-test.js',
  'test:browser': 'opener http://localhost:9007/test/browser/index.html && serve . -p 9007',
  ci: 'npm run build && npm run test && npm run test:headless',
  lint: 'standardx test/*.js index.js lib/*.js test/*/*.js',
  clean: 'rm -rf node_modules dist/*.js test/browser/webpack-test.js',
  prepublishOnly: 'npm run build'
}

@richardlau
Copy link
Contributor

Ah, for 1. and jest the issue may be because it's a mono-repo... I believe npm show --json jest is more aligned with
https://github.com/facebook/jest/blob/main/packages/jest/package.json rather than https://github.com/facebook/jest/blob/main/package.json

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

3 participants