diff --git a/lib/manager/npm/lookup/index.js b/lib/manager/npm/lookup/index.js index 1772a5cf6e0ab29dc3c9db2a26b47055f7256827..2a7ec42b153ed2d3c76172b4c6411b8ced89a410 100644 --- a/lib/manager/npm/lookup/index.js +++ b/lib/manager/npm/lookup/index.js @@ -116,13 +116,6 @@ async function lookupUpdates(config) { if (!(repositoryUrl && repositoryUrl.length)) { repositoryUrl = null; } - if (!repositoryUrl && depName.startsWith('@types/')) { - logger.debug('Setting @types url manually'); - repositoryUrl = `https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/${depName.replace( - '@', - '' - )}`; - } return updates .concat(Object.values(buckets)) .map(update => ({ ...update, repositoryUrl })); diff --git a/test/_fixtures/npm/types_openjscad.json b/test/_fixtures/npm/types_openjscad.json deleted file mode 100644 index bf631c6fee3bc248c023c928cefce1ff9c209315..0000000000000000000000000000000000000000 --- a/test/_fixtures/npm/types_openjscad.json +++ /dev/null @@ -1 +0,0 @@ -{"_id":"@types/openjscad","_rev":"69-8d82df1bdbbae2da4a210a219a5f4f71","name":"@types/openjscad","description":"TypeScript definitions for OpenJsCad.js","dist-tags":{"latest":"0.0.28","ts2.0":"0.0.28","ts2.1":"0.0.28","ts2.2":"0.0.28","ts2.3":"0.0.28","ts2.4":"0.0.28","ts2.5":"0.0.28","ts2.6":"0.0.28","ts2.7":"0.0.28","ts2.8":"0.0.28","ts2.9":"0.0.28"},"versions":{"0.0.13-alpha":{"name":"@types/openjscad","version":"0.0.13-alpha","description":"Type definitions for OpenJsCad.js from https://www.github.com/DefinitelyTyped/DefinitelyTyped","main":"","scripts":{},"author":{"name":"Dan Marshall","email":"https://github.com/danmarshall"},"license":"MIT","typings":"index.d.ts","dependencies":{},"_id":"@types/openjscad@0.0.13-alpha","_shasum":"71209a849eaa443188ed7e47dc5dfb0bac47a24c","_from":"output\\openjscad","_resolved":"file:output\\openjscad","_npmVersion":"3.8.2","_nodeVersion":"5.5.0","_npmUser":{"name":"types","email":"ryan.cavanaugh@microsoft.com"},"dist":{"shasum":"71209a849eaa443188ed7e47dc5dfb0bac47a24c","tarball":"https://registry.npmjs.org/@types/openjscad/-/openjscad-0.0.13-alpha.tgz"},"maintainers":[{"name":"types","email":"ryan.cavanaugh@microsoft.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/openjscad-0.0.13-alpha.tgz_1463458768195_0.8691594256088138"},"directories":{}},"0.0.14-alpha":{"name":"@types/openjscad","version":"0.0.14-alpha","description":"Type definitions for OpenJsCad.js from https://www.github.com/DefinitelyTyped/DefinitelyTyped","main":"","scripts":{},"author":{"name":"Dan Marshall","email":"https://github.com/danmarshall"},"license":"MIT","typings":"index.d.ts","dependencies":{"@types/three":"*"},"_id":"@types/openjscad@0.0.14-alpha","_shasum":"d9496d52297e5f0ea360c4bd0166bae516c510f3","_from":"output\\openjscad","_resolved":"file:output\\openjscad","_npmVersion":"3.8.2","_nodeVersion":"5.5.0","_npmUser":{"name":"types","email":"ryan.cavanaugh@microsoft.com"},"dist":{"shasum":"d9496d52297e5f0ea360c4bd0166bae516c510f3","tarball":"https://registry.npmjs.org/@types/openjscad/-/openjscad-0.0.14-alpha.tgz"},"maintainers":[{"name":"types","email":"ryan.cavanaugh@microsoft.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/openjscad-0.0.14-alpha.tgz_1463688434273_0.7991926625836641"},"directories":{}},"0.0.19-alpha":{"name":"@types/openjscad","version":"0.0.19-alpha","description":"TypeScript definitions for OpenJsCad.js","main":"","scripts":{},"author":{"name":"Dan Marshall","email":"https://github.com/danmarshall"},"license":"MIT","typings":"index.d.ts","dependencies":{"@types/three":"*"},"_id":"@types/openjscad@0.0.19-alpha","_shasum":"912cddc52f97078429895e8a5b60c2ee1d1c5178","_from":"output\\openjscad","_resolved":"file:output\\openjscad","_npmVersion":"3.8.2","_nodeVersion":"5.5.0","_npmUser":{"name":"types","email":"ryan.cavanaugh@microsoft.com"},"dist":{"shasum":"912cddc52f97078429895e8a5b60c2ee1d1c5178","tarball":"https://registry.npmjs.org/@types/openjscad/-/openjscad-0.0.19-alpha.tgz"},"maintainers":[{"name":"types","email":"ryan.cavanaugh@microsoft.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/openjscad-0.0.19-alpha.tgz_1463771032566_0.6580510013736784"},"directories":{}},"0.0.20-alpha":{"name":"@types/openjscad","version":"0.0.20-alpha","description":"TypeScript definitions for OpenJsCad.js","main":"","scripts":{},"author":{"name":"Dan Marshall","email":"https://github.com/danmarshall"},"license":"MIT","typings":"index.d.ts","dependencies":{"@types/three":"*"},"_id":"@types/openjscad@0.0.20-alpha","_shasum":"10ff85f16c1dd05337129a4651143f920eb04684","_from":"output\\openjscad","_resolved":"file:output\\openjscad","_npmVersion":"3.8.2","_nodeVersion":"5.5.0","_npmUser":{"name":"types","email":"ryan.cavanaugh@microsoft.com"},"dist":{"shasum":"10ff85f16c1dd05337129a4651143f920eb04684","tarball":"https://registry.npmjs.org/@types/openjscad/-/openjscad-0.0.20-alpha.tgz"},"maintainers":[{"name":"types","email":"ryan.cavanaugh@microsoft.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/openjscad-0.0.20-alpha.tgz_1464150170340_0.7973788834642619"},"directories":{}},"0.0.21-alpha":{"name":"@types/openjscad","version":"0.0.21-alpha","description":"TypeScript definitions for OpenJsCad.js","main":"","scripts":{},"author":{"name":"Dan Marshall","email":"https://github.com/danmarshall"},"repository":{"type":"git","url":"https://www.github.com/DefinitelyTyped/DefinitelyTyped.git"},"license":"MIT","typings":"index.d.ts","dependencies":{"@types/three":"0.0.*"},"_id":"@types/openjscad@0.0.21-alpha","_shasum":"4ce14e3f105b9abca7f81543187bd995a8ec58f3","_from":"output\\openjscad","_resolved":"file:output\\openjscad","_npmVersion":"3.9.5","_nodeVersion":"6.2.2","_npmUser":{"name":"types","email":"ryan.cavanaugh@microsoft.com"},"dist":{"shasum":"4ce14e3f105b9abca7f81543187bd995a8ec58f3","tarball":"https://registry.npmjs.org/@types/openjscad/-/openjscad-0.0.21-alpha.tgz"},"maintainers":[{"name":"types","email":"ryan.cavanaugh@microsoft.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/openjscad-0.0.21-alpha.tgz_1467399112971_0.8807340662460774"},"directories":{}},"0.0.22-alpha":{"name":"@types/openjscad","version":"0.0.22-alpha","description":"TypeScript definitions for OpenJsCad.js","main":"","scripts":{},"author":{"name":"Dan Marshall","email":"https://github.com/danmarshall"},"repository":{"type":"git","url":"https://www.github.com/DefinitelyTyped/DefinitelyTyped.git"},"license":"MIT","typings":"index.d.ts","dependencies":{"@types/three":"0.0.12-alpha"},"_id":"@types/openjscad@0.0.22-alpha","_shasum":"1b9c6a96e1b09328df7fbef13bf1bb0538af8d70","_from":"output\\openjscad","_resolved":"file:output\\openjscad","_npmVersion":"3.7.2","_nodeVersion":"6.2.1","_npmUser":{"name":"types","email":"ryan.cavanaugh@microsoft.com"},"dist":{"shasum":"1b9c6a96e1b09328df7fbef13bf1bb0538af8d70","tarball":"https://registry.npmjs.org/@types/openjscad/-/openjscad-0.0.22-alpha.tgz"},"maintainers":[{"name":"types","email":"ryan.cavanaugh@microsoft.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/openjscad-0.0.22-alpha.tgz_1467410804353_0.5281224332284182"},"directories":{}},"0.0.23-alpha":{"name":"@types/openjscad","version":"0.0.23-alpha","description":"TypeScript definitions for OpenJsCad.js","main":"","scripts":{},"author":{"name":"Dan Marshall","email":"https://github.com/danmarshall"},"repository":{"type":"git","url":"https://www.github.com/DefinitelyTyped/DefinitelyTyped.git"},"license":"MIT","typings":"index.d.ts","dependencies":{"@types/three":"0.0.13-alpha"},"_id":"@types/openjscad@0.0.23-alpha","_shasum":"f0ec163b760b023ff93fd8dcf51c0239b90dab9f","_from":"output\\openjscad","_resolved":"file:output\\openjscad","_npmVersion":"3.7.2","_nodeVersion":"6.2.1","_npmUser":{"name":"types","email":"ryan.cavanaugh@microsoft.com"},"dist":{"shasum":"f0ec163b760b023ff93fd8dcf51c0239b90dab9f","tarball":"https://registry.npmjs.org/@types/openjscad/-/openjscad-0.0.23-alpha.tgz"},"maintainers":[{"name":"types","email":"ryan.cavanaugh@microsoft.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/openjscad-0.0.23-alpha.tgz_1467424394824_0.22429914772510529"},"directories":{}},"0.0.24-alpha":{"name":"@types/openjscad","version":"0.0.24-alpha","description":"TypeScript definitions for OpenJsCad.js","main":"","scripts":{},"author":{"name":"Dan Marshall","email":"https://github.com/danmarshall"},"repository":{"type":"git","url":"https://www.github.com/DefinitelyTyped/DefinitelyTyped.git"},"license":"MIT","typings":"index.d.ts","dependencies":{"@types/three":"0.0.15-alpha"},"_id":"@types/openjscad@0.0.24-alpha","_shasum":"8ffb7669c3626a725be27cd4c9f2ed81c8376cae","_from":"output\\openjscad","_resolved":"file:output\\openjscad","_npmVersion":"3.7.2","_nodeVersion":"6.2.1","_npmUser":{"name":"types","email":"ryan.cavanaugh@microsoft.com"},"dist":{"shasum":"8ffb7669c3626a725be27cd4c9f2ed81c8376cae","tarball":"https://registry.npmjs.org/@types/openjscad/-/openjscad-0.0.24-alpha.tgz"},"maintainers":[{"name":"types","email":"ryan.cavanaugh@microsoft.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/openjscad-0.0.24-alpha.tgz_1467589469041_0.9134134938940406"},"directories":{}},"0.0.25-alpha":{"name":"@types/openjscad","version":"0.0.25-alpha","description":"TypeScript definitions for OpenJsCad.js","main":"","scripts":{},"author":{"name":"Dan Marshall","email":"https://github.com/danmarshall"},"repository":{"type":"git","url":"https://www.github.com/DefinitelyTyped/DefinitelyTyped.git"},"license":"MIT","typings":"index.d.ts","dependencies":{"@types/three":"0.0.16-alpha"},"_id":"@types/openjscad@0.0.25-alpha","_shasum":"8072cbb2feb86c0e880b1eb37554d4cb4b69cac3","_from":"output\\openjscad","_resolved":"file:output\\openjscad","_npmVersion":"3.10.3","_nodeVersion":"6.3.0","_npmUser":{"name":"types","email":"ryan.cavanaugh@microsoft.com"},"dist":{"shasum":"8072cbb2feb86c0e880b1eb37554d4cb4b69cac3","tarball":"https://registry.npmjs.org/@types/openjscad/-/openjscad-0.0.25-alpha.tgz"},"maintainers":[{"name":"types","email":"ryan.cavanaugh@microsoft.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/openjscad-0.0.25-alpha.tgz_1468006070834_0.8805635226890445"},"directories":{}},"0.0.26":{"name":"@types/openjscad","version":"0.0.26","description":"TypeScript definitions for OpenJsCad.js","main":"","scripts":{},"author":{"name":"Dan Marshall","email":"https://github.com/danmarshall"},"repository":{"type":"git","url":"https://www.github.com/DefinitelyTyped/DefinitelyTyped.git"},"license":"MIT","typings":"index.d.ts","dependencies":{"@types/three":"0.0.*"},"_id":"@types/openjscad@0.0.26","_shasum":"555a5f5815fa92270862edcbc230c4c9cc79a649","_from":"output\\openjscad","_resolved":"file:output\\openjscad","_npmVersion":"3.10.3","_nodeVersion":"6.3.0","_npmUser":{"name":"types","email":"ts-npm-types@microsoft.com"},"dist":{"shasum":"555a5f5815fa92270862edcbc230c4c9cc79a649","tarball":"https://registry.npmjs.org/@types/openjscad/-/openjscad-0.0.26.tgz"},"maintainers":[{"name":"types","email":"ryan.cavanaugh@microsoft.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/openjscad-0.0.26.tgz_1468510659413_0.8564234843943268"},"directories":{}},"0.0.27":{"name":"@types/openjscad","version":"0.0.27","description":"TypeScript definitions for OpenJsCad.js","license":"MIT","author":"Dan Marshall <https://github.com/danmarshall>","main":"","repository":{"type":"git","url":"https://www.github.com/DefinitelyTyped/DefinitelyTyped.git"},"scripts":{},"dependencies":{"@types/three":"*"},"typings":"index.d.ts","typesPublisherContentHash":"422e95288642334ee7b782aaaa12836b5b93d06acde12f74be522aba17655a94","_id":"@types/openjscad@0.0.27","dist":{"shasum":"850f5d660a4a0928cb3db115c1462dbb7f7a7765","tarball":"https://registry.npmjs.org/@types/openjscad/-/openjscad-0.0.27.tgz"},"maintainers":[{"name":"types","email":"ryan.cavanaugh@microsoft.com"}],"_npmUser":{"name":"types","email":"ts-npm-types@microsoft.com"},"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/openjscad-0.0.27.tgz_1474307916579_0.2525224294513464"},"directories":{}},"0.0.28":{"name":"@types/openjscad","version":"0.0.28","description":"TypeScript definitions for OpenJsCad.js","license":"MIT","contributors":[{"name":"Dan Marshall","url":"https://github.com/danmarshall"}],"main":"","repository":{"type":"git","url":"https://www.github.com/DefinitelyTyped/DefinitelyTyped.git"},"scripts":{},"dependencies":{"@types/three":"*"},"peerDependencies":{},"typesPublisherContentHash":"6615714f802380316ae9d76a1f02435b3b91bdf22fb57b0607dd6c3168d3737d","typeScriptVersion":"2.0","_id":"@types/openjscad@0.0.28","dist":{"shasum":"5ccf3b5ea1ae2bda096f3685363992f6b6eb51d6","tarball":"https://registry.npmjs.org/@types/openjscad/-/openjscad-0.0.28.tgz"},"maintainers":[{"name":"types","email":"ryan.cavanaugh@microsoft.com"}],"_npmUser":{"name":"types","email":"ts-npm-types@microsoft.com"},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/openjscad-0.0.28.tgz_1492636853981_0.6924381812568754"},"directories":{}}},"readme":"# Installation\r\n> `npm install --save @types/openjscad`\r\n\r\n# Summary\r\nThis package contains type definitions for OpenJsCad.js (https://github.com/joostn/OpenJsCad).\r\n\r\n# Details\r\nFiles were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/openjscad\r\n\r\nAdditional Details\r\n * Last updated: Wed, 19 Apr 2017 21:19:05 GMT\r\n * Dependencies: three\r\n * Global values: CAG, CSG, CxG, OpenJsCad\r\n\r\n# Credits\r\nThese definitions were written by Dan Marshall <https://github.com/danmarshall>.\r\n","maintainers":[{"name":"types","email":"ts-npm-types@microsoft.com"}],"time":{"modified":"2018-05-18T00:12:37.576Z","created":"2016-05-17T04:19:31.703Z","0.0.13-alpha":"2016-05-17T04:19:31.703Z","0.0.14-alpha":"2016-05-19T20:07:14.886Z","0.0.19-alpha":"2016-05-20T19:03:52.962Z","0.0.20-alpha":"2016-05-25T04:22:50.790Z","0.0.21-alpha":"2016-07-01T18:51:56.731Z","0.0.22-alpha":"2016-07-01T22:06:46.787Z","0.0.23-alpha":"2016-07-02T01:53:15.406Z","0.0.24-alpha":"2016-07-03T23:44:32.395Z","0.0.25-alpha":"2016-07-08T19:27:53.431Z","0.0.26":"2016-07-14T15:37:42.117Z","0.0.27":"2016-09-19T17:58:39.530Z","0.0.28":"2017-04-19T21:20:54.202Z"},"license":"MIT","readmeFilename":"","repository":{"type":"git","url":"https://www.github.com/DefinitelyTyped/DefinitelyTyped.git"},"contributors":[{"name":"Dan Marshall","url":"https://github.com/danmarshall"}],"_attachments":{}} \ No newline at end of file diff --git a/test/manager/npm/__snapshots__/lookup.spec.js.snap b/test/manager/npm/__snapshots__/lookup.spec.js.snap index 34b963506373159b44fc646b2a63450318005446..dcd381aee5ceaf543ee097e60e802e4190859388 100644 --- a/test/manager/npm/__snapshots__/lookup.spec.js.snap +++ b/test/manager/npm/__snapshots__/lookup.spec.js.snap @@ -77,21 +77,6 @@ Array [ ] `; -exports[`manager/npm/lookup .lookupUpdates() massages @types 1`] = ` -Array [ - Object { - "fromVersion": "0.0.27", - "newVersion": "0.0.28", - "newVersionMajor": 0, - "newVersionMinor": 0, - "repositoryUrl": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/openjscad", - "toVersion": "0.0.28", - "type": "minor", - "unpublishable": false, - }, -] -`; - exports[`manager/npm/lookup .lookupUpdates() pins minor ranged versions 1`] = ` Array [ Object { diff --git a/test/manager/npm/lookup.spec.js b/test/manager/npm/lookup.spec.js index 8b0fc1c9f1e0aadec5a71e660577baec61dc0e6c..39fb48183dc9284a5235133ea8bc23b86e5601d5 100644 --- a/test/manager/npm/lookup.spec.js +++ b/test/manager/npm/lookup.spec.js @@ -7,8 +7,6 @@ const webpackJson = require('../../_fixtures/npm/webpack.json'); const nextJson = require('../../_fixtures/npm/next.json'); const vueJson = require('../../_fixtures/npm/vue.json'); const typescriptJson = require('../../_fixtures/npm/typescript.json'); -const typesJson = require('../../_fixtures/npm/types_openjscad.json'); -// const npmApi = require('../../../lib/datasource/npm'); qJson.latestVersion = '1.4.1'; @@ -724,14 +722,5 @@ describe('manager/npm/lookup', () => { .reply(200, qJson); expect(await lookup.lookupUpdates(config)).toMatchSnapshot(); }); - it('massages @types', async () => { - config.depName = '@types/openjscad'; - config.currentVersion = '0.0.27'; - config.depName = '@types/openjscad'; - nock('https://registry.npmjs.org') - .get('/@types%2Fopenjscad') - .reply(200, typesJson); - expect(await lookup.lookupUpdates(config)).toMatchSnapshot(); - }); }); });