diff --git a/jobs/create-group-version-branch.js b/jobs/create-group-version-branch.js index de50fa2c..0bee7ee3 100644 --- a/jobs/create-group-version-branch.js +++ b/jobs/create-group-version-branch.js @@ -362,7 +362,7 @@ module.exports = async function ( const dependencyLink = getFormattedDependencyURL({ repositoryURL: transforms[0].repoURL }) const license = versions[version].license - const licenseHasChanged = versions[oldVersionResolved].license !== license + const licenseHasChanged = oldVersionResolved ? versions[oldVersionResolved].license !== license : false const publisher = versions[version]['_npmUser'].name // maybe adapt PR body diff --git a/test/jobs/__snapshots__/create-group-version-branch.js.snap b/test/jobs/__snapshots__/create-group-version-branch.js.snap index 0f3a21d5..d46363c3 100644 --- a/test/jobs/__snapshots__/create-group-version-branch.js.snap +++ b/test/jobs/__snapshots__/create-group-version-branch.js.snap @@ -6,9 +6,9 @@ Object { "body": " ## There have been updates to the *pouchdb* monorepo: -- The \`dependency\` [pouchdb](https://www.npmjs.com/package/pouchdb) was updated from \`1.0.0\` to \`2.0.0\`. -- The \`dependency\` [pouchdb-adapter-utils](https://www.npmjs.com/package/pouchdb-adapter-utils) was updated from \`1.0.0\` to \`2.0.0\`. -- The \`devDependency\` [pouchdb-core](https://www.npmjs.com/package/pouchdb-core) was updated from \`1.0.0\` to \`2.0.0\`. +- The \`dependency\` [pouchdb](https://github.com/dep/dep) was updated from \`1.0.0\` to \`2.0.0\`. +- The \`dependency\` [pouchdb-adapter-utils](https://github.com/dep/dep) was updated from \`1.0.0\` to \`2.0.0\`. +- The \`devDependency\` [pouchdb-core](https://github.com/dep/dep) was updated from \`1.0.0\` to \`2.0.0\`. These versions are **not covered** by your **current version range**. @@ -18,7 +18,12 @@ This monorepo update includes releases of one or more dependencies which all bel --- -[Find out more about this release](). +publisher: finn + +license: MIT + +--- +[Find out more about this release](https://github.com/dep/dep).
FAQ and help @@ -43,7 +48,7 @@ Object { "body": " ## There have been updates to the *pouchdb* monorepo: -- The \`dependency\` [pouchdb](https://www.npmjs.com/package/pouchdb) was updated from \`1.0.0\` to \`2.0.0\`. +- The \`dependency\` [pouchdb](https://github.com/dep/dep) was updated from \`1.0.0\` to \`2.0.0\`. These versions are **not covered** by your **current version range**. @@ -53,7 +58,12 @@ This monorepo update includes releases of one or more dependencies which all bel --- -[Find out more about this release](). +publisher: finn + +license: MIT + +--- +[Find out more about this release](https://github.com/dep/dep).
FAQ and help @@ -78,9 +88,9 @@ Object { "body": " ## There have been updates to the *pouchdb* monorepo: -- The \`dependency\` [pouchdb](https://www.npmjs.com/package/pouchdb) was updated from \`1.0.0\` to \`2.0.0\`. -- The \`dependency\` [pouchdb-adapter-utils](https://www.npmjs.com/package/pouchdb-adapter-utils) was updated from \`1.0.0\` to \`2.0.0\`. -- The \`devDependency\` [pouchdb-browser](https://www.npmjs.com/package/pouchdb-browser) was updated from \`1.0.0\` to \`1.8.0\`. +- The \`dependency\` [pouchdb](https://github.com/dep/dep) was updated from \`1.0.0\` to \`2.0.0\`. +- The \`dependency\` [pouchdb-adapter-utils](https://github.com/dep/dep) was updated from \`1.0.0\` to \`2.0.0\`. +- The \`devDependency\` [pouchdb-browser](https://github.com/dep/dep) was updated from \`1.0.0\` to \`1.8.0\`. These versions are **not covered** by your **current version range**. @@ -90,7 +100,12 @@ This monorepo update includes releases of one or more dependencies which all bel --- -[Find out more about this release](). +publisher: finn + +license: MIT + +--- +[Find out more about this release](https://github.com/dep/dep).
FAQ and help @@ -115,7 +130,7 @@ Object { "body": " ## There have been updates to the *react* monorepo: -- The \`dependency\` [react](https://www.npmjs.com/package/react) was updated from \`1.0.0\` to \`2.0.0\`. +- The \`dependency\` [react](https://github.com/dep/dep) was updated from \`1.0.0\` to \`2.0.0\`. These versions are **not covered** by your **current version range**. @@ -125,7 +140,12 @@ This monorepo update includes releases of one or more dependencies which all bel --- -[Find out more about this release](). +publisher: finn + +license: MIT + +--- +[Find out more about this release](https://github.com/dep/dep).
FAQ and help @@ -150,7 +170,7 @@ Object { "body": " ## There have been updates to the *react* monorepo: -- The \`dependency\` [react](https://www.npmjs.com/package/react) was updated from \`1.0.0\` to \`2.0.0\`. +- The \`dependency\` [react](https://github.com/dep/dep) was updated from \`1.0.0\` to \`2.0.0\`. These versions are **not covered** by your **current version range**. @@ -160,7 +180,12 @@ This monorepo update includes releases of one or more dependencies which all bel --- -[Find out more about this release](). +publisher: finn + +license: MIT + +--- +[Find out more about this release](https://github.com/dep/dep).
FAQ and help @@ -186,7 +211,7 @@ Array [ `; exports[`create-group-version-branch no new pull request, but new comment on PR, 1 group, 2 packages, same dependencyType, old PR exists 1`] = ` -"- The \`dependency\` [react](https://www.npmjs.com/package/react) was updated from \`1.0.0\` to \`2.0.0\`. +"- The \`dependency\` [react](https://github.com/dep/dep) was updated from \`1.0.0\` to \`2.0.0\`. [Update to these versions instead 🚀](https://github.com/hans/monorepo/compare/master...hans:greenkeeper%2Fdefault%2Fmonorepo.react-20190330170013)" `; @@ -210,6 +235,11 @@ If you don’t accept this pull request, your project will work just like it did --- +publisher: finn + +license: MIT + +--- [Find out more about this release]().
diff --git a/test/jobs/__snapshots__/create-version-branch.js.snap b/test/jobs/__snapshots__/create-version-branch.js.snap index 6518ddaf..bf9b034b 100644 --- a/test/jobs/__snapshots__/create-version-branch.js.snap +++ b/test/jobs/__snapshots__/create-version-branch.js.snap @@ -27,6 +27,11 @@ This monorepo update includes releases of one or more dependencies which all bel --- +publisher: finn + +license: MIT + +--- [Find out more about this release](https://github.com/orgname/colors).
@@ -91,6 +96,11 @@ This monorepo update includes releases of one or more dependencies which all bel --- +publisher: finn + +license: MIT + +--- [Find out more about this release](https://github.com/orgname/flowers).
@@ -121,6 +131,11 @@ This monorepo update includes releases of one or more dependencies which all bel --- +publisher: finn + +license: MIT + +--- [Find out more about this release](https://github.com/orgname/colors).
@@ -153,6 +168,11 @@ This monorepo update includes releases of one or more dependencies which all bel --- +publisher: finn + +license: MIT + +--- [Find out more about this release](https://github.com/jest/jest).
@@ -180,6 +200,11 @@ If you don’t accept this pull request, your project will work just like it did --- +publisher: finn + +license: MIT + +--- [Find out more about this release](https://github.com/best/best).
@@ -205,6 +230,11 @@ If you don’t accept this pull request, your project will work just like it did --- +publisher: finn + +license: MIT + +--- [Find out more about this release](https://github.com/finnpauls/dep).
@@ -230,6 +260,11 @@ If you don’t accept this pull request, your project will work just like it did --- +publisher: finn + +license: MIT + +--- [Find out more about this release](https://github.com/finnpauls/dep).
@@ -255,6 +290,11 @@ If you don’t accept this pull request, your project will work just like it did --- +publisher: finn + +license: MIT + +--- [Find out more about this release](https://github.com/finnpauls/dep).
diff --git a/test/jobs/create-group-version-branch.js b/test/jobs/create-group-version-branch.js index b93669f1..b364144e 100644 --- a/test/jobs/create-group-version-branch.js +++ b/test/jobs/create-group-version-branch.js @@ -5,6 +5,18 @@ const removeIfExists = require('../helpers/remove-if-exists') nock.disableNetConnect() nock.enableNetConnect('localhost') +const versionInfos = { + 'repository': { + type: 'git', + url: 'git+https://github.com/dep/dep.git' + }, + 'license': 'MIT', + '_npmUser': { + name: 'finn', + email: 'finn.pauls@gmail.com' + } +} + describe('create-group-version-branch', async () => { beforeEach(() => { jest.resetModules() @@ -20,8 +32,8 @@ describe('create-group-version-branch', async () => { latest: '2.0.0' }, versions: { - '1.0.0': {}, - '2.0.0': {} + '1.0.0': versionInfos, + '2.0.0': versionInfos } }) await npm.put({ @@ -30,9 +42,9 @@ describe('create-group-version-branch', async () => { latest: '2.0.1' }, versions: { - '1.0.0': {}, - '2.0.0': {}, - '2.0.1': {} + '1.0.0': versionInfos, + '2.0.0': versionInfos, + '2.0.1': versionInfos } }) await npm.put({ @@ -41,8 +53,8 @@ describe('create-group-version-branch', async () => { latest: '2.0.0' }, versions: { - '1.0.0': {}, - '2.0.0': {} + '1.0.0': versionInfos, + '2.0.0': versionInfos } }) await npm.put({ @@ -51,8 +63,8 @@ describe('create-group-version-branch', async () => { latest: '2.0.0' }, versions: { - '1.0.0': {}, - '2.0.0': {} + '1.0.0': versionInfos, + '2.0.0': versionInfos } }) await npm.put({ @@ -61,8 +73,8 @@ describe('create-group-version-branch', async () => { latest: '2.0.0' }, versions: { - '1.0.0': {}, - '2.0.0': {} + '1.0.0': versionInfos, + '2.0.0': versionInfos } }) await npm.put({ @@ -71,8 +83,8 @@ describe('create-group-version-branch', async () => { latest: '1.8.0' }, versions: { - '1.0.0': {}, - '1.8.0': {} + '1.0.0': versionInfos, + '1.8.0': versionInfos } }) @@ -378,8 +390,8 @@ describe('create-group-version-branch', async () => { oldVersion: '^1.0.0', oldVersionResolved: '1.0.0', versions: { - '1.0.0': {}, - '2.0.0': {} + '1.0.0': versionInfos, + '2.0.0': versionInfos }, group: { 'default': { @@ -495,8 +507,8 @@ describe('create-group-version-branch', async () => { oldVersion: '^1.0.0', oldVersionResolved: '1.0.0', versions: { - '1.0.0': {}, - '2.0.0': {} + '1.0.0': versionInfos, + '2.0.0': versionInfos }, group: { 'default': { @@ -613,8 +625,8 @@ describe('create-group-version-branch', async () => { oldVersion: '^1.0.0', oldVersionResolved: '1.0.0', versions: { - '1.0.0': {}, - '2.0.0': {} + '1.0.0': versionInfos, + '2.0.0': versionInfos }, group: { 'backend': { @@ -673,8 +685,8 @@ describe('create-group-version-branch', async () => { oldVersion: '^1.0.0', oldVersionResolved: '1.0.0', versions: { - '1.0.0': {}, - '2.0.0': {} + '1.0.0': versionInfos, + '2.0.0': versionInfos }, group: { 'default': { @@ -757,8 +769,8 @@ describe('create-group-version-branch', async () => { oldVersion: '^1.0.0', oldVersionResolved: '1.0.0', versions: { - '1.0.0': {}, - '2.0.0-prerelease': {} + '1.0.0': versionInfos, + '2.0.0-prerelease': versionInfos }, group: { 'default': { @@ -860,8 +872,8 @@ describe('create-group-version-branch', async () => { oldVersion: '^1.0.0', oldVersionResolved: '1.0.0', versions: { - '1.0.0': {}, - '2.0.0': {} + '1.0.0': versionInfos, + '2.0.0': versionInfos }, group: { 'default': { @@ -963,9 +975,9 @@ describe('create-group-version-branch', async () => { oldVersion: '^1.0.0', oldVersionResolved: '1.0.0', versions: { - '1.0.0': {}, - '2.0.0': {}, - '2.0.1': {} + '1.0.0': versionInfos, + '2.0.0': versionInfos, + '2.0.1': versionInfos }, group: { 'default': { @@ -1112,8 +1124,8 @@ describe('create-group-version-branch', async () => { oldVersion: '^1.0.0', oldVersionResolved: '1.0.0', versions: { - '1.0.0': {}, - '2.0.0': {} + '1.0.0': versionInfos, + '2.0.0': versionInfos }, group: { 'default': { @@ -1295,8 +1307,8 @@ describe('create-group-version-branch', async () => { oldVersion: '^1.0.0', oldVersionResolved: '1.0.0', versions: { - '1.0.0': {}, - '2.0.0': {} + '1.0.0': versionInfos, + '2.0.0': versionInfos }, group: { 'default': { @@ -1417,8 +1429,8 @@ describe('create-group-version-branch', async () => { oldVersion: '^1.0.0', oldVersionResolved: '1.0.0', versions: { - '1.0.0': {}, - '2.0.0': {} + '1.0.0': versionInfos, + '2.0.0': versionInfos }, group: { 'default': { @@ -1615,8 +1627,8 @@ describe('create-group-version-branch with lockfiles', async () => { oldVersion: '^1.0.0', oldVersionResolved: '1.0.0', versions: { - '1.0.0': {}, - '2.0.0': {} + '1.0.0': versionInfos, + '2.0.0': versionInfos }, group: { 'default': { @@ -1708,8 +1720,8 @@ describe('create-group-version-branch with lockfiles', async () => { oldVersion: '^1.0.0', oldVersionResolved: '1.0.0', versions: { - '1.0.0': {}, - '1.1.0': {} + '1.0.0': versionInfos, + '1.1.0': versionInfos }, group: { 'default': { diff --git a/test/jobs/create-version-branch.js b/test/jobs/create-version-branch.js index e3e0dff9..bd00153e 100644 --- a/test/jobs/create-version-branch.js +++ b/test/jobs/create-version-branch.js @@ -9,7 +9,20 @@ nock.disableNetConnect() nock.enableNetConnect('localhost:5984') let defaultPrivateKey = process.env.PRIVATE_KEY -describe('create version branch', () => { + +const versionInfos = { + 'repository': { + type: 'git', + url: 'git+https://github.com/dep/dep.git' + }, + 'license': 'MIT', + '_npmUser': { + name: 'finn', + email: 'finn.pauls@gmail.com' + } +} + +describe.only('create version branch', () => { beforeEach(() => { delete process.env.IS_ENTERPRISE cleanCache('../../lib/env') @@ -268,28 +281,8 @@ describe('create version branch', () => { oldVersion: '^1.0.0', oldVersionResolved: '1.0.0', versions: { - '1.0.0': { - 'repository': { - type: 'git', - url: 'git+https://github.com/lodash/lodash.git' - }, - 'license': 'MIT', - '_npmUser': { - name: 'jdalton', - email: 'john.david.dalton@gmail.com' - } - }, - '2.0.0': { - 'repository': { - type: 'git', - url: 'git+https://github.com/lodash/lodash.git' - }, - 'license': 'TIM', - '_npmUser': { - name: 'jdalton', - email: 'john.david.dalton@gmail.com' - } - } + '1.0.0': versionInfos, + '2.0.0': versionInfos } }) @@ -408,8 +401,8 @@ describe('create version branch', () => { oldVersion: '^1.0.0', oldVersionResolved: '1.0.0', versions: { - '1.0.0': {}, - '2.0.0': {} + '1.0.0': versionInfos, + '2.0.0': versionInfos } }) @@ -529,8 +522,8 @@ describe('create version branch', () => { oldVersion: '^1.0.0', oldVersionResolved: '1.0.0', versions: { - '1.0.0': {}, - '2.0.0': {} + '1.0.0': versionInfos, + '2.0.0': versionInfos } }) @@ -600,8 +593,8 @@ describe('create version branch', () => { oldVersion: '^1.0.0', oldVersionResolved: '1.0.0', versions: { - '1.0.0': {}, - '2.0.0': {} + '1.0.0': versionInfos, + '2.0.0': versionInfos } }) @@ -662,8 +655,8 @@ describe('create version branch', () => { oldVersion: '^1.0.0', oldVersionResolved: '1.0.0', versions: { - '1.0.0': {}, - '2.0.0': {} + '1.0.0': versionInfos, + '2.0.0': versionInfos } }) @@ -723,8 +716,8 @@ describe('create version branch', () => { oldVersion: '^1.0.0', oldVersionResolved: '1.0.0', versions: { - '1.0.0': {}, - '2.0.0-beta': {} + '1.0.0': versionInfos, + '2.0.0-beta': versionInfos } }) @@ -807,8 +800,8 @@ describe('create version branch', () => { oldVersion: '^1.0.0', oldVersionResolved: '1.0.0', versions: { - '1.0.0': {}, - '2.0.0': {} + '1.0.0': versionInfos, + '2.0.0': versionInfos } }) @@ -871,9 +864,9 @@ describe('create version branch', () => { oldVersion: '^1.0.0', oldVersionResolved: '1.0.0', versions: { - '1.0.0': {}, - '1.1.0': {}, - '2.0.0': {} + '1.0.0': versionInfos, + '1.1.0': versionInfos, + '2.0.0': versionInfos } }) @@ -935,8 +928,8 @@ describe('create version branch', () => { oldVersion: '^2.0.1', oldVersionResolved: '2.0.1', versions: { - '1.0.0': {}, - '2.0.1': {} + '1.0.0': versionInfos, + '2.0.1': versionInfos } }) // no new job scheduled @@ -1042,8 +1035,8 @@ describe('create version branch', () => { oldVersion: '^1.0.0', oldVersionResolved: '1.0.0', versions: { - '1.0.0': {}, - '2.0.1': {} + '1.0.0': versionInfos, + '2.0.1': versionInfos } }) // no new job scheduled @@ -1062,8 +1055,8 @@ describe('create version branch', () => { oldVersion: '^2.0.1', oldVersionResolved: '2.0.1', versions: { - '1.0.0': {}, - '2.0.0': {} + '1.0.0': versionInfos, + '2.0.0': versionInfos } }) // no new job scheduled @@ -1144,7 +1137,12 @@ describe('create version branch', () => { repositoryId: '51', type: 'devDependencies', version: '2.0.2', - oldVersion: '1.3.0' + oldVersion: '^1.3.0', + oldVersionResolved: '1.3.0', + versions: { + '1.0.0': versionInfos, + '2.0.0': versionInfos + } }) expect(githubMock.isDone()).toBeTruthy() @@ -1178,7 +1176,12 @@ describe('create version branch', () => { accountId: '2323', repositoryId: '47', version: '1.0.1', - oldVersion: '^1.0.0' + oldVersion: '^1.0.0', + oldVersionResolved: '1.0.0', + versions: { + '1.0.0': versionInfos, + '2.0.0': versionInfos + } }) // no new job scheduled @@ -1216,18 +1219,33 @@ describe('create version branch', () => { 'repository': { 'type': 'git', 'url': 'git+https://github.com/jest/jest.git' + }, + 'license': 'MIT', + '_npmUser': { + name: 'finn', + email: 'finn.pauls@gmail.com' } }, '1.1.1': { 'repository': { 'type': 'git', 'url': 'git+https://github.com/jest/jest.git' + }, + 'license': 'MIT', + '_npmUser': { + name: 'finn', + email: 'finn.pauls@gmail.com' } }, '1.2.0': { 'repository': { 'type': 'git', 'url': 'git+https://github.com/jest/jest.git' + }, + 'license': 'MIT', + '_npmUser': { + name: 'finn', + email: 'finn.pauls@gmail.com' } } } @@ -1242,7 +1260,7 @@ describe('create version branch', () => { }) .get('/rate_limit') .optionally() - .reply(200, {}) + .reply(200) .get('/repos/espy/test') .reply(200, { default_branch: 'master' @@ -1299,8 +1317,9 @@ describe('create version branch', () => { oldVersion: '1.1.1', oldVersionResolved: '1.1.1', versions: { - '1.0.0': {}, - '1.1.1': {} + '1.0.0': versionInfos, + '1.1.1': versionInfos, + '1.2.0': versionInfos } }) @@ -1398,9 +1417,9 @@ describe('create version branch', () => { oldVersion: '^2.0.0', oldVersionResolved: '2.0.0', versions: { - '1.0.0': {}, - '1.1.0': {}, - '2.0.0': {} + '1.0.0': versionInfos, + '1.1.0': versionInfos, + '2.0.0': versionInfos } }) @@ -1443,18 +1462,33 @@ describe('create version branch', () => { 'repository': { 'type': 'git', 'url': 'git+https://github.com/best/best.git' + }, + 'license': 'MIT', + '_npmUser': { + name: 'finn', + email: 'finn.pauls@gmail.com' } }, '1.1.1': { 'repository': { 'type': 'git', 'url': 'git+https://github.com/best/best.git' + }, + 'license': 'MIT', + '_npmUser': { + name: 'finn', + email: 'finn.pauls@gmail.com' } }, '1.2.0': { 'repository': { 'type': 'git', 'url': 'git+https://github.com/best/best.git' + }, + 'license': 'MIT', + '_npmUser': { + name: 'finn', + email: 'finn.pauls@gmail.com' } } } @@ -1521,11 +1555,12 @@ describe('create version branch', () => { repositoryId: '50_cvb_lockfile', type: 'devDependencies', version: '1.2.0', - oldVersion: '1.1.1', + oldVersion: '^1.1.1', oldVersionResolved: '1.1.1', versions: { - '1.0.0': {}, - '1.1.1': {} + '1.0.0': versionInfos, + '1.1.1': versionInfos, + '1.2.0': versionInfos } }) @@ -1581,7 +1616,12 @@ describe('create version branch', () => { oldVersionResolved: '5.5.5', versions: { '5.5.6': { - gitHead: 'deadbeef222' + gitHead: 'deadbeef222', + 'license': 'MIT', + '_npmUser': { + name: 'finn', + email: 'finn.pauls@gmail.com' + } } } }) @@ -1809,12 +1849,22 @@ describe('create version branch for dependencies from monorepos', () => { oldVersionResolved: '1.0.0', versions: { '1.0.0': { - gitHead: 'deadbeef100' + gitHead: 'deadbeef100', + 'license': 'MIT', + '_npmUser': { + name: 'finn', + email: 'finn.pauls@gmail.com' + } }, '2.0.0': { gitHead: 'deadbeef222', repository: { url: 'https://github.com/colors/monorepo' + }, + 'license': 'MIT', + '_npmUser': { + name: 'finn', + email: 'finn.pauls@gmail.com' } } } @@ -1940,12 +1990,22 @@ describe('create version branch for dependencies from monorepos', () => { oldVersionResolved: '1.0.0', versions: { '1.0.0': { - gitHead: 'deadbeef100' + gitHead: 'deadbeef100', + 'license': 'MIT', + '_npmUser': { + name: 'finn', + email: 'finn.pauls@gmail.com' + } }, '2.0.0': { gitHead: 'deadbeef222', repository: { url: 'https://github.com/colors/monorepo' + }, + 'license': 'MIT', + '_npmUser': { + name: 'finn', + email: 'finn.pauls@gmail.com' } } } @@ -1994,8 +2054,8 @@ describe('create version branch for dependencies from monorepos', () => { latest: '2.2.0' }, versions: { - '2.1.0': {}, - '2.2.0': {} + '2.1.0': versionInfos, + '2.2.0': versionInfos } }) await npm.put({ @@ -2005,10 +2065,10 @@ describe('create version branch for dependencies from monorepos', () => { latest: '1.5.0' }, versions: { - '1.2.0': {}, - '1.3.0': {}, - '1.4.0': {}, - '1.5.0': {} + '1.2.0': versionInfos, + '1.3.0': versionInfos, + '1.4.0': versionInfos, + '1.5.0': versionInfos } }) await npm.put({ @@ -2018,8 +2078,8 @@ describe('create version branch for dependencies from monorepos', () => { latest: '1.3.0' }, versions: { - '1.2.0': {}, - '1.3.0': {} + '1.2.0': versionInfos, + '1.3.0': versionInfos } }) expect.assertions(11) @@ -2104,17 +2164,26 @@ describe('create version branch for dependencies from monorepos', () => { repositoryId: 'mono-deps-diff', type: 'dependencies', version: '2.2.0', - - oldVersion: '2.1.0', + oldVersion: '^2.1.0', oldVersionResolved: '2.1.0', versions: { '1.0.0': { - gitHead: 'deadbeef100' + gitHead: 'deadbeef100', + 'license': 'MIT', + '_npmUser': { + name: 'finn', + email: 'finn.pauls@gmail.com' + } }, '2.1.0': { gitHead: 'deadbeef222', repository: { url: 'https://github.com/numbers/monorepo' + }, + 'license': 'MIT', + '_npmUser': { + name: 'finn', + email: 'finn.pauls@gmail.com' } } } @@ -2258,23 +2327,37 @@ describe('create version branch for dependencies from monorepos', () => { repositoryId: 'mono-2', type: 'dependencies', version: '2.0.0', - oldVersion: '^1.0.0', oldVersionResolved: '1.0.0', versions: { '1.0.0': { - gitHead: 'deadbeef100' + gitHead: 'deadbeef100', + 'license': 'MIT', + '_npmUser': { + name: 'finn', + email: 'finn.pauls@gmail.com' + } }, '2.0.0': { gitHead: 'deadbeef222', repository: { url: 'https://github.com/colors/monorepo' + }, + 'license': 'MIT', + '_npmUser': { + name: 'finn', + email: 'finn.pauls@gmail.com' } }, '3.0.0': { gitHead: 'deadbeef333', repository: { url: 'https://github.com/colors/monorepo' + }, + 'license': 'MIT', + '_npmUser': { + name: 'finn', + email: 'finn.pauls@gmail.com' } } } @@ -2321,18 +2404,33 @@ describe('create version branch for dependencies from monorepos', () => { 'repository': { 'type': 'git', 'url': 'git+https://github.com/airbnb/enzyme.git' + }, + 'license': 'MIT', + '_npmUser': { + name: 'finn', + email: 'finn.pauls@gmail.com' } }, '3.4.3': { 'repository': { 'type': 'git', 'url': 'git+https://github.com/airbnb/enzyme.git' + }, + 'license': 'MIT', + '_npmUser': { + name: 'finn', + email: 'finn.pauls@gmail.com' } }, '3.4.4': { 'repository': { 'type': 'git', 'url': 'git+https://github.com/airbnb/enzyme.git' + }, + 'license': 'MIT', + '_npmUser': { + name: 'finn', + email: 'finn.pauls@gmail.com' } } } @@ -2348,12 +2446,22 @@ describe('create version branch for dependencies from monorepos', () => { 'repository': { 'type': 'git', 'url': 'git+https://github.com/airbnb/enzyme.git' + }, + 'license': 'MIT', + '_npmUser': { + name: 'finn', + email: 'finn.pauls@gmail.com' } }, '1.2.0': { 'repository': { 'type': 'git', 'url': 'git+https://github.com/airbnb/enzyme.git' + }, + 'license': 'MIT', + '_npmUser': { + name: 'finn', + email: 'finn.pauls@gmail.com' } } } @@ -2466,8 +2574,22 @@ describe('create version branch for dependencies from monorepos', () => { oldVersion: '^3.3.0', oldVersionResolved: undefined, versions: { - '1.6.0': { gitHead: 'wau' }, - '1.5.0': { gitHead: 'woof' } + '1.6.0': { + gitHead: 'wau', + 'license': 'MIT', + '_npmUser': { + name: 'finn', + email: 'finn.pauls@gmail.com' + } + }, + '1.5.0': { + gitHead: 'woof', + 'license': 'MIT', + '_npmUser': { + name: 'finn', + email: 'finn.pauls@gmail.com' + } + } } }) @@ -2601,7 +2723,8 @@ describe('create version branch for dependencies from monorepos', () => { type: 'devDependencies', version: '7.0.0-rc.2', oldVersion: '^7.0.0-rc.1', - oldVersionResolved: undefined + oldVersionResolved: undefined, + versions: versionInfos }) expect(githubMock.isDone()).toBeTruthy()