diff --git a/.gitignore b/.gitignore index 66cc520f6..d2676ac91 100644 --- a/.gitignore +++ b/.gitignore @@ -4,5 +4,4 @@ **/node_modules/** coverage/** -lerna-debug.log npm-debug.log diff --git a/.travis.yml b/.travis.yml index 65f8e148a..484e553f4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,9 +6,9 @@ cache: cache: - node_modules before_install: - - npm i -g yarn lerna + - npm i -g yarn install: - - lerna bootstrap + - yarn install script: - yarn run lint - yarn run coverage diff --git a/README.md b/README.md index aeaa0705a..23a7c68c8 100644 --- a/README.md +++ b/README.md @@ -52,20 +52,37 @@ Code coverage: yarn run coverage ``` -## Releasing +## Releasing packages + +### Changelog 1. Fetch all changes and switch to `master`! -1. Execute `yarn run changelog`. - * This task checks what changed in each package and bumps the version accordingly. If nothing changed at all, it won't create a new changelog entry. If changes were irrelevant (e.g. only depedencies) it will create an "internal changes" entry. - * Scan the logs which are printed by the tool in search for errors (incorrect changelog entries). Incorrect entries (e.g. ones without the type) are being ignored. You may need to create entries for them manually. This is done directly in `CHANGELOG.md` of the specific package. Make sure to verify the proposed version after you modify the changelog. - * When unsure what has really changed in this version of a specific package, use `git diff packages/ckeditor5-dev-/`. -1. After reviewing the changelog and committing all changes do `git push`. -1. Now, you can release the changed packages by using `lerna publish`. - * Lerna may propose to release more packages than you'd want ā€“ e.g. one of the packages might have some totally irrelevant change which you don't want to release now. You can do that by calling e.g.: `lerna publish --scope="@ckeditor/ckeditor5-dev-?(env|utils|webpack-plugin)"`. However, this means that if one of ignored packages depends on one of the release ones it won't have a version bump... so **usually it's better to just release everything**. - * Lerna will propose to release more packages than the one in which new changelog entries were generated ā€“ those are packages which depend on the ones which were really updated. That's fine. - * You need to pick version number of every package that Lerna wants to release. Do that based on what `yarn run changelog` proposed. - * Finally, Lerna says it will publish also `ckeditor5-dev` itself. This isn't true as its a private package, but it will be tagged anyway. **Whenever there's a major release in any of the sub packages, make sure to pick major release of `ckeditor5-dev` too**. Thanks to that it's possible later to get back to the previous stable releases e.g. if a hot fix is needed. -1. Your job's done. You can go now to `ckeditor5`, remove `yarn.lock`, potentially update something in `package.json`, run `yarn install` and commit that as `"Internal: Updated dependencies."`. +2. Execute `yarn run changelog`: + * This task checks what changed in each package and bumps the version accordingly. If nothing changed at all, it won't create a new changelog entry. If changes were irrelevant (e.g. only depedencies) it will create an "internal changes" entry. + * Scan the logs which are printed by the tool in search for errors (incorrect changelog entries). Incorrect entries (e.g. ones without the type) are being ignored. You may need to create entries for them manually. This is done directly in `CHANGELOG.md` (in the root directory). Make sure to verify the proposed version after you modify the changelog. + * When unsure what has really changed in this version of a specific package, use `git diff packages/ckeditor5-dev-/`. + +### Publishing + +After generating the changelog, you are able to release the package. + +First, you need to bump the version: + +```bash +yarn run release:bump-version +``` + +You can also use the `--dry-run` option in order to see what this task does. + +After bumping the version, you can publish the changes: + +```bash +yarn run release:publish +``` + +As in the previous task, the `--dry-run` option is also available. + +Your job's done. You can go now to `ckeditor5`, remove `yarn.lock`, potentially update something in `package.json`, run `yarn install` and commit that as `"Internal: Updated dependencies."`. ## License diff --git a/lerna.json b/lerna.json deleted file mode 100644 index 3276a374c..000000000 --- a/lerna.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "packages": [ - "packages/*" - ], - "npmClient": "yarn", - "useWorkspaces": true, - "version": "independent", - "command": { - "bootstrap": { - "concurrency": 1 - } - } -} diff --git a/package.json b/package.json index 4b4c32852..ab5d4a956 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,6 @@ "eslint-config-ckeditor5": "^2.1.0", "husky": "^0.14.3", "istanbul": "^0.4.4", - "lerna": "^3.4.0", "lint-staged": "^7.3.0", "mocha": "^6.1.4" }, @@ -23,11 +22,17 @@ "author": "CKSource (http://cksource.com/)", "license": "GPL-2.0-or-later", "bugs": "https://github.com/ckeditor/ckeditor5-dev/issues", + "repository": { + "type": "git", + "url": "https://github.com/ckeditor/ckeditor5-dev.git" + }, "homepage": "https://github.com/ckeditor/ckeditor5-dev#readme", "scripts": { "test": "mocha packages/*/tests --recursive --timeout 5000", "coverage": "istanbul cover _mocha packages/*/tests -- --recursive --timeout 5000", "changelog": "node ./scripts/changelog.js", + "release:bump-version": "node ./scripts/bump-versions.js", + "release:publish": "node ./scripts/publish.js", "lint": "eslint --quiet '**/*.js'", "precommit": "lint-staged" }, diff --git a/packages/ckeditor5-dev-docs/CHANGELOG.md b/packages/ckeditor5-dev-docs/CHANGELOG.md index ef8d37451..ca38b4e7d 100644 --- a/packages/ckeditor5-dev-docs/CHANGELOG.md +++ b/packages/ckeditor5-dev-docs/CHANGELOG.md @@ -1,6 +1,10 @@ Changelog ========= +All changes in the package are documented in the main repository. See: https://github.com/ckeditor/ckeditor5-dev/blob/master/CHANGELOG.md. + +Changes for the past releases are available below. + ## [11.0.13](https://github.com/ckeditor/ckeditor5-dev/compare/@ckeditor/ckeditor5-dev-docs@11.0.11...@ckeditor/ckeditor5-dev-docs@11.0.13) (2020-02-26) Internal changes only (updated dependencies, documentation, etc.). diff --git a/packages/ckeditor5-dev-docs/package.json b/packages/ckeditor5-dev-docs/package.json index 59a6706a7..f6333c610 100644 --- a/packages/ckeditor5-dev-docs/package.json +++ b/packages/ckeditor5-dev-docs/package.json @@ -23,5 +23,9 @@ "license": "GPL-2.0-or-later", "homepage": "https://github.com/ckeditor/ckeditor5-dev/tree/master/packages/ckeditor5-dev-docs", "bugs": "https://github.com/ckeditor/ckeditor5-dev/issues", - "repository": "https://github.com/ckeditor/ckeditor5-dev" + "repository": { + "type": "git", + "url": "https://github.com/ckeditor/ckeditor5-dev.git", + "directory": "packages/ckeditor5-dev-docs" + } } diff --git a/packages/ckeditor5-dev-env/CHANGELOG.md b/packages/ckeditor5-dev-env/CHANGELOG.md index c24c9e4df..952866925 100644 --- a/packages/ckeditor5-dev-env/CHANGELOG.md +++ b/packages/ckeditor5-dev-env/CHANGELOG.md @@ -1,6 +1,10 @@ Changelog ========= +All changes in the package are documented in the main repository. See: https://github.com/ckeditor/ckeditor5-dev/blob/master/CHANGELOG.md. + +Changes for the past releases are available below. + ## [18.0.0](https://github.com/ckeditor/ckeditor5-dev/compare/@ckeditor/ckeditor5-dev-env@17.1.4...@ckeditor/ckeditor5-dev-env@18.0.0) (2020-04-23) ### BREAKING CHANGES diff --git a/packages/ckeditor5-dev-env/lib/index.js b/packages/ckeditor5-dev-env/lib/index.js index afaf1d863..9b8872942 100644 --- a/packages/ckeditor5-dev-env/lib/index.js +++ b/packages/ckeditor5-dev-env/lib/index.js @@ -18,16 +18,8 @@ const tasks = { return require( './release-tools/tasks/generatechangelogforsinglepackage' )( ...args ); }, - generateChangelogForSubPackages( ...args ) { - return require( './release-tools/tasks/generatechangelogforsubpackages' )( ...args ); - }, - - generateChangelogForSubRepositories( ...args ) { - return require( './release-tools/tasks/generatechangelogforsubrepositories' )( ...args ); - }, - - generateSummaryChangelog( ...args ) { - return require( './release-tools/tasks/generatesummarychangelog' )( ...args ); + generateChangelogForMonoRepository( ...args ) { + return require( './release-tools/tasks/generatechangelogformonorepository' )( ...args ); }, /** diff --git a/packages/ckeditor5-dev-env/lib/release-tools/tasks/bumpversions.js b/packages/ckeditor5-dev-env/lib/release-tools/tasks/bumpversions.js index 9b3ff7913..db5795bcb 100644 --- a/packages/ckeditor5-dev-env/lib/release-tools/tasks/bumpversions.js +++ b/packages/ckeditor5-dev-env/lib/release-tools/tasks/bumpversions.js @@ -15,7 +15,7 @@ const displaySkippedPackages = require( '../utils/displayskippedpackages' ); const executeOnPackages = require( '../utils/executeonpackages' ); const getPackageJson = require( '../utils/getpackagejson' ); const getPackagesToRelease = require( '../utils/getpackagestorelease' ); -const getSubPackagesPaths = require( '../utils/getsubpackagespaths' ); +const getPackagesPaths = require( '../utils/getpackagespaths' ); const updateDependenciesVersions = require( '../utils/updatedependenciesversions' ); const validatePackageToRelease = require( '../utils/validatepackagetorelease' ); @@ -44,7 +44,7 @@ module.exports = function bumpVersions( options ) { const dryRun = Boolean( options.dryRun ); - const pathsCollection = getSubPackagesPaths( { + const pathsCollection = getPackagesPaths( { cwd: options.cwd, packages: options.packages, skipPackages: options.skipPackages || [], diff --git a/packages/ckeditor5-dev-env/lib/release-tools/tasks/generatechangelogformonorepository.js b/packages/ckeditor5-dev-env/lib/release-tools/tasks/generatechangelogformonorepository.js new file mode 100644 index 000000000..e059d0b10 --- /dev/null +++ b/packages/ckeditor5-dev-env/lib/release-tools/tasks/generatechangelogformonorepository.js @@ -0,0 +1,652 @@ +/** + * @license Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */ + +'use strict'; + +const fs = require( 'fs' ); +const path = require( 'path' ); +const { tools, logger } = require( '@ckeditor/ckeditor5-dev-utils' ); +const compareFunc = require( 'compare-func' ); +const chalk = require( 'chalk' ); +const minimatch = require( 'minimatch' ); +const semver = require( 'semver' ); +const changelogUtils = require( '../utils/changelog' ); +const cli = require( '../utils/cli' ); +const displayCommits = require( '../utils/displaycommits' ); +const displaySkippedPackages = require( '../utils/displayskippedpackages' ); +const generateChangelog = require( '../utils/generatechangelog' ); +const getPackageJson = require( '../utils/getpackagejson' ); +const getNewVersionType = require( '../utils/getnewversiontype' ); +const getPackagesPaths = require( '../utils/getpackagespaths' ); +const getCommits = require( '../utils/getcommits' ); +const getWriterOptions = require( '../utils/getwriteroptions' ); +const { getRepositoryUrl } = require( '../utils/transformcommitutils' ); +const transformCommitFactory = require( '../utils/transformcommitfactory' ); + +const VERSIONING_POLICY_URL = 'https://ckeditor.com/docs/ckeditor5/latest/framework/guides/support/versioning-policy.html'; +const noteInfo = `[ā„¹ļø](${ VERSIONING_POLICY_URL }#major-and-minor-breaking-changes)`; + +/** + * Generates the single changelog for the mono repository. It means that changes which have been done in all packages + * will be described in the changelog file located in the `options.cwd` directory. + * + * @param {Object} options + * + * @param {String} options.cwd Current working directory (packages) from which all paths will be resolved. + * + * @param {String} options.packages Where to look for packages. + * + * @param {Function} options.transformScope A function that returns a URL to a package from a scope of a commit. + * + * @param {String} [options.scope] Package names have to match to specified glob pattern in order to be processed. + * + * @param {Array.} [options.skipPackages=[]] Name of packages which won't be touched. + * + * @param {String} [options.from] A commit or tag name that will be the first param of the range of commits to collect. + * + * @param {Boolean} [options.highlightsPlaceholder=false] Whether to add a note about release highlights. + * + * @param {Boolean} [options.collaborationFeatures=false] Whether to add a note about collaboration features. + * + * @returns {Promise} + */ +module.exports = function generateChangelogForMonoRepository( options ) { + const log = logger(); + const cwd = process.cwd(); + const pkgJson = getPackageJson( options.cwd ); + + const transformCommit = transformCommitFactory( { + useExplicitBreakingChangeGroups: true + } ); + + const pathsCollection = getPackagesPaths( { + cwd: options.cwd, + packages: options.packages, + scope: options.scope || null, + skipPackages: options.skipPackages || [], + skipMainRepository: true + } ); + + // The main repository should be at the end of the list. + pathsCollection.skipped.delete( options.cwd ); + pathsCollection.matched.add( options.cwd ); + + logProcess( 'Collecting all commits since the last release...' ); + + // Collection of all entries (real commits + additional "fake" commits extracted from descriptions). + let allCommits; + + // Collection of public entries that will be inserted in the changelog. + let publicCommits; + + // Whether the next release will be bumped as "major" release. + // It depends on commits. If there is any of them that contains a "MAJOR BREAKING CHANGES" note, + // all packages must be released as a major change. + let willBeMajorBump = false; + + // If the next release will be the major bump, this variable will contain next version for all packages. + let nextVersion = null; + + // Packages which during typing the new versions, the user proposed "skip" version. + const skippedChangelogs = new Set(); + + // A map contains packages and their new versions. + const packagesVersion = new Map(); + + // A map contains packages and their current versions. + const currentPackagesVersion = new Map(); + + // A map contains packages and their paths (where they are located) + const packagesPaths = new Map(); + + const commitOptions = { + from: options.from ? options.from : 'v' + pkgJson.version + }; + + return getCommits( transformCommit, commitOptions ) + .then( commits => { + allCommits = commits; + + logInfo( `Found ${ commits.length } entries to parse.`, { indentLevel: 1 } ); + } ) + .then( () => confirmMajorVersionBump() ) + .then( () => typeNewProposalVersionForAllPackages() ) + .then( () => confirmVersionForPackages() ) + .then( () => findPackagesWithInternalBumps() ) + .then( () => generateChangelogFromCommits() ) + .then( changesFromCommits => saveChangelog( changesFromCommits ) ) + .then( () => { + logProcess( 'Summary' ); + + displaySkippedPackages( new Set( [ + ...pathsCollection.skipped, + ...skippedChangelogs + ].sort() ) ); + + // Make a commit from the repository where we started. + process.chdir( options.cwd ); + tools.shExec( `git add ${ changelogUtils.changelogFile }`, { verbosity: 'error' } ); + tools.shExec( 'git commit -m "Docs: Changelog. [skip ci]"', { verbosity: 'error' } ); + + logInfo( + `Changelog for "${ chalk.underline( pkgJson.name ) }" (v${ packagesVersion.get( pkgJson.name ) }) has been generated.`, + { indentLevel: 1 } + ); + + process.chdir( cwd ); + } ) + .catch( err => { + console.log( err ); + } ); + + /** + * Asks the user whether found "MAJOR BREAKING CHANGES" commits are true. + * + * @returns {Promise} + */ + function confirmMajorVersionBump() { + logProcess( 'Looking for "MAJOR BREAKING CHANGES" commits...' ); + + const majorBreakingChangesCommits = filterCommitsByNoteTitle( allCommits, 'MAJOR BREAKING CHANGES' ); + const hasMajorBreakingChanges = majorBreakingChangesCommits.length > 0; + + if ( hasMajorBreakingChanges ) { + logInfo( `Found ${ chalk.bold( 'MAJOR BREAKING CHANGES' ) }:`, { indentLevel: 1 } ); + displayCommits( majorBreakingChangesCommits, { attachLinkToCommit: true, indentLevel: 2 } ); + } else { + logInfo( chalk.italic( + 'No "MAJOR BREAKING CHANGES" commits found but you can decide whether a next release should be treated as a major.' + ), { indentLevel: 1 } ); + } + + return cli.confirmMajorBreakingChangeRelease( hasMajorBreakingChanges, { indentLevel: 1 } ) + .then( result => { + willBeMajorBump = result; + } ); + } + + /** + * Finds commits that contain a note which matches to `titleNote`. + * + * @returns {Array.} + */ + function filterCommitsByNoteTitle( commits, titleNote ) { + return commits.filter( commit => { + if ( !commit.isPublicCommit ) { + return false; + } + + for ( const note of commit.notes ) { + if ( note.title.startsWith( titleNote ) ) { + return true; + } + } + + return false; + } ); + } + + /** + * If the next release will be the major release, the user needs to provide the version which will be used + * as the proposal version for all packages. + * + * @returns {Promise} + */ + function typeNewProposalVersionForAllPackages() { + if ( !willBeMajorBump ) { + return Promise.resolve(); + } + + logProcess( 'Looking for the highest version in all packages...' ); + + const [ packageHighestVersion, highestVersion ] = [ ...pathsCollection.matched ] + .reduce( ( currentHighest, repositoryPath ) => { + const packageJson = getPackageJson( repositoryPath ); + + currentPackagesVersion.set( packageJson.name, packageJson.version ); + + if ( semver.gt( packageJson.version, currentHighest[ 1 ] ) ) { + return [ packageJson.name, packageJson.version ]; + } + + return currentHighest; + }, [ null, '0.0.0' ] ); + + return cli.provideNewMajorReleaseVersion( highestVersion, packageHighestVersion, { indentLevel: 1 } ) + .then( version => { + nextVersion = version; + } ); + } + + /** + * Asks the user about new versions for all packages. + * + * @returns {Promise} + */ + function confirmVersionForPackages() { + logProcess( 'Preparing new version for all packages...' ); + + const mainPackageName = pkgJson.name; + let promise = Promise.resolve(); + + for ( const packagePath of pathsCollection.matched ) { + promise = promise.then( () => { + const pkgJson = getPackageJson( packagePath ); + + packagesPaths.set( pkgJson.name, packagePath ); + currentPackagesVersion.set( pkgJson.name, pkgJson.version ); + + logInfo( `Processing "${ chalk.underline( pkgJson.name ) }"...`, { indentLevel: 1, startWithNewLine: true } ); + + const packageCommits = filterCommitsByPath( allCommits, packagePath ); + const releaseTypeOrVersion = willBeMajorBump ? nextVersion : getNewVersionType( packageCommits ); + + displayCommits( packageCommits, { indentLevel: 2 } ); + + const provideVersionOptions = { + indentLevel: 2, + disableSkipVersion: mainPackageName === pkgJson.name + }; + + return cli.provideVersion( pkgJson.version, releaseTypeOrVersion, provideVersionOptions ) + .then( version => { + if ( version === 'skip' ) { + skippedChangelogs.add( packagePath ); + + return Promise.resolve(); + } + + // If the user provided "internal" as a new version, we treat it as a "patch" bump. + if ( version === 'internal' ) { + version = semver.inc( pkgJson.version, 'patch' ); + } + + packagesVersion.set( pkgJson.name, version ); + } ); + } ); + } + + return promise; + } + + /** + * Finds commits that touched the package under `packagePath` directory. + * + * @param {Array.} commits + * @param {String} packagePath + * @returns {Array.} + */ + function filterCommitsByPath( commits, packagePath ) { + const shortPackagePath = packagePath.replace( options.cwd, '' ) + .replace( new RegExp( `^\\${ path.sep }` ), '' ); + + return commits.filter( commit => { + return commit.files.some( file => { + // The main repository. + if ( shortPackagePath === '' ) { + return !file.startsWith( 'packages' ); + } + + return file.startsWith( shortPackagePath ); + } ); + } ); + } + + /** + * Finds packages that were skipped or didn't have any committed changes. + * + * For such packages we want to bump the "patch" version. + * Unless, there should be a major bump. + * + * @returns {Promise} + */ + function findPackagesWithInternalBumps() { + logProcess( 'Checking whether dependencies of skipped packages have changed...' ); + + let clearRun = false; + + while ( !clearRun ) { + clearRun = true; + + for ( const packagePath of skippedChangelogs ) { + const pkgJson = getPackageJson( packagePath ); + + // Check whether the dependencies of the current processing package will be released. + const willUpdateDependencies = Object.keys( pkgJson.dependencies || {} ) + .some( dependencyName => packagesVersion.has( dependencyName ) ); + + // If so, bump the version for current package and release it too. + // The bump can be specified as `major` or `patch`. It depends whether we had the "MAJOR BREAKING CHANGES" commit. + if ( willUpdateDependencies ) { + const version = willBeMajorBump ? nextVersion : semver.inc( pkgJson.version, 'patch' ); + + packagesVersion.set( pkgJson.name, version ); + skippedChangelogs.delete( packagePath ); + clearRun = false; + } + } + } + } + + /** + * Generates a list of changes based on the commits in the main repository. + * + * @returns {Promise.} + */ + function generateChangelogFromCommits() { + logProcess( 'Generating the changelog...' ); + + const version = packagesVersion.get( pkgJson.name ); + + const writerContext = { + version, + commit: 'commit', + repoUrl: getRepositoryUrl( options.cwd ), + currentTag: 'v' + version, + previousTag: 'v' + pkgJson.version, + isPatch: semver.diff( version, pkgJson.version ) === 'patch', + highlightsPlaceholder: options.highlightsPlaceholder || false, + collaborationFeatures: options.collaborationFeatures || false + }; + + const writerOptions = getWriterOptions( { + // We do not allow modifying the commit hash value by the generator itself. + hash: hash => hash + } ); + + const sortFunction = compareFunc( item => { + if ( Array.isArray( item.rawScope ) ) { + // A hack that allows moving all scoped commits from the main repository/package at the beginning of the list. + if ( item.rawScope[ 0 ] === pkgJson.name ) { + return 'a'.repeat( 15 ); + } + + return item.rawScope[ 0 ]; + } + + // A hack that allows moving all non-scoped commits or breaking changes notes at the end of the list. + return 'z'.repeat( 15 ); + } ); + + writerOptions.commitsSort = sortFunction; + writerOptions.notesSort = sortFunction; + + publicCommits = [ ...allCommits ] + .filter( commit => commit.isPublicCommit ) + .map( commit => { + commit.rawScope = commit.scope; + + // Transforms a scope to markdown link. + if ( Array.isArray( commit.scope ) ) { + commit.scope = commit.scope.map( scopeToLink ); + } + + // Attaches an icon to notes. + commit.notes = commit.notes.map( note => { + note.title += ' ' + noteInfo; + note.rawScope = note.scope; + + // Transforms a scope to markdown link. + if ( Array.isArray( note.scope ) ) { + note.scope = note.scope.map( scopeToLink ); + } + + return note; + } ); + + return commit; + } ); + + return generateChangelog( publicCommits, writerContext, writerOptions ) + .then( changes => { + logInfo( 'Changes based on commits have been generated.', { indentLevel: 1 } ); + + return Promise.resolve( changes ); + } ); + + function scopeToLink( name ) { + return `[${ name }](${ options.transformScope( name ) })`; + } + } + + /** + * Combines the generated changes based on commits and summary of version changes in packages. + * Appends those changes at the beginning of the changelog file. + * + * @param {String} changesFromCommits Generated entries based on commits. + */ + function saveChangelog( changesFromCommits ) { + logProcess( 'Saving changelog...' ); + + if ( !fs.existsSync( changelogUtils.changelogFile ) ) { + logInfo( 'Changelog file does not exist. Creating...', { isWarning: true, indentLevel: 1 } ); + + changelogUtils.saveChangelog( changelogUtils.changelogHeader ); + } + + logInfo( 'Preparing a summary of version changes in packages.', { indentLevel: 1 } ); + + const dependenciesSummary = generateSummaryOfChangesInPackages(); + + let currentChangelog = changelogUtils.getChangelog(); + + // Remove header from current changelog. + currentChangelog = currentChangelog.replace( changelogUtils.changelogHeader, '' ).trim(); + + // Concat header, new entries and old changelog to single string. + let newChangelog = changelogUtils.changelogHeader + + changesFromCommits.trim() + + '\n\n' + + dependenciesSummary + + '\n\n\n' + + currentChangelog; + + newChangelog = newChangelog.trim() + '\n'; + + // Save the changelog. + changelogUtils.saveChangelog( newChangelog ); + + logInfo( 'Saved.', { indentLevel: 1 } ); + } + + /** + * Prepares a summary that describes what has changed in all dependencies. + * + * @returns {String} + */ + function generateSummaryOfChangesInPackages() { + const dependencies = new Map(); + + for ( const [ packageName, nextVersion ] of packagesVersion ) { + // Skip the package hosted in the main repository. + if ( packageName === pkgJson.name ) { + continue; + } + + dependencies.set( packageName, { + next: nextVersion, + current: currentPackagesVersion.get( packageName ) + } ); + } + + const newPackages = getNewPackages( dependencies ); + const majorBreakingChangesPackages = getPackagesMatchedToScopesFromNotes( dependencies, 'MAJOR BREAKING CHANGES' ); + const minorBreakingChangesPackages = getPackagesMatchedToScopesFromNotes( dependencies, 'MINOR BREAKING CHANGES' ); + const newFeaturesPackages = getPackagesWithNewFeatures( dependencies ); + + const entries = [ + '### Released packages\n', + `Check out the [Versioning policy](${ VERSIONING_POLICY_URL }) guide for more information.\n`, + '
', + 'Released packages (summary)' + ]; + + if ( newPackages.size ) { + entries.push( '\nNew packages:\n' ); + + for ( const [ packageName, version ] of [ ...newPackages ].sort( sortByPackageName ) ) { + entries.push( formatChangelogEntry( packageName, version.next ) ); + } + } + + if ( majorBreakingChangesPackages.size ) { + entries.push( '\nMajor releases (contain major breaking changes):\n' ); + + for ( const [ packageName, version ] of [ ...majorBreakingChangesPackages ].sort( sortByPackageName ) ) { + entries.push( formatChangelogEntry( packageName, version.next, version.current ) ); + } + } + + if ( minorBreakingChangesPackages.size ) { + entries.push( '\nMinor releases (contain minor breaking changes):\n' ); + + for ( const [ packageName, version ] of [ ...minorBreakingChangesPackages ].sort( sortByPackageName ) ) { + entries.push( formatChangelogEntry( packageName, version.next, version.current ) ); + } + } + + if ( newFeaturesPackages.size ) { + entries.push( '\nReleases containing new features:\n' ); + + for ( const [ packageName, version ] of [ ...newFeaturesPackages ].sort( sortByPackageName ) ) { + entries.push( formatChangelogEntry( packageName, version.next, version.current ) ); + } + } + + if ( dependencies.size ) { + entries.push( '\nOther releases:\n' ); + + for ( const [ packageName, version ] of [ ...dependencies ].sort( sortByPackageName ) ) { + entries.push( formatChangelogEntry( packageName, version.next, version.current ) ); + } + } + + entries.push( '
' ); + + return entries.join( '\n' ).trim(); + + function sortByPackageName( a, b ) { + return a[ 0 ] > b[ 0 ] ? 1 : -1; + } + } + + /** + * @param {Map.} dependencies + * @returns {Map.} + */ + function getNewPackages( dependencies ) { + const packages = new Map(); + + for ( const [ packageName, version ] of dependencies ) { + if ( semver.eq( version.current, '0.0.1' ) ) { + packages.set( packageName, version ); + dependencies.delete( packageName ); + } + } + + return packages; + } + + /** + * Returns packages where scope of changes described in the commits' notes match to packages' names. + * + * @param {Map.} dependencies + * @param {String} noteTitle + * @returns {Map.} + */ + function getPackagesMatchedToScopesFromNotes( dependencies, noteTitle ) { + const packages = new Map(); + const scopes = new Set(); + + for ( const commit of filterCommitsByNoteTitle( publicCommits, noteTitle ) ) { + for ( const note of commit.notes ) { + if ( Array.isArray( note.rawScope ) ) { + scopes.add( note.rawScope[ 0 ] ); + } + } + } + + for ( const [ packageName, version ] of dependencies ) { + const packageWithoutScope = packageName.replace( /^@ckeditor\//, '' ); + + for ( const singleScope of scopes ) { + if ( minimatch( packageWithoutScope, '*' + singleScope ) ) { + packages.set( packageName, version ); + dependencies.delete( packageName ); + } + } + } + + return packages; + } + + /** + * Returns packages that contain new features. + * + * @param {Map.} dependencies + * @returns {Map.} + */ + function getPackagesWithNewFeatures( dependencies ) { + const packages = new Map(); + + for ( const [ packageName, version ] of dependencies ) { + const packagePath = packagesPaths.get( packageName ); + const commits = filterCommitsByPath( publicCommits, packagePath ); + const hasFeatures = commits.some( commit => commit.rawType === 'Feature' ); + + if ( hasFeatures ) { + packages.set( packageName, version ); + dependencies.delete( packageName ); + } + } + + return packages; + } + + /** + * Returns a formatted entry (string) for the changelog. + * + * @param {String} packageName + * @param {String} nextVersion + * @param {String} currentVersion + * @returns {String} + */ + function formatChangelogEntry( packageName, nextVersion, currentVersion = null ) { + const npmUrl = `https://www.npmjs.com/package/${ packageName }`; + + if ( currentVersion ) { + return `* [${ packageName }](${ npmUrl }): v${ currentVersion } => v${ nextVersion }`; + } + + return `* [${ packageName }](${ npmUrl }): v${ nextVersion }`; + } + + function logProcess( message ) { + log.info( '\nšŸ“ ' + chalk.cyan( message ) ); + } + + /** + * @param {String} message + * @param {Object} [options={}] + * @param {Number} [options.indentLevel=0] + * @param {Boolean} [options.startWithNewLine=false] Whether to append a new line before the message. + * @param {Boolean} [options.isWarning=false] Whether to use `warning` method instead of `log`. + */ + function logInfo( message, options = {} ) { + const indentLevel = options.indentLevel || 0; + const startWithNewLine = options.startWithNewLine || false; + const method = options.isWarning ? 'warning' : 'info'; + + log[ method ]( `${ startWithNewLine ? '\n' : '' }${ ' '.repeat( indentLevel * cli.INDENT_SIZE ) }` + message ); + } +}; + +/** + * @typedef {Object} Version + * + * @param {Boolean} current The current version defined in the `package.json` file. + * + * @param {Boolean} next The next version defined during generating the changelog file. + */ diff --git a/packages/ckeditor5-dev-env/lib/release-tools/tasks/generatechangelogforsinglepackage.js b/packages/ckeditor5-dev-env/lib/release-tools/tasks/generatechangelogforsinglepackage.js index b67086c11..807d1bd4e 100644 --- a/packages/ckeditor5-dev-env/lib/release-tools/tasks/generatechangelogforsinglepackage.js +++ b/packages/ckeditor5-dev-env/lib/release-tools/tasks/generatechangelogforsinglepackage.js @@ -5,138 +5,180 @@ 'use strict'; +const fs = require( 'fs' ); +const { tools, logger } = require( '@ckeditor/ckeditor5-dev-utils' ); const chalk = require( 'chalk' ); const semver = require( 'semver' ); -const { tools, logger } = require( '@ckeditor/ckeditor5-dev-utils' ); const cli = require( '../utils/cli' ); -const versionUtils = require( '../utils/versions' ); const changelogUtils = require( '../utils/changelog' ); const displayCommits = require( '../utils/displaycommits' ); +const generateChangelog = require( '../utils/generatechangelog' ); const getPackageJson = require( '../utils/getpackagejson' ); -const getNewReleaseType = require( '../utils/getnewreleasetype' ); -const generateChangelogFromCommits = require( '../utils/generatechangelogfromcommits' ); -const transformCommitForSubRepositoryFactory = require( '../utils/transform-commit/transformcommitforsubrepositoryfactory' ); - -const VALID_SEMVER_INCREMENT_LEVEL = [ - 'major', - 'minor', - 'patch', - 'premajor', - 'preminor', - 'prepatch', - 'prerelease' -]; +const getNewVersionType = require( '../utils/getnewversiontype' ); +const getCommits = require( '../utils/getcommits' ); +const getWriterOptions = require( '../utils/getwriteroptions' ); +const { getRepositoryUrl } = require( '../utils/transformcommitutils' ); +const transformCommitForSubRepositoryFactory = require( '../utils/transformcommitfactory' ); /** - * Generates the release changelog based on commit messages in a package that is located under current work directory (cwd). - * - * A new version that should be printed in the changelog can be specified under `options.newVersion` option. - * It accepts the new version (e.g. "1.0.0") or a level that describes how to increase a current version of the package, - * e.g.: "major". It means that the tool will suggest a major version bump while asking about the new version. - * - * If the new version is not specified, the tool will print all commits and user must type the new version manually. + * Generates the changelog based on commit messages in a package that is located under current work directory (cwd). * * If the package does not have any commit, the user has to confirm whether the changelog should be generated. * * @param {Object} [options={}] Additional options. - * @param {String} [options.newVersion=null] A version or a type of increase level for the current version - * for which changelog will be generated. + * * @param {Boolean} [options.skipLinks=false] If set on true, links to release or commits will be omitted. - * @param {Boolean} [options.disableMajorBump=false] If set on true, detected breaking change won't bump the major version. - * @param {Boolean} [options.isInternalRelease=false] If set on true, the changelog will contain a note about internal release - * instead of data that comes from commits. - * @param {Number} [options.indentLevel=0] The indent level. This function could be used inside another (bigger) script. If we would like to - * display indents logs, we need to increase/decrease indent level manually. - * @param {Boolean} [options.useExplicitBreakingChangeGroups] If set on `true`, notes from parsed commits will be grouped as - * "MINOR BREAKING CHANGES" and "MAJOR BREAKING CHANGES'. If set on `false` (by default), all breaking changes notes will be treated - * as "BREAKING CHANGES". + * + * @param {String} [options.from] A commit or tag name that will be the first param of the range of commits to collect. + * + * @param {Boolean} [options.highlightsPlaceholder=false] Whether to add a note about release highlights. + * + * @param {Boolean} [options.collaborationFeatures=false] Whether to add a note about collaboration features. + * * @returns {Promise} */ module.exports = function generateChangelogForSinglePackage( options = {} ) { const log = logger(); - const packageJson = getPackageJson(); - const indentLevel = options.indentLevel || 0; - const indent = ' '.repeat( indentLevel * cli.INDENT_SIZE ); + const pkgJson = getPackageJson(); + + logProcess( chalk.bold( `Generating changelog for "${ chalk.underline( pkgJson.name ) }"...` ) ); - let tagName = versionUtils.getLastFromChangelog(); + const transformCommit = transformCommitForSubRepositoryFactory(); - if ( tagName ) { - tagName = 'v' + tagName; + logProcess( 'Collecting all commits since the last release...' ); + + const commitOptions = { + from: options.from ? options.from : 'v' + pkgJson.version + }; + + // Initial release. + if ( semver.eq( pkgJson.version, '0.0.1' ) ) { + commitOptions.from = null; } - let isInternalRelease = options.isInternalRelease || false; - const newVersion = options.newVersion || null; - - log.info( '\n' + indent + chalk.bold( `Generating changelog for "${ chalk.underline( packageJson.name ) }"...` ) ); - - let promise = Promise.resolve(); - - // For the internal release, the user does not have to confirm anything. The internal release is called automatically - // when changelogs of package's dependencies have been changed. We mark the package as "ready to release" - // in order to update versions of the dependencies. - if ( isInternalRelease ) { - if ( VALID_SEMVER_INCREMENT_LEVEL.includes( newVersion ) ) { - promise = promise.then( () => semver.inc( packageJson.version, newVersion ) ); - } else if ( semver.valid( newVersion ) ) { - promise = promise.then( () => newVersion ); - } else { - return Promise.reject( new Error( - `If "isInternalRelease" is set on true, "newVersion" must be a version or increment level. Given "${ newVersion }".` - ) ); - } - } else { - const transformCommitFunction = transformCommitForSubRepositoryFactory( { - treatMajorAsMinorBreakingChange: options.disableMajorBump, - returnInvalidCommit: true, - useExplicitBreakingChangeGroups: !!options.useExplicitBreakingChangeGroups - } ); + // Collection of all entries (real commits + additional "fake" commits extracted from descriptions). + let allCommits; - promise = promise - .then( () => getNewReleaseType( transformCommitFunction, { tagName } ) ) - .then( result => { - displayCommits( result.commits, { indentLevel: indentLevel + 1 } ); + // A new version inserted into the changelog. + let newVersion; - const releaseTypeOrVersion = semver.valid( newVersion ) ? newVersion : result.releaseType; + return getCommits( transformCommit, commitOptions ) + .then( commits => { + allCommits = commits; - return cli.provideVersion( packageJson.version, releaseTypeOrVersion, { indentLevel } ); - } ); - } + logInfo( `Found ${ commits.length } entries to parse.`, { indentLevel: 1 } ); + } ) + .then( () => { + logProcess( 'Preparing new version for the package...' ); - return promise + const releaseType = getNewVersionType( allCommits ); + + displayCommits( allCommits, { indentLevel: 1 } ); + + return cli.provideVersion( pkgJson.version, releaseType, { indentLevel: 1 } ); + } ) .then( version => { if ( version === 'skip' ) { return Promise.resolve(); } - // If the user provided "internal" as a new version, we treat it as a "patch" bump. + const isInternalRelease = version === 'internal'; + if ( version === 'internal' ) { - isInternalRelease = true; - version = semver.inc( packageJson.version, 'patch' ); + version = semver.inc( pkgJson.version, 'patch' ); } - const changelogOptions = { + newVersion = version; + + logProcess( 'Generating the changelog...' ); + + const previousTag = commitOptions.from ? 'v' + pkgJson.version : null; + + const writerContext = { version, - tagName, + commit: 'commit', + repoUrl: getRepositoryUrl(), + currentTag: 'v' + version, + previousTag, + isPatch: semver.diff( version, pkgJson.version ) === 'patch', isInternalRelease, - indentLevel, - newTagName: 'v' + version, - transformCommit: transformCommitForSubRepositoryFactory( { - treatMajorAsMinorBreakingChange: options.disableMajorBump, - useExplicitBreakingChangeGroups: !!options.useExplicitBreakingChangeGroups - } ), - skipLinks: !!options.skipLinks + highlightsPlaceholder: Boolean( options.highlightsPlaceholder ), + collaborationFeatures: Boolean( options.collaborationFeatures ), + skipCommitsLink: Boolean( options.skipLinks ), + skipCompareLink: Boolean( options.skipLinks ) }; - return generateChangelogFromCommits( changelogOptions ) - .then( () => { - tools.shExec( `git add ${ changelogUtils.changelogFile }`, { verbosity: 'error' } ); - tools.shExec( 'git commit -m "Docs: Changelog. [skip ci]"', { verbosity: 'error' } ); + const writerOptions = getWriterOptions( { + // We do not allow modifying the commit hash value by the generator itself. + hash: hash => hash + } ); + + const publicCommits = [ ...allCommits ] + .filter( commit => commit.isPublicCommit ) + .map( commit => { + commit.scope = null; + commit.notes = commit.notes.map( note => { + note.scope = null; + + return note; + } ); - const message = `Changelog for "${ chalk.underline( packageJson.name ) }" (v${ version }) has been generated.`; + return commit; + } ); - log.info( chalk.green( indent + message ) ); + return generateChangelog( publicCommits, writerContext, writerOptions ) + .then( changes => { + logInfo( 'Changes based on commits have been generated.', { indentLevel: 1 } ); - return Promise.resolve( version ); + return Promise.resolve( changes ); } ); + } ) + .then( changesFromCommits => { + logProcess( 'Saving changelog...' ); + + if ( !fs.existsSync( changelogUtils.changelogFile ) ) { + logInfo( 'Changelog file does not exist. Creating...', { isWarning: true, indentLevel: 1 } ); + + changelogUtils.saveChangelog( changelogUtils.changelogHeader ); + } + + let currentChangelog = changelogUtils.getChangelog(); + + // Remove header from current changelog. + currentChangelog = currentChangelog.replace( changelogUtils.changelogHeader, '' ); + + // Concat header, new and current changelog. + let newChangelog = changelogUtils.changelogHeader + changesFromCommits + currentChangelog.trim(); + newChangelog = newChangelog.trim() + '\n'; + + // Save the changelog. + changelogUtils.saveChangelog( newChangelog ); + + tools.shExec( `git add ${ changelogUtils.changelogFile }`, { verbosity: 'error' } ); + tools.shExec( 'git commit -m "Docs: Changelog. [skip ci]"', { verbosity: 'error' } ); + + logInfo( 'Saved.', { indentLevel: 1 } ); + } ) + .then( () => { + logInfo( `Changelog for "${ chalk.underline( pkgJson.name ) }" (v${ newVersion }) has been generated.`, { indentLevel: 1 } ); } ); + + function logProcess( message ) { + log.info( '\nšŸ“ ' + chalk.cyan( message ) ); + } + + /** + * @param {String} message + * @param {Object} [options={}] + * @param {Number} [options.indentLevel=0] + * @param {Boolean} [options.startWithNewLine=false] Whether to append a new line before the message. + * @param {Boolean} [options.isWarning=false] Whether to use `warning` method instead of `log`. + */ + function logInfo( message, options = {} ) { + const indentLevel = options.indentLevel || 0; + const startWithNewLine = options.startWithNewLine || false; + const method = options.isWarning ? 'warning' : 'info'; + + log[ method ]( `${ startWithNewLine ? '\n' : '' }${ ' '.repeat( indentLevel * cli.INDENT_SIZE ) }` + message ); + } }; diff --git a/packages/ckeditor5-dev-env/lib/release-tools/tasks/generatechangelogforsubpackages.js b/packages/ckeditor5-dev-env/lib/release-tools/tasks/generatechangelogforsubpackages.js deleted file mode 100644 index 7ff3eca07..000000000 --- a/packages/ckeditor5-dev-env/lib/release-tools/tasks/generatechangelogforsubpackages.js +++ /dev/null @@ -1,130 +0,0 @@ -/** - * @license Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved. - * For licensing, see LICENSE.md. - */ - -'use strict'; - -const chalk = require( 'chalk' ); -const semver = require( 'semver' ); -const { tools, logger } = require( '@ckeditor/ckeditor5-dev-utils' ); -const getNewReleaseType = require( '../utils/getnewreleasetype' ); -const cli = require( '../utils/cli' ); -const versionUtils = require( '../utils/versions' ); -const changelogUtils = require( '../utils/changelog' ); -const displayCommits = require( '../utils/displaycommits' ); -const displaySkippedPackages = require( '../utils/displayskippedpackages' ); -const displayGeneratedChangelogs = require( '../utils/displaygeneratedchangelogs' ); -const executeOnPackages = require( '../utils/executeonpackages' ); -const getPackageJson = require( '../utils/getpackagejson' ); -const getSubPackagesPaths = require( '../utils/getsubpackagespaths' ); -const generateChangelogFromCommits = require( '../utils/generatechangelogfromcommits' ); -const transformCommitForSubPackageFactory = require( '../utils/transform-commit/transformcommitforsubpackagefactory' ); - -/** - * Generates the changelog for packages located in single repository. - * - * @param {Object} options - * @param {String} options.cwd Current working directory (packages) from which all paths will be resolved. - * @param {String} options.packages Where to look for other packages. - * @param {Array.} options.skipPackages Name of packages which won't be touched. - * @returns {Promise} - */ -module.exports = function generateChangelogForSubPackages( options ) { - const log = logger(); - const cwd = process.cwd(); - - const pathsCollection = getSubPackagesPaths( { - cwd: options.cwd, - packages: options.packages, - skipPackages: options.skipPackages || [] - } ); - - const skippedPackages = new Set(); - const generatedChangelogsMap = new Map(); - - return executeOnPackages( pathsCollection.matched, generateChangelogTask ) - .then( () => { - process.chdir( cwd ); - - // No changelog has generated. Abort. - if ( skippedPackages.size === pathsCollection.matched.size ) { - return; - } - - const shExecOptions = { verbosity: 'error' }; - - log.info( 'Committing generated changelogs.' ); - - tools.shExec( `git add ${ options.packages }/**/${ changelogUtils.changelogFile }`, shExecOptions ); - tools.shExec( 'git commit -m "Docs: Updated changelog for packages. [skip ci]"', shExecOptions ); - } ) - .then( () => { - displaySkippedPackages( pathsCollection.skipped ); - displayGeneratedChangelogs( generatedChangelogsMap ); - - log.info( 'Done.' ); - } ); - - function generateChangelogTask( dependencyPath ) { - process.chdir( dependencyPath ); - - const packageJson = getPackageJson(); - const dependencyName = packageJson.name; - let tagName = versionUtils.getLastFromChangelog(); - - if ( tagName ) { - tagName = packageJson.name + '@' + tagName; - } - - log.info( '\n' + chalk.bold.blue( `Generating changelog for "${ dependencyName }"...` ) ); - - const transformCommitFunction = transformCommitForSubPackageFactory( { - returnInvalidCommit: true - } ); - - return getNewReleaseType( transformCommitFunction, { tagName } ) - .then( result => { - displayCommits( result.commits ); - - const newReleaseType = result.releaseType !== 'skip' ? result.releaseType : null; - - return cli.provideVersion( packageJson.version, newReleaseType ); - } ) - .then( version => { - if ( version === 'skip' ) { - pathsCollection.skipped.add( dependencyPath ); - skippedPackages.add( dependencyPath ); - - return Promise.resolve(); - } - - let isInternalRelease = false; - - if ( version === 'internal' ) { - isInternalRelease = true; - version = semver.inc( packageJson.version, 'patch' ); - } - - const changelogOptions = { - version, - tagName, - isInternalRelease, - newTagName: packageJson.name + '@' + version, - transformCommit: transformCommitForSubPackageFactory() - }; - - return generateChangelogFromCommits( changelogOptions ) - .then( newVersion => { - log.info( - chalk.green( `Changelog for "${ dependencyName }" (v${ newVersion }) has been generated.` ) - ); - - generatedChangelogsMap.set( dependencyName, newVersion ); - } ); - } ) - .catch( err => { - log.error( err ); - } ); - } -}; diff --git a/packages/ckeditor5-dev-env/lib/release-tools/tasks/generatechangelogforsubrepositories.js b/packages/ckeditor5-dev-env/lib/release-tools/tasks/generatechangelogforsubrepositories.js deleted file mode 100644 index 027589e20..000000000 --- a/packages/ckeditor5-dev-env/lib/release-tools/tasks/generatechangelogforsubrepositories.js +++ /dev/null @@ -1,307 +0,0 @@ -/** - * @license Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved. - * For licensing, see LICENSE.md. - */ - -'use strict'; - -const { logger } = require( '@ckeditor/ckeditor5-dev-utils' ); -const chalk = require( 'chalk' ); -const semver = require( 'semver' ); -const cli = require( '../utils/cli' ); -const displayCommits = require( '../utils/displaycommits' ); -const displayGeneratedChangelogs = require( '../utils/displaygeneratedchangelogs' ); -const displaySkippedPackages = require( '../utils/displayskippedpackages' ); -const executeOnPackages = require( '../utils/executeonpackages' ); -const generateChangelogForSinglePackage = require( './generatechangelogforsinglepackage' ); -const getNewReleaseType = require( '../utils/getnewreleasetype' ); -const getPackageJson = require( '../utils/getpackagejson' ); -const getSubRepositoriesPaths = require( '../utils/getsubrepositoriespaths' ); -const transformCommitForSubRepositoryFactory = require( '../utils/transform-commit/transformcommitforsubrepositoryfactory' ); -const versionUtils = require( '../utils/versions' ); - -/** - * Generates the changelog for packages located in multi repositories. - * - * @param {Object} options - * @param {String} options.cwd Current working directory (packages) from which all paths will be resolved. - * @param {String} options.packages Where to look for other packages. - * @param {String} [options.scope] Package names have to match to specified glob pattern. - * @param {Array.} [options.skipPackages=[]] Name of packages which won't be touched. - * @param {Boolean} [options.skipMainRepository=false] If set on true, package found in "cwd" will be skipped. - * @returns {Promise.} - */ -module.exports = function generateChangelogForSubRepositories( options ) { - const log = logger(); - const cwd = process.cwd(); - - const pathsCollection = getSubRepositoriesPaths( { - cwd: options.cwd, - packages: options.packages, - scope: options.scope || null, - skipPackages: options.skipPackages || [], - skipMainRepository: options.skipMainRepository - } ); - - // Whether the next release will be bumped as "major" release. - // It depends on commits. If there is any of them that contains a "MAJOR BREAKING CHANGES" note, - // all packages must be released as a major change. - let willBeMajorBump = false; - - // If the next release will be the major bump, this variable will contain next version for all packages. - let nextVersion = null; - - const generatedChangelogsMap = new Map(); - const skippedChangelogs = new Set(); - - return collectPackagesCommits() - .then( packagesCommit => confirmMajorVersionBump( packagesCommit ) ) - .then( () => typeNewProposalVersionForAllPackages() ) - .then( () => generateChangelogs() ) - .then( () => generateInternalChangelogs() ) - .then( () => { - logProcess( 'Summary' ); - - process.chdir( cwd ); - - // An empty line increases the readability. - console.log( '' ); - - displaySkippedPackages( new Set( [ - ...pathsCollection.skipped, - ...skippedChangelogs - ].sort() ) ); - - // An empty line between two lists increases the readability. - console.log( '' ); - - displayGeneratedChangelogs( generatedChangelogsMap ); - - return { - wasMajorRelease: willBeMajorBump, - version: nextVersion - }; - } ); - - /** - * Creates a collection where: - * - keys are names of the packages, - * - their values are collections of the commits. - * - * @returns {Promise.>>} - */ - function collectPackagesCommits() { - logProcess( 'Collecting commits for packages since the last release...' ); - - const packagesCommit = new Map(); - const transformCommitFunction = transformCommitForSubRepositoryFactory( { - useExplicitBreakingChangeGroups: true - } ); - - return executeOnPackages( pathsCollection.matched, repositoryPath => { - process.chdir( repositoryPath ); - - const packageJson = getPackageJson(); - - let tagName = versionUtils.getLastFromChangelog(); - - if ( tagName ) { - tagName = 'v' + tagName; - } - - return getNewReleaseType( transformCommitFunction, { tagName } ) - .then( result => { - packagesCommit.set( packageJson.name, new Set( result.commits ) ); - } ); - } ).then( () => packagesCommit ); - } - - /** - * Asks the user whether found "MAJOR BREAKING CHANGES" commits are true. - * - * @returns {Promise.} - */ - function confirmMajorVersionBump( packagesCommit ) { - logProcess( 'Looking for "MAJOR BREAKING CHANGES" commits...' ); - - let hasMajorBreakingChanges = false; - - for ( const [ packageName, commits ] of packagesCommit ) { - const majorBreakingChangesCommits = filterMajorBreakingChangesCommits( commits ); - - if ( majorBreakingChangesCommits.size ) { - hasMajorBreakingChanges = true; - - log.info( `\n${ ' '.repeat( cli.INDENT_SIZE ) }${ chalk.bold( `Commits in "${ chalk.underline( packageName ) }"...` ) }` ); - displayCommits( majorBreakingChangesCommits, { attachLinkToCommit: true, indentLevel: 2 } ); - } - } - - if ( !hasMajorBreakingChanges ) { - console.log( chalk.italic( - ' '.repeat( cli.INDENT_SIZE ) + - 'Not found any "MAJOR BREAKING CHANGES" commit but you can decide whether a next release should be treated as a major.' - ) ); - } - - return cli.confirmMajorBreakingChangeRelease( hasMajorBreakingChanges, { indentLevel: 1 } ) - .then( result => { - willBeMajorBump = result; - } ); - } - - /** - * If the next release will be the major release, the user needs to provide the version which will be used - * a the proposal version for all packages. - * - * @returns {Promise.} - */ - function typeNewProposalVersionForAllPackages() { - if ( !willBeMajorBump ) { - return Promise.resolve(); - } - - logProcess( 'Looking for the highest version in all packages...' ); - - const [ packageHighestVersion, highestVersion ] = [ ...pathsCollection.matched ] - .reduce( ( currentHighest, repositoryPath ) => { - const packageJson = getPackageJson( repositoryPath ); - - if ( semver.gt( packageJson.version, currentHighest[ 1 ] ) ) { - return [ packageJson.name, packageJson.version ]; - } - - return currentHighest; - }, [ null, '0.0.0' ] ); - - // An empty line increases the readability. - console.log( '' ); - - return cli.provideNewMajorReleaseVersion( highestVersion, packageHighestVersion, { indentLevel: 1 } ) - .then( version => { - nextVersion = version; - } ); - } - - /** - * Generates changelogs for packages. - * - * @returns {Promise} - */ - function generateChangelogs() { - logProcess( 'Generating changelogs for packages...' ); - - return executeOnPackages( pathsCollection.matched, repositoryPath => { - process.chdir( repositoryPath ); - - const changelogOptions = { - newVersion: nextVersion, - disableMajorBump: !willBeMajorBump, - indentLevel: 1, - useExplicitBreakingChangeGroups: true - }; - - return generateChangelogForSinglePackage( changelogOptions ) - .then( newVersionInChangelog => { - if ( newVersionInChangelog ) { - generatedChangelogsMap.set( getPackageJson( repositoryPath ).name, newVersionInChangelog ); - } else { - skippedChangelogs.add( repositoryPath ); - } - } ) - .catch( err => { - log.error( err ); - } ); - } ); - } - - /** - * Generates changelogs for packages that were skipped or didn't have any committed changes. - * - * For such packages we are generating "internal" release that increases the "patch" version. - * Unless, there should be a major bump. - * - * @returns {Promise} - */ - function generateInternalChangelogs() { - logProcess( 'Checking whether dependencies of skipped packages have changed...' ); - - const internalChangelogsPaths = new Map(); - const newVersion = willBeMajorBump ? nextVersion : 'patch'; - let clearRun = false; - - while ( !clearRun ) { - clearRun = true; - - for ( const packagePath of skippedChangelogs ) { - const packageJson = getPackageJson( packagePath ); - - // Check whether the dependencies of the current processing package will be released. - const willUpdateDependencies = Object.keys( packageJson.dependencies || {} ) - .some( dependencyName => { - return generatedChangelogsMap.has( dependencyName ) || internalChangelogsPaths.has( dependencyName ); - } ); - - // If so, bump the version for current package and release it too. - // The bump can be specified as `major` or `patch`. It depends whether we had the "MAJOR BREAKING CHANGES" commit. - if ( willUpdateDependencies ) { - internalChangelogsPaths.set( packageJson.name, packagePath ); - skippedChangelogs.delete( packagePath ); - clearRun = false; - } - } - } - - return executeOnPackages( internalChangelogsPaths.values(), repositoryPath => { - process.chdir( repositoryPath ); - - const changelogOptions = { - newVersion, - isInternalRelease: true, - indentLevel: 1, - useExplicitBreakingChangeGroups: true - }; - - return generateChangelogForSinglePackage( changelogOptions ) - .then( newVersion => { - generatedChangelogsMap.set( getPackageJson( repositoryPath ).name, newVersion ); - } ) - .catch( err => { - log.error( err ); - } ); - } ); - } - - /** - * Finds commits that contain a "MAJOR BREAKING CHANGES" note. - * - * @param {Set.} commits - * @returns {Set.} - */ - function filterMajorBreakingChangesCommits( commits ) { - const breakingChangesCommits = [ ...commits ] - .filter( commit => { - for ( const note of commit.notes ) { - if ( note.title === 'MAJOR BREAKING CHANGES' ) { - return true; - } - } - - return false; - } ); - - return new Set( breakingChangesCommits ); - } - - function logProcess( message ) { - log.info( '\nšŸ“ ' + chalk.cyan( message ) ); - } -}; - -/** - * @typedef {Object} SummaryChangelogResponse - * - * @property {Boolean} wasMajorRelease Determines whether generated changelogs were generated as a major breaking release. - * - * @property {String|null} version If `wasMajorRelease` is `true`, `version` contains a proposed version by a user. - */ diff --git a/packages/ckeditor5-dev-env/lib/release-tools/tasks/generatesummarychangelog.js b/packages/ckeditor5-dev-env/lib/release-tools/tasks/generatesummarychangelog.js deleted file mode 100644 index 1ec324c2a..000000000 --- a/packages/ckeditor5-dev-env/lib/release-tools/tasks/generatesummarychangelog.js +++ /dev/null @@ -1,624 +0,0 @@ -/** - * @license Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved. - * For licensing, see LICENSE.md. - */ - -'use strict'; - -const fs = require( 'fs' ); -const path = require( 'path' ); -const semver = require( 'semver' ); -const chalk = require( 'chalk' ); -const moment = require( 'moment' ); -const { tools, logger } = require( '@ckeditor/ckeditor5-dev-utils' ); -const changelogUtils = require( '../utils/changelog' ); -const cliUtils = require( '../utils/cli' ); -const displayCommits = require( '../utils/displaycommits' ); -const displayGeneratedChangelogs = require( '../utils/displaygeneratedchangelogs' ); -const executeOnPackages = require( '../utils/executeonpackages' ); -const generateChangelogFromCommits = require( '../utils/generatechangelogfromcommits' ); -const getPackageJson = require( '../utils/getpackagejson' ); -const getNewReleaseType = require( '../utils/getnewreleasetype' ); -const getSubRepositoriesPaths = require( '../utils/getsubrepositoriespaths' ); -const transformCommitFunctionFactory = require( '../utils/transform-commit/transformcommitforsubrepositoryfactory' ); -const versionUtils = require( '../utils/versions' ); - -const bumpTypesPriority = { - prerelease: 7, - major: 6, - premajor: 5, - minor: 4, - preminor: 3, - patch: 2, - prepatch: 1, - skip: 0 -}; - -/** - * Generates a summary changelog for the builds repositories and for the main CKEditor 5 repository. - * - * @param {Object} options - * @param {String} options.cwd Current working directory (packages) from which all paths will be resolved. - * @param {String} options.packages Where to look for other packages. - * @param {Array.} [options.skipPackages=[]] Name of packages which won't be touched. - * @param {Boolean} [options.skipMainRepository=false] Whether to skip the main repository. - * @param {String} [options.scope=null] Package names have to match to specified glob pattern. - * @param {String|null} [options.version=null] If specified, this version will be used as proposed - * during generating a changelog for a package. - */ -module.exports = function generateSummaryChangelog( options ) { - const log = logger(); - const cwd = process.cwd(); - - const indent = ' '.repeat( cliUtils.INDENT_SIZE ); - const pathsCollection = getSubRepositoriesPaths( { - cwd: options.cwd, - packages: options.packages, - scope: options.scope || null, - skipPackages: options.skipPackages || [], - skipMainRepository: true - } ); - - // The main repository must be at the end because its changelog is a summary of all changes that have been done. - if ( !options.skipMainRepository ) { - pathsCollection.skipped.delete( options.cwd ); - pathsCollection.matched.add( options.cwd ); - } - - const generatedChangelogMap = new Map(); - - logProcess( 'Generating summary changelogs...' ); - - return executeOnPackages( pathsCollection.matched, generateSummaryChangelogForSingleRepository ) - .then( () => { - logProcess( 'Summary' ); - - // An empty line increases the readability. - console.log( '' ); - displayGeneratedChangelogs( generatedChangelogMap ); - } ); - - // Generates the summary changelog for specified repository. - // - // @param {String} repositoryPath - // @returns {Promise} - function generateSummaryChangelogForSingleRepository( repositoryPath ) { - process.chdir( repositoryPath ); - - const packageJson = getPackageJson( repositoryPath ); - - log.info( '\n' + indent + chalk.bold( `Generating changelog for "${ chalk.underline( packageJson.name ) }"...` ) ); - - const dependencies = getMapWithDependenciesVersions( - getAllDependenciesForRepository( repositoryPath ) - ); - - let tagName = versionUtils.getLastFromChangelog( repositoryPath ); - let suggestedBumpFromCommits; - - if ( tagName ) { - tagName = 'v' + tagName; - } - - const transformCommitFunction = transformCommitFunctionFactory( { - returnInvalidCommit: true - } ); - - return getNewReleaseType( transformCommitFunction, { tagName } ) - .then( result => { - suggestedBumpFromCommits = result.releaseType === 'internal' ? 'skip' : result.releaseType; - - displayCommits( result.commits, { indentLevel: 2 } ); - - const suggestedBumpFromDependencies = getSuggestedBumpVersionType( dependencies ); - const commitsWeight = bumpTypesPriority[ suggestedBumpFromCommits ]; - const packagesWeight = bumpTypesPriority[ suggestedBumpFromDependencies ]; - - let newReleaseType; - - if ( options.version ) { - newReleaseType = options.version; - } else if ( !packagesWeight || commitsWeight > packagesWeight ) { - newReleaseType = suggestedBumpFromCommits; - } else { - newReleaseType = suggestedBumpFromDependencies; - } - - return cliUtils.provideVersion( packageJson.version, newReleaseType, { disableInternalVersion: true } ); - } ) - .then( version => { - if ( version === 'skip' ) { - return Promise.resolve(); - } - - let promise = Promise.resolve(); - - // Generate the changelog entries based on dependencies. - let changelogEntries = getChangelogFromDependencies( { - dependencies, - newVersion: version, - currentVersion: packageJson.version, - repositoryUrl: packageJson.repository.url.replace( /\.git$/, '' ) - } ); - - // Additional notes for changelog generated from commits should be added if any dependency has been added or changed. - const additionalNotes = changelogEntries.trim().split( '\n' ).length !== 1; - - if ( suggestedBumpFromCommits !== 'skip' ) { - promise = generateChangelogFromCommits( { - version, - additionalNotes, - currentTag: 'v' + version, - previousTag: tagName, - transformCommit: transformCommitFunctionFactory(), - isInternalRelease: false, - doNotSave: true - } ); - } - - return promise.then( changesBasedOnCommits => { - // Part of the changelog generated from commits should be attached to changelog entries. - if ( changesBasedOnCommits ) { - changelogEntries = changesBasedOnCommits.trim() + '\n\n' + - changelogEntries.split( '\n' ) - .slice( 1 ) // First line contains a header which is already generated. - .join( '\n' ) - .trim(); - } - - if ( !fs.existsSync( changelogUtils.changelogFile ) ) { - log.warning( indent + 'Changelog file does not exist. Creating...' ); - - changelogUtils.saveChangelog( changelogUtils.changelogHeader ); - } - - let currentChangelog = changelogUtils.getChangelog( repositoryPath ); - - // Remove header from current changelog. - currentChangelog = currentChangelog.replace( changelogUtils.changelogHeader, '' ); - - // Concat header, new and current changelog. - let newChangelog = changelogUtils.changelogHeader + changelogEntries + '\n\n\n' + currentChangelog.trim(); - newChangelog = newChangelog.trim() + '\n'; - - // Save the changelog. - changelogUtils.saveChangelog( newChangelog, repositoryPath ); - - log.info( - indent + - chalk.green( `Changelog for "${ chalk.underline( packageJson.name ) }" (v${ version }) has been generated.` ) - ); - - // Commit the new changelog. - tools.shExec( `git add ${ changelogUtils.changelogFile }`, { verbosity: 'error' } ); - tools.shExec( 'git commit -m "Docs: Changelog. [skip ci]"', { verbosity: 'error' } ); - - generatedChangelogMap.set( packageJson.name, version ); - } ); - } ) - .then( () => { - process.chdir( cwd ); - } ) - .catch( err => { - log.error( err.stack ); - } ); - } - - // Returns a list which contains all dependencies. It means ā€“ not only these specified in `package.json` - // but also dependency of the dependencies. - // - // @param {String} repositoryPath Path to the parsed repository. - // @returns {Set} List of all dependencies. - function getAllDependenciesForRepository( repositoryPath ) { - const packageJson = getPackageJson( repositoryPath ); - const packagesToCheck = Object.keys( packageJson.dependencies || packageJson.devDependencies ) - .filter( isValidDependency ); - - const allDependencies = new Set(); - const checkedPackages = new Set(); - - while ( packagesToCheck.length ) { - const packageName = packagesToCheck.shift(); - - // Does not check the same package more than once. - if ( checkedPackages.has( packageName ) ) { - continue; - } - - checkedPackages.add( packageName ); - - const currentPackagePath = getPathToRepository( packageName ); - - // Package cannot be dependency for itself. - if ( currentPackagePath === repositoryPath ) { - continue; - } - - // If package is not installed locally, we aren't able to get the changelog entries. - if ( !pathsCollection.skipped.has( currentPackagePath ) && !pathsCollection.matched.has( currentPackagePath ) ) { - continue; - } - - const currentDependencyPackageJson = getPackageJson( currentPackagePath ); - - packagesToCheck.push( - ...Object.keys( currentDependencyPackageJson.dependencies || {} ) - .filter( isValidDependency ) - ); - - allDependencies.add( packageName ); - } - - return allDependencies; - } - - // Checks whether specified package name matches to `@ckeditor/ckeditor5-*` schema. - // Dev package (`@ckeditor/ckeditor5-dev-*`) is not valid. - // - // @param {String} packageName - // @returns {Boolean} - function isValidDependency( packageName ) { - if ( !packageName.match( /^@ckeditor/ ) ) { - return false; - } - - if ( packageName.match( /-dev-/ ) ) { - return false; - } - - return true; - } - - // Returns a path to the repository for specified package. - // - // @param {String} packageName - // @returns {String} - function getPathToRepository( packageName ) { - return packageName.replace( '@ckeditor', path.join( options.cwd, options.packages ) ); - } - - // Builds a map which contains current and future versions of specified packages. - // - // @params {Set} dependencies - // @returns {Map} - function getMapWithDependenciesVersions( dependencies ) { - const dependenciesVersions = new Map(); - - for ( const packageName of [ ...dependencies ].sort() ) { - const repositoryPath = getPathToRepository( packageName ); - const nextVersion = versionUtils.getLastFromChangelog( repositoryPath ); - const currentVersion = versionUtils.getCurrent( repositoryPath ); - - // If "nextVersion" is null, the changelog for the package hasn't been generated. - if ( !nextVersion ) { - continue; - } - - // Changelog contains a version for the future release. - // Version specified in `package.json` is bumping during the release process, - // we can assume that the versions are different. - if ( nextVersion !== currentVersion ) { - dependenciesVersions.set( packageName, { currentVersion, nextVersion, repositoryPath } ); - } - } - - return dependenciesVersions; - } - - // Returns a new type of the release for current package. - // - // @params {String} version - // @params {Map} dependencies - // @returns {String} - function getSuggestedBumpVersionType( dependencies ) { - let currentBumpType = null; - - for ( const [ , { currentVersion, nextVersion } ] of dependencies ) { - if ( !nextVersion ) { - continue; - } - - const diffType = semver.diff( currentVersion, nextVersion ); - - if ( shouldOverwriteReleaseType( currentBumpType, diffType ) ) { - currentBumpType = diffType; - } - - // When the suggested bump is equal to "major", we can stop analyzing next versions. - if ( currentBumpType === 'major' ) { - break; - } - } - - return currentBumpType; - } - - // Checks whether specified `currentBumpType` bump for release can be overwrite. - // - // It returns true when: - // - "currentBumpType" is null (it's not set yet) or - // - returned diff has higher priority than the current suggested bump. - // - // @params {String} currentBumpType - // @params {String} diffType - // @returns {Boolean} - function shouldOverwriteReleaseType( currentBumpType, diffType ) { - if ( !bumpTypesPriority[ diffType ] ) { - return false; - } - - if ( !currentBumpType ) { - return true; - } - - return bumpTypesPriority[ diffType ] > bumpTypesPriority[ currentBumpType ]; - } - - // Generates new changelog entry. - // - // @params {Object} options - // @params {String} options.repositoryURL - // @params {String} options.newVersion - // @params {String} options.currentVersion - // @params {Map} options.dependencies - // @returns {String} - function getChangelogFromDependencies( options ) { - const date = moment().format( 'YYYY-MM-DD' ); - - const entries = [ - // eslint-disable-next-line max-len - `## [${ options.newVersion }](${ options.repositoryUrl }/compare/v${ options.currentVersion }...v${ options.newVersion }) (${ date })`, - '' - ]; - - const allowBreakingChangeInMinor = areBreakingChangesAcceptableInVersion( options.newVersion ); - const newPackages = getNewPackages( options.dependencies ); - - // We need to remove new packages from the whole collection because we don't want to have duplicated (as minor or major) releases. - removeDependencies( newPackages, options.dependencies ); - - const majorReleasePackages = getMajorReleasePackages( options.dependencies ); - const majorBreakingChangesReleasePackages = getMajorBreakingChangesReleasePackages( majorReleasePackages ); - let majorReleaseWithMinorChanges = new Set(); - - // For major releases, we would like to display in a separately category packages that have "MINOR BREAKING CHANGES". - if ( majorReleasePackages.size ) { - majorReleaseWithMinorChanges = getMinorBreakingChangesReleasePackages( options.dependencies ); - } - - const minorReleasePackages = getMinorReleasePackages( options.dependencies ); - const minorBreakingChangesReleasePackages = getMinorBreakingChangesReleasePackages( minorReleasePackages ); - - const patchReleasePackages = getPatchReleasePackages( options.dependencies ); - - // `major|minorBreakingChangesReleasePackages` are duplicated in `major|minorReleasePackages` collections. - // Because we don't want to duplicate them, let's clean it before starting generating changelog entries. - removeDependencies( majorReleaseWithMinorChanges, majorReleasePackages ); - removeDependencies( majorBreakingChangesReleasePackages, majorReleasePackages ); - removeDependencies( minorBreakingChangesReleasePackages, minorReleasePackages ); - - const hasChangesInAnyOfPackages = [ - newPackages.size, - majorReleasePackages.size, - majorBreakingChangesReleasePackages.size, - minorReleasePackages.size, - minorBreakingChangesReleasePackages.size, - patchReleasePackages.size - ].some( number => number > 0 ); - - // Push the "Dependencies" header to entries list if any package has been added or changed. - if ( hasChangesInAnyOfPackages ) { - entries.push( '### Dependencies' ); - entries.push( '' ); - } - - if ( newPackages.size ) { - entries.push( 'New packages:\n' ); - - for ( const [ packageName, { nextVersion } ] of newPackages ) { - entries.push( formatChangelogEntry( packageName, nextVersion ) ); - } - - entries.push( '' ); - } - - if ( majorBreakingChangesReleasePackages.size ) { - entries.push( 'Major releases (contain major breaking changes):\n' ); - - for ( const [ packageName, { currentVersion, nextVersion } ] of majorBreakingChangesReleasePackages ) { - entries.push( formatChangelogEntry( packageName, nextVersion, currentVersion ) ); - } - - entries.push( '' ); - } - - if ( majorReleaseWithMinorChanges.size ) { - entries.push( 'Major releases (contain minor breaking changes):\n' ); - - for ( const [ packageName, { currentVersion, nextVersion } ] of majorReleaseWithMinorChanges ) { - entries.push( formatChangelogEntry( packageName, nextVersion, currentVersion ) ); - } - - entries.push( '' ); - } - - if ( majorReleasePackages.size ) { - entries.push( 'Major releases (dependencies of those packages have breaking changes):\n' ); - - for ( const [ packageName, { currentVersion, nextVersion } ] of majorReleasePackages ) { - entries.push( formatChangelogEntry( packageName, nextVersion, currentVersion ) ); - } - - entries.push( '' ); - } - - if ( minorBreakingChangesReleasePackages.size ) { - if ( allowBreakingChangeInMinor ) { - entries.push( 'Minor releases (containing major/minor breaking changes):\n' ); - } else { - entries.push( 'Minor releases (containing minor breaking changes):\n' ); - } - - for ( const [ packageName, { currentVersion, nextVersion } ] of minorBreakingChangesReleasePackages ) { - entries.push( formatChangelogEntry( packageName, nextVersion, currentVersion ) ); - } - - entries.push( '' ); - } - - if ( minorReleasePackages.size ) { - entries.push( 'Minor releases (new features, no breaking changes):\n' ); - - for ( const [ packageName, { currentVersion, nextVersion } ] of minorReleasePackages ) { - entries.push( formatChangelogEntry( packageName, nextVersion, currentVersion ) ); - } - - entries.push( '' ); - } - - if ( patchReleasePackages.size ) { - entries.push( 'Patch releases (bug fixes, internal changes):\n' ); - - for ( const [ packageName, { currentVersion, nextVersion } ] of patchReleasePackages ) { - entries.push( formatChangelogEntry( packageName, nextVersion, currentVersion ) ); - } - - entries.push( '' ); - } - - return entries.join( '\n' ).trim(); - } - - // Filters out packages which were not introduced in the current milestone. - // - // @params {Map} dependencies - // @returns {Map} - function getNewPackages( dependencies ) { - return filterPackages( dependencies, ( packageName, { currentVersion } ) => { - return semver.eq( currentVersion, '0.0.1' ); - } ); - } - - // Returns a collection of packages which the future release is marked as "major" and contain "MAJOR BREAKING CHANGES" - // entries in their changelogs. - // - // @params {Map} dependencies - // @returns {Map} - function getMajorBreakingChangesReleasePackages( dependencies ) { - return filterPackages( dependencies, ( packageName, { nextVersion, repositoryPath } ) => { - return changelogUtils.hasMajorBreakingChanges( nextVersion, repositoryPath ); - } ); - } - - // Returns a collection of packages which the future release is marked as "major". - // - // @params {Map} dependencies - // @returns {Map} - function getMajorReleasePackages( dependencies ) { - return filterPackages( dependencies, ( packageName, { currentVersion, nextVersion } ) => { - const versionDiff = semver.diff( currentVersion, nextVersion ); - - return versionDiff === 'major' || versionDiff === 'premajor' || versionDiff === 'prerelease'; - } ); - } - - // Returns a collection of packages which the future release is marked as "minor" and contain "MINOR BREAKING CHANGES" - // entries in their changelogs. - // - // @params {Map} dependencies - // @returns {Map} - function getMinorBreakingChangesReleasePackages( dependencies ) { - return filterPackages( dependencies, ( packageName, { nextVersion, repositoryPath } ) => { - return changelogUtils.hasMinorBreakingChanges( nextVersion, repositoryPath ); - } ); - } - - // Returns a collection of packages which the future release is marked as "minor". - // - // @params {Map} dependencies - // @returns {Map} - function getMinorReleasePackages( dependencies ) { - return filterPackages( dependencies, ( packageName, { currentVersion, nextVersion } ) => { - const versionDiff = semver.diff( currentVersion, nextVersion ); - - return versionDiff === 'minor' || versionDiff === 'preminor'; - } ); - } - - // Returns a collection of packages which the future release is marked as "patch". - // - // @params {Map} dependencies - // @returns {Map} - function getPatchReleasePackages( dependencies ) { - return filterPackages( dependencies, ( packageName, { currentVersion, nextVersion } ) => { - const versionDiff = semver.diff( currentVersion, nextVersion ); - - return versionDiff === 'patch' || versionDiff === 'prepatch'; - } ); - } - - // Executes specified callback for each item on passed dependencies collection. - // - // @params {Map} dependencies - // @params {Function} callback A function which accepts three parameters: `String` packageName, `String` currentVersion - // and `String` nextVersion. The function must return `Boolean` value. - // @returns {Map} - function filterPackages( dependencies, callback ) { - const packages = new Map(); - - for ( const [ packageName, options ] of dependencies ) { - if ( callback( packageName, options ) ) { - packages.set( packageName, Object.assign( {}, options ) ); - } - } - - return packages; - } - - // Removes packages from the collection (`removeFrom`) based on items in the `dependenciesToRemove` collection. - // - // @params {Map} dependenciesToRemove - // @params {Map} removeFrom - function removeDependencies( dependenciesToRemove, removeFrom ) { - for ( const [ packageName ] of dependenciesToRemove ) { - removeFrom.delete( packageName ); - } - } - - // Returns a formatted string for changelog. - // - // @params {String} packageName - // @params {String} nextVersion - // @params {String|null} [currentVersion=null] - // @returns {String} - function formatChangelogEntry( packageName, nextVersion, currentVersion = null ) { - const packageJson = getPackageJson( getPathToRepository( packageName ) ); - const repositoryUrl = packageJson.repository.url.replace( /\.git$/, '' ); - const githubUrl = `${ repositoryUrl }/releases/tag/v${ nextVersion }`; - const npmUrl = `https://www.npmjs.com/package/${ packageName }`; - - if ( currentVersion ) { - return `* [${ packageName }](${ npmUrl }): v${ currentVersion } => [v${ nextVersion }](${ githubUrl })`; - } - - return `* [${ packageName }](${ npmUrl }): [v${ nextVersion }](${ githubUrl })`; - } - - // Checks whether breaking changes are acceptable for specified version. - // - // @params {String} version - // @returns {Boolean} - function areBreakingChangesAcceptableInVersion( version ) { - // For any version above the `1.0.0`, breaking changes mean that "major" version will be bumped. - if ( !semver.gt( '1.0.0', version ) ) { - return false; - } - - // "prerelease" below `1.0.0` should be parsed as "major" release. - return semver.diff( version, '1.0.0' ) !== 'prerelease'; - } - - function logProcess( message ) { - log.info( '\nšŸ“ ' + chalk.cyan( message ) ); - } -}; diff --git a/packages/ckeditor5-dev-env/lib/release-tools/tasks/releasesubrepositories.js b/packages/ckeditor5-dev-env/lib/release-tools/tasks/releasesubrepositories.js index 0b829d850..ed1b30b74 100644 --- a/packages/ckeditor5-dev-env/lib/release-tools/tasks/releasesubrepositories.js +++ b/packages/ckeditor5-dev-env/lib/release-tools/tasks/releasesubrepositories.js @@ -16,7 +16,7 @@ const displaySkippedPackages = require( '../utils/displayskippedpackages' ); const executeOnPackages = require( '../utils/executeonpackages' ); const { getChangesForVersion } = require( '../utils/changelog' ); const getPackageJson = require( '../utils/getpackagejson' ); -const getSubPackagesPaths = require( '../utils/getsubpackagespaths' ); +const getPackagesPaths = require( '../utils/getpackagespaths' ); const { Octokit } = require( '@octokit/rest' ); const PACKAGE_JSON_TEMPLATE_PATH = require.resolve( '../templates/release-package.json' ); @@ -96,7 +96,7 @@ module.exports = function releaseSubRepositories( options ) { const dryRun = Boolean( options.dryRun ); const emptyReleases = Array.isArray( options.emptyReleases ) ? options.emptyReleases : [ options.emptyReleases ].filter( Boolean ); - const pathsCollection = getSubPackagesPaths( { + const pathsCollection = getPackagesPaths( { cwd: options.cwd, packages: options.packages, skipPackages: options.skipPackages || [], diff --git a/packages/ckeditor5-dev-env/lib/release-tools/templates/commit.hbs b/packages/ckeditor5-dev-env/lib/release-tools/templates/commit.hbs index 6546751e3..680cabc6f 100644 --- a/packages/ckeditor5-dev-env/lib/release-tools/templates/commit.hbs +++ b/packages/ckeditor5-dev-env/lib/release-tools/templates/commit.hbs @@ -1,12 +1,8 @@ -* {{#if subject}} - {{~subject}} -{{~else}} - {{~title}} -{{~/if}} +* {{#if scope}}**{{~scope.[0]}}**: {{/if}}{{subject}} {{~#unless @root.skipCommitsLink}} {{~!-- commit link --}} {{#if @root.linkReferences~}} - ([{{hash}}]( + ([commit]( {{~#if @root.repository}} {{~#if @root.host}} {{~@root.host}}/ diff --git a/packages/ckeditor5-dev-env/lib/release-tools/templates/footer.hbs b/packages/ckeditor5-dev-env/lib/release-tools/templates/footer.hbs index 15c9852d6..2492c731d 100644 --- a/packages/ckeditor5-dev-env/lib/release-tools/templates/footer.hbs +++ b/packages/ckeditor5-dev-env/lib/release-tools/templates/footer.hbs @@ -3,7 +3,7 @@ ### {{title}} {{#each notes}} -* {{text}} +* {{#if scope}}**{{~scope.[0]}}**: {{/if}}{{text}} {{/each}} {{/each}} diff --git a/packages/ckeditor5-dev-env/lib/release-tools/templates/template.hbs b/packages/ckeditor5-dev-env/lib/release-tools/templates/template.hbs index 6608d3767..1a4084a55 100644 --- a/packages/ckeditor5-dev-env/lib/release-tools/templates/template.hbs +++ b/packages/ckeditor5-dev-env/lib/release-tools/templates/template.hbs @@ -5,6 +5,18 @@ Internal changes only (updated dependencies, documentation, etc.). {{else}} +{{#if highlightsPlaceholder}} +### Release highlights + +TODO: Add a link to the blog post. + +{{/if}} +{{#if collaborationFeatures}} +### Collaboration features + +The CKEditor 5 Collaboration features changelog can be found here: https://ckeditor.com/collaboration/changelog. + +{{/if}} {{> footer}} {{#each commitGroups}} ### {{title}} diff --git a/packages/ckeditor5-dev-env/lib/release-tools/utils/changelog.js b/packages/ckeditor5-dev-env/lib/release-tools/utils/changelog.js index 3e0be7617..37973481b 100644 --- a/packages/ckeditor5-dev-env/lib/release-tools/utils/changelog.js +++ b/packages/ckeditor5-dev-env/lib/release-tools/utils/changelog.js @@ -61,40 +61,6 @@ const utils = { const changelogFile = path.join( cwd, utils.changelogFile ); fs.writeFileSync( changelogFile, content, 'utf-8' ); - }, - - /** - * Checks whether specified `version` contains the "MAJOR BREAKING CHANGES" header. - * - * @param {String} version Version to check. - * @param {String} [cwd=process.cwd()] Where to look for the changelog file. - * @returns {Boolean} - */ - hasMajorBreakingChanges( version, cwd = process.cwd() ) { - const changes = utils.getChangesForVersion( version, cwd ); - - if ( !changes ) { - throw new Error( `Entries for specified version (${ version }) cannot be found.` ); - } - - return !!changes.match( /### MAJOR BREAKING CHANGES/ ); - }, - - /** - * Checks whether specified `version` contains the "MINOR BREAKING CHANGES" header. - * - * @param {String} version Version to check. - * @param {String} [cwd=process.cwd()] Where to look for the changelog file. - * @returns {Boolean} - */ - hasMinorBreakingChanges( version, cwd = process.cwd() ) { - const changes = utils.getChangesForVersion( version, cwd ); - - if ( !changes ) { - throw new Error( `Entries for specified version (${ version }) cannot be found.` ); - } - - return !!changes.match( /### MINOR BREAKING CHANGES/ ); } }; diff --git a/packages/ckeditor5-dev-env/lib/release-tools/utils/cli.js b/packages/ckeditor5-dev-env/lib/release-tools/utils/cli.js index 4ec3d8c6d..adbee3334 100644 --- a/packages/ckeditor5-dev-env/lib/release-tools/utils/cli.js +++ b/packages/ckeditor5-dev-env/lib/release-tools/utils/cli.js @@ -126,6 +126,7 @@ const cli = { * @param {String|null} releaseTypeOrNewVersion * @param {Object} [options] * @param {Boolean} [options.disableInternalVersion=false] Whether to "internal" version is enabled. + * @param {Boolean} [options.disableSkipVersion=false] Whether to "skip" version is enabled. * @param {Number} [options.indentLevel=0] The indent level. * @returns {Promise.} */ @@ -152,7 +153,11 @@ const cli = { }, validate( input ) { - if ( input === 'skip' || ( !options.disableInternalVersion && input === 'internal' ) ) { + if ( !options.disableSkipVersion && input === 'skip' ) { + return true; + } + + if ( !options.disableInternalVersion && input === 'internal' ) { return true; } @@ -292,7 +297,7 @@ const cli = { }, /** - * Asks a user for a confirmation for removing archives created by `npm pack` command. + * Asks a user for a confirmation for major breaking release. * * @param {Boolean} haveMajorBreakingChangeCommits Whether the answer for the question should be "Yes". * @param {Object} [options={}] @@ -304,7 +309,7 @@ const cli = { const confirmQuestion = { message: [ 'If at least one of those changes is really a major breaking change, this will be a major release.', - 'Should this be a major release?' + 'Should it be the major release?' ].join( ' ' ), type: 'confirm', name: 'confirm', diff --git a/packages/ckeditor5-dev-env/lib/release-tools/utils/displaycommits.js b/packages/ckeditor5-dev-env/lib/release-tools/utils/displaycommits.js index f601550b0..3352622f9 100644 --- a/packages/ckeditor5-dev-env/lib/release-tools/utils/displaycommits.js +++ b/packages/ckeditor5-dev-env/lib/release-tools/utils/displaycommits.js @@ -7,7 +7,7 @@ const chalk = require( 'chalk' ); const { logger } = require( '@ckeditor/ckeditor5-dev-utils' ); -const utils = require( './transform-commit/transform-commit-utils' ); +const utils = require( './transformcommitutils' ); const { INDENT_SIZE, COMMIT_INDENT_SIZE } = require( './cli' ); /** @@ -21,47 +21,85 @@ module.exports = function displayCommits( commits, options = {} ) { const attachLinkToCommit = options.attachLinkToCommit || false; const indentLevel = options.indentLevel || 1; - const listIndent = ' '.repeat( INDENT_SIZE * indentLevel ); - const listEntriesIndent = ' '.repeat( INDENT_SIZE * indentLevel + COMMIT_INDENT_SIZE ); if ( !( commits.length || commits.size ) ) { log.info( listIndent + chalk.italic( 'No commits to display.' ) ); } + const COMMITS_SEPARATOR = listIndent + chalk.gray( '-'.repeat( 112 ) ); + + // Group of commits by the commit's hash. + /** @type {Map.>} */ + const commitGroups = new Map(); + for ( const singleCommit of commits ) { - const hasCorrectType = utils.availableCommitTypes.has( singleCommit.rawType ); - const isCommitIncluded = utils.availableCommitTypes.get( singleCommit.rawType ); + getCommitGroup( singleCommit ).add( singleCommit ); + } - let logMessage = `${ listIndent }* ${ chalk.yellow( singleCommit.hash ) } "${ utils.truncate( singleCommit.header, 100 ) }" `; + // A flag that helps avoid duplication separators if two groups are consecutive one after another. + let finishedWithSeparator = false; - if ( hasCorrectType && isCommitIncluded ) { - logMessage += chalk.green( 'INCLUDED' ); - } else if ( hasCorrectType && !isCommitIncluded ) { - logMessage += chalk.grey( 'SKIPPED' ); - } else { - logMessage += chalk.red( 'INVALID' ); + for ( const [ hash, commits ] of commitGroups ) { + // Do not duplicate the separator if it was already added. + if ( commits.size > 1 && !finishedWithSeparator ) { + log.info( COMMITS_SEPARATOR ); } - // Avoid displaying singleCommit merge twice. - if ( singleCommit.merge && singleCommit.merge !== singleCommit.header ) { - logMessage += `\n${ listEntriesIndent }${ chalk.italic( singleCommit.merge ) }`; - } + for ( const singleCommit of commits.values() ) { + const hasCorrectType = utils.availableCommitTypes.has( singleCommit.rawType ); + const isCommitIncluded = utils.availableCommitTypes.get( singleCommit.rawType ); + + const indent = commits.size > 1 ? listIndent.slice( 0, listIndent.length - 1 ) + chalk.gray( '|' ) : listIndent; + const noteIndent = indent + ' '.repeat( COMMIT_INDENT_SIZE ); + + let logMessage = `${ indent }* ${ chalk.yellow( hash.slice( 0, 7 ) ) } "${ utils.truncate( singleCommit.header, 100 ) }" `; + + if ( hasCorrectType && isCommitIncluded ) { + logMessage += chalk.green( 'INCLUDED' ); + } else if ( hasCorrectType && !isCommitIncluded ) { + logMessage += chalk.grey( 'SKIPPED' ); + } else { + logMessage += chalk.red( 'INVALID' ); + } - for ( const note of singleCommit.notes ) { - if ( note.title.match( /^(MAJOR|MINOR)/ ) ) { + // Avoid displaying singleCommit merge twice. + if ( singleCommit.merge && singleCommit.merge !== singleCommit.header ) { + logMessage += `\n${ noteIndent }${ chalk.italic( singleCommit.merge ) }`; + } + + for ( const note of singleCommit.notes ) { const limit = 100 - note.title.length; - logMessage += `\n${ listEntriesIndent }${ note.title }: ${ utils.truncate( note.text, limit ) } `; + logMessage += `\n${ noteIndent }${ note.title }: ${ utils.truncate( note.text, limit ) } `; + } + + if ( attachLinkToCommit ) { + const url = `${ singleCommit.repositoryUrl }/commit/${ singleCommit.hash }`; + + logMessage += `\n${ noteIndent }${ chalk.gray( url ) }`; } + + log.info( logMessage ); } - if ( attachLinkToCommit ) { - const url = `${ singleCommit.repositoryUrl }/commit/${ singleCommit.hash }`; + if ( commits.size > 1 ) { + finishedWithSeparator = true; + log.info( COMMITS_SEPARATOR ); + } else { + finishedWithSeparator = false; + } + } - logMessage += `\n${ listEntriesIndent }${ chalk.gray( url ) }`; + /** + * @param {Commit} commit + * @returns {Set.} + */ + function getCommitGroup( commit ) { + if ( !commitGroups.has( commit.hash ) ) { + commitGroups.set( commit.hash, new Set() ); } - log.info( logMessage ); + return commitGroups.get( commit.hash ); } }; diff --git a/packages/ckeditor5-dev-env/lib/release-tools/utils/displaygeneratedchangelogs.js b/packages/ckeditor5-dev-env/lib/release-tools/utils/displaygeneratedchangelogs.js deleted file mode 100644 index ece13234b..000000000 --- a/packages/ckeditor5-dev-env/lib/release-tools/utils/displaygeneratedchangelogs.js +++ /dev/null @@ -1,31 +0,0 @@ -/** - * @license Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved. - * For licensing, see LICENSE.md. - */ - -'use strict'; - -const chalk = require( 'chalk' ); -const { logger } = require( '@ckeditor/ckeditor5-dev-utils' ); -const { INDENT_SIZE } = require( './cli' ); - -/** - * Displays package names and their new versions. - * - * @param {Map} generatedChangelogsMap - */ -module.exports = function displayGeneratedChangelogs( generatedChangelogsMap ) { - if ( !generatedChangelogsMap.size ) { - return; - } - - const indent = ' '.repeat( INDENT_SIZE ); - - let message = indent + chalk.bold.underline( 'Changelogs for the following packages have been generated:' ) + '\n'; - - for ( const [ packageName, version ] of generatedChangelogsMap ) { - message += indent + ` * ${ packageName }: v${ version }\n`; - } - - logger().info( message ); -}; diff --git a/packages/ckeditor5-dev-env/lib/release-tools/utils/generatechangelog.js b/packages/ckeditor5-dev-env/lib/release-tools/utils/generatechangelog.js new file mode 100644 index 000000000..15c701d53 --- /dev/null +++ b/packages/ckeditor5-dev-env/lib/release-tools/utils/generatechangelog.js @@ -0,0 +1,116 @@ +/** + * @license Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */ + +'use strict'; + +const { Readable } = require( 'stream' ); +const { stream } = require( '@ckeditor/ckeditor5-dev-utils' ); +const conventionalChangelogWriter = require( 'conventional-changelog-writer' ); + +const UPDATED_TRANSLATION_COMMIT = '* Updated translations.'; + +/** + * Generates the changelog based on commits. + * + * @param {Array.} commits + * + * @param {Object} context + * @param {String} context.version Current version for the release. + * @param {String} context.repoUrl The repository URL. + * @param {String} context.currentTag A tag for the current version. + * @param {String} context.commit Commit keyword in the URL. + * @param {String} [context.previousTag] A tag for the previous version. + * @param {Boolean} [options.highlightsPlaceholder=false] Whether to add a note about release highlights. + * @param {Boolean} [options.collaborationFeatures=false] Whether to add a note about collaboration features. + * @param {Boolean} [context.skipCommitsLink=false] Whether to skip adding links to commit. + * @param {Boolean} [context.skipCompareLink=false] Whether to remove the compare URL in the header. + * + * @param {Object} options + * @param {Object} options.transform + * @param {Function} options.transform.hash A function for mapping the commit's hash. + * @param {Array.|String} options.groupBy A key for grouping the commits. + * @param {Function} options.commitGroupsSort A sort function for the groups. + * @param {Function} options.noteGroupsSort A soft function for the notes. + * @param {String} options.mainTemplate The main template for the changelog. + * @param {String} options.headerPartial The "header" partial used in the main template. + * @param {String} options.commitPartial The "commit" partial used in the main template. + * @param {String} options.footerPartial The "footer" partial used in the main template. + * + * @returns {Promise.} + */ +module.exports = function generateChangelog( commits, context, options ) { + const commitStream = new Readable( { objectMode: true } ); + /* istanbul ignore next */ + commitStream._read = function() {}; + + for ( const commitItem of commits ) { + commitStream.push( commitItem ); + } + + commitStream.push( null ); + + return new Promise( ( resolve, reject ) => { + commitStream + .pipe( conventionalChangelogWriter( context, options ) ) + .pipe( stream.noop( changes => { + changes = mergeUpdateTranslationsCommits( changes.toString(), { + skipCommitsLink: context.skipCommitsLink + } ); + + resolve( changes ); + } ) ) + .on( 'error', reject ); + } ); +}; + +/** + * Merges multiple "Updated translations." entries into the single commit. + * + * @param {String} changelog Generated changelog. + * @param {Object} [options={}] + * @param {Boolean} [options.skipCommitsLink=false] Whether to skip adding links to commit. + * @returns {String} + */ +function mergeUpdateTranslationsCommits( changelog, options = {} ) { + let foundUpdatedTranslationCommit = false; + + const changelogAsArray = changelog.split( '\n' ); + + // An array that contains duplicated commits. + const removedEntries = []; + + // An array that contains changelog without duplicated entries. + const uniqueEntries = changelogAsArray.filter( line => { + if ( !line.startsWith( UPDATED_TRANSLATION_COMMIT ) ) { + return true; + } + + if ( foundUpdatedTranslationCommit ) { + removedEntries.push( line ); + + return false; + } + + foundUpdatedTranslationCommit = true; + + return true; + } ); + + if ( options.skipCommitsLink ) { + return uniqueEntries.join( '\n' ); + } + + return uniqueEntries.map( line => { + if ( !line.startsWith( UPDATED_TRANSLATION_COMMIT ) ) { + return line; + } + + const newLine = line + ' ' + removedEntries.map( entry => { + return entry.match( /(\(\[commit\].*)$/ )[ 1 ]; + } ).join( ' ' ); + + return newLine.trim().replace( /\) \(/g, ', ' ); + } ).join( '\n' ); +} diff --git a/packages/ckeditor5-dev-env/lib/release-tools/utils/generatechangelogfromcommits.js b/packages/ckeditor5-dev-env/lib/release-tools/utils/generatechangelogfromcommits.js deleted file mode 100644 index 59d05cf53..000000000 --- a/packages/ckeditor5-dev-env/lib/release-tools/utils/generatechangelogfromcommits.js +++ /dev/null @@ -1,165 +0,0 @@ -/** - * @license Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved. - * For licensing, see LICENSE.md. - */ - -'use strict'; - -const fs = require( 'fs' ); -const conventionalChangelog = require( 'conventional-changelog' ); -const changelogUtils = require( './changelog' ); -const getWriterOptions = require( './transform-commit/getwriteroptions' ); -const parserOptions = require( './transform-commit/parser-options' ); -const { stream, logger } = require( '@ckeditor/ckeditor5-dev-utils' ); -const { additionalCommitNotes } = require( './transform-commit/transform-commit-utils' ); -const cli = require( './cli' ); - -const UPDATED_TRANSLATION_COMMIT = '* Updated translations.'; - -/** - * Generates a changelog based on user's commits in the repository and saves - * it in the changelog file. - * - * @param {Object} options - * @param {String} options.version A version for generated changelog. - * @param {Function} options.transformCommit A function which transforms commits. - * @param {String|null} options.tagName Name of the last created tag for the repository. - * @param {String} options.newTagName Name of the tag for current version. - * @param {Boolean} [options.isInternalRelease=false] Whether the changelog is generated for internal release. - * @param {Boolean} [options.doNotSave=false] If set on `true`, changes will be resolved in returned promise - * instead of saved in CHANGELOG file. - * @param {Boolean} [options.additionalNotes=false] If set on `true, each category will contain additional description. - * See: `/packages/ckeditor5-dev-env/lib/release-tools/utils/transform-commit/transform-commit-utils.js#additionalCommitNotes` - * @param {Boolean} [options.skipLinks=false] If set on true, links to release or commits will be omitted. - * @param {Number} [options.indentLevel=0] The indent level. This function could be used inside another (bigger) script. If we would like to - * display indents logs, we need to increase/decrease indent level manually. - * @returns {Promise} - */ -module.exports = function generateChangelogFromCommits( options ) { - const log = logger(); - const indentLevel = options.indentLevel || 0; - const indent = ' '.repeat( indentLevel * cli.INDENT_SIZE ); - - return new Promise( resolve => { - if ( !options.doNotSave && !fs.existsSync( changelogUtils.changelogFile ) ) { - log.warning( indent + 'Changelog file does not exist. Creating...' ); - - changelogUtils.saveChangelog( changelogUtils.changelogHeader ); - } - - const context = { - version: options.version, - currentTag: options.newTagName, - previousTag: options.tagName, - isInternalRelease: Boolean( options.isInternalRelease ), - additionalNotes: {}, - skipCommitsLink: Boolean( options.skipLinks ), - skipCompareLink: Boolean( options.skipLinks ) - }; - - if ( options.additionalNotes ) { - context.additionalNotes = additionalCommitNotes; - } - - const gitRawCommitsOpts = { - from: options.tagName, - merges: undefined, - firstParent: true - }; - - const writerOptions = getWriterOptions( options.transformCommit ); - - /* istanbul ignore next */ - if ( process.env.DEBUG ) { - // Displays the final `context` which will be used to generate the changelog. - // It contains grouped commits, repository details, etc. - writerOptions.debug = getDebugFuntion(); - } - - const changelogStream = conventionalChangelog( {}, context, gitRawCommitsOpts, parserOptions, writerOptions ); - - changelogStream - .pipe( changelogPipe( { - done: resolve, - doNotSave: options.doNotSave, - version: options.version, - stream: changelogStream - } ) ); - } ); -}; - -function changelogPipe( options ) { - return stream.noop( function( changes ) { - if ( options.stream.destroyed ) { - return; - } - - const newEntries = groupUpdatedTranslationsCommits( changes.toString() ); - - if ( options.doNotSave ) { - return options.done( newEntries ); - } - - let currentChangelog = changelogUtils.getChangelog(); - - // Remove header from current changelog. - currentChangelog = currentChangelog.replace( changelogUtils.changelogHeader, '' ); - - // Concat header, new and current changelog. - let newChangelog = changelogUtils.changelogHeader + newEntries + currentChangelog.trim(); - newChangelog = newChangelog.trim() + '\n'; - - // Save the changelog. - changelogUtils.saveChangelog( newChangelog ); - - // When the CHANGELOG.md is being created for the first time by the script, `conventionalChangelog()` receives - // data in the stream twice. It causes generating the changelog twice. The first one for the specified package (cwd), - // the second one is being generated for the next cwd in a queue (or the cwd where the entire script was called). - // We need to destroy the stream manually in order to avoid calling it more than once. - options.stream.destroy(); - options.done( options.version ); - } ); -} - -function getDebugFuntion() { - /* istanbul ignore next */ - return ( ...params ) => { - console.log( ...params ); - }; -} - -function groupUpdatedTranslationsCommits( changelog ) { - let foundUpdatedTranslationCommit = false; - - const changelogAsArray = changelog.split( '\n' ); - - // An array that contains duplicated commits. - const removedEntries = []; - - // An array that contains changelog without duplicated entries. - const uniqueEntries = changelogAsArray.filter( line => { - if ( !line.startsWith( UPDATED_TRANSLATION_COMMIT ) ) { - return true; - } - - if ( foundUpdatedTranslationCommit ) { - removedEntries.push( line ); - - return false; - } - - foundUpdatedTranslationCommit = true; - - return true; - } ); - - return uniqueEntries.map( line => { - if ( !line.startsWith( UPDATED_TRANSLATION_COMMIT ) ) { - return line; - } - - return line + ' ' + removedEntries.map( entry => { - return entry.match( /(\(\[.{7}\]\([^)]+\)\))/ )[ 1 ]; - } ).join( ' ' ); - } ).join( '\n' ); -} diff --git a/packages/ckeditor5-dev-env/lib/release-tools/utils/transform-commit/getchangedfilesforcommit.js b/packages/ckeditor5-dev-env/lib/release-tools/utils/getchangedfilesforcommit.js similarity index 89% rename from packages/ckeditor5-dev-env/lib/release-tools/utils/transform-commit/getchangedfilesforcommit.js rename to packages/ckeditor5-dev-env/lib/release-tools/utils/getchangedfilesforcommit.js index d64d8f516..81ddb0c99 100644 --- a/packages/ckeditor5-dev-env/lib/release-tools/utils/transform-commit/getchangedfilesforcommit.js +++ b/packages/ckeditor5-dev-env/lib/release-tools/utils/getchangedfilesforcommit.js @@ -26,5 +26,8 @@ module.exports = function getChangedFilesForCommit( commitId ) { // other-file2 <-- files from last commit before merge // We need to filter out files from commit before merge. - return changedFiles.split( '\n\n' )[ 0 ].split( '\n' ); + return changedFiles.split( '\n\n' )[ 0 ] + .split( '\n' ) + .map( file => file.trim() ) + .filter( item => item ); }; diff --git a/packages/ckeditor5-dev-env/lib/release-tools/utils/getcommits.js b/packages/ckeditor5-dev-env/lib/release-tools/utils/getcommits.js new file mode 100644 index 000000000..14ef696ba --- /dev/null +++ b/packages/ckeditor5-dev-env/lib/release-tools/utils/getcommits.js @@ -0,0 +1,65 @@ +/** + * @license Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */ + +'use strict'; + +const conventionalCommitsParser = require( 'conventional-commits-parser' ); +const conventionalCommitsFilter = require( 'conventional-commits-filter' ); +const gitRawCommits = require( 'git-raw-commits' ); +const concat = require( 'concat-stream' ); +const parserOptions = require( './parseroptions' ); + +/** + * Returns a promise that resolves an array of commits since the last tag specified as `options.from`. + * + * @param {Function} transformCommit + * @param {Object} options + * @param {String} [options.from] A commit or tag name that will be the first param of the range of commits to collect. + * @returns {Promise.>} + */ +module.exports = function getCommits( transformCommit, options = {} ) { + const gitRawCommitsOpts = { + format: '%B%n-hash-%n%H', + from: options.from, + merges: undefined, + firstParent: true + }; + + return new Promise( ( resolve, reject ) => { + const stream = gitRawCommits( gitRawCommitsOpts ) + .on( 'error', err => { + /* istanbul ignore else */ + if ( err.message.match( /'HEAD': unknown/ ) ) { + reject( new Error( 'Given repository is empty.' ) ); + } else if ( err.message.match( new RegExp( `'${ options.from }\\.\\.HEAD': unknown` ) ) ) { + reject( new Error( + `Cannot find tag or commit "${ options.from }" in given repository.` + ) ); + } else { + reject( err ); + } + } ); + + stream.pipe( conventionalCommitsParser( parserOptions ) ) + .pipe( concat( data => { + const commits = conventionalCommitsFilter( data ) + .map( commit => transformCommit( commit ) ) + .reduce( ( allCommits, commit ) => { + if ( Array.isArray( commit ) ) { + allCommits.push( ...commit ); + } else { + allCommits.push( commit ); + } + + return allCommits; + }, [] ) + .filter( commit => commit ); + + stream.destroy(); + + return resolve( commits ); + } ) ); + } ); +}; diff --git a/packages/ckeditor5-dev-env/lib/release-tools/utils/getnewreleasetype.js b/packages/ckeditor5-dev-env/lib/release-tools/utils/getnewreleasetype.js deleted file mode 100644 index db67ecc85..000000000 --- a/packages/ckeditor5-dev-env/lib/release-tools/utils/getnewreleasetype.js +++ /dev/null @@ -1,109 +0,0 @@ -/** - * @license Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved. - * For licensing, see LICENSE.md. - */ - -'use strict'; - -const conventionalCommitsParser = require( 'conventional-commits-parser' ); -const conventionalCommitsFilter = require( 'conventional-commits-filter' ); -const gitRawCommits = require( 'git-raw-commits' ); -const concat = require( 'concat-stream' ); -const parserOptions = require( './transform-commit/parser-options' ); -const { availableCommitTypes } = require( './transform-commit/transform-commit-utils' ); -const getPackageJson = require( './getpackagejson' ); - -/** - * Returns a type (major, minor, patch) of the next release based on commits. - * - * If given package has not changed, suggested version will be equal to 'skip'. - * - * It returns a promise that resolves to the `releaseType` and all `commits` that have been checked. - * - * @param {Function} transformCommit - * @param {Object} options - * @param {String|null} options.tagName Name of the last created tag for the repository. - * @returns {Promise.} - */ -module.exports = function getNewReleaseType( transformCommit, options = {} ) { - const gitRawCommitsOpts = { - format: '%B%n-hash-%n%H', - from: options.tagName, - merges: undefined, - firstParent: true - }; - - const context = { - packageData: getPackageJson() - }; - - return new Promise( ( resolve, reject ) => { - gitRawCommits( gitRawCommitsOpts ) - .on( 'error', err => { - if ( err.message.match( /'HEAD': unknown/ ) ) { - reject( new Error( 'Given repository is empty.' ) ); - } else if ( err.message.match( new RegExp( `'${ options.tagName }\\.\\.HEAD': unknown` ) ) ) { - reject( new Error( - `Cannot find tag "${ options.tagName }" (the latest version from the changelog) in given repository.` - ) ); - } else { - reject( err ); - } - } ) - .pipe( conventionalCommitsParser( parserOptions ) ) - .pipe( concat( data => { - const commits = conventionalCommitsFilter( data ) - .map( commit => transformCommit( commit, context ) ) - .filter( commit => commit ); - - return resolve( { - releaseType: getNewVersionType( commits ), - commits - } ); - } ) ); - } ); - - // Returns a type of version for a release based on the commits. - // - // @param {Array.} commits - // @param {Object} options - // @returns {String} - function getNewVersionType( commits ) { - // Repository does not have new changes. - if ( !commits.length ) { - return 'skip'; - } - - const publicCommits = commits.filter( commit => availableCommitTypes.get( commit.rawType ) ); - - if ( !publicCommits.length ) { - return 'internal'; - } - - let newFeatures = false; - let minorBreakingChanges = false; - - for ( const commit of publicCommits ) { - for ( const note of commit.notes ) { - if ( note.title === 'MAJOR BREAKING CHANGES' ) { - return 'major'; - } - - if ( note.title === 'MINOR BREAKING CHANGES' ) { - minorBreakingChanges = true; - } - } - - if ( commit.rawType === 'Feature' ) { - newFeatures = true; - } - } - - // Repository has new features or minor breaking changes. - if ( minorBreakingChanges || newFeatures ) { - return 'minor'; - } - - return 'patch'; - } -}; diff --git a/packages/ckeditor5-dev-env/lib/release-tools/utils/getnewversiontype.js b/packages/ckeditor5-dev-env/lib/release-tools/utils/getnewversiontype.js new file mode 100644 index 000000000..d49727b96 --- /dev/null +++ b/packages/ckeditor5-dev-env/lib/release-tools/utils/getnewversiontype.js @@ -0,0 +1,53 @@ +/** + * @license Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */ + +'use strict'; + +/** + * Proposes new version based on commits. + * + * @param {Array.} commits + * @returns {String} + */ +module.exports = function getNewVersionType( commits ) { + // No commits = no changes. + if ( !commits.length ) { + return 'skip'; + } + + const publicCommits = commits.filter( commit => commit.isPublicCommit ); + + // No public commits = internal changes. + if ( !publicCommits.length ) { + return 'internal'; + } + + let newFeatures = false; + let minorBreakingChanges = false; + + for ( const commit of publicCommits ) { + for ( const note of commit.notes ) { + if ( note.title === 'MAJOR BREAKING CHANGES' ) { + return 'major'; + } + + /* istanbul ignore else */ + if ( note.title === 'MINOR BREAKING CHANGES' ) { + minorBreakingChanges = true; + } + } + + if ( commit.rawType === 'Feature' ) { + newFeatures = true; + } + } + + // Repository has new features or minor breaking changes. + if ( minorBreakingChanges || newFeatures ) { + return 'minor'; + } + + return 'patch'; +}; diff --git a/packages/ckeditor5-dev-env/lib/release-tools/utils/getsubrepositoriespaths.js b/packages/ckeditor5-dev-env/lib/release-tools/utils/getpackagespaths.js similarity index 82% rename from packages/ckeditor5-dev-env/lib/release-tools/utils/getsubrepositoriespaths.js rename to packages/ckeditor5-dev-env/lib/release-tools/utils/getpackagespaths.js index 541a38357..ca1e37bbd 100644 --- a/packages/ckeditor5-dev-env/lib/release-tools/utils/getsubrepositoriespaths.js +++ b/packages/ckeditor5-dev-env/lib/release-tools/utils/getpackagespaths.js @@ -16,11 +16,8 @@ const getPackageJson = require( './getpackagejson' ); * * - The first one is marked as `matched` and means that packages specified in a path (which is a combination of values specified as * `options.cwd` and `options.packages`) match to given criteria. - * - The second one is marked as `skipped` and means that packages should not be processed. They aren't defined in the main - * `package.json` as dependencies or were listed as packages to skip (`options.skipPackages` or don't mach to `options.scope`). - * - * By "sub repositories" we understand that packages have their own repositories and they are located inside another - * repository (similar to git submodules). + * - The second one is marked as `skipped` and means that packages should not be processed. They were listed as packages to skip + * (`options.skipPackages` or don't mach to `options.scope`). * * @param {Object} options * @param {String} options.cwd Current work directory. @@ -31,7 +28,7 @@ const getPackageJson = require( './getpackagejson' ); * @param {Boolean} [options.skipMainRepository=false] If set on true, package found in `options.cwd` will be skipped. * @returns {PathsCollection} */ -module.exports = function getSubRepositoriesPaths( options ) { +module.exports = function getPackagesPaths( options ) { const pathsCollection = { matched: new Set(), skipped: new Set() @@ -50,9 +47,6 @@ module.exports = function getSubRepositoriesPaths( options ) { const packagesPath = path.join( options.cwd, options.packages ); const skipPackages = Array.isArray( options.skipPackages ) ? options.skipPackages : [ options.skipPackages ]; - const packageJson = getPackageJson( options.cwd ); - const dependencies = Object.keys( packageJson.dependencies || {} ); - for ( const directory of tools.getDirectories( packagesPath ) ) { const dependencyPath = path.join( packagesPath, directory ); @@ -65,6 +59,7 @@ module.exports = function getSubRepositoriesPaths( options ) { pathsCollection.skipped.add( dependencyPath ); } } catch ( err ) { + /* istanbul ignore next */ console.warn( `Missing "package.json file in "${ dependencyPath }". Skipping.` ); } } @@ -72,10 +67,6 @@ module.exports = function getSubRepositoriesPaths( options ) { return pathsCollection; function isValidPackage( packageName ) { - if ( !dependencies.includes( packageName ) ) { - return false; - } - for ( const skipPackageGlob of skipPackages ) { if ( minimatch( packageName, skipPackageGlob ) ) { return false; diff --git a/packages/ckeditor5-dev-env/lib/release-tools/utils/getpackagestorelease.js b/packages/ckeditor5-dev-env/lib/release-tools/utils/getpackagestorelease.js index 2e39ac4ad..61e1a1ffb 100644 --- a/packages/ckeditor5-dev-env/lib/release-tools/utils/getpackagestorelease.js +++ b/packages/ckeditor5-dev-env/lib/release-tools/utils/getpackagestorelease.js @@ -35,11 +35,19 @@ module.exports = function getPackagesToRelease( pathsToPackages, options ) { const packageJson = getPackageJson(); const repositoryName = packageJson.name; - const newVersion = findVersionInChangelog( options.changes, repositoryName ) || options.version; + let newVersion; + + // For the main package/repository use the version specified as `options.cwd`. + // For the rest packages, find a version in the changelog file. + if ( repositoryPath === cwd ) { + newVersion = options.version; + } else { + newVersion = findVersionInChangelog( options.changes, repositoryName ); + } // If these versions aren't equal, it means that the package is ready to release // because we assume that a version from `package.json` is the latest. - if ( packageJson.version !== newVersion ) { + if ( newVersion && packageJson.version !== newVersion ) { packagesToRelease.set( repositoryName, { previousVersion: packageJson.version, version: newVersion diff --git a/packages/ckeditor5-dev-env/lib/release-tools/utils/getsubpackagespaths.js b/packages/ckeditor5-dev-env/lib/release-tools/utils/getsubpackagespaths.js deleted file mode 100644 index 37def06dd..000000000 --- a/packages/ckeditor5-dev-env/lib/release-tools/utils/getsubpackagespaths.js +++ /dev/null @@ -1,76 +0,0 @@ -/** - * @license Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved. - * For licensing, see LICENSE.md. - */ - -'use strict'; - -const path = require( 'path' ); -const { tools } = require( '@ckeditor/ckeditor5-dev-utils' ); -const getPackageJson = require( './getpackagejson' ); -const minimatch = require( 'minimatch' ); - -/** - * Returns an object with two collections of paths to packages which are located in single repository. - * - * - The first one is marked as `matched` and means that packages specified in a path (which is a combination of values specified as - * `options.cwd` and `options.packages`) match to given criteria. - * - The second one is marked as `skipped` and means that packages should not be processed. They were listed as packages - * to skip (`options.skipPackages` or don't mach to `options.scope`). - * - * By "sub packages" we understand that packages are located in single repository (they do not own separate repositories). - * - * @param {Object} options - * @param {String} options.cwd Current work directory. - * @param {String} options.packages Name of directory where to look for packages. - * @param {String|Array.} options.skipPackages Glob pattern(s) which describes which packages should be skipped. - * @param {String} [options.scope] Package names have to match to specified glob pattern. - * @param {Boolean} [options.skipMainRepository=false] If set on true, package found in `options.cwd` will be skipped. - * @returns {PathsCollection} - */ -module.exports = function getSubPackagesPaths( options ) { - const pathsCollection = { - matched: new Set(), - skipped: new Set() - }; - - if ( options.skipMainRepository ) { - pathsCollection.skipped.add( options.cwd ); - } else { - pathsCollection.matched.add( options.cwd ); - } - - if ( !options.packages ) { - return pathsCollection; - } - - const packagesPath = path.join( options.cwd, options.packages ); - const skipPackages = Array.isArray( options.skipPackages ) ? options.skipPackages : [ options.skipPackages ]; - - for ( const directory of tools.getDirectories( packagesPath ) ) { - const dependencyPath = path.join( packagesPath, directory ); - const dependencyName = getPackageJson( dependencyPath ).name; - - if ( isValidPackage( dependencyName ) ) { - pathsCollection.matched.add( dependencyPath ); - } else { - pathsCollection.skipped.add( dependencyPath ); - } - } - - return pathsCollection; - - function isValidPackage( packageName ) { - for ( const skipPackageGlob of skipPackages ) { - if ( minimatch( packageName, skipPackageGlob ) ) { - return false; - } - } - - if ( options.scope ) { - return minimatch( packageName, options.scope ); - } - - return true; - } -}; diff --git a/packages/ckeditor5-dev-env/lib/release-tools/utils/transform-commit/getwriteroptions.js b/packages/ckeditor5-dev-env/lib/release-tools/utils/getwriteroptions.js similarity index 81% rename from packages/ckeditor5-dev-env/lib/release-tools/utils/transform-commit/getwriteroptions.js rename to packages/ckeditor5-dev-env/lib/release-tools/utils/getwriteroptions.js index 8f6af1964..0ca807fb6 100644 --- a/packages/ckeditor5-dev-env/lib/release-tools/utils/transform-commit/getwriteroptions.js +++ b/packages/ckeditor5-dev-env/lib/release-tools/utils/getwriteroptions.js @@ -7,11 +7,11 @@ const fs = require( 'fs' ); const path = require( 'path' ); -const templatePath = path.join( __dirname, '..', '..', 'templates' ); -const { typesOrder } = require( './transform-commit-utils' ); +const templatePath = path.join( __dirname, '..', 'templates' ); +const { typesOrder } = require( './transformcommitutils' ); /** - * @param {Function} transform + * @param {Function|Object} transform * @returns {Object} */ module.exports = function getWriterOptions( transform ) { @@ -25,7 +25,6 @@ module.exports = function getWriterOptions( transform ) { noteGroupsSort( a, b ) { return typesOrder[ a.title ] - typesOrder[ b.title ]; }, - notesSort: require( 'compare-func' ), mainTemplate: fs.readFileSync( path.join( templatePath, 'template.hbs' ), 'utf-8' ), headerPartial: fs.readFileSync( path.join( templatePath, 'header.hbs' ), 'utf-8' ), commitPartial: fs.readFileSync( path.join( templatePath, 'commit.hbs' ), 'utf-8' ), diff --git a/packages/ckeditor5-dev-env/lib/release-tools/utils/transform-commit/parser-options.js b/packages/ckeditor5-dev-env/lib/release-tools/utils/parseroptions.js similarity index 90% rename from packages/ckeditor5-dev-env/lib/release-tools/utils/transform-commit/parser-options.js rename to packages/ckeditor5-dev-env/lib/release-tools/utils/parseroptions.js index bc13cfc6f..a204bccd6 100644 --- a/packages/ckeditor5-dev-env/lib/release-tools/utils/transform-commit/parser-options.js +++ b/packages/ckeditor5-dev-env/lib/release-tools/utils/parseroptions.js @@ -18,8 +18,7 @@ module.exports = { 'MINOR BREAKING CHANGES', 'MINOR BREAKING CHANGE', 'BREAKING CHANGES', // It will be treated as "MAJOR BREAKING CHANGES" - 'BREAKING CHANGE', // An alias for "BREAKING CHANGES". - 'NOTE' + 'BREAKING CHANGE' // An alias for "BREAKING CHANGES". ], revertPattern: /^Revert:\s([\s\S]*?)\s*This reverts commit (\w*)\./, revertCorrespondence: [ 'header', 'hash' ], diff --git a/packages/ckeditor5-dev-env/lib/release-tools/utils/releaserepository.js b/packages/ckeditor5-dev-env/lib/release-tools/utils/releaserepository.js deleted file mode 100644 index 855c95dac..000000000 --- a/packages/ckeditor5-dev-env/lib/release-tools/utils/releaserepository.js +++ /dev/null @@ -1,81 +0,0 @@ -/** - * @license Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved. - * For licensing, see LICENSE.md. - */ - -'use strict'; - -const chalk = require( 'chalk' ); -const parseGithubUrl = require( 'parse-github-url' ); -const { tools, logger } = require( '@ckeditor/ckeditor5-dev-utils' ); -const createGithubRelease = require( './creategithubrelease' ); -const getPackageJson = require( './getpackagejson' ); - -/** - * Releases the package defined in the current repository. - * - * This task bumps a version in package.json file and publish the changes on npm and/or GitHub. - * - * @param {Object} options - * @param {String} options.token GitHub token used to authenticate. - * @param {Boolean} options.skipGithub Whether to publish the package on Github. - * @param {Boolean} options.skipNpm Whether to publish the package on Npm. - * @param {String} options.version Version of the current release. - * @param {String} options.changes Changelog entries for the current release. - * @returns {Promise} - */ -module.exports = function releaseRepository( options ) { - const cwd = process.cwd(); - const log = logger(); - - const packageJson = getPackageJson( cwd ); - - log.info( '' ); - log.info( chalk.bold.blue( `Publishing the release of "${ packageJson.name }".` ) ); - - const promise = new Promise( ( resolve, reject ) => { - // Bump the version. - exec( `npm version ${ options.version } --message "Release: v${ options.version }."` ); - exec( `git push origin master v${ options.version }` ); - - if ( !options.skipNpm ) { - log.info( 'Publishing on NPM...' ); - exec( 'npm publish --access=public' ); - } - - if ( !options.skipGithub ) { - log.info( 'Creating a GitHub release...' ); - - const repositoryInfo = parseGithubUrl( - exec( 'git remote get-url origin --push' ).trim() - ); - - const releaseOptions = { - repositoryOwner: repositoryInfo.owner, - repositoryName: repositoryInfo.name, - version: `v${ options.version }`, - description: options.changes - }; - - return createGithubRelease( options.token, releaseOptions ) - .then( () => { - const url = `https://github.com/${ repositoryInfo.owner }/${ repositoryInfo.name }/releases/tag/v${ options.version }`; - log.info( `Created the release: ${ url }` ); - - resolve( options.version ); - } ) - .catch( reject ); - } - - resolve( options.version ); - } ); - - return promise - .then( version => { - log.info( chalk.green( `Release "v${ version }" has been created and published.\n` ) ); - } ); -}; - -function exec( command ) { - return tools.shExec( command, { verbosity: 'error' } ); -} diff --git a/packages/ckeditor5-dev-env/lib/release-tools/utils/transform-commit/transformcommitforsubpackagefactory.js b/packages/ckeditor5-dev-env/lib/release-tools/utils/transform-commit/transformcommitforsubpackagefactory.js deleted file mode 100644 index b205408c7..000000000 --- a/packages/ckeditor5-dev-env/lib/release-tools/utils/transform-commit/transformcommitforsubpackagefactory.js +++ /dev/null @@ -1,84 +0,0 @@ -/** - * @license Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved. - * For licensing, see LICENSE.md. - */ - -'use strict'; - -const transformCommitForSubRepositoryFactory = require( './transformcommitforsubrepositoryfactory' ); -const getChangedFilesForCommit = require( './getchangedfilesforcommit' ); - -/** - * Factory function. - * - * It returns a function that parses a single commit for a package which is located in multi-package repository. - * - * The commit will be parsed only if its at least one file is located in the current processing package. - * - * If the commit match to specified criteria, it will be passed to a function produced by `transformCommitForSubRepositoryFactory()`. - * - * Returns `undefined` if given commit should not be added to the changelog. This behavior can be changed - * using the `options.returnInvalidCommit` option. - * - * NOTE: An invalid commit will be returned only if it match to a parsed package. It means the commit must - * change at least one file which belongs to current processing package. - * - * @param {Object} [options={}] - * @param {Boolean} [options.returnInvalidCommit=false] Whether an invalid commit should be returned. - * @returns {Function} - */ -module.exports = function transformCommitForSubPackageFactory( options = {} ) { - /** - * @param {Commit} rawCommit - * @param {Object} context - * @param {Object} context.packageData Content from the `package.json` file for a parsing package. - * @returns {Commit|undefined} `undefined` means that the commit does not belong to the parsing package. - */ - return function transformCommitForSubPackage( rawCommit, context ) { - // Let's clone the commit. We don't want to modify the reference. - const commit = Object.assign( {}, rawCommit, { - notes: rawCommit.notes.map( note => Object.assign( {}, note ) ) - } ); - - // Skip the Lerna "Publish" commit. - if ( !commit.type && commit.header === 'Publish' && commit.body ) { - return; - } - - // Our merge commit always contains two lines: - // Merge ... - // Prefix: Subject of the changes. - // Unfortunately, merge commit made by Git does not contain the second line. - // Because of that hash of the commit is parsed as a body and the changelog will crash. - // See: https://github.com/ckeditor/ckeditor5-dev/issues/276. - if ( commit.merge && !commit.hash ) { - commit.hash = commit.body; - commit.header = commit.merge; - commit.body = null; - } - - const files = getChangedFilesForCommit( commit.hash ); - - if ( !files.length ) { - return; - } - - const packageName = context.packageData.name; - const packageDirectory = packageName.startsWith( '@' ) ? packageName.split( '/' )[ 1 ] : packageName; - - if ( !isValidCommit( files, packageDirectory ) ) { - return; - } - - const transformCommitForSubRepository = transformCommitForSubRepositoryFactory( { - returnInvalidCommit: options.returnInvalidCommit - } ); - - return transformCommitForSubRepository( commit ); - }; - - function isValidCommit( files, packageName ) { - // Commit is valid for the package if at least one file in the package was changed. - return files.some( filePath => filePath.startsWith( `packages/${ packageName }` ) ); - } -}; diff --git a/packages/ckeditor5-dev-env/lib/release-tools/utils/transform-commit/transformcommitforsubrepositoryfactory.js b/packages/ckeditor5-dev-env/lib/release-tools/utils/transform-commit/transformcommitforsubrepositoryfactory.js deleted file mode 100644 index 42f0b1592..000000000 --- a/packages/ckeditor5-dev-env/lib/release-tools/utils/transform-commit/transformcommitforsubrepositoryfactory.js +++ /dev/null @@ -1,221 +0,0 @@ -/** - * @license Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved. - * For licensing, see LICENSE.md. - */ - -'use strict'; - -const utils = require( './transform-commit-utils' ); - -/** - * Factory function. - * - * It returns a function that parses a single commit: - * - filters out the commit if it should not be visible in the changelog, - * - makes links to issues and organizations on GitHub, - * - normalizes notes (e.g. "MAJOR BREAKING CHANGE" will be replaced with "MAJOR BREAKING CHANGES"). - * - * Returns `undefined` if the parsed commit should not be visible to the changelog. This behavior can be changed - * using the `options.returnInvalidCommit` option. - * - * @param {Object} [options={}] - * @param {Boolean} [options.treatMajorAsMinorBreakingChange=false] If set on true, all "MAJOR BREAKING CHANGES" notes will be replaced - * with "MINOR BREAKING CHANGES". This behaviour is being disabled automatically if `options.useExplicitBreakingChangeGroups` is - * set on `false` because all commits will be treated as "BREAKING CHANGES". - * @param {Boolean} [options.returnInvalidCommit=false] Whether an invalid commit should be returned. - * @param {Boolean} [options.useExplicitBreakingChangeGroups] If set on `true`, notes from parsed commits will be grouped as - * "MINOR BREAKING CHANGES" and "MAJOR BREAKING CHANGES'. If set on `false` (by default), all breaking changes notes will be treated - * as "BREAKING CHANGES". - * @returns {Function} - */ -module.exports = function transformCommitForSubRepositoryFactory( options = {} ) { - /** - * @param {Commit} rawCommit - * @returns {Commit|undefined} - */ - return function transformCommitForSubRepository( rawCommit ) { - // Let's clone the commit. We don't want to modify the reference. - const commit = Object.assign( {}, rawCommit, { - // Copy the original `type` of the commit. - rawType: rawCommit.type, - notes: rawCommit.notes.map( note => Object.assign( {}, note ) ) - } ); - - // Whether the commit will be printed in the changelog. - const isCommitIncluded = utils.availableCommitTypes.get( commit.rawType ); - - // Our merge commit always contains two lines: - // Merge ... - // Prefix: Subject of the changes. - // Unfortunately, merge commit made by Git does not contain the second line. - // Because of that hash of the commit is parsed as a body and the changelog will crash. - // See: https://github.com/ckeditor/ckeditor5-dev/issues/276. - if ( commit.merge && !commit.hash ) { - commit.hash = commit.body; - commit.header = commit.merge; - commit.body = null; - } - - // Ignore the `stable` merge branch. - if ( commit.merge === 'Merge branch \'stable\'' ) { - return; - } - - if ( typeof commit.hash === 'string' ) { - commit.hash = commit.hash.substring( 0, 7 ); - } - - // It's used only for displaying the commit. Changelog generator will filter out the invalid entries. - if ( !isCommitIncluded ) { - return options.returnInvalidCommit ? commit : undefined; - } - - // Remove [skip ci] from the commit subject. - commit.subject = commit.subject.replace( /\[skip ci\]/, '' ).trim(); - - // If a dot is missing at the end of the subject... - if ( !commit.subject.endsWith( '.' ) ) { - // ...let's add it. - commit.subject += '.'; - } - - // The `type` below will be key for grouping commits. - commit.type = utils.getCommitType( commit.rawType ); - - if ( typeof commit.subject === 'string' ) { - commit.subject = makeLinks( commit.subject ); - } - - // Remove additional notes from the commit's footer. - // Additional notes are added to the footer. In order to avoid duplication, they should be removed. - if ( commit.footer && commit.notes.length ) { - commit.footer = commit.footer.split( '\n' ) - .filter( footerLine => { - // For each footer line checks whether the line starts with note prefix ("NOTE": ...). - // If so, this footer line should be removed. - return !commit.notes.some( note => footerLine.startsWith( note.title ) ); - } ) - .join( '\n' ) - .trim(); - } - - // If `body` of the commit is empty but the `footer` isn't, let's swap those. - if ( commit.footer && !commit.body ) { - commit.body = commit.footer; - commit.footer = null; - } - - if ( typeof commit.body === 'string' ) { - commit.body = commit.body.split( '\n' ) - .map( line => { - if ( !line.length ) { - return ''; - } - - return ' ' + line; - } ) - .join( '\n' ); - - commit.body = makeLinks( commit.body ); - } - - normalizeNotes( commit ); - - // Clear the references array - we don't want to hoist the issues. - delete commit.references; - - commit.repositoryUrl = utils.getRepositoryUrl(); - - return commit; - }; - - function makeLinks( comment ) { - comment = utils.linkToGithubIssue( comment ); - comment = utils.linkToGithubUser( comment ); - - return comment; - } - - function normalizeNotes( commit ) { - for ( const note of commit.notes ) { - // "BREAKING CHANGE" => "BREAKING CHANGES" - if ( note.title === 'BREAKING CHANGE' ) { - note.title = 'BREAKING CHANGES'; - } - - // "BREAKING CHANGES" => "MAJOR BREAKING CHANGES" - if ( note.title === 'BREAKING CHANGES' ) { - note.title = 'MAJOR BREAKING CHANGES'; - } - - // "MAJOR BREAKING CHANGE" => "MAJOR BREAKING CHANGES" - if ( note.title === 'MAJOR BREAKING CHANGE' ) { - note.title = 'MAJOR BREAKING CHANGES'; - } - - // "MINOR BREAKING CHANGE" => "MINOR BREAKING CHANGES" - if ( note.title === 'MINOR BREAKING CHANGE' ) { - note.title = 'MINOR BREAKING CHANGES'; - } - - // Replace "MAJOR" with "MINOR" if major breaking changes are "disabled". - if ( options.treatMajorAsMinorBreakingChange && note.title === 'MAJOR BREAKING CHANGES' ) { - note.title = 'MINOR BREAKING CHANGES'; - } - - // If explicit breaking changes groups option is disabled, let's remove MINOR/MAJOR prefix from the title. - if ( !options.useExplicitBreakingChangeGroups ) { - note.title = note.title.replace( /^(MINOR|MAJOR) /, '' ); - } - - note.text = makeLinks( note.text ); - } - - // Place all "NOTE" at the end. - commit.notes.sort( ( a, b ) => { - // Do not swap two notes. Their weight is equal to each other. - if ( a.title === 'NOTE' && b.title === 'NOTE' ) { - return 0; - } - - if ( a.title === 'NOTE' ) { - return 1; - } else if ( b.title === 'NOTE' ) { - return -1; - } - - return 0; - } ); - } -}; - -/** - * @typedef {Object} Commit - * - * @property {String} rawType Type of the commit without any modifications. - * - * @property {String} type Type of the commit (it can be modified). - * - * @property {String} hash The commit SHA-1 id. - * - * @property {String} repositoryUrl The URL to the repository where the parsed commit has been done. - * - * @property {String} [subject] Subject of the commit. - * - * @property {String} [header] First line of the commit message. - * - * @property {String|null} [body] Body of the commit message. - * - * @property {String|null} [footer] Footer of the commit message. - * - * @property {Array.} [notes] Notes for the commit. - * - */ - -/** - * @typedef {Object} CommitNote - * - * @property {String} title Type of the note. - * - * @property {String} text Text of the note. - */ diff --git a/packages/ckeditor5-dev-env/lib/release-tools/utils/transformcommitfactory.js b/packages/ckeditor5-dev-env/lib/release-tools/utils/transformcommitfactory.js new file mode 100644 index 000000000..9829b13fa --- /dev/null +++ b/packages/ckeditor5-dev-env/lib/release-tools/utils/transformcommitfactory.js @@ -0,0 +1,412 @@ +/** + * @license Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */ + +'use strict'; + +const utils = require( './transformcommitutils' ); +const getChangedFilesForCommit = require( './getchangedfilesforcommit' ); + +/** + * Factory function. + * + * It returns a function that parses a single commit: + * - makes links to issues and organizations on GitHub, + * - if the commit contains multi changelog entries, the function will return an array of the commits, + * - normalizes notes (e.g. "MAJOR BREAKING CHANGE" will be replaced with "MAJOR BREAKING CHANGES"), + * - the commit is always being returned. Even, if it should not be added to the changelog. + * + * @param {Object} [options={}] + * @param {Boolean} [options.treatMajorAsMinorBreakingChange=false] If set on true, all "MAJOR BREAKING CHANGES" notes will be replaced + * with "MINOR BREAKING CHANGES". This behaviour is being disabled automatically if `options.useExplicitBreakingChangeGroups` is + * set on `false` because all commits will be treated as "BREAKING CHANGES". + * @param {Boolean} [options.useExplicitBreakingChangeGroups] If set on `true`, notes from parsed commits will be grouped as + * "MINOR BREAKING CHANGES" and "MAJOR BREAKING CHANGES'. If set on `false` (by default), all breaking changes notes will be treated + * as "BREAKING CHANGES". + * @returns {Function} + */ +module.exports = function transformCommitFactory( options = {} ) { + /** + * If returned an instance of the Array, it means that single commit contains more than one entry for the changelog. + * + * E.g. for the commit below: + * + * Feature: Introduced the `Editor` component. See #123. + * + * Additional description. + * + * Fix: The commit also fixes... + * + * the function will return an array with two commits. The first one is the real commit, the second one is a fake commit + * but its description will be inserted to the changelog. + * + * In most of cases the function will return the commit (even if its structure is invalid). However, "Merge branch 'stable'" commits + * will be always ignored and `undefined` will be returned. + * + * @param {Commit} rawCommit + * @returns {Commit|Array.|undefined} + */ + return function transformCommit( rawCommit ) { + // Let's clone the commit. We don't want to modify the reference. + const commit = Object.assign( {}, rawCommit, { + // Copy the original `type` of the commit. + rawType: rawCommit.type, + notes: rawCommit.notes.map( note => Object.assign( {}, note ) ) + } ); + + const parsedType = extractScopeFromPrefix( commit.rawType ); + + commit.files = []; + commit.rawType = parsedType.rawType; + commit.scope = parsedType.scope; + + // Whether the commit will be printed in the changelog. + commit.isPublicCommit = utils.availableCommitTypes.get( commit.rawType ) || false; + + // Our merge commit always contains two lines: + // Merge ... + // Prefix: Subject of the changes. + // Unfortunately, merge commit made by Git does not contain the second line. + // Because of that hash of the commit is parsed as a body and the changelog will crash. + // See: https://github.com/ckeditor/ckeditor5-dev/issues/276. + if ( commit.merge && !commit.hash ) { + commit.hash = commit.body; + commit.header = commit.merge; + commit.body = null; + } + + // Ignore the `stable` merge branch. + if ( commit.merge === 'Merge branch \'stable\'' ) { + return; + } + + commit.files = getChangedFilesForCommit( commit.hash ) || []; + commit.repositoryUrl = utils.getRepositoryUrl(); + + if ( commit.isPublicCommit ) { + // Remove [skip ci] from the commit subject. + commit.subject = commit.subject.replace( /\[skip ci\]/, '' ).trim(); + + // If a dot is missing at the end of the subject... + if ( !commit.subject.endsWith( '.' ) ) { + // ...let's add it. + commit.subject += '.'; + } + + // The `type` below will be key for grouping commits. + commit.type = utils.getCommitType( commit.rawType ); + commit.subject = mergeCloseReferences( commit.subject ); + commit.subject = makeLinks( commit.subject ); + + // Remove additional notes from the commit's footer. + // Additional notes are added to the footer. In order to avoid duplication, they should be removed. + if ( commit.footer && commit.notes.length ) { + // Clone the notes in order to avoid cleaning those. + const commitsNotes = commit.notes.slice(); + + commit.footer = commit.footer.split( '\n' ) + .filter( footerLine => { + // For each footer line checks whether the line starts with note prefix. + // If so, this footer line should be removed. + const noteToRemove = commitsNotes.find( note => { + return footerLine == `${ note.title }: ${ note.text }`; + } ); + + // In order to avoid checking the same note, remove it. + if ( noteToRemove ) { + commitsNotes.splice( commitsNotes.indexOf( noteToRemove ), 1 ); + } + + return !noteToRemove; + } ) + .join( '\n' ) + .trim(); + } + + // If `body` of the commit is empty but the `footer` isn't, let's swap those. + if ( commit.footer && !commit.body ) { + commit.body = commit.footer; + commit.footer = null; + } + + if ( typeof commit.body === 'string' ) { + commit.body = commit.body.split( '\n' ) + .map( line => { + if ( !line.length ) { + return ''; + } + + return ' ' + line; + } ) + .join( '\n' ); + + commit.body = makeLinks( commit.body ); + } + + normalizeNotes( commit ); + + // Clear the references array - we don't want to hoist the issues. + delete commit.references; + } + + if ( !commit.body ) { + // It's used only for displaying the commit. Changelog generator will filter out the invalid entries. + return commit; + } + + const commitEntries = commit.body.match( utils.MULTI_ENTRIES_COMMIT_REGEXP ); + + if ( !commitEntries || !commitEntries.length ) { + return commit; + } + + // Single commit contains a few entries that should be inserted to the changelog. + // All of those entries are defined in the array. + // Additional commits/entries will be called as "fake commits". + const separatedCommits = [ commit ]; + + // Descriptions of additional entries. + const parts = commit.body.split( utils.MULTI_ENTRIES_COMMIT_REGEXP ); + + // If the descriptions array contains more entries than fake commit entries, + // it means that the first element in descriptions array describes the main (real) commit. + /* istanbul ignore else */ + if ( parts.length > commitEntries.length ) { + commit.body = escapeNewLines( parts.shift() ); + } + + // For each fake commit, copy hash and repository of the parent. + for ( let i = 0; i < parts.length; ++i ) { + const newCommit = { + revert: null, + merge: null, + footer: null, + hash: commit.hash, + files: commit.files, + repositoryUrl: commit.repositoryUrl, + notes: [], + mentions: [] + }; + + const details = extractScopeFromPrefix( commitEntries[ i ].replace( /:$/, '' ) ); + + newCommit.rawType = details.rawType; + newCommit.scope = details.scope; + newCommit.isPublicCommit = utils.availableCommitTypes.get( newCommit.rawType ); + + if ( newCommit.isPublicCommit ) { + newCommit.type = utils.getCommitType( newCommit.rawType ); + } + + const commitDescription = parts[ i ]; + const subject = commitDescription.match( /^(.*)$/m )[ 0 ]; + + newCommit.subject = subject.trim(); + newCommit.header = commitEntries[ i ].trim() + ' ' + subject.trim(); + newCommit.body = escapeNewLines( commitDescription.replace( subject, '' ) ); + + // If a dot is missing at the end of the subject... + if ( !newCommit.subject.endsWith( '.' ) ) { + // ...let's add it. + newCommit.subject += '.'; + } + + separatedCommits.push( newCommit ); + } + + return separatedCommits; + }; + + /** + * Merges multiple "Closes #x" references as "Closes #x, #y.". + * + * @param {String} subject + * @returns {String} + */ + function mergeCloseReferences( subject ) { + const refs = []; + + let newSubject = subject; + let insertedPlaceholder = false; + + const regexp = /Closes #(\d+)\.?/g; + let match; + + while ( ( match = regexp.exec( subject ) ) ) { + refs.push( match[ 1 ] ); + + if ( insertedPlaceholder ) { + newSubject = newSubject.replace( match[ 0 ], '' ).trim(); + } else { + insertedPlaceholder = true; + newSubject = newSubject.replace( match[ 0 ], '[[--COMMIT_REFERENCES--]]' ).trim(); + } + } + + newSubject = newSubject.replace( + /\[\[--COMMIT_REFERENCES--\]] ?/, + 'Closes ' + refs.map( ref => '#' + ref ).join( ', ' ) + '.' ); + + return newSubject; + } + + function makeLinks( comment ) { + comment = utils.linkToGithubIssue( comment ); + comment = utils.linkToGithubUser( comment ); + + return comment; + } + + function normalizeNotes( commit ) { + for ( const note of commit.notes ) { + const details = extractScopeFromNote( note.text ); + + note.text = details.text; + note.scope = details.scope; + + // "BREAKING CHANGE" => "BREAKING CHANGES" + if ( note.title === 'BREAKING CHANGE' ) { + note.title = 'BREAKING CHANGES'; + } + + // "BREAKING CHANGES" => "MAJOR BREAKING CHANGES" + if ( note.title === 'BREAKING CHANGES' ) { + note.title = 'MAJOR BREAKING CHANGES'; + } + + // "MAJOR BREAKING CHANGE" => "MAJOR BREAKING CHANGES" + if ( note.title === 'MAJOR BREAKING CHANGE' ) { + note.title = 'MAJOR BREAKING CHANGES'; + } + + // "MINOR BREAKING CHANGE" => "MINOR BREAKING CHANGES" + if ( note.title === 'MINOR BREAKING CHANGE' ) { + note.title = 'MINOR BREAKING CHANGES'; + } + + // Replace "MAJOR" with "MINOR" if major breaking changes are "disabled". + if ( options.treatMajorAsMinorBreakingChange && note.title === 'MAJOR BREAKING CHANGES' ) { + note.title = 'MINOR BREAKING CHANGES'; + } + + // If explicit breaking changes groups option is disabled, remove MINOR/MAJOR prefix from the title. + if ( !options.useExplicitBreakingChangeGroups ) { + note.title = note.title.replace( /^(MINOR|MAJOR) /, '' ); + } + + note.text = makeLinks( note.text ); + } + } + + /** + * Extracts the prefix and scope from the `Commit#subject`. + * + * E.g.: + * - input: `Fix (engine): Fixed... + * - output: { rawType: 'Fix', scope: [ 'engine'] } + * + * For commits with no scope, `null` will be returned instead of the array (as `scope`). + * + * @param {String} type First line from the commit message. + * @returns {Object} + */ + function extractScopeFromPrefix( type ) { + if ( !type ) { + return {}; + } + + const parts = type.split( ' (' ); + const data = { + rawType: parts[ 0 ], + scope: null + }; + + if ( parts[ 1 ] ) { + data.scope = parts[ 1 ].replace( /^\(|\)$/g, '' ) + .split( ',' ) + .map( p => p.trim() ) + .filter( p => p ) + .sort(); + } + + return data; + } + + /** + * Extracts the prefix and scope from the `CommitNote#text`. + * + * E.g.: + * - input: `(engine): Removed... + * - output: { text: 'Removed...', scope: [ 'engine'] } + * + * For notes with no scope, `null` will be returned instead of the array (as `scope`). + * + * @param {String} text A text that describes a note. + * @returns {Object} + */ + function extractScopeFromNote( text ) { + const scopeAsText = text.match( /\(([^)]+)\):/ ); + + if ( !scopeAsText ) { + return { + text, + scope: null + }; + } + + const scope = scopeAsText[ 1 ] + .split( ',' ) + .map( p => p.trim() ) + .filter( p => p ) + .sort(); + + return { + text: text.replace( scopeAsText[ 0 ], '' ).trim(), + scope + }; + } + + function escapeNewLines( message ) { + // Accept spaces before a sentence because they are ready to be rendered in the changelog template. + return message.replace( /^\n+|\s+$/g, '' ); + } +}; + +/** + * @typedef {Object} Commit + * + * @property {Boolean} isPublicCommit Whether the commit should be added in the changelog. + * + * @property {String} rawType Type of the commit without any modifications. + * + * @property {String} type Type of the commit (it can be modified). + * + * @property {String} header First line of the commit message. + * + * @property {String} subject Subject of the commit. It's the header without the type. + * + * @property {Array.|null} scope Scope of the changes. + * + * @property {Array.} files A list of files tha the commit modified. + * + * @property {String} hash The full commit SHA-1 id. + * + * @property {String} repositoryUrl The URL to the repository where the parsed commit has been done. + ** + * @property {String|null} [body] Body of the commit message. + * + * @property {String|null} [footer] Footer of the commit message. + * + * @property {Array.} [notes] Notes for the commit. + */ + +/** + * @typedef {Object} CommitNote + * + * @property {String} title Type of the note. + * + * @property {String} text Text of the note. + * + * @property {Array.} scope Scope of the note. + */ diff --git a/packages/ckeditor5-dev-env/lib/release-tools/utils/transform-commit/transform-commit-utils.js b/packages/ckeditor5-dev-env/lib/release-tools/utils/transformcommitutils.js similarity index 82% rename from packages/ckeditor5-dev-env/lib/release-tools/utils/transform-commit/transform-commit-utils.js rename to packages/ckeditor5-dev-env/lib/release-tools/utils/transformcommitutils.js index 888080a97..e72cee4b5 100644 --- a/packages/ckeditor5-dev-env/lib/release-tools/utils/transform-commit/transform-commit-utils.js +++ b/packages/ckeditor5-dev-env/lib/release-tools/utils/transformcommitutils.js @@ -5,20 +5,24 @@ 'use strict'; -const getPackageJson = require( '../getpackagejson' ); +const getPackageJson = require( './getpackagejson' ); + +const transformcommitutils = { + /** + * A regexp for extracting additional changelog entries from the single commit. + * Prefixes of the commit must be synchronized the `getCommitType()` util. + */ + MULTI_ENTRIES_COMMIT_REGEXP: /(?:Feature|Other|Fix|Docs|Internal|Tests|Revert|Release)(?: \([\w\-, ]+?\))?:/g, -const transformCommitUtils = { /** * Map of available types of the commits. * Types marked as `false` will be ignored during generating the changelog. */ availableCommitTypes: new Map( [ [ 'Fix', true ], - [ 'Fixes', true ], - [ 'Fixed', true ], [ 'Feature', true ], [ 'Other', true ], - [ 'Code style', false ], + [ 'Docs', false ], [ 'Internal', false ], [ 'Tests', false ], @@ -34,17 +38,9 @@ const transformCommitUtils = { 'Bug fixes': 2, 'Other changes': 3, - 'BREAKING CHANGES': 1, - 'NOTE': 2 - }, - - /** - * Additional descriptions used in summary changelog generator. Keys of the object must match to values returned by - * `transformCommitUtils#getCommitType()` function. - */ - additionalCommitNotes: { - 'Bug fixes': 'Besides changes in the dependencies, this version also contains the following bug fixes:', - Features: 'Besides new features introduced by the dependencies, this version also introduces the following features:' + 'MAJOR BREAKING CHANGES': 1, + 'MINOR BREAKING CHANGES': 2, + 'BREAKING CHANGES': 3 }, /** @@ -76,7 +72,7 @@ const transformCommitUtils = { return `[${ maybeRepository }#${ issueId }](https://github.com/${ maybeRepository }/issues/${ issueId })`; } - const repositoryUrl = transformCommitUtils.getRepositoryUrl(); + const repositoryUrl = transformcommitutils.getRepositoryUrl(); // But if doesn't, let's add it. return `[#${ issueId }](${ repositoryUrl }/issues/${ issueId })`; @@ -86,6 +82,8 @@ const transformCommitUtils = { /** * Changes a singular type of commit to plural which will be displayed in a changelog. * + * The switch cases must be synchronized with the `MULTI_ENTRIES_COMMIT_REGEXP` regexp. + * * @param {String} commitType * @returns {String} */ @@ -95,8 +93,6 @@ const transformCommitUtils = { return 'Features'; case 'Fix': - case 'Fixes': - case 'Fixed': return 'Bug fixes'; case 'Other': @@ -148,4 +144,4 @@ const transformCommitUtils = { } }; -module.exports = transformCommitUtils; +module.exports = transformcommitutils; diff --git a/packages/ckeditor5-dev-env/lib/release-tools/utils/versions.js b/packages/ckeditor5-dev-env/lib/release-tools/utils/versions.js index dfe146880..dbcb0731d 100644 --- a/packages/ckeditor5-dev-env/lib/release-tools/utils/versions.js +++ b/packages/ckeditor5-dev-env/lib/release-tools/utils/versions.js @@ -40,6 +40,7 @@ const versions = { return lastTag.trim().replace( /^v/, '' ) || null; } catch ( err ) { + /* istanbul ignore next */ return null; } }, diff --git a/packages/ckeditor5-dev-env/package.json b/packages/ckeditor5-dev-env/package.json index 3124a8c07..78e3213c0 100644 --- a/packages/ckeditor5-dev-env/package.json +++ b/packages/ckeditor5-dev-env/package.json @@ -11,6 +11,7 @@ "compare-func": "^1.3.2", "concat-stream": "^2.0.0", "conventional-changelog": "^3.1.8", + "conventional-changelog-writer": "^4.0.16", "conventional-commits-filter": "^2.0.0", "conventional-commits-parser": "^3.0.0", "del": "^5.0.0", @@ -46,5 +47,9 @@ "license": "GPL-2.0-or-later", "homepage": "https://github.com/ckeditor/ckeditor5-dev/tree/master/packages/ckeditor5-dev-env", "bugs": "https://github.com/ckeditor/ckeditor5-dev/issues", - "repository": "https://github.com/ckeditor/ckeditor5-dev" + "repository": { + "type": "git", + "url": "https://github.com/ckeditor/ckeditor5-dev.git", + "directory": "packages/ckeditor5-dev-env" + } } diff --git a/packages/ckeditor5-dev-env/tests/index.js b/packages/ckeditor5-dev-env/tests/index.js index e9834f4b7..27a7e7505 100644 --- a/packages/ckeditor5-dev-env/tests/index.js +++ b/packages/ckeditor5-dev-env/tests/index.js @@ -34,13 +34,10 @@ describe( 'dev-env/index', () => { createPotFiles: sandbox.spy(), getToken: sandbox.stub() }, - releaseTools: { - releaseRepository: sandbox.stub(), + release: { releaseSubRepositories: sandbox.stub(), generateChangelogForSinglePackage: sandbox.stub(), - generateChangelogForSubPackages: sandbox.stub(), - generateChangelogForSubRepositories: sandbox.stub(), - generateSummaryChangelog: sandbox.stub(), + generateChangelogForMonoRepository: sandbox.stub(), bumpVersions: sandbox.stub() } }; @@ -50,30 +47,12 @@ describe( 'dev-env/index', () => { mockery.registerMock( './translations/download', stubs.translations.download ); mockery.registerMock( './translations/createpotfiles', stubs.translations.createPotFiles ); - mockery.registerMock( - './release-tools/tasks/releasesubrepositories', - stubs.releaseTools.releaseSubRepositories - ); - mockery.registerMock( - './release-tools/tasks/generatechangelogforsinglepackage', - stubs.releaseTools.generateChangelogForSinglePackage - ); - mockery.registerMock( - './release-tools/tasks/generatechangelogforsubpackages', - stubs.releaseTools.generateChangelogForSubPackages - ); - mockery.registerMock( - './release-tools/tasks/generatechangelogforsubrepositories', - stubs.releaseTools.generateChangelogForSubRepositories - ); - mockery.registerMock( - './release-tools/tasks/generatesummarychangelog', - stubs.releaseTools.generateSummaryChangelog - ); - mockery.registerMock( - './release-tools/tasks/bumpversions', - stubs.releaseTools.bumpVersions - ); + const releaseTools = stubs.release; + + mockery.registerMock( './release-tools/tasks/bumpversions', releaseTools.bumpVersions ); + mockery.registerMock( './release-tools/tasks/generatechangelogforsinglepackage', releaseTools.generateChangelogForSinglePackage ); + mockery.registerMock( './release-tools/tasks/releasesubrepositories', releaseTools.releaseSubRepositories ); + mockery.registerMock( './release-tools/tasks/generatechangelogformonorepository', releaseTools.generateChangelogForMonoRepository ); tasks = proxyquire( '../lib/index', { '@ckeditor/ckeditor5-dev-utils': { @@ -91,78 +70,52 @@ describe( 'dev-env/index', () => { describe( 'releaseSubRepositories()', () => { it( 'creates release for sub repositories', () => { - stubs.releaseTools.releaseSubRepositories.returns( Promise.resolve( { result: true } ) ); + stubs.release.releaseSubRepositories.returns( Promise.resolve( { result: true } ) ); return tasks.releaseSubRepositories( 'arg' ) .then( response => { expect( response.result ).to.equal( true ); - expect( stubs.releaseTools.releaseSubRepositories.calledOnce ).to.equal( true ); - expect( stubs.releaseTools.releaseSubRepositories.firstCall.args[ 0 ] ).to.equal( 'arg' ); + expect( stubs.release.releaseSubRepositories.calledOnce ).to.equal( true ); + expect( stubs.release.releaseSubRepositories.firstCall.args[ 0 ] ).to.equal( 'arg' ); } ); } ); } ); describe( 'generateChangelogForSinglePackage()', () => { it( 'generates a changelog for package', () => { - stubs.releaseTools.generateChangelogForSinglePackage.returns( Promise.resolve( { result: true } ) ); + stubs.release.generateChangelogForSinglePackage.returns( Promise.resolve( { result: true } ) ); return tasks.generateChangelogForSinglePackage( 'arg' ) .then( response => { expect( response.result ).to.equal( true ); - expect( stubs.releaseTools.generateChangelogForSinglePackage.calledOnce ).to.equal( true ); - expect( stubs.releaseTools.generateChangelogForSinglePackage.firstCall.args[ 0 ] ).to.equal( 'arg' ); - } ); - } ); - } ); - - describe( 'generateChangelogForSubPackages()', () => { - it( 'generates a changelog for sub packages', () => { - stubs.releaseTools.generateChangelogForSubPackages.returns( Promise.resolve( { result: true } ) ); - - return tasks.generateChangelogForSubPackages( 'arg' ) - .then( response => { - expect( response.result ).to.equal( true ); - expect( stubs.releaseTools.generateChangelogForSubPackages.calledOnce ).to.equal( true ); - expect( stubs.releaseTools.generateChangelogForSubPackages.firstCall.args[ 0 ] ).to.equal( 'arg' ); + expect( stubs.release.generateChangelogForSinglePackage.calledOnce ).to.equal( true ); + expect( stubs.release.generateChangelogForSinglePackage.firstCall.args[ 0 ] ).to.equal( 'arg' ); } ); } ); } ); - describe( 'generateChangelogForSubRepositories()', () => { + describe( 'generateChangelogForMonoRepository()', () => { it( 'generates a changelog for sub repositories', () => { - stubs.releaseTools.generateChangelogForSubRepositories.returns( Promise.resolve( { result: true } ) ); - - return tasks.generateChangelogForSubRepositories( 123 ) - .then( response => { - expect( response.result ).to.equal( true ); - expect( stubs.releaseTools.generateChangelogForSubRepositories.calledOnce ).to.equal( true ); - expect( stubs.releaseTools.generateChangelogForSubRepositories.firstCall.args[ 0 ] ).to.equal( 123 ); - } ); - } ); - } ); - - describe( 'generateSummaryChangelog()', () => { - it( 'generates a changelog', () => { - stubs.releaseTools.generateSummaryChangelog.returns( Promise.resolve( { result: true } ) ); + stubs.release.generateChangelogForMonoRepository.returns( Promise.resolve( { result: true } ) ); - return tasks.generateSummaryChangelog( 123 ) + return tasks.generateChangelogForMonoRepository( 123 ) .then( response => { expect( response.result ).to.equal( true ); - expect( stubs.releaseTools.generateSummaryChangelog.calledOnce ).to.equal( true ); - expect( stubs.releaseTools.generateSummaryChangelog.firstCall.args[ 0 ] ).to.equal( 123 ); + expect( stubs.release.generateChangelogForMonoRepository.calledOnce ).to.equal( true ); + expect( stubs.release.generateChangelogForMonoRepository.firstCall.args[ 0 ] ).to.equal( 123 ); } ); } ); } ); describe( 'bumpVersions()', () => { it( 'updates version of dependencies', () => { - stubs.releaseTools.bumpVersions.returns( Promise.resolve( { result: true } ) ); + stubs.release.bumpVersions.returns( Promise.resolve( { result: true } ) ); return tasks.bumpVersions( 123 ) .then( response => { expect( response.result ).to.equal( true ); - expect( stubs.releaseTools.bumpVersions.calledOnce ).to.equal( true ); - expect( stubs.releaseTools.bumpVersions.firstCall.args[ 0 ] ).to.equal( 123 ); + expect( stubs.release.bumpVersions.calledOnce ).to.equal( true ); + expect( stubs.release.bumpVersions.firstCall.args[ 0 ] ).to.equal( 123 ); } ); } ); } ); diff --git a/packages/ckeditor5-dev-env/tests/release-tools/tasks/generatechangelogforsinglepackage.js b/packages/ckeditor5-dev-env/tests/release-tools/tasks/generatechangelogforsinglepackage.js deleted file mode 100644 index 9cfe78743..000000000 --- a/packages/ckeditor5-dev-env/tests/release-tools/tasks/generatechangelogforsinglepackage.js +++ /dev/null @@ -1,468 +0,0 @@ -/** - * @license Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved. - * For licensing, see LICENSE.md. - */ - -'use strict'; - -const expect = require( 'chai' ).expect; -const sinon = require( 'sinon' ); -const mockery = require( 'mockery' ); -const proxyquire = require( 'proxyquire' ); -const changelogUtils = require( '../../../lib/release-tools/utils/changelog' ); - -describe( 'dev-env/release-tools/tasks', () => { - describe( 'generateChangelogForSinglePackage()', () => { - let generateChangelogForSinglePackage, sandbox, stubs; - - beforeEach( () => { - sandbox = sinon.createSandbox(); - - stubs = { - changelogUtils: { - changelogFile: changelogUtils.changelogFile - }, - getNewReleaseType: sandbox.stub(), - displayCommits: sandbox.stub(), - logger: { - info: sandbox.stub(), - warning: sandbox.stub(), - error: sandbox.stub() - }, - tools: { - shExec: sandbox.stub() - }, - cli: { - provideVersion: sandbox.stub() - }, - transformCommitFactory: sandbox.stub(), - transformCommit: [ - sandbox.stub(), - sandbox.stub() - ], - generateChangelogFromCommits: sandbox.stub(), - versionUtils: { - getLastFromChangelog: sandbox.stub() - } - }; - - stubs.transformCommitFactory.onFirstCall().returns( stubs.transformCommit[ 0 ] ); - stubs.transformCommitFactory.onSecondCall().returns( stubs.transformCommit[ 1 ] ); - - mockery.enable( { - useCleanCache: true, - warnOnReplace: false, - warnOnUnregistered: false - } ); - - mockery.registerMock( '../utils/cli', stubs.cli ); - mockery.registerMock( '../utils/getnewreleasetype', stubs.getNewReleaseType ); - mockery.registerMock( '../utils/displaycommits', stubs.displayCommits ); - mockery.registerMock( '../utils/generatechangelogfromcommits', stubs.generateChangelogFromCommits ); - mockery.registerMock( '../utils/transform-commit/transformcommitforsubrepositoryfactory', stubs.transformCommitFactory ); - - generateChangelogForSinglePackage = proxyquire( '../../../lib/release-tools/tasks/generatechangelogforsinglepackage', { - '../utils/changelog': stubs.changelogUtils, - '../utils/versions': stubs.versionUtils, - '../utils/getpackagejson': () => ( { - name: 'test-package', - version: '0.0.1' - } ), - '@ckeditor/ckeditor5-dev-utils': { - tools: stubs.tools, - logger() { - return stubs.logger; - } - } - } ); - } ); - - afterEach( () => { - sandbox.restore(); - mockery.disable(); - } ); - - it( 'passes options to "transformCommitForSubRepositoryFactory()" correctly', () => { - const commits = [ {}, {} ]; - - stubs.getNewReleaseType.returns( Promise.resolve( { - releaseType: 'minor', - commits - } ) ); - - stubs.versionUtils.getLastFromChangelog.returns( '0.5.0' ); - stubs.generateChangelogFromCommits.returns( Promise.resolve() ); - stubs.cli.provideVersion.returns( Promise.resolve( '1.0.0' ) ); - - const options = { - newVersion: '1.0.0', - disableMajorBump: false, - useExplicitBreakingChangeGroups: true - }; - - return generateChangelogForSinglePackage( options ) - .then( () => { - expect( stubs.transformCommitFactory.calledTwice ).to.equal( true ); - - expect( stubs.transformCommitFactory.firstCall.args[ 0 ] ).to.deep.equal( { - returnInvalidCommit: true, - treatMajorAsMinorBreakingChange: false, - useExplicitBreakingChangeGroups: true - } ); - expect( stubs.transformCommitFactory.secondCall.args[ 0 ] ).to.deep.equal( { - treatMajorAsMinorBreakingChange: false, - useExplicitBreakingChangeGroups: true - } ); - } ); - } ); - - it( 'passes `options.indentLevel` to "generateChangelogFromCommits()" correctly', () => { - const commits = [ {}, {} ]; - - stubs.getNewReleaseType.returns( Promise.resolve( { - releaseType: 'minor', - commits - } ) ); - - stubs.versionUtils.getLastFromChangelog.returns( '0.5.0' ); - stubs.generateChangelogFromCommits.returns( Promise.resolve() ); - stubs.cli.provideVersion.returns( Promise.resolve( '1.0.0' ) ); - - const options = { - newVersion: '1.0.0', - indentLevel: 3 - }; - - return generateChangelogForSinglePackage( options ) - .then( () => { - expect( stubs.generateChangelogFromCommits.calledOnce ).to.equal( true ); - expect( stubs.generateChangelogFromCommits.firstCall.args[ 0 ] ).to.deep.equal( { - indentLevel: 3, - version: '1.0.0', - tagName: 'v0.5.0', - newTagName: 'v1.0.0', - transformCommit: stubs.transformCommit[ 1 ], - isInternalRelease: false, - skipLinks: false - } ); - } ); - } ); - - it( 'generates the changelog for specified version (user must confirm)', () => { - const commits = [ {}, {} ]; - - stubs.getNewReleaseType.returns( Promise.resolve( { - releaseType: 'minor', - commits - } ) ); - - stubs.versionUtils.getLastFromChangelog.returns( '0.5.0' ); - stubs.generateChangelogFromCommits.returns( Promise.resolve() ); - stubs.cli.provideVersion.returns( Promise.resolve( '1.0.0' ) ); - - return generateChangelogForSinglePackage( { newVersion: '1.0.0' } ) - .then( () => { - expect( stubs.transformCommitFactory.calledTwice ).to.equal( true ); - - expect( stubs.generateChangelogFromCommits.calledOnce ).to.equal( true ); - expect( stubs.generateChangelogFromCommits.firstCall.args[ 0 ] ).to.deep.equal( { - indentLevel: 0, - version: '1.0.0', - tagName: 'v0.5.0', - newTagName: 'v1.0.0', - transformCommit: stubs.transformCommit[ 1 ], - isInternalRelease: false, - skipLinks: false - } ); - - expect( stubs.logger.info.calledTwice ).to.equal( true ); - expect( stubs.logger.info.firstCall.args[ 0 ] ).to.match( - /Generating changelog for "[^"]+".../ - ); - expect( stubs.logger.info.secondCall.args[ 0 ] ).to.match( - /Changelog for "[^"]+" \(v1\.0\.0\) has been generated\./ - ); - } ); - } ); - - it( 'generates changelog for version provided by a user', () => { - const commits = [ {}, {} ]; - - stubs.getNewReleaseType.returns( Promise.resolve( { - releaseType: 'minor', - commits - } ) ); - stubs.cli.provideVersion.returns( Promise.resolve( '0.1.0' ) ); - stubs.versionUtils.getLastFromChangelog.returns( null ); - stubs.generateChangelogFromCommits.returns( Promise.resolve() ); - - return generateChangelogForSinglePackage() - .then( () => { - expect( stubs.transformCommitFactory.calledTwice ).to.equal( true ); - - expect( stubs.generateChangelogFromCommits.calledOnce ).to.equal( true ); - expect( stubs.generateChangelogFromCommits.firstCall.args[ 0 ] ).to.deep.equal( { - indentLevel: 0, - version: '0.1.0', - tagName: null, - newTagName: 'v0.1.0', - transformCommit: stubs.transformCommit[ 1 ], - isInternalRelease: false, - skipLinks: false - } ); - - expect( stubs.getNewReleaseType.calledOnce ).to.equal( true ); - expect( stubs.getNewReleaseType.firstCall.args[ 0 ] ).to.equal( stubs.transformCommit[ 0 ] ); - expect( stubs.getNewReleaseType.firstCall.args[ 1 ] ).to.deep.equal( { - tagName: null - } ); - - expect( stubs.cli.provideVersion.calledOnce ).to.equal( true ); - expect( stubs.cli.provideVersion.firstCall.args[ 0 ] ).to.equal( '0.0.1' ); - expect( stubs.cli.provideVersion.firstCall.args[ 1 ] ).to.equal( 'minor' ); - - expect( stubs.displayCommits.calledOnce ).to.equal( true ); - expect( stubs.displayCommits.firstCall.args[ 0 ] ).to.deep.equal( commits ); - } ); - } ); - - it( 'generates changelog (as "patch" bump) for "internal" version provided by a user', () => { - const commits = [ {}, {} ]; - - stubs.getNewReleaseType.returns( Promise.resolve( { - releaseType: 'minor', - commits - } ) ); - stubs.cli.provideVersion.returns( Promise.resolve( 'internal' ) ); - stubs.versionUtils.getLastFromChangelog.returns( null ); - stubs.generateChangelogFromCommits.returns( Promise.resolve() ); - - return generateChangelogForSinglePackage() - .then( () => { - expect( stubs.transformCommitFactory.calledTwice ).to.equal( true ); - - expect( stubs.generateChangelogFromCommits.calledOnce ).to.equal( true ); - expect( stubs.generateChangelogFromCommits.firstCall.args[ 0 ] ).to.deep.equal( { - indentLevel: 0, - version: '0.0.2', - tagName: null, - newTagName: 'v0.0.2', - transformCommit: stubs.transformCommit[ 1 ], - isInternalRelease: true, - skipLinks: false - } ); - - expect( stubs.getNewReleaseType.calledOnce ).to.equal( true ); - expect( stubs.getNewReleaseType.firstCall.args[ 0 ] ).to.equal( stubs.transformCommit[ 0 ] ); - expect( stubs.getNewReleaseType.firstCall.args[ 1 ] ).to.deep.equal( { - tagName: null - } ); - - expect( stubs.cli.provideVersion.calledOnce ).to.equal( true ); - expect( stubs.cli.provideVersion.firstCall.args[ 0 ] ).to.equal( '0.0.1' ); - expect( stubs.cli.provideVersion.firstCall.args[ 1 ] ).to.equal( 'minor' ); - - expect( stubs.displayCommits.calledOnce ).to.equal( true ); - expect( stubs.displayCommits.firstCall.args[ 0 ] ).to.deep.equal( commits ); - } ); - } ); - - it( '"options.newVersion" can be defined as an increment level ', () => { - const commits = [ {}, {} ]; - - stubs.getNewReleaseType.returns( Promise.resolve( { - releaseType: 'minor', - commits - } ) ); - stubs.cli.provideVersion.returns( Promise.resolve( '0.1.0' ) ); - stubs.versionUtils.getLastFromChangelog.returns( null ); - stubs.generateChangelogFromCommits.returns( Promise.resolve() ); - - return generateChangelogForSinglePackage( { newVersion: 'minor' } ) - .then( () => { - expect( stubs.transformCommitFactory.calledTwice ).to.equal( true ); - - expect( stubs.generateChangelogFromCommits.calledOnce ).to.equal( true ); - expect( stubs.generateChangelogFromCommits.firstCall.args[ 0 ] ).to.deep.equal( { - indentLevel: 0, - version: '0.1.0', - tagName: null, - newTagName: 'v0.1.0', - transformCommit: stubs.transformCommit[ 1 ], - isInternalRelease: false, - skipLinks: false - } ); - - expect( stubs.cli.provideVersion.calledOnce ).to.equal( true ); - expect( stubs.cli.provideVersion.firstCall.args[ 0 ] ).to.equal( '0.0.1' ); - expect( stubs.cli.provideVersion.firstCall.args[ 1 ] ).to.equal( 'minor' ); - - expect( stubs.displayCommits.called ).to.equal( true ); - } ); - } ); - - it( 'does not generate if a user provides "skip" as a new version (suggested a "minor" release)', () => { - const commits = [ {}, {} ]; - - stubs.getNewReleaseType.returns( Promise.resolve( { - releaseType: 'minor', - commits - } ) ); - - stubs.cli.provideVersion.returns( Promise.resolve( 'skip' ) ); - - return generateChangelogForSinglePackage() - .then( () => { - expect( stubs.transformCommitFactory.calledOnce ).to.equal( true ); - expect( stubs.generateChangelogFromCommits.called ).to.equal( false ); - expect( stubs.displayCommits.calledOnce ).to.equal( true ); - expect( stubs.displayCommits.firstCall.args[ 0 ] ).to.deep.equal( commits ); - } ); - } ); - - it( 'does not generate if a user provides "skip" as a new version (suggested a "skip" release)', () => { - const commits = [ {}, {} ]; - - stubs.getNewReleaseType.returns( Promise.resolve( { - releaseType: 'skip', - commits - } ) ); - - stubs.cli.provideVersion.returns( Promise.resolve( 'skip' ) ); - - return generateChangelogForSinglePackage() - .then( () => { - expect( stubs.transformCommitFactory.calledOnce ).to.equal( true ); - expect( stubs.generateChangelogFromCommits.called ).to.equal( false ); - expect( stubs.displayCommits.calledOnce ).to.equal( true ); - expect( stubs.displayCommits.firstCall.args[ 0 ] ).to.deep.equal( commits ); - } ); - } ); - - it( 'committed changelog should not trigger CI', () => { - const commits = [ {}, {} ]; - - stubs.getNewReleaseType.returns( Promise.resolve( { - releaseType: 'minor', - commits - } ) ); - - stubs.versionUtils.getLastFromChangelog.returns( '0.5.0' ); - stubs.generateChangelogFromCommits.returns( Promise.resolve() ); - stubs.cli.provideVersion.returns( Promise.resolve( '1.0.0' ) ); - - return generateChangelogForSinglePackage( { newVersion: '1.0.0' } ) - .then( () => { - expect( stubs.tools.shExec.secondCall.args[ 0 ] ).to.equal( - 'git commit -m "Docs: Changelog. [skip ci]"' - ); - } ); - } ); - - it( 'allows generating changelog internal changelog (newVersion as a version string)', () => { - stubs.versionUtils.getLastFromChangelog.returns( '0.0.1' ); - stubs.generateChangelogFromCommits.returns( Promise.resolve() ); - - return generateChangelogForSinglePackage( { newVersion: '0.1.0', isInternalRelease: true } ) - .then( () => { - expect( stubs.transformCommitFactory.calledOnce ).to.equal( true ); - expect( stubs.generateChangelogFromCommits.calledOnce ).to.equal( true ); - expect( stubs.generateChangelogFromCommits.firstCall.args[ 0 ] ).to.deep.equal( { - indentLevel: 0, - version: '0.1.0', - tagName: 'v0.0.1', - newTagName: 'v0.1.0', - transformCommit: stubs.transformCommit[ 0 ], - isInternalRelease: true, - skipLinks: false - } ); - } ); - } ); - - it( 'allows generating changelog internal changelog (newVersion as an increment level)', () => { - stubs.versionUtils.getLastFromChangelog.returns( '0.0.1' ); - stubs.generateChangelogFromCommits.returns( Promise.resolve() ); - - return generateChangelogForSinglePackage( { newVersion: 'major', isInternalRelease: true } ) - .then( () => { - expect( stubs.transformCommitFactory.calledOnce ).to.equal( true ); - expect( stubs.generateChangelogFromCommits.calledOnce ).to.equal( true ); - expect( stubs.generateChangelogFromCommits.firstCall.args[ 0 ] ).to.deep.equal( { - indentLevel: 0, - version: '1.0.0', - tagName: 'v0.0.1', - newTagName: 'v1.0.0', - transformCommit: stubs.transformCommit[ 0 ], - isInternalRelease: true, - skipLinks: false - } ); - } ); - } ); - - it( 'throws an error for internal changelog when specified invalid value as newVersion', () => { - stubs.versionUtils.getLastFromChangelog.returns( '0.0.1' ); - stubs.generateChangelogFromCommits.returns( Promise.resolve() ); - - return generateChangelogForSinglePackage( { newVersion: 'foo', isInternalRelease: true } ) - .then( - () => { - throw new Error( 'Supposed to be rejected.' ); - }, - error => { - expect( error.message ).to.equal( - 'If "isInternalRelease" is set on true, "newVersion" must be a version or increment level. Given "foo".' - ); - } - ); - } ); - - it( 'passes the "skipLinks" option to the changelog generator', () => { - stubs.getNewReleaseType.returns( Promise.resolve( { - releaseType: 'minor' - } ) ); - stubs.cli.provideVersion.returns( Promise.resolve( '0.1.0' ) ); - stubs.versionUtils.getLastFromChangelog.returns( null ); - stubs.generateChangelogFromCommits.returns( Promise.resolve() ); - - return generateChangelogForSinglePackage( { skipLinks: true } ) - .then( () => { - expect( stubs.transformCommitFactory.calledTwice ).to.equal( true ); - expect( stubs.generateChangelogFromCommits.calledOnce ).to.equal( true ); - expect( stubs.generateChangelogFromCommits.firstCall.args[ 0 ] ).to.deep.equal( { - indentLevel: 0, - version: '0.1.0', - tagName: null, - newTagName: 'v0.1.0', - transformCommit: stubs.transformCommit[ 1 ], - isInternalRelease: false, - skipLinks: true - } ); - } ); - } ); - - it( 'treats "MAJOR BREAKING CHANGES" as "MINOR BREAKING CHANGES"', () => { - stubs.getNewReleaseType.returns( Promise.resolve( { - releaseType: 'minor' - } ) ); - stubs.cli.provideVersion.returns( Promise.resolve( '0.1.0' ) ); - stubs.versionUtils.getLastFromChangelog.returns( null ); - stubs.generateChangelogFromCommits.returns( Promise.resolve() ); - - return generateChangelogForSinglePackage( { disableMajorBump: true } ) - .then( () => { - expect( stubs.transformCommitFactory.calledTwice ).to.equal( true ); - - expect( stubs.generateChangelogFromCommits.calledOnce ).to.equal( true ); - expect( stubs.generateChangelogFromCommits.firstCall.args[ 0 ] ).to.deep.equal( { - indentLevel: 0, - version: '0.1.0', - tagName: null, - newTagName: 'v0.1.0', - transformCommit: stubs.transformCommit[ 1 ], - isInternalRelease: false, - skipLinks: false - } ); - } ); - } ); - } ); -} ); diff --git a/packages/ckeditor5-dev-env/tests/release-tools/tasks/generatechangelogforsubpackages.js b/packages/ckeditor5-dev-env/tests/release-tools/tasks/generatechangelogforsubpackages.js deleted file mode 100644 index 1708cd629..000000000 --- a/packages/ckeditor5-dev-env/tests/release-tools/tasks/generatechangelogforsubpackages.js +++ /dev/null @@ -1,348 +0,0 @@ -/** - * @license Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved. - * For licensing, see LICENSE.md. - */ - -'use strict'; - -const path = require( 'path' ); -const sinon = require( 'sinon' ); -const expect = require( 'chai' ).expect; -const proxyquire = require( 'proxyquire' ); -const mockery = require( 'mockery' ); - -describe( 'dev-env/release-tools/tasks', () => { - let generateChangelogForSubPackages, sandbox, stubs; - - beforeEach( () => { - sandbox = sinon.createSandbox(); - - mockery.enable( { - useCleanCache: true, - warnOnReplace: false, - warnOnUnregistered: false - } ); - - stubs = { - transformCommitFunctionFactory: sandbox.stub(), - transformCommit: [], - getSubPackagesPaths: sandbox.stub(), - displaySkippedPackages: sandbox.stub(), - displayGeneratedChangelogs: sandbox.stub(), - generateChangelogFromCommits: sandbox.stub(), - getPackageJson: sandbox.stub(), - changelogUtils: { - changelogFile: 'CHANGELOG.md' - }, - getNewReleaseType: sandbox.stub(), - displayCommits: sandbox.stub(), - logger: { - info: sandbox.spy(), - warning: sandbox.spy(), - error: sandbox.spy() - }, - tools: { - shExec: sandbox.stub() - }, - cli: { - provideVersion: sandbox.stub() - }, - versionUtils: { - getLastFromChangelog: sandbox.stub() - } - }; - - for ( let i = 0; i < 4; ++i ) { - stubs.transformCommit.push( sandbox.stub() ); - stubs.transformCommitFunctionFactory.onCall( i ).returns( stubs.transformCommit[ i ] ); - } - - mockery.registerMock( '../utils/transform-commit/transformcommitforsubpackagefactory', stubs.transformCommitFunctionFactory ); - mockery.registerMock( '../utils/generatechangelogfromcommits', stubs.generateChangelogFromCommits ); - mockery.registerMock( '../utils/getsubpackagespaths', stubs.getSubPackagesPaths ); - mockery.registerMock( '../utils/displayskippedpackages', stubs.displaySkippedPackages ); - mockery.registerMock( '../utils/displaygeneratedchangelogs', stubs.displayGeneratedChangelogs ); - mockery.registerMock( '../utils/cli', stubs.cli ); - mockery.registerMock( '../utils/versions', stubs.versionUtils ); - mockery.registerMock( '../utils/getnewreleasetype', stubs.getNewReleaseType ); - mockery.registerMock( '../utils/displaycommits', stubs.displayCommits ); - - sandbox.stub( path, 'join' ).callsFake( ( ...chunks ) => chunks.join( '/' ) ); - - generateChangelogForSubPackages = proxyquire( '../../../lib/release-tools/tasks/generatechangelogforsubpackages', { - '@ckeditor/ckeditor5-dev-utils': { - tools: stubs.tools, - logger() { - return stubs.logger; - } - }, - '../utils/getpackagejson': stubs.getPackageJson, - '../utils/changelog': stubs.changelogUtils - } ); - } ); - - afterEach( () => { - sandbox.restore(); - mockery.disable(); - } ); - - describe( 'generateChangelogForSubPackages()', () => { - it( 'generates changelog entries for found sub packages', () => { - const commits = [ {}, {} ]; - const chdirStub = sandbox.stub( process, 'chdir' ); - sandbox.stub( process, 'cwd' ).returns( '/ckeditor5-dev' ); - - stubs.getSubPackagesPaths.returns( { - skipped: new Set(), - matched: new Set( [ - '/ckeditor5-dev/packages/ckeditor5-dev-foo', - '/ckeditor5-dev/packages/ckeditor5-dev-bar' - ] ) - } ); - - stubs.getPackageJson.onFirstCall().returns( { - name: '@ckeditor/ckeditor5-dev-foo', - version: '1.0.0' - } ); - stubs.versionUtils.getLastFromChangelog.onFirstCall().returns( '1.0.0' ); - stubs.getNewReleaseType.onFirstCall().returns( Promise.resolve( { commits, releaseType: 'patch' } ) ); - stubs.cli.provideVersion.onFirstCall().returns( Promise.resolve( '1.0.1' ) ); - stubs.generateChangelogFromCommits.onFirstCall().returns( Promise.resolve( '1.0.1' ) ); - - stubs.getPackageJson.onSecondCall().returns( { - name: '@ckeditor/ckeditor5-dev-bar', - version: '2.0.0' - } ); - stubs.versionUtils.getLastFromChangelog.onSecondCall().returns( '2.0.0' ); - stubs.getNewReleaseType.onSecondCall().returns( Promise.resolve( { commits, releaseType: 'minor' } ) ); - stubs.cli.provideVersion.onSecondCall().returns( Promise.resolve( '2.1.0' ) ); - stubs.generateChangelogFromCommits.onSecondCall().returns( Promise.resolve( '2.1.0' ) ); - - const generatedChangelogs = new Map( [ - [ '@ckeditor/ckeditor5-dev-foo', '1.0.1' ], - [ '@ckeditor/ckeditor5-dev-bar', '2.1.0' ] - ] ); - - const options = { - cwd: '/ckeditor5-dev', - packages: 'packages' - }; - - return generateChangelogForSubPackages( options ) - .then( () => { - expect( chdirStub.calledThrice ).to.equal( true ); - expect( chdirStub.firstCall.args[ 0 ] ).to.equal( '/ckeditor5-dev/packages/ckeditor5-dev-foo' ); - expect( chdirStub.secondCall.args[ 0 ] ).to.equal( '/ckeditor5-dev/packages/ckeditor5-dev-bar' ); - expect( chdirStub.thirdCall.args[ 0 ] ).to.equal( '/ckeditor5-dev' ); - - expect( stubs.getNewReleaseType.calledTwice ).to.equal( true ); - expect( stubs.getNewReleaseType.firstCall.args[ 0 ] ).to.equal( stubs.transformCommit[ 0 ] ); - expect( stubs.getNewReleaseType.firstCall.args[ 1 ] ).to.deep.equal( { - tagName: '@ckeditor/ckeditor5-dev-foo@1.0.0' - } ); - expect( stubs.getNewReleaseType.secondCall.args[ 0 ] ).to.equal( stubs.transformCommit[ 2 ] ); - expect( stubs.getNewReleaseType.secondCall.args[ 1 ] ).to.deep.equal( { - tagName: '@ckeditor/ckeditor5-dev-bar@2.0.0' - } ); - - expect( stubs.cli.provideVersion.calledTwice ).to.equal( true ); - expect( stubs.cli.provideVersion.firstCall.args[ 0 ] ).to.equal( '1.0.0' ); - expect( stubs.cli.provideVersion.firstCall.args[ 1 ] ).to.equal( 'patch' ); - expect( stubs.cli.provideVersion.secondCall.args[ 0 ] ).to.equal( '2.0.0' ); - expect( stubs.cli.provideVersion.secondCall.args[ 1 ] ).to.equal( 'minor' ); - - expect( stubs.logger.info.getCall( 0 ).args[ 0 ] ).to.match( - /Generating changelog for "@ckeditor\/ckeditor5-dev-foo"\.\.\./ - ); - expect( stubs.logger.info.getCall( 2 ).args[ 0 ] ).to.match( - /Generating changelog for "@ckeditor\/ckeditor5-dev-bar"\.\.\./ - ); - expect( stubs.logger.info.getCall( 4 ).args[ 0 ] ).to.match( /Committing generated changelogs\./ ); - - expect( stubs.displayGeneratedChangelogs.calledOnce ).to.equal( true ); - expect( stubs.displayGeneratedChangelogs.firstCall.args[ 0 ] ).to.deep.equal( generatedChangelogs ); - - expect( stubs.tools.shExec.calledTwice ).to.equal( true ); - expect( stubs.tools.shExec.firstCall.args[ 0 ] ).to.equal( 'git add packages/**/CHANGELOG.md' ); - expect( stubs.tools.shExec.secondCall.args[ 0 ] ).to.equal( - 'git commit -m "Docs: Updated changelog for packages. [skip ci]"' - ); - - expect( stubs.generateChangelogFromCommits.calledTwice ).to.equal( true ); - expect( stubs.generateChangelogFromCommits.firstCall.args[ 0 ] ).to.deep.equal( { - version: '1.0.1', - transformCommit: stubs.transformCommit[ 1 ], - tagName: '@ckeditor/ckeditor5-dev-foo@1.0.0', - newTagName: '@ckeditor/ckeditor5-dev-foo@1.0.1', - isInternalRelease: false - } ); - expect( stubs.generateChangelogFromCommits.secondCall.args[ 0 ] ).to.deep.equal( { - version: '2.1.0', - transformCommit: stubs.transformCommit[ 3 ], - tagName: '@ckeditor/ckeditor5-dev-bar@2.0.0', - newTagName: '@ckeditor/ckeditor5-dev-bar@2.1.0', - isInternalRelease: false - } ); - - expect( stubs.displayCommits.calledTwice ).to.equal( true ); - expect( stubs.displayCommits.firstCall.args[ 0 ] ).to.deep.equal( commits ); - expect( stubs.displayCommits.secondCall.args[ 0 ] ).to.deep.equal( commits ); - } ); - } ); - - it( 'ignores specified packages', () => { - const commits = [ {}, {} ]; - const chdirStub = sandbox.stub( process, 'chdir' ); - sandbox.stub( process, 'cwd' ).returns( '/ckeditor5-dev' ); - - stubs.getSubPackagesPaths.returns( { - skipped: new Set( [ - '/ckeditor5-dev/packages/ckeditor5-dev-bar' - ] ), - matched: new Set( [ - '/ckeditor5-dev/packages/ckeditor5-dev-foo' - ] ) - } ); - - stubs.getPackageJson.onFirstCall().returns( { - name: '@ckeditor/ckeditor5-dev-foo', - version: '1.0.0' - } ); - stubs.versionUtils.getLastFromChangelog.onFirstCall().returns( '1.0.0' ); - stubs.getNewReleaseType.onFirstCall().returns( Promise.resolve( { commits, releaseType: 'patch' } ) ); - stubs.cli.provideVersion.onFirstCall().returns( Promise.resolve( '1.0.1' ) ); - stubs.generateChangelogFromCommits.onFirstCall().returns( Promise.resolve( '1.0.1' ) ); - - const options = { - cwd: '/ckeditor5-dev', - packages: 'packages' - }; - - return generateChangelogForSubPackages( options ) - .then( () => { - expect( chdirStub.calledTwice ).to.equal( true ); - expect( chdirStub.firstCall.args[ 0 ] ).to.equal( '/ckeditor5-dev/packages/ckeditor5-dev-foo' ); - expect( chdirStub.secondCall.args[ 0 ] ).to.equal( '/ckeditor5-dev' ); - - expect( stubs.getNewReleaseType.calledOnce ).to.equal( true ); - expect( stubs.cli.provideVersion.calledOnce ).to.equal( true ); - - expect( stubs.displaySkippedPackages.calledOnce ).to.equal( true ); - expect( stubs.displaySkippedPackages.firstCall.args[ 0 ] ).to.deep.equal( new Set( [ - '/ckeditor5-dev/packages/ckeditor5-dev-bar' - ] ) ); - - expect( stubs.generateChangelogFromCommits.firstCall.args[ 0 ] ).to.deep.equal( { - version: '1.0.1', - transformCommit: stubs.transformCommit[ 1 ], - tagName: '@ckeditor/ckeditor5-dev-foo@1.0.0', - newTagName: '@ckeditor/ckeditor5-dev-foo@1.0.1', - isInternalRelease: false - } ); - - expect( stubs.displayCommits.calledOnce ).to.equal( true ); - expect( stubs.displayCommits.firstCall.args[ 0 ] ).to.deep.equal( commits ); - } ); - } ); - - it( 'displays packages which will not have a new entry in changelog', () => { - const chdirStub = sandbox.stub( process, 'chdir' ); - sandbox.stub( process, 'cwd' ).returns( '/ckeditor5-dev' ); - - stubs.getSubPackagesPaths.returns( { - skipped: new Set(), - matched: new Set( [ - '/ckeditor5-dev/packages/ckeditor5-dev-foo' - ] ) - } ); - - stubs.getPackageJson.onFirstCall().returns( { - name: '@ckeditor/ckeditor5-dev-foo', - version: '1.0.0' - } ); - stubs.versionUtils.getLastFromChangelog.onFirstCall().returns( '1.0.0' ); - stubs.getNewReleaseType.onFirstCall().returns( Promise.resolve( { releaseType: 'skip' } ) ); - stubs.cli.provideVersion.onFirstCall().returns( Promise.resolve( 'skip' ) ); - - const options = { - cwd: '/ckeditor5-dev', - packages: 'packages' - }; - - return generateChangelogForSubPackages( options ) - .then( () => { - expect( chdirStub.calledTwice ).to.equal( true ); - expect( chdirStub.firstCall.args[ 0 ] ).to.equal( '/ckeditor5-dev/packages/ckeditor5-dev-foo' ); - expect( chdirStub.secondCall.args[ 0 ] ).to.equal( '/ckeditor5-dev' ); - - expect( stubs.getNewReleaseType.calledOnce ).to.equal( true ); - expect( stubs.cli.provideVersion.calledOnce ).to.equal( true ); - expect( stubs.cli.provideVersion.firstCall.args[ 0 ] ).to.equal( '1.0.0' ); - expect( stubs.cli.provideVersion.firstCall.args[ 1 ] ).to.equal( null ); - - expect( stubs.displaySkippedPackages.calledOnce ).to.equal( true ); - expect( stubs.displaySkippedPackages.firstCall.args[ 0 ] ).to.deep.equal( new Set( [ - '/ckeditor5-dev/packages/ckeditor5-dev-foo' - ] ) ); - - expect( stubs.tools.shExec.called ).to.equal( false ); - expect( stubs.generateChangelogFromCommits.called ).to.equal( false ); - } ); - } ); - - it( 'allows generating changelog as "internal" release', () => { - sandbox.stub( process, 'chdir' ); - sandbox.stub( process, 'cwd' ).returns( '/ckeditor5-dev' ); - - stubs.getSubPackagesPaths.returns( { - skipped: new Set(), - matched: new Set( [ - '/ckeditor5-dev/packages/ckeditor5-dev-foo', - '/ckeditor5-dev/packages/ckeditor5-dev-bar' - ] ) - } ); - - stubs.getPackageJson.onFirstCall().returns( { - name: '@ckeditor/ckeditor5-dev-foo', - version: '1.0.0' - } ); - stubs.versionUtils.getLastFromChangelog.onFirstCall().returns( '1.0.0' ); - stubs.getNewReleaseType.onFirstCall().returns( Promise.resolve( { releaseType: 'patch' } ) ); - stubs.cli.provideVersion.onFirstCall().returns( Promise.resolve( 'internal' ) ); - stubs.generateChangelogFromCommits.onFirstCall().returns( Promise.resolve( '1.0.1' ) ); - - stubs.getPackageJson.onSecondCall().returns( { - name: '@ckeditor/ckeditor5-dev-bar', - version: '2.0.0' - } ); - stubs.versionUtils.getLastFromChangelog.onSecondCall().returns( '2.0.0' ); - stubs.getNewReleaseType.onSecondCall().returns( Promise.resolve( { releaseType: 'minor' } ) ); - stubs.cli.provideVersion.onSecondCall().returns( Promise.resolve( 'internal' ) ); - stubs.generateChangelogFromCommits.onSecondCall().returns( Promise.resolve( '2.0.1' ) ); - - const options = { - cwd: '/ckeditor5-dev', - packages: 'packages' - }; - - return generateChangelogForSubPackages( options ) - .then( () => { - expect( stubs.generateChangelogFromCommits.calledTwice ).to.equal( true ); - expect( stubs.generateChangelogFromCommits.firstCall.args[ 0 ] ).to.deep.equal( { - version: '1.0.1', - transformCommit: stubs.transformCommit[ 1 ], - tagName: '@ckeditor/ckeditor5-dev-foo@1.0.0', - newTagName: '@ckeditor/ckeditor5-dev-foo@1.0.1', - isInternalRelease: true - } ); - expect( stubs.generateChangelogFromCommits.secondCall.args[ 0 ] ).to.deep.equal( { - version: '2.0.1', - transformCommit: stubs.transformCommit[ 3 ], - tagName: '@ckeditor/ckeditor5-dev-bar@2.0.0', - newTagName: '@ckeditor/ckeditor5-dev-bar@2.0.1', - isInternalRelease: true - } ); - } ); - } ); - } ); -} ); diff --git a/packages/ckeditor5-dev-env/tests/release-tools/tasks/generatesummarychangelog.js b/packages/ckeditor5-dev-env/tests/release-tools/tasks/generatesummarychangelog.js deleted file mode 100644 index e12b6c15b..000000000 --- a/packages/ckeditor5-dev-env/tests/release-tools/tasks/generatesummarychangelog.js +++ /dev/null @@ -1,1086 +0,0 @@ -/** - * @license Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved. - * For licensing, see LICENSE.md. - */ - -'use strict'; - -const path = require( 'path' ); -const sinon = require( 'sinon' ); -const expect = require( 'chai' ).expect; -const proxyquire = require( 'proxyquire' ); -const mockery = require( 'mockery' ); -const executeOnPackages = require( '../../../lib/release-tools/utils/executeonpackages' ); - -const mainPackagePath = path.join( __dirname, 'stubs', 'releasesubrepositories' ); -const packagesPaths = { - alpha: path.join( mainPackagePath, 'packages', 'alpha' ), - beta: path.join( mainPackagePath, 'packages', 'beta' ), - gamma: path.join( mainPackagePath, 'packages', 'gamma' ), - delta: path.join( mainPackagePath, 'packages', 'delta' ), - epsilon: path.join( mainPackagePath, 'packages', 'epsilon' ), - omega: path.join( mainPackagePath, 'packages', 'omega' ), - devKappa: path.join( mainPackagePath, 'packages', 'dev-kappa' ) -}; - -const testCwd = process.cwd(); - -// Tests below use real files (as mocks). See: "/packages/ckeditor5-dev-env/tests/release-tools/tasks/stubs/releasesubrepositories". -// `console.log` calls are mocked (See L85) because the task at the end prints an empty line which breaks the test logs. -describe( 'dev-env/release-tools/tasks', () => { - let generateSummaryChangelog, sandbox, stubs; - - beforeEach( () => { - sandbox = sinon.createSandbox(); - - mockery.enable( { - useCleanCache: true, - warnOnReplace: false, - warnOnUnregistered: false - } ); - - stubs = { - shExec: sandbox.stub(), - logger: { - info: sandbox.spy(), - warning: sandbox.spy(), - error: sandbox.spy() - }, - versionUtils: { - getLastFromChangelog: sandbox.stub(), - getCurrent: sandbox.stub() - }, - cliUtils: { - provideVersion: sandbox.stub() - }, - changelogUtils: { - getChangelog: sandbox.stub(), - saveChangelog: sandbox.stub(), - hasMajorBreakingChanges: sandbox.stub(), - hasMinorBreakingChanges: sandbox.stub(), - changelogHeader: '' - }, - displayGeneratedChangelogs: sandbox.stub(), - getSubRepositoriesPaths: sandbox.stub(), - transformCommitFunctionFactory: sandbox.stub(), - transformCommit: [ - sandbox.stub(), - sandbox.stub() - ], - generateChangelogFromCommits: sandbox.stub(), - getNewReleaseType: sandbox.stub(), - displayCommits: sandbox.stub(), - executeOnPackages: sandbox.stub(), - moment: { - format: sandbox.stub() - }, - fs: { - existsSync: sandbox.stub() - } - }; - - stubs.transformCommitFunctionFactory.onFirstCall().returns( stubs.transformCommit[ 0 ] ); - stubs.transformCommitFunctionFactory.onSecondCall().returns( stubs.transformCommit[ 1 ] ); - - sandbox.stub( console, 'log' ); - - mockery.registerMock( 'moment', () => stubs.moment ); - mockery.registerMock( '../utils/displaygeneratedchangelogs', stubs.displayGeneratedChangelogs ); - mockery.registerMock( '../utils/transform-commit/transformcommitforsubrepositoryfactory', stubs.transformCommitFunctionFactory ); - mockery.registerMock( '../utils/generatechangelogfromcommits', stubs.generateChangelogFromCommits ); - mockery.registerMock( '../utils/executeonpackages', stubs.executeOnPackages ); - mockery.registerMock( '../utils/getnewreleasetype', stubs.getNewReleaseType ); - mockery.registerMock( '../utils/displaycommits', stubs.displayCommits ); - mockery.registerMock( '../utils/versions', stubs.versionUtils ); - mockery.registerMock( '../utils/cli', stubs.cliUtils ); - - sandbox.stub( path, 'join' ).callsFake( ( ...chunks ) => chunks.join( '/' ) ); - - generateSummaryChangelog = proxyquire( '../../../lib/release-tools/tasks/generatesummarychangelog', { - fs: stubs.fs, - '@ckeditor/ckeditor5-dev-utils': { - tools: { - shExec: stubs.shExec - }, - logger() { - return stubs.logger; - } - }, - '../utils/changelog': stubs.changelogUtils, - '../utils/getsubrepositoriespaths': stubs.getSubRepositoriesPaths - } ); - } ); - - afterEach( () => { - sandbox.restore(); - mockery.disable(); - } ); - - describe( 'generateSummaryChangelog()', () => { - it( 'generates a summary changelog for single package', () => { - const commits = [ {}, {} ]; - - stubs.getSubRepositoriesPaths.returns( { - matched: new Set( [ - packagesPaths.alpha - ] ), - skipped: new Set( [ - packagesPaths.beta, - packagesPaths.gamma, - packagesPaths.delta, - packagesPaths.epsilon - ] ) - } ); - - stubs.executeOnPackages.callsFake( executeOnPackages ); - - stubs.versionUtils.getCurrent.withArgs( packagesPaths.beta ).returns( '0.2.0' ); - stubs.versionUtils.getLastFromChangelog.withArgs( packagesPaths.beta ).returns( '0.2.1' ); - - // Minor release (no minor breaking changes). - stubs.versionUtils.getCurrent.withArgs( packagesPaths.gamma ).returns( '0.3.0' ); - stubs.versionUtils.getLastFromChangelog.withArgs( packagesPaths.gamma ).returns( '0.4.0' ); - stubs.changelogUtils.hasMinorBreakingChanges.withArgs( '0.4.0', packagesPaths.gamma ).returns( false ); - - // Major release (no major breaking changes). - stubs.versionUtils.getCurrent.withArgs( packagesPaths.epsilon ).returns( '0.5.0' ); - stubs.versionUtils.getLastFromChangelog.withArgs( packagesPaths.epsilon ).returns( '1.0.0' ); - stubs.changelogUtils.hasMajorBreakingChanges.withArgs( '1.0.0', packagesPaths.epsilon ).returns( false ); - - stubs.getNewReleaseType.resolves( { commits, releaseType: 'skip' } ); - - stubs.cliUtils.provideVersion.resolves( '1.0.0' ); - - stubs.moment.format.returns( '2017-10-09' ); - - stubs.fs.existsSync.returns( true ); - - stubs.changelogUtils.getChangelog.returns( '' ); - - const processChidirStub = sandbox.stub( process, 'chdir' ); - - const options = { - cwd: mainPackagePath, - packages: 'packages', - skipMainRepository: true - }; - - return generateSummaryChangelog( options ) - .then( () => { - /* eslint-disable max-len */ - const expectedNewChangelog = `## [1.0.0](https://github.com/ckeditor/alpha/compare/v0.0.1...v1.0.0) (2017-10-09) - -### Dependencies - -Major releases (dependencies of those packages have breaking changes): - -* [@ckeditor/epsilon](https://www.npmjs.com/package/@ckeditor/epsilon): v0.5.0 => [v1.0.0](https://github.com/ckeditor/epsilon/releases/tag/v1.0.0) - -Minor releases (new features, no breaking changes): - -* [@ckeditor/gamma](https://www.npmjs.com/package/@ckeditor/gamma): v0.3.0 => [v0.4.0](https://github.com/ckeditor/gamma/releases/tag/v0.4.0) - -Patch releases (bug fixes, internal changes): - -* [@ckeditor/beta](https://www.npmjs.com/package/@ckeditor/beta): v0.2.0 => [v0.2.1](https://github.com/ckeditor/beta/releases/tag/v0.2.1) -`; - expect( stubs.transformCommitFunctionFactory.calledOnce ).to.equal( true ); - expect( stubs.transformCommitFunctionFactory.firstCall.args[ 0 ] ).to.deep.equal( { - returnInvalidCommit: true - } ); - - /* eslint-enable max-len */ - expect( stubs.getNewReleaseType.calledOnce ).to.equal( true ); - expect( stubs.getNewReleaseType.firstCall.args[ 0 ] ).to.equal( stubs.transformCommit[ 0 ] ); - expect( stubs.getNewReleaseType.firstCall.args[ 1 ] ).to.deep.equal( { tagName: undefined } ); - - expect( stubs.changelogUtils.saveChangelog.calledOnce ).to.equal( true ); - expect( stubs.changelogUtils.saveChangelog.firstCall.args[ 0 ] ).to.equal( expectedNewChangelog ); - expect( stubs.changelogUtils.saveChangelog.firstCall.args[ 1 ] ).to.equal( packagesPaths.alpha ); - - expect( stubs.cliUtils.provideVersion.firstCall.args[ 0 ] ).to.equal( '0.0.1' ); - - // Major bump was suggested because of packages changes. - expect( stubs.cliUtils.provideVersion.firstCall.args[ 1 ] ).to.equal( 'major' ); - expect( stubs.cliUtils.provideVersion.firstCall.args[ 2 ] ).to.deep.equal( { - disableInternalVersion: true - } ); - - expect( processChidirStub.callCount ).to.equal( 2 ); - expect( processChidirStub.firstCall.args[ 0 ] ).to.equal( packagesPaths.alpha ); - expect( processChidirStub.secondCall.args[ 0 ] ).to.equal( testCwd ); - - expect( stubs.displayGeneratedChangelogs.calledOnce ).to.equal( true ); - - const genetatedChangelogMap = stubs.displayGeneratedChangelogs.firstCall.args[ 0 ]; - - expect( genetatedChangelogMap.has( '@ckeditor/alpha' ) ).to.equal( true ); - expect( stubs.displayCommits.calledOnce ).to.equal( true ); - expect( stubs.displayCommits.firstCall.args[ 0 ] ).to.deep.equal( commits ); - } ); - } ); - - it( 'uses specified version as proposed when asking about it', () => { - const commits = [ {}, {} ]; - - stubs.getSubRepositoriesPaths.returns( { - matched: new Set( [ - packagesPaths.alpha - ] ), - skipped: new Set( [ - packagesPaths.beta, - packagesPaths.gamma, - packagesPaths.delta, - packagesPaths.epsilon - ] ) - } ); - - stubs.executeOnPackages.callsFake( executeOnPackages ); - - stubs.versionUtils.getCurrent.withArgs( packagesPaths.beta ).returns( '0.2.0' ); - stubs.versionUtils.getLastFromChangelog.withArgs( packagesPaths.beta ).returns( '0.2.1' ); - - // Minor release (no minor breaking changes). - stubs.versionUtils.getCurrent.withArgs( packagesPaths.gamma ).returns( '0.3.0' ); - stubs.versionUtils.getLastFromChangelog.withArgs( packagesPaths.gamma ).returns( '0.4.0' ); - stubs.changelogUtils.hasMinorBreakingChanges.withArgs( '0.4.0', packagesPaths.gamma ).returns( false ); - - // Major release (no major breaking changes). - stubs.versionUtils.getCurrent.withArgs( packagesPaths.epsilon ).returns( '0.5.0' ); - stubs.versionUtils.getLastFromChangelog.withArgs( packagesPaths.epsilon ).returns( '1.0.0' ); - stubs.changelogUtils.hasMajorBreakingChanges.withArgs( '1.0.0', packagesPaths.epsilon ).returns( false ); - - stubs.getNewReleaseType.resolves( { commits, releaseType: 'skip' } ); - - stubs.cliUtils.provideVersion.resolves( '1.0.0' ); - - stubs.moment.format.returns( '2017-10-09' ); - - stubs.fs.existsSync.returns( true ); - - stubs.changelogUtils.getChangelog.returns( '' ); - - const processChidirStub = sandbox.stub( process, 'chdir' ); - - const options = { - cwd: mainPackagePath, - packages: 'packages', - skipMainRepository: true, - version: '1.0.0' - }; - - return generateSummaryChangelog( options ) - .then( () => { - // '1.0.0' bump was suggested because of `options.version`. - expect( stubs.cliUtils.provideVersion.firstCall.args[ 1 ] ).to.equal( '1.0.0' ); - expect( stubs.cliUtils.provideVersion.firstCall.args[ 2 ] ).to.deep.equal( { - disableInternalVersion: true - } ); - - expect( processChidirStub.callCount ).to.equal( 2 ); - } ); - } ); - - it( 'attaches notes from commits in the package', () => { - stubs.getSubRepositoriesPaths.returns( { - matched: new Set( [ - packagesPaths.alpha - ] ), - skipped: new Set( [ - packagesPaths.beta, - packagesPaths.gamma, - packagesPaths.delta, - packagesPaths.epsilon - ] ) - } ); - - stubs.executeOnPackages.callsFake( executeOnPackages ); - - stubs.versionUtils.getLastFromChangelog.withArgs( packagesPaths.alpha ).returns( '0.0.1' ); - - stubs.versionUtils.getCurrent.withArgs( packagesPaths.beta ).returns( '0.2.0' ); - stubs.versionUtils.getLastFromChangelog.withArgs( packagesPaths.beta ).returns( '0.2.1' ); - - stubs.versionUtils.getCurrent.withArgs( packagesPaths.gamma ).returns( '0.3.0' ); - stubs.versionUtils.getLastFromChangelog.withArgs( packagesPaths.gamma ).returns( '0.3.1' ); - - stubs.versionUtils.getCurrent.withArgs( packagesPaths.epsilon ).returns( '0.5.0' ); - stubs.versionUtils.getLastFromChangelog.withArgs( packagesPaths.epsilon ).returns( '0.5.1' ); - - stubs.getNewReleaseType.resolves( { releaseType: 'minor' } ); - - stubs.generateChangelogFromCommits.resolves( - '## [0.1.0](https://github.com/ckeditor/alpha/compare/v0.0.1...v0.1.0) (2017-10-09)\n\n' + - 'Changelog entries generated from commits.\n\n' - ); - - stubs.cliUtils.provideVersion.resolves( '0.1.0' ); - - stubs.moment.format.returns( '2017-10-09' ); - - stubs.fs.existsSync.returns( true ); - - stubs.changelogUtils.getChangelog.returns( '' ); - - const processChidirStub = sandbox.stub( process, 'chdir' ); - - const options = { - cwd: mainPackagePath, - packages: 'packages', - skipMainRepository: true - }; - - return generateSummaryChangelog( options ) - .then( () => { - /* eslint-disable max-len */ - const expectedNewChangelog = `## [0.1.0](https://github.com/ckeditor/alpha/compare/v0.0.1...v0.1.0) (2017-10-09) - -Changelog entries generated from commits. - -### Dependencies - -Patch releases (bug fixes, internal changes): - -* [@ckeditor/beta](https://www.npmjs.com/package/@ckeditor/beta): v0.2.0 => [v0.2.1](https://github.com/ckeditor/beta/releases/tag/v0.2.1) -* [@ckeditor/epsilon](https://www.npmjs.com/package/@ckeditor/epsilon): v0.5.0 => [v0.5.1](https://github.com/ckeditor/epsilon/releases/tag/v0.5.1) -* [@ckeditor/gamma](https://www.npmjs.com/package/@ckeditor/gamma): v0.3.0 => [v0.3.1](https://github.com/ckeditor/gamma/releases/tag/v0.3.1) -`; - /* eslint-enable max-len */ - - expect( stubs.transformCommitFunctionFactory.calledTwice ).to.equal( true ); - expect( stubs.transformCommitFunctionFactory.firstCall.args[ 0 ] ).to.deep.equal( { - returnInvalidCommit: true - } ); - expect( stubs.transformCommitFunctionFactory.secondCall.args ).to.deep.equal( [] ); - - expect( stubs.getNewReleaseType.calledOnce ).to.equal( true ); - expect( stubs.getNewReleaseType.firstCall.args[ 0 ] ).to.equal( stubs.transformCommit[ 0 ] ); - expect( stubs.getNewReleaseType.firstCall.args[ 1 ] ).to.deep.equal( { tagName: 'v0.0.1' } ); - - expect( stubs.changelogUtils.saveChangelog.calledOnce ).to.equal( true ); - expect( stubs.changelogUtils.saveChangelog.firstCall.args[ 0 ] ).to.equal( expectedNewChangelog ); - expect( stubs.changelogUtils.saveChangelog.firstCall.args[ 1 ] ).to.equal( packagesPaths.alpha ); - - expect( stubs.cliUtils.provideVersion.firstCall.args[ 0 ] ).to.equal( '0.0.1' ); - // Minor bump was suggested because of commits. - expect( stubs.cliUtils.provideVersion.firstCall.args[ 1 ] ).to.equal( 'minor' ); - expect( stubs.cliUtils.provideVersion.firstCall.args[ 2 ] ).to.deep.equal( { - disableInternalVersion: true - } ); - - expect( stubs.generateChangelogFromCommits.firstCall.args[ 0 ] ).to.deep.equal( { - version: '0.1.0', - currentTag: 'v0.1.0', - previousTag: 'v0.0.1', - transformCommit: stubs.transformCommit[ 1 ], - isInternalRelease: false, - additionalNotes: true, - doNotSave: true - } ); - - expect( processChidirStub.callCount ).to.equal( 2 ); - expect( processChidirStub.firstCall.args[ 0 ] ).to.equal( packagesPaths.alpha ); - expect( processChidirStub.secondCall.args[ 0 ] ).to.equal( testCwd ); - - expect( stubs.displayGeneratedChangelogs.calledOnce ).to.equal( true ); - - const genetatedChangelogMap = stubs.displayGeneratedChangelogs.firstCall.args[ 0 ]; - - expect( genetatedChangelogMap.has( '@ckeditor/alpha' ) ).to.equal( true ); - } ); - } ); - - it( 'splits major releases as "MAJOR BREAKING CHANGES" and major dependencies update', () => { - stubs.getSubRepositoriesPaths.returns( { - matched: new Set( [ - packagesPaths.omega - ] ), - skipped: new Set( [ - packagesPaths.beta, - packagesPaths.gamma, - packagesPaths.delta, - packagesPaths.epsilon - ] ) - } ); - - stubs.executeOnPackages.callsFake( executeOnPackages ); - - stubs.versionUtils.getLastFromChangelog.withArgs( packagesPaths.omega ).returns( '1.0.0' ); - - stubs.versionUtils.getCurrent.withArgs( packagesPaths.beta ).returns( '0.2.0' ); - stubs.versionUtils.getLastFromChangelog.withArgs( packagesPaths.beta ).returns( '1.0.0' ); - stubs.changelogUtils.hasMajorBreakingChanges.withArgs( '1.0.0', packagesPaths.beta ).returns( false ); - stubs.changelogUtils.hasMinorBreakingChanges.withArgs( '1.0.0', packagesPaths.epsilon ).returns( false ); - - stubs.versionUtils.getCurrent.withArgs( packagesPaths.gamma ).returns( '0.3.0' ); - stubs.versionUtils.getLastFromChangelog.withArgs( packagesPaths.gamma ).returns( '1.0.0' ); - stubs.changelogUtils.hasMajorBreakingChanges.withArgs( '1.0.0', packagesPaths.gamma ).returns( true ); - - stubs.versionUtils.getCurrent.withArgs( packagesPaths.epsilon ).returns( '0.5.0' ); - stubs.versionUtils.getLastFromChangelog.withArgs( packagesPaths.epsilon ).returns( '1.0.0' ); - stubs.changelogUtils.hasMajorBreakingChanges.withArgs( '1.0.0', packagesPaths.epsilon ).returns( false ); - stubs.changelogUtils.hasMinorBreakingChanges.withArgs( '1.0.0', packagesPaths.epsilon ).returns( true ); - - stubs.getNewReleaseType.resolves( { releaseType: 'major' } ); - - stubs.generateChangelogFromCommits.resolves( - '## [2.0.0](https://github.com/ckeditor/omega/compare/v1.0.0...v2.0.0) (2017-10-09)\n\n' + - 'Changelog entries generated from commits.\n\n' - ); - - stubs.cliUtils.provideVersion.resolves( '2.0.0' ); - - stubs.moment.format.returns( '2017-10-09' ); - - stubs.fs.existsSync.returns( true ); - - stubs.changelogUtils.getChangelog.returns( '' ); - - const processChidirStub = sandbox.stub( process, 'chdir' ); - - const options = { - cwd: mainPackagePath, - packages: 'packages', - skipMainRepository: true - }; - - return generateSummaryChangelog( options ) - .then( () => { - /* eslint-disable max-len */ - const expectedNewChangelog = `## [2.0.0](https://github.com/ckeditor/omega/compare/v1.0.0...v2.0.0) (2017-10-09) - -Changelog entries generated from commits. - -### Dependencies - -Major releases (contain major breaking changes): - -* [@ckeditor/gamma](https://www.npmjs.com/package/@ckeditor/gamma): v0.3.0 => [v1.0.0](https://github.com/ckeditor/gamma/releases/tag/v1.0.0) - -Major releases (contain minor breaking changes): - -* [@ckeditor/epsilon](https://www.npmjs.com/package/@ckeditor/epsilon): v0.5.0 => [v1.0.0](https://github.com/ckeditor/epsilon/releases/tag/v1.0.0) - -Major releases (dependencies of those packages have breaking changes): - -* [@ckeditor/beta](https://www.npmjs.com/package/@ckeditor/beta): v0.2.0 => [v1.0.0](https://github.com/ckeditor/beta/releases/tag/v1.0.0) -`; - /* eslint-enable max-len */ - expect( stubs.transformCommitFunctionFactory.calledTwice ).to.equal( true ); - expect( stubs.transformCommitFunctionFactory.firstCall.args[ 0 ] ).to.deep.equal( { - returnInvalidCommit: true - } ); - expect( stubs.transformCommitFunctionFactory.secondCall.args ).to.deep.equal( [] ); - - expect( stubs.getNewReleaseType.calledOnce ).to.equal( true ); - expect( stubs.getNewReleaseType.firstCall.args[ 0 ] ).to.equal( stubs.transformCommit[ 0 ] ); - expect( stubs.getNewReleaseType.firstCall.args[ 1 ] ).to.deep.equal( { tagName: 'v1.0.0' } ); - - expect( stubs.changelogUtils.saveChangelog.calledOnce ).to.equal( true ); - expect( stubs.changelogUtils.saveChangelog.firstCall.args[ 0 ] ).to.equal( expectedNewChangelog ); - expect( stubs.changelogUtils.saveChangelog.firstCall.args[ 1 ] ).to.equal( packagesPaths.omega ); - - expect( stubs.cliUtils.provideVersion.firstCall.args[ 0 ] ).to.equal( '1.0.0' ); - // Minor bump was suggested because of commits. - expect( stubs.cliUtils.provideVersion.firstCall.args[ 1 ] ).to.equal( 'major' ); - expect( stubs.cliUtils.provideVersion.firstCall.args[ 2 ] ).to.deep.equal( { - disableInternalVersion: true - } ); - - expect( stubs.generateChangelogFromCommits.firstCall.args[ 0 ] ).to.deep.equal( { - version: '2.0.0', - currentTag: 'v2.0.0', - previousTag: 'v1.0.0', - transformCommit: stubs.transformCommit[ 1 ], - isInternalRelease: false, - additionalNotes: true, - doNotSave: true - } ); - - expect( processChidirStub.callCount ).to.equal( 2 ); - expect( processChidirStub.firstCall.args[ 0 ] ).to.equal( packagesPaths.omega ); - expect( processChidirStub.secondCall.args[ 0 ] ).to.equal( testCwd ); - - expect( stubs.displayGeneratedChangelogs.calledOnce ).to.equal( true ); - - const genetatedChangelogMap = stubs.displayGeneratedChangelogs.firstCall.args[ 0 ]; - - expect( genetatedChangelogMap.has( '@ckeditor/omega' ) ).to.equal( true ); - } ); - } ); - - it( 'splits minor releases as "MINOR BREAKING CHANGES" and new features', () => { - stubs.getSubRepositoriesPaths.returns( { - matched: new Set( [ - packagesPaths.omega - ] ), - skipped: new Set( [ - packagesPaths.beta, - packagesPaths.gamma, - packagesPaths.delta, - packagesPaths.epsilon - ] ) - } ); - - stubs.executeOnPackages.callsFake( executeOnPackages ); - - stubs.versionUtils.getLastFromChangelog.withArgs( packagesPaths.omega ).returns( '1.0.0' ); - - stubs.versionUtils.getCurrent.withArgs( packagesPaths.beta ).returns( '0.2.0' ); - stubs.versionUtils.getLastFromChangelog.withArgs( packagesPaths.beta ).returns( '0.3.0' ); - stubs.changelogUtils.hasMinorBreakingChanges.withArgs( '0.3.0', packagesPaths.beta ).returns( false ); - - stubs.versionUtils.getCurrent.withArgs( packagesPaths.gamma ).returns( '0.3.0' ); - stubs.versionUtils.getLastFromChangelog.withArgs( packagesPaths.gamma ).returns( '0.4.0' ); - stubs.changelogUtils.hasMinorBreakingChanges.withArgs( '0.4.0', packagesPaths.gamma ).returns( false ); - - stubs.versionUtils.getCurrent.withArgs( packagesPaths.epsilon ).returns( '0.5.0' ); - stubs.versionUtils.getLastFromChangelog.withArgs( packagesPaths.epsilon ).returns( '0.6.0' ); - stubs.changelogUtils.hasMinorBreakingChanges.withArgs( '0.6.0', packagesPaths.epsilon ).returns( true ); - - stubs.getNewReleaseType.resolves( { releaseType: 'minor' } ); - - stubs.generateChangelogFromCommits.resolves( - '## [1.1.0](https://github.com/ckeditor/omega/compare/v1.0.0...v1.1.0) (2017-10-09)\n\n' + - 'Changelog entries generated from commits.\n\n' - ); - - stubs.cliUtils.provideVersion.resolves( '1.1.0' ); - - stubs.moment.format.returns( '2017-10-09' ); - - stubs.fs.existsSync.returns( true ); - - stubs.changelogUtils.getChangelog.returns( '' ); - - const processChidirStub = sandbox.stub( process, 'chdir' ); - - const options = { - cwd: mainPackagePath, - packages: 'packages', - skipMainRepository: true - }; - - return generateSummaryChangelog( options ) - .then( () => { - /* eslint-disable max-len */ - const expectedNewChangelog = `## [1.1.0](https://github.com/ckeditor/omega/compare/v1.0.0...v1.1.0) (2017-10-09) - -Changelog entries generated from commits. - -### Dependencies - -Minor releases (containing minor breaking changes): - -* [@ckeditor/epsilon](https://www.npmjs.com/package/@ckeditor/epsilon): v0.5.0 => [v0.6.0](https://github.com/ckeditor/epsilon/releases/tag/v0.6.0) - -Minor releases (new features, no breaking changes): - -* [@ckeditor/beta](https://www.npmjs.com/package/@ckeditor/beta): v0.2.0 => [v0.3.0](https://github.com/ckeditor/beta/releases/tag/v0.3.0) -* [@ckeditor/gamma](https://www.npmjs.com/package/@ckeditor/gamma): v0.3.0 => [v0.4.0](https://github.com/ckeditor/gamma/releases/tag/v0.4.0) -`; - /* eslint-enable max-len */ - expect( stubs.transformCommitFunctionFactory.calledTwice ).to.equal( true ); - expect( stubs.transformCommitFunctionFactory.firstCall.args[ 0 ] ).to.deep.equal( { - returnInvalidCommit: true - } ); - expect( stubs.transformCommitFunctionFactory.secondCall.args ).to.deep.equal( [] ); - - expect( stubs.getNewReleaseType.calledOnce ).to.equal( true ); - expect( stubs.getNewReleaseType.firstCall.args[ 0 ] ).to.equal( stubs.transformCommit[ 0 ] ); - expect( stubs.getNewReleaseType.firstCall.args[ 1 ] ).to.deep.equal( { tagName: 'v1.0.0' } ); - - expect( stubs.changelogUtils.saveChangelog.calledOnce ).to.equal( true ); - expect( stubs.changelogUtils.saveChangelog.firstCall.args[ 0 ] ).to.equal( expectedNewChangelog ); - expect( stubs.changelogUtils.saveChangelog.firstCall.args[ 1 ] ).to.equal( packagesPaths.omega ); - - expect( stubs.cliUtils.provideVersion.firstCall.args[ 0 ] ).to.equal( '1.0.0' ); - // Minor bump was suggested because of commits. - expect( stubs.cliUtils.provideVersion.firstCall.args[ 1 ] ).to.equal( 'minor' ); - expect( stubs.cliUtils.provideVersion.firstCall.args[ 2 ] ).to.deep.equal( { - disableInternalVersion: true - } ); - - expect( stubs.generateChangelogFromCommits.firstCall.args[ 0 ] ).to.deep.equal( { - version: '1.1.0', - currentTag: 'v1.1.0', - previousTag: 'v1.0.0', - transformCommit: stubs.transformCommit[ 1 ], - isInternalRelease: false, - additionalNotes: true, - doNotSave: true - } ); - - expect( processChidirStub.callCount ).to.equal( 2 ); - expect( processChidirStub.firstCall.args[ 0 ] ).to.equal( packagesPaths.omega ); - expect( processChidirStub.secondCall.args[ 0 ] ).to.equal( testCwd ); - - expect( stubs.displayGeneratedChangelogs.calledOnce ).to.equal( true ); - - const genetatedChangelogMap = stubs.displayGeneratedChangelogs.firstCall.args[ 0 ]; - - expect( genetatedChangelogMap.has( '@ckeditor/omega' ) ).to.equal( true ); - } ); - } ); - - it( 'handles MAJOR/MINOR changes for initial release', () => { - stubs.getSubRepositoriesPaths.returns( { - matched: new Set( [ - packagesPaths.alpha - ] ), - skipped: new Set( [ - packagesPaths.beta, - packagesPaths.gamma, - packagesPaths.delta, - packagesPaths.epsilon - ] ) - } ); - - stubs.executeOnPackages.callsFake( executeOnPackages ); - - stubs.versionUtils.getLastFromChangelog.withArgs( packagesPaths.alpha ).returns( '0.0.1' ); - - stubs.versionUtils.getCurrent.withArgs( packagesPaths.beta ).returns( '0.2.0' ); - stubs.versionUtils.getLastFromChangelog.withArgs( packagesPaths.beta ).returns( '0.3.0' ); - stubs.changelogUtils.hasMinorBreakingChanges.withArgs( '0.3.0', packagesPaths.beta ).returns( true ); - - stubs.versionUtils.getCurrent.withArgs( packagesPaths.gamma ).returns( '0.3.0' ); - stubs.versionUtils.getLastFromChangelog.withArgs( packagesPaths.gamma ).returns( '0.4.0' ); - stubs.changelogUtils.hasMajorBreakingChanges.withArgs( '0.4.0', packagesPaths.gamma ).returns( false ); - stubs.changelogUtils.hasMinorBreakingChanges.withArgs( '0.4.0', packagesPaths.gamma ).returns( false ); - - stubs.versionUtils.getCurrent.withArgs( packagesPaths.epsilon ).returns( '0.5.0' ); - stubs.versionUtils.getLastFromChangelog.withArgs( packagesPaths.epsilon ).returns( '0.6.0' ); - stubs.changelogUtils.hasMajorBreakingChanges.withArgs( '0.6.0', packagesPaths.epsilon ).returns( false ); - stubs.changelogUtils.hasMinorBreakingChanges.withArgs( '0.6.0', packagesPaths.epsilon ).returns( true ); - - stubs.getNewReleaseType.resolves( { releaseType: 'minor' } ); - - stubs.generateChangelogFromCommits.resolves( - '## [0.1.0](https://github.com/ckeditor/alpha/compare/v0.0.1...v0.1.0) (2017-10-09)\n\n' + - 'Changelog entries generated from commits.\n\n' - ); - - stubs.cliUtils.provideVersion.resolves( '0.1.0' ); - - stubs.moment.format.returns( '2017-10-09' ); - - stubs.fs.existsSync.returns( true ); - - stubs.changelogUtils.getChangelog.returns( '' ); - - const processChidirStub = sandbox.stub( process, 'chdir' ); - - const options = { - cwd: mainPackagePath, - packages: 'packages', - skipMainRepository: true - }; - - return generateSummaryChangelog( options ) - .then( () => { - /* eslint-disable max-len */ - const expectedNewChangelog = `## [0.1.0](https://github.com/ckeditor/alpha/compare/v0.0.1...v0.1.0) (2017-10-09) - -Changelog entries generated from commits. - -### Dependencies - -Minor releases (containing major/minor breaking changes): - -* [@ckeditor/beta](https://www.npmjs.com/package/@ckeditor/beta): v0.2.0 => [v0.3.0](https://github.com/ckeditor/beta/releases/tag/v0.3.0) -* [@ckeditor/epsilon](https://www.npmjs.com/package/@ckeditor/epsilon): v0.5.0 => [v0.6.0](https://github.com/ckeditor/epsilon/releases/tag/v0.6.0) - -Minor releases (new features, no breaking changes): - -* [@ckeditor/gamma](https://www.npmjs.com/package/@ckeditor/gamma): v0.3.0 => [v0.4.0](https://github.com/ckeditor/gamma/releases/tag/v0.4.0) -`; - /* eslint-enable max-len */ - expect( stubs.transformCommitFunctionFactory.calledTwice ).to.equal( true ); - expect( stubs.transformCommitFunctionFactory.firstCall.args[ 0 ] ).to.deep.equal( { - returnInvalidCommit: true - } ); - expect( stubs.transformCommitFunctionFactory.secondCall.args ).to.deep.equal( [] ); - - // There is no "major" bump so the function should be never called. - expect( stubs.changelogUtils.hasMajorBreakingChanges.called ).to.equal( false ); - - expect( stubs.getNewReleaseType.calledOnce ).to.equal( true ); - expect( stubs.getNewReleaseType.firstCall.args[ 0 ] ).to.equal( stubs.transformCommit[ 0 ] ); - expect( stubs.getNewReleaseType.firstCall.args[ 1 ] ).to.deep.equal( { tagName: 'v0.0.1' } ); - - expect( stubs.changelogUtils.saveChangelog.calledOnce ).to.equal( true ); - expect( stubs.changelogUtils.saveChangelog.firstCall.args[ 0 ] ).to.equal( expectedNewChangelog ); - expect( stubs.changelogUtils.saveChangelog.firstCall.args[ 1 ] ).to.equal( packagesPaths.alpha ); - - expect( stubs.cliUtils.provideVersion.firstCall.args[ 0 ] ).to.equal( '0.0.1' ); - // Minor bump was suggested because of commits. - expect( stubs.cliUtils.provideVersion.firstCall.args[ 1 ] ).to.equal( 'minor' ); - expect( stubs.cliUtils.provideVersion.firstCall.args[ 2 ] ).to.deep.equal( { - disableInternalVersion: true - } ); - - expect( stubs.generateChangelogFromCommits.firstCall.args[ 0 ] ).to.deep.equal( { - version: '0.1.0', - currentTag: 'v0.1.0', - previousTag: 'v0.0.1', - transformCommit: stubs.transformCommit[ 1 ], - isInternalRelease: false, - additionalNotes: true, - doNotSave: true - } ); - - expect( processChidirStub.callCount ).to.equal( 2 ); - expect( processChidirStub.firstCall.args[ 0 ] ).to.equal( packagesPaths.alpha ); - expect( processChidirStub.secondCall.args[ 0 ] ).to.equal( testCwd ); - - expect( stubs.displayGeneratedChangelogs.calledOnce ).to.equal( true ); - - const genetatedChangelogMap = stubs.displayGeneratedChangelogs.firstCall.args[ 0 ]; - - expect( genetatedChangelogMap.has( '@ckeditor/alpha' ) ).to.equal( true ); - } ); - } ); - - it( 'allows generating changelog for main repository', () => { - const commits = [ {}, {} ]; - - stubs.getSubRepositoriesPaths.returns( { - matched: new Set(), - skipped: new Set( [ - packagesPaths.alpha, - packagesPaths.beta, - packagesPaths.gamma, - packagesPaths.delta, - packagesPaths.epsilon, - packagesPaths.devKappa - ] ) - } ); - - stubs.executeOnPackages.callsFake( executeOnPackages ); - - stubs.versionUtils.getCurrent.withArgs( packagesPaths.alpha ).returns( '0.0.1' ); - stubs.versionUtils.getLastFromChangelog.withArgs( packagesPaths.alpha ).returns( '0.1.0' ); - - stubs.versionUtils.getCurrent.withArgs( packagesPaths.beta ).returns( '0.2.0' ); - stubs.versionUtils.getLastFromChangelog.withArgs( packagesPaths.beta ).returns( '0.2.1' ); - - stubs.versionUtils.getCurrent.withArgs( packagesPaths.gamma ).returns( '0.3.0' ); - stubs.versionUtils.getLastFromChangelog.withArgs( packagesPaths.gamma ).returns( '0.3.1' ); - - stubs.versionUtils.getCurrent.withArgs( packagesPaths.delta ).returns( '0.4.0' ); - stubs.versionUtils.getLastFromChangelog.withArgs( packagesPaths.delta ).returns( '0.4.1' ); - - stubs.versionUtils.getCurrent.withArgs( packagesPaths.epsilon ).returns( '0.5.0' ); - stubs.versionUtils.getLastFromChangelog.withArgs( packagesPaths.epsilon ).returns( '0.5.1' ); - - stubs.getNewReleaseType.resolves( { commits, releaseType: 'minor' } ); - - stubs.generateChangelogFromCommits.resolves( - '## [0.2.0](https://github.com/ckeditor/foo-bar/compare/v0.1.0...v0.2.0) (2017-10-09)\n\n' + - 'Changelog entries generated from commits.\n\n' - ); - - stubs.cliUtils.provideVersion.resolves( '0.2.0' ); - - stubs.moment.format.returns( '2017-10-09' ); - - stubs.fs.existsSync.returns( true ); - - stubs.changelogUtils.getChangelog.returns( '' ); - - const processChidirStub = sandbox.stub( process, 'chdir' ); - - const options = { - cwd: mainPackagePath, - packages: 'packages' - }; - - return generateSummaryChangelog( options ) - .then( () => { - /* eslint-disable max-len */ - const expectedNewChangelog = `## [0.2.0](https://github.com/ckeditor/foo-bar/compare/v0.1.0...v0.2.0) (2017-10-09) - -Changelog entries generated from commits. - -### Dependencies - -New packages: - -* [@ckeditor/alpha](https://www.npmjs.com/package/@ckeditor/alpha): [v0.1.0](https://github.com/ckeditor/alpha/releases/tag/v0.1.0) - -Patch releases (bug fixes, internal changes): - -* [@ckeditor/beta](https://www.npmjs.com/package/@ckeditor/beta): v0.2.0 => [v0.2.1](https://github.com/ckeditor/beta/releases/tag/v0.2.1) -* [@ckeditor/delta](https://www.npmjs.com/package/@ckeditor/delta): v0.4.0 => [v0.4.1](https://github.com/ckeditor/delta/releases/tag/v0.4.1) -* [@ckeditor/epsilon](https://www.npmjs.com/package/@ckeditor/epsilon): v0.5.0 => [v0.5.1](https://github.com/ckeditor/epsilon/releases/tag/v0.5.1) -* [@ckeditor/gamma](https://www.npmjs.com/package/@ckeditor/gamma): v0.3.0 => [v0.3.1](https://github.com/ckeditor/gamma/releases/tag/v0.3.1) -`; - /* eslint-enable max-len */ - expect( stubs.transformCommitFunctionFactory.calledTwice ).to.equal( true ); - expect( stubs.transformCommitFunctionFactory.firstCall.args[ 0 ] ).to.deep.equal( { - returnInvalidCommit: true - } ); - expect( stubs.transformCommitFunctionFactory.secondCall.args ).to.deep.equal( [] ); - - expect( stubs.changelogUtils.saveChangelog.calledOnce ).to.equal( true ); - expect( stubs.changelogUtils.saveChangelog.firstCall.args[ 0 ] ).to.equal( expectedNewChangelog ); - expect( stubs.changelogUtils.saveChangelog.firstCall.args[ 1 ] ).to.equal( mainPackagePath ); - - expect( processChidirStub.callCount ).to.equal( 2 ); - - expect( processChidirStub.firstCall.args[ 0 ] ).to.equal( mainPackagePath ); - expect( processChidirStub.secondCall.args[ 0 ] ).to.equal( testCwd ); - - expect( stubs.displayCommits.calledOnce ).to.equal( true ); - expect( stubs.displayCommits.firstCall.args[ 0 ] ).to.deep.equal( commits ); - } ); - } ); - - it( 'allows restricting the packages scope', () => { - stubs.getSubRepositoriesPaths.returns( { - matched: new Set(), - skipped: new Set() - } ); - - stubs.executeOnPackages.resolves(); - - const skipPackages = [ 'some-pacakge' ]; - const scope = /some-regexp/; - - const options = { - cwd: mainPackagePath, - packages: 'packages', - skipPackages, - scope - }; - - return generateSummaryChangelog( options ) - .then( () => { - expect( stubs.getSubRepositoriesPaths.firstCall.args[ 0 ] ).to.deep.equal( { - cwd: options.cwd, - packages: options.packages, - skipMainRepository: true, - skipPackages, - scope - } ); - } ); - } ); - - it( 'does not generate the changelog if user provides "skip" as new version', () => { - stubs.getSubRepositoriesPaths.returns( { - matched: new Set( [ - packagesPaths.alpha - ] ), - skipped: new Set( [ - packagesPaths.beta, - packagesPaths.gamma, - packagesPaths.delta, - packagesPaths.epsilon - ] ) - } ); - - stubs.executeOnPackages.callsFake( executeOnPackages ); - - stubs.versionUtils.getCurrent.withArgs( packagesPaths.beta ).returns( '0.2.0' ); - stubs.versionUtils.getLastFromChangelog.withArgs( packagesPaths.beta ).returns( '0.2.1' ); - - stubs.versionUtils.getCurrent.withArgs( packagesPaths.gamma ).returns( '0.3.0' ); - stubs.versionUtils.getLastFromChangelog.withArgs( packagesPaths.gamma ).returns( '0.4.0' ); - - stubs.versionUtils.getCurrent.withArgs( packagesPaths.epsilon ).returns( '0.5.0' ); - stubs.versionUtils.getLastFromChangelog.withArgs( packagesPaths.epsilon ).returns( '0.1.0' ); - - stubs.getNewReleaseType.resolves( { releaseType: 'skip' } ); - - stubs.cliUtils.provideVersion.resolves( 'skip' ); - - const processChidirStub = sandbox.stub( process, 'chdir' ); - - const options = { - cwd: mainPackagePath, - packages: 'packages', - skipMainRepository: true - }; - - return generateSummaryChangelog( options ) - .then( () => { - expect( stubs.changelogUtils.saveChangelog.called ).to.equal( false ); - expect( processChidirStub.callCount ).to.equal( 2 ); - expect( processChidirStub.firstCall.args[ 0 ] ).to.equal( packagesPaths.alpha ); - expect( processChidirStub.secondCall.args[ 0 ] ).to.equal( testCwd ); - - expect( stubs.displayGeneratedChangelogs.called ).to.equal( true ); - expect( stubs.displayGeneratedChangelogs.firstCall.args[ 0 ].size ).to.equal( 0 ); - } ); - } ); - - it( 'does not attach the "Dependencies" header if any dependency has not been added or changed', () => { - stubs.getSubRepositoriesPaths.returns( { - matched: new Set( [ - packagesPaths.alpha - ] ), - skipped: new Set( [ - packagesPaths.beta, - packagesPaths.gamma, - packagesPaths.delta, - packagesPaths.epsilon - ] ) - } ); - - stubs.executeOnPackages.callsFake( executeOnPackages ); - - stubs.versionUtils.getCurrent.withArgs( packagesPaths.beta ).returns( '0.2.0' ); - stubs.versionUtils.getLastFromChangelog.withArgs( packagesPaths.beta ).returns( '0.2.0' ); - - stubs.versionUtils.getCurrent.withArgs( packagesPaths.gamma ).returns( '0.3.0' ); - stubs.versionUtils.getLastFromChangelog.withArgs( packagesPaths.gamma ).returns( '0.3.0' ); - - stubs.versionUtils.getCurrent.withArgs( packagesPaths.epsilon ).returns( '0.5.0' ); - stubs.versionUtils.getLastFromChangelog.withArgs( packagesPaths.epsilon ).returns( '0.5.0' ); - - stubs.getNewReleaseType.resolves( { releaseType: 'skip' } ); - - stubs.cliUtils.provideVersion.resolves( '1.0.0' ); - - stubs.moment.format.returns( '2017-10-09' ); - - stubs.fs.existsSync.returns( true ); - - stubs.changelogUtils.getChangelog.returns( '' ); - - sandbox.stub( process, 'chdir' ); - - const options = { - cwd: mainPackagePath, - packages: 'packages', - skipMainRepository: true - }; - - return generateSummaryChangelog( options ) - .then( () => { - const expectedNewChangelog = '## [1.0.0](https://github.com/ckeditor/alpha/compare/v0.0.1...v1.0.0) (2017-10-09)\n'; - - expect( stubs.changelogUtils.saveChangelog.calledOnce ).to.equal( true ); - expect( stubs.changelogUtils.saveChangelog.firstCall.args[ 0 ] ).to.equal( expectedNewChangelog ); - expect( stubs.changelogUtils.saveChangelog.firstCall.args[ 1 ] ).to.equal( packagesPaths.alpha ); - } ); - } ); - - describe( 'additional notes for group of commits', () => { - it( 'are visible when dependencies have been added or changed', () => { - stubs.getSubRepositoriesPaths.returns( { - matched: new Set(), - skipped: new Set( [ - packagesPaths.alpha, - packagesPaths.beta, - packagesPaths.gamma, - packagesPaths.delta, - packagesPaths.epsilon - ] ) - } ); - - stubs.executeOnPackages.callsFake( executeOnPackages ); - - stubs.versionUtils.getCurrent.withArgs( packagesPaths.alpha ).returns( '0.0.1' ); - stubs.versionUtils.getLastFromChangelog.withArgs( packagesPaths.alpha ).returns( '0.1.0' ); - - stubs.versionUtils.getCurrent.withArgs( packagesPaths.beta ).returns( '0.2.0' ); - stubs.versionUtils.getLastFromChangelog.withArgs( packagesPaths.beta ).returns( '0.2.1' ); - - stubs.versionUtils.getCurrent.withArgs( packagesPaths.gamma ).returns( '0.3.0' ); - stubs.versionUtils.getLastFromChangelog.withArgs( packagesPaths.gamma ).returns( '0.3.1' ); - - stubs.versionUtils.getCurrent.withArgs( packagesPaths.delta ).returns( '0.4.0' ); - stubs.versionUtils.getLastFromChangelog.withArgs( packagesPaths.delta ).returns( '0.4.1' ); - - stubs.versionUtils.getCurrent.withArgs( packagesPaths.epsilon ).returns( '0.5.0' ); - stubs.versionUtils.getLastFromChangelog.withArgs( packagesPaths.epsilon ).returns( '0.5.1' ); - - stubs.getNewReleaseType.resolves( { releaseType: 'minor' } ); - - stubs.generateChangelogFromCommits.resolves( - '## Changelog header (will be removed)\n\n' + - 'Changelog entries generated from commits.\n\n' - ); - - stubs.cliUtils.provideVersion.resolves( '0.2.0' ); - - stubs.moment.format.returns( '2017-10-09' ); - - stubs.fs.existsSync.returns( true ); - - stubs.changelogUtils.getChangelog.returns( '' ); - - sandbox.stub( process, 'chdir' ); - - const options = { - cwd: mainPackagePath, - packages: 'packages' - }; - - return generateSummaryChangelog( options ) - .then( () => { - expect( stubs.generateChangelogFromCommits.firstCall.args[ 0 ] ).to.have.property( 'additionalNotes', true ); - } ); - } ); - - it( 'are hidden when dependencies have not been added or changed', () => { - stubs.getSubRepositoriesPaths.returns( { - matched: new Set(), - skipped: new Set( [ - packagesPaths.alpha, - packagesPaths.beta, - packagesPaths.gamma, - packagesPaths.delta, - packagesPaths.epsilon - ] ) - } ); - - stubs.executeOnPackages.callsFake( executeOnPackages ); - - stubs.versionUtils.getCurrent.withArgs( packagesPaths.alpha ).returns( '0.0.1' ); - stubs.versionUtils.getLastFromChangelog.withArgs( packagesPaths.alpha ).returns( '0.0.1' ); - - stubs.versionUtils.getCurrent.withArgs( packagesPaths.beta ).returns( '0.2.0' ); - stubs.versionUtils.getLastFromChangelog.withArgs( packagesPaths.beta ).returns( '0.2.0' ); - - stubs.versionUtils.getCurrent.withArgs( packagesPaths.gamma ).returns( '0.3.0' ); - stubs.versionUtils.getLastFromChangelog.withArgs( packagesPaths.gamma ).returns( '0.3.0' ); - - stubs.versionUtils.getCurrent.withArgs( packagesPaths.delta ).returns( '0.4.0' ); - stubs.versionUtils.getLastFromChangelog.withArgs( packagesPaths.delta ).returns( '0.4.0' ); - - stubs.versionUtils.getCurrent.withArgs( packagesPaths.epsilon ).returns( '0.5.0' ); - stubs.versionUtils.getLastFromChangelog.withArgs( packagesPaths.epsilon ).returns( '0.5.0' ); - - stubs.getNewReleaseType.resolves( { releaseType: 'minor' } ); - - stubs.generateChangelogFromCommits.resolves( - '## Changelog header (will be removed)\n\n' + - 'Changelog entries generated from commits.\n\n' - ); - - stubs.cliUtils.provideVersion.resolves( '0.2.0' ); - - stubs.moment.format.returns( '2017-10-09' ); - - stubs.fs.existsSync.returns( true ); - - stubs.changelogUtils.getChangelog.returns( '' ); - - sandbox.stub( process, 'chdir' ); - - const options = { - cwd: mainPackagePath, - packages: 'packages' - }; - - return generateSummaryChangelog( options ) - .then( () => { - expect( stubs.generateChangelogFromCommits.firstCall.args[ 0 ] ).to.have.property( 'additionalNotes', false ); - } ); - } ); - } ); - } ); -} ); diff --git a/packages/ckeditor5-dev-env/tests/release-tools/tasks/stubs/releasesubrepositories/package.json b/packages/ckeditor5-dev-env/tests/release-tools/tasks/stubs/releasesubrepositories/package.json deleted file mode 100644 index de7053ca3..000000000 --- a/packages/ckeditor5-dev-env/tests/release-tools/tasks/stubs/releasesubrepositories/package.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "name": "@ckeditor/foo-bar", - "version": "0.1.0", - "dependencies": { - "@ckeditor/alpha": "*", - "@ckeditor/beta": "*", - "@ckeditor/gamma": "*", - "@ckeditor/delta": "*", - "@ckeditor/epsilon": "*", - "@ckeditor/ckeditor5-dev-kappa": "*" - }, - "repository": { - "url": "https://github.com/ckeditor/foo-bar.git" - } -} diff --git a/packages/ckeditor5-dev-env/tests/release-tools/tasks/stubs/releasesubrepositories/packages/alpha/package.json b/packages/ckeditor5-dev-env/tests/release-tools/tasks/stubs/releasesubrepositories/packages/alpha/package.json deleted file mode 100644 index b621d7ec6..000000000 --- a/packages/ckeditor5-dev-env/tests/release-tools/tasks/stubs/releasesubrepositories/packages/alpha/package.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "name": "@ckeditor/alpha", - "version": "0.0.1", - "dependencies": { - "@ckeditor/beta": "*", - "@ckeditor/gamma": "*" - }, - "devDependencies": { - "@ckeditor/epsilon": "*" - }, - "peerDependencies": { - "ckeditor5-dev": "0.0.1" - }, - "repository": { - "url": "https://github.com/ckeditor/alpha.git" - } -} diff --git a/packages/ckeditor5-dev-env/tests/release-tools/tasks/stubs/releasesubrepositories/packages/beta/package.json b/packages/ckeditor5-dev-env/tests/release-tools/tasks/stubs/releasesubrepositories/packages/beta/package.json deleted file mode 100644 index 7bcc074cc..000000000 --- a/packages/ckeditor5-dev-env/tests/release-tools/tasks/stubs/releasesubrepositories/packages/beta/package.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "@ckeditor/beta", - "version": "0.2.0", - "dependencies": { - "@ckeditor/gamma": "*", - "@ckeditor/epsilon": "*" - }, - "repository": { - "url": "https://github.com/ckeditor/beta.git" - } -} diff --git a/packages/ckeditor5-dev-env/tests/release-tools/tasks/stubs/releasesubrepositories/packages/delta/package.json b/packages/ckeditor5-dev-env/tests/release-tools/tasks/stubs/releasesubrepositories/packages/delta/package.json deleted file mode 100644 index 76b121a8f..000000000 --- a/packages/ckeditor5-dev-env/tests/release-tools/tasks/stubs/releasesubrepositories/packages/delta/package.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "name": "@ckeditor/delta", - "version": "0.4.0", - "dependencies": { - "@ckeditor/alpha": "*", - "@ckeditor/gamma": "*" - }, - "devDependencies": { - "@ckeditor/beta": "*" - }, - "peerDependencies": { - "ckeditor5-dev": "0.0.1" - }, - "repository": { - "url": "https://github.com/ckeditor/delta.git" - } -} diff --git a/packages/ckeditor5-dev-env/tests/release-tools/tasks/stubs/releasesubrepositories/packages/dev-kappa/package.json b/packages/ckeditor5-dev-env/tests/release-tools/tasks/stubs/releasesubrepositories/packages/dev-kappa/package.json deleted file mode 100644 index d2ae2c8ce..000000000 --- a/packages/ckeditor5-dev-env/tests/release-tools/tasks/stubs/releasesubrepositories/packages/dev-kappa/package.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "name": "@ckeditor/ckeditor5-dev-kappa", - "version": "1.0.0", - "dependencies": {}, - "devDependencies": {}, - "repository": { - "url": "https://github.com/ckeditor/ckeditor5-dev-kappa.git" - } -} diff --git a/packages/ckeditor5-dev-env/tests/release-tools/tasks/stubs/releasesubrepositories/packages/epsilon/package.json b/packages/ckeditor5-dev-env/tests/release-tools/tasks/stubs/releasesubrepositories/packages/epsilon/package.json deleted file mode 100644 index afbb4054e..000000000 --- a/packages/ckeditor5-dev-env/tests/release-tools/tasks/stubs/releasesubrepositories/packages/epsilon/package.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "name": "@ckeditor/epsilon", - "version": "0.5.0", - "dependencies": { - "@ckeditor/alpha": "*" - }, - "devDependencies": { - "@ckeditor/beta": "*" - }, - "repository": { - "url": "https://github.com/ckeditor/epsilon.git" - } -} diff --git a/packages/ckeditor5-dev-env/tests/release-tools/tasks/stubs/releasesubrepositories/packages/gamma/package.json b/packages/ckeditor5-dev-env/tests/release-tools/tasks/stubs/releasesubrepositories/packages/gamma/package.json deleted file mode 100644 index 8ef7effdc..000000000 --- a/packages/ckeditor5-dev-env/tests/release-tools/tasks/stubs/releasesubrepositories/packages/gamma/package.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "name": "@ckeditor/gamma", - "version": "0.3.0", - "devDependencies": { - "@ckeditor/epsilon": "*" - }, - "repository": { - "url": "https://github.com/ckeditor/gamma.git" - } -} diff --git a/packages/ckeditor5-dev-env/tests/release-tools/tasks/stubs/releasesubrepositories/packages/omega/package.json b/packages/ckeditor5-dev-env/tests/release-tools/tasks/stubs/releasesubrepositories/packages/omega/package.json deleted file mode 100644 index e030c1498..000000000 --- a/packages/ckeditor5-dev-env/tests/release-tools/tasks/stubs/releasesubrepositories/packages/omega/package.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "name": "@ckeditor/omega", - "version": "1.0.0", - "dependencies": { - "@ckeditor/beta": "*", - "@ckeditor/gamma": "*" - }, - "devDependencies": { - "@ckeditor/epsilon": "*" - }, - "peerDependencies": { - "ckeditor5-dev": "0.0.1" - }, - "repository": { - "url": "https://github.com/ckeditor/omega.git" - } -} diff --git a/packages/ckeditor5-dev-env/tests/release-tools/templates/commit.js b/packages/ckeditor5-dev-env/tests/release-tools/templates/commit.js index c473060c6..ce6c7741b 100644 --- a/packages/ckeditor5-dev-env/tests/release-tools/templates/commit.js +++ b/packages/ckeditor5-dev-env/tests/release-tools/templates/commit.js @@ -49,7 +49,7 @@ describe( 'dev-env/release-tools/changelog/templates', () => { it( 'displays commit subject and hash as an URL to Github', () => { const data = { subject: 'Test', hash: '1234qwe' }; - const expectedEntry = '* Test ([1234qwe](https://github.com/organization/repository/commit/1234qwe))'; + const expectedEntry = '* Test ([commit](https://github.com/organization/repository/commit/1234qwe))'; expect( template( data, templateOptions ) ).to.equal( expectedEntry + '\n' ); } ); @@ -67,7 +67,7 @@ describe( 'dev-env/release-tools/changelog/templates', () => { ] }; - const expectedEntry = '* Test ([1234qwe](https://github.com/organization/repository/commit/1234qwe))'; + const expectedEntry = '* Test ([commit](https://github.com/organization/repository/commit/1234qwe))'; expect( template( data, templateOptions ) ).to.equal( expectedEntry + '\n' ); } ); @@ -83,7 +83,7 @@ describe( 'dev-env/release-tools/changelog/templates', () => { ].join( '\n' ) }; - const expectedEntry = '* Test ([1234qwe](https://github.com/organization/repository/commit/1234qwe))' + + const expectedEntry = '* Test ([commit](https://github.com/organization/repository/commit/1234qwe))' + '\n\n Some paragraph.\n\n * List Item 1.\n * List Item 2.'; expect( template( data, templateOptions ) ).to.equal( expectedEntry + '\n' ); } ); @@ -96,5 +96,20 @@ describe( 'dev-env/release-tools/changelog/templates', () => { const expectedEntry = '* Test'; expect( template( data, templateOptions ) ).to.equal( expectedEntry + '\n' ); } ); + + it( 'adds a scope if specified', () => { + rootOptions.linkReferences = false; + + const data = { + subject: 'Test', + hash: '1234qwe', + scope: [ + 'ckeditor5-dev' + ] + }; + + const expectedEntry = '* **ckeditor5-dev**: Test 1234qwe'; + expect( template( data, templateOptions ) ).to.equal( expectedEntry + '\n' ); + } ); } ); } ); diff --git a/packages/ckeditor5-dev-env/tests/release-tools/utils/changelog.js b/packages/ckeditor5-dev-env/tests/release-tools/utils/changelog.js index 05e4e4605..f091b0fe4 100644 --- a/packages/ckeditor5-dev-env/tests/release-tools/utils/changelog.js +++ b/packages/ckeditor5-dev-env/tests/release-tools/utils/changelog.js @@ -211,109 +211,5 @@ Foo`; expect( writeFileStub.firstCall.args[ 1 ] ).to.equal( 'New content.' ); } ); } ); - - describe( 'hasMajorBreakingChanges()', () => { - it( 'passes proper data to "utils.getChangesForVersion()"', () => { - sandbox.stub( utils, 'getChangesForVersion' ).returns( 'Changelog' ); - - utils.hasMajorBreakingChanges( '1.0.0', 'path/to/package' ); - - expect( utils.getChangesForVersion.calledOnce ).to.equal( true ); - expect( utils.getChangesForVersion.firstCall.args[ 0 ] ).to.equal( '1.0.0' ); - expect( utils.getChangesForVersion.firstCall.args[ 1 ] ).to.equal( 'path/to/package' ); - } ); - - it( 'returns true if release notes for given version contain MAJOR BREAKING CHANGES', () => { - sandbox.stub( utils, 'getChangesForVersion' ).returns( ` -### MAJOR BREAKING CHANGES - -* Some breaking change. - -### Features - -* Another feature. Closes #2. (abc1234) -* Issues will not be hoisted. Closes #8. (abcd123) - - All details have been described in [#1](https://github.com/ckeditor/ckeditor5-test-package/issues/1). -`.trim() ); - - expect( utils.hasMajorBreakingChanges( '1.0.0', 'path/to/package' ) ).to.equal( true ); - } ); - - it( 'returns false if release notes for given version does not contain MAJOR BREAKING CHANGES', () => { - sandbox.stub( utils, 'getChangesForVersion' ).returns( ` -### MINOR BREAKING CHANGES - -* Some breaking change. - -### Features - -* Another feature. Closes #2. (abc1234) -* Issues will not be hoisted. Closes #8. (abcd123) - - All details have been described in [#1](https://github.com/ckeditor/ckeditor5-test-package/issues/1). -`.trim() ); - - expect( utils.hasMajorBreakingChanges( '1.0.0', 'path/to/package' ) ).to.equal( false ); - } ); - - it( 'throws an error if entries for given version cannot be found', () => { - sandbox.stub( utils, 'getChangesForVersion' ).returns( null ); - - expect( () => { - utils.hasMajorBreakingChanges( '1.0.0' ); - } ).to.throw( Error, 'Entries for specified version (1.0.0) cannot be found.' ); - } ); - } ); - - describe( 'hasMinorBreakingChanges()', () => { - it( 'passes proper data to "utils.getChangesForVersion()"', () => { - sandbox.stub( utils, 'getChangesForVersion' ).returns( 'Changelog' ); - - utils.hasMinorBreakingChanges( '1.0.0', 'path/to/package' ); - - expect( utils.getChangesForVersion.calledOnce ).to.equal( true ); - expect( utils.getChangesForVersion.firstCall.args[ 0 ] ).to.equal( '1.0.0' ); - expect( utils.getChangesForVersion.firstCall.args[ 1 ] ).to.equal( 'path/to/package' ); - } ); - - it( 'returns true if release notes for given version contain MINOR BREAKING CHANGES', () => { - sandbox.stub( utils, 'getChangesForVersion' ).returns( ` -### MINOR BREAKING CHANGES - -* Some breaking change. - -### Features - -* Another feature. Closes #2. (abc1234) -* Issues will not be hoisted. Closes #8. (abcd123) - - All details have been described in [#1](https://github.com/ckeditor/ckeditor5-test-package/issues/1). -`.trim() ); - - expect( utils.hasMinorBreakingChanges( '1.0.0', 'path/to/package' ) ).to.equal( true ); - } ); - - it( 'returns false if release notes for given version does not contain MINOR BREAKING CHANGES', () => { - sandbox.stub( utils, 'getChangesForVersion' ).returns( ` -### Features - -* Another feature. Closes #2. (abc1234) -* Issues will not be hoisted. Closes #8. (abcd123) - - All details have been described in [#1](https://github.com/ckeditor/ckeditor5-test-package/issues/1). -`.trim() ); - - expect( utils.hasMinorBreakingChanges( '1.0.0', 'path/to/package' ) ).to.equal( false ); - } ); - - it( 'throws an error if entries for given version cannot be found', () => { - sandbox.stub( utils, 'getChangesForVersion' ).returns( null ); - - expect( () => { - utils.hasMinorBreakingChanges( '1.0.0' ); - } ).to.throw( Error, 'Entries for specified version (1.0.0) cannot be found.' ); - } ); - } ); } ); } ); diff --git a/packages/ckeditor5-dev-env/tests/release-tools/utils/cli.js b/packages/ckeditor5-dev-env/tests/release-tools/utils/cli.js index 2e4738788..8f62d88f3 100644 --- a/packages/ckeditor5-dev-env/tests/release-tools/utils/cli.js +++ b/packages/ckeditor5-dev-env/tests/release-tools/utils/cli.js @@ -401,7 +401,7 @@ describe( 'dev-env/release-tools/utils', () => { .then( () => { const question = questionItems[ 0 ]; - expect( question.message ).to.match( /Should this be a major release\?/ ); + expect( question.message ).to.match( /Should it be the major release\?/ ); expect( question.type ).to.equal( 'confirm' ); } ); } ); diff --git a/packages/ckeditor5-dev-env/tests/release-tools/utils/displaycommits.js b/packages/ckeditor5-dev-env/tests/release-tools/utils/displaycommits.js index 7cbc3b761..4be2708f2 100644 --- a/packages/ckeditor5-dev-env/tests/release-tools/utils/displaycommits.js +++ b/packages/ckeditor5-dev-env/tests/release-tools/utils/displaycommits.js @@ -8,16 +8,11 @@ const expect = require( 'chai' ).expect; const sinon = require( 'sinon' ); const proxyquire = require( 'proxyquire' ); -const transformCommitFactory = require( '../../../lib/release-tools/utils/transform-commit/transformcommitforsubrepositoryfactory' ); describe( 'dev-env/release-tools/utils', () => { - let displayCommits, transformCommit, sandbox, stubs; + let displayCommits, sandbox, stubs; beforeEach( () => { - transformCommit = transformCommitFactory( { - returnInvalidCommit: true, - useExplicitBreakingChangeGroups: true - } ); sandbox = sinon.createSandbox(); stubs = { @@ -176,21 +171,25 @@ describe( 'dev-env/release-tools/utils', () => { } ); it( 'displays proper log if commit does not contain the second line', () => { - const rawCommit = { + const commit = { type: null, subject: null, merge: 'Merge branch \'master\' of github.com:ckeditor/ckeditor5-dev', - header: '-hash-', - body: '575e00bc8ece48826adefe226c4fb1fe071c73a7', + header: 'Merge branch \'master\' of github.com:ckeditor/ckeditor5-dev', + body: null, footer: null, notes: [], references: [], mentions: [], - revert: null + revert: null, + rawType: undefined, + files: [], + scope: undefined, + isPublicCommit: false, + hash: 'a'.repeat( 40 ), + repositoryUrl: 'https://github.com/ckeditor/ckeditor5-dev' }; - const commit = transformCommit( rawCommit, { returnInvalidCommit: true } ); - displayCommits( [ commit ] ); // The merge commit displays two lines: @@ -336,5 +335,298 @@ describe( 'dev-env/release-tools/utils', () => { expect( thirdLine.substring( 0, 16 ) ).to.equal( ' '.repeat( 16 ) ); } ); } ); + + describe( 'grouping commits', () => { + it( 'works for a group of two commits between single commit groups', () => { + // Displayed log: + // + // * aaaaaaa "Fix: Another fix." INCLUDED + // --------------------------------------------- + // |* bbbbbbb "Fix: Simple fix." INCLUDED + // |* bbbbbbb "Feature: A new feature." INCLUDED + // --------------------------------------------- + // * ccccccc "Fix: Another fix." INCLUDED + + displayCommits( [ + { + hash: 'a'.repeat( 40 ), + header: 'Fix: Another fix.', + type: 'Bug fixes', + rawType: 'Fix', + subject: 'Another fix.', + body: null, + footer: null, + notes: [] + }, + { + hash: 'b'.repeat( 40 ), + header: 'Fix: Simple fix.', + type: 'Bug fixes', + rawType: 'Fix', + subject: 'Simple fix.', + body: null, + footer: null, + notes: [] + }, + { + hash: 'b'.repeat( 40 ), + header: 'Feature: A new feature.', + type: 'Features', + rawType: 'Feature', + subject: 'A new feature.', + body: null, + footer: null, + notes: [] + }, + { + hash: 'c'.repeat( 40 ), + header: 'Fix: Another fix.', + type: 'Bug fixes', + rawType: 'Fix', + subject: 'Another fix.', + body: null, + footer: null, + notes: [] + } + ] ); + + // Calls: 0, 2, 3, and 5 display the commit data. + expect( stubs.logger.info.callCount ).to.equal( 6 ); + expect( stubs.logger.info.getCall( 1 ).args[ 0 ] ).to.match( /-----/ ); + expect( stubs.logger.info.getCall( 4 ).args[ 0 ] ).to.match( /-----/ ); + } ); + + it( 'works for a group of two commits that follows a single commit group', () => { + // Displayed log: + // + // * aaaaaaa "Fix: Another fix." INCLUDED + // --------------------------------------------- + // |* bbbbbbb "Fix: Simple fix." INCLUDED + // |* bbbbbbb "Feature: A new feature." INCLUDED + // --------------------------------------------- + displayCommits( [ + { + hash: 'a'.repeat( 40 ), + header: 'Fix: Another fix.', + type: 'Bug fixes', + rawType: 'Fix', + subject: 'Another fix.', + body: null, + footer: null, + notes: [] + }, + { + hash: 'b'.repeat( 40 ), + header: 'Fix: Simple fix.', + type: 'Bug fixes', + rawType: 'Fix', + subject: 'Simple fix.', + body: null, + footer: null, + notes: [] + }, + { + hash: 'b'.repeat( 40 ), + header: 'Feature: A new feature.', + type: 'Features', + rawType: 'Feature', + subject: 'A new feature.', + body: null, + footer: null, + notes: [] + } + ] ); + + // Calls: 0, 2, and 3 display the commit data. + expect( stubs.logger.info.callCount ).to.equal( 5 ); + expect( stubs.logger.info.getCall( 1 ).args[ 0 ] ).to.match( /-----/ ); + expect( stubs.logger.info.getCall( 4 ).args[ 0 ] ).to.match( /-----/ ); + } ); + + it( 'works for a single commit group that follows group of two commits ', () => { + // Displayed log: + // + // --------------------------------------------- + // |* bbbbbbb "Fix: Simple fix." INCLUDED + // |* bbbbbbb "Feature: A new feature." INCLUDED + // --------------------------------------------- + // * ccccccc "Fix: Another fix." INCLUDED + + displayCommits( [ + { + hash: 'b'.repeat( 40 ), + header: 'Fix: Simple fix.', + type: 'Bug fixes', + rawType: 'Fix', + subject: 'Simple fix.', + body: null, + footer: null, + notes: [] + }, + { + hash: 'b'.repeat( 40 ), + header: 'Feature: A new feature.', + type: 'Features', + rawType: 'Feature', + subject: 'A new feature.', + body: null, + footer: null, + notes: [] + }, + { + hash: 'c'.repeat( 40 ), + header: 'Fix: Another fix.', + type: 'Bug fixes', + rawType: 'Fix', + subject: 'Another fix.', + body: null, + footer: null, + notes: [] + } + ] ); + + // Calls: 1, 2, and 4 display the commit data. + expect( stubs.logger.info.callCount ).to.equal( 5 ); + expect( stubs.logger.info.getCall( 0 ).args[ 0 ] ).to.match( /-----/ ); + expect( stubs.logger.info.getCall( 3 ).args[ 0 ] ).to.match( /-----/ ); + } ); + + it( 'does not duplicate the separator for commit groups', () => { + // Displayed log: + // + // --------------------------------------------- + // |* bbbbbbb "Fix: Simple fix." INCLUDED + // |* bbbbbbb "Feature: A new feature." INCLUDED + // --------------------------------------------- + // |* ccccccc "Fix: One Another fix." INCLUDED + // |* ccccccc "Fix: Another fix." INCLUDED + // --------------------------------------------- + + displayCommits( [ + { + hash: 'b'.repeat( 40 ), + header: 'Fix: Simple fix.', + type: 'Bug fixes', + rawType: 'Fix', + subject: 'Simple fix.', + body: null, + footer: null, + notes: [] + }, + { + hash: 'b'.repeat( 40 ), + header: 'Feature: A new feature.', + type: 'Features', + rawType: 'Feature', + subject: 'A new feature.', + body: null, + footer: null, + notes: [] + }, + { + hash: 'c'.repeat( 40 ), + header: 'Fix: One Another fix.', + type: 'Bug fixes', + rawType: 'Fix', + subject: 'One Another fix.', + body: null, + footer: null, + notes: [] + }, + { + hash: 'c'.repeat( 40 ), + header: 'Fix: Another fix.', + type: 'Bug fixes', + rawType: 'Fix', + subject: 'Another fix.', + body: null, + footer: null, + notes: [] + } + ] ); + + // Calls: 1, 2, 4, and 5 display the commit data. + expect( stubs.logger.info.callCount ).to.equal( 7 ); + expect( stubs.logger.info.getCall( 0 ).args[ 0 ] ).to.match( /-----/ ); + expect( stubs.logger.info.getCall( 3 ).args[ 0 ] ).to.match( /-----/ ); + expect( stubs.logger.info.getCall( 4 ).args[ 0 ] ).to.not.match( /-----/ ); + expect( stubs.logger.info.getCall( 6 ).args[ 0 ] ).to.match( /-----/ ); + } ); + + it( 'groups two groups of commits separated by a single commit group', () => { + // Displayed log: + // + // --------------------------------------------- + // |* bbbbbbb "Fix: Simple fix." INCLUDED + // |* bbbbbbb "Feature: A new feature." INCLUDED + // --------------------------------------------- + // * aaaaaaa "Fix: Another fix." INCLUDED + // --------------------------------------------- + // |* ccccccc "Fix: One Another fix." INCLUDED + // |* ccccccc "Fix: Another fix." INCLUDED + // --------------------------------------------- + + displayCommits( [ + { + hash: 'b'.repeat( 40 ), + header: 'Fix: Simple fix.', + type: 'Bug fixes', + rawType: 'Fix', + subject: 'Simple fix.', + body: null, + footer: null, + notes: [] + }, + { + hash: 'b'.repeat( 40 ), + header: 'Feature: A new feature.', + type: 'Features', + rawType: 'Feature', + subject: 'A new feature.', + body: null, + footer: null, + notes: [] + }, + { + hash: 'a'.repeat( 40 ), + header: 'Fix: Another fix.', + type: 'Bug fixes', + rawType: 'Fix', + subject: 'Another fix.', + body: null, + footer: null, + notes: [] + }, + { + hash: 'c'.repeat( 40 ), + header: 'Fix: One Another fix.', + type: 'Bug fixes', + rawType: 'Fix', + subject: 'One Another fix.', + body: null, + footer: null, + notes: [] + }, + { + hash: 'c'.repeat( 40 ), + header: 'Fix: Another fix.', + type: 'Bug fixes', + rawType: 'Fix', + subject: 'Another fix.', + body: null, + footer: null, + notes: [] + } + ] ); + + // Calls: 1, 2, 4, 6, and 7 display the commit data. + expect( stubs.logger.info.callCount ).to.equal( 9 ); + expect( stubs.logger.info.getCall( 0 ).args[ 0 ] ).to.match( /-----/ ); + expect( stubs.logger.info.getCall( 3 ).args[ 0 ] ).to.match( /-----/ ); + + expect( stubs.logger.info.getCall( 5 ).args[ 0 ] ).to.match( /-----/ ); + expect( stubs.logger.info.getCall( 8 ).args[ 0 ] ).to.match( /-----/ ); + } ); + } ); } ); } ); diff --git a/packages/ckeditor5-dev-env/tests/release-tools/utils/displaygeneratedchangelogs.js b/packages/ckeditor5-dev-env/tests/release-tools/utils/displaygeneratedchangelogs.js deleted file mode 100644 index 41b085e98..000000000 --- a/packages/ckeditor5-dev-env/tests/release-tools/utils/displaygeneratedchangelogs.js +++ /dev/null @@ -1,60 +0,0 @@ -/** - * @license Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved. - * For licensing, see LICENSE.md. - */ - -'use strict'; - -const expect = require( 'chai' ).expect; -const sinon = require( 'sinon' ); -const proxyquire = require( 'proxyquire' ); - -describe( 'dev-env/release-tools/utils', () => { - let displayGeneratedChangelogs, sandbox, stubs; - - beforeEach( () => { - sandbox = sinon.createSandbox(); - - stubs = { - logger: { - info: sandbox.stub(), - warning: sandbox.stub(), - error: sandbox.stub() - } - }; - - displayGeneratedChangelogs = proxyquire( '../../../lib/release-tools/utils/displaygeneratedchangelogs', { - '@ckeditor/ckeditor5-dev-utils': { - logger() { - return stubs.logger; - } - } - } ); - } ); - - afterEach( () => { - sandbox.restore(); - } ); - - describe( 'displayGeneratedChangelogs()', () => { - it( 'displays name of packages that have been skipped', () => { - displayGeneratedChangelogs( new Map( [ - [ '@ckeditor/ckeditor5-foo', '1.0.0' ], - [ '@ckeditor/ckeditor5-bar', '2.0.0' ] - ] ) ); - - expect( stubs.logger.info.calledOnce ).to.equal( true ); - - const logMessage = stubs.logger.info.firstCall.args[ 0 ].split( '\n' ); - - expect( logMessage[ 0 ].includes( 'Changelogs for the following packages have been generated:' ) ).to.equal( true ); - expect( logMessage[ 1 ].includes( ' * @ckeditor/ckeditor5-foo: v1.0.0' ) ).to.equal( true ); - expect( logMessage[ 2 ].includes( ' * @ckeditor/ckeditor5-bar: v2.0.0' ) ).to.equal( true ); - } ); - - it( 'does not display if given list is empty', () => { - displayGeneratedChangelogs( new Map() ); - expect( stubs.logger.info.calledOnce ).to.equal( false ); - } ); - } ); -} ); diff --git a/packages/ckeditor5-dev-env/tests/release-tools/utils/generatechangelog.js b/packages/ckeditor5-dev-env/tests/release-tools/utils/generatechangelog.js new file mode 100644 index 000000000..ae584b2a3 --- /dev/null +++ b/packages/ckeditor5-dev-env/tests/release-tools/utils/generatechangelog.js @@ -0,0 +1,907 @@ +/** + * @license Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */ + +'use strict'; + +const expect = require( 'chai' ).expect; +const compareFunc = require( 'compare-func' ); +const getWriterOptions = require( '../../../lib/release-tools/utils/getwriteroptions' ); +const generateChangelog = require( '../../../lib/release-tools/utils/generatechangelog' ); + +describe( 'dev-env/release-tools/utils', () => { + const url = 'https://github.com/ckeditor/ckeditor5-package'; + + /** + * Type of commits must be equal to values returned by `transformcommitutils.getCommitType()` function. + * Since we're creating all commits manually, we need to "transform" those to proper structures. + */ + describe( 'generateChangelog()', () => { + describe( 'initial changelog (without "previousTag")', () => { + it( 'generates "Features" correctly', () => { + const commits = [ + { + type: 'Features', + header: 'Feature: The first an amazing feature.', + subject: 'The first an amazing feature.', + hash: 'x'.repeat( 40 ), + notes: [] + }, + { + type: 'Features', + header: 'Feature: The second an amazing feature.', + subject: 'The second an amazing feature.', + hash: 'z'.repeat( 40 ), + notes: [] + } + ]; + + const context = { + version: '1.0.0', + repoUrl: url, + currentTag: 'v1.0.0', + commit: 'commit' + }; + + const options = getWriterOptions( { + hash: hash => hash.slice( 0, 7 ) + } ); + + return generateChangelog( commits, context, options ) + .then( changes => { + changes = replaceDates( changes ); + + const changesAsArray = changes.split( '\n' ) + .map( line => line.trim() ) + .filter( line => line.length ); + + expect( changesAsArray[ 0 ] ).to.equal( + '## [1.0.0](https://github.com/ckeditor/ckeditor5-package/tree/v1.0.0) (0000-00-00)' + ); + expect( changesAsArray[ 1 ] ).to.equal( + '### Features' + ); + expect( changesAsArray[ 2 ] ).to.equal( + '* The first an amazing feature. ([commit](https://github.com/ckeditor/ckeditor5-package/commit/xxxxxxx))' + ); + expect( changesAsArray[ 3 ] ).to.equal( + '* The second an amazing feature. ([commit](https://github.com/ckeditor/ckeditor5-package/commit/zzzzzzz))' + ); + } ); + } ); + + it( 'generates "Bug fixes" correctly', () => { + const commits = [ + { + type: 'Bug fixes', + header: 'Fix: The first an amazing bug fix.', + subject: 'The first an amazing bug fix.', + hash: 'x'.repeat( 40 ), + notes: [] + }, + { + type: 'Bug fixes', + header: 'Fix: The second an amazing bug fix.', + subject: 'The second an amazing bug fix.', + hash: 'z'.repeat( 40 ), + notes: [] + } + ]; + + const context = { + version: '1.0.0', + repoUrl: url, + currentTag: 'v1.0.0', + commit: 'commit' + }; + + const options = getWriterOptions( { + hash: hash => hash.slice( 0, 7 ) + } ); + + return generateChangelog( commits, context, options ) + .then( changes => { + changes = replaceDates( changes ); + + const changesAsArray = changes.split( '\n' ) + .map( line => line.trim() ) + .filter( line => line.length ); + + expect( changesAsArray[ 0 ] ).to.equal( + '## [1.0.0](https://github.com/ckeditor/ckeditor5-package/tree/v1.0.0) (0000-00-00)' + ); + expect( changesAsArray[ 1 ] ).to.equal( + '### Bug fixes' + ); + expect( changesAsArray[ 2 ] ).to.equal( + '* The first an amazing bug fix. ([commit](https://github.com/ckeditor/ckeditor5-package/commit/xxxxxxx))' + ); + expect( changesAsArray[ 3 ] ).to.equal( + '* The second an amazing bug fix. ([commit](https://github.com/ckeditor/ckeditor5-package/commit/zzzzzzz))' + ); + } ); + } ); + + it( 'generates "Other changes" correctly', () => { + const commits = [ + { + type: 'Other changes', + header: 'Other: The first an amazing commit.', + subject: 'The first an amazing commit.', + hash: 'x'.repeat( 40 ), + notes: [] + }, + { + type: 'Other changes', + header: 'Other: The second an amazing commit.', + subject: 'The second an amazing commit.', + hash: 'z'.repeat( 40 ), + notes: [] + } + ]; + + const context = { + version: '1.0.0', + repoUrl: url, + currentTag: 'v1.0.0', + commit: 'commit' + }; + + const options = getWriterOptions( { + hash: hash => hash.slice( 0, 7 ) + } ); + + return generateChangelog( commits, context, options ) + .then( changes => { + changes = replaceDates( changes ); + + const changesAsArray = changes.split( '\n' ) + .map( line => line.trim() ) + .filter( line => line.length ); + + expect( changesAsArray[ 0 ] ).to.equal( + '## [1.0.0](https://github.com/ckeditor/ckeditor5-package/tree/v1.0.0) (0000-00-00)' + ); + expect( changesAsArray[ 1 ] ).to.equal( + '### Other changes' + ); + expect( changesAsArray[ 2 ] ).to.equal( + '* The first an amazing commit. ([commit](https://github.com/ckeditor/ckeditor5-package/commit/xxxxxxx))' + ); + expect( changesAsArray[ 3 ] ).to.equal( + '* The second an amazing commit. ([commit](https://github.com/ckeditor/ckeditor5-package/commit/zzzzzzz))' + ); + } ); + } ); + + it( 'generates all groups correctly', () => { + const commits = [ + { + type: 'Features', + header: 'Feature: An amazing feature.', + subject: 'An amazing feature.', + hash: 'x'.repeat( 40 ), + notes: [] + }, + { + type: 'Bug fixes', + header: 'Fix: An amazing bug fix.', + subject: 'An amazing bug fix.', + hash: 'z'.repeat( 40 ), + notes: [] + }, + { + type: 'Other changes', + header: 'Other: An amazing commit.', + subject: 'An amazing commit.', + hash: 'y'.repeat( 40 ), + notes: [] + } + ]; + + const context = { + version: '1.0.0', + repoUrl: url, + currentTag: 'v1.0.0', + commit: 'commit' + }; + + const options = getWriterOptions( { + hash: hash => hash.slice( 0, 7 ) + } ); + + return generateChangelog( commits, context, options ) + .then( changes => { + changes = replaceDates( changes ); + + const changesAsArray = changes.split( '\n' ) + .map( line => line.trim() ) + .filter( line => line.length ); + + expect( changesAsArray[ 0 ] ).to.equal( + '## [1.0.0](https://github.com/ckeditor/ckeditor5-package/tree/v1.0.0) (0000-00-00)' + ); + expect( changesAsArray[ 1 ] ).to.equal( + '### Features' + ); + expect( changesAsArray[ 2 ] ).to.equal( + '* An amazing feature. ([commit](https://github.com/ckeditor/ckeditor5-package/commit/xxxxxxx))' + ); + expect( changesAsArray[ 3 ] ).to.equal( + '### Bug fixes' + ); + expect( changesAsArray[ 4 ] ).to.equal( + '* An amazing bug fix. ([commit](https://github.com/ckeditor/ckeditor5-package/commit/zzzzzzz))' + ); + expect( changesAsArray[ 5 ] ).to.equal( + '### Other changes' + ); + expect( changesAsArray[ 6 ] ).to.equal( + '* An amazing commit. ([commit](https://github.com/ckeditor/ckeditor5-package/commit/yyyyyyy))' + ); + } ); + } ); + + it( 'removes URLs to commits (context.skipCommitsLink=true)', () => { + const commits = [ + { + type: 'Features', + header: 'Feature: The first an amazing feature.', + subject: 'The first an amazing feature.', + hash: 'x'.repeat( 40 ), + notes: [] + }, + { + type: 'Features', + header: 'Feature: The second an amazing feature.', + subject: 'The second an amazing feature.', + hash: 'z'.repeat( 40 ), + notes: [] + } + ]; + + const context = { + version: '1.0.0', + repoUrl: url, + currentTag: 'v1.0.0', + skipCommitsLink: true + }; + + const options = getWriterOptions( { + hash: hash => hash.slice( 0, 7 ) + } ); + + return generateChangelog( commits, context, options ) + .then( changes => { + changes = replaceDates( changes ); + + const changesAsArray = changes.split( '\n' ) + .map( line => line.trim() ) + .filter( line => line.length ); + + expect( changesAsArray[ 0 ] ).to.equal( + '## [1.0.0](https://github.com/ckeditor/ckeditor5-package/tree/v1.0.0) (0000-00-00)' + ); + expect( changesAsArray[ 1 ] ).to.equal( + '### Features' + ); + expect( changesAsArray[ 2 ] ).to.equal( + '* The first an amazing feature.' + ); + expect( changesAsArray[ 3 ] ).to.equal( + '* The second an amazing feature.' + ); + } ); + } ); + + it( 'removes compare link from the header (context.skipCompareLink=true)', () => { + const context = { + version: '1.0.0', + repoUrl: url, + currentTag: 'v1.0.0', + commit: 'commit', + skipCompareLink: true + }; + + const options = getWriterOptions( { + hash: hash => hash.slice( 0, 7 ) + } ); + + return generateChangelog( [], context, options ) + .then( changes => { + changes = replaceDates( changes ); + + const changesAsArray = changes.split( '\n' ) + .map( line => line.trim() ) + .filter( line => line.length ); + + expect( changesAsArray[ 0 ] ).to.equal( + '## 1.0.0 (0000-00-00)' + ); + } ); + } ); + + it( 'generates additional commit message below the subject', () => { + const commits = [ + { + type: 'Other changes', + header: 'Other: The first an amazing commit.', + subject: 'The first an amazing commit.', + body: [ + ' First line: Lorem Ipsum (1).', + ' Second line: Lorem Ipsum (2).' + ].join( '\n' ), + hash: 'x'.repeat( 40 ), + notes: [] + }, + { + type: 'Other changes', + header: 'Other: The second an amazing commit.', + subject: 'The second an amazing commit.', + body: [ + ' First line: Lorem Ipsum (1).', + ' Second line: Lorem Ipsum (2).', + ' Third line: Lorem Ipsum (3).' + ].join( '\n' ), + hash: 'z'.repeat( 40 ), + notes: [] + }, + { + type: 'Other changes', + header: 'Other: The third an amazing commit.', + subject: 'The third an amazing commit.', + hash: 'y'.repeat( 40 ), + notes: [] + } + ]; + + const context = { + version: '1.0.0', + repoUrl: url, + currentTag: 'v1.0.0', + commit: 'commit' + }; + + const options = getWriterOptions( { + hash: hash => hash.slice( 0, 7 ) + } ); + + return generateChangelog( commits, context, options ) + .then( changes => { + changes = replaceDates( changes ); + + const changelog = [ + '## [1.0.0](https://github.com/ckeditor/ckeditor5-package/tree/v1.0.0) (0000-00-00)', + '', + '### Other changes', + '', + '* The first an amazing commit. ([commit](https://github.com/ckeditor/ckeditor5-package/commit/xxxxxxx))', + '', + ' First line: Lorem Ipsum (1).', + ' Second line: Lorem Ipsum (2).', + '* The second an amazing commit. ([commit](https://github.com/ckeditor/ckeditor5-package/commit/zzzzzzz))', + '', + ' First line: Lorem Ipsum (1).', + ' Second line: Lorem Ipsum (2).', + ' Third line: Lorem Ipsum (3).', + '* The third an amazing commit. ([commit](https://github.com/ckeditor/ckeditor5-package/commit/yyyyyyy))' + ].join( '\n' ); + + expect( changes.trim() ).to.equal( changelog ); + } ); + } ); + + it( 'groups "Updated translations." commits as the single entry (merged links)', () => { + const commits = [ + { + type: 'Other changes', + header: 'Other: Updated translations.', + subject: 'Updated translations.', + hash: 'a'.repeat( 40 ), + notes: [] + }, + { + type: 'Other changes', + header: 'Other: Updated translations.', + subject: 'Updated translations.', + hash: 'b'.repeat( 40 ), + notes: [] + }, + { + type: 'Other changes', + header: 'Other: Updated translations.', + subject: 'Updated translations.', + hash: 'c'.repeat( 40 ), + notes: [] + }, + { + type: 'Other changes', + header: 'Other: Updated translations.', + subject: 'Updated translations.', + hash: 'd'.repeat( 40 ), + notes: [] + } + ]; + + const context = { + version: '1.0.0', + repoUrl: url, + currentTag: 'v1.0.0', + commit: 'c' + }; + + const options = getWriterOptions( { + hash: hash => hash.slice( 0, 2 ) + } ); + + return generateChangelog( commits, context, options ) + .then( changes => { + changes = replaceDates( changes ); + + const changesAsArray = changes.split( '\n' ) + .map( line => line.trim() ) + .filter( line => line.length ); + + expect( changesAsArray[ 0 ] ).to.equal( + '## [1.0.0](https://github.com/ckeditor/ckeditor5-package/tree/v1.0.0) (0000-00-00)' + ); + expect( changesAsArray[ 1 ] ).to.equal( + '### Other changes' + ); + /* eslint-disable max-len */ + expect( changesAsArray[ 2 ] ).to.equal( + '* Updated translations. ([commit](https://github.com/ckeditor/ckeditor5-package/c/aa), [commit](https://github.com/ckeditor/ckeditor5-package/c/bb), [commit](https://github.com/ckeditor/ckeditor5-package/c/cc), [commit](https://github.com/ckeditor/ckeditor5-package/c/dd))' + ); + /* eslint-enable max-len */ + } ); + } ); + + it( 'groups "Updated translations." commits as the single entry (removed links, context.skipCommitsLink=true)', () => { + const commits = [ + { + type: 'Other changes', + header: 'Other: Updated translations.', + subject: 'Updated translations.', + hash: 'a'.repeat( 40 ), + notes: [] + }, + { + type: 'Other changes', + header: 'Other: Updated translations.', + subject: 'Updated translations.', + hash: 'b'.repeat( 40 ), + notes: [] + }, + { + type: 'Other changes', + header: 'Other: Updated translations.', + subject: 'Updated translations.', + hash: 'c'.repeat( 40 ), + notes: [] + }, + { + type: 'Other changes', + header: 'Other: Updated translations.', + subject: 'Updated translations.', + hash: 'd'.repeat( 40 ), + notes: [] + } + ]; + + const context = { + version: '1.0.0', + repoUrl: url, + currentTag: 'v1.0.0', + skipCommitsLink: true + }; + + const options = getWriterOptions( { + hash: hash => hash.slice( 0, 2 ) + } ); + + return generateChangelog( commits, context, options ) + .then( changes => { + changes = replaceDates( changes ); + + const changesAsArray = changes.split( '\n' ) + .map( line => line.trim() ) + .filter( line => line.length ); + + expect( changesAsArray[ 0 ] ).to.equal( + '## [1.0.0](https://github.com/ckeditor/ckeditor5-package/tree/v1.0.0) (0000-00-00)' + ); + expect( changesAsArray[ 1 ] ).to.equal( + '### Other changes' + ); + expect( changesAsArray[ 2 ] ).to.equal( + '* Updated translations.' + ); + } ); + } ); + } ); + + describe( 'non-initial changelog (with "previousTag")', () => { + it( 'allows generating "internal release" (set by option, ignored all commits)', () => { + const commits = [ + { + type: 'Other changes', + header: 'Other: The first an amazing commit.', + subject: 'The first an amazing commit.', + hash: 'x'.repeat( 40 ), + notes: [] + } + ]; + + const context = { + version: '1.1.0', + repoUrl: url, + currentTag: 'v1.1.0', + previousTag: 'v1.0.0', + commit: 'commit', + isInternalRelease: true + }; + + const options = getWriterOptions( { + hash: hash => hash.slice( 0, 7 ) + } ); + + return generateChangelog( commits, context, options ) + .then( changes => { + changes = replaceDates( changes ); + + const changesAsArray = changes.split( '\n' ) + .map( line => line.trim() ) + .filter( line => line.length ); + + expect( changesAsArray[ 0 ] ).to.equal( + '## [1.1.0](https://github.com/ckeditor/ckeditor5-package/compare/v1.0.0...v1.1.0) (0000-00-00)' + ); + expect( changesAsArray[ 1 ] ).to.equal( + 'Internal changes only (updated dependencies, documentation, etc.).' + ); + } ); + } ); + + it( 'allows generating "internal release" (passed an empty array of commits)', () => { + const context = { + version: '1.1.0', + repoUrl: url, + currentTag: 'v1.1.0', + previousTag: 'v1.0.0', + commit: 'commit' + }; + + const options = getWriterOptions( { + hash: hash => hash.slice( 0, 7 ) + } ); + + return generateChangelog( [], context, options ) + .then( changes => { + changes = replaceDates( changes ); + + const changesAsArray = changes.split( '\n' ) + .map( line => line.trim() ) + .filter( line => line.length ); + + expect( changesAsArray[ 0 ] ).to.equal( + '## [1.1.0](https://github.com/ckeditor/ckeditor5-package/compare/v1.0.0...v1.1.0) (0000-00-00)' + ); + expect( changesAsArray[ 1 ] ).to.equal( + 'Internal changes only (updated dependencies, documentation, etc.).' + ); + } ); + } ); + + it( 'attaches the release highlights placeholder', () => { + const commits = [ + { + type: 'Features', + header: 'Feature: The first an amazing feature.', + subject: 'The first an amazing feature.', + hash: 'x'.repeat( 40 ), + notes: [] + }, + { + type: 'Features', + header: 'Feature: The second an amazing feature.', + subject: 'The second an amazing feature.', + hash: 'z'.repeat( 40 ), + notes: [] + } + ]; + + const context = { + version: '1.1.0', + repoUrl: url, + currentTag: 'v1.1.0', + previousTag: 'v1.0.0', + commit: 'commit', + highlightsPlaceholder: true + }; + + const options = getWriterOptions( { + hash: hash => hash.slice( 0, 7 ) + } ); + + return generateChangelog( commits, context, options ) + .then( changes => { + changes = replaceDates( changes ); + + const changesAsArray = changes.split( '\n' ) + .map( line => line.trim() ) + .filter( line => line.length ); + + expect( changesAsArray[ 0 ] ).to.equal( + '## [1.1.0](https://github.com/ckeditor/ckeditor5-package/compare/v1.0.0...v1.1.0) (0000-00-00)' + ); + expect( changesAsArray[ 1 ] ).to.equal( + '### Release highlights' + ); + expect( changesAsArray[ 2 ] ).to.equal( + 'TODO: Add a link to the blog post.' + ); + expect( changesAsArray[ 3 ] ).to.equal( + '### Features' + ); + expect( changesAsArray[ 4 ] ).to.equal( + '* The first an amazing feature. ([commit](https://github.com/ckeditor/ckeditor5-package/commit/xxxxxxx))' + ); + expect( changesAsArray[ 5 ] ).to.equal( + '* The second an amazing feature. ([commit](https://github.com/ckeditor/ckeditor5-package/commit/zzzzzzz))' + ); + } ); + } ); + + it( 'attaches the collaboration features changelog', () => { + const commits = [ + { + type: 'Features', + header: 'Feature: The first an amazing feature.', + subject: 'The first an amazing feature.', + hash: 'x'.repeat( 40 ), + notes: [] + }, + { + type: 'Features', + header: 'Feature: The second an amazing feature.', + subject: 'The second an amazing feature.', + hash: 'z'.repeat( 40 ), + notes: [] + } + ]; + + const context = { + version: '1.1.0', + repoUrl: url, + currentTag: 'v1.1.0', + previousTag: 'v1.0.0', + commit: 'commit', + collaborationFeatures: true + }; + + const options = getWriterOptions( { + hash: hash => hash.slice( 0, 7 ) + } ); + + return generateChangelog( commits, context, options ) + .then( changes => { + changes = replaceDates( changes ); + const changelog = 'https://ckeditor.com/collaboration/changelog'; + + const changesAsArray = changes.split( '\n' ) + .map( line => line.trim() ) + .filter( line => line.length ); + + expect( changesAsArray[ 0 ] ).to.equal( + '## [1.1.0](https://github.com/ckeditor/ckeditor5-package/compare/v1.0.0...v1.1.0) (0000-00-00)' + ); + expect( changesAsArray[ 1 ] ).to.equal( + '### Collaboration features' + ); + expect( changesAsArray[ 2 ] ).to.equal( + `The CKEditor 5 Collaboration features changelog can be found here: ${ changelog }.` + ); + expect( changesAsArray[ 3 ] ).to.equal( + '### Features' + ); + expect( changesAsArray[ 4 ] ).to.equal( + '* The first an amazing feature. ([commit](https://github.com/ckeditor/ckeditor5-package/commit/xxxxxxx))' + ); + expect( changesAsArray[ 5 ] ).to.equal( + '* The second an amazing feature. ([commit](https://github.com/ckeditor/ckeditor5-package/commit/zzzzzzz))' + ); + } ); + } ); + + it( 'generates complex changelog', () => { + const commits = [ + { + type: 'Features', + header: 'Feature (engine): The first an amazing feature.', + subject: 'The first an amazing feature.', + scope: [ 'engine' ], + hash: 'x'.repeat( 40 ), + notes: [ + { + title: 'MINOR BREAKING CHANGES', + text: 'Nothing but I would like to use the note - engine.', + scope: [ 'engine' ] + } + ] + }, + { + type: 'Features', + header: 'Feature: The second an amazing feature.', + subject: 'The second an amazing feature.', + hash: 'z'.repeat( 40 ), + notes: [] + }, + { + type: 'Bug fixes', + header: 'Fix (ui): The first amazing bug fix.', + subject: 'The first amazing bug fix.', + scope: [ 'ui' ], + hash: 'y'.repeat( 40 ), + notes: [ + { + title: 'MINOR BREAKING CHANGES', + text: 'Nothing but I would like to use the note - ui.', + scope: [ 'ui' ] + } + ] + }, + { + type: 'Other changes', + header: 'Other: Use the newest version of Node.js on CI.', + subject: 'Use the newest version of Node.js on CI.', + hash: 'a'.repeat( 40 ), + notes: [ + { + title: 'MAJOR BREAKING CHANGES', + text: 'This change should be scoped too but the script should work if the scope is being missed.', + scope: [] + } + ] + }, + { + type: 'Features', + header: 'Feature (autoformat): It just works.', + subject: 'It just works.', + scope: [ + 'autoformat', + // The tool supports multi-scoped changes but only the first one will be printed in the changelog. + 'engine' + ], + hash: 'b'.repeat( 40 ), + notes: [] + } + ]; + + const context = { + version: '1.1.0', + repoUrl: url, + currentTag: 'v1.1.0', + previousTag: 'v1.0.0', + commit: 'c', + highlightsPlaceholder: true, + collaborationFeatures: true + }; + + const options = getWriterOptions( { + hash: hash => hash.slice( 0, 2 ) + } ); + + const sortFunction = compareFunc( item => { + if ( Array.isArray( item.scope ) ) { + return item.scope[ 0 ]; + } + + // A hack that allows moving all non-scoped commits or breaking changes notes at the end of the list. + return 'z'.repeat( 15 ); + } ); + + options.commitsSort = sortFunction; + options.notesSort = sortFunction; + + return generateChangelog( commits, context, options ) + .then( changes => { + changes = replaceDates( changes ); + const changelog = 'https://ckeditor.com/collaboration/changelog'; + + const changesAsArray = changes.split( '\n' ) + .map( line => line.trim() ) + .filter( line => line.length ); + + expect( changesAsArray[ 0 ] ).to.equal( + '## [1.1.0](https://github.com/ckeditor/ckeditor5-package/compare/v1.0.0...v1.1.0) (0000-00-00)' + ); + expect( changesAsArray[ 1 ] ).to.equal( + '### Release highlights' + ); + expect( changesAsArray[ 2 ] ).to.equal( + 'TODO: Add a link to the blog post.' + ); + expect( changesAsArray[ 3 ] ).to.equal( + '### Collaboration features' + ); + expect( changesAsArray[ 4 ] ).to.equal( + `The CKEditor 5 Collaboration features changelog can be found here: ${ changelog }.` + ); + expect( changesAsArray[ 5 ] ).to.equal( + '### MAJOR BREAKING CHANGES' + ); + expect( changesAsArray[ 6 ] ).to.equal( + '* This change should be scoped too but the script should work if the scope is being missed.' + ); + expect( changesAsArray[ 7 ] ).to.equal( + '### MINOR BREAKING CHANGES' + ); + expect( changesAsArray[ 8 ] ).to.equal( + '* **engine**: Nothing but I would like to use the note - engine.' + ); + expect( changesAsArray[ 9 ] ).to.equal( + '* **ui**: Nothing but I would like to use the note - ui.' + ); + expect( changesAsArray[ 10 ] ).to.equal( + '### Features' + ); + expect( changesAsArray[ 11 ] ).to.equal( + '* **autoformat**: It just works. ([commit](https://github.com/ckeditor/ckeditor5-package/c/bb))' + ); + expect( changesAsArray[ 12 ] ).to.equal( + '* **engine**: The first an amazing feature. ([commit](https://github.com/ckeditor/ckeditor5-package/c/xx))' + ); + expect( changesAsArray[ 13 ] ).to.equal( + '* The second an amazing feature. ([commit](https://github.com/ckeditor/ckeditor5-package/c/zz))' + ); + expect( changesAsArray[ 14 ] ).to.equal( + '### Bug fixes' + ); + expect( changesAsArray[ 15 ] ).to.equal( + '* **ui**: The first amazing bug fix. ([commit](https://github.com/ckeditor/ckeditor5-package/c/yy))' + ); + expect( changesAsArray[ 16 ] ).to.equal( + '### Other changes' + ); + expect( changesAsArray[ 17 ] ).to.equal( + '* Use the newest version of Node.js on CI. ([commit](https://github.com/ckeditor/ckeditor5-package/c/aa))' + ); + } ); + } ); + + it( 'removes compare link from the header (context.skipCompareLink=true)', () => { + const context = { + version: '1.1.0', + repoUrl: url, + currentTag: 'v1.1.0', + previousTag: 'v1.0.0', + skipCompareLink: true + }; + + const options = getWriterOptions( { + hash: hash => hash.slice( 0, 7 ) + } ); + + return generateChangelog( [], context, options ) + .then( changes => { + changes = replaceDates( changes ); + + const changesAsArray = changes.split( '\n' ) + .map( line => line.trim() ) + .filter( line => line.length ); + + expect( changesAsArray[ 0 ] ).to.equal( + '## 1.1.0 (0000-00-00)' + ); + } ); + } ); + } ); + } ); + + // Replaces dates to known string. It allows comparing changelog entries to strings + // which don't depend on the date. + function replaceDates( changelog ) { + return changelog.replace( /\d{4}-\d{2}-\d{2}/g, '0000-00-00' ); + } +} ); diff --git a/packages/ckeditor5-dev-env/tests/release-tools/utils/generatechangelogfromcommits-integration.js b/packages/ckeditor5-dev-env/tests/release-tools/utils/generatechangelogfromcommits-integration.js deleted file mode 100644 index 9569fe607..000000000 --- a/packages/ckeditor5-dev-env/tests/release-tools/utils/generatechangelogfromcommits-integration.js +++ /dev/null @@ -1,816 +0,0 @@ -/** - * @license Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved. - * For licensing, see LICENSE.md. - */ - -'use strict'; - -const fs = require( 'fs' ); -const path = require( 'path' ); -const expect = require( 'chai' ).expect; -const sinon = require( 'sinon' ); -const proxyquire = require( 'proxyquire' ); -const { tools, stream } = require( '@ckeditor/ckeditor5-dev-utils' ); -const { - changelogHeader, - getChangelog: _getChangelog, - getChangesForVersion: _getChangesForVersion -} = require( '../../../lib/release-tools/utils/changelog' ); -const transformCommitForSubRepositoryFactory = require( - '../../../lib/release-tools/utils/transform-commit/transformcommitforsubrepositoryfactory' -); - -describe( 'dev-env/release-tools/utils', () => { - const url = 'https://github.com/ckeditor/ckeditor5-test-package'; - - let tmpCwd, cwd, generateChangelogFromCommits, stubs, sandbox; - - describe( 'generateChangelogFromCommits() - integration test', function() { - this.timeout( 15 * 1000 ); - - beforeEach( () => { - cwd = process.cwd(); - tmpCwd = fs.mkdtempSync( __dirname + path.sep ); - process.chdir( tmpCwd ); - - exec( 'git init' ); - - if ( process.env.CI ) { - exec( 'git config user.email "ckeditor5@ckeditor.com"' ); - exec( 'git config user.name "CKEditor5 CI"' ); - } - - const packageJson = { - name: '@ckeditor/ckeditor5-test-package', - repository: `${ url }` - }; - - fs.writeFileSync( - path.join( tmpCwd, 'package.json' ), - JSON.stringify( packageJson, null, '\t' ) - ); - - sandbox = sinon.createSandbox(); - - stubs = { - logger: { - info: sandbox.stub(), - warning: sandbox.stub(), - error: sandbox.stub() - } - }; - - generateChangelogFromCommits = proxyquire( '../../../lib/release-tools/utils/generatechangelogfromcommits', { - '@ckeditor/ckeditor5-dev-utils': { - stream, - logger() { - return stubs.logger; - } - } - } ); - } ); - - afterEach( () => { - process.chdir( cwd ); - exec( `rm -rf ${ tmpCwd }` ); - - sandbox.restore(); - } ); - - it( 'generates a changelog for the first time', () => { - return makeInitialRelease() - .then( () => { - expect( stubs.logger.warning.calledOnce ).to.equal( true ); - - const generatedChangelog = getChangelog(); - - expect( generatedChangelog ).to.contain( changelogHeader ); - - const changelogWithoutHeader = generatedChangelog.replace( changelogHeader, '' ); - const changelogTitle = changelogWithoutHeader.split( '\n' )[ 0 ]; - const changes = changelogWithoutHeader.split( '\n' ).slice( 1 ).join( '\n' ).trim(); - - expect( replaceDates( changelogTitle ) ).to.contain( - '## [0.0.1](https://github.com/ckeditor/ckeditor5-test-package/tree/v0.0.1) (0000-00-00)' - ); - - expect( changes ).to.contain( - 'Internal changes only (updated dependencies, documentation, etc.).' - ); - } ); - } ); - - it( 'title of the next release should be a link which compares current version with the previous one', () => { - makeCommit( 'Internal: An initial commit.' ); - - return makeInitialRelease() - .then( () => { - makeCommit( 'Internal: An initial commit.' ); - makeCommit( 'Feature: Some amazing feature. Closes #1.' ); - - return generateChangelog( '0.1.0' ); - } ) - .then( () => { - expect( getChangelog() ).to.contain( - '## [0.1.0](https://github.com/ckeditor/ckeditor5-test-package/compare/v0.0.1...v0.1.0)' - ); - } ); - } ); - - // See: https://github.com/ckeditor/ckeditor5-dev/issues/270#issuecomment-326807018 - it( 'handles a commit which does not end with a dot', () => { - return makeInitialRelease() - .then( () => { - makeCommit( 'Feature: Another feature. Closes #2' ); - - return generateChangelog( '0.1.0' ); - } ) - .then( () => { - const latestChangelog = replaceCommitIds( getChangesForVersion( '0.1.0' ) ); - - /* eslint-disable max-len */ - const expectedChangelog = normalizeStrings( ` -### Features - -* Another feature. Closes [#2](https://github.com/ckeditor/ckeditor5-test-package/issues/2). ([XXXXXXX](https://github.com/ckeditor/ckeditor5-test-package/commit/XXXXXXX)) -` ); - /* eslint-enable max-len */ - - expect( latestChangelog ).to.equal( expectedChangelog.trim() ); - } ); - } ); - - describe( 'hoisting issues', () => { - it( 'does not hoist issues from the commit body', () => { - return makeInitialRelease() - .then( () => { - makeCommit( 'Feature: Another feature. Closes #2.', 'This PR also closes #3 and #4.' ); - - return generateChangelog( '0.1.0' ); - } ) - .then( () => { - const latestChangelog = replaceCommitIds( getChangesForVersion( '0.1.0' ) ); - - /* eslint-disable max-len */ - const expectedChangelog = normalizeStrings( ` -### Features - -* Another feature. Closes [#2](https://github.com/ckeditor/ckeditor5-test-package/issues/2). ([XXXXXXX](https://github.com/ckeditor/ckeditor5-test-package/commit/XXXXXXX)) - - This PR also closes [#3](https://github.com/ckeditor/ckeditor5-test-package/issues/3) and [#4](https://github.com/ckeditor/ckeditor5-test-package/issues/4). -` ); - /* eslint-enable max-len */ - - expect( latestChangelog ).to.equal( expectedChangelog.trim() ); - } ); - } ); - - it( 'does not hoist issues from the commit body for merge commit', () => { - return makeInitialRelease() - .then( () => { - makeCommit( - 'Merge pull request #5 from ckeditor/t/4', - 'Fix: Amazing fix. Closes #5.', - 'The PR also finally closes #3 and #4. So good!' - ); - - return generateChangelog( '0.1.1' ); - } ) - .then( () => { - const latestChangelog = replaceCommitIds( getChangesForVersion( '0.1.1' ) ); - - /* eslint-disable max-len */ - const expectedChangelog = normalizeStrings( ` -### Bug fixes - -* Amazing fix. Closes [#5](https://github.com/ckeditor/ckeditor5-test-package/issues/5). ([XXXXXXX](https://github.com/ckeditor/ckeditor5-test-package/commit/XXXXXXX)) - - The PR also finally closes [#3](https://github.com/ckeditor/ckeditor5-test-package/issues/3) and [#4](https://github.com/ckeditor/ckeditor5-test-package/issues/4). So good! -` ); - /* eslint-enable max-len */ - - expect( latestChangelog ).to.equal( expectedChangelog.trim() ); - } ); - } ); - - it( 'does not hoist issues from the commit body with additional notes for merge commit', () => { - return makeInitialRelease() - .then( () => { - makeCommit( - 'Merge pull request #7 from ckeditor/t/6', - 'Other: Some docs improvements. Closes #6.', - 'Did you see the #3 and #4?', - 'NOTE: Please read #1.', - 'BREAKING CHANGES: Some breaking change.' - ); - - const options = { - transformCommit: transformCommitForSubRepositoryFactory( { - useExplicitBreakingChangeGroups: true - } ) - }; - - return generateChangelog( '0.2.0', options ); - } ) - .then( () => { - const latestChangelog = replaceCommitIds( getChangesForVersion( '0.2.0' ) ); - - /* eslint-disable max-len */ - const expectedChangelog = normalizeStrings( ` -### MAJOR BREAKING CHANGES - -* Some breaking change. - -### NOTE - -* Please read [#1](https://github.com/ckeditor/ckeditor5-test-package/issues/1). - -### Other changes - -* Some docs improvements. Closes [#6](https://github.com/ckeditor/ckeditor5-test-package/issues/6). ([XXXXXXX](https://github.com/ckeditor/ckeditor5-test-package/commit/XXXXXXX)) - - Did you see the [#3](https://github.com/ckeditor/ckeditor5-test-package/issues/3) and [#4](https://github.com/ckeditor/ckeditor5-test-package/issues/4)? -` ); - /* eslint-enable max-len */ - - expect( latestChangelog ).to.equal( expectedChangelog.trim() ); - } ); - } ); - - it( 'does not hoist issues from the commit body with additional notes', () => { - return makeInitialRelease() - .then( () => { - makeCommit( - 'Feature: Issues will not be hoisted. Closes #8.', - 'All details have been described in #1.', - 'NOTE: Please read #1.', - 'BREAKING CHANGES: Some breaking change.' - ); - - const options = { - transformCommit: transformCommitForSubRepositoryFactory( { - useExplicitBreakingChangeGroups: true - } ) - }; - - return generateChangelog( '0.2.0', options ); - } ) - .then( () => { - const latestChangelog = replaceCommitIds( getChangesForVersion( '0.2.0' ) ); - - /* eslint-disable max-len */ - const expectedChangelog = normalizeStrings( ` -### MAJOR BREAKING CHANGES - -* Some breaking change. - -### NOTE - -* Please read [#1](https://github.com/ckeditor/ckeditor5-test-package/issues/1). - -### Features - -* Issues will not be hoisted. Closes [#8](https://github.com/ckeditor/ckeditor5-test-package/issues/8). ([XXXXXXX](https://github.com/ckeditor/ckeditor5-test-package/commit/XXXXXXX)) - - All details have been described in [#1](https://github.com/ckeditor/ckeditor5-test-package/issues/1). -` ); - /* eslint-enable max-len */ - - expect( latestChangelog ).to.equal( expectedChangelog.trim() ); - } ); - } ); - } ); - - // See: https://github.com/ckeditor/ckeditor5-dev/issues/270 - describe( 'merge commits', () => { - it( 'works with merge commit which is not a pull request #1', () => { - return makeInitialRelease() - .then( () => { - makeCommit( - 'Merge t/ckeditor5-link/52 into master', - 'Fix: Foo.' - ); - - return generateChangelog( '0.1.0' ); - } ) - .then( () => { - const latestChangelog = replaceCommitIds( getChangesForVersion( '0.1.0' ) ); - - /* eslint-disable max-len */ - const expectedChangelog = normalizeStrings( ` -### Bug fixes - -* Foo. ([XXXXXXX](https://github.com/ckeditor/ckeditor5-test-package/commit/XXXXXXX)) -` ); - /* eslint-enable max-len */ - - expect( latestChangelog ).to.equal( expectedChangelog.trim() ); - } ); - } ); - - it( 'works with merge commit which is not a pull request #2', () => { - return makeInitialRelease() - .then( () => { - makeCommit( - 'Merge branch t/ckedtor5-engine/660 to master', - 'Fix: Foo.' - ); - - return generateChangelog( '0.1.0' ); - } ) - .then( () => { - const latestChangelog = replaceCommitIds( getChangesForVersion( '0.1.0' ) ); - - /* eslint-disable max-len */ - const expectedChangelog = normalizeStrings( ` -### Bug fixes - -* Foo. ([XXXXXXX](https://github.com/ckeditor/ckeditor5-test-package/commit/XXXXXXX)) -` ); - /* eslint-enable max-len */ - - expect( latestChangelog ).to.equal( expectedChangelog.trim() ); - } ); - } ); - } ); - - // See: https://github.com/ckeditor/ckeditor5-dev/issues/271 - describe( 'prefixes for bug fixing', () => { - it( 'works with prefix "Fixes"', () => { - return makeInitialRelease() - .then( () => { - makeCommit( 'Fixes: Foo Bar.' ); - - return generateChangelog( '0.0.2' ); - } ) - .then( () => { - const latestChangelog = replaceCommitIds( getChangesForVersion( '0.0.2' ) ); - - /* eslint-disable max-len */ - const expectedChangelog = normalizeStrings( ` -### Bug fixes - -* Foo Bar. ([XXXXXXX](https://github.com/ckeditor/ckeditor5-test-package/commit/XXXXXXX)) -` ); - /* eslint-enable max-len */ - - expect( latestChangelog ).to.equal( expectedChangelog.trim() ); - } ); - } ); - - it( 'works with prefix "Fixed"', () => { - return makeInitialRelease() - .then( () => { - makeCommit( 'Fixed: Foo Bar.' ); - - return generateChangelog( '0.0.2' ); - } ) - .then( () => { - const latestChangelog = replaceCommitIds( getChangesForVersion( '0.0.2' ) ); - - /* eslint-disable max-len */ - const expectedChangelog = normalizeStrings( ` -### Bug fixes - -* Foo Bar. ([XXXXXXX](https://github.com/ckeditor/ckeditor5-test-package/commit/XXXXXXX)) -` ); - /* eslint-enable max-len */ - - expect( latestChangelog ).to.equal( expectedChangelog.trim() ); - } ); - } ); - } ); - - describe( 'spacing between entries', () => { - it( 'adds two blank lines for internal release (user specified "internal" version)', () => { - return makeInitialRelease() - .then( () => { - return generateChangelog( '0.1.0', { isInternalRelease: true } ); - } ) - .then( () => { - const changelogAsArray = getChangelog().split( '\n' ).slice( 0, 9 ); - - expect( changelogAsArray[ 0 ], 'Index: 0' ).to.equal( 'Changelog' ); - expect( changelogAsArray[ 1 ], 'Index: 1' ).to.equal( '=========' ); - expect( changelogAsArray[ 2 ], 'Index: 2' ).to.equal( '' ); - expect( replaceDates( changelogAsArray[ 3 ] ), 'Index: 3' ).to.equal( - '## [0.1.0](https://github.com/ckeditor/ckeditor5-test-package/compare/v0.0.1...v0.1.0) (0000-00-00)' - ); - expect( changelogAsArray[ 4 ], 'Index: 4' ).to.equal( '' ); - expect( changelogAsArray[ 5 ], 'Index: 5' ).to.equal( - 'Internal changes only (updated dependencies, documentation, etc.).' - ); - expect( changelogAsArray[ 6 ], 'Index: 6' ).to.equal( '' ); - expect( changelogAsArray[ 7 ], 'Index: 7' ).to.equal( '' ); - expect( replaceDates( changelogAsArray[ 8 ] ), 'Index: 8' ).to.equal( - '## [0.0.1](https://github.com/ckeditor/ckeditor5-test-package/tree/v0.0.1) (0000-00-00)' - ); - } ); - } ); - - it( 'adds two blank lines for internal release (user provides a version but no commits were made)', () => { - return makeInitialRelease() - .then( () => { - return generateChangelog( '0.1.0', { isInternalRelease: true } ); - } ) - .then( () => { - const changelogAsArray = getChangelog().split( '\n' ).slice( 0, 9 ); - - expect( changelogAsArray[ 0 ], 'Index: 0' ).to.equal( 'Changelog' ); - expect( changelogAsArray[ 1 ], 'Index: 1' ).to.equal( '=========' ); - expect( changelogAsArray[ 2 ], 'Index: 2' ).to.equal( '' ); - expect( replaceDates( changelogAsArray[ 3 ] ), 'Index: 3' ).to.equal( - '## [0.1.0](https://github.com/ckeditor/ckeditor5-test-package/compare/v0.0.1...v0.1.0) (0000-00-00)' - ); - expect( changelogAsArray[ 4 ], 'Index: 4' ).to.equal( '' ); - expect( changelogAsArray[ 5 ], 'Index: 5' ).to.equal( - 'Internal changes only (updated dependencies, documentation, etc.).' - ); - expect( changelogAsArray[ 6 ], 'Index: 6' ).to.equal( '' ); - expect( changelogAsArray[ 7 ], 'Index: 7' ).to.equal( '' ); - expect( replaceDates( changelogAsArray[ 8 ] ), 'Index: 8' ).to.equal( - '## [0.0.1](https://github.com/ckeditor/ckeditor5-test-package/tree/v0.0.1) (0000-00-00)' - ); - } ); - } ); - - it( 'changelog should contain 2 blank lines for changelog with internal changes', () => { - return makeInitialRelease() - .then( () => { - makeCommit( 'Docs: Updated README.' ); - - return generateChangelog( '0.0.2' ); - } ) - .then( () => { - const expectedChangelogeEntries = [ - '## [0.0.2](https://github.com/ckeditor/ckeditor5-test-package/compare/v0.0.1...v0.0.2) (0000-00-00)', - '', - 'Internal changes only (updated dependencies, documentation, etc.).', - '', - '', - '## [0.0.1](https://github.com/ckeditor/ckeditor5-test-package/tree/v0.0.1) (0000-00-00)' - ]; - const changelogAsArray = replaceDates( getChangelog() ).replace( changelogHeader, '' ).split( '\n' ); - - expectedChangelogeEntries.forEach( ( row, index ) => { - expect( row.trim() ).to.equal( changelogAsArray[ index ].trim(), `Index: ${ index }` ); - } ); - } ); - } ); - } ); - - describe( 'additional options', () => { - it( 'attaches additional description for "Bug fixes" section', () => { - return makeInitialRelease() - .then( () => { - makeCommit( 'Fix: Foo Bar.' ); - - return generateChangelog( '0.0.2', { additionalNotes: true } ); - } ) - .then( () => { - const latestChangelog = replaceCommitIds( getChangesForVersion( '0.0.2' ) ); - - /* eslint-disable max-len */ - const expectedChangelog = normalizeStrings( ` -### Bug fixes - -Besides changes in the dependencies, this version also contains the following bug fixes: - -* Foo Bar. ([XXXXXXX](https://github.com/ckeditor/ckeditor5-test-package/commit/XXXXXXX)) -` ); - /* eslint-enable max-len */ - - expect( latestChangelog ).to.equal( expectedChangelog.trim() ); - } ); - } ); - - // See: https://github.com/ckeditor/ckeditor5-dev/issues/184 - it( 'forces generating changelog as "internal" even if commits were made', () => { - return makeInitialRelease() - .then( () => { - makeCommit( - 'Feature: Issues will not be hoisted. Closes #8.', - 'All details have been described in #1.', - 'NOTE: Please read #1.', - 'BREAKING CHANGES: Some breaking change.' - ); - - makeCommit( - 'Feature: Issues will not be hoisted. Closes #8.', - 'All details have been described in #1.', - 'NOTE: Please read #1.', - 'BREAKING CHANGES: Some breaking change.' - ); - - return generateChangelog( '0.1.0', { isInternalRelease: true } ); - } ) - .then( () => { - const latestChangelog = getChangesForVersion( '0.1.0' ); - - expect( latestChangelog ).to.equal( 'Internal changes only (updated dependencies, documentation, etc.).' ); - } ); - } ); - - it( 'does not generate links to commits and release', () => { - return makeInitialRelease() - .then( () => { - makeCommit( 'Feature: Some amazing feature.' ); - - return generateChangelog( '0.1.0', { skipLinks: true } ); - } ) - .then( () => { - const changelogAsArray = getChangelog().split( '\n' ).slice( 0, 10 ); - - expect( changelogAsArray[ 0 ], 'Index: 0' ).to.equal( 'Changelog' ); - expect( changelogAsArray[ 1 ], 'Index: 1' ).to.equal( '=========' ); - expect( changelogAsArray[ 2 ], 'Index: 2' ).to.equal( '' ); - expect( replaceDates( changelogAsArray[ 3 ] ), 'Index: 3' ).to.equal( - '## 0.1.0 (0000-00-00)' - ); - expect( changelogAsArray[ 4 ], 'Index: 4' ).to.equal( '' ); - expect( changelogAsArray[ 5 ], 'Index: 5' ).to.equal( '### Features' ); - expect( changelogAsArray[ 6 ], 'Index: 6' ).to.equal( '' ); - expect( changelogAsArray[ 7 ], 'Index: 7' ).to.equal( - '* Some amazing feature.' - ); - expect( changelogAsArray[ 8 ], 'Index: 8' ).to.equal( '' ); - expect( changelogAsArray[ 9 ], 'Index: 9' ).to.equal( '' ); - } ); - } ); - } ); - - describe( 'grouping "Updated translation" commits as the single entry', () => { - it( 'works fine when translations have been updated few times (and nothing more has been changed)', () => { - return makeInitialRelease() - .then( () => { - makeCommit( 'Other: Updated translations. [skip ci]' ); - makeCommit( 'Other: Updated translations. [skip ci]' ); - makeCommit( 'Other: Updated translations. [skip ci]' ); - - return generateChangelog( '0.0.2' ); - } ) - .then( () => { - const latestChangelog = replaceCommitIds( getChangesForVersion( '0.0.2' ) ); - - /* eslint-disable max-len */ - const expectedChangelog = normalizeStrings( ` -### Other changes - -* Updated translations. ([XXXXXXX](https://github.com/ckeditor/ckeditor5-test-package/commit/XXXXXXX)) ([XXXXXXX](https://github.com/ckeditor/ckeditor5-test-package/commit/XXXXXXX)) ([XXXXXXX](https://github.com/ckeditor/ckeditor5-test-package/commit/XXXXXXX)) -` ); - /* eslint-enable max-len */ - - expect( latestChangelog ).to.equal( expectedChangelog.trim() ); - } ); - } ); - - it( 'works fine for complex iteration', () => { - return makeInitialRelease() - .then( () => { - makeCommit( 'Feature: Another feature. Closes #2' ); - makeCommit( 'Other: Updated translations. [skip ci]' ); - makeCommit( - 'Feature: Issues will not be hoisted. Closes #8.', - 'All details have been described in #1.', - 'NOTE: Please read #1.', - 'BREAKING CHANGES: Some breaking change.' - ); - makeCommit( 'Other: Updated translations. [skip ci]' ); - makeCommit( - 'Merge t/ckeditor5-link/52 into master', - 'Fix: Foo Bar. Closes #9.' - ); - makeCommit( 'Other: Updated translations. [skip ci]' ); - makeCommit( - 'Fix: Amazing fix. Closes #5.', - 'The PR also finally closes #3 and #4. So good!' - ); - makeCommit( 'Other: Updated translations.' ); - - const options = { - transformCommit: transformCommitForSubRepositoryFactory( { - useExplicitBreakingChangeGroups: true - } ) - }; - - return generateChangelog( '1.0.0', options ); - } ) - .then( () => { - const latestChangelog = replaceCommitIds( getChangesForVersion( '1.0.0' ) ); - - /* eslint-disable max-len */ - const expectedChangelog = normalizeStrings( ` -### MAJOR BREAKING CHANGES - -* Some breaking change. - -### NOTE - -* Please read [#1](https://github.com/ckeditor/ckeditor5-test-package/issues/1). - -### Features - -* Another feature. Closes [#2](https://github.com/ckeditor/ckeditor5-test-package/issues/2). ([XXXXXXX](https://github.com/ckeditor/ckeditor5-test-package/commit/XXXXXXX)) -* Issues will not be hoisted. Closes [#8](https://github.com/ckeditor/ckeditor5-test-package/issues/8). ([XXXXXXX](https://github.com/ckeditor/ckeditor5-test-package/commit/XXXXXXX)) - - All details have been described in [#1](https://github.com/ckeditor/ckeditor5-test-package/issues/1). - -### Bug fixes - -* Amazing fix. Closes [#5](https://github.com/ckeditor/ckeditor5-test-package/issues/5). ([XXXXXXX](https://github.com/ckeditor/ckeditor5-test-package/commit/XXXXXXX)) - - The PR also finally closes [#3](https://github.com/ckeditor/ckeditor5-test-package/issues/3) and [#4](https://github.com/ckeditor/ckeditor5-test-package/issues/4). So good! -* Foo Bar. Closes [#9](https://github.com/ckeditor/ckeditor5-test-package/issues/9). ([XXXXXXX](https://github.com/ckeditor/ckeditor5-test-package/commit/XXXXXXX)) - -### Other changes - -* Updated translations. ([XXXXXXX](https://github.com/ckeditor/ckeditor5-test-package/commit/XXXXXXX)) ([XXXXXXX](https://github.com/ckeditor/ckeditor5-test-package/commit/XXXXXXX)) ([XXXXXXX](https://github.com/ckeditor/ckeditor5-test-package/commit/XXXXXXX)) ([XXXXXXX](https://github.com/ckeditor/ckeditor5-test-package/commit/XXXXXXX)) -` ); - /* eslint-enable max-len */ - - expect( latestChangelog ).to.equal( expectedChangelog.trim() ); - } ); - } ); - } ); - - describe( 'treats "MAJOR BREAKING CHANGES" as "MINOR BREAKING CHANGES"', () => { - it( 'works fine for complex iteration', () => { - return makeInitialRelease() - .then( () => { - makeCommit( 'Feature: Another feature. Closes #2' ); - makeCommit( - 'Feature: Issues will not be hoisted. Closes #8.', - 'All details have been described in #1.', - 'MAJOR BREAKING CHANGES: Breaking change NO 1.' - ); - makeCommit( - 'Merge t/ckeditor5-link/52 into master', - 'Fix: Foo Bar. Closes #9.', - 'MAJOR BREAKING CHANGE: Breaking change NO 2.' - ); - makeCommit( - 'Fix: Amazing fix. Closes #5.', - 'The PR also finally closes #3 and #4. So good!', - 'BREAKING CHANGES: Breaking change NO 3.' - ); - - const options = { - transformCommit: transformCommitForSubRepositoryFactory( { - treatMajorAsMinorBreakingChange: true, - useExplicitBreakingChangeGroups: true - } ) - }; - - return generateChangelog( '1.0.0', options ); - } ) - .then( () => { - const latestChangelog = replaceCommitIds( getChangesForVersion( '1.0.0' ) ); - - /* eslint-disable max-len */ - const expectedChangelog = normalizeStrings( ` -### MINOR BREAKING CHANGES - -* Breaking change NO 3. -* Breaking change NO 2. -* Breaking change NO 1. - -### Features - -* Another feature. Closes [#2](https://github.com/ckeditor/ckeditor5-test-package/issues/2). ([XXXXXXX](https://github.com/ckeditor/ckeditor5-test-package/commit/XXXXXXX)) -* Issues will not be hoisted. Closes [#8](https://github.com/ckeditor/ckeditor5-test-package/issues/8). ([XXXXXXX](https://github.com/ckeditor/ckeditor5-test-package/commit/XXXXXXX)) - - All details have been described in [#1](https://github.com/ckeditor/ckeditor5-test-package/issues/1). - -### Bug fixes - -* Amazing fix. Closes [#5](https://github.com/ckeditor/ckeditor5-test-package/issues/5). ([XXXXXXX](https://github.com/ckeditor/ckeditor5-test-package/commit/XXXXXXX)) - - The PR also finally closes [#3](https://github.com/ckeditor/ckeditor5-test-package/issues/3) and [#4](https://github.com/ckeditor/ckeditor5-test-package/issues/4). So good! -* Foo Bar. Closes [#9](https://github.com/ckeditor/ckeditor5-test-package/issues/9). ([XXXXXXX](https://github.com/ckeditor/ckeditor5-test-package/commit/XXXXXXX)) - ` ); - /* eslint-enable max-len */ - - expect( latestChangelog ).to.equal( expectedChangelog.trim() ); - } ); - } ); - } ); - - describe( 'treats "MAJOR BREAKING CHANGES" and "MINOR BREAKING CHANGES" as "BREAKING CHANGE"', () => { - it( 'works fine for complex iteration', () => { - return makeInitialRelease() - .then( () => { - makeCommit( 'Feature: Another feature. Closes #2' ); - makeCommit( - 'Feature: Issues will not be hoisted. Closes #8.', - 'All details have been described in #1.', - 'MAJOR BREAKING CHANGES: Breaking change NO 1.' - ); - makeCommit( - 'Merge t/ckeditor5-link/52 into master', - 'Fix: Foo Bar. Closes #9.', - 'MINOR BREAKING CHANGE: Breaking change NO 2.' - ); - makeCommit( - 'Fix: Amazing fix. Closes #5.', - 'The PR also finally closes #3 and #4. So good!', - 'BREAKING CHANGES: Breaking change NO 3.' - ); - - return generateChangelog( '1.0.0' ); - } ) - .then( () => { - const latestChangelog = replaceCommitIds( getChangesForVersion( '1.0.0' ) ); - - /* eslint-disable max-len */ - const expectedChangelog = normalizeStrings( ` -### BREAKING CHANGES - -* Breaking change NO 3. -* Breaking change NO 2. -* Breaking change NO 1. - -### Features - -* Another feature. Closes [#2](https://github.com/ckeditor/ckeditor5-test-package/issues/2). ([XXXXXXX](https://github.com/ckeditor/ckeditor5-test-package/commit/XXXXXXX)) -* Issues will not be hoisted. Closes [#8](https://github.com/ckeditor/ckeditor5-test-package/issues/8). ([XXXXXXX](https://github.com/ckeditor/ckeditor5-test-package/commit/XXXXXXX)) - - All details have been described in [#1](https://github.com/ckeditor/ckeditor5-test-package/issues/1). - -### Bug fixes - -* Amazing fix. Closes [#5](https://github.com/ckeditor/ckeditor5-test-package/issues/5). ([XXXXXXX](https://github.com/ckeditor/ckeditor5-test-package/commit/XXXXXXX)) - - The PR also finally closes [#3](https://github.com/ckeditor/ckeditor5-test-package/issues/3) and [#4](https://github.com/ckeditor/ckeditor5-test-package/issues/4). So good! -* Foo Bar. Closes [#9](https://github.com/ckeditor/ckeditor5-test-package/issues/9). ([XXXXXXX](https://github.com/ckeditor/ckeditor5-test-package/commit/XXXXXXX)) - ` ); - /* eslint-enable max-len */ - - expect( latestChangelog ).to.equal( expectedChangelog.trim() ); - } ); - } ); - } ); - } ); - - // Because of the Windows end of the line, we need to normalize them. - // If we won't do it, some of the assertions will fail because strings will be ending with "\r" that wasn't expected. - function normalizeStrings( content ) { - return content.replace( /\r\n/g, '\n' ); - } - - function getChangelog() { - return normalizeStrings( _getChangelog() ); - } - - function getChangesForVersion( version ) { - return normalizeStrings( _getChangesForVersion( version ) ); - } - - function makeCommit( ...messages ) { - return exec( 'git commit --allow-empty ' + messages.map( m => `--message "${ m }"` ).join( ' ' ) ); - } - - function exec( command ) { - return tools.shExec( command, { verbosity: 'error' } ); - } - - function generateChangelog( version, options = {} ) { - return generateChangelogFromCommits( { - version, - isInternalRelease: options.isInternalRelease, - additionalNotes: options.additionalNotes, - skipLinks: options.skipLinks, - newTagName: 'v' + version, - tagName: !options.isFirstRelease ? 'v0.0.1' : null, - transformCommit: options.transformCommit || transformCommitForSubRepositoryFactory() - } ); - } - - // Replaces commits hashes to known string. It allows comparing changelog entries to strings - // which makes the test easier to read. - function replaceCommitIds( changelog ) { - return changelog.replace( /\[[a-z0-9]{7}\]/g, '[XXXXXXX]' ) - .replace( /commit\/[a-z0-9]{7}/g, 'commit/XXXXXXX' ); - } - - // Replaces dates to known string. It allows comparing changelog entries to strings - // which don't depend on the date. - function replaceDates( changelog ) { - return changelog.replace( /\d{4}-\d{2}-\d{2}/g, '0000-00-00' ); - } - - // Almost all testes (except the initial release) require the initial release because we're checking - // how the changelog looks between releases. - function makeInitialRelease() { - makeCommit( 'Internal: An initial commit.' ); - - return generateChangelog( '0.0.1', { isFirstRelease: true } ) - .then( () => { - const version = '0.0.1'; - - exec( `npm version ${ version } --no-git-tag-version` ); - exec( 'git add package.json' ); - makeCommit( `Release: v${ version }.` ); - exec( `git tag v${ version }` ); - } ); - } -} ); diff --git a/packages/ckeditor5-dev-env/tests/release-tools/utils/generatechangelogfromcommits.js b/packages/ckeditor5-dev-env/tests/release-tools/utils/generatechangelogfromcommits.js deleted file mode 100644 index 859de0a46..000000000 --- a/packages/ckeditor5-dev-env/tests/release-tools/utils/generatechangelogfromcommits.js +++ /dev/null @@ -1,323 +0,0 @@ -/** - * @license Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved. - * For licensing, see LICENSE.md. - */ - -'use strict'; - -const fs = require( 'fs' ); -const expect = require( 'chai' ).expect; -const sinon = require( 'sinon' ); -const mockery = require( 'mockery' ); -const proxyquire = require( 'proxyquire' ); -const changelogUtils = require( '../../../lib/release-tools/utils/changelog' ); - -describe( 'dev-env/release-tools/utils', () => { - describe( 'generateChangelogFromCommits()', () => { - let generateChangelogFromCommits, sandbox, stubs, changelogBuffer, conventionalChangelogArguments; - - beforeEach( () => { - sandbox = sinon.createSandbox(); - - stubs = { - conventionalChangelog: sandbox.stub(), - fs: { - existsSync: sandbox.stub( fs, 'existsSync' ) - }, - changelogUtils: { - changelogFile: changelogUtils.changelogFile, - changelogHeader: changelogUtils.changelogHeader, - getChangelog: sandbox.stub(), - saveChangelog: sandbox.stub() - }, - logger: { - info: sandbox.stub(), - warning: sandbox.stub(), - error: sandbox.stub() - }, - getWriterOptions: sandbox.stub(), - transformCommit: sandbox.stub() - }; - - mockery.enable( { - useCleanCache: true, - warnOnReplace: false, - warnOnUnregistered: false - } ); - - stubs.conventionalChangelog.callsFake( ( ...args ) => { - conventionalChangelogArguments = args; - - return new class extends require( 'stream' ).Readable { - _read() { - if ( changelogBuffer instanceof Buffer ) { - this.push( changelogBuffer ); - } - - this.push( null ); - } - }(); - } ); - - mockery.registerMock( 'conventional-changelog', stubs.conventionalChangelog ); - mockery.registerMock( './transform-commit/getwriteroptions', stubs.getWriterOptions ); - - generateChangelogFromCommits = proxyquire( '../../../lib/release-tools/utils/generatechangelogfromcommits', { - './getpackagejson': () => ( { - name: 'test-package', - version: '0.0.1' - } ), - './changelog': stubs.changelogUtils, - '@ckeditor/ckeditor5-dev-utils': { - logger() { - return stubs.logger; - } - } - } ); - } ); - - afterEach( () => { - sandbox.restore(); - mockery.disable(); - conventionalChangelogArguments = null; - } ); - - it( 'creates a changelog file if is not present', () => { - changelogBuffer = Buffer.from( 'Changelog.' ); - - stubs.fs.existsSync.returns( false ); - - stubs.changelogUtils.getChangelog.returns( changelogUtils.changelogHeader ); - - const options = { - version: '1.0.0', - transformCommit: stubs.transformCommit - }; - - return generateChangelogFromCommits( options ) - .then( () => { - expect( stubs.changelogUtils.saveChangelog.calledTwice ).to.equal( true ); - expect( stubs.changelogUtils.saveChangelog.firstCall.args[ 0 ] ) - .to.equal( changelogUtils.changelogHeader ); - - expect( stubs.logger.warning.calledOnce ).to.equal( true ); - expect( stubs.logger.warning.firstCall.args[ 0 ] ) - .to.equal( 'Changelog file does not exist. Creating...' ); - } ); - } ); - - it( 'does not create a changelog file if is not present but the "doNotSave" option is set on `true`', () => { - changelogBuffer = Buffer.from( 'Changelog.' ); - - stubs.fs.existsSync.returns( false ); - - stubs.changelogUtils.getChangelog.returns( changelogUtils.changelogHeader ); - - const options = { - version: '1.0.0', - transformCommit: stubs.transformCommit, - doNotSave: true - }; - - return generateChangelogFromCommits( options ) - .then( () => { - expect( stubs.changelogUtils.saveChangelog.called ).to.equal( false ); - } ); - } ); - - it( 'generates the changelog for given version', () => { - const newChangelogChunk = [ - '## 1.0.0', - '', - '### Features', - '', - '* This test should pass!' - ].join( '\n' ); - - changelogBuffer = Buffer.from( newChangelogChunk ); - - stubs.fs.existsSync.returns( true ); - - stubs.changelogUtils.getChangelog.returns( changelogUtils.changelogHeader ); - - stubs.getWriterOptions.returns( { foo: 'bar' } ); - - const options = { - version: '1.0.0', - transformCommit: stubs.transformCommit, - tagName: 'v0.5.0', - newTagName: 'v1.0.0' - }; - - return generateChangelogFromCommits( options ) - .then( () => { - expect( stubs.getWriterOptions.calledOnce ).to.equal( true ); - expect( stubs.getWriterOptions.firstCall.args[ 0 ] ).to.equal( stubs.transformCommit ); - - expect( conventionalChangelogArguments ).to.be.an( 'array' ); - expect( conventionalChangelogArguments[ 1 ] ).to.deep.equal( { - version: '1.0.0', - previousTag: 'v0.5.0', - currentTag: 'v1.0.0', - isInternalRelease: false, - additionalNotes: {}, - skipCommitsLink: false, - skipCompareLink: false - } ); - expect( conventionalChangelogArguments[ 2 ] ).to.have.property( 'from', 'v0.5.0' ); - expect( conventionalChangelogArguments[ 4 ] ).to.deep.equal( { foo: 'bar' } ); - - const newChangelog = changelogUtils.changelogHeader + newChangelogChunk + '\n'; - - expect( stubs.changelogUtils.saveChangelog.calledOnce ).to.equal( true ); - expect( stubs.changelogUtils.saveChangelog.firstCall.args[ 0 ] ).to.equal( newChangelog ); - } ); - } ); - - it( 'allows generating "internal" release', () => { - changelogBuffer = Buffer.from( 'Internal changes only (updated dependencies, documentation, etc.).' ); - - stubs.fs.existsSync.returns( true ); - stubs.changelogUtils.getChangelog.returns( changelogUtils.changelogHeader ); - - const options = { - version: '0.5.1', - transformCommit: stubs.transformCommit, - tagName: 'v0.5.0', - newTagName: 'v0.5.1', - isInternalRelease: true - }; - - return generateChangelogFromCommits( options ) - .then( () => { - expect( conventionalChangelogArguments ).to.be.an( 'array' ); - expect( conventionalChangelogArguments[ 1 ] ).to.deep.equal( { - version: '0.5.1', - previousTag: 'v0.5.0', - currentTag: 'v0.5.1', - isInternalRelease: true, - additionalNotes: {}, - skipCommitsLink: false, - skipCompareLink: false - } ); - } ); - } ); - - it( 'allows returning the changes instead of saving them', () => { - const newChangelogChunk = [ - '## 1.0.0', - '', - '### Features', - '', - '* This test should pass!' - ].join( '\n' ); - - changelogBuffer = Buffer.from( newChangelogChunk ); - - stubs.fs.existsSync.returns( true ); - - stubs.getWriterOptions.returns( { foo: 'bar' } ); - - const options = { - version: '1.0.0', - transformCommit: stubs.transformCommit, - tagName: 'v0.5.0', - newTagName: 'v1.0.0', - doNotSave: true - }; - - return generateChangelogFromCommits( options ) - .then( returnedChanges => { - expect( returnedChanges ).to.equal( newChangelogChunk ); - } ); - } ); - - it( 'allows appending additional notes for groups of commits', () => { - changelogBuffer = Buffer.from( 'Changelog.' ); - - stubs.fs.existsSync.returns( true ); - stubs.changelogUtils.getChangelog.returns( changelogUtils.changelogHeader ); - - const options = { - version: '0.5.1', - transformCommit: stubs.transformCommit, - tagName: 'v0.5.0', - newTagName: 'v0.5.1', - isInternalRelease: false, - additionalNotes: true - }; - - return generateChangelogFromCommits( options ) - .then( () => { - const { additionalCommitNotes } = require( '../../../lib/release-tools/utils/transform-commit/transform-commit-utils' ); - - expect( conventionalChangelogArguments ).to.be.an( 'array' ); - expect( conventionalChangelogArguments[ 1 ] ).to.deep.equal( { - version: '0.5.1', - previousTag: 'v0.5.0', - currentTag: 'v0.5.1', - isInternalRelease: false, - additionalNotes: additionalCommitNotes, - skipCommitsLink: false, - skipCompareLink: false - } ); - } ); - } ); - - it( 'allows generating changelog without links to commits ("skipLinks" option)', () => { - changelogBuffer = Buffer.from( 'Changelog.' ); - - stubs.fs.existsSync.returns( true ); - stubs.changelogUtils.getChangelog.returns( changelogUtils.changelogHeader ); - - const options = { - version: '0.5.1', - transformCommit: stubs.transformCommit, - tagName: 'v0.5.0', - newTagName: 'v0.5.1', - skipLinks: true - }; - - return generateChangelogFromCommits( options ) - .then( () => { - expect( conventionalChangelogArguments ).to.be.an( 'array' ); - expect( conventionalChangelogArguments[ 1 ] ).to.deep.equal( { - version: '0.5.1', - previousTag: 'v0.5.0', - currentTag: 'v0.5.1', - isInternalRelease: false, - additionalNotes: {}, - skipCommitsLink: true, - skipCompareLink: true - } ); - } ); - } ); - - it( 'calls the changelog stream pipes once', () => { - stubs.conventionalChangelog.reset(); - stubs.conventionalChangelog.callsFake( () => { - return new class extends require( 'stream' ).Readable { - _read() { - this.push( Buffer.from( 'Changelog.' ) ); - } - }(); - } ); - - stubs.fs.existsSync.returns( true ); - stubs.changelogUtils.getChangelog.returns( changelogUtils.changelogHeader ); - - const options = { - version: '0.5.1', - transformCommit: stubs.transformCommit, - tagName: 'v0.5.0', - newTagName: 'v0.5.1', - skipLinks: true - }; - - return generateChangelogFromCommits( options ) - .then( () => { - expect( stubs.changelogUtils.saveChangelog.callCount ).to.equal( 1 ); - } ); - } ); - } ); -} ); diff --git a/packages/ckeditor5-dev-env/tests/release-tools/utils/transform-commit/getchangedfilesforcommit.js b/packages/ckeditor5-dev-env/tests/release-tools/utils/getchangedfilesforcommit.js similarity index 97% rename from packages/ckeditor5-dev-env/tests/release-tools/utils/transform-commit/getchangedfilesforcommit.js rename to packages/ckeditor5-dev-env/tests/release-tools/utils/getchangedfilesforcommit.js index 5de0a4b38..fd4c76dce 100644 --- a/packages/ckeditor5-dev-env/tests/release-tools/utils/transform-commit/getchangedfilesforcommit.js +++ b/packages/ckeditor5-dev-env/tests/release-tools/utils/getchangedfilesforcommit.js @@ -35,7 +35,7 @@ describe( 'dev-env/release-tools/utils/transform-commit', () => { exec( 'git config user.name "CKEditor5 CI"' ); } - getChangedFilesForCommit = require( '../../../../lib/release-tools/utils/transform-commit/getchangedfilesforcommit' ); + getChangedFilesForCommit = require( '../../../lib/release-tools/utils/getchangedfilesforcommit' ); } ); afterEach( () => { diff --git a/packages/ckeditor5-dev-env/tests/release-tools/utils/getcommits.js b/packages/ckeditor5-dev-env/tests/release-tools/utils/getcommits.js new file mode 100644 index 000000000..17380bca8 --- /dev/null +++ b/packages/ckeditor5-dev-env/tests/release-tools/utils/getcommits.js @@ -0,0 +1,169 @@ +/** + * @license Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */ + +'use strict'; + +const fs = require( 'fs' ); +const path = require( 'path' ); +const sinon = require( 'sinon' ); +const expect = require( 'chai' ).expect; +const { tools } = require( '@ckeditor/ckeditor5-dev-utils' ); +const getCommits = require( '../../../lib/release-tools/utils/getcommits' ); + +describe( 'dev-env/release-tools/utils', () => { + let tmpCwd, cwd, transformCommit; + + describe( 'getNewReleaseType()', () => { + before( () => { + cwd = process.cwd(); + tmpCwd = fs.mkdtempSync( __dirname + path.sep ); + } ); + + after( () => { + exec( `rm -rf ${ tmpCwd }` ); + } ); + + beforeEach( () => { + process.chdir( tmpCwd ); + + exec( 'git init' ); + + if ( process.env.CI ) { + exec( 'git config user.email "ckeditor5@ckeditor.com"' ); + exec( 'git config user.name "CKEditor5 CI"' ); + } + + // Do not modify the commit. + transformCommit = commit => commit; + } ); + + afterEach( () => { + process.chdir( cwd ); + exec( `rm -rf ${ path.join( tmpCwd, '.git' ) }` ); + } ); + + it( 'throws an error when repository is empty', () => { + return getCommits( transformCommit ) + .then( + () => { + throw new Error( 'Supposed to be rejected.' ); + }, + err => { + expect( err.message ).to.equal( 'Given repository is empty.' ); + } + ); + } ); + + it( 'throws an error when repository is empty', () => { + return getCommits( transformCommit, { from: 'foobar' } ) + .then( + () => { + throw new Error( 'Supposed to be rejected.' ); + }, + err => { + expect( err.message ).to.equal( 'Cannot find tag or commit "foobar" in given repository.' ); + } + ); + } ); + + it( 'returns an array of commits after "git init"', () => { + exec( 'git commit --allow-empty --message "First."' ); + exec( 'git commit --allow-empty --message "Second."' ); + + return getCommits( transformCommit ) + .then( commits => { + expect( commits.length ).to.equal( 2 ); + expect( commits[ 0 ].header ).to.equal( 'Second.' ); + expect( commits[ 1 ].header ).to.equal( 'First.' ); + } ); + } ); + + it( 'returns an array of commits after "git init" if `options.from` is not specified', () => { + exec( 'git commit --allow-empty --message "First."' ); + exec( 'git commit --allow-empty --message "Second."' ); + exec( 'git tag v1.0.0' ); + exec( 'git commit --allow-empty --message "Third."' ); + exec( 'git commit --allow-empty --message "Fourth."' ); + + return getCommits( transformCommit ) + .then( commits => { + expect( commits.length ).to.equal( 4 ); + expect( commits[ 0 ].header ).to.equal( 'Fourth.' ); + expect( commits[ 1 ].header ).to.equal( 'Third.' ); + expect( commits[ 2 ].header ).to.equal( 'Second.' ); + expect( commits[ 3 ].header ).to.equal( 'First.' ); + } ); + } ); + + it( 'returns an array of commits since last tag (`options.from` is specified)', () => { + exec( 'git commit --allow-empty --message "First."' ); + exec( 'git commit --allow-empty --message "Second."' ); + exec( 'git tag v1.0.0' ); + exec( 'git commit --allow-empty --message "Third."' ); + exec( 'git commit --allow-empty --message "Fourth."' ); + + return getCommits( transformCommit, { from: 'v1.0.0' } ) + .then( commits => { + expect( commits.length ).to.equal( 2 ); + expect( commits[ 0 ].header ).to.equal( 'Fourth.' ); + expect( commits[ 1 ].header ).to.equal( 'Third.' ); + } ); + } ); + + it( 'returns an array of commits since specified commit (`options.from` is specified)', () => { + exec( 'git commit --allow-empty --message "First."' ); + exec( 'git commit --allow-empty --message "Second."' ); + exec( 'git tag v1.0.0' ); + exec( 'git commit --allow-empty --message "Third."' ); + + const commitId = exec( 'git rev-parse HEAD' ).trim(); + + exec( 'git commit --allow-empty --message "Fourth."' ); + + return getCommits( transformCommit, { from: commitId } ) + .then( commits => { + expect( commits.length ).to.equal( 1 ); + expect( commits[ 0 ].header ).to.equal( 'Fourth.' ); + } ); + } ); + + it( 'ignores false values returned by the "transformCommit" mapper', () => { + const transformCommit = sinon.stub(); + + transformCommit.onFirstCall().callsFake( commit => commit ); + transformCommit.onSecondCall().callsFake( () => null ); + + exec( 'git commit --allow-empty --message "First."' ); + exec( 'git commit --allow-empty --message "Second."' ); + + return getCommits( transformCommit ) + .then( commits => { + expect( commits.length ).to.equal( 1 ); + expect( commits[ 0 ].header ).to.equal( 'Second.' ); + } ); + } ); + + it( 'handles arrays returned by the "transformCommit" mapper', () => { + const transformCommit = sinon.stub(); + + transformCommit.onFirstCall().callsFake( commit => { + return [ commit, commit ]; + } ); + + exec( 'git commit --allow-empty --message "First."' ); + + return getCommits( transformCommit ) + .then( commits => { + expect( commits.length ).to.equal( 2 ); + expect( commits[ 0 ].header ).to.equal( 'First.' ); + expect( commits[ 1 ].header ).to.equal( 'First.' ); + } ); + } ); + } ); + + function exec( command ) { + return tools.shExec( command, { verbosity: 'error' } ); + } +} ); diff --git a/packages/ckeditor5-dev-env/tests/release-tools/utils/getnewreleasetype.js b/packages/ckeditor5-dev-env/tests/release-tools/utils/getnewreleasetype.js deleted file mode 100644 index ae2528c41..000000000 --- a/packages/ckeditor5-dev-env/tests/release-tools/utils/getnewreleasetype.js +++ /dev/null @@ -1,259 +0,0 @@ -/** - * @license Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved. - * For licensing, see LICENSE.md. - */ - -'use strict'; - -const fs = require( 'fs' ); -const path = require( 'path' ); -const expect = require( 'chai' ).expect; -const sinon = require( 'sinon' ); -const proxyquire = require( 'proxyquire' ); -const { tools } = require( '@ckeditor/ckeditor5-dev-utils' ); - -describe( 'dev-env/release-tools/utils', () => { - let tmpCwd, cwd, getNewReleaseType, sandbox, packageJson, stubs; - - describe( 'getNewReleaseType()', () => { - before( () => { - cwd = process.cwd(); - tmpCwd = fs.mkdtempSync( __dirname + path.sep ); - } ); - - after( () => { - exec( `rm -rf ${ tmpCwd }` ); - } ); - - beforeEach( () => { - sandbox = sinon.createSandbox(); - - stubs = { - transformCommit: sandbox.stub().callsFake( commit => { - commit.rawType = commit.type; - - return commit; - } ), - versionUtils: { - getLastFromChangelog: sandbox.stub() - } - }; - - process.chdir( tmpCwd ); - - exec( 'git init' ); - - if ( process.env.CI ) { - exec( 'git config user.email "ckeditor5@ckeditor.com"' ); - exec( 'git config user.name "CKEditor5 CI"' ); - } - - packageJson = { - name: 'test-package', - bugs: 'some-url' - }; - - fs.writeFileSync( path.join( tmpCwd, 'package.json' ), JSON.stringify( packageJson, null, '\t' ) ); - - getNewReleaseType = proxyquire( '../../../lib/release-tools/utils/getnewreleasetype', { - './versions': stubs.versionUtils - } ); - } ); - - afterEach( () => { - process.chdir( cwd ); - exec( `rm -rf ${ path.join( tmpCwd, '.git' ) }` ); - - sandbox.restore(); - } ); - - it( 'throws an error when repository is empty', () => { - return getNewReleaseType( stubs.transformCommit ) - .then( - () => { - throw new Error( 'Supposed to be rejected.' ); - }, - err => { - expect( err.message ).to.equal( 'Given repository is empty.' ); - } - ); - } ); - - it( 'returns "skip" release for invalid commits', () => { - exec( 'git commit --allow-empty --message "Foo Bar."' ); - exec( 'git commit --allow-empty --message "Foo Bar even more..."' ); - - stubs.transformCommit.returns( undefined ); - - return getNewReleaseType( stubs.transformCommit ) - .then( response => { - expect( response.releaseType ).to.equal( 'skip' ); - expect( response.commits ).to.be.an( 'Array' ); - expect( response.commits.length ).to.equal( 0 ); - } ); - } ); - - it( 'returns "patch" release for non-feature commits', () => { - exec( 'git commit --allow-empty --message "Fix: Some fix."' ); - exec( 'git commit --allow-empty --message "Other: Some change."' ); - - return getNewReleaseType( stubs.transformCommit ) - .then( response => { - expect( response.releaseType ).to.equal( 'patch' ); - expect( response.commits.length ).to.equal( 2 ); - } ); - } ); - - it( 'ignores notes from commits which will not be included in changelog (MAJOR BREAKING CHANGES)', () => { - exec( 'git commit --allow-empty --message "Fix: Some fix."' ); - exec( 'git commit --allow-empty --message "Docs: Nothing." --message "MAJOR BREAKING CHANGES: It should not bump the major."' ); - - return getNewReleaseType( stubs.transformCommit ) - .then( response => { - expect( response.releaseType ).to.equal( 'patch' ); - expect( response.commits.length ).to.equal( 2 ); - } ); - } ); - - it( 'ignores notes from commits which will not be included in changelog (MINOR BREAKING CHANGES)', () => { - exec( 'git commit --allow-empty --message "Fix: Some fix."' ); - exec( 'git commit --allow-empty --message "Docs: Nothing." --message "MINOR BREAKING CHANGES: It should not bump the major."' ); - - return getNewReleaseType( stubs.transformCommit ) - .then( response => { - expect( response.releaseType ).to.equal( 'patch' ); - expect( response.commits.length ).to.equal( 2 ); - } ); - } ); - - it( 'returns "minor" release for feature commit', () => { - exec( 'git commit --allow-empty --message "Fix: Some fix."' ); - exec( 'git commit --allow-empty --message "Feature: Nothing new."' ); - - return getNewReleaseType( stubs.transformCommit ) - .then( response => { - expect( response.releaseType ).to.equal( 'minor' ); - expect( response.commits.length ).to.equal( 2 ); - } ); - } ); - - it( 'returns "major" if any visible in changelog commit has breaking changes', () => { - exec( 'git commit --allow-empty --message "Fix: Some fix."' ); - exec( 'git commit --allow-empty --message "Feature: Nothing new."' ); - exec( 'git commit --allow-empty --message "Other: Nothing." --message "MAJOR BREAKING CHANGES: Bump the major!"' ); - - return getNewReleaseType( stubs.transformCommit ) - .then( response => { - expect( response.releaseType ).to.equal( 'major' ); - expect( response.commits.length ).to.equal( 3 ); - } ); - } ); - - it( 'returns "major" even if "MINOR BREAKING CHANGE" was found first', () => { - exec( 'git commit --allow-empty --message "Fix: Some fix."' ); - exec( 'git commit --allow-empty --message "Feature: Nothing new." --message "MINOR BREAKING CHANGES: Bump the minor!"' ); - exec( 'git commit --allow-empty --message "Other: Nothing." --message "MAJOR BREAKING CHANGES: Bump the major!"' ); - - return getNewReleaseType( stubs.transformCommit ) - .then( response => { - expect( response.releaseType ).to.equal( 'major' ); - expect( response.commits.length ).to.equal( 3 ); - } ); - } ); - - it( 'returns "minor" when found "MINOR BREAKING CHANGES" in features commits', () => { - exec( 'git commit --allow-empty --message "Fix: Some fix."' ); - exec( 'git commit --allow-empty --message "Feature: Nothing new." --message "MINOR BREAKING CHANGES: Bump the minor!"' ); - - return getNewReleaseType( stubs.transformCommit ) - .then( response => { - expect( response.releaseType ).to.equal( 'minor' ); - expect( response.commits.length ).to.equal( 2 ); - } ); - } ); - - it( 'returns "minor" when found "MINOR BREAKING CHANGES" in fixes commits', () => { - exec( 'git commit --allow-empty --message "Fix: Some fix." --message "MINOR BREAKING CHANGES: Bump the minor!"' ); - exec( 'git commit --allow-empty --message "Fix: Some other fix." --message "MINOR BREAKING CHANGES: Moved utils outside."' ); - - return getNewReleaseType( stubs.transformCommit ) - .then( response => { - expect( response.releaseType ).to.equal( 'minor' ); - expect( response.commits.length ).to.equal( 2 ); - } ); - } ); - - it( 'returns "minor" when found "MINOR BREAKING CHANGES" in "Other" commits', () => { - exec( 'git commit --allow-empty --message "Other: Updated whatever." --message "MINOR BREAKING CHANGES: Bump the minor!"' ); - - return getNewReleaseType( stubs.transformCommit ) - .then( response => { - expect( response.releaseType ).to.equal( 'minor' ); - expect( response.commits.length ).to.equal( 1 ); - } ); - } ); - - it( 'returns "skip" if there is no commit since the last release', () => { - exec( 'git commit --allow-empty --message "Other: Nothing." --message "MAJOR BREAKING CHANGES: Bump the major!"' ); - exec( 'git tag v1.0.0' ); - - return getNewReleaseType( stubs.transformCommit, { tagName: 'v1.0.0' } ) - .then( response => { - expect( response.releaseType ).to.equal( 'skip' ); - expect( response.commits.length ).to.equal( 0 ); - } ); - } ); - - it( 'returns "internal" release for internal commits since the last release', () => { - exec( 'git commit --allow-empty --message "Fix: Some fix."' ); - exec( 'git tag v1.0.0' ); - exec( 'git commit --allow-empty --message "Docs: Added some notes to README #1."' ); - exec( 'git commit --allow-empty --message "Docs: Added some notes to README #2."' ); - exec( 'git commit --allow-empty --message "Docs: Added some notes to README #3."' ); - - return getNewReleaseType( stubs.transformCommit, { tagName: 'v1.0.0' } ) - .then( response => { - expect( response.releaseType ).to.equal( 'internal' ); - expect( response.commits.length ).to.equal( 3 ); - } ); - } ); - - it( 'transforms each commit since the last release', () => { - exec( 'git commit --allow-empty --message "Feature: Nothing new."' ); - exec( 'git commit --allow-empty --message "Other: Nothing." --message "MAJOR BREAKING CHANGES: Bump the major!"' ); - exec( 'git tag v1.0.0' ); - exec( 'git commit --allow-empty --message "Docs: Added some notes to README #1."' ); - exec( 'git commit --allow-empty --message "Other: Nothing."' ); - exec( 'git commit --allow-empty --message "Docs: Added some notes to README #2."' ); - - return getNewReleaseType( stubs.transformCommit, { tagName: 'v1.0.0' } ) - .then( () => { - // transformCommit should be called for commits: - // (1) Docs: Added some notes to README #1. - // (2) Other: Nothing. - // (3) Docs: Added some notes to README #2. - expect( stubs.transformCommit.calledThrice ).to.equal( true ); - } ); - } ); - - it( 'throws an error when given tag does not exist', () => { - exec( 'git commit --allow-empty --message "Fix: Some fix."' ); - - return getNewReleaseType( stubs.transformCommit, { tagName: 'v1.1.2' } ) - .then( - () => { - throw new Error( 'Supposed to be rejected.' ); - }, - err => { - const message = 'Cannot find tag "v1.1.2" (the latest version' + - ' from the changelog) in given repository.'; - expect( err.message ).to.equal( message ); - } - ); - } ); - } ); - - function exec( command ) { - return tools.shExec( command, { verbosity: 'error' } ); - } -} ); diff --git a/packages/ckeditor5-dev-env/tests/release-tools/utils/getnewversiontype.js b/packages/ckeditor5-dev-env/tests/release-tools/utils/getnewversiontype.js new file mode 100644 index 000000000..93ac1b63e --- /dev/null +++ b/packages/ckeditor5-dev-env/tests/release-tools/utils/getnewversiontype.js @@ -0,0 +1,98 @@ +/** + * @license Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */ + +'use strict'; + +const expect = require( 'chai' ).expect; +const getNewVersionType = require( '../../../lib/release-tools/utils/getnewversiontype' ); + +describe( 'dev-env/release-tools/utils', () => { + describe( 'getSubPackagesPaths()', () => { + it( 'returns "skip" when passing an empty array of commits', () => { + expect( getNewVersionType( [] ) ).to.equal( 'skip' ); + } ); + + it( 'returns "internal" when passing non-public commits', () => { + expect( getNewVersionType( [ { isPublicCommit: false } ] ) ).to.equal( 'internal' ); + } ); + + it( 'returns "major" if MAJOR BREAKING CHANGES was introduced in "type:Other" commit', () => { + const commits = [ + { isPublicCommit: true, notes: [ { title: 'MAJOR BREAKING CHANGES' } ], rawType: 'Other' } + ]; + expect( getNewVersionType( commits ) ).to.equal( 'major' ); + } ); + + it( 'returns "major" if MAJOR BREAKING CHANGES was introduced in "type:Fix" commit', () => { + const commits = [ + { isPublicCommit: true, notes: [ { title: 'MAJOR BREAKING CHANGES' } ], rawType: 'Fix' } + ]; + expect( getNewVersionType( commits ) ).to.equal( 'major' ); + } ); + + it( 'returns "major" if MAJOR BREAKING CHANGES was introduced in "type:Feature" commit', () => { + const commits = [ + { isPublicCommit: true, notes: [ { title: 'MAJOR BREAKING CHANGES' } ], rawType: 'Feature' } + ]; + expect( getNewVersionType( commits ) ).to.equal( 'major' ); + } ); + + it( 'returns "minor" if MINOR BREAKING CHANGES was introduced in "type:Other" commit', () => { + const commits = [ + { isPublicCommit: true, notes: [ { title: 'MINOR BREAKING CHANGES' } ], rawType: 'Other' } + ]; + expect( getNewVersionType( commits ) ).to.equal( 'minor' ); + } ); + + it( 'returns "minor" if MINOR BREAKING CHANGES was introduced in "type:Fix" commit', () => { + const commits = [ + { isPublicCommit: true, notes: [ { title: 'MINOR BREAKING CHANGES' } ], rawType: 'Fix' } + ]; + expect( getNewVersionType( commits ) ).to.equal( 'minor' ); + } ); + + it( 'returns "minor" if MINOR BREAKING CHANGES was introduced in "type:Feature" commit', () => { + const commits = [ + { isPublicCommit: true, notes: [ { title: 'MINOR BREAKING CHANGES' } ], rawType: 'Feature' } + ]; + expect( getNewVersionType( commits ) ).to.equal( 'minor' ); + } ); + + it( 'returns "minor" if found "type:Feature" commit in the collection', () => { + const commits = [ + { isPublicCommit: true, notes: [], rawType: 'Fix' }, + { isPublicCommit: true, notes: [], rawType: 'Other' }, + { isPublicCommit: false, notes: [], rawType: 'Docs' }, + { isPublicCommit: true, notes: [], rawType: 'Feature' } + ]; + expect( getNewVersionType( commits ) ).to.equal( 'minor' ); + } ); + + it( 'returns "major" if found "MAJOR BREAKING CHANGES" commit in the collection', () => { + const commits = [ + { isPublicCommit: true, notes: [], rawType: 'Fix' }, + { isPublicCommit: true, notes: [], rawType: 'Other' }, + { isPublicCommit: false, notes: [], rawType: 'Docs' }, + { + isPublicCommit: true, + notes: [ + { title: 'MINOR BREAKING CHANGES' }, + { title: 'MAJOR BREAKING CHANGES' } + ], + rawType: 'Feature' + } + ]; + expect( getNewVersionType( commits ) ).to.equal( 'major' ); + } ); + + it( 'returns "patch" if no breaking changes or features commits were made', () => { + const commits = [ + { isPublicCommit: true, notes: [], rawType: 'Fix' }, + { isPublicCommit: true, notes: [], rawType: 'Other' } + ]; + expect( getNewVersionType( commits ) ).to.equal( 'patch' ); + } ); + } ); +} ); diff --git a/packages/ckeditor5-dev-env/tests/release-tools/utils/getsubpackagespaths.js b/packages/ckeditor5-dev-env/tests/release-tools/utils/getpackagespaths.js similarity index 74% rename from packages/ckeditor5-dev-env/tests/release-tools/utils/getsubpackagespaths.js rename to packages/ckeditor5-dev-env/tests/release-tools/utils/getpackagespaths.js index aee6381f5..a9d99afaf 100644 --- a/packages/ckeditor5-dev-env/tests/release-tools/utils/getsubpackagespaths.js +++ b/packages/ckeditor5-dev-env/tests/release-tools/utils/getpackagespaths.js @@ -11,9 +11,8 @@ const sinon = require( 'sinon' ); const proxyquire = require( 'proxyquire' ); describe( 'dev-env/release-tools/utils', () => { - describe( 'getSubPackagesPaths()', () => { - let getSubPackagesPaths, sandbox, getPackageJsonStub, - getDirectoriesStub; + describe( 'getPackagesPaths()', () => { + let getPackagesPaths, sandbox, getPackageJsonStub, getDirectoriesStub; beforeEach( () => { sandbox = sinon.createSandbox(); @@ -23,7 +22,7 @@ describe( 'dev-env/release-tools/utils', () => { sandbox.stub( path, 'join' ).callsFake( ( ...chunks ) => chunks.join( '/' ) ); - getSubPackagesPaths = proxyquire( '../../../lib/release-tools/utils/getsubpackagespaths', { + getPackagesPaths = proxyquire( '../../../lib/release-tools/utils/getpackagespaths', { './getpackagejson': getPackageJsonStub, '@ckeditor/ckeditor5-dev-utils': { tools: { @@ -51,11 +50,11 @@ describe( 'dev-env/release-tools/utils', () => { skipMainRepository: true }; - getPackageJsonStub.onFirstCall().returns( { name: '@ckeditor/ckeditor5-core' } ); - getPackageJsonStub.onSecondCall().returns( { name: '@ckeditor/ckeditor5-engine' } ); - getPackageJsonStub.onThirdCall().returns( { name: '@ckeditor/ckeditor5-utils' } ); + getPackageJsonStub.onCall( 0 ).returns( { name: '@ckeditor/ckeditor5-core' } ); + getPackageJsonStub.onCall( 1 ).returns( { name: '@ckeditor/ckeditor5-engine' } ); + getPackageJsonStub.onCall( 2 ).returns( { name: '@ckeditor/ckeditor5-utils' } ); - const pathsCollection = getSubPackagesPaths( options ); + const pathsCollection = getPackagesPaths( options ); expect( pathsCollection.matched ).to.be.instanceof( Set ); expect( pathsCollection.matched.size ).to.equal( 3 ); @@ -63,11 +62,12 @@ describe( 'dev-env/release-tools/utils', () => { expect( pathsCollection.matched.has( '/tmp/packages/ckeditor5-engine' ) ).to.equal( true ); expect( pathsCollection.matched.has( '/tmp/packages/ckeditor5-utils' ) ).to.equal( true ); + expect( pathsCollection.skipped ).to.be.instanceof( Set ); expect( pathsCollection.skipped.size ).to.equal( 1 ); expect( pathsCollection.skipped.has( '/tmp' ) ).to.equal( true ); } ); - it( 'allows ignoring specified packages', () => { + it( 'allows ignoring specified packages (specified as array)', () => { getDirectoriesStub.returns( [ 'ckeditor5-core', 'ckeditor5-engine', @@ -83,19 +83,19 @@ describe( 'dev-env/release-tools/utils', () => { skipMainRepository: true }; - getPackageJsonStub.onFirstCall().returns( { name: '@ckeditor/ckeditor5-core' } ); - getPackageJsonStub.onSecondCall().returns( { name: '@ckeditor/ckeditor5-engine' } ); - getPackageJsonStub.onThirdCall().returns( { name: '@ckeditor/ckeditor5-utils' } ); + getPackageJsonStub.onCall( 0 ).returns( { name: '@ckeditor/ckeditor5-core' } ); + getPackageJsonStub.onCall( 1 ).returns( { name: '@ckeditor/ckeditor5-engine' } ); + getPackageJsonStub.onCall( 2 ).returns( { name: '@ckeditor/ckeditor5-utils' } ); - const pathsCollection = getSubPackagesPaths( options ); + const pathsCollection = getPackagesPaths( options ); expect( pathsCollection.matched ).to.be.instanceof( Set ); expect( pathsCollection.matched.size ).to.equal( 2 ); expect( pathsCollection.skipped ).to.be.instanceof( Set ); expect( pathsCollection.skipped.size ).to.equal( 2 ); - expect( pathsCollection.skipped.has( '/tmp' ) ).to.equal( true ); expect( pathsCollection.skipped.has( '/tmp/packages/ckeditor5-utils' ) ).to.equal( true ); + expect( pathsCollection.skipped.has( '/tmp' ) ).to.equal( true ); } ); it( 'allows ignoring specified packages (specified as string)', () => { @@ -111,20 +111,19 @@ describe( 'dev-env/release-tools/utils', () => { skipPackages: '@ckeditor/ckeditor5-u*', skipMainRepository: true }; + getPackageJsonStub.onCall( 0 ).returns( { name: '@ckeditor/ckeditor5-core' } ); + getPackageJsonStub.onCall( 1 ).returns( { name: '@ckeditor/ckeditor5-engine' } ); + getPackageJsonStub.onCall( 2 ).returns( { name: '@ckeditor/ckeditor5-utils' } ); - getPackageJsonStub.onFirstCall().returns( { name: '@ckeditor/ckeditor5-core' } ); - getPackageJsonStub.onSecondCall().returns( { name: '@ckeditor/ckeditor5-engine' } ); - getPackageJsonStub.onThirdCall().returns( { name: '@ckeditor/ckeditor5-utils' } ); - - const pathsCollection = getSubPackagesPaths( options ); + const pathsCollection = getPackagesPaths( options ); expect( pathsCollection.matched ).to.be.instanceof( Set ); expect( pathsCollection.matched.size ).to.equal( 2 ); expect( pathsCollection.skipped ).to.be.instanceof( Set ); expect( pathsCollection.skipped.size ).to.equal( 2 ); - expect( pathsCollection.skipped.has( '/tmp' ) ).to.equal( true ); expect( pathsCollection.skipped.has( '/tmp/packages/ckeditor5-utils' ) ).to.equal( true ); + expect( pathsCollection.skipped.has( '/tmp' ) ).to.equal( true ); } ); it( 'allows restricting the scope for packages', () => { @@ -150,7 +149,7 @@ describe( 'dev-env/release-tools/utils', () => { getPackageJsonStub.onCall( 3 ).returns( { name: '@ckeditor/ckeditor5-build-classic' } ); getPackageJsonStub.onCall( 4 ).returns( { name: '@ckeditor/ckeditor5-build-inline' } ); - const pathsCollection = getSubPackagesPaths( options ); + const pathsCollection = getPackagesPaths( options ); expect( pathsCollection.matched ).to.be.instanceof( Set ); expect( pathsCollection.matched.size ).to.equal( 2 ); @@ -159,10 +158,10 @@ describe( 'dev-env/release-tools/utils', () => { expect( pathsCollection.skipped ).to.be.instanceof( Set ); expect( pathsCollection.skipped.size ).to.equal( 4 ); - expect( pathsCollection.skipped.has( '/tmp' ) ).to.equal( true ); expect( pathsCollection.skipped.has( '/tmp/packages/ckeditor5-core' ) ).to.equal( true ); expect( pathsCollection.skipped.has( '/tmp/packages/ckeditor5-engine' ) ).to.equal( true ); expect( pathsCollection.skipped.has( '/tmp/packages/ckeditor5-utils' ) ).to.equal( true ); + expect( pathsCollection.skipped.has( '/tmp' ) ).to.equal( true ); } ); it( 'allows restricting the scope for packages and works fine with "skipPackages" option', () => { @@ -190,7 +189,7 @@ describe( 'dev-env/release-tools/utils', () => { getPackageJsonStub.onCall( 3 ).returns( { name: '@ckeditor/ckeditor5-build-classic' } ); getPackageJsonStub.onCall( 4 ).returns( { name: '@ckeditor/ckeditor5-build-inline' } ); - const pathsCollection = getSubPackagesPaths( options ); + const pathsCollection = getPackagesPaths( options ); expect( pathsCollection.matched ).to.be.instanceof( Set ); expect( pathsCollection.matched.size ).to.equal( 1 ); @@ -198,39 +197,50 @@ describe( 'dev-env/release-tools/utils', () => { expect( pathsCollection.skipped ).to.be.instanceof( Set ); expect( pathsCollection.skipped.size ).to.equal( 5 ); - expect( pathsCollection.skipped.has( '/tmp' ) ).to.equal( true ); expect( pathsCollection.skipped.has( '/tmp/packages/ckeditor5-core' ) ).to.equal( true ); expect( pathsCollection.skipped.has( '/tmp/packages/ckeditor5-engine' ) ).to.equal( true ); expect( pathsCollection.skipped.has( '/tmp/packages/ckeditor5-utils' ) ).to.equal( true ); expect( pathsCollection.skipped.has( '/tmp/packages/ckeditor5-build-inline' ) ).to.equal( true ); + expect( pathsCollection.skipped.has( '/tmp' ) ).to.equal( true ); } ); it( 'allows returning the main repository', () => { getDirectoriesStub.returns( [ 'ckeditor5-core', 'ckeditor5-engine', - 'ckeditor5-utils' + 'ckeditor5-utils', + 'ckeditor5-build-classic', + 'ckeditor5-build-inline' ] ); const options = { cwd: '/tmp', packages: 'packages', - skipPackages: [], + skipPackages: [ + '@ckeditor/ckeditor5-*' + ], skipMainRepository: false }; - getPackageJsonStub.onFirstCall().returns( { name: '@ckeditor/ckeditor5-core' } ); - getPackageJsonStub.onSecondCall().returns( { name: '@ckeditor/ckeditor5-engine' } ); - getPackageJsonStub.onThirdCall().returns( { name: '@ckeditor/ckeditor5-utils' } ); + getPackageJsonStub.onCall( 0 ).returns( { name: '@ckeditor/ckeditor5-core' } ); + getPackageJsonStub.onCall( 1 ).returns( { name: '@ckeditor/ckeditor5-engine' } ); + getPackageJsonStub.onCall( 2 ).returns( { name: '@ckeditor/ckeditor5-utils' } ); + getPackageJsonStub.onCall( 3 ).returns( { name: '@ckeditor/ckeditor5-build-classic' } ); + getPackageJsonStub.onCall( 4 ).returns( { name: '@ckeditor/ckeditor5-build-inline' } ); - const pathsCollection = getSubPackagesPaths( options ); + const pathsCollection = getPackagesPaths( options ); expect( pathsCollection.matched ).to.be.instanceof( Set ); - expect( pathsCollection.matched.size ).to.equal( 4 ); + expect( pathsCollection.matched.size ).to.equal( 1 ); expect( pathsCollection.matched.has( '/tmp' ) ).to.equal( true ); - expect( pathsCollection.matched.has( '/tmp/packages/ckeditor5-core' ) ).to.equal( true ); - expect( pathsCollection.matched.has( '/tmp/packages/ckeditor5-engine' ) ).to.equal( true ); - expect( pathsCollection.matched.has( '/tmp/packages/ckeditor5-utils' ) ).to.equal( true ); + + expect( pathsCollection.skipped ).to.be.instanceof( Set ); + expect( pathsCollection.skipped.size ).to.equal( 5 ); + expect( pathsCollection.skipped.has( '/tmp/packages/ckeditor5-core' ) ).to.equal( true ); + expect( pathsCollection.skipped.has( '/tmp/packages/ckeditor5-engine' ) ).to.equal( true ); + expect( pathsCollection.skipped.has( '/tmp/packages/ckeditor5-utils' ) ).to.equal( true ); + expect( pathsCollection.skipped.has( '/tmp/packages/ckeditor5-build-inline' ) ).to.equal( true ); + expect( pathsCollection.skipped.has( '/tmp/packages/ckeditor5-build-classic' ) ).to.equal( true ); } ); it( 'allows returning the main repository only (skipMainRepository=false)', () => { @@ -239,7 +249,7 @@ describe( 'dev-env/release-tools/utils', () => { packages: null }; - const pathsCollection = getSubPackagesPaths( options ); + const pathsCollection = getPackagesPaths( options ); expect( pathsCollection.matched ).to.be.instanceof( Set ); expect( pathsCollection.matched.size ).to.equal( 1 ); @@ -256,7 +266,7 @@ describe( 'dev-env/release-tools/utils', () => { skipMainRepository: true }; - const pathsCollection = getSubPackagesPaths( options ); + const pathsCollection = getPackagesPaths( options ); expect( pathsCollection.matched ).to.be.instanceof( Set ); expect( pathsCollection.matched.size ).to.equal( 0 ); diff --git a/packages/ckeditor5-dev-env/tests/release-tools/utils/getpackagestorelease.js b/packages/ckeditor5-dev-env/tests/release-tools/utils/getpackagestorelease.js index 67cae5763..3fa0233e8 100644 --- a/packages/ckeditor5-dev-env/tests/release-tools/utils/getpackagestorelease.js +++ b/packages/ckeditor5-dev-env/tests/release-tools/utils/getpackagestorelease.js @@ -67,8 +67,8 @@ describe( 'dev-env/release-tools/utils', () => { sandbox.stub( process, 'cwd' ).returns( '/cwd' ); const changes = [ - '[@ckeditor/ckeditor5-core](npm link): v0.5.0 => [v1.0.0](GitHub link)', - '[@ckeditor/ckeditor5-engine](npm link): v1.0.0 => [v1.0.1](GitHub link)' + '[@ckeditor/ckeditor5-core](npm link): v0.5.0 => v1.0.0', + '[@ckeditor/ckeditor5-engine](npm link): v1.0.0 => v1.0.1' ].join( '\n' ); return getPackagesToRelease( packagesToCheck, { changes, version: '2.0.0' } ) @@ -80,15 +80,70 @@ describe( 'dev-env/release-tools/utils', () => { expect( stubs.chdir.secondCall.args[ 0 ] ).to.match( /^\/packages\/ckeditor5-engine$/ ); expect( stubs.chdir.thirdCall.args[ 0 ] ).to.equal( '/cwd' ); - const corePackageDetails = packages.get( '@ckeditor/ckeditor5-core' ); - expect( corePackageDetails.version ).to.equal( '1.0.0' ); + const corePackage = packages.get( '@ckeditor/ckeditor5-core' ); + expect( corePackage.version ).to.equal( '1.0.0' ); - const enginePackageDetails = packages.get( '@ckeditor/ckeditor5-engine' ); - expect( enginePackageDetails.version ).to.equal( '1.0.1' ); + const enginePackage = packages.get( '@ckeditor/ckeditor5-engine' ); + expect( enginePackage.version ).to.equal( '1.0.1' ); } ); } ); - it( 'uses passed version if changes miss some package', () => { + it( 'returns the version specified in options for the "main package"', () => { + const packagesToCheck = new Set( [ + '/cwd' + ] ); + + stubs.getPackageJson.onFirstCall().returns( { + name: 'ckeditor5', + version: '1.0.0' + } ); + + sandbox.stub( process, 'cwd' ).returns( '/cwd' ); + + return getPackagesToRelease( packagesToCheck, { changes: 'Foo bar.', version: '2.0.0' } ) + .then( packages => { + expect( packages.size ).to.equal( 1 ); + + expect( stubs.chdir.calledTwice ).to.equal( true ); + expect( stubs.chdir.firstCall.args[ 0 ] ).to.equal( '/cwd' ); + expect( stubs.chdir.secondCall.args[ 0 ] ).to.equal( '/cwd' ); + + const mainPackage = packages.get( 'ckeditor5' ); + expect( mainPackage.version ).to.equal( '2.0.0' ); + } ); + } ); + + it( 'returns proper version for a new package', () => { + const packagesToCheck = new Set( [ + '/packages/ckeditor5-new-package' + ] ); + + // @ckeditor/ckeditor5-core + stubs.getPackageJson.onFirstCall().returns( { + name: '@ckeditor/ckeditor5-new-package', + version: '0.0.1' + } ); + + sandbox.stub( process, 'cwd' ).returns( '/cwd' ); + + const changes = [ + '[@ckeditor/ckeditor5-new-package](npm link): v1.0.0' + ].join( '\n' ); + + return getPackagesToRelease( packagesToCheck, { changes, version: '2.0.0' } ) + .then( packages => { + expect( packages.size ).to.equal( 1 ); + + expect( stubs.chdir.calledTwice ).to.equal( true ); + expect( stubs.chdir.firstCall.args[ 0 ] ).to.match( /^\/packages\/ckeditor5-new-package$/ ); + expect( stubs.chdir.secondCall.args[ 0 ] ).to.equal( '/cwd' ); + + const newPackagePackage = packages.get( '@ckeditor/ckeditor5-new-package' ); + expect( newPackagePackage.version ).to.equal( '1.0.0' ); + } ); + } ); + + it( 'ignores a package if a version is not specified in the changes description', () => { const packagesToCheck = new Set( [ '/packages/ckeditor5-core', '/packages/ckeditor5-engine' @@ -109,23 +164,20 @@ describe( 'dev-env/release-tools/utils', () => { sandbox.stub( process, 'cwd' ).returns( '/cwd' ); const changes = [ - '[@ckeditor/ckeditor5-core](npm link): v0.5.0 => [v1.0.0](GitHub link)' + '[@ckeditor/ckeditor5-core](npm link): v0.5.0 => v1.0.0' ].join( '\n' ); return getPackagesToRelease( packagesToCheck, { changes, version: '2.0.0' } ) .then( packages => { - expect( packages.size ).to.equal( 2 ); + expect( packages.size ).to.equal( 1 ); expect( stubs.chdir.calledThrice ).to.equal( true ); expect( stubs.chdir.firstCall.args[ 0 ] ).to.match( /^\/packages\/ckeditor5-core$/ ); expect( stubs.chdir.secondCall.args[ 0 ] ).to.match( /^\/packages\/ckeditor5-engine$/ ); expect( stubs.chdir.thirdCall.args[ 0 ] ).to.equal( '/cwd' ); - const corePackageDetails = packages.get( '@ckeditor/ckeditor5-core' ); - expect( corePackageDetails.version ).to.equal( '1.0.0' ); - - const enginePackageDetails = packages.get( '@ckeditor/ckeditor5-engine' ); - expect( enginePackageDetails.version ).to.equal( '2.0.0' ); + const corePackage = packages.get( '@ckeditor/ckeditor5-core' ); + expect( corePackage.version ).to.equal( '1.0.0' ); } ); } ); } ); diff --git a/packages/ckeditor5-dev-env/tests/release-tools/utils/getsubrepositoriespaths.js b/packages/ckeditor5-dev-env/tests/release-tools/utils/getsubrepositoriespaths.js deleted file mode 100644 index d96011b50..000000000 --- a/packages/ckeditor5-dev-env/tests/release-tools/utils/getsubrepositoriespaths.js +++ /dev/null @@ -1,363 +0,0 @@ -/** - * @license Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved. - * For licensing, see LICENSE.md. - */ - -'use strict'; - -const path = require( 'path' ); -const expect = require( 'chai' ).expect; -const sinon = require( 'sinon' ); -const proxyquire = require( 'proxyquire' ); - -describe( 'dev-env/release-tools/utils', () => { - describe( 'getSubRepositoriesPaths()', () => { - let getSubRepositoriesPaths, sandbox, getPackageJsonStub, getDirectoriesStub; - - beforeEach( () => { - sandbox = sinon.createSandbox(); - - getPackageJsonStub = sandbox.stub(); - getDirectoriesStub = sandbox.stub(); - - sandbox.stub( path, 'join' ).callsFake( ( ...chunks ) => chunks.join( '/' ) ); - - getSubRepositoriesPaths = proxyquire( '../../../lib/release-tools/utils/getsubrepositoriespaths', { - './getpackagejson': getPackageJsonStub, - '@ckeditor/ckeditor5-dev-utils': { - tools: { - getDirectories: getDirectoriesStub - } - } - } ); - } ); - - afterEach( () => { - sandbox.restore(); - } ); - - it( 'returns all found packages', () => { - getDirectoriesStub.returns( [ - 'ckeditor5-core', - 'ckeditor5-engine', - 'ckeditor5-utils' - ] ); - - const options = { - cwd: '/tmp', - packages: 'packages', - skipPackages: [], - skipMainRepository: true - }; - - getPackageJsonStub.onCall( 0 ).returns( { - dependencies: { - '@ckeditor/ckeditor5-core': 'ckeditor/ckeditor5-core', - '@ckeditor/ckeditor5-engine': 'ckeditor/ckeditor5-engine', - '@ckeditor/ckeditor5-utils': 'ckeditor/ckeditor5-utils' - } - } ); - getPackageJsonStub.onCall( 1 ).returns( { name: '@ckeditor/ckeditor5-core' } ); - getPackageJsonStub.onCall( 2 ).returns( { name: '@ckeditor/ckeditor5-engine' } ); - getPackageJsonStub.onCall( 3 ).returns( { name: '@ckeditor/ckeditor5-utils' } ); - - const pathsCollection = getSubRepositoriesPaths( options ); - - expect( pathsCollection.matched ).to.be.instanceof( Set ); - expect( pathsCollection.matched.size ).to.equal( 3 ); - expect( pathsCollection.matched.has( '/tmp/packages/ckeditor5-core' ) ).to.equal( true ); - expect( pathsCollection.matched.has( '/tmp/packages/ckeditor5-engine' ) ).to.equal( true ); - expect( pathsCollection.matched.has( '/tmp/packages/ckeditor5-utils' ) ).to.equal( true ); - - expect( pathsCollection.skipped ).to.be.instanceof( Set ); - expect( pathsCollection.skipped.size ).to.equal( 1 ); - expect( pathsCollection.skipped.has( '/tmp' ) ).to.equal( true ); - } ); - - it( 'skips packages which are not specified in the package.json', () => { - getDirectoriesStub.returns( [ - 'ckeditor5-core', - 'ckeditor5-engine', - 'ckeditor5-utils' - ] ); - - const options = { - cwd: '/tmp', - packages: 'packages', - skipPackages: [], - skipMainRepository: true - }; - getPackageJsonStub.onCall( 0 ).returns( { - dependencies: { - '@ckeditor/ckeditor5-core': 'ckeditor/ckeditor5-core', - '@ckeditor/ckeditor5-engine': 'ckeditor/ckeditor5-engine' - } - } ); - getPackageJsonStub.onCall( 1 ).returns( { name: '@ckeditor/ckeditor5-core' } ); - getPackageJsonStub.onCall( 2 ).returns( { name: '@ckeditor/ckeditor5-engine' } ); - getPackageJsonStub.onCall( 3 ).returns( { name: '@ckeditor/ckeditor5-utils' } ); - - const pathsCollection = getSubRepositoriesPaths( options ); - - expect( pathsCollection.matched ).to.be.instanceof( Set ); - expect( pathsCollection.matched.size ).to.equal( 2 ); - - expect( pathsCollection.skipped ).to.be.instanceof( Set ); - expect( pathsCollection.skipped.size ).to.equal( 2 ); - expect( pathsCollection.skipped.has( '/tmp/packages/ckeditor5-utils' ) ).to.equal( true ); - expect( pathsCollection.skipped.has( '/tmp' ) ).to.equal( true ); - } ); - - it( 'allows ignoring specified packages (specified as array)', () => { - getDirectoriesStub.returns( [ - 'ckeditor5-core', - 'ckeditor5-engine', - 'ckeditor5-utils' - ] ); - - const options = { - cwd: '/tmp', - packages: 'packages', - skipPackages: [ - '@ckeditor/ckeditor5-utils' - ], - skipMainRepository: true - }; - getPackageJsonStub.onCall( 0 ).returns( { - dependencies: { - '@ckeditor/ckeditor5-core': 'ckeditor/ckeditor5-core', - '@ckeditor/ckeditor5-engine': 'ckeditor/ckeditor5-engine', - '@ckeditor/ckeditor5-utils': 'ckeditor/ckeditor5-utils' - } - } ); - getPackageJsonStub.onCall( 1 ).returns( { name: '@ckeditor/ckeditor5-core' } ); - getPackageJsonStub.onCall( 2 ).returns( { name: '@ckeditor/ckeditor5-engine' } ); - getPackageJsonStub.onCall( 3 ).returns( { name: '@ckeditor/ckeditor5-utils' } ); - - const pathsCollection = getSubRepositoriesPaths( options ); - - expect( pathsCollection.matched ).to.be.instanceof( Set ); - expect( pathsCollection.matched.size ).to.equal( 2 ); - - expect( pathsCollection.skipped ).to.be.instanceof( Set ); - expect( pathsCollection.skipped.size ).to.equal( 2 ); - expect( pathsCollection.skipped.has( '/tmp/packages/ckeditor5-utils' ) ).to.equal( true ); - expect( pathsCollection.skipped.has( '/tmp' ) ).to.equal( true ); - } ); - - it( 'allows ignoring specified packages (specified as string)', () => { - getDirectoriesStub.returns( [ - 'ckeditor5-core', - 'ckeditor5-engine', - 'ckeditor5-utils' - ] ); - - const options = { - cwd: '/tmp', - packages: 'packages', - skipPackages: '@ckeditor/ckeditor5-u*', - skipMainRepository: true - }; - getPackageJsonStub.onCall( 0 ).returns( { - dependencies: { - '@ckeditor/ckeditor5-core': 'ckeditor/ckeditor5-core', - '@ckeditor/ckeditor5-engine': 'ckeditor/ckeditor5-engine', - '@ckeditor/ckeditor5-utils': 'ckeditor/ckeditor5-utils' - } - } ); - getPackageJsonStub.onCall( 1 ).returns( { name: '@ckeditor/ckeditor5-core' } ); - getPackageJsonStub.onCall( 2 ).returns( { name: '@ckeditor/ckeditor5-engine' } ); - getPackageJsonStub.onCall( 3 ).returns( { name: '@ckeditor/ckeditor5-utils' } ); - - const pathsCollection = getSubRepositoriesPaths( options ); - - expect( pathsCollection.matched ).to.be.instanceof( Set ); - expect( pathsCollection.matched.size ).to.equal( 2 ); - - expect( pathsCollection.skipped ).to.be.instanceof( Set ); - expect( pathsCollection.skipped.size ).to.equal( 2 ); - expect( pathsCollection.skipped.has( '/tmp/packages/ckeditor5-utils' ) ).to.equal( true ); - expect( pathsCollection.skipped.has( '/tmp' ) ).to.equal( true ); - } ); - - it( 'allows restricting the scope for packages', () => { - getDirectoriesStub.returns( [ - 'ckeditor5-core', - 'ckeditor5-engine', - 'ckeditor5-utils', - 'ckeditor5-build-classic', - 'ckeditor5-build-inline' - ] ); - - const options = { - cwd: '/tmp', - packages: 'packages', - scope: '@ckeditor/ckeditor5-build-*', - skipPackages: [], - skipMainRepository: true - }; - - getPackageJsonStub.onCall( 0 ).returns( { - dependencies: { - '@ckeditor/ckeditor5-core': 'ckeditor/ckeditor5-core', - '@ckeditor/ckeditor5-engine': 'ckeditor/ckeditor5-engine', - '@ckeditor/ckeditor5-utils': 'ckeditor/ckeditor5-utils', - '@ckeditor/ckeditor5-build-classic': 'ckeditor/ckeditor5-build-classic', - '@ckeditor/ckeditor5-build-inline': 'ckeditor/ckeditor5-build-inline' - } - } ); - - getPackageJsonStub.onCall( 1 ).returns( { name: '@ckeditor/ckeditor5-core' } ); - getPackageJsonStub.onCall( 2 ).returns( { name: '@ckeditor/ckeditor5-engine' } ); - getPackageJsonStub.onCall( 3 ).returns( { name: '@ckeditor/ckeditor5-utils' } ); - getPackageJsonStub.onCall( 4 ).returns( { name: '@ckeditor/ckeditor5-build-classic' } ); - getPackageJsonStub.onCall( 5 ).returns( { name: '@ckeditor/ckeditor5-build-inline' } ); - - const pathsCollection = getSubRepositoriesPaths( options ); - - expect( pathsCollection.matched ).to.be.instanceof( Set ); - expect( pathsCollection.matched.size ).to.equal( 2 ); - expect( pathsCollection.matched.has( '/tmp/packages/ckeditor5-build-classic' ) ).to.equal( true ); - expect( pathsCollection.matched.has( '/tmp/packages/ckeditor5-build-inline' ) ).to.equal( true ); - - expect( pathsCollection.skipped ).to.be.instanceof( Set ); - expect( pathsCollection.skipped.size ).to.equal( 4 ); - expect( pathsCollection.skipped.has( '/tmp/packages/ckeditor5-core' ) ).to.equal( true ); - expect( pathsCollection.skipped.has( '/tmp/packages/ckeditor5-engine' ) ).to.equal( true ); - expect( pathsCollection.skipped.has( '/tmp/packages/ckeditor5-utils' ) ).to.equal( true ); - expect( pathsCollection.skipped.has( '/tmp' ) ).to.equal( true ); - } ); - - it( 'allows restricting the scope for packages and works fine with "skipPackages" option', () => { - getDirectoriesStub.returns( [ - 'ckeditor5-core', - 'ckeditor5-engine', - 'ckeditor5-utils', - 'ckeditor5-build-classic', - 'ckeditor5-build-inline' - ] ); - - const options = { - cwd: '/tmp', - packages: 'packages', - scope: '@ckeditor/ckeditor5-build-*', - skipPackages: [ - '@ckeditor/ckeditor5-build-inline' - ], - skipMainRepository: true - }; - - getPackageJsonStub.onCall( 0 ).returns( { - dependencies: { - '@ckeditor/ckeditor5-core': 'ckeditor/ckeditor5-core', - '@ckeditor/ckeditor5-engine': 'ckeditor/ckeditor5-engine', - '@ckeditor/ckeditor5-utils': 'ckeditor/ckeditor5-utils', - '@ckeditor/ckeditor5-build-classic': 'ckeditor/ckeditor5-build-classic', - '@ckeditor/ckeditor5-build-inline': 'ckeditor/ckeditor5-build-inline' - } - } ); - - getPackageJsonStub.onCall( 1 ).returns( { name: '@ckeditor/ckeditor5-core' } ); - getPackageJsonStub.onCall( 2 ).returns( { name: '@ckeditor/ckeditor5-engine' } ); - getPackageJsonStub.onCall( 3 ).returns( { name: '@ckeditor/ckeditor5-utils' } ); - getPackageJsonStub.onCall( 4 ).returns( { name: '@ckeditor/ckeditor5-build-classic' } ); - getPackageJsonStub.onCall( 5 ).returns( { name: '@ckeditor/ckeditor5-build-inline' } ); - - const pathsCollection = getSubRepositoriesPaths( options ); - - expect( pathsCollection.matched ).to.be.instanceof( Set ); - expect( pathsCollection.matched.size ).to.equal( 1 ); - expect( pathsCollection.matched.has( '/tmp/packages/ckeditor5-build-classic' ) ).to.equal( true ); - - expect( pathsCollection.skipped ).to.be.instanceof( Set ); - expect( pathsCollection.skipped.size ).to.equal( 5 ); - expect( pathsCollection.skipped.has( '/tmp/packages/ckeditor5-core' ) ).to.equal( true ); - expect( pathsCollection.skipped.has( '/tmp/packages/ckeditor5-engine' ) ).to.equal( true ); - expect( pathsCollection.skipped.has( '/tmp/packages/ckeditor5-utils' ) ).to.equal( true ); - expect( pathsCollection.skipped.has( '/tmp/packages/ckeditor5-build-inline' ) ).to.equal( true ); - expect( pathsCollection.skipped.has( '/tmp' ) ).to.equal( true ); - } ); - - it( 'allows returning the main repository', () => { - getDirectoriesStub.returns( [ - 'ckeditor5-core', - 'ckeditor5-engine', - 'ckeditor5-utils', - 'ckeditor5-build-classic', - 'ckeditor5-build-inline' - ] ); - - const options = { - cwd: '/tmp', - packages: 'packages', - skipPackages: [ - '@ckeditor/ckeditor5-*' - ], - skipMainRepository: false - }; - - getPackageJsonStub.onCall( 0 ).returns( { - dependencies: { - '@ckeditor/ckeditor5-core': 'ckeditor/ckeditor5-core', - '@ckeditor/ckeditor5-engine': 'ckeditor/ckeditor5-engine', - '@ckeditor/ckeditor5-utils': 'ckeditor/ckeditor5-utils', - '@ckeditor/ckeditor5-build-classic': 'ckeditor/ckeditor5-build-classic', - '@ckeditor/ckeditor5-build-inline': 'ckeditor/ckeditor5-build-inline' - } - } ); - - getPackageJsonStub.onCall( 1 ).returns( { name: '@ckeditor/ckeditor5-core' } ); - getPackageJsonStub.onCall( 2 ).returns( { name: '@ckeditor/ckeditor5-engine' } ); - getPackageJsonStub.onCall( 3 ).returns( { name: '@ckeditor/ckeditor5-utils' } ); - getPackageJsonStub.onCall( 4 ).returns( { name: '@ckeditor/ckeditor5-build-classic' } ); - getPackageJsonStub.onCall( 5 ).returns( { name: '@ckeditor/ckeditor5-build-inline' } ); - - const pathsCollection = getSubRepositoriesPaths( options ); - - expect( pathsCollection.matched ).to.be.instanceof( Set ); - expect( pathsCollection.matched.size ).to.equal( 1 ); - expect( pathsCollection.matched.has( '/tmp' ) ).to.equal( true ); - - expect( pathsCollection.skipped ).to.be.instanceof( Set ); - expect( pathsCollection.skipped.size ).to.equal( 5 ); - expect( pathsCollection.skipped.has( '/tmp/packages/ckeditor5-core' ) ).to.equal( true ); - expect( pathsCollection.skipped.has( '/tmp/packages/ckeditor5-engine' ) ).to.equal( true ); - expect( pathsCollection.skipped.has( '/tmp/packages/ckeditor5-utils' ) ).to.equal( true ); - expect( pathsCollection.skipped.has( '/tmp/packages/ckeditor5-build-inline' ) ).to.equal( true ); - expect( pathsCollection.skipped.has( '/tmp/packages/ckeditor5-build-classic' ) ).to.equal( true ); - } ); - - it( 'allows returning the main repository only (skipMainRepository=false)', () => { - const options = { - cwd: '/tmp', - packages: null - }; - - const pathsCollection = getSubRepositoriesPaths( options ); - - expect( pathsCollection.matched ).to.be.instanceof( Set ); - expect( pathsCollection.matched.size ).to.equal( 1 ); - expect( pathsCollection.matched.has( '/tmp' ) ).to.equal( true ); - - expect( pathsCollection.skipped ).to.be.instanceof( Set ); - expect( pathsCollection.skipped.size ).to.equal( 0 ); - } ); - - it( 'allows returning the main repository only (skipMainRepository=true)', () => { - const options = { - cwd: '/tmp', - packages: null, - skipMainRepository: true - }; - - const pathsCollection = getSubRepositoriesPaths( options ); - - expect( pathsCollection.matched ).to.be.instanceof( Set ); - expect( pathsCollection.matched.size ).to.equal( 0 ); - - expect( pathsCollection.skipped ).to.be.instanceof( Set ); - expect( pathsCollection.skipped.size ).to.equal( 1 ); - expect( pathsCollection.skipped.has( '/tmp' ) ).to.equal( true ); - } ); - } ); -} ); diff --git a/packages/ckeditor5-dev-env/tests/release-tools/utils/transform-commit/getwriteroptions.js b/packages/ckeditor5-dev-env/tests/release-tools/utils/getwriteroptions.js similarity index 81% rename from packages/ckeditor5-dev-env/tests/release-tools/utils/transform-commit/getwriteroptions.js rename to packages/ckeditor5-dev-env/tests/release-tools/utils/getwriteroptions.js index 1c4e672ba..312b166ed 100644 --- a/packages/ckeditor5-dev-env/tests/release-tools/utils/transform-commit/getwriteroptions.js +++ b/packages/ckeditor5-dev-env/tests/release-tools/utils/getwriteroptions.js @@ -8,14 +8,14 @@ const expect = require( 'chai' ).expect; const sinon = require( 'sinon' ); -describe( 'dev-env/release-tools/utils/transform-commit', () => { +describe( 'dev-env/release-tools/utils', () => { let getWriterOptions, sandbox, transformSpy; beforeEach( () => { transformSpy = sinon.spy(); sandbox = sinon.createSandbox(); - getWriterOptions = require( '../../../../lib/release-tools/utils/transform-commit/getwriteroptions' ); + getWriterOptions = require( '../../../lib/release-tools/utils/getwriteroptions' ); } ); afterEach( () => { @@ -31,7 +31,6 @@ describe( 'dev-env/release-tools/utils/transform-commit', () => { expect( writerOptions ).to.have.property( 'commitGroupsSort' ); expect( writerOptions ).to.have.property( 'commitsSort' ); expect( writerOptions ).to.have.property( 'noteGroupsSort' ); - expect( writerOptions ).to.have.property( 'notesSort' ); expect( writerOptions ).to.have.property( 'mainTemplate' ); expect( writerOptions ).to.have.property( 'headerPartial' ); expect( writerOptions ).to.have.property( 'footerPartial' ); @@ -39,7 +38,6 @@ describe( 'dev-env/release-tools/utils/transform-commit', () => { expect( writerOptions.commitsSort ).to.be.a( 'array' ); expect( writerOptions.commitGroupsSort ).to.be.a( 'function' ); expect( writerOptions.noteGroupsSort ).to.be.a( 'function' ); - expect( writerOptions.notesSort ).to.be.a( 'function' ); } ); } ); } ); diff --git a/packages/ckeditor5-dev-env/tests/release-tools/utils/transform-commit/parseroptions.js b/packages/ckeditor5-dev-env/tests/release-tools/utils/parseroptions.js similarity index 70% rename from packages/ckeditor5-dev-env/tests/release-tools/utils/transform-commit/parseroptions.js rename to packages/ckeditor5-dev-env/tests/release-tools/utils/parseroptions.js index 819862114..902ee2022 100644 --- a/packages/ckeditor5-dev-env/tests/release-tools/utils/transform-commit/parseroptions.js +++ b/packages/ckeditor5-dev-env/tests/release-tools/utils/parseroptions.js @@ -7,11 +7,11 @@ const expect = require( 'chai' ).expect; -describe( 'dev-env/release-tools/utils/transform-commit', () => { +describe( 'dev-env/release-tools/utils', () => { let parserOptions; beforeEach( () => { - parserOptions = require( '../../../../lib/release-tools/utils/transform-commit/parser-options' ); + parserOptions = require( '../../../lib/release-tools/utils/parseroptions' ); } ); describe( 'parser-options', () => { diff --git a/packages/ckeditor5-dev-env/tests/release-tools/utils/releaserepository.js b/packages/ckeditor5-dev-env/tests/release-tools/utils/releaserepository.js deleted file mode 100644 index 3ceaa4e71..000000000 --- a/packages/ckeditor5-dev-env/tests/release-tools/utils/releaserepository.js +++ /dev/null @@ -1,151 +0,0 @@ -/** - * @license Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved. - * For licensing, see LICENSE.md. - */ - -'use strict'; - -const expect = require( 'chai' ).expect; -const sinon = require( 'sinon' ); -const proxyquire = require( 'proxyquire' ); -const mockery = require( 'mockery' ); - -describe( 'dev-env/release-tools/tasks', () => { - describe( 'releaseRepository()', () => { - let releaseRepository, sandbox, stubs, options; - - beforeEach( () => { - sandbox = sinon.createSandbox(); - - mockery.enable( { - useCleanCache: true, - warnOnReplace: false, - warnOnUnregistered: false - } ); - - stubs = { - createGithubRelease: sandbox.stub(), - generateChangelogForSinglePackage: sandbox.stub(), - parseGithubUrl: sandbox.stub(), - getPackageJson: sandbox.stub(), - logger: { - info: sandbox.spy(), - warning: sandbox.spy(), - error: sandbox.spy() - }, - tools: { - shExec: sandbox.stub() - } - }; - - mockery.registerMock( './creategithubrelease', stubs.createGithubRelease ); - mockery.registerMock( './generatechangelogforsinglepackage', stubs.generateChangelogForSinglePackage ); - mockery.registerMock( 'parse-github-url', stubs.parseGithubUrl ); - - sandbox.stub( process, 'cwd' ).returns( '/cwd' ); - - releaseRepository = proxyquire( '../../../lib/release-tools/utils/releaserepository', { - './getpackagejson': stubs.getPackageJson, - '@ckeditor/ckeditor5-dev-utils': { - tools: stubs.tools, - - logger() { - return stubs.logger; - } - } - } ); - - options = { - token: 'github-secret-token', - skipNpm: true, - skipGithub: true, - version: '1.0.0', - changes: 'Changes.' - }; - } ); - - afterEach( () => { - sandbox.restore(); - mockery.disable(); - } ); - - it( 'release the package', () => { - stubs.getPackageJson.returns( { - name: '@ckeditor/ckeditor5-core' - } ); - - stubs.tools.shExec.returns( '' ); - - return releaseRepository( options ) - .then( () => { - expect( stubs.parseGithubUrl.calledOnce ).to.equal( false ); - expect( stubs.createGithubRelease.calledOnce ).to.equal( false ); - expect( stubs.tools.shExec.calledWith( 'npm publish --access=public' ) ).to.equal( false ); - - expect( stubs.tools.shExec.calledWith( 'npm version 1.0.0 --message "Release: v1.0.0."' ) ).to.equal( true ); - expect( stubs.tools.shExec.calledWith( 'git push origin master v1.0.0' ) ).to.equal( true ); - expect( stubs.logger.info.calledWithMatch( /Release "v1.0.0" has been created and published./ ) ) - .to.equal( true ); - } ); - } ); - - it( 'publish package on npm', () => { - options.skipNpm = false; - - stubs.getPackageJson.returns( { - name: '@ckeditor/ckeditor5-core' - } ); - - stubs.tools.shExec.returns( '' ); - stubs.parseGithubUrl.returns( { - owner: 'organization', - name: 'repository' - } ); - - return releaseRepository( options ) - .then( () => { - expect( stubs.parseGithubUrl.calledOnce ).to.equal( false ); - expect( stubs.createGithubRelease.calledOnce ).to.equal( false ); - expect( stubs.tools.shExec.calledWith( 'npm version 1.0.0 --message "Release: v1.0.0."' ) ).to.equal( true ); - expect( stubs.tools.shExec.calledWith( 'git push origin master v1.0.0' ) ).to.equal( true ); - expect( stubs.tools.shExec.calledWith( 'npm publish --access=public' ) ).to.equal( true ); - expect( stubs.logger.info.calledWithMatch( /Release "v1.0.0" has been created and published./ ) ) - .to.equal( true ); - } ); - } ); - - it( 'publish package on GitHub', () => { - options.skipGithub = false; - - stubs.getPackageJson.returns( { - name: '@ckeditor/ckeditor5-core' - } ); - - stubs.createGithubRelease.returns( Promise.resolve() ); - - stubs.tools.shExec.returns( '' ); - stubs.parseGithubUrl.returns( { - owner: 'organization', - name: 'repository' - } ); - - return releaseRepository( options ) - .then( () => { - expect( stubs.parseGithubUrl.calledOnce ).to.equal( true ); - expect( stubs.createGithubRelease.calledOnce ).to.equal( true ); - expect( stubs.tools.shExec.calledWith( 'npm publish --access=public' ) ).to.equal( false ); - - expect( stubs.logger.info.calledWithMatch( /Release "v1.0.0" has been created and published./ ) ) - .to.equal( true ); - - expect( stubs.createGithubRelease.firstCall.args[ 0 ] ).to.equal( options.token ); - expect( stubs.createGithubRelease.firstCall.args[ 1 ] ).to.deep.equal( { - repositoryOwner: 'organization', - repositoryName: 'repository', - version: 'v1.0.0', - description: 'Changes.' - } ); - } ); - } ); - } ); -} ); diff --git a/packages/ckeditor5-dev-env/tests/release-tools/utils/transform-commit/transformcommitforsubpackagefactory.js b/packages/ckeditor5-dev-env/tests/release-tools/utils/transform-commit/transformcommitforsubpackagefactory.js deleted file mode 100644 index 6aeb3fbf6..000000000 --- a/packages/ckeditor5-dev-env/tests/release-tools/utils/transform-commit/transformcommitforsubpackagefactory.js +++ /dev/null @@ -1,289 +0,0 @@ -/** - * @license Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved. - * For licensing, see LICENSE.md. - */ - -'use strict'; - -const expect = require( 'chai' ).expect; -const sinon = require( 'sinon' ); -const mockery = require( 'mockery' ); -const proxyquire = require( 'proxyquire' ); - -const MODULE_PATH = '../../../../lib/release-tools/utils/transform-commit/transformcommitforsubpackagefactory'; - -describe( 'dev-env/release-tools/utils/transform-commit', () => { - describe( 'transformCommitForSubPackageFactory()', () => { - let transformCommitForSubPackageFactory, sandbox, stubs, context; - - beforeEach( () => { - sandbox = sinon.createSandbox(); - - mockery.enable( { - useCleanCache: true, - warnOnReplace: false, - warnOnUnregistered: false - } ); - - stubs = { - logger: { - info: sandbox.spy(), - warning: sandbox.spy(), - error: sandbox.spy() - }, - transformCommitForSubRepositoryFactory: sandbox.stub(), - getChangedFilesForCommit: sandbox.stub() - }; - - context = { - packageData: { - name: '@ckeditor/ckeditor5-dev-env' - } - }; - - mockery.registerMock( './transformcommitforsubrepositoryfactory', stubs.transformCommitForSubRepositoryFactory ); - mockery.registerMock( './getchangedfilesforcommit', stubs.getChangedFilesForCommit ); - - transformCommitForSubPackageFactory = proxyquire( MODULE_PATH, { - '@ckeditor/ckeditor5-dev-utils': { - logger() { - return stubs.logger; - } - } - } ); - - stubs.transformCommitForSubRepositoryFactory.callsFake( () => { - // Factory pattern. The module must call a function that returns another function. - return commit => { - return commit; - }; - } ); - } ); - - afterEach( () => { - sandbox.restore(); - mockery.disable(); - } ); - - it( 'returns a function', () => { - expect( transformCommitForSubPackageFactory() ).to.be.a( 'function' ); - } ); - - describe( 'transformCommitForSubPackage()', () => { - let transformCommitForSubPackage; - - beforeEach( () => { - transformCommitForSubPackage = transformCommitForSubPackageFactory(); - } ); - - it( 'rejects the commit if no files were changed', () => { - const commit = { - hash: 'abcd123', - notes: [] - }; - - stubs.getChangedFilesForCommit.returns( [] ); - - expect( transformCommitForSubPackage( commit, context ) ).to.equal( undefined ); - expect( stubs.transformCommitForSubRepositoryFactory.called ).to.equal( false ); - } ); - - it( 'rejects the commit when it changed files in other package', () => { - const commit = { - hash: 'abcd123', - notes: [] - }; - - stubs.getChangedFilesForCommit.returns( [ - 'packages/ckeditor5-dev-tests/CHANGELOG.md', - 'packages/ckeditor5-dev-tests/README.md' - ] ); - - expect( transformCommitForSubPackage( commit, context ) ).to.equal( undefined ); - expect( stubs.transformCommitForSubRepositoryFactory.called ).to.equal( false ); - } ); - - it( 'rejects the "Publish" commit', () => { - const commit = { - type: null, - subject: null, - pullRequestId: null, - merge: null, - header: 'Publish', - body: ' - @ckeditor/ckeditor5-dev-env@5.1.4\n' + - ' - ckeditor5-dev@0.0.22', - footer: null, - notes: [], - references: [], - mentions: [], - revert: null, - hash: '55a067502afcf26af25522b7a49b4245a16de16d' - }; - - expect( transformCommitForSubPackage( commit, context ) ).to.equal( undefined ); - expect( stubs.getChangedFilesForCommit.called ).to.equal( false ); - expect( stubs.transformCommitForSubRepositoryFactory.called ).to.equal( false ); - } ); - - it( 'returns a new instance of object instead od modifying passed one', () => { - const notes = [ - { title: 'Foo', text: 'Foo-Text' }, - { title: 'Bar', text: 'Bar-Text' } - ]; - - const rawCommit = { - hash: '684997d0eb2eca76b9e058fb1c3fa00b50059cdc', - header: 'Fix: Simple fix.', - type: 'Fix', - subject: 'Simple fix.', - body: null, - footer: null, - notes - }; - - stubs.getChangedFilesForCommit.returns( [ - 'packages/ckeditor5-dev-env/README.md', - 'packages/ckeditor5-dev-env/package.json' - ] ); - - stubs.transformCommitForSubRepositoryFactory.reset(); - stubs.transformCommitForSubRepositoryFactory.callsFake( () => { - return commit => { - commit.hash = commit.hash.substring( 0, 7 ); - - return commit; - }; - } ); - - const commit = transformCommitForSubPackage( rawCommit, context ); - - expect( stubs.transformCommitForSubRepositoryFactory.calledOnce ).to.equal( true ); - - // `transformCommitForSubRepository()` modifies `hash` of given commit and returns the same object. - // `transformCommitForSubPackage()` must care about cloning the object before any operation. - expect( commit.hash ).to.not.equal( rawCommit.hash ); - - // Notes cannot be the same but they should be equal. - expect( commit.notes ).to.not.equal( rawCommit.notes ); - expect( commit.notes ).to.deep.equal( rawCommit.notes ); - } ); - - it( 'accepts the commit when it has changed files in proper and other packages', () => { - const rawCommit = { - hash: 'abcd123', - notes: [] - }; - - stubs.getChangedFilesForCommit.returns( [ - 'packages/ckeditor5-dev-env/README.md', - 'packages/ckeditor5-dev-tests/README.md' - ] ); - - const commit = transformCommitForSubPackage( rawCommit, context ); - - expect( stubs.transformCommitForSubRepositoryFactory.called ).to.equal( true ); - expect( commit ).to.deep.equal( rawCommit ); - } ); - - it( 'accepts the commit when it has changed files in proper packages and root of the repository', () => { - const rawCommit = { - hash: 'abcd123', - notes: [] - }; - - stubs.getChangedFilesForCommit.returns( [ - 'README.md', - 'packages/ckeditor5-dev-env/README.md' - ] ); - - const commit = transformCommitForSubPackage( rawCommit, context ); - - expect( stubs.transformCommitForSubRepositoryFactory.called ).to.equal( true ); - expect( commit ).to.deep.equal( rawCommit ); - } ); - - it( 'accepts the commit when it has changed files for proper package', () => { - const rawCommit = { - hash: 'abcd123', - notes: [] - }; - - stubs.getChangedFilesForCommit.returns( [ - 'packages/ckeditor5-dev-env/README.md', - 'packages/ckeditor5-dev-env/package.json' - ] ); - - const commit = transformCommitForSubPackage( rawCommit, context ); - - expect( stubs.transformCommitForSubRepositoryFactory.called ).to.equal( true ); - expect( commit ).to.deep.equal( rawCommit ); - } ); - - it( 'does not crash if the merge commit does not contain the second line', () => { - const rawCommit = { - type: null, - subject: null, - merge: 'Merge branch \'master\' of github.com:ckeditor/ckeditor5-dev', - header: '-hash-', - body: '575e00bc8ece48826adefe226c4fb1fe071c73a7', - footer: null, - notes: [], - references: [], - mentions: [], - revert: null - }; - - stubs.getChangedFilesForCommit.returns( [] ); - - expect( () => { - transformCommitForSubPackage( rawCommit, context ); - } ).to.not.throw( Error ); - } ); - - it( 'works for packages without scoped name', () => { - context = { - packageData: { - name: 'eslint-config-ckeditor5' - } - }; - - const rawCommit = { - hash: 'abcd123', - notes: [] - }; - - stubs.getChangedFilesForCommit.returns( [ - 'packages/eslint-config-ckeditor5/README.md' - ] ); - - const commit = transformCommitForSubPackage( rawCommit, context ); - - expect( stubs.transformCommitForSubRepositoryFactory.called ).to.equal( true ); - expect( commit ).to.deep.equal( rawCommit ); - } ); - - it( 'passed options to "transformCommitForSubPackageFactory()"', () => { - transformCommitForSubPackage = transformCommitForSubPackageFactory( { - returnInvalidCommit: true - } ); - - const rawCommit = { - hash: 'abcd123', - notes: [] - }; - - stubs.getChangedFilesForCommit.returns( [ - 'packages/ckeditor5-dev-env/README.md', - 'packages/ckeditor5-dev-tests/README.md' - ] ); - - transformCommitForSubPackage( rawCommit, context ); - - expect( stubs.transformCommitForSubRepositoryFactory.called ).to.equal( true ); - expect( stubs.transformCommitForSubRepositoryFactory.firstCall.args[ 0 ] ).to.deep.equal( { - returnInvalidCommit: true - } ); - } ); - } ); - } ); -} ); diff --git a/packages/ckeditor5-dev-env/tests/release-tools/utils/transform-commit/transformcommitforsubrepositoryfactory.js b/packages/ckeditor5-dev-env/tests/release-tools/utils/transform-commit/transformcommitforsubrepositoryfactory.js deleted file mode 100644 index 9d8f0f6ab..000000000 --- a/packages/ckeditor5-dev-env/tests/release-tools/utils/transform-commit/transformcommitforsubrepositoryfactory.js +++ /dev/null @@ -1,455 +0,0 @@ -/** - * @license Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved. - * For licensing, see LICENSE.md. - */ - -'use strict'; - -const expect = require( 'chai' ).expect; -const sinon = require( 'sinon' ); -const mockery = require( 'mockery' ); - -const MODULE_PATH = '../../../../lib/release-tools/utils/transform-commit/transformcommitforsubrepositoryfactory'; - -describe( 'dev-env/release-tools/utils/transform-commit', () => { - describe( 'transformCommitForSubRepositoryFactory()', () => { - let transformCommitForSubRepositoryFactory, sandbox, stubs; - - beforeEach( () => { - sandbox = sinon.createSandbox(); - - mockery.enable( { - useCleanCache: true, - warnOnReplace: false, - warnOnUnregistered: false - } ); - - stubs = { - getPackageJson: () => { - return { - repository: 'https://github.com/ckeditor/ckeditor5-dev' - }; - } - }; - - mockery.registerMock( '../getpackagejson', stubs.getPackageJson ); - - transformCommitForSubRepositoryFactory = require( MODULE_PATH ); - } ); - - afterEach( () => { - sandbox.restore(); - mockery.disable(); - } ); - - it( 'returns a function', () => { - expect( transformCommitForSubRepositoryFactory() ).to.be.a( 'function' ); - } ); - - describe( 'options.returnInvalidCommit = true', () => { - it( 'allows returning invalid commit instead of removing', () => { - const transformCommitForSubRepository = transformCommitForSubRepositoryFactory( { - returnInvalidCommit: true - } ); - - const rawCommit = { - hash: '684997d', - header: 'Docs: README.', - type: 'Docs', - subject: 'README.', - body: null, - footer: null, - notes: [] - }; - - const newCommit = transformCommitForSubRepository( rawCommit ); - - expect( newCommit ).to.not.equal( undefined ); - } ); - } ); - - describe( 'options.treatMajorAsMinorBreakingChange = true', () => { - it( 'treats "MAJOR BREAKING CHANGES" as "MINOR BREAKING CHANGES"', () => { - const transformCommitForSubRepository = transformCommitForSubRepositoryFactory( { - treatMajorAsMinorBreakingChange: true, - useExplicitBreakingChangeGroups: true - } ); - - const rawCommit = { - hash: '684997d0eb2eca76b9e058fb1c3fa00b50059cdc', - header: 'Fix: Simple fix.', - type: 'Fix', - subject: 'Simple fix.', - body: null, - footer: null, - notes: [ - { title: 'BREAKING CHANGE', text: 'Note 1.' }, - { title: 'MAJOR BREAKING CHANGES', text: 'Note 2.' } - ] - }; - - const commit = transformCommitForSubRepository( rawCommit ); - - expect( commit.notes[ 0 ].title ).to.equal( 'MINOR BREAKING CHANGES' ); - expect( commit.notes[ 1 ].title ).to.equal( 'MINOR BREAKING CHANGES' ); - } ); - } ); - - describe( 'transformCommitForSubRepository()', () => { - let transformCommitForSubRepository; - - beforeEach( () => { - transformCommitForSubRepository = transformCommitForSubRepositoryFactory(); - } ); - - it( 'returns a new instance of object instead od modifying passed one', () => { - const notes = [ - { title: 'Foo', text: 'Foo-Text' }, - { title: 'Bar', text: 'Bar-Text' } - ]; - - const rawCommit = { - hash: '684997d0eb2eca76b9e058fb1c3fa00b50059cdc', - header: 'Fix: Simple fix.', - type: 'Fix', - subject: 'Simple fix.', - body: null, - footer: null, - notes - }; - - const commit = transformCommitForSubRepository( rawCommit ); - - // `transformCommit` modifies `hash` of given commit. - expect( commit.hash ).to.not.equal( rawCommit.hash ); - - // Notes cannot be the same but they should be equal. - expect( commit.notes ).to.not.equal( rawCommit.notes ); - expect( commit.notes ).to.deep.equal( rawCommit.notes ); - } ); - - it( 'returns "undefined" if given commit should not be visible in the changelog', () => { - const rawCommit = { - hash: '684997d', - header: 'Docs: README.', - type: 'Docs', - subject: 'README.', - body: null, - footer: null, - notes: [] - }; - - const newCommit = transformCommitForSubRepository( rawCommit ); - - expect( newCommit ).to.equal( undefined ); - } ); - - it( 'groups "BREAKING CHANGES" and "BREAKING CHANGE" as "MAJOR BREAKING CHANGES"', () => { - const rawCommit = { - hash: '684997d0eb2eca76b9e058fb1c3fa00b50059cdc', - header: 'Fix: Simple fix.', - type: 'Fix', - subject: 'Simple fix.', - body: null, - footer: null, - notes: [ - { title: 'BREAKING CHANGE', text: 'Note 1.' }, - { title: 'BREAKING CHANGES', text: 'Note 2.' } - ] - }; - - const transformCommitForSubRepository = transformCommitForSubRepositoryFactory( { - useExplicitBreakingChangeGroups: true - } ); - const commit = transformCommitForSubRepository( rawCommit ); - - expect( commit.notes[ 0 ].title ).to.equal( 'MAJOR BREAKING CHANGES' ); - expect( commit.notes[ 1 ].title ).to.equal( 'MAJOR BREAKING CHANGES' ); - } ); - - it( 'makes proper links in the commit subject', () => { - const rawCommit = { - hash: '76b9e058fb1c3fa00b50059cdc684997d0eb2eca', - header: 'Fix: Simple fix. See ckeditor/ckeditor5#1. Thanks to @CKEditor. Closes #2.', - type: 'Fix', - subject: 'Simple fix. See ckeditor/ckeditor5#1. Thanks to @CKEditor. Closes #2.', - body: null, - footer: null, - notes: [] - }; - - const commit = transformCommitForSubRepository( rawCommit ); - - const expectedSubject = 'Simple fix. ' + - 'See [ckeditor/ckeditor5#1](https://github.com/ckeditor/ckeditor5/issues/1). ' + - 'Thanks to [@CKEditor](https://github.com/CKEditor). ' + - 'Closes [#2](https://github.com/ckeditor/ckeditor5-dev/issues/2).'; - - expect( commit.subject ).to.equal( expectedSubject ); - } ); - - it( 'makes proper links in the commit body', () => { - const rawCommit = { - hash: '76b9e058fb1c3fa00b50059cdc684997d0eb2eca', - header: 'Fix: Simple fix. Closes #2.', - type: 'Fix', - subject: 'Simple fix. Closes #2', - body: 'See ckeditor/ckeditor5#1. Thanks to @CKEditor. Read more #2.', - footer: null, - notes: [] - }; - - const commit = transformCommitForSubRepository( rawCommit ); - - // Remember about the indent in commit body. - const expectedBody = ' See [ckeditor/ckeditor5#1](https://github.com/ckeditor/ckeditor5/issues/1). ' + - 'Thanks to [@CKEditor](https://github.com/CKEditor). ' + - 'Read more [#2](https://github.com/ckeditor/ckeditor5-dev/issues/2).'; - - expect( commit.body ).to.equal( expectedBody ); - } ); - - it( 'makes proper links in the commit notes', () => { - const rawCommit = { - hash: '76b9e058fb1c3fa00b50059cdc684997d0eb2eca', - header: 'Fix: Simple fix. Closes #2.', - type: 'Fix', - subject: 'Simple fix. Closes #2', - body: null, - footer: null, - notes: [ - { - title: 'BREAKING CHANGES', - text: 'See ckeditor/ckeditor5#1. Thanks to @CKEditor.' - }, - { - title: 'NOTE', - text: 'Read more #2.' - } - ] - }; - - const commit = transformCommitForSubRepository( rawCommit ); - - const expectedFirstNoteText = 'See [ckeditor/ckeditor5#1](https://github.com/ckeditor/ckeditor5/issues/1). ' + - 'Thanks to [@CKEditor](https://github.com/CKEditor).'; - - // eslint-disable-next-line max-len - const expectedSecondNodeText = 'Read more [#2](https://github.com/ckeditor/ckeditor5-dev/issues/2).'; - - expect( commit.notes[ 0 ].text ).to.equal( expectedFirstNoteText ); - expect( commit.notes[ 1 ].text ).to.equal( expectedSecondNodeText ); - } ); - - it( 'attaches additional commit description with correct indent', () => { - const commitDescription = [ - '* Release task - rebuilt module for collecting dependencies to release.', - '* Used `semver` package for bumping the version (instead of a custom module).' - ]; - - const commitDescriptionWithIndents = [ - ' * Release task - rebuilt module for collecting dependencies to release.', - ' * Used `semver` package for bumping the version (instead of a custom module).' - ].join( '\n' ); - - const rawCommit = { - header: 'Feature: Introduced a brand new release tools with a new set of requirements. See #64.', - hash: 'dea35014ab610be0c2150343c6a8a68620cfe5ad', - body: commitDescription.join( '\n' ), - footer: null, - mentions: [], - type: 'Feature', - subject: 'Introduced a brand new release tools with a new set of requirements. See #64.', - notes: [] - }; - - const commit = transformCommitForSubRepository( rawCommit ); - - expect( commit.type ).to.equal( 'Features' ); - expect( commit.subject ).to.equal( 'Introduced a brand new release tools with a new set of requirements. ' + - 'See [#64](https://github.com/ckeditor/ckeditor5-dev/issues/64).' ); - expect( commit.body ).to.equal( commitDescriptionWithIndents ); - } ); - - it( 'removes references to issues', () => { - const rawCommit = { - hash: '684997d0eb2eca76b9e058fb1c3fa00b50059cdc', - header: 'Fix: Simple fix.', - type: 'Fix', - subject: 'Simple fix.', - body: null, - footer: null, - notes: [], - references: [ - { issue: '11' }, - { issue: '12' } - ] - }; - - const commit = transformCommitForSubRepository( rawCommit, { displayLogs: false } ); - - expect( commit.references ).to.equal( undefined ); - } ); - - it( 'uses commit\'s footer as a commit\'s body when commit does not have additional notes', () => { - const rawCommit = { - hash: 'dea35014ab610be0c2150343c6a8a68620cfe5ad', - header: 'Feature: Introduced a brand new release tools with a new set of requirements.', - type: 'Feature', - subject: 'Introduced a brand new release tools with a new set of requirements.', - body: null, - footer: 'Additional description has been parsed as a footer but it should be a body.', - notes: [] - }; - - const commit = transformCommitForSubRepository( rawCommit, { displayLogs: false } ); - - expect( commit.body ).to.equal( - ' Additional description has been parsed as a footer but it should be a body.' - ); - expect( commit.footer ).to.equal( null ); - } ); - - it( 'fixes the commit which does not contain the second line', () => { - const rawCommit = { - type: null, - subject: null, - merge: 'Merge branch \'master\' of github.com:ckeditor/ckeditor5-dev', - header: '-hash-', - body: '575e00bc8ece48826adefe226c4fb1fe071c73a7', - footer: null, - notes: [], - references: [], - mentions: [], - revert: null - }; - - const transformCommitForSubRepository = transformCommitForSubRepositoryFactory( { - returnInvalidCommit: true - } ); - - const commit = transformCommitForSubRepository( rawCommit, { returnInvalidCommit: true } ); - - expect( commit.hash ).to.equal( '575e00b' ); - expect( commit.header ).to.equal( 'Merge branch \'master\' of github.com:ckeditor/ckeditor5-dev' ); - expect( commit.body ).to.equal( null ); - } ); - - it( 'removes [skip ci] from the commit message', () => { - const rawCommit = { - hash: '684997d0eb2eca76b9e058fb1c3fa00b50059cdc', - header: 'Fix: README. [skip ci]', - type: 'Fix', - subject: 'README. [skip ci]', - body: null, - footer: null, - notes: [] - }; - - const commit = transformCommitForSubRepository( rawCommit ); - - expect( commit.subject ).to.equal( 'README.' ); - } ); - - it( 'ignores merge "stable" commit', () => { - const rawCommit = { - type: null, - subject: null, - merge: 'Merge branch \'stable\'', - header: '-hash-', - body: '575e00bc8ece48826adefe226c4fb1fe071c73a7', - footer: null, - notes: [], - references: [], - mentions: [], - revert: null - }; - - expect( transformCommitForSubRepository( rawCommit ) ).to.equal( undefined ); - expect( transformCommitForSubRepository( rawCommit, { returnInvalidCommit: true } ) ).to.equal( undefined ); - } ); - - it( 'sorts notes', () => { - const rawCommit = { - hash: '684997d0eb2eca76b9e058fb1c3fa00b50059cdc', - header: 'Fix: Simple fix.', - type: 'Fix', - subject: 'Simple fix.', - body: null, - footer: null, - notes: [ - { title: 'NOTE', text: 'Note 1.' }, - { title: 'BREAKING CHANGES', text: 'Note 2.' }, - { title: 'MAJOR BREAKING CHANGES', text: 'Note 3.' }, - { title: 'NOTE', text: 'Note 4.' }, - { title: 'MINOR BREAKING CHANGES', text: 'Note 5.' }, - { title: 'NOTE', text: 'Note 6.' } - ] - }; - - const transformCommitForSubRepository = transformCommitForSubRepositoryFactory( { - useExplicitBreakingChangeGroups: true - } ); - const commit = transformCommitForSubRepository( rawCommit ); - - expect( commit.notes ).to.deep.equal( [ - { title: 'MAJOR BREAKING CHANGES', text: 'Note 2.' }, - { title: 'MAJOR BREAKING CHANGES', text: 'Note 3.' }, - { title: 'MINOR BREAKING CHANGES', text: 'Note 5.' }, - { title: 'NOTE', text: 'Note 1.' }, - { title: 'NOTE', text: 'Note 4.' }, - { title: 'NOTE', text: 'Note 6.' } - ] ); - } ); - - it( 'includes "repositoryUrl" where the commit has been done', () => { - const notes = [ - { title: 'Foo', text: 'Foo-Text' }, - { title: 'Bar', text: 'Bar-Text' } - ]; - - const rawCommit = { - hash: '684997d0eb2eca76b9e058fb1c3fa00b50059cdc', - header: 'Fix: Simple fix.', - type: 'Fix', - subject: 'Simple fix.', - body: null, - footer: null, - notes - }; - - const commit = transformCommitForSubRepository( rawCommit ); - - expect( commit.repositoryUrl ).to.equal( 'https://github.com/ckeditor/ckeditor5-dev' ); - } ); - - it( 'treats all "* BREAKING CHANGES" notes as "BREAKING CHANGE"', () => { - const rawCommit = { - hash: '684997d0eb2eca76b9e058fb1c3fa00b50059cdc', - header: 'Fix: Simple fix.', - type: 'Fix', - subject: 'Simple fix.', - body: null, - footer: null, - notes: [ - { title: 'BREAKING CHANGE', text: 'Note 1.' }, - { title: 'BREAKING CHANGES', text: 'Note 2.' }, - { title: 'MAJOR BREAKING CHANGE', text: 'Note 3.' }, - { title: 'MAJOR BREAKING CHANGES', text: 'Note 4.' }, - { title: 'MINOR BREAKING CHANGE', text: 'Note 5.' }, - { title: 'MINOR BREAKING CHANGES', text: 'Note 6.' } - ] - }; - - const commit = transformCommitForSubRepository( rawCommit ); - - expect( commit.notes[ 0 ].title ).to.equal( 'BREAKING CHANGES' ); - expect( commit.notes[ 1 ].title ).to.equal( 'BREAKING CHANGES' ); - expect( commit.notes[ 2 ].title ).to.equal( 'BREAKING CHANGES' ); - expect( commit.notes[ 3 ].title ).to.equal( 'BREAKING CHANGES' ); - expect( commit.notes[ 4 ].title ).to.equal( 'BREAKING CHANGES' ); - expect( commit.notes[ 5 ].title ).to.equal( 'BREAKING CHANGES' ); - } ); - } ); - } ); -} ); diff --git a/packages/ckeditor5-dev-env/tests/release-tools/utils/transformcommitfactory.js b/packages/ckeditor5-dev-env/tests/release-tools/utils/transformcommitfactory.js new file mode 100644 index 000000000..4b30e61e5 --- /dev/null +++ b/packages/ckeditor5-dev-env/tests/release-tools/utils/transformcommitfactory.js @@ -0,0 +1,854 @@ +/** + * @license Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */ + +'use strict'; + +const expect = require( 'chai' ).expect; +const sinon = require( 'sinon' ); +const mockery = require( 'mockery' ); + +describe( 'dev-env/release-tools/utils', () => { + describe( 'transformCommitFactory()', () => { + let transformCommitFactory, sandbox, stubs; + + beforeEach( () => { + sandbox = sinon.createSandbox(); + + mockery.enable( { + useCleanCache: true, + warnOnReplace: false, + warnOnUnregistered: false + } ); + + stubs = { + getPackageJson: () => { + return { + repository: 'https://github.com/ckeditor/ckeditor5-dev' + }; + }, + getChangedFilesForCommit: sandbox.stub() + }; + + mockery.registerMock( './getpackagejson', stubs.getPackageJson ); + mockery.registerMock( './getchangedfilesforcommit', stubs.getChangedFilesForCommit ); + + transformCommitFactory = require( '../../../lib/release-tools/utils/transformcommitfactory' ); + } ); + + afterEach( () => { + sandbox.restore(); + mockery.disable(); + } ); + + it( 'returns a function', () => { + expect( transformCommitFactory() ).to.be.a( 'function' ); + } ); + + describe( 'options.treatMajorAsMinorBreakingChange = true', () => { + it( 'treats "MAJOR BREAKING CHANGES" as "MINOR BREAKING CHANGES"', () => { + const transformCommit = transformCommitFactory( { + treatMajorAsMinorBreakingChange: true, + useExplicitBreakingChangeGroups: true + } ); + + const rawCommit = { + hash: '684997d0eb2eca76b9e058fb1c3fa00b50059cdc', + header: 'Fix: Simple fix.', + type: 'Fix', + subject: 'Simple fix.', + body: null, + footer: null, + notes: [ + { title: 'BREAKING CHANGE', text: 'Note 1.' }, + { title: 'MAJOR BREAKING CHANGES', text: 'Note 2.' } + ] + }; + + const commit = transformCommit( rawCommit ); + + expect( commit.notes[ 0 ].title ).to.equal( 'MINOR BREAKING CHANGES' ); + expect( commit.notes[ 1 ].title ).to.equal( 'MINOR BREAKING CHANGES' ); + } ); + } ); + + describe( 'transformCommit()', () => { + let transformCommit; + + beforeEach( () => { + transformCommit = transformCommitFactory(); + } ); + + it( 'returns a new instance of object instead od modifying passed one', () => { + const notes = [ + { title: 'BREAKING CHANGES', text: 'Foo-Text', scope: null }, + { title: 'BREAKING CHANGES', text: 'Bar-Text', scope: null } + ]; + + const rawCommit = { + hash: '684997d0eb2eca76b9e058fb1c3fa00b50059cdc', + header: 'Fix: Simple fix.', + type: 'Fix', + subject: 'Simple fix.', + body: null, + footer: null, + notes + }; + + const commit = transformCommit( rawCommit ); + + // Notes cannot be the same but they should be equal. + expect( commit.notes ).to.not.equal( rawCommit.notes ); + expect( commit.notes ).to.deep.equal( rawCommit.notes ); + } ); + + it( 'returns files that were changed with the commit', () => { + const rawCommit = { + hash: '684997d0eb2eca76b9e058fb1c3fa00b50059cdc', + header: 'Fix: Simple fix.', + type: 'Fix', + subject: 'Simple fix.', + body: null, + footer: null, + notes: [] + }; + + const files = [ + 'a/b/y.txt', + 'c/d/z.md' + ]; + + stubs.getChangedFilesForCommit.returns( files ); + + const commit = transformCommit( rawCommit ); + + expect( stubs.getChangedFilesForCommit.calledOnce ).to.equal( true ); + expect( commit.files ).to.deep.equal( files ); + } ); + + it( 'returns non-public commit', () => { + const rawCommit = { + hash: '684997d', + header: 'Docs: README.', + type: 'Docs', + subject: 'README.', + body: null, + footer: null, + notes: [] + }; + + const newCommit = transformCommit( rawCommit ); + + expect( newCommit ).to.not.equal( undefined ); + } ); + + it( 'groups "BREAKING CHANGES" and "BREAKING CHANGE" as "MAJOR BREAKING CHANGES"', () => { + const rawCommit = { + hash: '684997d0eb2eca76b9e058fb1c3fa00b50059cdc', + header: 'Fix: Simple fix.', + type: 'Fix', + subject: 'Simple fix.', + body: null, + footer: null, + notes: [ + { title: 'BREAKING CHANGE', text: 'Note 1.' }, + { title: 'BREAKING CHANGES', text: 'Note 2.' } + ] + }; + + const transformCommit = transformCommitFactory( { + useExplicitBreakingChangeGroups: true + } ); + const commit = transformCommit( rawCommit ); + + expect( commit.notes[ 0 ].title ).to.equal( 'MAJOR BREAKING CHANGES' ); + expect( commit.notes[ 1 ].title ).to.equal( 'MAJOR BREAKING CHANGES' ); + } ); + + it( 'makes proper links in the commit subject', () => { + const rawCommit = { + hash: '76b9e058fb1c3fa00b50059cdc684997d0eb2eca', + header: 'Fix: Simple fix. See ckeditor/ckeditor5#1. Thanks to @CKEditor. Closes #2.', + type: 'Fix', + subject: 'Simple fix. See ckeditor/ckeditor5#1. Thanks to @CKEditor. Closes #2.', + body: null, + footer: null, + notes: [] + }; + + const commit = transformCommit( rawCommit ); + + const expectedSubject = 'Simple fix. ' + + 'See [ckeditor/ckeditor5#1](https://github.com/ckeditor/ckeditor5/issues/1). ' + + 'Thanks to [@CKEditor](https://github.com/CKEditor). ' + + 'Closes [#2](https://github.com/ckeditor/ckeditor5-dev/issues/2).'; + + expect( commit.subject ).to.equal( expectedSubject ); + } ); + + it( 'makes proper links in the commit body', () => { + const rawCommit = { + hash: '76b9e058fb1c3fa00b50059cdc684997d0eb2eca', + header: 'Fix: Simple fix. Closes #2.', + type: 'Fix', + subject: 'Simple fix. Closes #2', + body: 'See ckeditor/ckeditor5#1. Thanks to @CKEditor. Read more #2.', + footer: null, + notes: [] + }; + + const commit = transformCommit( rawCommit ); + + // Remember about the indent in commit body. + const expectedBody = ' See [ckeditor/ckeditor5#1](https://github.com/ckeditor/ckeditor5/issues/1). ' + + 'Thanks to [@CKEditor](https://github.com/CKEditor). ' + + 'Read more [#2](https://github.com/ckeditor/ckeditor5-dev/issues/2).'; + + expect( commit.body ).to.equal( expectedBody ); + } ); + + it( 'makes proper links in the commit notes', () => { + const rawCommit = { + hash: '76b9e058fb1c3fa00b50059cdc684997d0eb2eca', + header: 'Fix: Simple fix. Closes #2.', + type: 'Fix', + subject: 'Simple fix. Closes #2', + body: null, + footer: null, + notes: [ + { + title: 'BREAKING CHANGES', + text: 'See ckeditor/ckeditor5#1. Thanks to @CKEditor.' + }, + { + title: 'BREAKING CHANGES', + text: 'Read more #2.' + } + ] + }; + + const commit = transformCommit( rawCommit ); + + const expectedFirstNoteText = 'See [ckeditor/ckeditor5#1](https://github.com/ckeditor/ckeditor5/issues/1). ' + + 'Thanks to [@CKEditor](https://github.com/CKEditor).'; + + // eslint-disable-next-line max-len + const expectedSecondNodeText = 'Read more [#2](https://github.com/ckeditor/ckeditor5-dev/issues/2).'; + + expect( commit.notes[ 0 ].text ).to.equal( expectedFirstNoteText ); + expect( commit.notes[ 1 ].text ).to.equal( expectedSecondNodeText ); + } ); + + it( 'attaches additional commit description with correct indent', () => { + const commitDescription = [ + '* Release task - rebuilt module for collecting dependencies to release.', + '* Used `semver` package for bumping the version (instead of a custom module).' + ]; + + const commitDescriptionWithIndents = [ + ' * Release task - rebuilt module for collecting dependencies to release.', + ' * Used `semver` package for bumping the version (instead of a custom module).' + ].join( '\n' ); + + const rawCommit = { + header: 'Feature: Introduced a brand new release tools with a new set of requirements. See #64.', + hash: 'dea35014ab610be0c2150343c6a8a68620cfe5ad', + body: commitDescription.join( '\n' ), + footer: null, + mentions: [], + type: 'Feature', + subject: 'Introduced a brand new release tools with a new set of requirements. See #64.', + notes: [] + }; + + const commit = transformCommit( rawCommit ); + + expect( commit.type ).to.equal( 'Features' ); + expect( commit.subject ).to.equal( 'Introduced a brand new release tools with a new set of requirements. ' + + 'See [#64](https://github.com/ckeditor/ckeditor5-dev/issues/64).' ); + expect( commit.body ).to.equal( commitDescriptionWithIndents ); + } ); + + it( 'removes references to issues', () => { + const rawCommit = { + hash: '684997d0eb2eca76b9e058fb1c3fa00b50059cdc', + header: 'Fix: Simple fix.', + type: 'Fix', + subject: 'Simple fix.', + body: null, + footer: null, + notes: [], + references: [ + { issue: '11' }, + { issue: '12' } + ] + }; + + const commit = transformCommit( rawCommit ); + + expect( commit.references ).to.equal( undefined ); + } ); + + it( 'uses commit\'s footer as a commit\'s body when commit does not have additional notes', () => { + const rawCommit = { + hash: 'dea35014ab610be0c2150343c6a8a68620cfe5ad', + header: 'Feature: Introduced a brand new release tools with a new set of requirements.', + type: 'Feature', + subject: 'Introduced a brand new release tools with a new set of requirements.', + body: null, + footer: 'Additional description has been parsed as a footer but it should be a body.', + notes: [] + }; + + const commit = transformCommit( rawCommit ); + + expect( commit.body ).to.equal( + ' Additional description has been parsed as a footer but it should be a body.' + ); + expect( commit.footer ).to.equal( null ); + } ); + + it( 'fixes the commit which does not contain the second line', () => { + const rawCommit = { + type: null, + subject: null, + merge: 'Merge branch \'master\' of github.com:ckeditor/ckeditor5-dev', + header: '-hash-', + body: '575e00bc8ece48826adefe226c4fb1fe071c73a7', + footer: null, + notes: [], + references: [], + mentions: [], + revert: null + }; + + const transformCommit = transformCommitFactory( { + returnInvalidCommit: true + } ); + + const commit = transformCommit( rawCommit ); + + expect( commit.hash ).to.equal( '575e00bc8ece48826adefe226c4fb1fe071c73a7' ); + expect( commit.header ).to.equal( 'Merge branch \'master\' of github.com:ckeditor/ckeditor5-dev' ); + expect( commit.body ).to.equal( null ); + } ); + + it( 'removes [skip ci] from the commit message', () => { + const rawCommit = { + hash: '684997d0eb2eca76b9e058fb1c3fa00b50059cdc', + header: 'Fix: README. [skip ci]', + type: 'Fix', + subject: 'README. [skip ci]', + body: null, + footer: null, + notes: [] + }; + + const commit = transformCommit( rawCommit ); + + expect( commit.subject ).to.equal( 'README.' ); + } ); + + it( 'ignores merge "stable" commit', () => { + const rawCommit = { + type: null, + subject: null, + merge: 'Merge branch \'stable\'', + header: '-hash-', + body: '575e00bc8ece48826adefe226c4fb1fe071c73a7', + footer: null, + notes: [], + references: [], + mentions: [], + revert: null + }; + + expect( transformCommit( rawCommit ) ).to.equal( undefined ); + expect( transformCommit( rawCommit ) ).to.equal( undefined ); + } ); + + it( 'includes "repositoryUrl" where the commit has been done', () => { + const notes = [ + { title: 'Foo', text: 'Foo-Text' }, + { title: 'Bar', text: 'Bar-Text' } + ]; + + const rawCommit = { + hash: '684997d0eb2eca76b9e058fb1c3fa00b50059cdc', + header: 'Fix: Simple fix.', + type: 'Fix', + subject: 'Simple fix.', + body: null, + footer: null, + notes + }; + + const commit = transformCommit( rawCommit ); + + expect( commit.repositoryUrl ).to.equal( 'https://github.com/ckeditor/ckeditor5-dev' ); + } ); + + it( 'treats all "* BREAKING CHANGES" notes as "BREAKING CHANGE"', () => { + const rawCommit = { + hash: '684997d0eb2eca76b9e058fb1c3fa00b50059cdc', + header: 'Fix: Simple fix.', + type: 'Fix', + subject: 'Simple fix.', + body: null, + footer: null, + notes: [ + { title: 'BREAKING CHANGE', text: 'Note 1.' }, + { title: 'BREAKING CHANGES', text: 'Note 2.' }, + { title: 'MAJOR BREAKING CHANGE', text: 'Note 3.' }, + { title: 'MAJOR BREAKING CHANGES', text: 'Note 4.' }, + { title: 'MINOR BREAKING CHANGE', text: 'Note 5.' }, + { title: 'MINOR BREAKING CHANGES', text: 'Note 6.' } + ] + }; + + const commit = transformCommit( rawCommit ); + + expect( commit.notes[ 0 ].title ).to.equal( 'BREAKING CHANGES' ); + expect( commit.notes[ 1 ].title ).to.equal( 'BREAKING CHANGES' ); + expect( commit.notes[ 2 ].title ).to.equal( 'BREAKING CHANGES' ); + expect( commit.notes[ 3 ].title ).to.equal( 'BREAKING CHANGES' ); + expect( commit.notes[ 4 ].title ).to.equal( 'BREAKING CHANGES' ); + expect( commit.notes[ 5 ].title ).to.equal( 'BREAKING CHANGES' ); + } ); + + it( 'removes duplicated notes from the footer', () => { + const notes = [ + { title: 'BREAKING CHANGES', text: 'Foo.', scope: null }, + { title: 'BREAKING CHANGES', text: 'Bar-Text.', scope: null } + ]; + + const rawCommit = { + hash: '684997d0eb2eca76b9e058fb1c3fa00b50059cdc', + header: 'Fix: Simple fix.', + type: 'Fix', + subject: 'Simple fix.', + body: null, + footer: [ + 'BREAKING CHANGES: Foo.', + 'NOTE: Do not remove me.', + 'BREAKING CHANGES: Bar-Text.' + ].join( '\n' ), + notes + }; + + const commit = transformCommit( rawCommit ); + + expect( commit.body ).to.equal( ' NOTE: Do not remove me.' ); + expect( commit.notes ).to.deep.equal( notes ); + } ); + + it( 'merges multiple "Closes #" references into single entry', () => { + const rawCommit = { + hash: '684997d0eb2eca76b9e058fb1c3fa00b50059cdc', + header: 'Fix: Simple fix. Closes #1. Closes #2. Closes #3.', + type: 'Fix', + subject: 'Simple fix. Closes #1. Closes #2. Closes #3.', + body: null, + footer: null, + notes: [] + }; + + const commit = transformCommit( rawCommit ); + + const expectedSubject = 'Simple fix. Closes ' + + '[#1](https://github.com/ckeditor/ckeditor5-dev/issues/1), ' + + '[#2](https://github.com/ckeditor/ckeditor5-dev/issues/2), ' + + '[#3](https://github.com/ckeditor/ckeditor5-dev/issues/3).'; + + expect( commit.subject ).to.equal( expectedSubject ); + } ); + + it( 'merges multiple "Closes #" references into single entry and does not touch "See #" references.', () => { + const rawCommit = { + hash: '684997d0eb2eca76b9e058fb1c3fa00b50059cdc', + header: 'Fix: Simple fix. Closes #1. Closes #2. See #3, #.', + type: 'Fix', + subject: 'Simple fix. Closes #1. Closes #2. See #3, #4.', + body: null, + footer: null, + notes: [] + }; + + const commit = transformCommit( rawCommit ); + + const expectedSubject = 'Simple fix. Closes ' + + '[#1](https://github.com/ckeditor/ckeditor5-dev/issues/1), ' + + '[#2](https://github.com/ckeditor/ckeditor5-dev/issues/2). ' + + 'See [#3](https://github.com/ckeditor/ckeditor5-dev/issues/3), ' + + '[#4](https://github.com/ckeditor/ckeditor5-dev/issues/4).'; + + expect( commit.subject ).to.equal( expectedSubject ); + } ); + + describe( 'scopes', () => { + it( 'returns null if the scope is being missed', () => { + const rawCommit = { + hash: '76b9e058fb1c3fa00b50059cdc684997d0eb2eca', + header: 'Fix: Simple fix.', + type: 'Fix', + subject: 'Simple fix.', + body: null, + footer: null, + notes: [] + }; + + const commit = transformCommit( rawCommit ); + + expect( commit.scope ).to.be.equal( null ); + } ); + + it( 'extracts the scope from the commit type', () => { + const rawCommit = { + hash: '76b9e058fb1c3fa00b50059cdc684997d0eb2eca', + header: 'Fix (package): Simple fix.', + type: 'Fix (package)', + subject: 'Simple fix.', + body: null, + footer: null, + notes: [] + }; + + const commit = transformCommit( rawCommit ); + + expect( commit.scope ).to.be.an( 'Array' ); + expect( commit.scope.length ).to.equal( 1 ); + expect( commit.scope[ 0 ] ).to.equal( 'package' ); + expect( commit.rawType ).to.equal( 'Fix' ); + } ); + + it( 'works with multi-scoped changes (commit type)', () => { + const rawCommit = { + hash: '76b9e058fb1c3fa00b50059cdc684997d0eb2eca', + header: 'Feature (foo, bar): Simple fix.', + type: 'Feature (foo, bar)', + subject: 'Simple fix.', + body: null, + footer: null, + notes: [] + }; + + const commit = transformCommit( rawCommit ); + + expect( commit.scope ).to.be.an( 'Array' ); + expect( commit.scope.length ).to.equal( 2 ); + expect( commit.scope[ 0 ] ).to.equal( 'bar' ); + expect( commit.scope[ 1 ] ).to.equal( 'foo' ); + expect( commit.rawType ).to.equal( 'Feature' ); + } ); + + it( 'extracts the scope from notes', () => { + const rawCommit = { + hash: '76b9e058fb1c3fa00b50059cdc684997d0eb2eca', + header: 'Fix: Simple fix.', + type: 'Fix', + subject: 'Simple fix.', + body: null, + footer: null, + notes: [ + { + title: 'BREAKING CHANGES', + text: '(package): Foo.' + } + ] + }; + + const commit = transformCommit( rawCommit ); + + expect( commit.notes ).to.be.an( 'Array' ); + expect( commit.notes.length ).to.equal( 1 ); + expect( commit.notes[ 0 ] ).to.be.an( 'Object' ); + expect( commit.notes[ 0 ].text ).to.equal( 'Foo.' ); + expect( commit.notes[ 0 ].title ).to.equal( 'BREAKING CHANGES' ); + expect( commit.notes[ 0 ].scope ).to.be.an( 'Array' ); + expect( commit.notes[ 0 ].scope.length ).to.equal( 1 ); + expect( commit.notes[ 0 ].scope[ 0 ] ).to.equal( 'package' ); + } ); + + it( 'works with multi-scoped notes', () => { + const rawCommit = { + hash: '76b9e058fb1c3fa00b50059cdc684997d0eb2eca', + header: 'Fix: Simple fix.', + type: 'Fix', + subject: 'Simple fix.', + body: null, + footer: null, + notes: [ + { + title: 'BREAKING CHANGES', + text: '(foo, bar): Package.' + } + ] + }; + + const commit = transformCommit( rawCommit ); + + expect( commit.notes ).to.be.an( 'Array' ); + expect( commit.notes.length ).to.equal( 1 ); + expect( commit.notes[ 0 ] ).to.be.an( 'Object' ); + expect( commit.notes[ 0 ].text ).to.equal( 'Package.' ); + expect( commit.notes[ 0 ].title ).to.equal( 'BREAKING CHANGES' ); + expect( commit.notes[ 0 ].scope ).to.be.an( 'Array' ); + expect( commit.notes[ 0 ].scope.length ).to.equal( 2 ); + expect( commit.notes[ 0 ].scope[ 0 ] ).to.equal( 'bar' ); + expect( commit.notes[ 0 ].scope[ 1 ] ).to.equal( 'foo' ); + } ); + } ); + + describe( 'multi-entries commit', () => { + it( 'returns an array with all entries', () => { + const rawCommit = { + hash: '76b9e058fb1c3fa00b50059cdc684997d0eb2eca', + header: 'Feature: Simple feature (1).', + type: 'Feature', + subject: 'Simple feature (1).', + body: [ + 'Fix: Simple fix (2).', + '', + 'Other: Simple other change (3).' + ].join( '\n' ), + footer: null, + notes: [] + }; + + const commits = transformCommit( rawCommit ); + + expect( commits ).to.be.an( 'Array' ); + expect( commits.length ).to.equal( 3 ); + + expect( commits[ 0 ] ).to.deep.equal( { + hash: '76b9e058fb1c3fa00b50059cdc684997d0eb2eca', + header: 'Feature: Simple feature (1).', + type: 'Features', + subject: 'Simple feature (1).', + body: '', + footer: null, + notes: [], + rawType: 'Feature', + files: [], + scope: null, + isPublicCommit: true, + repositoryUrl: 'https://github.com/ckeditor/ckeditor5-dev' + } ); + + expect( commits[ 1 ] ).to.deep.equal( { + hash: '76b9e058fb1c3fa00b50059cdc684997d0eb2eca', + header: 'Fix: Simple fix (2).', + type: 'Bug fixes', + subject: 'Simple fix (2).', + body: '', + revert: null, + merge: null, + footer: null, + notes: [], + rawType: 'Fix', + files: [], + mentions: [], + scope: null, + isPublicCommit: true, + repositoryUrl: 'https://github.com/ckeditor/ckeditor5-dev' + } ); + + expect( commits[ 2 ] ).to.deep.equal( { + hash: '76b9e058fb1c3fa00b50059cdc684997d0eb2eca', + header: 'Other: Simple other change (3).', + type: 'Other changes', + subject: 'Simple other change (3).', + body: '', + revert: null, + merge: null, + footer: null, + notes: [], + rawType: 'Other', + files: [], + mentions: [], + scope: null, + isPublicCommit: true, + repositoryUrl: 'https://github.com/ckeditor/ckeditor5-dev' + } ); + } ); + + it( 'preserves the description of the first commit', () => { + const rawCommit = { + hash: '76b9e058fb1c3fa00b50059cdc684997d0eb2eca', + header: 'Feature: Simple feature (1).', + type: 'Feature', + subject: 'Simple feature (1).', + body: [ + 'Lorem ipsum.', + '', + 'Fix: Simple fix (2).', + '', + 'Second lorem ipsum.', + '', + 'Other: Other simple change (3).' + ].join( '\n' ), + footer: null, + notes: [] + }; + + const commits = transformCommit( rawCommit ); + + expect( commits ).to.be.an( 'Array' ); + expect( commits.length ).to.equal( 3 ); + + expect( commits[ 0 ] ).to.deep.equal( { + hash: '76b9e058fb1c3fa00b50059cdc684997d0eb2eca', + header: 'Feature: Simple feature (1).', + type: 'Features', + subject: 'Simple feature (1).', + body: ' Lorem ipsum.', + footer: null, + notes: [], + rawType: 'Feature', + files: [], + scope: null, + isPublicCommit: true, + repositoryUrl: 'https://github.com/ckeditor/ckeditor5-dev' + } ); + + expect( commits[ 1 ] ).to.deep.equal( { + hash: '76b9e058fb1c3fa00b50059cdc684997d0eb2eca', + header: 'Fix: Simple fix (2).', + type: 'Bug fixes', + subject: 'Simple fix (2).', + body: ' Second lorem ipsum.', + revert: null, + merge: null, + footer: null, + notes: [], + rawType: 'Fix', + files: [], + mentions: [], + scope: null, + isPublicCommit: true, + repositoryUrl: 'https://github.com/ckeditor/ckeditor5-dev' + } ); + + expect( commits[ 2 ] ).to.deep.equal( { + hash: '76b9e058fb1c3fa00b50059cdc684997d0eb2eca', + header: 'Other: Other simple change (3).', + type: 'Other changes', + subject: 'Other simple change (3).', + body: '', + revert: null, + merge: null, + footer: null, + notes: [], + rawType: 'Other', + files: [], + mentions: [], + scope: null, + isPublicCommit: true, + repositoryUrl: 'https://github.com/ckeditor/ckeditor5-dev' + } ); + } ); + + it( 'adds a dot at the subject if missing in new commit', () => { + const rawCommit = { + hash: '76b9e058fb1c3fa00b50059cdc684997d0eb2eca', + header: 'Feature: Simple feature (1).', + type: 'Feature', + subject: 'Simple feature (1).', + body: [ + 'Fix: Simple fix (2)' + ].join( '\n' ), + footer: null, + notes: [] + }; + + const commits = transformCommit( rawCommit ); + + expect( commits ).to.be.an( 'Array' ); + expect( commits.length ).to.equal( 2 ); + + expect( commits[ 1 ].subject ).to.equal( 'Simple fix (2).' ); + } ); + + it( 'copies an array with changed files across all commits', () => { + const files = [ 'a', 'b', 'c' ]; + + stubs.getChangedFilesForCommit.returns( files ); + + const rawCommit = { + hash: '76b9e058fb1c3fa00b50059cdc684997d0eb2eca', + header: 'Feature: Simple feature (1).', + type: 'Feature', + subject: 'Simple feature (1).', + body: [ + 'Fix: Simple fix (2)', + '', + 'Other: Simple other change (3).' + ].join( '\n' ), + footer: null, + notes: [] + }; + + const commits = transformCommit( rawCommit ); + + expect( commits[ 0 ].files ).to.equal( files ); + expect( commits[ 1 ].files ).to.equal( files ); + expect( commits[ 2 ].files ).to.equal( files ); + } ); + + it( 'works with non-public commits', () => { + const rawCommit = { + hash: '76b9e058fb1c3fa00b50059cdc684997d0eb2eca', + header: 'Feature: Simple feature (1).', + type: 'Feature', + subject: 'Simple feature (1).', + body: [ + 'Docs: Simple docs change (2)', + '', + 'Internal: Simple internal change (3).' + ].join( '\n' ), + footer: null, + notes: [] + }; + + const commits = transformCommit( rawCommit ); + + expect( commits ).to.be.an( 'Array' ); + expect( commits.length ).to.equal( 3 ); + + expect( commits[ 0 ].isPublicCommit ).to.equal( true ); + expect( commits[ 1 ].isPublicCommit ).to.equal( false ); + expect( commits[ 2 ].isPublicCommit ).to.equal( false ); + } ); + + it( 'handles scoped and non-scoped changes', () => { + const rawCommit = { + hash: '76b9e058fb1c3fa00b50059cdc684997d0eb2eca', + header: 'Feature: Simple feature (1).', + type: 'Feature', + subject: 'Simple feature (1).', + body: [ + 'Fix (foo): Simple fix (2).', + '', + 'Other: Simple other change (3).', + '', + 'Feature (foo, bar): Simple other change (4).' + ].join( '\n' ), + footer: null, + notes: [] + }; + + const commits = transformCommit( rawCommit ); + + expect( commits ).to.be.an( 'Array' ); + expect( commits.length ).to.equal( 4 ); + + expect( commits[ 0 ].scope ).to.equal( null ); + expect( commits[ 1 ].scope ).to.deep.equal( [ 'foo' ] ); + expect( commits[ 2 ].scope ).to.equal( null ); + expect( commits[ 3 ].scope ).to.deep.equal( [ 'bar', 'foo' ] ); + } ); + } ); + } ); + } ); +} ); diff --git a/packages/ckeditor5-dev-env/tests/release-tools/utils/transform-commit/transform-commit-utils.js b/packages/ckeditor5-dev-env/tests/release-tools/utils/transformcommitutils.js similarity index 92% rename from packages/ckeditor5-dev-env/tests/release-tools/utils/transform-commit/transform-commit-utils.js rename to packages/ckeditor5-dev-env/tests/release-tools/utils/transformcommitutils.js index 5cd0e08c1..0fefe7ba9 100644 --- a/packages/ckeditor5-dev-env/tests/release-tools/utils/transform-commit/transform-commit-utils.js +++ b/packages/ckeditor5-dev-env/tests/release-tools/utils/transformcommitutils.js @@ -9,7 +9,7 @@ const expect = require( 'chai' ).expect; const sinon = require( 'sinon' ); const proxyquire = require( 'proxyquire' ); -describe( 'dev-env/release-tools/utils/transform-commit', () => { +describe( 'dev-env/release-tools/utils', () => { let transformCommit, sandbox, stubs; describe( 'transformCommitUtils', () => { @@ -20,8 +20,8 @@ describe( 'dev-env/release-tools/utils/transform-commit', () => { getPackageJson: sandbox.stub() }; - transformCommit = proxyquire( '../../../../lib/release-tools/utils/transform-commit/transform-commit-utils', { - '../getpackagejson': stubs.getPackageJson + transformCommit = proxyquire( '../../../lib/release-tools/utils/transformcommitutils', { + './getpackagejson': stubs.getPackageJson } ); } ); @@ -41,9 +41,9 @@ describe( 'dev-env/release-tools/utils/transform-commit', () => { } ); } ); - describe( 'additionalCommitNotes', () => { + describe( 'MULTI_ENTRIES_COMMIT_REGEXP', () => { it( 'should be defined', () => { - expect( transformCommit.additionalCommitNotes ).to.be.a( 'Object' ); + expect( transformCommit.MULTI_ENTRIES_COMMIT_REGEXP ).to.be.a( 'RegExp' ); } ); } ); @@ -132,11 +132,6 @@ describe( 'dev-env/release-tools/utils/transform-commit', () => { expect( transformCommit.getCommitType( 'Fix' ) ).to.equal( 'Bug fixes' ); expect( transformCommit.getCommitType( 'Other' ) ).to.equal( 'Other changes' ); } ); - - it( 'should support aliases for the "Fix" type', () => { - expect( transformCommit.getCommitType( 'Fixes' ), 'Fixes' ).to.equal( 'Bug fixes' ); - expect( transformCommit.getCommitType( 'Fixed' ), 'Fixed' ).to.equal( 'Bug fixes' ); - } ); } ); describe( 'truncate()', () => { diff --git a/packages/ckeditor5-dev-env/tests/release-tools/utils/versions.js b/packages/ckeditor5-dev-env/tests/release-tools/utils/versions.js index b8bdc01ec..808de71bd 100644 --- a/packages/ckeditor5-dev-env/tests/release-tools/utils/versions.js +++ b/packages/ckeditor5-dev-env/tests/release-tools/utils/versions.js @@ -36,6 +36,12 @@ describe( 'dev-env/release-tools/utils', () => { } ); describe( 'getLastFromChangelog()', () => { + it( 'returns null if the changelog is invalid', () => { + changelogStub.returns( 'Example changelog.' ); + + expect( version.getLastFromChangelog() ).to.equal( null ); + } ); + it( 'returns version from changelog #1', () => { changelogStub.returns( '\n## [1.0.0](...) (2017-04-05)\nSome changelog entry.\n\n## 0.0.1' ); diff --git a/packages/ckeditor5-dev-tests/CHANGELOG.md b/packages/ckeditor5-dev-tests/CHANGELOG.md index c6a29b024..8651a6201 100644 --- a/packages/ckeditor5-dev-tests/CHANGELOG.md +++ b/packages/ckeditor5-dev-tests/CHANGELOG.md @@ -1,6 +1,10 @@ Changelog ========= +All changes in the package are documented in the main repository. See: https://github.com/ckeditor/ckeditor5-dev/blob/master/CHANGELOG.md. + +Changes for the past releases are available below. + ## [19.2.0](https://github.com/ckeditor/ckeditor5-dev/compare/@ckeditor/ckeditor5-dev-tests@19.1.0...@ckeditor/ckeditor5-dev-tests@19.2.0) (2020-05-14) ### Features diff --git a/packages/ckeditor5-dev-tests/package.json b/packages/ckeditor5-dev-tests/package.json index 7c6e07c66..ec03d7541 100644 --- a/packages/ckeditor5-dev-tests/package.json +++ b/packages/ckeditor5-dev-tests/package.json @@ -68,5 +68,9 @@ "license": "GPL-2.0-or-later", "homepage": "https://github.com/ckeditor/ckeditor5-dev/tree/master/packages/ckeditor5-dev-tests", "bugs": "https://github.com/ckeditor/ckeditor5-dev/issues", - "repository": "https://github.com/ckeditor/ckeditor5-dev" + "repository": { + "type": "git", + "url": "https://github.com/ckeditor/ckeditor5-dev.git", + "directory": "packages/ckeditor5-dev-tests" + } } diff --git a/packages/ckeditor5-dev-utils/CHANGELOG.md b/packages/ckeditor5-dev-utils/CHANGELOG.md index 8a5cd5b41..1619ce6f4 100644 --- a/packages/ckeditor5-dev-utils/CHANGELOG.md +++ b/packages/ckeditor5-dev-utils/CHANGELOG.md @@ -1,6 +1,10 @@ Changelog ========= +All changes in the package are documented in the main repository. See: https://github.com/ckeditor/ckeditor5-dev/blob/master/CHANGELOG.md. + +Changes for the past releases are available below. + ## [13.0.1](https://github.com/ckeditor/ckeditor5-dev/compare/@ckeditor/ckeditor5-dev-utils@13.0.0...@ckeditor/ckeditor5-dev-utils@13.0.1) (2020-04-28) ### Bug fixes diff --git a/packages/ckeditor5-dev-utils/package.json b/packages/ckeditor5-dev-utils/package.json index 0e13b2ffc..03d552d6a 100644 --- a/packages/ckeditor5-dev-utils/package.json +++ b/packages/ckeditor5-dev-utils/package.json @@ -40,5 +40,9 @@ "license": "GPL-2.0-or-later", "homepage": "https://github.com/ckeditor/ckeditor5-dev/tree/master/packages/ckeditor5-dev-utils", "bugs": "https://github.com/ckeditor/ckeditor5-dev/issues", - "repository": "https://github.com/ckeditor/ckeditor5-dev" + "repository": { + "type": "git", + "url": "https://github.com/ckeditor/ckeditor5-dev.git", + "directory": "packages/ckeditor5-dev-utils" + } } diff --git a/packages/ckeditor5-dev-webpack-plugin/CHANGELOG.md b/packages/ckeditor5-dev-webpack-plugin/CHANGELOG.md index 016b3aba6..b8300564a 100644 --- a/packages/ckeditor5-dev-webpack-plugin/CHANGELOG.md +++ b/packages/ckeditor5-dev-webpack-plugin/CHANGELOG.md @@ -1,6 +1,10 @@ Changelog ========= +All changes in the package are documented in the main repository. See: https://github.com/ckeditor/ckeditor5-dev/blob/master/CHANGELOG.md. + +Changes for the past releases are available below. + ## [9.0.2](https://github.com/ckeditor/ckeditor5-dev/compare/@ckeditor/ckeditor5-dev-webpack-plugin@9.0.0...@ckeditor/ckeditor5-dev-webpack-plugin@9.0.2) (2020-05-13) Internal changes only (updated dependencies, documentation, etc.). diff --git a/packages/ckeditor5-dev-webpack-plugin/package.json b/packages/ckeditor5-dev-webpack-plugin/package.json index 4b2f3e2ef..2ca6a2f8f 100644 --- a/packages/ckeditor5-dev-webpack-plugin/package.json +++ b/packages/ckeditor5-dev-webpack-plugin/package.json @@ -24,5 +24,9 @@ "license": "GPL-2.0-or-later", "homepage": "https://github.com/ckeditor/ckeditor5-dev/tree/master/packages/ckeditor5-dev-webpack-plugin", "bugs": "https://github.com/ckeditor/ckeditor5-dev/issues", - "repository": "https://github.com/ckeditor/ckeditor5-dev" + "repository": { + "type": "git", + "url": "https://github.com/ckeditor/ckeditor5-dev.git", + "directory": "packages/ckeditor5-dev-webpack-plugin" + } } diff --git a/packages/jsdoc-plugins/CHANGELOG.md b/packages/jsdoc-plugins/CHANGELOG.md index 43ff5ea64..36118c29a 100644 --- a/packages/jsdoc-plugins/CHANGELOG.md +++ b/packages/jsdoc-plugins/CHANGELOG.md @@ -1,6 +1,10 @@ Changelog ========= +All changes in the package are documented in the main repository. See: https://github.com/ckeditor/ckeditor5-dev/blob/master/CHANGELOG.md. + +Changes for the past releases are available below. + ## [3.0.9](https://github.com/ckeditor/ckeditor5-dev/compare/@ckeditor/jsdoc-plugins@3.0.8...@ckeditor/jsdoc-plugins@3.0.9) (2020-02-26) Internal changes only (updated dependencies, documentation, etc.). diff --git a/packages/jsdoc-plugins/package.json b/packages/jsdoc-plugins/package.json index 4467b1678..66191653d 100644 --- a/packages/jsdoc-plugins/package.json +++ b/packages/jsdoc-plugins/package.json @@ -30,5 +30,9 @@ "license": "MIT", "homepage": "https://github.com/ckeditor/ckeditor5-dev/tree/master/packages/jsdoc-plugins", "bugs": "https://github.com/ckeditor/ckeditor5-dev/issues", - "repository": "https://github.com/ckeditor/ckeditor5-dev" + "repository": { + "type": "git", + "url": "https://github.com/ckeditor/ckeditor5-dev.git", + "directory": "packages/jsdoc-plugins" + } } diff --git a/scripts/bump-versions.js b/scripts/bump-versions.js new file mode 100755 index 000000000..ff4ab56db --- /dev/null +++ b/scripts/bump-versions.js @@ -0,0 +1,31 @@ +#!/usr/bin/env node + +/** + * @license Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license + */ + +/* eslint-env node */ + +'use strict'; + +// This scripts preparing all packages to release: +// - checking what should be released, +// - updates version of all dependencies for all packages, +// - validates the whole process (whether the changes could be published), +// - tagging new versions. +// +// You can test the whole process using `dry-run` mode. It won't change anything in the project +// and any repository. +// +// This task must be called before: `yarn run release:publish`. +// +// Use: +// yarn run release:bump-version --dry-run + +require( '../packages/ckeditor5-dev-env' ) + .bumpVersions( { + cwd: process.cwd(), + packages: 'packages', + dryRun: process.argv.includes( '--dry-run' ) + } ); diff --git a/scripts/changelog.js b/scripts/changelog.js index 854405404..4286e6917 100755 --- a/scripts/changelog.js +++ b/scripts/changelog.js @@ -8,7 +8,15 @@ 'use strict'; require( '../packages/ckeditor5-dev-env' ) - .generateChangelogForSubPackages( { + .generateChangelogForMonoRepository( { cwd: process.cwd(), - packages: 'packages' + packages: 'packages', + from: 'e0728059369dba60b77e2bb903ed1b1a6f25501f', // TODO: Remove the line after the nearest release. + transformScope: name => { + if ( name === 'jsdoc' ) { + return 'https://www.npmjs.com/package/@ckeditor/jsdoc-plugins'; + } + + return 'https://www.npmjs.com/package/@ckeditor/ckeditor5-dev-' + name; + } } ); diff --git a/scripts/publish.js b/scripts/publish.js new file mode 100755 index 000000000..8b0abfbc7 --- /dev/null +++ b/scripts/publish.js @@ -0,0 +1,32 @@ +#!/usr/bin/env node + +/** + * @license Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license + */ + +/* eslint-env node */ + +'use strict'; + +// This scripts publish changes. +// +// You can test the whole process using `dry-run` mode. It won't change anything in the project +// and any repository. Nothing will be pushed. Instead of `npm publish`, the `npm pack` command will be called. +// +// Note: This task based on versions published on NPM and GitHub. If something went wrong, you can call this script one more time. +// +// This task should be executed after: `yarn run release:bump-version`. +// +// Use: +// yarn run release:publish --dry-run + +require( '../packages/ckeditor5-dev-env' ) + .releaseSubRepositories( { + cwd: process.cwd(), + packages: 'packages', + skipNpmPublish: [ + 'ckeditor5-dev' + ], + dryRun: process.argv.includes( '--dry-run' ) + } ); diff --git a/yarn.lock b/yarn.lock index a6c70806e..aaa03154a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10,18 +10,18 @@ "@babel/highlight" "^7.8.3" "@babel/core@^7.0.0": - version "7.9.0" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.9.0.tgz#ac977b538b77e132ff706f3b8a4dbad09c03c56e" - integrity sha512-kWc7L0fw1xwvI0zi8OKVBuxRVefwGOrKSQMvrQ3dW+bIIavBY3/NpXmpjMy7bQnLgwgzWQZ8TlM57YHpHNHz4w== + version "7.9.6" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.9.6.tgz#d9aa1f580abf3b2286ef40b6904d390904c63376" + integrity sha512-nD3deLvbsApbHAHttzIssYqgb883yU/d9roe4RZymBCDaZryMJDbptVpEpeQuRh4BJ+SYI8le9YGxKvFEvl1Wg== dependencies: "@babel/code-frame" "^7.8.3" - "@babel/generator" "^7.9.0" + "@babel/generator" "^7.9.6" "@babel/helper-module-transforms" "^7.9.0" - "@babel/helpers" "^7.9.0" - "@babel/parser" "^7.9.0" + "@babel/helpers" "^7.9.6" + "@babel/parser" "^7.9.6" "@babel/template" "^7.8.6" - "@babel/traverse" "^7.9.0" - "@babel/types" "^7.9.0" + "@babel/traverse" "^7.9.6" + "@babel/types" "^7.9.6" convert-source-map "^1.7.0" debug "^4.1.0" gensync "^1.0.0-beta.1" @@ -31,12 +31,12 @@ semver "^5.4.1" source-map "^0.5.0" -"@babel/generator@^7.9.0", "@babel/generator@^7.9.5": - version "7.9.5" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.9.5.tgz#27f0917741acc41e6eaaced6d68f96c3fa9afaf9" - integrity sha512-GbNIxVB3ZJe3tLeDm1HSn2AhuD/mVcyLDpgtLXa5tplmWrJdF/elxB56XNqCuD6szyNkDi6wuoKXln3QeBmCHQ== +"@babel/generator@^7.9.6": + version "7.9.6" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.9.6.tgz#5408c82ac5de98cda0d77d8124e99fa1f2170a43" + integrity sha512-+htwWKJbH2bL72HRluF8zumBxzuX0ZZUFl3JLNyoUjM/Ho8wnVpPXM6aUz8cfKDqQ/h7zHqKt4xzJteUosckqQ== dependencies: - "@babel/types" "^7.9.5" + "@babel/types" "^7.9.6" jsesc "^2.5.1" lodash "^4.17.13" source-map "^0.5.0" @@ -92,14 +92,14 @@ "@babel/types" "^7.8.3" "@babel/helper-replace-supers@^7.8.6": - version "7.8.6" - resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.8.6.tgz#5ada744fd5ad73203bf1d67459a27dcba67effc8" - integrity sha512-PeMArdA4Sv/Wf4zXwBKPqVj7n9UF/xg6slNRtZW84FM7JpE1CbG8B612FyM4cxrf4fMAMGO0kR7voy1ForHHFA== + version "7.9.6" + resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.9.6.tgz#03149d7e6a5586ab6764996cd31d6981a17e1444" + integrity sha512-qX+chbxkbArLyCImk3bWV+jB5gTNU/rsze+JlcF6Nf8tVTigPJSI1o1oBow/9Resa1yehUO9lIipsmu9oG4RzA== dependencies: "@babel/helper-member-expression-to-functions" "^7.8.3" "@babel/helper-optimise-call-expression" "^7.8.3" - "@babel/traverse" "^7.8.6" - "@babel/types" "^7.8.6" + "@babel/traverse" "^7.9.6" + "@babel/types" "^7.9.6" "@babel/helper-simple-access@^7.8.3": version "7.8.3" @@ -121,14 +121,14 @@ resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.9.5.tgz#90977a8e6fbf6b431a7dc31752eee233bf052d80" integrity sha512-/8arLKUFq882w4tWGj9JYzRpAlZgiWUJ+dtteNTDqrRBz9Iguck9Rn3ykuBDoUwh2TO4tSAJlrxDUOXWklJe4g== -"@babel/helpers@^7.9.0": - version "7.9.2" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.9.2.tgz#b42a81a811f1e7313b88cba8adc66b3d9ae6c09f" - integrity sha512-JwLvzlXVPjO8eU9c/wF9/zOIN7X6h8DYf7mG4CiFRZRvZNKEF5dQ3H3V+ASkHoIB3mWhatgl5ONhyqHRI6MppA== +"@babel/helpers@^7.9.6": + version "7.9.6" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.9.6.tgz#092c774743471d0bb6c7de3ad465ab3d3486d580" + integrity sha512-tI4bUbldloLcHWoRUMAj4g1bF313M/o6fBKhIsb3QnGVPwRm9JsNf/gqMkQ7zjqReABiffPV6RWj7hEglID5Iw== dependencies: "@babel/template" "^7.8.3" - "@babel/traverse" "^7.9.0" - "@babel/types" "^7.9.0" + "@babel/traverse" "^7.9.6" + "@babel/types" "^7.9.6" "@babel/highlight@^7.8.3": version "7.9.0" @@ -139,10 +139,10 @@ chalk "^2.0.0" js-tokens "^4.0.0" -"@babel/parser@^7.6.4", "@babel/parser@^7.8.6", "@babel/parser@^7.9.0": - version "7.9.4" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.9.4.tgz#68a35e6b0319bbc014465be43828300113f2f2e8" - integrity sha512-bC49otXX6N0/VYhgOMh4gnP26E9xnDZK3TmbNpxYzzz9BQLBosQwfyOe9/cXUU3txYhTzLCbcqd5c8y/OmCjHA== +"@babel/parser@^7.6.4", "@babel/parser@^7.8.6", "@babel/parser@^7.9.6": + version "7.9.6" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.9.6.tgz#3b1bbb30dabe600cd72db58720998376ff653bc7" + integrity sha512-AoeIEJn8vt+d/6+PXDRPaksYhnlbMIiejioBZvvMQsOjW/JYK6k/0dKnvvP3EhK5GfMBWDPtrxRtegWdAcdq9Q== "@babel/template@^7.8.3", "@babel/template@^7.8.6": version "7.8.6" @@ -153,25 +153,25 @@ "@babel/parser" "^7.8.6" "@babel/types" "^7.8.6" -"@babel/traverse@^7.6.3", "@babel/traverse@^7.8.6", "@babel/traverse@^7.9.0": - version "7.9.5" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.9.5.tgz#6e7c56b44e2ac7011a948c21e283ddd9d9db97a2" - integrity sha512-c4gH3jsvSuGUezlP6rzSJ6jf8fYjLj3hsMZRx/nX0h+fmHN0w+ekubRrHPqnMec0meycA2nwCsJ7dC8IPem2FQ== +"@babel/traverse@^7.6.3", "@babel/traverse@^7.9.6": + version "7.9.6" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.9.6.tgz#5540d7577697bf619cc57b92aa0f1c231a94f442" + integrity sha512-b3rAHSjbxy6VEAvlxM8OV/0X4XrG72zoxme6q1MOoe2vd0bEc+TwayhuC1+Dfgqh1QEG+pj7atQqvUprHIccsg== dependencies: "@babel/code-frame" "^7.8.3" - "@babel/generator" "^7.9.5" + "@babel/generator" "^7.9.6" "@babel/helper-function-name" "^7.9.5" "@babel/helper-split-export-declaration" "^7.8.3" - "@babel/parser" "^7.9.0" - "@babel/types" "^7.9.5" + "@babel/parser" "^7.9.6" + "@babel/types" "^7.9.6" debug "^4.1.0" globals "^11.1.0" lodash "^4.17.13" -"@babel/types@^7.8.3", "@babel/types@^7.8.6", "@babel/types@^7.9.0", "@babel/types@^7.9.5": - version "7.9.5" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.9.5.tgz#89231f82915a8a566a703b3b20133f73da6b9444" - integrity sha512-XjnvNqenk818r5zMaba+sLQjnbda31UfUURv3ei0qPQw4u+j2jMyJ5b11y8ZHYTRSI3NnInQkkkRT4fLqqPdHg== +"@babel/types@^7.8.3", "@babel/types@^7.8.6", "@babel/types@^7.9.0", "@babel/types@^7.9.5", "@babel/types@^7.9.6": + version "7.9.6" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.9.6.tgz#2c5502b427251e9de1bd2dff95add646d95cc9f7" + integrity sha512-qxXzvBO//jO9ZnoasKF1uJzHd2+M6Q2ZPIVfnFps8JJvXy0ZBbwbNOmE6SGIY5XOY6d1Bo5lb9d9RJ8nv3WSeA== dependencies: "@babel/helper-validator-identifier" "^7.9.5" lodash "^4.17.13" @@ -182,765 +182,6 @@ resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-inspector/-/ckeditor5-inspector-2.0.0.tgz#378ef4ca5dbdf652b04b50ca9455b3f5b00aa899" integrity sha512-o446mgCwat0NLXZdE7w+h/Vu6Slh2e4I050Y3jN/ZF6qmh/MKlwknpUF1jBYYfVWCqlcn9JjpK1f9CnBIyB/KA== -"@evocateur/libnpmaccess@^3.1.2": - version "3.1.2" - resolved "https://registry.yarnpkg.com/@evocateur/libnpmaccess/-/libnpmaccess-3.1.2.tgz#ecf7f6ce6b004e9f942b098d92200be4a4b1c845" - integrity sha512-KSCAHwNWro0CF2ukxufCitT9K5LjL/KuMmNzSu8wuwN2rjyKHD8+cmOsiybK+W5hdnwc5M1SmRlVCaMHQo+3rg== - dependencies: - "@evocateur/npm-registry-fetch" "^4.0.0" - aproba "^2.0.0" - figgy-pudding "^3.5.1" - get-stream "^4.0.0" - npm-package-arg "^6.1.0" - -"@evocateur/libnpmpublish@^1.2.2": - version "1.2.2" - resolved "https://registry.yarnpkg.com/@evocateur/libnpmpublish/-/libnpmpublish-1.2.2.tgz#55df09d2dca136afba9c88c759ca272198db9f1a" - integrity sha512-MJrrk9ct1FeY9zRlyeoyMieBjGDG9ihyyD9/Ft6MMrTxql9NyoEx2hw9casTIP4CdqEVu+3nQ2nXxoJ8RCXyFg== - dependencies: - "@evocateur/npm-registry-fetch" "^4.0.0" - aproba "^2.0.0" - figgy-pudding "^3.5.1" - get-stream "^4.0.0" - lodash.clonedeep "^4.5.0" - normalize-package-data "^2.4.0" - npm-package-arg "^6.1.0" - semver "^5.5.1" - ssri "^6.0.1" - -"@evocateur/npm-registry-fetch@^4.0.0": - version "4.0.0" - resolved "https://registry.yarnpkg.com/@evocateur/npm-registry-fetch/-/npm-registry-fetch-4.0.0.tgz#8c4c38766d8d32d3200fcb0a83f064b57365ed66" - integrity sha512-k1WGfKRQyhJpIr+P17O5vLIo2ko1PFLKwoetatdduUSt/aQ4J2sJrJwwatdI5Z3SiYk/mRH9S3JpdmMFd/IK4g== - dependencies: - JSONStream "^1.3.4" - bluebird "^3.5.1" - figgy-pudding "^3.4.1" - lru-cache "^5.1.1" - make-fetch-happen "^5.0.0" - npm-package-arg "^6.1.0" - safe-buffer "^5.1.2" - -"@evocateur/pacote@^9.6.3": - version "9.6.5" - resolved "https://registry.yarnpkg.com/@evocateur/pacote/-/pacote-9.6.5.tgz#33de32ba210b6f17c20ebab4d497efc6755f4ae5" - integrity sha512-EI552lf0aG2nOV8NnZpTxNo2PcXKPmDbF9K8eCBFQdIZwHNGN/mi815fxtmUMa2wTa1yndotICIDt/V0vpEx2w== - dependencies: - "@evocateur/npm-registry-fetch" "^4.0.0" - bluebird "^3.5.3" - cacache "^12.0.3" - chownr "^1.1.2" - figgy-pudding "^3.5.1" - get-stream "^4.1.0" - glob "^7.1.4" - infer-owner "^1.0.4" - lru-cache "^5.1.1" - make-fetch-happen "^5.0.0" - minimatch "^3.0.4" - minipass "^2.3.5" - mississippi "^3.0.0" - mkdirp "^0.5.1" - normalize-package-data "^2.5.0" - npm-package-arg "^6.1.0" - npm-packlist "^1.4.4" - npm-pick-manifest "^3.0.0" - osenv "^0.1.5" - promise-inflight "^1.0.1" - promise-retry "^1.1.1" - protoduck "^5.0.1" - rimraf "^2.6.3" - safe-buffer "^5.2.0" - semver "^5.7.0" - ssri "^6.0.1" - tar "^4.4.10" - unique-filename "^1.1.1" - which "^1.3.1" - -"@lerna/add@3.20.0": - version "3.20.0" - resolved "https://registry.yarnpkg.com/@lerna/add/-/add-3.20.0.tgz#bea7edf36fc93fb72ec34cb9ba854c48d4abf309" - integrity sha512-AnH1oRIEEg/VDa3SjYq4x1/UglEAvrZuV0WssHUMN81RTZgQk3we+Mv3qZNddrZ/fBcZu2IAdN/EQ3+ie2JxKQ== - dependencies: - "@evocateur/pacote" "^9.6.3" - "@lerna/bootstrap" "3.20.0" - "@lerna/command" "3.18.5" - "@lerna/filter-options" "3.20.0" - "@lerna/npm-conf" "3.16.0" - "@lerna/validation-error" "3.13.0" - dedent "^0.7.0" - npm-package-arg "^6.1.0" - p-map "^2.1.0" - semver "^6.2.0" - -"@lerna/bootstrap@3.20.0": - version "3.20.0" - resolved "https://registry.yarnpkg.com/@lerna/bootstrap/-/bootstrap-3.20.0.tgz#635d71046830f208e851ab429a63da1747589e37" - integrity sha512-Wylullx3uthKE7r4izo09qeRGL20Y5yONlQEjPCfnbxCC2Elu+QcPu4RC6kqKQ7b+g7pdC3OOgcHZjngrwr5XQ== - dependencies: - "@lerna/command" "3.18.5" - "@lerna/filter-options" "3.20.0" - "@lerna/has-npm-version" "3.16.5" - "@lerna/npm-install" "3.16.5" - "@lerna/package-graph" "3.18.5" - "@lerna/pulse-till-done" "3.13.0" - "@lerna/rimraf-dir" "3.16.5" - "@lerna/run-lifecycle" "3.16.2" - "@lerna/run-topologically" "3.18.5" - "@lerna/symlink-binary" "3.17.0" - "@lerna/symlink-dependencies" "3.17.0" - "@lerna/validation-error" "3.13.0" - dedent "^0.7.0" - get-port "^4.2.0" - multimatch "^3.0.0" - npm-package-arg "^6.1.0" - npmlog "^4.1.2" - p-finally "^1.0.0" - p-map "^2.1.0" - p-map-series "^1.0.0" - p-waterfall "^1.0.0" - read-package-tree "^5.1.6" - semver "^6.2.0" - -"@lerna/changed@3.20.0": - version "3.20.0" - resolved "https://registry.yarnpkg.com/@lerna/changed/-/changed-3.20.0.tgz#66b97ebd6c8f8d207152ee524a0791846a9097ae" - integrity sha512-+hzMFSldbRPulZ0vbKk6RD9f36gaH3Osjx34wrrZ62VB4pKmjyuS/rxVYkCA3viPLHoiIw2F8zHM5BdYoDSbjw== - dependencies: - "@lerna/collect-updates" "3.20.0" - "@lerna/command" "3.18.5" - "@lerna/listable" "3.18.5" - "@lerna/output" "3.13.0" - -"@lerna/check-working-tree@3.16.5": - version "3.16.5" - resolved "https://registry.yarnpkg.com/@lerna/check-working-tree/-/check-working-tree-3.16.5.tgz#b4f8ae61bb4523561dfb9f8f8d874dd46bb44baa" - integrity sha512-xWjVBcuhvB8+UmCSb5tKVLB5OuzSpw96WEhS2uz6hkWVa/Euh1A0/HJwn2cemyK47wUrCQXtczBUiqnq9yX5VQ== - dependencies: - "@lerna/collect-uncommitted" "3.16.5" - "@lerna/describe-ref" "3.16.5" - "@lerna/validation-error" "3.13.0" - -"@lerna/child-process@3.16.5": - version "3.16.5" - resolved "https://registry.yarnpkg.com/@lerna/child-process/-/child-process-3.16.5.tgz#38fa3c18064aa4ac0754ad80114776a7b36a69b2" - integrity sha512-vdcI7mzei9ERRV4oO8Y1LHBZ3A5+ampRKg1wq5nutLsUA4mEBN6H7JqjWOMY9xZemv6+kATm2ofjJ3lW5TszQg== - dependencies: - chalk "^2.3.1" - execa "^1.0.0" - strong-log-transformer "^2.0.0" - -"@lerna/clean@3.20.0": - version "3.20.0" - resolved "https://registry.yarnpkg.com/@lerna/clean/-/clean-3.20.0.tgz#ba777e373ddeae63e57860df75d47a9e5264c5b2" - integrity sha512-9ZdYrrjQvR5wNXmHfDsfjWjp0foOkCwKe3hrckTzkAeQA1ibyz5llGwz5e1AeFrV12e2/OLajVqYfe+qdkZUgg== - dependencies: - "@lerna/command" "3.18.5" - "@lerna/filter-options" "3.20.0" - "@lerna/prompt" "3.18.5" - "@lerna/pulse-till-done" "3.13.0" - "@lerna/rimraf-dir" "3.16.5" - p-map "^2.1.0" - p-map-series "^1.0.0" - p-waterfall "^1.0.0" - -"@lerna/cli@3.18.5": - version "3.18.5" - resolved "https://registry.yarnpkg.com/@lerna/cli/-/cli-3.18.5.tgz#c90c461542fcd35b6d5b015a290fb0dbfb41d242" - integrity sha512-erkbxkj9jfc89vVs/jBLY/fM0I80oLmJkFUV3Q3wk9J3miYhP14zgVEBsPZY68IZlEjT6T3Xlq2xO1AVaatHsA== - dependencies: - "@lerna/global-options" "3.13.0" - dedent "^0.7.0" - npmlog "^4.1.2" - yargs "^14.2.2" - -"@lerna/collect-uncommitted@3.16.5": - version "3.16.5" - resolved "https://registry.yarnpkg.com/@lerna/collect-uncommitted/-/collect-uncommitted-3.16.5.tgz#a494d61aac31cdc7aec4bbe52c96550274132e63" - integrity sha512-ZgqnGwpDZiWyzIQVZtQaj9tRizsL4dUOhuOStWgTAw1EMe47cvAY2kL709DzxFhjr6JpJSjXV5rZEAeU3VE0Hg== - dependencies: - "@lerna/child-process" "3.16.5" - chalk "^2.3.1" - figgy-pudding "^3.5.1" - npmlog "^4.1.2" - -"@lerna/collect-updates@3.20.0": - version "3.20.0" - resolved "https://registry.yarnpkg.com/@lerna/collect-updates/-/collect-updates-3.20.0.tgz#62f9d76ba21a25b7d9fbf31c02de88744a564bd1" - integrity sha512-qBTVT5g4fupVhBFuY4nI/3FSJtQVcDh7/gEPOpRxoXB/yCSnT38MFHXWl+y4einLciCjt/+0x6/4AG80fjay2Q== - dependencies: - "@lerna/child-process" "3.16.5" - "@lerna/describe-ref" "3.16.5" - minimatch "^3.0.4" - npmlog "^4.1.2" - slash "^2.0.0" - -"@lerna/command@3.18.5": - version "3.18.5" - resolved "https://registry.yarnpkg.com/@lerna/command/-/command-3.18.5.tgz#14c6d2454adbfd365f8027201523e6c289cd3cd9" - integrity sha512-36EnqR59yaTU4HrR1C9XDFti2jRx0BgpIUBeWn129LZZB8kAB3ov1/dJNa1KcNRKp91DncoKHLY99FZ6zTNpMQ== - dependencies: - "@lerna/child-process" "3.16.5" - "@lerna/package-graph" "3.18.5" - "@lerna/project" "3.18.0" - "@lerna/validation-error" "3.13.0" - "@lerna/write-log-file" "3.13.0" - clone-deep "^4.0.1" - dedent "^0.7.0" - execa "^1.0.0" - is-ci "^2.0.0" - npmlog "^4.1.2" - -"@lerna/conventional-commits@3.18.5": - version "3.18.5" - resolved "https://registry.yarnpkg.com/@lerna/conventional-commits/-/conventional-commits-3.18.5.tgz#08efd2e5b45acfaf3f151a53a3ec7ecade58a7bc" - integrity sha512-qcvXIEJ3qSgalxXnQ7Yxp5H9Ta5TVyai6vEor6AAEHc20WiO7UIdbLDCxBtiiHMdGdpH85dTYlsoYUwsCJu3HQ== - dependencies: - "@lerna/validation-error" "3.13.0" - conventional-changelog-angular "^5.0.3" - conventional-changelog-core "^3.1.6" - conventional-recommended-bump "^5.0.0" - fs-extra "^8.1.0" - get-stream "^4.0.0" - lodash.template "^4.5.0" - npm-package-arg "^6.1.0" - npmlog "^4.1.2" - pify "^4.0.1" - semver "^6.2.0" - -"@lerna/create-symlink@3.16.2": - version "3.16.2" - resolved "https://registry.yarnpkg.com/@lerna/create-symlink/-/create-symlink-3.16.2.tgz#412cb8e59a72f5a7d9463e4e4721ad2070149967" - integrity sha512-pzXIJp6av15P325sgiIRpsPXLFmkisLhMBCy4764d+7yjf2bzrJ4gkWVMhsv4AdF0NN3OyZ5jjzzTtLNqfR+Jw== - dependencies: - "@zkochan/cmd-shim" "^3.1.0" - fs-extra "^8.1.0" - npmlog "^4.1.2" - -"@lerna/create@3.18.5": - version "3.18.5" - resolved "https://registry.yarnpkg.com/@lerna/create/-/create-3.18.5.tgz#11ac539f069248eaf7bc4c42e237784330f4fc47" - integrity sha512-cHpjocbpKmLopCuZFI7cKEM3E/QY8y+yC7VtZ4FQRSaLU8D8i2xXtXmYaP1GOlVNavji0iwoXjuNpnRMInIr2g== - dependencies: - "@evocateur/pacote" "^9.6.3" - "@lerna/child-process" "3.16.5" - "@lerna/command" "3.18.5" - "@lerna/npm-conf" "3.16.0" - "@lerna/validation-error" "3.13.0" - camelcase "^5.0.0" - dedent "^0.7.0" - fs-extra "^8.1.0" - globby "^9.2.0" - init-package-json "^1.10.3" - npm-package-arg "^6.1.0" - p-reduce "^1.0.0" - pify "^4.0.1" - semver "^6.2.0" - slash "^2.0.0" - validate-npm-package-license "^3.0.3" - validate-npm-package-name "^3.0.0" - whatwg-url "^7.0.0" - -"@lerna/describe-ref@3.16.5": - version "3.16.5" - resolved "https://registry.yarnpkg.com/@lerna/describe-ref/-/describe-ref-3.16.5.tgz#a338c25aaed837d3dc70b8a72c447c5c66346ac0" - integrity sha512-c01+4gUF0saOOtDBzbLMFOTJDHTKbDFNErEY6q6i9QaXuzy9LNN62z+Hw4acAAZuJQhrVWncVathcmkkjvSVGw== - dependencies: - "@lerna/child-process" "3.16.5" - npmlog "^4.1.2" - -"@lerna/diff@3.18.5": - version "3.18.5" - resolved "https://registry.yarnpkg.com/@lerna/diff/-/diff-3.18.5.tgz#e9e2cb882f84d5b84f0487c612137305f07accbc" - integrity sha512-u90lGs+B8DRA9Z/2xX4YaS3h9X6GbypmGV6ITzx9+1Ga12UWGTVlKaCXBgONMBjzJDzAQOK8qPTwLA57SeBLgA== - dependencies: - "@lerna/child-process" "3.16.5" - "@lerna/command" "3.18.5" - "@lerna/validation-error" "3.13.0" - npmlog "^4.1.2" - -"@lerna/exec@3.20.0": - version "3.20.0" - resolved "https://registry.yarnpkg.com/@lerna/exec/-/exec-3.20.0.tgz#29f0c01aee2340eb46f90706731fef2062a49639" - integrity sha512-pS1mmC7kzV668rHLWuv31ClngqeXjeHC8kJuM+W2D6IpUVMGQHLcCTYLudFgQsuKGVpl0DGNYG+sjLhAPiiu6A== - dependencies: - "@lerna/child-process" "3.16.5" - "@lerna/command" "3.18.5" - "@lerna/filter-options" "3.20.0" - "@lerna/profiler" "3.20.0" - "@lerna/run-topologically" "3.18.5" - "@lerna/validation-error" "3.13.0" - p-map "^2.1.0" - -"@lerna/filter-options@3.20.0": - version "3.20.0" - resolved "https://registry.yarnpkg.com/@lerna/filter-options/-/filter-options-3.20.0.tgz#0f0f5d5a4783856eece4204708cc902cbc8af59b" - integrity sha512-bmcHtvxn7SIl/R9gpiNMVG7yjx7WyT0HSGw34YVZ9B+3xF/83N3r5Rgtjh4hheLZ+Q91Or0Jyu5O3Nr+AwZe2g== - dependencies: - "@lerna/collect-updates" "3.20.0" - "@lerna/filter-packages" "3.18.0" - dedent "^0.7.0" - figgy-pudding "^3.5.1" - npmlog "^4.1.2" - -"@lerna/filter-packages@3.18.0": - version "3.18.0" - resolved "https://registry.yarnpkg.com/@lerna/filter-packages/-/filter-packages-3.18.0.tgz#6a7a376d285208db03a82958cfb8172e179b4e70" - integrity sha512-6/0pMM04bCHNATIOkouuYmPg6KH3VkPCIgTfQmdkPJTullERyEQfNUKikrefjxo1vHOoCACDpy65JYyKiAbdwQ== - dependencies: - "@lerna/validation-error" "3.13.0" - multimatch "^3.0.0" - npmlog "^4.1.2" - -"@lerna/get-npm-exec-opts@3.13.0": - version "3.13.0" - resolved "https://registry.yarnpkg.com/@lerna/get-npm-exec-opts/-/get-npm-exec-opts-3.13.0.tgz#d1b552cb0088199fc3e7e126f914e39a08df9ea5" - integrity sha512-Y0xWL0rg3boVyJk6An/vurKzubyJKtrxYv2sj4bB8Mc5zZ3tqtv0ccbOkmkXKqbzvNNF7VeUt1OJ3DRgtC/QZw== - dependencies: - npmlog "^4.1.2" - -"@lerna/get-packed@3.16.0": - version "3.16.0" - resolved "https://registry.yarnpkg.com/@lerna/get-packed/-/get-packed-3.16.0.tgz#1b316b706dcee86c7baa55e50b087959447852ff" - integrity sha512-AjsFiaJzo1GCPnJUJZiTW6J1EihrPkc2y3nMu6m3uWFxoleklsSCyImumzVZJssxMi3CPpztj8LmADLedl9kXw== - dependencies: - fs-extra "^8.1.0" - ssri "^6.0.1" - tar "^4.4.8" - -"@lerna/github-client@3.16.5": - version "3.16.5" - resolved "https://registry.yarnpkg.com/@lerna/github-client/-/github-client-3.16.5.tgz#2eb0235c3bf7a7e5d92d73e09b3761ab21f35c2e" - integrity sha512-rHQdn8Dv/CJrO3VouOP66zAcJzrHsm+wFuZ4uGAai2At2NkgKH+tpNhQy2H1PSC0Ezj9LxvdaHYrUzULqVK5Hw== - dependencies: - "@lerna/child-process" "3.16.5" - "@octokit/plugin-enterprise-rest" "^3.6.1" - "@octokit/rest" "^16.28.4" - git-url-parse "^11.1.2" - npmlog "^4.1.2" - -"@lerna/gitlab-client@3.15.0": - version "3.15.0" - resolved "https://registry.yarnpkg.com/@lerna/gitlab-client/-/gitlab-client-3.15.0.tgz#91f4ec8c697b5ac57f7f25bd50fe659d24aa96a6" - integrity sha512-OsBvRSejHXUBMgwWQqNoioB8sgzL/Pf1pOUhHKtkiMl6aAWjklaaq5HPMvTIsZPfS6DJ9L5OK2GGZuooP/5c8Q== - dependencies: - node-fetch "^2.5.0" - npmlog "^4.1.2" - whatwg-url "^7.0.0" - -"@lerna/global-options@3.13.0": - version "3.13.0" - resolved "https://registry.yarnpkg.com/@lerna/global-options/-/global-options-3.13.0.tgz#217662290db06ad9cf2c49d8e3100ee28eaebae1" - integrity sha512-SlZvh1gVRRzYLVluz9fryY1nJpZ0FHDGB66U9tFfvnnxmueckRQxLopn3tXj3NU1kc3QANT2I5BsQkOqZ4TEFQ== - -"@lerna/has-npm-version@3.16.5": - version "3.16.5" - resolved "https://registry.yarnpkg.com/@lerna/has-npm-version/-/has-npm-version-3.16.5.tgz#ab83956f211d8923ea6afe9b979b38cc73b15326" - integrity sha512-WL7LycR9bkftyqbYop5rEGJ9sRFIV55tSGmbN1HLrF9idwOCD7CLrT64t235t3t4O5gehDnwKI5h2U3oxTrF8Q== - dependencies: - "@lerna/child-process" "3.16.5" - semver "^6.2.0" - -"@lerna/import@3.18.5": - version "3.18.5" - resolved "https://registry.yarnpkg.com/@lerna/import/-/import-3.18.5.tgz#a9c7d8601870729851293c10abd18b3707f7ba5e" - integrity sha512-PH0WVLEgp+ORyNKbGGwUcrueW89K3Iuk/DDCz8mFyG2IG09l/jOF0vzckEyGyz6PO5CMcz4TI1al/qnp3FrahQ== - dependencies: - "@lerna/child-process" "3.16.5" - "@lerna/command" "3.18.5" - "@lerna/prompt" "3.18.5" - "@lerna/pulse-till-done" "3.13.0" - "@lerna/validation-error" "3.13.0" - dedent "^0.7.0" - fs-extra "^8.1.0" - p-map-series "^1.0.0" - -"@lerna/info@3.20.0": - version "3.20.0" - resolved "https://registry.yarnpkg.com/@lerna/info/-/info-3.20.0.tgz#3a5212f3029f2bc6255f9533bdf4bcb120ef329a" - integrity sha512-Rsz+KQF9mczbGUbPTrtOed1N0C+cA08Qz0eX/oI+NNjvsryZIju/o7uedG4I3P55MBiAioNrJI88fHH3eTgYug== - dependencies: - "@lerna/command" "3.18.5" - "@lerna/output" "3.13.0" - envinfo "^7.3.1" - -"@lerna/init@3.18.5": - version "3.18.5" - resolved "https://registry.yarnpkg.com/@lerna/init/-/init-3.18.5.tgz#86dd0b2b3290755a96975069b5cb007f775df9f5" - integrity sha512-oCwipWrha98EcJAHm8AGd2YFFLNI7AW9AWi0/LbClj1+XY9ah+uifXIgYGfTk63LbgophDd8936ZEpHMxBsbAg== - dependencies: - "@lerna/child-process" "3.16.5" - "@lerna/command" "3.18.5" - fs-extra "^8.1.0" - p-map "^2.1.0" - write-json-file "^3.2.0" - -"@lerna/link@3.18.5": - version "3.18.5" - resolved "https://registry.yarnpkg.com/@lerna/link/-/link-3.18.5.tgz#f24347e4f0b71d54575bd37cfa1794bc8ee91b18" - integrity sha512-xTN3vktJpkT7Nqc3QkZRtHO4bT5NvuLMtKNIBDkks0HpGxC9PRyyqwOoCoh1yOGbrWIuDezhfMg3Qow+6I69IQ== - dependencies: - "@lerna/command" "3.18.5" - "@lerna/package-graph" "3.18.5" - "@lerna/symlink-dependencies" "3.17.0" - p-map "^2.1.0" - slash "^2.0.0" - -"@lerna/list@3.20.0": - version "3.20.0" - resolved "https://registry.yarnpkg.com/@lerna/list/-/list-3.20.0.tgz#7e67cc29c5cf661cfd097e8a7c2d3dcce7a81029" - integrity sha512-fXTicPrfioVnRzknyPawmYIVkzDRBaQqk9spejS1S3O1DOidkihK0xxNkr8HCVC0L22w6f92g83qWDp2BYRUbg== - dependencies: - "@lerna/command" "3.18.5" - "@lerna/filter-options" "3.20.0" - "@lerna/listable" "3.18.5" - "@lerna/output" "3.13.0" - -"@lerna/listable@3.18.5": - version "3.18.5" - resolved "https://registry.yarnpkg.com/@lerna/listable/-/listable-3.18.5.tgz#e82798405b5ed8fc51843c8ef1e7a0e497388a1a" - integrity sha512-Sdr3pVyaEv5A7ZkGGYR7zN+tTl2iDcinryBPvtuv20VJrXBE8wYcOks1edBTcOWsPjCE/rMP4bo1pseyk3UTsg== - dependencies: - "@lerna/query-graph" "3.18.5" - chalk "^2.3.1" - columnify "^1.5.4" - -"@lerna/log-packed@3.16.0": - version "3.16.0" - resolved "https://registry.yarnpkg.com/@lerna/log-packed/-/log-packed-3.16.0.tgz#f83991041ee77b2495634e14470b42259fd2bc16" - integrity sha512-Fp+McSNBV/P2mnLUYTaSlG8GSmpXM7krKWcllqElGxvAqv6chk2K3c2k80MeVB4WvJ9tRjUUf+i7HUTiQ9/ckQ== - dependencies: - byte-size "^5.0.1" - columnify "^1.5.4" - has-unicode "^2.0.1" - npmlog "^4.1.2" - -"@lerna/npm-conf@3.16.0": - version "3.16.0" - resolved "https://registry.yarnpkg.com/@lerna/npm-conf/-/npm-conf-3.16.0.tgz#1c10a89ae2f6c2ee96962557738685300d376827" - integrity sha512-HbO3DUrTkCAn2iQ9+FF/eisDpWY5POQAOF1m7q//CZjdC2HSW3UYbKEGsSisFxSfaF9Z4jtrV+F/wX6qWs3CuA== - dependencies: - config-chain "^1.1.11" - pify "^4.0.1" - -"@lerna/npm-dist-tag@3.18.5": - version "3.18.5" - resolved "https://registry.yarnpkg.com/@lerna/npm-dist-tag/-/npm-dist-tag-3.18.5.tgz#9ef9abb7c104077b31f6fab22cc73b314d54ac55" - integrity sha512-xw0HDoIG6HreVsJND9/dGls1c+lf6vhu7yJoo56Sz5bvncTloYGLUppIfDHQr4ZvmPCK8rsh0euCVh2giPxzKQ== - dependencies: - "@evocateur/npm-registry-fetch" "^4.0.0" - "@lerna/otplease" "3.18.5" - figgy-pudding "^3.5.1" - npm-package-arg "^6.1.0" - npmlog "^4.1.2" - -"@lerna/npm-install@3.16.5": - version "3.16.5" - resolved "https://registry.yarnpkg.com/@lerna/npm-install/-/npm-install-3.16.5.tgz#d6bfdc16f81285da66515ae47924d6e278d637d3" - integrity sha512-hfiKk8Eku6rB9uApqsalHHTHY+mOrrHeWEs+gtg7+meQZMTS3kzv4oVp5cBZigndQr3knTLjwthT/FX4KvseFg== - dependencies: - "@lerna/child-process" "3.16.5" - "@lerna/get-npm-exec-opts" "3.13.0" - fs-extra "^8.1.0" - npm-package-arg "^6.1.0" - npmlog "^4.1.2" - signal-exit "^3.0.2" - write-pkg "^3.1.0" - -"@lerna/npm-publish@3.18.5": - version "3.18.5" - resolved "https://registry.yarnpkg.com/@lerna/npm-publish/-/npm-publish-3.18.5.tgz#240e4039959fd9816b49c5b07421e11b5cb000af" - integrity sha512-3etLT9+2L8JAx5F8uf7qp6iAtOLSMj+ZYWY6oUgozPi/uLqU0/gsMsEXh3F0+YVW33q0M61RpduBoAlOOZnaTg== - dependencies: - "@evocateur/libnpmpublish" "^1.2.2" - "@lerna/otplease" "3.18.5" - "@lerna/run-lifecycle" "3.16.2" - figgy-pudding "^3.5.1" - fs-extra "^8.1.0" - npm-package-arg "^6.1.0" - npmlog "^4.1.2" - pify "^4.0.1" - read-package-json "^2.0.13" - -"@lerna/npm-run-script@3.16.5": - version "3.16.5" - resolved "https://registry.yarnpkg.com/@lerna/npm-run-script/-/npm-run-script-3.16.5.tgz#9c2ec82453a26c0b46edc0bb7c15816c821f5c15" - integrity sha512-1asRi+LjmVn3pMjEdpqKJZFT/3ZNpb+VVeJMwrJaV/3DivdNg7XlPK9LTrORuKU4PSvhdEZvJmSlxCKyDpiXsQ== - dependencies: - "@lerna/child-process" "3.16.5" - "@lerna/get-npm-exec-opts" "3.13.0" - npmlog "^4.1.2" - -"@lerna/otplease@3.18.5": - version "3.18.5" - resolved "https://registry.yarnpkg.com/@lerna/otplease/-/otplease-3.18.5.tgz#b77b8e760b40abad9f7658d988f3ea77d4fd0231" - integrity sha512-S+SldXAbcXTEDhzdxYLU0ZBKuYyURP/ND2/dK6IpKgLxQYh/z4ScljPDMyKymmEvgiEJmBsPZAAPfmNPEzxjog== - dependencies: - "@lerna/prompt" "3.18.5" - figgy-pudding "^3.5.1" - -"@lerna/output@3.13.0": - version "3.13.0" - resolved "https://registry.yarnpkg.com/@lerna/output/-/output-3.13.0.tgz#3ded7cc908b27a9872228a630d950aedae7a4989" - integrity sha512-7ZnQ9nvUDu/WD+bNsypmPG5MwZBwu86iRoiW6C1WBuXXDxM5cnIAC1m2WxHeFnjyMrYlRXM9PzOQ9VDD+C15Rg== - dependencies: - npmlog "^4.1.2" - -"@lerna/pack-directory@3.16.4": - version "3.16.4" - resolved "https://registry.yarnpkg.com/@lerna/pack-directory/-/pack-directory-3.16.4.tgz#3eae5f91bdf5acfe0384510ed53faddc4c074693" - integrity sha512-uxSF0HZeGyKaaVHz5FroDY9A5NDDiCibrbYR6+khmrhZtY0Bgn6hWq8Gswl9iIlymA+VzCbshWIMX4o2O8C8ng== - dependencies: - "@lerna/get-packed" "3.16.0" - "@lerna/package" "3.16.0" - "@lerna/run-lifecycle" "3.16.2" - figgy-pudding "^3.5.1" - npm-packlist "^1.4.4" - npmlog "^4.1.2" - tar "^4.4.10" - temp-write "^3.4.0" - -"@lerna/package-graph@3.18.5": - version "3.18.5" - resolved "https://registry.yarnpkg.com/@lerna/package-graph/-/package-graph-3.18.5.tgz#c740e2ea3578d059e551633e950690831b941f6b" - integrity sha512-8QDrR9T+dBegjeLr+n9WZTVxUYUhIUjUgZ0gvNxUBN8S1WB9r6H5Yk56/MVaB64tA3oGAN9IIxX6w0WvTfFudA== - dependencies: - "@lerna/prerelease-id-from-version" "3.16.0" - "@lerna/validation-error" "3.13.0" - npm-package-arg "^6.1.0" - npmlog "^4.1.2" - semver "^6.2.0" - -"@lerna/package@3.16.0": - version "3.16.0" - resolved "https://registry.yarnpkg.com/@lerna/package/-/package-3.16.0.tgz#7e0a46e4697ed8b8a9c14d59c7f890e0d38ba13c" - integrity sha512-2lHBWpaxcBoiNVbtyLtPUuTYEaB/Z+eEqRS9duxpZs6D+mTTZMNy6/5vpEVSCBmzvdYpyqhqaYjjSLvjjr5Riw== - dependencies: - load-json-file "^5.3.0" - npm-package-arg "^6.1.0" - write-pkg "^3.1.0" - -"@lerna/prerelease-id-from-version@3.16.0": - version "3.16.0" - resolved "https://registry.yarnpkg.com/@lerna/prerelease-id-from-version/-/prerelease-id-from-version-3.16.0.tgz#b24bfa789f5e1baab914d7b08baae9b7bd7d83a1" - integrity sha512-qZyeUyrE59uOK8rKdGn7jQz+9uOpAaF/3hbslJVFL1NqF9ELDTqjCPXivuejMX/lN4OgD6BugTO4cR7UTq/sZA== - dependencies: - semver "^6.2.0" - -"@lerna/profiler@3.20.0": - version "3.20.0" - resolved "https://registry.yarnpkg.com/@lerna/profiler/-/profiler-3.20.0.tgz#0f6dc236f4ea8f9ea5f358c6703305a4f32ad051" - integrity sha512-bh8hKxAlm6yu8WEOvbLENm42i2v9SsR4WbrCWSbsmOElx3foRnMlYk7NkGECa+U5c3K4C6GeBbwgqs54PP7Ljg== - dependencies: - figgy-pudding "^3.5.1" - fs-extra "^8.1.0" - npmlog "^4.1.2" - upath "^1.2.0" - -"@lerna/project@3.18.0": - version "3.18.0" - resolved "https://registry.yarnpkg.com/@lerna/project/-/project-3.18.0.tgz#56feee01daeb42c03cbdf0ed8a2a10cbce32f670" - integrity sha512-+LDwvdAp0BurOAWmeHE3uuticsq9hNxBI0+FMHiIai8jrygpJGahaQrBYWpwbshbQyVLeQgx3+YJdW2TbEdFWA== - dependencies: - "@lerna/package" "3.16.0" - "@lerna/validation-error" "3.13.0" - cosmiconfig "^5.1.0" - dedent "^0.7.0" - dot-prop "^4.2.0" - glob-parent "^5.0.0" - globby "^9.2.0" - load-json-file "^5.3.0" - npmlog "^4.1.2" - p-map "^2.1.0" - resolve-from "^4.0.0" - write-json-file "^3.2.0" - -"@lerna/prompt@3.18.5": - version "3.18.5" - resolved "https://registry.yarnpkg.com/@lerna/prompt/-/prompt-3.18.5.tgz#628cd545f225887d060491ab95df899cfc5218a1" - integrity sha512-rkKj4nm1twSbBEb69+Em/2jAERK8htUuV8/xSjN0NPC+6UjzAwY52/x9n5cfmpa9lyKf/uItp7chCI7eDmNTKQ== - dependencies: - inquirer "^6.2.0" - npmlog "^4.1.2" - -"@lerna/publish@3.20.2": - version "3.20.2" - resolved "https://registry.yarnpkg.com/@lerna/publish/-/publish-3.20.2.tgz#a45d29813099b3249657ea913d0dc3f8ebc5cc2e" - integrity sha512-N7Y6PdhJ+tYQPdI1tZum8W25cDlTp4D6brvRacKZusweWexxaopbV8RprBaKexkEX/KIbncuADq7qjDBdQHzaA== - dependencies: - "@evocateur/libnpmaccess" "^3.1.2" - "@evocateur/npm-registry-fetch" "^4.0.0" - "@evocateur/pacote" "^9.6.3" - "@lerna/check-working-tree" "3.16.5" - "@lerna/child-process" "3.16.5" - "@lerna/collect-updates" "3.20.0" - "@lerna/command" "3.18.5" - "@lerna/describe-ref" "3.16.5" - "@lerna/log-packed" "3.16.0" - "@lerna/npm-conf" "3.16.0" - "@lerna/npm-dist-tag" "3.18.5" - "@lerna/npm-publish" "3.18.5" - "@lerna/otplease" "3.18.5" - "@lerna/output" "3.13.0" - "@lerna/pack-directory" "3.16.4" - "@lerna/prerelease-id-from-version" "3.16.0" - "@lerna/prompt" "3.18.5" - "@lerna/pulse-till-done" "3.13.0" - "@lerna/run-lifecycle" "3.16.2" - "@lerna/run-topologically" "3.18.5" - "@lerna/validation-error" "3.13.0" - "@lerna/version" "3.20.2" - figgy-pudding "^3.5.1" - fs-extra "^8.1.0" - npm-package-arg "^6.1.0" - npmlog "^4.1.2" - p-finally "^1.0.0" - p-map "^2.1.0" - p-pipe "^1.2.0" - semver "^6.2.0" - -"@lerna/pulse-till-done@3.13.0": - version "3.13.0" - resolved "https://registry.yarnpkg.com/@lerna/pulse-till-done/-/pulse-till-done-3.13.0.tgz#c8e9ce5bafaf10d930a67d7ed0ccb5d958fe0110" - integrity sha512-1SOHpy7ZNTPulzIbargrgaJX387csN7cF1cLOGZiJQA6VqnS5eWs2CIrG8i8wmaUavj2QlQ5oEbRMVVXSsGrzA== - dependencies: - npmlog "^4.1.2" - -"@lerna/query-graph@3.18.5": - version "3.18.5" - resolved "https://registry.yarnpkg.com/@lerna/query-graph/-/query-graph-3.18.5.tgz#df4830bb5155273003bf35e8dda1c32d0927bd86" - integrity sha512-50Lf4uuMpMWvJ306be3oQDHrWV42nai9gbIVByPBYJuVW8dT8O8pA3EzitNYBUdLL9/qEVbrR0ry1HD7EXwtRA== - dependencies: - "@lerna/package-graph" "3.18.5" - figgy-pudding "^3.5.1" - -"@lerna/resolve-symlink@3.16.0": - version "3.16.0" - resolved "https://registry.yarnpkg.com/@lerna/resolve-symlink/-/resolve-symlink-3.16.0.tgz#37fc7095fabdbcf317c26eb74e0d0bde8efd2386" - integrity sha512-Ibj5e7njVHNJ/NOqT4HlEgPFPtPLWsO7iu59AM5bJDcAJcR96mLZ7KGVIsS2tvaO7akMEJvt2P+ErwCdloG3jQ== - dependencies: - fs-extra "^8.1.0" - npmlog "^4.1.2" - read-cmd-shim "^1.0.1" - -"@lerna/rimraf-dir@3.16.5": - version "3.16.5" - resolved "https://registry.yarnpkg.com/@lerna/rimraf-dir/-/rimraf-dir-3.16.5.tgz#04316ab5ffd2909657aaf388ea502cb8c2f20a09" - integrity sha512-bQlKmO0pXUsXoF8lOLknhyQjOZsCc0bosQDoX4lujBXSWxHVTg1VxURtWf2lUjz/ACsJVDfvHZbDm8kyBk5okA== - dependencies: - "@lerna/child-process" "3.16.5" - npmlog "^4.1.2" - path-exists "^3.0.0" - rimraf "^2.6.2" - -"@lerna/run-lifecycle@3.16.2": - version "3.16.2" - resolved "https://registry.yarnpkg.com/@lerna/run-lifecycle/-/run-lifecycle-3.16.2.tgz#67b288f8ea964db9ea4fb1fbc7715d5bbb0bce00" - integrity sha512-RqFoznE8rDpyyF0rOJy3+KjZCeTkO8y/OB9orPauR7G2xQ7PTdCpgo7EO6ZNdz3Al+k1BydClZz/j78gNCmL2A== - dependencies: - "@lerna/npm-conf" "3.16.0" - figgy-pudding "^3.5.1" - npm-lifecycle "^3.1.2" - npmlog "^4.1.2" - -"@lerna/run-topologically@3.18.5": - version "3.18.5" - resolved "https://registry.yarnpkg.com/@lerna/run-topologically/-/run-topologically-3.18.5.tgz#3cd639da20e967d7672cb88db0f756b92f2fdfc3" - integrity sha512-6N1I+6wf4hLOnPW+XDZqwufyIQ6gqoPfHZFkfWlvTQ+Ue7CuF8qIVQ1Eddw5HKQMkxqN10thKOFfq/9NQZ4NUg== - dependencies: - "@lerna/query-graph" "3.18.5" - figgy-pudding "^3.5.1" - p-queue "^4.0.0" - -"@lerna/run@3.20.0": - version "3.20.0" - resolved "https://registry.yarnpkg.com/@lerna/run/-/run-3.20.0.tgz#a479f7c42bdf9ebabb3a1e5a2bdebb7a8d201151" - integrity sha512-9U3AqeaCeB7KsGS9oyKNp62s9vYoULg/B4cqXTKZkc+OKL6QOEjYHYVSBcMK9lUXrMjCjDIuDSX3PnTCPxQ2Dw== - dependencies: - "@lerna/command" "3.18.5" - "@lerna/filter-options" "3.20.0" - "@lerna/npm-run-script" "3.16.5" - "@lerna/output" "3.13.0" - "@lerna/profiler" "3.20.0" - "@lerna/run-topologically" "3.18.5" - "@lerna/timer" "3.13.0" - "@lerna/validation-error" "3.13.0" - p-map "^2.1.0" - -"@lerna/symlink-binary@3.17.0": - version "3.17.0" - resolved "https://registry.yarnpkg.com/@lerna/symlink-binary/-/symlink-binary-3.17.0.tgz#8f8031b309863814883d3f009877f82e38aef45a" - integrity sha512-RLpy9UY6+3nT5J+5jkM5MZyMmjNHxZIZvXLV+Q3MXrf7Eaa1hNqyynyj4RO95fxbS+EZc4XVSk25DGFQbcRNSQ== - dependencies: - "@lerna/create-symlink" "3.16.2" - "@lerna/package" "3.16.0" - fs-extra "^8.1.0" - p-map "^2.1.0" - -"@lerna/symlink-dependencies@3.17.0": - version "3.17.0" - resolved "https://registry.yarnpkg.com/@lerna/symlink-dependencies/-/symlink-dependencies-3.17.0.tgz#48d6360e985865a0e56cd8b51b308a526308784a" - integrity sha512-KmjU5YT1bpt6coOmdFueTJ7DFJL4H1w5eF8yAQ2zsGNTtZ+i5SGFBWpb9AQaw168dydc3s4eu0W0Sirda+F59Q== - dependencies: - "@lerna/create-symlink" "3.16.2" - "@lerna/resolve-symlink" "3.16.0" - "@lerna/symlink-binary" "3.17.0" - fs-extra "^8.1.0" - p-finally "^1.0.0" - p-map "^2.1.0" - p-map-series "^1.0.0" - -"@lerna/timer@3.13.0": - version "3.13.0" - resolved "https://registry.yarnpkg.com/@lerna/timer/-/timer-3.13.0.tgz#bcd0904551db16e08364d6c18e5e2160fc870781" - integrity sha512-RHWrDl8U4XNPqY5MQHkToWS9jHPnkLZEt5VD+uunCKTfzlxGnRCr3/zVr8VGy/uENMYpVP3wJa4RKGY6M0vkRw== - -"@lerna/validation-error@3.13.0": - version "3.13.0" - resolved "https://registry.yarnpkg.com/@lerna/validation-error/-/validation-error-3.13.0.tgz#c86b8f07c5ab9539f775bd8a54976e926f3759c3" - integrity sha512-SiJP75nwB8GhgwLKQfdkSnDufAaCbkZWJqEDlKOUPUvVOplRGnfL+BPQZH5nvq2BYSRXsksXWZ4UHVnQZI/HYA== - dependencies: - npmlog "^4.1.2" - -"@lerna/version@3.20.2": - version "3.20.2" - resolved "https://registry.yarnpkg.com/@lerna/version/-/version-3.20.2.tgz#3709141c0f537741d9bc10cb24f56897bcb30428" - integrity sha512-ckBJMaBWc+xJen0cMyCE7W67QXLLrc0ELvigPIn8p609qkfNM0L0CF803MKxjVOldJAjw84b8ucNWZLvJagP/Q== - dependencies: - "@lerna/check-working-tree" "3.16.5" - "@lerna/child-process" "3.16.5" - "@lerna/collect-updates" "3.20.0" - "@lerna/command" "3.18.5" - "@lerna/conventional-commits" "3.18.5" - "@lerna/github-client" "3.16.5" - "@lerna/gitlab-client" "3.15.0" - "@lerna/output" "3.13.0" - "@lerna/prerelease-id-from-version" "3.16.0" - "@lerna/prompt" "3.18.5" - "@lerna/run-lifecycle" "3.16.2" - "@lerna/run-topologically" "3.18.5" - "@lerna/validation-error" "3.13.0" - chalk "^2.3.1" - dedent "^0.7.0" - load-json-file "^5.3.0" - minimatch "^3.0.4" - npmlog "^4.1.2" - p-map "^2.1.0" - p-pipe "^1.2.0" - p-reduce "^1.0.0" - p-waterfall "^1.0.0" - semver "^6.2.0" - slash "^2.0.0" - temp-write "^3.4.0" - write-json-file "^3.2.0" - -"@lerna/write-log-file@3.13.0": - version "3.13.0" - resolved "https://registry.yarnpkg.com/@lerna/write-log-file/-/write-log-file-3.13.0.tgz#b78d9e4cfc1349a8be64d91324c4c8199e822a26" - integrity sha512-RibeMnDPvlL8bFYW5C8cs4mbI3AHfQef73tnJCQ/SgrXZHehmHnsyWUiE7qDQCAo+B1RfTapvSyFF69iPj326A== - dependencies: - npmlog "^4.1.2" - write-file-atomic "^2.3.0" - "@mrmlnc/readdir-enhanced@^2.2.1": version "2.2.1" resolved "https://registry.yarnpkg.com/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz#524af240d1a360527b730475ecfa1344aa540dde" @@ -991,11 +232,6 @@ is-plain-object "^3.0.0" universal-user-agent "^5.0.0" -"@octokit/plugin-enterprise-rest@^3.6.1": - version "3.6.2" - resolved "https://registry.yarnpkg.com/@octokit/plugin-enterprise-rest/-/plugin-enterprise-rest-3.6.2.tgz#74de25bef21e0182b4fa03a8678cd00a4e67e561" - integrity sha512-3wF5eueS5OHQYuAEudkpN+xVeUsg8vYEMMenEzLphUZ7PRZ8OJtDcsreL3ad9zxXmBbaFWzLmFcdob5CLyZftA== - "@octokit/plugin-paginate-rest@^1.1.1": version "1.1.2" resolved "https://registry.yarnpkg.com/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-1.1.2.tgz#004170acf8c2be535aba26727867d692f7b488fc" @@ -1048,7 +284,7 @@ once "^1.4.0" universal-user-agent "^5.0.0" -"@octokit/rest@^16.28.2", "@octokit/rest@^16.28.4": +"@octokit/rest@^16.28.2": version "16.43.1" resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-16.43.1.tgz#3b11e7d1b1ac2bbeeb23b08a17df0b20947eda6b" integrity sha512-gfFKwRT/wFxq5qlNjnW2dh+qh74XgTQ2B179UX5K1HYCluioWj8Ndbgqw2PVqa1NnVJkGHp2ovMpVn/DImlmkw== @@ -1071,9 +307,9 @@ universal-user-agent "^4.0.0" "@octokit/types@^2.0.0", "@octokit/types@^2.0.1", "@octokit/types@^2.11.1": - version "2.12.1" - resolved "https://registry.yarnpkg.com/@octokit/types/-/types-2.12.1.tgz#4a26b4a85ec121043d3b0745b5798f9d8fd968ca" - integrity sha512-LRLR1tjbcCfAmUElvTmMvLEzstpx6Xt/aQVTg2xvd+kHA2Ekp1eWl5t+gU7bcwjXHYEAzh4hH4WH+kS3vh+wRw== + version "2.16.2" + resolved "https://registry.yarnpkg.com/@octokit/types/-/types-2.16.2.tgz#4c5f8da3c6fecf3da1811aef678fda03edac35d2" + integrity sha512-O75k56TYvJ8WpAakWwYRN8Bgu60KrmX0z1KqFp1kNiFNkgW+JW+9EBKZ+S33PU6SLvbihqd+3drvPxKK68Ee8Q== dependencies: "@types/node" ">= 8" @@ -1137,15 +373,25 @@ resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.3.tgz#3dca0e3f33b200fc7d1139c0cd96c1268cadfd9d" integrity sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA== +"@types/minimist@^1.2.0": + version "1.2.0" + resolved "https://registry.yarnpkg.com/@types/minimist/-/minimist-1.2.0.tgz#69a23a3ad29caf0097f06eda59b361ee2f0639f6" + integrity sha1-aaI6OtKcrwCX8G7aWbNh7i8GOfY= + "@types/node@*", "@types/node@>= 8": - version "13.13.2" - resolved "https://registry.yarnpkg.com/@types/node/-/node-13.13.2.tgz#160d82623610db590a64e8ca81784e11117e5a54" - integrity sha512-LB2R1Oyhpg8gu4SON/mfforE525+Hi/M1ineICEDftqNVTyFg1aRIeGuTvXAoWHc4nbrFncWtJgMmoyRvuGh7A== + version "14.0.1" + resolved "https://registry.yarnpkg.com/@types/node/-/node-14.0.1.tgz#5d93e0a099cd0acd5ef3d5bde3c086e1f49ff68c" + integrity sha512-FAYBGwC+W6F9+huFIDtn43cpy7+SzG+atzRiTfdp3inUKL2hXnd4rG8hylJLIh4+hqrQy1P17kvJByE/z825hA== + +"@types/normalize-package-data@^2.4.0": + version "2.4.0" + resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.0.tgz#e486d0d97396d79beedd0a6e33f4534ff6b4973e" + integrity sha512-f5j5b/Gf71L+dbqxIpQ4Z2WlmI/mPJ0fOkGGmFgtb6sAu97EPczzbS3/tJKxmcYDj55OX6ssqwDAWOHIYDRDGA== "@types/q@^1.5.1": - version "1.5.2" - resolved "https://registry.yarnpkg.com/@types/q/-/q-1.5.2.tgz#690a1475b84f2a884fd07cd797c00f5f31356ea8" - integrity sha512-ce5d3q03Ex0sy4R14722Rmt6MT07Ua+k4FwDfdcToYJcMKNtRVQvJ6JCAPdAmAnbRb6CsX6aYb9m96NGod9uTw== + version "1.5.4" + resolved "https://registry.yarnpkg.com/@types/q/-/q-1.5.4.tgz#15925414e0ad2cd765bfef58842f7e26a7accb24" + integrity sha512-1HcDas8SEj4z1Wc696tH56G8OlRaH/sqZOynNNB+HF0WOeXPaxTtbYzJY2oEfiUxjSKjhCKr+MvR7dCHcEelug== "@webassemblyjs/ast@1.9.0": version "1.9.0" @@ -1302,16 +548,7 @@ resolved "https://registry.yarnpkg.com/@xtuc/long/-/long-4.2.2.tgz#d291c6a4e97989b5c61d9acf396ae4fe133a718d" integrity sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ== -"@zkochan/cmd-shim@^3.1.0": - version "3.1.0" - resolved "https://registry.yarnpkg.com/@zkochan/cmd-shim/-/cmd-shim-3.1.0.tgz#2ab8ed81f5bb5452a85f25758eb9b8681982fd2e" - integrity sha512-o8l0+x7C7sMZU3v9GuJIAU10qQLtwR1dtRQIOmlNMtyaqhmpXOzx1HWiYoWfmmf9HHZoAkXpc9TM9PQYF9d4Jg== - dependencies: - is-windows "^1.0.0" - mkdirp-promise "^5.0.1" - mz "^2.5.0" - -JSONStream@^1.0.4, JSONStream@^1.3.4: +JSONStream@^1.0.4: version "1.3.5" resolved "https://registry.yarnpkg.com/JSONStream/-/JSONStream-1.3.5.tgz#3208c1f08d3a4d99261ab64f92302bc15e111ca0" integrity sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ== @@ -1374,27 +611,6 @@ after@0.8.2: resolved "https://registry.yarnpkg.com/after/-/after-0.8.2.tgz#fedb394f9f0e02aa9768e702bda23b505fae7e1f" integrity sha1-/ts5T58OAqqXaOcCvaI7UF+ufh8= -agent-base@4, agent-base@^4.3.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-4.3.0.tgz#8165f01c436009bccad0b1d122f05ed770efc6ee" - integrity sha512-salcGninV0nPrwpGNn4VTXBb1SOuXQBiqbrNXoeizJsHrsL6ERFM2Ne3JUSBWRE6aeNJI2ROP/WEEIDUiDe3cg== - dependencies: - es6-promisify "^5.0.0" - -agent-base@~4.2.1: - version "4.2.1" - resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-4.2.1.tgz#d89e5999f797875674c07d87f260fc41e83e8ca9" - integrity sha512-JVwXMr9nHYTUXsBFKUqhJwvlcYU/blreOEUkhNR2eXZIvwd+c+o5V4MgDPKWnMS/56awN3TRzIP+KoPn+roQtg== - dependencies: - es6-promisify "^5.0.0" - -agentkeepalive@^3.4.1: - version "3.5.2" - resolved "https://registry.yarnpkg.com/agentkeepalive/-/agentkeepalive-3.5.2.tgz#a113924dd3fa24a0bc3b78108c450c2abee00f67" - integrity sha512-e0L/HNe6qkQ7H19kTlRRqUibEAwDK5AFk6y3PtMsuut2VAH6+Q4xZml1tNDJD7kSAyqmbG/K08K5WEJYtUrSlQ== - dependencies: - humanize-ms "^1.2.1" - aggregate-error@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/aggregate-error/-/aggregate-error-3.0.1.tgz#db2fe7246e536f40d9b5442a39e117d7dd6a24e0" @@ -1505,11 +721,6 @@ any-observable@^0.3.0: resolved "https://registry.yarnpkg.com/any-observable/-/any-observable-0.3.0.tgz#af933475e5806a67d0d7df090dd5e8bef65d119b" integrity sha512-/FQM1EDkTsf63Ub2C6O7GuYFDsSXUwsaZDurV0np41ocwq0jthUAYCmhBX9f+KwlaCgIuWyr/4WlUQUBfKfZog== -any-promise@^1.0.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/any-promise/-/any-promise-1.3.0.tgz#abc6afeedcea52e809cdc0376aed3ce39635d17f" - integrity sha1-q8av7tzqUugJzcA3au0845Y10X8= - anymatch@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-2.0.0.tgz#bcb24b4f37934d9aa7ac17b4adaf89e7c76ef2eb" @@ -1533,24 +744,11 @@ append-buffer@^1.0.2: dependencies: buffer-equal "^1.0.0" -aproba@^1.0.3, aproba@^1.1.1: +aproba@^1.1.1: version "1.2.0" resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a" integrity sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw== -aproba@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/aproba/-/aproba-2.0.0.tgz#52520b8ae5b569215b354efc0caa3fe1e45a8adc" - integrity sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ== - -are-we-there-yet@~1.1.2: - version "1.1.5" - resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz#4b35c2944f062a8bfcda66410760350fe9ddfc21" - integrity sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w== - dependencies: - delegates "^1.0.0" - readable-stream "^2.0.6" - argparse@^1.0.7: version "1.0.10" resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" @@ -1573,11 +771,6 @@ arr-union@^3.1.0: resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-3.1.0.tgz#e39b09aea9def866a8f206e288af63919bae39c4" integrity sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ= -array-differ@^2.0.3: - version "2.1.0" - resolved "https://registry.yarnpkg.com/array-differ/-/array-differ-2.1.0.tgz#4b9c1c3f14b906757082925769e8ab904f4801b1" - integrity sha512-KbUpJgx909ZscOc/7CLATBFam7P1Z1QRQInvgT0UztM9Q72aGKCunKASAl7WNW0tnPmPyEMeMhdsfWhfmW037w== - array-find-index@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/array-find-index/-/array-find-index-1.0.2.tgz#df010aa1287e164bbda6f9723b0a96a1ec4187a1" @@ -1593,7 +786,7 @@ array-ify@^1.0.0: resolved "https://registry.yarnpkg.com/array-ify/-/array-ify-1.0.0.tgz#9e528762b4a9066ad163a6962a364418e9626ece" integrity sha1-nlKHYrSpBmrRY6aWKjZEGOlibs4= -array-union@^1.0.1, array-union@^1.0.2: +array-union@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/array-union/-/array-union-1.0.2.tgz#9a34410e4f4e3da23dea375be5be70f24778ec39" integrity sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk= @@ -1625,10 +818,10 @@ arrify@^1.0.1: resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" integrity sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0= -asap@^2.0.0: - version "2.0.6" - resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.6.tgz#e50347611d7e690943208bbdafebcbc2fb866d46" - integrity sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY= +arrify@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/arrify/-/arrify-2.0.1.tgz#c9655e9331e0abcd588d2a7cad7e9956f66701fa" + integrity sha512-3duEwti880xqi4eAMN8AyR4a0ByT90zoYdLlevfrvU43vb0YZwZVfxOgxWrLXXXpyugL0hNZc9G6BiB5B3nUug== asn1.js@^4.0.0: version "4.10.1" @@ -1959,7 +1152,7 @@ blob@0.0.5: resolved "https://registry.yarnpkg.com/blob/-/blob-0.0.5.tgz#d680eeef25f8cd91ad533f5b01eed48e64caf683" integrity sha512-gaqbzQPqOoamawKg0LGVd7SzLgXS+JH61oWprSLH+P+abTczqJbhTR8CmJ2u9/bUYNmHTGJx/UEmn6doAvvuig== -bluebird@^3.3.0, bluebird@^3.5.1, bluebird@^3.5.3, bluebird@^3.5.5: +bluebird@^3.3.0, bluebird@^3.5.5: version "3.7.2" resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f" integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg== @@ -1969,11 +1162,16 @@ bluebird@~3.4.6: resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.4.7.tgz#f72d760be09b7f76d08ed8fae98b289a8d05fab3" integrity sha1-9y12C+Cbf3bQjtj66Ysomo0F+rM= -bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.1.1, bn.js@^4.4.0: +bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.4.0: version "4.11.8" resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.8.tgz#2cde09eb5ee341f484746bb0309b3253b1b1442f" integrity sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA== +bn.js@^5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.1.1.tgz#48efc4031a9c4041b9c99c6941d903463ab62eb5" + integrity sha512-IUTD/REb78Z2eodka1QZyyEk66pciRcP6Sroka0aI3tG/iwIdYLrBD62RsubR7vqdt3WyX8p4jxeatzmRSphtA== + body-parser@^1.16.1: version "1.19.0" resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.19.0.tgz#96b2709e57c9c4e09a6fd66a8fd979844f69f08a" @@ -2067,7 +1265,7 @@ browserify-des@^1.0.0: inherits "^2.0.1" safe-buffer "^5.1.2" -browserify-rsa@^4.0.0: +browserify-rsa@^4.0.0, browserify-rsa@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/browserify-rsa/-/browserify-rsa-4.0.1.tgz#21e0abfaf6f2029cf2fafb133567a701d4135524" integrity sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ= @@ -2076,17 +1274,18 @@ browserify-rsa@^4.0.0: randombytes "^2.0.1" browserify-sign@^4.0.0: - version "4.0.4" - resolved "https://registry.yarnpkg.com/browserify-sign/-/browserify-sign-4.0.4.tgz#aa4eb68e5d7b658baa6bf6a57e630cbd7a93d298" - integrity sha1-qk62jl17ZYuqa/alfmMMvXqT0pg= - dependencies: - bn.js "^4.1.1" - browserify-rsa "^4.0.0" - create-hash "^1.1.0" - create-hmac "^1.1.2" - elliptic "^6.0.0" - inherits "^2.0.1" - parse-asn1 "^5.0.0" + version "4.1.0" + resolved "https://registry.yarnpkg.com/browserify-sign/-/browserify-sign-4.1.0.tgz#4fe971b379a5aeb4925e06779f9fa1f41d249d70" + integrity sha512-VYxo7cDCeYUoBZ0ZCy4UyEUCP3smyBd4DRQM5nrFS1jJjPJjX7rP3oLRpPoWfkhQfyJ0I9ZbHbKafrFD/SGlrg== + dependencies: + bn.js "^5.1.1" + browserify-rsa "^4.0.1" + create-hash "^1.2.0" + create-hmac "^1.1.7" + elliptic "^6.5.2" + inherits "^2.0.4" + parse-asn1 "^5.1.5" + readable-stream "^3.6.0" browserify-zlib@^0.2.0: version "0.2.0" @@ -2162,27 +1361,12 @@ builtin-status-codes@^3.0.0: resolved "https://registry.yarnpkg.com/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz#85982878e21b98e1c66425e03d0174788f569ee8" integrity sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug= -builtins@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/builtins/-/builtins-1.0.3.tgz#cb94faeb61c8696451db36534e1422f94f0aee88" - integrity sha1-y5T662HIaWRR2zZTThQi+U8K7og= - -byline@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/byline/-/byline-5.0.0.tgz#741c5216468eadc457b03410118ad77de8c1ddb1" - integrity sha1-dBxSFkaOrcRXsDQQEYrXfejB3bE= - -byte-size@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/byte-size/-/byte-size-5.0.1.tgz#4b651039a5ecd96767e71a3d7ed380e48bed4191" - integrity sha512-/XuKeqWocKsYa/cBY1YbSJSWWqTi4cFgr9S6OyM7PBaPbr9zvNGwWP33vt0uqGhwDdN+y3yhbXVILEUpnwEWGw== - bytes@3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.0.tgz#f6cf7933a360e0588fa9fde85651cdc7f805d1f6" integrity sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg== -cacache@^12.0.0, cacache@^12.0.2, cacache@^12.0.3: +cacache@^12.0.2: version "12.0.4" resolved "https://registry.yarnpkg.com/cacache/-/cacache-12.0.4.tgz#668bcbd105aeb5f1d92fe25570ec9525c8faa40c" integrity sha512-a0tMB40oefvuInr4Cwb3GerbL9xTj1D5yg0T5xrjGCGyfvbxseIXX7BAO/u/hIXdafzOI5JC3wDwHyf24buOAQ== @@ -2274,6 +1458,15 @@ camelcase-keys@^4.0.0: map-obj "^2.0.0" quick-lru "^1.0.0" +camelcase-keys@^6.2.2: + version "6.2.2" + resolved "https://registry.yarnpkg.com/camelcase-keys/-/camelcase-keys-6.2.2.tgz#5e755d6ba51aa223ec7d3d52f25778210f9dc3c0" + integrity sha512-YrwaA0vEKazPBkn0ipTiMpSajYDSe+KjQfrjhcBMxJt/znbvlHd8Pw/Vamaz5EB4Wfhs3SUR3Z9mwRu/P3s3Yg== + dependencies: + camelcase "^5.3.1" + map-obj "^4.0.0" + quick-lru "^4.0.1" + camelcase@^2.0.0: version "2.1.1" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-2.1.1.tgz#7c1d16d679a1bbe59ca02cacecfb011e201f5a1f" @@ -2284,11 +1477,16 @@ camelcase@^4.1.0: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd" integrity sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0= -camelcase@^5.0.0: +camelcase@^5.0.0, camelcase@^5.3.1: version "5.3.1" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== +camelcase@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.0.0.tgz#5259f7c30e35e278f1bdc2a4d91230b37cad981e" + integrity sha512-8KMDF1Vz2gzOq54ONPJS65IvTUaB1cHJ2DMM7MbPmLZljDH1qpzzLsWdiN9pHh6qvkRVDTi/07+eNGch/oLU4w== + caniuse-api@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/caniuse-api/-/caniuse-api-3.0.0.tgz#5e4d90e2274961d46291997df599e3ed008ee4c0" @@ -2300,9 +1498,9 @@ caniuse-api@^3.0.0: lodash.uniq "^4.5.0" caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001043: - version "1.0.30001046" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001046.tgz#7a06d3e8fd8aa7f4d21c9a2e313f35f2d06b013e" - integrity sha512-CsGjBRYWG6FvgbyGy+hBbaezpwiqIOLkxQPY4A4Ea49g1eNsnQuESB+n4QM0BKii1j80MyJ26Ir5ywTQkbRE4g== + version "1.0.30001061" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001061.tgz#80ca87ef14eb543a7458e7fd2b5e2face3458c9f" + integrity sha512-SMICCeiNvMZnyXpuoO+ot7FHpMVPlrsR+HmfByj6nY4xYDHXLqMTbgH7ecEkDNXWkH1vaip+ZS0D7VTXwM1KYQ== caseless@~0.12.0: version "0.12.0" @@ -2385,10 +1583,10 @@ chokidar@^2.1.8: optionalDependencies: fsevents "^1.2.7" -chokidar@^3.0.0, chokidar@^3.0.1: - version "3.3.1" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.3.1.tgz#c84e5b3d18d9a4d77558fef466b1bf16bbeb3450" - integrity sha512-4QYCEWOcK3OJrxwvyyAOxFuhpvOVCYkr33LPfFNBjAD/w3sEzWsp2BUOkI4l9bHvWioAd0rc6NlHUOEaWkTeqg== +chokidar@^3.0.0, chokidar@^3.0.1, chokidar@^3.4.0: + version "3.4.0" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.4.0.tgz#b30611423ce376357c765b9b8f904b9fba3c0be8" + integrity sha512-aXAaho2VJtisB/1fg1+3nlLJqGOuewTzQpd/Tz0yTg2R0e4IGtshYvtjowyEumcBv2z+y4+kc75Mz7j5xJskcQ== dependencies: anymatch "~3.1.1" braces "~3.0.2" @@ -2396,11 +1594,11 @@ chokidar@^3.0.0, chokidar@^3.0.1: is-binary-path "~2.1.0" is-glob "~4.0.1" normalize-path "~3.0.0" - readdirp "~3.3.0" + readdirp "~3.4.0" optionalDependencies: fsevents "~2.1.2" -chownr@^1.1.1, chownr@^1.1.2: +chownr@^1.1.1: version "1.1.4" resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.4.tgz#6fc9d7b42d32a583596337666e7d08084da2cc6b" integrity sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg== @@ -2417,11 +1615,6 @@ ci-info@^1.5.0: resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-1.6.0.tgz#2ca20dbb9ceb32d4524a683303313f0304b1e497" integrity sha512-vsGdkwSCDpWmP80ncATX7iea5DWQemg1UgCW5J8tqjU3lYw4FBYuj89J0CTVomA7BEfvSZd84GmHko+MxFQU2A== -ci-info@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-2.0.0.tgz#67a9e964be31a51e15e5010d58e6f12834002f46" - integrity sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ== - cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: version "1.0.4" resolved "https://registry.yarnpkg.com/cipher-base/-/cipher-base-1.0.4.tgz#8760e4ecc272f4c363532f926d874aae2c1397de" @@ -2459,13 +1652,6 @@ cli-cursor@^3.1.0: dependencies: restore-cursor "^3.1.0" -cli-table@^0.3.1: - version "0.3.1" - resolved "https://registry.yarnpkg.com/cli-table/-/cli-table-0.3.1.tgz#f53b05266a8b1a0b934b3d0821e6e2dc5914ae23" - integrity sha1-9TsFJmqLGguTSz0IIebi3FkUriM= - dependencies: - colors "1.0.3" - cli-truncate@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/cli-truncate/-/cli-truncate-0.2.1.tgz#9f15cfbb0705005369216c626ac7d05ab90dd574" @@ -2493,25 +1679,11 @@ clone-buffer@^1.0.0: resolved "https://registry.yarnpkg.com/clone-buffer/-/clone-buffer-1.0.0.tgz#e3e25b207ac4e701af721e2cb5a16792cac3dc58" integrity sha1-4+JbIHrE5wGvch4staFnksrD3Fg= -clone-deep@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/clone-deep/-/clone-deep-4.0.1.tgz#c19fd9bdbbf85942b4fd979c84dcf7d5f07c2387" - integrity sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ== - dependencies: - is-plain-object "^2.0.4" - kind-of "^6.0.2" - shallow-clone "^3.0.0" - clone-stats@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/clone-stats/-/clone-stats-1.0.0.tgz#b3782dff8bb5474e18b9b6bf0fdfe782f8777680" integrity sha1-s3gt/4u1R04Yuba/D9/ngvh3doA= -clone@^1.0.2: - version "1.0.4" - resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.4.tgz#da309cc263df15994c688ca902179ca3c7cd7c7e" - integrity sha1-2jCcwmPfFZlMaIypAheco8fNfH4= - clone@^2.1.1: version "2.1.2" resolved "https://registry.yarnpkg.com/clone/-/clone-2.1.2.tgz#1b7f4b9f591f1e8f83670401600345a02887435f" @@ -2593,24 +1765,11 @@ color@^3.0.0: color-convert "^1.9.1" color-string "^1.5.2" -colors@1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/colors/-/colors-1.0.3.tgz#0433f44d809680fdeb60ed260f1b0c262e82a40b" - integrity sha1-BDP0TYCWgP3rYO0mDxsMJi6CpAs= - colors@^1.1.0: version "1.4.0" resolved "https://registry.yarnpkg.com/colors/-/colors-1.4.0.tgz#c50491479d4c1bdaed2c9ced32cf7c7dc2360f78" integrity sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA== -columnify@^1.5.4: - version "1.5.4" - resolved "https://registry.yarnpkg.com/columnify/-/columnify-1.5.4.tgz#4737ddf1c7b69a8a7c340570782e947eec8e78bb" - integrity sha1-Rzfd8ce2mop8NAVweC6UfuyOeLs= - dependencies: - strip-ansi "^3.0.0" - wcwidth "^1.0.0" - combined-stream@^1.0.6, combined-stream@~1.0.6: version "1.0.8" resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" @@ -2639,9 +1798,9 @@ commonmark@^0.29.0: string.prototype.repeat "^0.2.0" compare-func@^1.3.1, compare-func@^1.3.2: - version "1.3.2" - resolved "https://registry.yarnpkg.com/compare-func/-/compare-func-1.3.2.tgz#99dd0ba457e1f9bc722b12c08ec33eeab31fa648" - integrity sha1-md0LpFfh+bxyKxLAjsM+6rMfpkg= + version "1.3.4" + resolved "https://registry.yarnpkg.com/compare-func/-/compare-func-1.3.4.tgz#6b07c4c5e8341119baf44578085bda0f4a823516" + integrity sha512-sq2sWtrqKPkEXAC8tEJA1+BqAH9GbFkGBtUOqrUX57VSfwp8xyktctk+uLoRy5eccTdxzDcVIztlYDpKs3Jv1Q== dependencies: array-ify "^1.0.0" dot-prop "^3.0.0" @@ -2691,14 +1850,6 @@ concat-stream@^2.0.0: readable-stream "^3.0.2" typedarray "^0.0.6" -config-chain@^1.1.11: - version "1.1.12" - resolved "https://registry.yarnpkg.com/config-chain/-/config-chain-1.1.12.tgz#0fde8d091200eb5e808caf25fe618c02f48e4efa" - integrity sha512-a1eOIcu8+7lUInge4Rpf/n4Krkf3Dd9lqhljRzII1/Zno/kRtUWnznPO3jOKBmTEktkt3fkxisUcivoj0ebzoA== - dependencies: - ini "^1.3.4" - proto-list "~1.2.1" - connect@^3.6.0: version "3.7.0" resolved "https://registry.yarnpkg.com/connect/-/connect-3.7.0.tgz#5d49348910caa5e07a01800b030d0c35f20484f8" @@ -2714,11 +1865,6 @@ console-browserify@^1.1.0: resolved "https://registry.yarnpkg.com/console-browserify/-/console-browserify-1.2.0.tgz#67063cef57ceb6cf4993a2ab3a55840ae8c49336" integrity sha512-ZMkYO/LkF17QvCPqM0gxw8yUzigAOZOSWSHg91FH6orS7vcEj5dVZTidN2fQ14yBSdg97RqhSNwLUXInd52OTA== -console-control-strings@^1.0.0, console-control-strings@~1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" - integrity sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4= - constants-browserify@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/constants-browserify/-/constants-browserify-1.0.0.tgz#c20b96d8c617748aaf1c16021760cd27fcb8cb75" @@ -2729,185 +1875,153 @@ content-type@~1.0.4: resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b" integrity sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA== -conventional-changelog-angular@^5.0.3, conventional-changelog-angular@^5.0.6: - version "5.0.6" - resolved "https://registry.yarnpkg.com/conventional-changelog-angular/-/conventional-changelog-angular-5.0.6.tgz#269540c624553aded809c29a3508fdc2b544c059" - integrity sha512-QDEmLa+7qdhVIv8sFZfVxU1VSyVvnXPsxq8Vam49mKUcO1Z8VTLEJk9uI21uiJUsnmm0I4Hrsdc9TgkOQo9WSA== +conventional-changelog-angular@^5.0.10: + version "5.0.10" + resolved "https://registry.yarnpkg.com/conventional-changelog-angular/-/conventional-changelog-angular-5.0.10.tgz#5cf7b00dd315b6a6a558223c80d5ef24ddb34205" + integrity sha512-k7RPPRs0vp8+BtPsM9uDxRl6KcgqtCJmzRD1wRtgqmhQ96g8ifBGo9O/TZBG23jqlXS/rg8BKRDELxfnQQGiaA== dependencies: compare-func "^1.3.1" q "^1.5.1" -conventional-changelog-atom@^2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/conventional-changelog-atom/-/conventional-changelog-atom-2.0.3.tgz#3bd14280aa09fe3ec49a0e8fe97b5002db02aad4" - integrity sha512-szZe2ut97qNO6vCCMkm1I/tWu6ol4Rr8a9Lx0y/VlpDnpY0PNp+oGpFgU55lplhx+I3Lro9Iv4/gRj0knfgjzg== +conventional-changelog-atom@^2.0.7: + version "2.0.7" + resolved "https://registry.yarnpkg.com/conventional-changelog-atom/-/conventional-changelog-atom-2.0.7.tgz#221575253a04f77a2fd273eb2bf29a138f710abf" + integrity sha512-7dOREZwzB+tCEMjRTDfen0OHwd7vPUdmU0llTy1eloZgtOP4iSLVzYIQqfmdRZEty+3w5Jz+AbhfTJKoKw1JeQ== dependencies: q "^1.5.1" -conventional-changelog-codemirror@^2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/conventional-changelog-codemirror/-/conventional-changelog-codemirror-2.0.3.tgz#ebc088154684f8f5171446b8d546ba6b460d46f2" - integrity sha512-t2afackdgFV2yBdHhWPqrKbpaQeVnz2hSJKdWqjasPo5EpIB6TBL0er3cOP1mnGQmuzk9JSvimNSuqjWGDtU5Q== +conventional-changelog-codemirror@^2.0.7: + version "2.0.7" + resolved "https://registry.yarnpkg.com/conventional-changelog-codemirror/-/conventional-changelog-codemirror-2.0.7.tgz#d6b6a8ce2707710c5a036e305037547fb9e15bfb" + integrity sha512-Oralk1kiagn3Gb5cR5BffenWjVu59t/viE6UMD/mQa1hISMPkMYhJIqX+CMeA1zXgVBO+YHQhhokEj99GP5xcg== dependencies: q "^1.5.1" -conventional-changelog-conventionalcommits@^4.2.3: - version "4.2.3" - resolved "https://registry.yarnpkg.com/conventional-changelog-conventionalcommits/-/conventional-changelog-conventionalcommits-4.2.3.tgz#22855b32d57d0328951c1c2dc01b172a5f24ea37" - integrity sha512-atGa+R4vvEhb8N/8v3IoW59gCBJeeFiX6uIbPu876ENAmkMwsenyn0R21kdDHJFLQdy6zW4J6b4xN8KI3b9oww== +conventional-changelog-conventionalcommits@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/conventional-changelog-conventionalcommits/-/conventional-changelog-conventionalcommits-4.3.0.tgz#c4205a659f7ca9d7881f29ee78a4e7d6aeb8b3c2" + integrity sha512-oYHydvZKU+bS8LnGqTMlNrrd7769EsuEHKy4fh1oMdvvDi7fem8U+nvfresJ1IDB8K00Mn4LpiA/lR+7Gs6rgg== dependencies: compare-func "^1.3.1" lodash "^4.17.15" q "^1.5.1" -conventional-changelog-core@^3.1.6: - version "3.2.3" - resolved "https://registry.yarnpkg.com/conventional-changelog-core/-/conventional-changelog-core-3.2.3.tgz#b31410856f431c847086a7dcb4d2ca184a7d88fb" - integrity sha512-LMMX1JlxPIq/Ez5aYAYS5CpuwbOk6QFp8O4HLAcZxe3vxoCtABkhfjetk8IYdRB9CDQGwJFLR3Dr55Za6XKgUQ== - dependencies: - conventional-changelog-writer "^4.0.6" - conventional-commits-parser "^3.0.3" - dateformat "^3.0.0" - get-pkg-repo "^1.0.0" - git-raw-commits "2.0.0" - git-remote-origin-url "^2.0.0" - git-semver-tags "^2.0.3" - lodash "^4.2.1" - normalize-package-data "^2.3.5" - q "^1.5.1" - read-pkg "^3.0.0" - read-pkg-up "^3.0.0" - through2 "^3.0.0" - -conventional-changelog-core@^4.1.4: - version "4.1.4" - resolved "https://registry.yarnpkg.com/conventional-changelog-core/-/conventional-changelog-core-4.1.4.tgz#39be27fca6ef20a0f998d7a3a1e97cfa8a055cb6" - integrity sha512-LO58ZbEpp1Ul+y/vOI8rJRsWkovsYkCFbOCVgi6UnVfU8WC0F8K8VQQwaBZWWUpb6JvEiN4GBR5baRP2txZ+Vg== +conventional-changelog-core@^4.1.7: + version "4.1.7" + resolved "https://registry.yarnpkg.com/conventional-changelog-core/-/conventional-changelog-core-4.1.7.tgz#6b5cdadda4430895cc4a75a73dd8b36e322ab346" + integrity sha512-UBvSrQR2RdKbSQKh7RhueiiY4ZAIOW3+CSWdtKOwRv+KxIMNFKm1rOcGBFx0eA8AKhGkkmmacoTWJTqyz7Q0VA== dependencies: add-stream "^1.0.0" - conventional-changelog-writer "^4.0.11" - conventional-commits-parser "^3.0.8" + conventional-changelog-writer "^4.0.16" + conventional-commits-parser "^3.1.0" dateformat "^3.0.0" get-pkg-repo "^1.0.0" git-raw-commits "2.0.0" git-remote-origin-url "^2.0.0" - git-semver-tags "^3.0.1" + git-semver-tags "^4.0.0" lodash "^4.17.15" normalize-package-data "^2.3.5" q "^1.5.1" read-pkg "^3.0.0" read-pkg-up "^3.0.0" + shelljs "^0.8.3" through2 "^3.0.0" -conventional-changelog-ember@^2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/conventional-changelog-ember/-/conventional-changelog-ember-2.0.4.tgz#c29b78e4af7825cbecb6c3fd6086ca5c09471ac1" - integrity sha512-q1u73sO9uCnxN4TSw8xu6MRU8Y1h9kpwtcdJuNRwu/LSKI1IE/iuNSH5eQ6aLlQ3HTyrIpTfUuVybW4W0F17rA== +conventional-changelog-ember@^2.0.8: + version "2.0.8" + resolved "https://registry.yarnpkg.com/conventional-changelog-ember/-/conventional-changelog-ember-2.0.8.tgz#f0f04eb7ff3c885af97db100865ab95dcfa9917f" + integrity sha512-JEMEcUAMg4Q9yxD341OgWlESQ4gLqMWMXIWWUqoQU8yvTJlKnrvcui3wk9JvnZQyONwM2g1MKRZuAjKxr8hAXA== dependencies: q "^1.5.1" -conventional-changelog-eslint@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/conventional-changelog-eslint/-/conventional-changelog-eslint-3.0.4.tgz#8f4736a23e0cd97e890e76fccc287db2f205f2ff" - integrity sha512-CPwTUENzhLGl3auunrJxiIEWncAGaby7gOFCdj2gslIuOFJ0KPJVOUhRz4Da/I53sdo/7UncUJkiLg94jEsjxg== +conventional-changelog-eslint@^3.0.8: + version "3.0.8" + resolved "https://registry.yarnpkg.com/conventional-changelog-eslint/-/conventional-changelog-eslint-3.0.8.tgz#f8b952b7ed7253ea0ac0b30720bb381f4921b46c" + integrity sha512-5rTRltgWG7TpU1PqgKHMA/2ivjhrB+E+S7OCTvj0zM/QGg4vmnVH67Vq/EzvSNYtejhWC+OwzvDrLk3tqPry8A== dependencies: q "^1.5.1" -conventional-changelog-express@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/conventional-changelog-express/-/conventional-changelog-express-2.0.1.tgz#fea2231d99a5381b4e6badb0c1c40a41fcacb755" - integrity sha512-G6uCuCaQhLxdb4eEfAIHpcfcJ2+ao3hJkbLrw/jSK/eROeNfnxCJasaWdDAfFkxsbpzvQT4W01iSynU3OoPLIw== +conventional-changelog-express@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/conventional-changelog-express/-/conventional-changelog-express-2.0.5.tgz#6e93705acdad374516ca125990012a48e710f8de" + integrity sha512-pW2hsjKG+xNx/Qjof8wYlAX/P61hT5gQ/2rZ2NsTpG+PgV7Rc8RCfITvC/zN9K8fj0QmV6dWmUefCteD9baEAw== dependencies: q "^1.5.1" -conventional-changelog-jquery@^3.0.6: - version "3.0.6" - resolved "https://registry.yarnpkg.com/conventional-changelog-jquery/-/conventional-changelog-jquery-3.0.6.tgz#460236ad8fb1d29ff932a14fe4e3a45379b63c5e" - integrity sha512-gHAABCXUNA/HjnZEm+vxAfFPJkgtrZvCDIlCKfdPVXtCIo/Q0lN5VKpx8aR5p8KdVRQFF3OuTlvv5kv6iPuRqA== +conventional-changelog-jquery@^3.0.10: + version "3.0.10" + resolved "https://registry.yarnpkg.com/conventional-changelog-jquery/-/conventional-changelog-jquery-3.0.10.tgz#fe8eb6aff322aa980af5eb68497622a5f6257ce7" + integrity sha512-QCW6wF8QgPkq2ruPaxc83jZxoWQxLkt/pNxIDn/oYjMiVgrtqNdd7lWe3vsl0hw5ENHNf/ejXuzDHk6suKsRpg== dependencies: q "^1.5.1" -conventional-changelog-jshint@^2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/conventional-changelog-jshint/-/conventional-changelog-jshint-2.0.3.tgz#ef6e2caf2ee6ffdfda78fcdf7ce87cf6c512d728" - integrity sha512-Pc2PnMPcez634ckzr4EOWviwRSpZcURaK7bjyD9oK6N5fsC/a+3G7LW5m/JpcHPhA9ZxsfIbm7uqZ3ZDGsQ/sw== +conventional-changelog-jshint@^2.0.7: + version "2.0.7" + resolved "https://registry.yarnpkg.com/conventional-changelog-jshint/-/conventional-changelog-jshint-2.0.7.tgz#955a69266951cd31e8afeb3f1c55e0517fdca943" + integrity sha512-qHA8rmwUnLiIxANJbz650+NVzqDIwNtc0TcpIa0+uekbmKHttidvQ1dGximU3vEDdoJVKFgR3TXFqYuZmYy9ZQ== dependencies: compare-func "^1.3.1" q "^1.5.1" -conventional-changelog-preset-loader@^2.1.1, conventional-changelog-preset-loader@^2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/conventional-changelog-preset-loader/-/conventional-changelog-preset-loader-2.3.0.tgz#580fa8ab02cef22c24294d25e52d7ccd247a9a6a" - integrity sha512-/rHb32J2EJnEXeK4NpDgMaAVTFZS3o1ExmjKMtYVgIC4MQn0vkNSbYpdGRotkfGGRWiqk3Ri3FBkiZGbAfIfOQ== +conventional-changelog-preset-loader@^2.3.4: + version "2.3.4" + resolved "https://registry.yarnpkg.com/conventional-changelog-preset-loader/-/conventional-changelog-preset-loader-2.3.4.tgz#14a855abbffd59027fd602581f1f34d9862ea44c" + integrity sha512-GEKRWkrSAZeTq5+YjUZOYxdHq+ci4dNwHvpaBC3+ENalzFWuCWa9EZXSuZBpkr72sMdKB+1fyDV4takK1Lf58g== -conventional-changelog-writer@^4.0.11, conventional-changelog-writer@^4.0.6: - version "4.0.11" - resolved "https://registry.yarnpkg.com/conventional-changelog-writer/-/conventional-changelog-writer-4.0.11.tgz#9f56d2122d20c96eb48baae0bf1deffaed1edba4" - integrity sha512-g81GQOR392I+57Cw3IyP1f+f42ME6aEkbR+L7v1FBBWolB0xkjKTeCWVguzRrp6UiT1O6gBpJbEy2eq7AnV1rw== +conventional-changelog-writer@^4.0.16: + version "4.0.16" + resolved "https://registry.yarnpkg.com/conventional-changelog-writer/-/conventional-changelog-writer-4.0.16.tgz#ca10f2691a8ea6d3c2eb74bd35bcf40aa052dda5" + integrity sha512-jmU1sDJDZpm/dkuFxBeRXvyNcJQeKhGtVcFFkwTphUAzyYWcwz2j36Wcv+Mv2hU3tpvLMkysOPXJTLO55AUrYQ== dependencies: compare-func "^1.3.1" - conventional-commits-filter "^2.0.2" + conventional-commits-filter "^2.0.6" dateformat "^3.0.0" - handlebars "^4.4.0" + handlebars "^4.7.6" json-stringify-safe "^5.0.1" lodash "^4.17.15" - meow "^5.0.0" + meow "^7.0.0" semver "^6.0.0" split "^1.0.0" through2 "^3.0.0" conventional-changelog@^3.1.8: - version "3.1.18" - resolved "https://registry.yarnpkg.com/conventional-changelog/-/conventional-changelog-3.1.18.tgz#7da0a5ab34a604b920b8bf71c6cf5d952f0e805e" - integrity sha512-aN6a3rjgV8qwAJj3sC/Lme2kvswWO7fFSGQc32gREcwIOsaiqBaO6f2p0NomFaPDnTqZ+mMZFLL3hlzvEnZ0mQ== - dependencies: - conventional-changelog-angular "^5.0.6" - conventional-changelog-atom "^2.0.3" - conventional-changelog-codemirror "^2.0.3" - conventional-changelog-conventionalcommits "^4.2.3" - conventional-changelog-core "^4.1.4" - conventional-changelog-ember "^2.0.4" - conventional-changelog-eslint "^3.0.4" - conventional-changelog-express "^2.0.1" - conventional-changelog-jquery "^3.0.6" - conventional-changelog-jshint "^2.0.3" - conventional-changelog-preset-loader "^2.3.0" - -conventional-commits-filter@^2.0.0, conventional-commits-filter@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/conventional-commits-filter/-/conventional-commits-filter-2.0.2.tgz#f122f89fbcd5bb81e2af2fcac0254d062d1039c1" - integrity sha512-WpGKsMeXfs21m1zIw4s9H5sys2+9JccTzpN6toXtxhpw2VNF2JUXwIakthKBy+LN4DvJm+TzWhxOMWOs1OFCFQ== + version "3.1.21" + resolved "https://registry.yarnpkg.com/conventional-changelog/-/conventional-changelog-3.1.21.tgz#4a774e6bf503acfd7e4685bb750da8c0eccf1e0d" + integrity sha512-ZGecVZPEo3aC75VVE4nu85589dDhpMyqfqgUM5Myq6wfKWiNqhDJLSDMsc8qKXshZoY7dqs1hR0H/15kI/G2jQ== + dependencies: + conventional-changelog-angular "^5.0.10" + conventional-changelog-atom "^2.0.7" + conventional-changelog-codemirror "^2.0.7" + conventional-changelog-conventionalcommits "^4.3.0" + conventional-changelog-core "^4.1.7" + conventional-changelog-ember "^2.0.8" + conventional-changelog-eslint "^3.0.8" + conventional-changelog-express "^2.0.5" + conventional-changelog-jquery "^3.0.10" + conventional-changelog-jshint "^2.0.7" + conventional-changelog-preset-loader "^2.3.4" + +conventional-commits-filter@^2.0.0, conventional-commits-filter@^2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/conventional-commits-filter/-/conventional-commits-filter-2.0.6.tgz#0935e1240c5ca7698329affee1b6a46d33324c4c" + integrity sha512-4g+sw8+KA50/Qwzfr0hL5k5NWxqtrOVw4DDk3/h6L85a9Gz0/Eqp3oP+CWCNfesBvZZZEFHF7OTEbRe+yYSyKw== dependencies: lodash.ismatch "^4.4.0" modify-values "^1.0.0" -conventional-commits-parser@^3.0.0, conventional-commits-parser@^3.0.3, conventional-commits-parser@^3.0.8: - version "3.0.8" - resolved "https://registry.yarnpkg.com/conventional-commits-parser/-/conventional-commits-parser-3.0.8.tgz#23310a9bda6c93c874224375e72b09fb275fe710" - integrity sha512-YcBSGkZbYp7d+Cr3NWUeXbPDFUN6g3SaSIzOybi8bjHL5IJ5225OSCxJJ4LgziyEJ7AaJtE9L2/EU6H7Nt/DDQ== +conventional-commits-parser@^3.0.0, conventional-commits-parser@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/conventional-commits-parser/-/conventional-commits-parser-3.1.0.tgz#10140673d5e7ef5572633791456c5d03b69e8be4" + integrity sha512-RSo5S0WIwXZiRxUGTPuYFbqvrR4vpJ1BDdTlthFgvHt5kEdnd1+pdvwWphWn57/oIl4V72NMmOocFqqJ8mFFhA== dependencies: JSONStream "^1.0.4" is-text-path "^1.0.1" lodash "^4.17.15" - meow "^5.0.0" + meow "^7.0.0" split2 "^2.0.0" through2 "^3.0.0" trim-off-newlines "^1.0.0" -conventional-recommended-bump@^5.0.0: - version "5.0.1" - resolved "https://registry.yarnpkg.com/conventional-recommended-bump/-/conventional-recommended-bump-5.0.1.tgz#5af63903947b6e089e77767601cb592cabb106ba" - integrity sha512-RVdt0elRcCxL90IrNP0fYCpq1uGt2MALko0eyeQ+zQuDVWtMGAy9ng6yYn3kax42lCj9+XBxQ8ZN6S9bdKxDhQ== - dependencies: - concat-stream "^2.0.0" - conventional-changelog-preset-loader "^2.1.1" - conventional-commits-filter "^2.0.2" - conventional-commits-parser "^3.0.3" - git-raw-commits "2.0.0" - git-semver-tags "^2.0.3" - meow "^4.0.0" - q "^1.5.1" - convert-source-map@^1.5.0, convert-source-map@^1.5.1, convert-source-map@^1.7.0: version "1.7.0" resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.7.0.tgz#17a2cb882d7f77d3490585e2ce6c524424a3a442" @@ -2947,7 +2061,7 @@ core-util-is@1.0.2, core-util-is@~1.0.0: resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= -cosmiconfig@^5.0.0, cosmiconfig@^5.0.2, cosmiconfig@^5.1.0: +cosmiconfig@^5.0.0, cosmiconfig@^5.0.2: version "5.2.1" resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-5.2.1.tgz#040f726809c591e77a17c0a3626ca45b4f168b1a" integrity sha512-H65gsXo1SKjf8zmrJ67eJk8aIRKV5ff2D4uKZIBZShbhGSpEmsQOPW/SKMKYhSTrqR7ufy6RP69rPogdaPh/kA== @@ -2957,17 +2071,6 @@ cosmiconfig@^5.0.0, cosmiconfig@^5.0.2, cosmiconfig@^5.1.0: js-yaml "^3.13.1" parse-json "^4.0.0" -coveralls@~3.0.0: - version "3.0.13" - resolved "https://registry.yarnpkg.com/coveralls/-/coveralls-3.0.13.tgz#64d8c99af3b8a771a2e6e5bcdf556c3c5061d29d" - integrity sha512-Bch6FJI4ebK6Mwr+DjFCJbb/RayNwn5pscSDE4Ux6cgjNkAcjdgGZBRfQnuYTt5tY81MqGK8m2r+xc5FDF513A== - dependencies: - js-yaml "^3.13.1" - lcov-parse "^1.0.0" - log-driver "^1.2.7" - minimist "^1.2.5" - request "^2.88.0" - create-ecdh@^4.0.0: version "4.0.3" resolved "https://registry.yarnpkg.com/create-ecdh/-/create-ecdh-4.0.3.tgz#c9111b6f33045c4697f144787f9254cdc77c45ff" @@ -2976,7 +2079,7 @@ create-ecdh@^4.0.0: bn.js "^4.1.0" elliptic "^6.0.0" -create-hash@^1.1.0, create-hash@^1.1.2: +create-hash@^1.1.0, create-hash@^1.1.2, create-hash@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/create-hash/-/create-hash-1.2.0.tgz#889078af11a63756bcfb59bd221996be3a9ef196" integrity sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg== @@ -2987,7 +2090,7 @@ create-hash@^1.1.0, create-hash@^1.1.2: ripemd160 "^2.0.1" sha.js "^2.4.0" -create-hmac@^1.1.0, create-hmac@^1.1.2, create-hmac@^1.1.4: +create-hmac@^1.1.0, create-hmac@^1.1.4, create-hmac@^1.1.7: version "1.1.7" resolved "https://registry.yarnpkg.com/create-hmac/-/create-hmac-1.1.7.tgz#69170c78b3ab957147b2b8b04572e47ead2243ff" integrity sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg== @@ -3197,6 +2300,11 @@ dargs@^4.0.1: dependencies: number-is-nan "^1.0.0" +dargs@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/dargs/-/dargs-7.0.0.tgz#04015c41de0bcb69ec84050f3d9be0caf8d6d5cc" + integrity sha512-2iy1EkLdlBzQGvbweYRFxmFath8+K7+AKB0TlhHWkNuH+TmovaMH/Wp7V7R4u7f4SnX3OgLsU9t1NI9ioDnUpg== + dashdash@^1.12.0: version "1.14.1" resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" @@ -3239,13 +2347,6 @@ debug@2.6.9, debug@^2.2.0, debug@^2.3.3, debug@^2.6.8, debug@^2.6.9: dependencies: ms "2.0.0" -debug@3.1.0, debug@~3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" - integrity sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g== - dependencies: - ms "2.0.0" - debug@3.2.6, debug@^3.0.0, debug@^3.1.0, debug@^3.2.6: version "3.2.6" resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b" @@ -3260,12 +2361,14 @@ debug@^4.0.1, debug@^4.1.0, debug@^4.1.1: dependencies: ms "^2.1.1" -debuglog@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/debuglog/-/debuglog-1.0.1.tgz#aa24ffb9ac3df9a2351837cfb2d279360cd78492" - integrity sha1-qiT/uaw9+aI1GDfPstJ5NgzXhJI= +debug@~3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" + integrity sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g== + dependencies: + ms "2.0.0" -decamelize-keys@^1.0.0: +decamelize-keys@^1.0.0, decamelize-keys@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/decamelize-keys/-/decamelize-keys-1.1.0.tgz#d171a87933252807eb3cb61dc1c1445d078df2d9" integrity sha1-0XGoeTMlKAfrPLYdwcFEXQeN8tk= @@ -3295,23 +2398,11 @@ deep-eql@^3.0.1: dependencies: type-detect "^4.0.0" -deep-extend@^0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac" - integrity sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA== - deep-is@~0.1.3: version "0.1.3" resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" integrity sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ= -defaults@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/defaults/-/defaults-1.0.3.tgz#c656051e9817d9ff08ed881477f3fe4019f3ef7d" - integrity sha1-xlYFHpgX2f8I7YgUd/P+QBnz730= - dependencies: - clone "^1.0.2" - define-properties@^1.1.2, define-properties@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.3.tgz#cf88da6cbee26fe6db7094f61d870cbd84cee9f1" @@ -3360,11 +2451,6 @@ delayed-stream@~1.0.0: resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" integrity sha1-3zrhmayt+31ECqrgsp4icrJOxhk= -delegates@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" - integrity sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o= - depcheck@^0.8.2: version "0.8.4" resolved "https://registry.yarnpkg.com/depcheck/-/depcheck-0.8.4.tgz#4c1edff6fc22261938dd3dcff77ba1d2f3797100" @@ -3421,24 +2507,6 @@ detect-indent@^4.0.0: dependencies: repeating "^2.0.0" -detect-indent@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-5.0.0.tgz#3871cc0a6a002e8c3e5b3cf7f336264675f06b9d" - integrity sha1-OHHMCmoALow+Wzz38zYmRnXwa50= - -detect-libc@^1.0.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b" - integrity sha1-+hN8S9aY7fVc1c0CrFWfkaTEups= - -dezalgo@^1.0.0: - version "1.0.3" - resolved "https://registry.yarnpkg.com/dezalgo/-/dezalgo-1.0.3.tgz#7f742de066fc748bc8db820569dddce49bf0d456" - integrity sha1-f3Qt4Gb8dIvI24IFad3c5Jvw1FY= - dependencies: - asap "^2.0.0" - wrappy "1" - di@^0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/di/-/di-0.0.1.tgz#806649326ceaa7caa3306d75d985ea2748ba913c" @@ -3466,13 +2534,6 @@ dir-glob@2.0.0: arrify "^1.0.1" path-type "^3.0.0" -dir-glob@^2.2.2: - version "2.2.2" - resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-2.2.2.tgz#fa09f0694153c8918b18ba0deafae94769fc50c4" - integrity sha512-f9LBi5QWzIW3I6e//uxZoLBlUt9kcp66qo0sSCxL6YZKc75R1c4MFCoe/LaZiBGmgujvQdxc5Bn3QhfyvK5Hsw== - dependencies: - path-type "^3.0.0" - dir-glob@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f" @@ -3544,13 +2605,6 @@ dot-prop@^3.0.0: dependencies: is-obj "^1.0.0" -dot-prop@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-4.2.0.tgz#1f19e0c2e1aa0e32797c49799f2837ac6af69c57" - integrity sha512-tUMXrxlExSW6U2EXiiKGSBVdYgtV8qlHL+C10TsW4PURY/ic+eaysnSkwB4kA/mBlCyy/IKDJ+Lc3wbWeaXtuQ== - dependencies: - is-obj "^1.0.0" - dot-prop@^5.2.0: version "5.2.0" resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-5.2.0.tgz#c34ecc29556dc45f1f4c22697b6f4904e0cc4fcb" @@ -3558,11 +2612,6 @@ dot-prop@^5.2.0: dependencies: is-obj "^2.0.0" -duplexer@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/duplexer/-/duplexer-0.1.1.tgz#ace6ff808c1ce66b57d1ebf97977acb02334cfc1" - integrity sha1-rOb/gIwc5mtX0ev5eXessCM0z8E= - duplexify@^3.4.2, duplexify@^3.6.0: version "3.7.1" resolved "https://registry.yarnpkg.com/duplexify/-/duplexify-3.7.1.tgz#2a4df5317f6ccfd91f86d6fd25d8d8a103b88309" @@ -3587,16 +2636,16 @@ ee-first@1.1.1: integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0= electron-to-chromium@^1.3.413: - version "1.3.415" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.415.tgz#e50241c1e2553e46cfe956c9d95f9ab3fc9a9134" - integrity sha512-GbtYqKffx3sU8G0HxwXuJFfs58Q7+iwLa5rBwaULwET6jWW8IAQSrVnu7vEfiUIcMVfbYyFg7cw3zdm+EbBJmw== + version "1.3.441" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.441.tgz#094f71b992dca5bc96b798cfbaf37dc76302015a" + integrity sha512-leBfJwLuyGs1jEei2QioI+PjVMavmUIvPYidE8dCCYWLAq0uefhN3NYgDNb8WxD3uiUNnJ3ScMXg0upSlwySzQ== elegant-spinner@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/elegant-spinner/-/elegant-spinner-1.0.1.tgz#db043521c95d7e303fd8f345bedc3349cfb0729e" integrity sha1-2wQ1IcldfjA/2PNFvtwzSc+wcp4= -elliptic@^6.0.0: +elliptic@^6.0.0, elliptic@^6.5.2: version "6.5.2" resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.2.tgz#05c5678d7173c049d8ca433552224a495d0e3762" integrity sha512-f4x70okzZbIQl/NSRLkI/+tteV/9WqL98zx+SQ69KbXxmVrmjwsNUPn/gYJJ0sHvEak24cZgHIPegRePAtA/xw== @@ -3629,13 +2678,6 @@ encodeurl@~1.0.2: resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" integrity sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k= -encoding@^0.1.11: - version "0.1.12" - resolved "https://registry.yarnpkg.com/encoding/-/encoding-0.1.12.tgz#538b66f3ee62cd1ab51ec323829d1f9480c74beb" - integrity sha1-U4tm8+5izRq1HsMjgp0flIDHS+s= - dependencies: - iconv-lite "~0.4.13" - end-of-stream@^1.0.0, end-of-stream@^1.1.0: version "1.4.4" resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0" @@ -3698,30 +2740,15 @@ ent@~2.2.0: integrity sha1-6WQhkyWiHQX0RGai9obtbOX13R0= entities@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/entities/-/entities-2.0.0.tgz#68d6084cab1b079767540d80e56a39b423e4abf4" - integrity sha512-D9f7V0JSRwIxlRI2mjMqufDrRDnx8p+eEOz7aUM9SuvF8gsBzra0/6tbjl1m8eQHrZlYj6PxqE00hZ1SAIKPLw== + version "2.0.2" + resolved "https://registry.yarnpkg.com/entities/-/entities-2.0.2.tgz#ac74db0bba8d33808bbf36809c3a5c3683531436" + integrity sha512-dmD3AvJQBUjKpcNkoqr+x+IF0SdRtPz9Vk0uTy4yWqga9ibB6s4v++QFWNohjiUGoMlF552ZvNyXDxz5iW0qmw== entities@~1.1.1: version "1.1.2" resolved "https://registry.yarnpkg.com/entities/-/entities-1.1.2.tgz#bdfa735299664dfafd34529ed4f8522a275fea56" integrity sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w== -env-paths@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/env-paths/-/env-paths-2.2.0.tgz#cdca557dc009152917d6166e2febe1f039685e43" - integrity sha512-6u0VYSCo/OW6IoD5WCLLy9JUGARbamfSavcNXry/eu8aHVFei6CD3Sw+VGX5alea1i9pgPHW0mbu6Xj0uBh7gA== - -envinfo@^7.3.1: - version "7.5.0" - resolved "https://registry.yarnpkg.com/envinfo/-/envinfo-7.5.0.tgz#91410bb6db262fb4f1409bd506e9ff57e91023f4" - integrity sha512-jDgnJaF/Btomk+m3PZDTTCb5XIIIX3zYItnCRfF73zVgvinLoRomuhi75Y4su0PtQxWz4v66XnLLckyvyJTOIQ== - -err-code@^1.0.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/err-code/-/err-code-1.1.2.tgz#06e0116d3028f6aef4806849eb0ea6a748ae6960" - integrity sha1-BuARbTAo9q70gGhJ6w6mp0iuaWA= - errno@^0.1.3, errno@~0.1.7: version "0.1.7" resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.7.tgz#4684d71779ad39af177e3f007996f7c67c852618" @@ -3780,18 +2807,6 @@ es6-iterator@~2.0.3: es5-ext "^0.10.35" es6-symbol "^3.1.1" -es6-promise@^4.0.3: - version "4.2.8" - resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.2.8.tgz#4eb21594c972bc40553d276e510539143db53e0a" - integrity sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w== - -es6-promisify@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/es6-promisify/-/es6-promisify-5.0.0.tgz#5109d62f3e56ea967c4b63505aef08291c8a5203" - integrity sha1-UQnWLz5W6pZ8S2NQWu8IKRyKUgM= - dependencies: - es6-promise "^4.0.3" - es6-symbol@^3.1.1, es6-symbol@~3.1.3: version "3.1.3" resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.3.tgz#bad5d3c1bcdac28269f4cb331e431c78ac705d18" @@ -3972,15 +2987,10 @@ esutils@^2.0.2: resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== -eventemitter3@^3.1.0: - version "3.1.2" - resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-3.1.2.tgz#2d3d48f9c346698fce83a85d7d664e98535df6e7" - integrity sha512-tvtQIeLVHjDkJYnzf2dgVMxfuSGJeM/7UCG17TT4EumTfNtF+0nebF/4zWOIkCreAbtNqhGEboB6BWrwqNaw4Q== - eventemitter3@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.0.tgz#d65176163887ee59f386d64c82610b696a4a74eb" - integrity sha512-qerSRB0p+UDEssxTtm6EDKcE7W4OaoisfIMl4CngyEhjpYglocpNg6UEqCvemdGhosAsg4sO2dXJOdyBifPGCg== + version "4.0.4" + resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.4.tgz#b5463ace635a083d018bdc7c917b4c5f10a85384" + integrity sha512-rlaVLnVxtxvoyLsQQFBx53YmXHDxRIzzTLbdfxqi4yocpSjAxXwkU0cScM5JgSKMqEhrZpnvQ2D9gjylR0AimQ== events@^3.0.0: version "3.1.0" @@ -4104,7 +3114,7 @@ fast-deep-equal@^3.1.1: resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.1.tgz#545145077c501491e33b15ec408c294376e94ae4" integrity sha512-8UEa58QDLauDNfpbrX55Q9jrGHThw2ZMdOky5Gl1CDtVeJDPVrG4Jxx1N8jw2gkWaff5UUuX1KJd+9zGe2B+ZA== -fast-glob@^2.0.2, fast-glob@^2.2.6: +fast-glob@^2.0.2: version "2.2.7" resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-2.2.7.tgz#6953857c3afa475fff92ee6015d52da70a4cd39d" integrity sha512-g1KuQwHOZAmOZMuBtHdxDtju+T2RT8jgCC9aANsbpdiDDTSnjgfuVsIBNKbUeJI3oKMRExcfNDtJl4OhbffMsw== @@ -4139,13 +3149,13 @@ fast-levenshtein@~2.0.6: integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc= fastq@^1.6.0: - version "1.7.0" - resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.7.0.tgz#fcd79a08c5bd7ec5b55cd3f5c4720db551929801" - integrity sha512-YOadQRnHd5q6PogvAR/x62BGituF2ufiEA6s8aavQANw5YKHERI4AREboX6KotzP8oX2klxYF2wcV/7bn1clfQ== + version "1.8.0" + resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.8.0.tgz#550e1f9f59bbc65fe185cb6a9b4d95357107f481" + integrity sha512-SMIZoZdLh/fgofivvIkmknUXyPnvxRE3DhtZ5Me3Mrsk5gyPL42F0xr51TdRXskBxHfMp+07bcYzfsYEsSQA9Q== dependencies: reusify "^1.0.4" -figgy-pudding@^3.4.1, figgy-pudding@^3.5.1: +figgy-pudding@^3.5.1: version "3.5.2" resolved "https://registry.yarnpkg.com/figgy-pudding/-/figgy-pudding-3.5.2.tgz#b4eee8148abb01dcf1d1ac34367d59e12fa61d6e" integrity sha512-0btnI/H8f2pavGMN8w40mlSKOfTK2SVJmBfBeVIj3kNw0swwgzyRq0d5TJVOwodFmtvpPeWPN/MCcfuWF0Ezbw== @@ -4258,6 +3268,14 @@ find-up@^2.0.0, find-up@^2.1.0: dependencies: locate-path "^2.0.0" +find-up@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" + integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw== + dependencies: + locate-path "^5.0.0" + path-exists "^4.0.0" + flat-cache@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-2.0.1.tgz#5d296d6f04bda44a4630a301413bdbc2ec085ec0" @@ -4353,13 +3371,6 @@ fs-extra@^8.1.0: jsonfile "^4.0.0" universalify "^0.1.0" -fs-minipass@^1.2.5: - version "1.2.7" - resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-1.2.7.tgz#ccff8570841e7fe4265693da88936c55aed7f7c7" - integrity sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA== - dependencies: - minipass "^2.6.0" - fs-mkdirp-stream@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fs-mkdirp-stream/-/fs-mkdirp-stream-1.0.0.tgz#0b7815fc3201c6a69e14db98ce098c16935259eb" @@ -4384,9 +3395,9 @@ fs.realpath@^1.0.0: integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= fsevents@^1.2.7: - version "1.2.12" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.2.12.tgz#db7e0d8ec3b0b45724fd4d83d43554a8f1f0de5c" - integrity sha512-Ggd/Ktt7E7I8pxZRbGIs7vwqAPscSESMrCSkx2FtWeqmheJgCo2R74fTsZFCifr0VTPwqRpPv17+6b8Zp7th0Q== + version "1.2.13" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.2.13.tgz#f325cb0455592428bcf11b383370ef70e3bfcc38" + integrity sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw== dependencies: bindings "^1.5.0" nan "^2.12.1" @@ -4406,30 +3417,6 @@ functional-red-black-tree@^1.0.1: resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327" integrity sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc= -gauge@~2.7.3: - version "2.7.4" - resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7" - integrity sha1-LANAXHU4w51+s3sxcCLjJfsBi/c= - dependencies: - aproba "^1.0.3" - console-control-strings "^1.0.0" - has-unicode "^2.0.0" - object-assign "^4.1.0" - signal-exit "^3.0.0" - string-width "^1.0.1" - strip-ansi "^3.0.1" - wide-align "^1.1.0" - -generic-pool@^3.7.1: - version "3.7.1" - resolved "https://registry.yarnpkg.com/generic-pool/-/generic-pool-3.7.1.tgz#36fe5bb83e7e0e032e5d32cd05dc00f5ff119aa8" - integrity sha512-ug6DAZoNgWm6q5KhPFA+hzXfBLFQu5sTXxPpv44DmE0A2g+CiHoq9LTVdkXpZMkYVMoGw83F6W+WT0h0MFMK/w== - -genfun@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/genfun/-/genfun-5.0.0.tgz#9dd9710a06900a5c4a5bf57aca5da4e52fe76537" - integrity sha512-KGDOARWVga7+rnB3z9Sd2Letx515owfk0hSxHGuqjANb1M+x2bGZGqHLiozPsYMdM2OubeMni/Hpwmjq6qIUhA== - gensync@^1.0.0-beta.1: version "1.0.0-beta.1" resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.1.tgz#58f4361ff987e5ff6e1e7a210827aa371eaac269" @@ -4461,11 +3448,6 @@ get-pkg-repo@^1.0.0: parse-github-repo-url "^1.3.0" through2 "^2.0.0" -get-port@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/get-port/-/get-port-4.2.0.tgz#e37368b1e863b7629c43c5a323625f95cf24b119" - integrity sha512-/b3jarXkH8KJoOMQc3uVGHASwGLPq3gSFJ7tgJm2diza+bydJPTGOibin2steecKeOylE8oY2JERlVWkAJO6yw== - get-stdin@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-4.0.1.tgz#b968c6b0a04384324902e8bf1a5df32579a450fe" @@ -4476,7 +3458,7 @@ get-stream@^3.0.0: resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14" integrity sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ= -get-stream@^4.0.0, get-stream@^4.1.0: +get-stream@^4.0.0: version "4.1.0" resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-4.1.0.tgz#c1b255575f3dc21d59bfc79cd3d2b46b1c3a54b5" integrity sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w== @@ -4507,13 +3489,13 @@ git-raw-commits@2.0.0: through2 "^2.0.0" git-raw-commits@^2.0.0: - version "2.0.3" - resolved "https://registry.yarnpkg.com/git-raw-commits/-/git-raw-commits-2.0.3.tgz#f040e67b8445962d4d168903a9e84c4240c17655" - integrity sha512-SoSsFL5lnixVzctGEi2uykjA7B5I0AhO9x6kdzvGRHbxsa6JSEgrgy1esRKsfOKE1cgyOJ/KDR2Trxu157sb8w== + version "2.0.7" + resolved "https://registry.yarnpkg.com/git-raw-commits/-/git-raw-commits-2.0.7.tgz#02e9357727a9755efa8e14dd5e59b381c29068fb" + integrity sha512-SkwrTqrDxw8y0G1uGJ9Zw13F7qu3LF8V4BifyDeiJCxSnjRGZD9SaoMiMqUvvXMXh6S3sOQ1DsBN7L2fMUZW/g== dependencies: - dargs "^4.0.1" + dargs "^7.0.0" lodash.template "^4.0.2" - meow "^5.0.0" + meow "^7.0.0" split2 "^2.0.0" through2 "^3.0.0" @@ -4525,37 +3507,14 @@ git-remote-origin-url@^2.0.0: gitconfiglocal "^1.0.0" pify "^2.3.0" -git-semver-tags@^2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/git-semver-tags/-/git-semver-tags-2.0.3.tgz#48988a718acf593800f99622a952a77c405bfa34" - integrity sha512-tj4FD4ww2RX2ae//jSrXZzrocla9db5h0V7ikPl1P/WwoZar9epdUhwR7XHXSgc+ZkNq72BEEerqQuicoEQfzA== - dependencies: - meow "^4.0.0" - semver "^6.0.0" - -git-semver-tags@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/git-semver-tags/-/git-semver-tags-3.0.1.tgz#9cb9e4974437de1f71f32da3bfe74f4d35afb1b9" - integrity sha512-Hzd1MOHXouITfCasrpVJbRDg9uvW7LfABk3GQmXYZByerBDrfrEMP9HXpNT7RxAbieiocP6u+xq20DkvjwxnCA== +git-semver-tags@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/git-semver-tags/-/git-semver-tags-4.0.0.tgz#a9dd58a0dd3561a4a9898b7e9731cf441c98fc38" + integrity sha512-LajaAWLYVBff+1NVircURJFL8TQ3EMIcLAfHisWYX/nPoMwnTYfWAznQDmMujlLqoD12VtLmoSrF1sQ5MhimEQ== dependencies: - meow "^5.0.0" + meow "^7.0.0" semver "^6.0.0" -git-up@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/git-up/-/git-up-4.0.1.tgz#cb2ef086653640e721d2042fe3104857d89007c0" - integrity sha512-LFTZZrBlrCrGCG07/dm1aCjjpL1z9L3+5aEeI9SBhAqSc+kiA9Or1bgZhQFNppJX6h/f5McrvJt1mQXTFm6Qrw== - dependencies: - is-ssh "^1.3.0" - parse-url "^5.0.0" - -git-url-parse@^11.1.2: - version "11.1.2" - resolved "https://registry.yarnpkg.com/git-url-parse/-/git-url-parse-11.1.2.tgz#aff1a897c36cc93699270587bea3dbcbbb95de67" - integrity sha512-gZeLVGY8QVKMIkckncX+iCq2/L8PlwncvDFKiWkBn9EtCfYDbliRTTp6qzyQ1VMdITUfq7293zDzfpjdiGASSQ== - dependencies: - git-up "^4.0.0" - gitconfiglocal@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/gitconfiglocal/-/gitconfiglocal-1.0.0.tgz#41d045f3851a5ea88f03f24ca1c6178114464b9b" @@ -4571,7 +3530,7 @@ glob-parent@^3.1.0: is-glob "^3.1.0" path-dirname "^1.0.0" -glob-parent@^5.0.0, glob-parent@^5.1.0, glob-parent@~5.1.0: +glob-parent@^5.1.0, glob-parent@~5.1.0: version "5.1.1" resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.1.tgz#b6c1ef417c4e5663ea498f1c45afac6916bbc229" integrity sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ== @@ -4671,31 +3630,17 @@ globby@^8.0.1: pify "^3.0.0" slash "^1.0.0" -globby@^9.2.0: - version "9.2.0" - resolved "https://registry.yarnpkg.com/globby/-/globby-9.2.0.tgz#fd029a706c703d29bdd170f4b6db3a3f7a7cb63d" - integrity sha512-ollPHROa5mcxDEkwg6bPt3QbEf4pDQSNtd6JPL1YvOvAo/7/0VAm9TccUeoTmarjPw4pfUthSCqcyfNB1I3ZSg== - dependencies: - "@types/glob" "^7.1.1" - array-union "^1.0.2" - dir-glob "^2.2.2" - fast-glob "^2.2.6" - glob "^7.1.3" - ignore "^4.0.3" - pify "^4.0.1" - slash "^2.0.0" - graceful-fs@^4.0.0, graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.1.9, graceful-fs@^4.2.0, graceful-fs@^4.2.2: - version "4.2.3" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.3.tgz#4a12ff1b60376ef09862c2093edd908328be8423" - integrity sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ== + version "4.2.4" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.4.tgz#2256bde14d3632958c465ebc96dc467ca07a29fb" + integrity sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw== growl@1.10.5: version "1.10.5" resolved "https://registry.yarnpkg.com/growl/-/growl-1.10.5.tgz#f2735dc2283674fa67478b10181059355c369e5e" integrity sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA== -handlebars@^4.0.1, handlebars@^4.1.2, handlebars@^4.4.0: +handlebars@^4.0.1, handlebars@^4.1.2, handlebars@^4.7.6: version "4.7.6" resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.7.6.tgz#d4c05c1baf90e9945f77aa68a7a219aa4a7df74e" integrity sha512-1f2BACcBfiwAfStCKZNrUCgqNZkGsAT7UM3kkYtXuLo0KnaVfjKOyf7PRzB6++aK9STyT1Pd2ZCPe3EGOXleXA== @@ -4720,6 +3665,11 @@ har-validator@~5.1.3: ajv "^6.5.5" har-schema "^2.0.0" +hard-rejection@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/hard-rejection/-/hard-rejection-2.1.0.tgz#1c6eda5c1685c63942766d79bb40ae773cecd883" + integrity sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA== + has-ansi@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" @@ -4759,11 +3709,6 @@ has-symbols@^1.0.0, has-symbols@^1.0.1: resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.1.tgz#9f5214758a44196c406d9bd76cebf81ec2dd31e8" integrity sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg== -has-unicode@^2.0.0, has-unicode@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" - integrity sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk= - has-value@^0.3.1: version "0.3.1" resolved "https://registry.yarnpkg.com/has-value/-/has-value-0.3.1.tgz#7b1f58bada62ca827ec0a2078025654845995e1f" @@ -4803,12 +3748,13 @@ has@^1.0.0, has@^1.0.3: function-bind "^1.1.1" hash-base@^3.0.0: - version "3.0.4" - resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-3.0.4.tgz#5fc8686847ecd73499403319a6b0a3f3f6ae4918" - integrity sha1-X8hoaEfs1zSZQDMZprCj8/auSRg= + version "3.1.0" + resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-3.1.0.tgz#55c381d9e06e1d2997a883b4a3fddfe7f0d3af33" + integrity sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA== dependencies: - inherits "^2.0.1" - safe-buffer "^5.0.1" + inherits "^2.0.4" + readable-stream "^3.6.0" + safe-buffer "^5.2.0" hash.js@^1.0.0, hash.js@^1.0.3: version "1.1.7" @@ -4845,7 +3791,7 @@ home-or-tmp@^2.0.0: os-homedir "^1.0.0" os-tmpdir "^1.0.1" -hosted-git-info@^2.1.4, hosted-git-info@^2.7.1: +hosted-git-info@^2.1.4: version "2.8.8" resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.8.tgz#7539bd4bc1e0e0a895815a2e0262420b12858488" integrity sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg== @@ -4865,11 +3811,6 @@ html-comment-regex@^1.1.0: resolved "https://registry.yarnpkg.com/html-comment-regex/-/html-comment-regex-1.1.2.tgz#97d4688aeb5c81886a364faa0cad1dda14d433a7" integrity sha512-P+M65QY2JQ5Y0G9KKdlDpo0zK+/OHptU5AaBwUfAIDJZk1MYf32Frm84EcOytfJE0t5JvkAnKlmjsXDnWzCJmQ== -http-cache-semantics@^3.8.1: - version "3.8.1" - resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-3.8.1.tgz#39b0e16add9b605bf0a9ef3d9daaf4843b4cacd2" - integrity sha512-5ai2iksyV8ZXmnZhHH4rWPoxxistEexSi5936zIQ1bnNTW5VnA85B6P/VpXiRM017IgRvb2kKo1a//y+0wSp3w== - http-errors@1.7.2: version "1.7.2" resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.7.2.tgz#4f5029cf13239f31036e5b2e55292bcfbcc85c8f" @@ -4881,18 +3822,10 @@ http-errors@1.7.2: statuses ">= 1.5.0 < 2" toidentifier "1.0.0" -http-proxy-agent@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-2.1.0.tgz#e4821beef5b2142a2026bd73926fe537631c5405" - integrity sha512-qwHbBLV7WviBl0rQsOzH6o5lwyOIvwp/BdFnvVxXORldu5TmjFfjzBcWUWS5kWAZhmv+JtiDhSuQCp4sBfbIgg== - dependencies: - agent-base "4" - debug "3.1.0" - http-proxy@^1.13.0: - version "1.18.0" - resolved "https://registry.yarnpkg.com/http-proxy/-/http-proxy-1.18.0.tgz#dbe55f63e75a347db7f3d99974f2692a314a6a3a" - integrity sha512-84I2iJM/n1d4Hdgc6y2+qY5mDaz2PUVjlg9znE9byl+q0uC3DeByqBGReQu5tpLK0TAqTIXScRUV+dg7+bUPpQ== + version "1.18.1" + resolved "https://registry.yarnpkg.com/http-proxy/-/http-proxy-1.18.1.tgz#401541f0534884bbf95260334e72f88ee3976549" + integrity sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ== dependencies: eventemitter3 "^4.0.0" follow-redirects "^1.0.0" @@ -4912,21 +3845,6 @@ https-browserify@^1.0.0: resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-1.0.0.tgz#ec06c10e0a34c0f2faf199f7fd7fc78fffd03c73" integrity sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM= -https-proxy-agent@^2.2.3: - version "2.2.4" - resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-2.2.4.tgz#4ee7a737abd92678a293d9b34a1af4d0d08c787b" - integrity sha512-OmvfoQ53WLjtA9HeYP9RNrWMJzzAz1JGaSFr1nijg0PVR1JaD/xbJq1mdEIIlxGpXp9eSe/O2LgU9DJmTPd0Eg== - dependencies: - agent-base "^4.3.0" - debug "^3.1.0" - -humanize-ms@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/humanize-ms/-/humanize-ms-1.2.1.tgz#c46e3159a293f6b896da29316d8b6fe8bb79bbed" - integrity sha1-xG4xWaKT9riW2ikxbYtv6Lt5u+0= - dependencies: - ms "^2.0.0" - husky@^0.14.3: version "0.14.3" resolved "https://registry.yarnpkg.com/husky/-/husky-0.14.3.tgz#c69ed74e2d2779769a17ba8399b54ce0b63c12c3" @@ -4936,7 +3854,7 @@ husky@^0.14.3: normalize-path "^1.0.0" strip-indent "^2.0.0" -iconv-lite@0.4.24, iconv-lite@^0.4.24, iconv-lite@^0.4.4, iconv-lite@~0.4.13: +iconv-lite@0.4.24, iconv-lite@^0.4.24: version "0.4.24" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== @@ -4953,19 +3871,12 @@ iferr@^0.1.5: resolved "https://registry.yarnpkg.com/iferr/-/iferr-0.1.5.tgz#c60eed69e6d8fdb6b3104a1fcbca1c192dc5b501" integrity sha1-xg7taebY/bazEEofy8ocGS3FtQE= -ignore-walk@^3.0.1: - version "3.0.3" - resolved "https://registry.yarnpkg.com/ignore-walk/-/ignore-walk-3.0.3.tgz#017e2447184bfeade7c238e4aefdd1e8f95b1e37" - integrity sha512-m7o6xuOaT1aqheYHKf8W6J5pYH85ZI9w077erOzLje3JsB1gkafkAhHHY19dqjulgIZHFm32Cp5uNZgcQqdJKw== - dependencies: - minimatch "^3.0.4" - ignore@^3.3.5: version "3.3.10" resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.3.10.tgz#0a97fb876986e8081c631160f8f9f389157f0043" integrity sha512-Pgs951kaMm5GXP7MOvxERINe3gsaVjUWFm+UZPSq9xYriQAksyhg0csnS0KXSNRD5NmNdapXEpjxG49+AKh/ug== -ignore@^4.0.3, ignore@^4.0.6: +ignore@^4.0.6: version "4.0.6" resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc" integrity sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg== @@ -5005,14 +3916,6 @@ import-from@^2.1.0: dependencies: resolve-from "^3.0.0" -import-local@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/import-local/-/import-local-2.0.0.tgz#55070be38a5993cf18ef6db7e961f5bee5c5a09d" - integrity sha512-b6s04m3O+s3CGSbqDIyP4R6aAwAeYlVq9+WUWep6iHa8ETRf9yei1U48C5MmfJmV9AiLYYBKPMq/W+/WRpQmCQ== - dependencies: - pkg-dir "^3.0.0" - resolve-cwd "^2.0.0" - imurmurhash@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" @@ -5045,7 +3948,7 @@ indexof@0.0.1: resolved "https://registry.yarnpkg.com/indexof/-/indexof-0.0.1.tgz#82dc336d232b9062179d05ab3293a66059fd435d" integrity sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10= -infer-owner@^1.0.3, infer-owner@^1.0.4: +infer-owner@^1.0.3: version "1.0.4" resolved "https://registry.yarnpkg.com/infer-owner/-/infer-owner-1.0.4.tgz#c4cefcaa8e51051c2a40ba2ce8a3d27295af9467" integrity sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A== @@ -5058,7 +3961,7 @@ inflight@^1.0.4: once "^1.3.0" wrappy "1" -inherits@2, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.1, inherits@~2.0.3: +inherits@2, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.1, inherits@~2.0.3: version "2.0.4" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== @@ -5073,26 +3976,12 @@ inherits@2.0.3: resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4= -ini@^1.3.2, ini@^1.3.4, ini@~1.3.0: +ini@^1.3.2: version "1.3.5" resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927" integrity sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw== -init-package-json@^1.10.3: - version "1.10.3" - resolved "https://registry.yarnpkg.com/init-package-json/-/init-package-json-1.10.3.tgz#45ffe2f610a8ca134f2bd1db5637b235070f6cbe" - integrity sha512-zKSiXKhQveNteyhcj1CoOP8tqp1QuxPIPBl8Bid99DGLFqA1p87M6lNgfjJHSBoWJJlidGOv5rWjyYKEB3g2Jw== - dependencies: - glob "^7.1.1" - npm-package-arg "^4.0.0 || ^5.0.0 || ^6.0.0" - promzard "^0.3.0" - read "~1.0.1" - read-package-json "1 || 2" - semver "2.x || 3.x || 4 || 5" - validate-npm-package-license "^3.0.1" - validate-npm-package-name "^3.0.0" - -inquirer@^6.2.0, inquirer@^6.2.2: +inquirer@^6.2.2: version "6.5.2" resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-6.5.2.tgz#ad50942375d036d327ff528c08bd5fab089928ca" integrity sha512-cntlB5ghuB0iuO65Ovoi8ogLHiWGs/5yNrtUcKjFhSSiVeAIVpD7koaSU9RM8mpXw5YDi9RdYXGQMaOURB7ycQ== @@ -5142,11 +4031,6 @@ invariant@^2.2.2: dependencies: loose-envify "^1.0.0" -ip@1.1.5: - version "1.1.5" - resolved "https://registry.yarnpkg.com/ip/-/ip-1.1.5.tgz#bdded70114290828c0a039e72ef25f5aaec4354a" - integrity sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo= - is-absolute-url@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/is-absolute-url/-/is-absolute-url-2.1.0.tgz#50530dfb84fcc9aa7dbe7852e83a37b93b9f2aa6" @@ -5220,13 +4104,6 @@ is-ci@^1.0.10: dependencies: ci-info "^1.5.0" -is-ci@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-2.0.0.tgz#6bc6334181810e04b5c22b3d589fdca55026404c" - integrity sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w== - dependencies: - ci-info "^2.0.0" - is-color-stop@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-color-stop/-/is-color-stop-1.1.0.tgz#cfff471aee4dd5c9e158598fbe12967b5cdad345" @@ -5281,6 +4158,11 @@ is-directory@^0.3.1: resolved "https://registry.yarnpkg.com/is-directory/-/is-directory-0.3.1.tgz#61339b6f2475fc772fd9c9d83f5c8575dc154ae1" integrity sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE= +is-docker@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-2.0.0.tgz#2cb0df0e75e2d064fe1864c37cdeacb7b2dcf25b" + integrity sha512-pJEdRugimx4fBMra5z2/5iRdZ63OhYV0vr0Dwm5+xtW4D1FvRkB8hamMIhnWfyJeDdyr/aa7BDyNbtG38VxgoQ== + is-extendable@^0.1.0, is-extendable@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" @@ -5383,7 +4265,7 @@ is-path-inside@^3.0.1: resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-3.0.2.tgz#f5220fc82a3e233757291dddc9c5877f2a1f3017" integrity sha512-/2UGPSgmtqwo1ktx8NDHjuPwZWmHhO+gj0f93EkhLB5RgW9RZevWYYlIkS6zePc6U2WpOdQYIwHe9YC4DWEBVg== -is-plain-obj@^1.0.0, is-plain-obj@^1.1.0: +is-plain-obj@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e" integrity sha1-caUMhCnfync8kqOQpKA7OfzVHT4= @@ -5403,9 +4285,9 @@ is-plain-object@^3.0.0: isobject "^4.0.0" is-promise@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-2.1.0.tgz#79a2a9ece7f096e80f36d2b2f3bc16c1ff4bf3fa" - integrity sha1-eaKp7OfwlugPNtKy87wWwf9L8/o= + version "2.2.2" + resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-2.2.2.tgz#39ab959ccbf9a774cf079f7b40c7a26f763135f1" + integrity sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ== is-regex@^1.0.5: version "1.0.5" @@ -5431,13 +4313,6 @@ is-resolvable@^1.0.0: resolved "https://registry.yarnpkg.com/is-resolvable/-/is-resolvable-1.1.0.tgz#fb18f87ce1feb925169c9a407c19318a3206ed88" integrity sha512-qgDYXFSR5WvEfuS5dMj6oTMEbrrSaM0CrFk2Yiq/gXnBvD9pMa2jGXxyhGLfvhZpuMZe18CJpFxAt3CRs42NMg== -is-ssh@^1.3.0: - version "1.3.1" - resolved "https://registry.yarnpkg.com/is-ssh/-/is-ssh-1.3.1.tgz#f349a8cadd24e65298037a522cf7520f2e81a0f3" - integrity sha512-0eRIASHZt1E68/ixClI8bp2YK2wmBPVWEismTs6M+M099jKgrzl/3E976zIbImSIob48N2/XGe9y7ZiYdImSlg== - dependencies: - protocols "^1.1.0" - is-stream@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" @@ -5486,7 +4361,7 @@ is-valid-glob@^1.0.0: resolved "https://registry.yarnpkg.com/is-valid-glob/-/is-valid-glob-1.0.0.tgz#29bf3eff701be2d4d315dbacc39bc39fe8f601aa" integrity sha1-Kb8+/3Ab4tTTFdusw5vDn+j2Aao= -is-windows@^1.0.0, is-windows@^1.0.1, is-windows@^1.0.2: +is-windows@^1.0.1, is-windows@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" integrity sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA== @@ -5497,9 +4372,11 @@ is-wsl@^1.1.0: integrity sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0= is-wsl@^2.1.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-2.1.1.tgz#4a1c152d429df3d441669498e2486d3596ebaf1d" - integrity sha512-umZHcSrwlDHo2TGMXv0DZ8dIUGunZ2Iv68YZnrmCiBPkZ4aaOhtv7pXJKeki9k3qJ3RJr0cDyitcl5wEH3AYog== + version "2.2.0" + resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-2.2.0.tgz#74a4c76e77ca9fd3f932f290c17ea326cd157271" + integrity sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww== + dependencies: + is-docker "^2.0.0" isarray@0.0.1: version "0.0.1" @@ -5673,7 +4550,7 @@ jsesc@^2.5.1: resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4" integrity sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA== -json-parse-better-errors@^1.0.0, json-parse-better-errors@^1.0.1, json-parse-better-errors@^1.0.2: +json-parse-better-errors@^1.0.1, json-parse-better-errors@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9" integrity sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw== @@ -5773,16 +4650,6 @@ karma-coverage@^1.1.1: minimatch "^3.0.0" source-map "^0.5.1" -karma-coveralls@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/karma-coveralls/-/karma-coveralls-2.1.0.tgz#b0fde853d0a7f35c5db8c8e56706b760f1069e2c" - integrity sha512-l2qg7ufv7ooPJ5gFDfQM63eI6LaNGjGlkR8PIvBsi/m3nrfY+m4a7ph6fvQ7Zb+gDTWlo92NM5H0p+VTk8lupw== - dependencies: - coveralls "~3.0.0" - lcov-result-merger "^3.0.0" - through2 "^2.0.0" - vinyl-fs "^3.0.2" - karma-firefox-launcher@^1.0.1: version "1.3.0" resolved "https://registry.yarnpkg.com/karma-firefox-launcher/-/karma-firefox-launcher-1.3.0.tgz#ebcbb1d1ddfada6be900eb8fae25bcf2dcdc8171" @@ -5881,7 +4748,7 @@ kind-of@^5.0.0: resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-5.1.0.tgz#729c91e2d857b7a419a1f9aa65685c4c33f5845d" integrity sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw== -kind-of@^6.0.0, kind-of@^6.0.2: +kind-of@^6.0.0, kind-of@^6.0.2, kind-of@^6.0.3: version "6.0.3" resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw== @@ -5900,20 +4767,6 @@ lazystream@^1.0.0: dependencies: readable-stream "^2.0.5" -lcov-parse@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/lcov-parse/-/lcov-parse-1.0.0.tgz#eb0d46b54111ebc561acb4c408ef9363bdc8f7e0" - integrity sha1-6w1GtUER68VhrLTECO+TY73I9+A= - -lcov-result-merger@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/lcov-result-merger/-/lcov-result-merger-3.1.0.tgz#ae6d1be663dbf7d586d8004642359d39de72039e" - integrity sha512-vGXaMNGZRr4cYvW+xMVg+rg7qd5DX9SbGXl+0S3k85+gRZVK4K7UvxPWzKb/qiMwe+4bx3EOrW2o4mbdb1WnsA== - dependencies: - through2 "^2.0.3" - vinyl "^2.1.0" - vinyl-fs "^3.0.2" - lead@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/lead/-/lead-1.0.0.tgz#6f14f99a37be3a9dd784f5495690e5903466ee42" @@ -5921,30 +4774,6 @@ lead@^1.0.0: dependencies: flush-write-stream "^1.0.2" -lerna@^3.4.0: - version "3.20.2" - resolved "https://registry.yarnpkg.com/lerna/-/lerna-3.20.2.tgz#abf84e73055fe84ee21b46e64baf37b496c24864" - integrity sha512-bjdL7hPLpU3Y8CBnw/1ys3ynQMUjiK6l9iDWnEGwFtDy48Xh5JboR9ZJwmKGCz9A/sarVVIGwf1tlRNKUG9etA== - dependencies: - "@lerna/add" "3.20.0" - "@lerna/bootstrap" "3.20.0" - "@lerna/changed" "3.20.0" - "@lerna/clean" "3.20.0" - "@lerna/cli" "3.18.5" - "@lerna/create" "3.18.5" - "@lerna/diff" "3.18.5" - "@lerna/exec" "3.20.0" - "@lerna/import" "3.18.5" - "@lerna/info" "3.20.0" - "@lerna/init" "3.18.5" - "@lerna/link" "3.18.5" - "@lerna/list" "3.20.0" - "@lerna/publish" "3.20.2" - "@lerna/run" "3.20.0" - "@lerna/version" "3.20.2" - import-local "^2.0.0" - npmlog "^4.1.2" - leven@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/leven/-/leven-2.1.0.tgz#c2e7a9f772094dee9d34202ae8acce4687875580" @@ -5958,6 +4787,11 @@ levn@^0.3.0, levn@~0.3.0: prelude-ls "~1.1.2" type-check "~0.3.2" +lines-and-columns@^1.1.6: + version "1.1.6" + resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.1.6.tgz#1c00c743b433cd0a4e80758f7b64a57440d9ff00" + integrity sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA= + lint-staged@^7.3.0: version "7.3.0" resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-7.3.0.tgz#90ff33e5ca61ed3dbac35b6f6502dbefdc0db58d" @@ -6051,17 +4885,6 @@ load-json-file@^4.0.0: pify "^3.0.0" strip-bom "^3.0.0" -load-json-file@^5.3.0: - version "5.3.0" - resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-5.3.0.tgz#4d3c1e01fa1c03ea78a60ac7af932c9ce53403f3" - integrity sha512-cJGP40Jc/VXUsp8/OrnyKyTZ1y6v/dphm3bioS+RrKXjK2BB6wHUd6JptZEFDGgGahMT+InnZO5i1Ei9mpC8Bw== - dependencies: - graceful-fs "^4.1.15" - parse-json "^4.0.0" - pify "^4.0.1" - strip-bom "^3.0.0" - type-fest "^0.3.0" - loader-runner@^2.4.0: version "2.4.0" resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-2.4.0.tgz#ed47066bfe534d7e84c4c7b9998c2a75607d9357" @@ -6101,16 +4924,18 @@ locate-path@^3.0.0: p-locate "^3.0.0" path-exists "^3.0.0" +locate-path@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-5.0.0.tgz#1afba396afd676a6d42504d0a67a3a7eb9f62aa0" + integrity sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g== + dependencies: + p-locate "^4.1.0" + lodash._reinterpolate@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d" integrity sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0= -lodash.clonedeep@^4.5.0: - version "4.5.0" - resolved "https://registry.yarnpkg.com/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz#e23f3f9c4f8fbdde872529c1071857a086e5ccef" - integrity sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8= - lodash.get@^4.4.2: version "4.4.2" resolved "https://registry.yarnpkg.com/lodash.get/-/lodash.get-4.4.2.tgz#2d177f652fa31e939b4438d5341499dfa3825e99" @@ -6131,12 +4956,7 @@ lodash.set@^4.3.2: resolved "https://registry.yarnpkg.com/lodash.set/-/lodash.set-4.3.2.tgz#d8757b1da807dde24816b0d6a84bea1a76230b23" integrity sha1-2HV7HagH3eJIFrDWqEvqGnYjCyM= -lodash.sortby@^4.7.0: - version "4.7.0" - resolved "https://registry.yarnpkg.com/lodash.sortby/-/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438" - integrity sha1-7dFMgk4sycHgsKG0K7UhBRakJDg= - -lodash.template@^4.0.2, lodash.template@^4.5.0: +lodash.template@^4.0.2: version "4.5.0" resolved "https://registry.yarnpkg.com/lodash.template/-/lodash.template-4.5.0.tgz#f976195cf3f347d0d5f52483569fe8031ccce8ab" integrity sha512-84vYFxIkmidUiFxidA/KjjH9pAycqW+h980j7Fuz5qxRtO9pgB7MDFTdys1N7A5mcucRiDyEq4fusljItR1T/A== @@ -6156,16 +4976,11 @@ lodash.uniq@^4.5.0: resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773" integrity sha1-0CJTc662Uq3BvILklFM5qEJ1R3M= -lodash@^4.0.0, lodash@^4.17.0, lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.12, lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.2.1, lodash@~4.17.14: +lodash@^4.0.0, lodash@^4.17.0, lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.12, lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.4, lodash@^4.17.5, lodash@~4.17.14: version "4.17.15" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548" integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A== -log-driver@^1.2.7: - version "1.2.7" - resolved "https://registry.yarnpkg.com/log-driver/-/log-driver-1.2.7.tgz#63b95021f0702fedfa2c9bb0a24e7797d71871d8" - integrity sha512-U7KCmLdqsGHBLeWqYlFA0V0Sl6P08EE1ZrmA9cxjUE0WVqT9qnyVDPz1kzpFEP0jdJuFnasWIfSd7fsaNXkpbg== - log-symbols@2.2.0, log-symbols@^2.1.0, log-symbols@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-2.2.0.tgz#5740e1c5d6f0dfda4ad9323b5332107ef6b4c40a" @@ -6255,14 +5070,7 @@ macos-release@^2.2.0: resolved "https://registry.yarnpkg.com/macos-release/-/macos-release-2.3.0.tgz#eb1930b036c0800adebccd5f17bc4c12de8bb71f" integrity sha512-OHhSbtcviqMPt7yfw5ef5aghS2jzFVKEFyCJndQt2YpSQ9qRVSEv2axSJI1paVThEu+FFGs584h/1YhxjVqajA== -make-dir@^1.0.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-1.3.0.tgz#79c1033b80515bd6d24ec9933e860ca75ee27f0c" - integrity sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ== - dependencies: - pify "^3.0.0" - -make-dir@^2.0.0, make-dir@^2.1.0: +make-dir@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-2.1.0.tgz#5f0310e18b8be898cc07009295a30ae41e91e6f5" integrity sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA== @@ -6270,23 +5078,6 @@ make-dir@^2.0.0, make-dir@^2.1.0: pify "^4.0.1" semver "^5.6.0" -make-fetch-happen@^5.0.0: - version "5.0.2" - resolved "https://registry.yarnpkg.com/make-fetch-happen/-/make-fetch-happen-5.0.2.tgz#aa8387104f2687edca01c8687ee45013d02d19bd" - integrity sha512-07JHC0r1ykIoruKO8ifMXu+xEU8qOXDFETylktdug6vJDACnP+HKevOu3PXyNPzFyTSlz8vrBYlBO1JZRe8Cag== - dependencies: - agentkeepalive "^3.4.1" - cacache "^12.0.0" - http-cache-semantics "^3.8.1" - http-proxy-agent "^2.1.0" - https-proxy-agent "^2.2.3" - lru-cache "^5.1.1" - mississippi "^3.0.0" - node-fetch-npm "^2.0.2" - promise-retry "^1.1.1" - socks-proxy-agent "^4.0.0" - ssri "^6.0.0" - map-cache@^0.2.2: version "0.2.2" resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf" @@ -6302,6 +5093,11 @@ map-obj@^2.0.0: resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-2.0.0.tgz#a65cd29087a92598b8791257a523e021222ac1f9" integrity sha1-plzSkIepJZi4eRJXpSPgISIqwfk= +map-obj@^4.0.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-4.1.0.tgz#b91221b542734b9f14256c0132c897c5d7256fd5" + integrity sha512-glc9y00wgtwcDmp7GaE/0b0OnxpNJsVf3ael/An6Fe2Q51LLwN1er6sdomLRzz5h0+yMpiYLhWYF5R7HeqVd4g== + map-stream@^0.0.7: version "0.0.7" resolved "https://registry.yarnpkg.com/map-stream/-/map-stream-0.0.7.tgz#8a1f07896d82b10926bd3744a2420009f88974a8" @@ -6395,20 +5191,24 @@ meow@^4.0.0: redent "^2.0.0" trim-newlines "^2.0.0" -meow@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/meow/-/meow-5.0.0.tgz#dfc73d63a9afc714a5e371760eb5c88b91078aa4" - integrity sha512-CbTqYU17ABaLefO8vCU153ZZlprKYWDljcndKKDCFcYQITzWCXZAVk4QMFZPgvzrnUQ3uItnIE/LoUOwrT15Ig== - dependencies: - camelcase-keys "^4.0.0" - decamelize-keys "^1.0.0" - loud-rejection "^1.0.0" - minimist-options "^3.0.1" - normalize-package-data "^2.3.4" - read-pkg-up "^3.0.0" - redent "^2.0.0" - trim-newlines "^2.0.0" - yargs-parser "^10.0.0" +meow@^7.0.0: + version "7.0.1" + resolved "https://registry.yarnpkg.com/meow/-/meow-7.0.1.tgz#1ed4a0a50b3844b451369c48362eb0515f04c1dc" + integrity sha512-tBKIQqVrAHqwit0vfuFPY3LlzJYkEOFyKa3bPgxzNl6q/RtN8KQ+ALYEASYuFayzSAsjlhXj/JZ10rH85Q6TUw== + dependencies: + "@types/minimist" "^1.2.0" + arrify "^2.0.1" + camelcase "^6.0.0" + camelcase-keys "^6.2.2" + decamelize-keys "^1.1.0" + hard-rejection "^2.1.0" + minimist-options "^4.0.2" + normalize-package-data "^2.5.0" + read-pkg-up "^7.0.1" + redent "^3.0.0" + trim-newlines "^3.0.0" + type-fest "^0.13.1" + yargs-parser "^18.1.3" merge-descriptors@~1.0.0: version "1.0.1" @@ -6455,22 +5255,22 @@ miller-rabin@^4.0.0: bn.js "^4.0.0" brorand "^1.0.1" -mime-db@1.43.0: - version "1.43.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.43.0.tgz#0a12e0502650e473d735535050e7c8f4eb4fae58" - integrity sha512-+5dsGEEovYbT8UY9yD7eE4XTc4UwJ1jBYlgaQQF38ENsKR3wj/8q8RFZrF9WIZpB2V1ArTVFUva8sAul1NzRzQ== +mime-db@1.44.0: + version "1.44.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.44.0.tgz#fa11c5eb0aca1334b4233cb4d52f10c5a6272f92" + integrity sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg== mime-types@^2.1.12, mime-types@~2.1.19, mime-types@~2.1.24: - version "2.1.26" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.26.tgz#9c921fc09b7e149a65dfdc0da4d20997200b0a06" - integrity sha512-01paPWYgLrkqAyrlDorC1uDwl2p3qZT7yl806vW7DvDoxwXi46jsjFbg+WdwotBIk6/MbEhO/dh5aZ5sNj/dWQ== + version "2.1.27" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.27.tgz#47949f98e279ea53119f5722e0f34e529bec009f" + integrity sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w== dependencies: - mime-db "1.43.0" + mime-db "1.44.0" mime@^2.1.0, mime@^2.3.1: - version "2.4.4" - resolved "https://registry.yarnpkg.com/mime/-/mime-2.4.4.tgz#bd7b91135fc6b01cde3e9bae33d659b63d8857e5" - integrity sha512-LRxmNwziLPT828z+4YkNzloCFC2YM4wrB99k+AV5ZbEyfGNWfG8SO1FUXLmLDBSo89NrJZ4DIWeLjy1CHGhMGA== + version "2.4.5" + resolved "https://registry.yarnpkg.com/mime/-/mime-2.4.5.tgz#d8de2ecb92982dedbb6541c9b6841d7f218ea009" + integrity sha512-3hQhEUF027BuxZjQA3s7rIv/7VCQPa27hN9u9g87sEkWaKwQPuXOkVKtOeiyUrnWqTDiOs8Ed2rwg733mB0R5w== mimic-fn@^1.0.0: version "1.2.0" @@ -6482,6 +5282,11 @@ mimic-fn@^2.1.0: resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== +min-indent@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/min-indent/-/min-indent-1.0.0.tgz#cfc45c37e9ec0d8f0a0ec3dd4ef7f7c3abe39256" + integrity sha1-z8RcN+nsDY8KDsPdTvf3w6vjklY= + minimalistic-assert@^1.0.0, minimalistic-assert@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7" @@ -6507,13 +5312,14 @@ minimist-options@^3.0.1: arrify "^1.0.1" is-plain-obj "^1.1.0" -minimist-options@^4.0.1: - version "4.0.2" - resolved "https://registry.yarnpkg.com/minimist-options/-/minimist-options-4.0.2.tgz#29c4021373ded40d546186725e57761e4b1984a7" - integrity sha512-seq4hpWkYSUh1y7NXxzucwAN9yVlBc3Upgdjz8vLCP97jG8kaOmzYrVH/m7tQ1NYD1wdtZbSLfdy4zFmRWuc/w== +minimist-options@^4.0.2: + version "4.1.0" + resolved "https://registry.yarnpkg.com/minimist-options/-/minimist-options-4.1.0.tgz#c0655713c53a8a2ebd77ffa247d342c40f010619" + integrity sha512-Q4r8ghd80yhO/0j1O3B2BjweX3fiHg9cdOwjJd2J76Q135c+NDxGCqdYKQ1SKBuFfgWbAUzBfvYjPUEeNgqN1A== dependencies: arrify "^1.0.1" is-plain-obj "^1.1.0" + kind-of "^6.0.3" minimist@1.2.0: version "1.2.0" @@ -6530,21 +5336,6 @@ minimist@~0.0.1: resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf" integrity sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8= -minipass@^2.3.5, minipass@^2.6.0, minipass@^2.8.6, minipass@^2.9.0: - version "2.9.0" - resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.9.0.tgz#e713762e7d3e32fed803115cf93e04bca9fcc9a6" - integrity sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg== - dependencies: - safe-buffer "^5.1.2" - yallist "^3.0.0" - -minizlib@^1.2.1: - version "1.3.3" - resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-1.3.3.tgz#2290de96818a34c29551c8a8d301216bd65a861d" - integrity sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q== - dependencies: - minipass "^2.9.0" - mississippi@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/mississippi/-/mississippi-3.0.0.tgz#ea0a3291f97e0b5e8776b363d5f0a12d94c67022" @@ -6569,18 +5360,6 @@ mixin-deep@^1.2.0: for-in "^1.0.2" is-extendable "^1.0.1" -mkdirp-promise@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/mkdirp-promise/-/mkdirp-promise-5.0.1.tgz#e9b8f68e552c68a9c1713b84883f7a1dd039b8a1" - integrity sha1-6bj2jlUsaKnBcTuEiD96HdA5uKE= - dependencies: - mkdirp "*" - -mkdirp@*: - version "1.0.4" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" - integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== - mkdirp@0.5.4: version "0.5.4" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.4.tgz#fd01504a6797ec5c9be81ff43d204961ed64a512" @@ -6588,7 +5367,7 @@ mkdirp@0.5.4: dependencies: minimist "^1.2.5" -mkdirp@0.5.x, mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@^0.5.3, mkdirp@~0.5.1: +mkdirp@0.5.x, mkdirp@^0.5.1, mkdirp@^0.5.3, mkdirp@~0.5.1: version "0.5.5" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.5.tgz#d91cefd62d1436ca0f41620e251288d420099def" integrity sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ== @@ -6640,9 +5419,9 @@ module-not-found-error@^1.0.1: integrity sha1-z4tP9PKWQGdNbN0CsOO8UjwrvcA= moment@^2.22.2: - version "2.24.0" - resolved "https://registry.yarnpkg.com/moment/-/moment-2.24.0.tgz#0d055d53f5052aa653c9f6eb68bb5d12bf5c2b5b" - integrity sha512-bV7f+6l2QigeBBZSM/6yTNq4P2fNpSWj/0e7jQcy87A8e7o2nAfP/34/2ky5Vw4B9S446EtIhodAzkFCcR4dQg== + version "2.25.3" + resolved "https://registry.yarnpkg.com/moment/-/moment-2.25.3.tgz#252ff41319cf41e47761a1a88cab30edfe9808c0" + integrity sha512-PuYv0PHxZvzc15Sp8ybUCoQ+xpyPWvjOuK72a5ovzp2LI32rJXOiIfyoFoYvG3s6EwwrdkMyWuRiEHSZRLJNdg== move-concurrently@^1.0.1: version "1.0.1" @@ -6656,21 +5435,6 @@ move-concurrently@^1.0.1: rimraf "^2.5.4" run-queue "^1.0.3" -mrgit@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/mrgit/-/mrgit-1.0.0.tgz#8904707d6fca656000e64ab4ba12d28c444cbc05" - integrity sha512-peAgkA6+U8rgenoq1BBmzxczLs6778rGjU4SZdpm4AA8dXUhDWGC6Q0d3IwzKhdaaDAZ01WF4MPWQGhh9EXnMA== - dependencies: - chalk "^2.4.2" - cli-table "^0.3.1" - generic-pool "^3.7.1" - meow "^5.0.0" - minimatch "^3.0.4" - minimist "^1.2.0" - minimist-options "^4.0.1" - shelljs "^0.8.3" - upath "^1.1.2" - ms@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" @@ -6681,40 +5445,21 @@ ms@2.1.1: resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a" integrity sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg== -ms@^2.0.0, ms@^2.1.1: - version "2.1.2" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" - integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== - -multimatch@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/multimatch/-/multimatch-3.0.0.tgz#0e2534cc6bc238d9ab67e1b9cd5fcd85a6dbf70b" - integrity sha512-22foS/gqQfANZ3o+W7ST2x25ueHDVNWl/b9OlGcLpy/iKxjCpvcNCM51YCenUi7Mt/jAjjqv8JwZRs8YP5sRjA== - dependencies: - array-differ "^2.0.3" - array-union "^1.0.2" - arrify "^1.0.1" - minimatch "^3.0.4" +ms@^2.1.1: + version "2.1.2" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" + integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== mute-stream@0.0.7: version "0.0.7" resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab" integrity sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s= -mute-stream@0.0.8, mute-stream@~0.0.4: +mute-stream@0.0.8: version "0.0.8" resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d" integrity sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA== -mz@^2.5.0: - version "2.7.0" - resolved "https://registry.yarnpkg.com/mz/-/mz-2.7.0.tgz#95008057a56cafadc2bc63dde7f9ff6955948e32" - integrity sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q== - dependencies: - any-promise "^1.0.0" - object-assign "^4.0.1" - thenify-all "^1.0.0" - nan@^2.12.1: version "2.14.1" resolved "https://registry.yarnpkg.com/nan/-/nan-2.14.1.tgz#d7be34dfa3105b91494c3147089315eff8874b01" @@ -6742,15 +5487,6 @@ natural-compare@^1.4.0: resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" integrity sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc= -needle@^2.2.1: - version "2.4.1" - resolved "https://registry.yarnpkg.com/needle/-/needle-2.4.1.tgz#14af48732463d7475696f937626b1b993247a56a" - integrity sha512-x/gi6ijr4B7fwl6WYL9FwlCvRQKGlUNvnceho8wxkwXqN8jvVmmmATTmZPRRG7b/yC1eode26C2HO9jl78Du9g== - dependencies: - debug "^3.2.6" - iconv-lite "^0.4.4" - sax "^1.2.4" - negotiator@0.6.2: version "0.6.2" resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.2.tgz#feacf7ccf525a77ae9634436a64883ffeca346fb" @@ -6790,37 +5526,11 @@ node-environment-flags@1.0.5: object.getownpropertydescriptors "^2.0.3" semver "^5.7.0" -node-fetch-npm@^2.0.2: - version "2.0.4" - resolved "https://registry.yarnpkg.com/node-fetch-npm/-/node-fetch-npm-2.0.4.tgz#6507d0e17a9ec0be3bec516958a497cec54bf5a4" - integrity sha512-iOuIQDWDyjhv9qSDrj9aq/klt6F9z1p2otB3AV7v3zBDcL/x+OfGsvGQZZCcMZbUf4Ujw1xGNQkjvGnVT22cKg== - dependencies: - encoding "^0.1.11" - json-parse-better-errors "^1.0.0" - safe-buffer "^5.1.1" - -node-fetch@^2.3.0, node-fetch@^2.5.0: +node-fetch@^2.3.0: version "2.6.0" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.0.tgz#e633456386d4aa55863f676a7ab0daa8fdecb0fd" integrity sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA== -node-gyp@^5.0.2: - version "5.1.0" - resolved "https://registry.yarnpkg.com/node-gyp/-/node-gyp-5.1.0.tgz#8e31260a7af4a2e2f994b0673d4e0b3866156332" - integrity sha512-OUTryc5bt/P8zVgNUmC6xdXiDJxLMAW8cF5tLQOT9E5sOQj+UeQxnnPy74K3CLCa/SOjjBlbuzDLR8ANwA+wmw== - dependencies: - env-paths "^2.2.0" - glob "^7.1.4" - graceful-fs "^4.2.2" - mkdirp "^0.5.1" - nopt "^4.0.1" - npmlog "^4.1.2" - request "^2.88.0" - rimraf "^2.6.3" - semver "^5.7.1" - tar "^4.4.12" - which "^1.3.1" - node-libs-browser@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/node-libs-browser/-/node-libs-browser-2.2.1.tgz#b64f513d18338625f90346d27b0d235e631f6425" @@ -6850,26 +5560,10 @@ node-libs-browser@^2.2.1: util "^0.11.0" vm-browserify "^1.0.1" -node-pre-gyp@*: - version "0.14.0" - resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.14.0.tgz#9a0596533b877289bcad4e143982ca3d904ddc83" - integrity sha512-+CvDC7ZttU/sSt9rFjix/P05iS43qHCOOGzcr3Ry99bXG7VX953+vFyEuph/tfqoYu8dttBkE86JSKBO2OzcxA== - dependencies: - detect-libc "^1.0.2" - mkdirp "^0.5.1" - needle "^2.2.1" - nopt "^4.0.1" - npm-packlist "^1.1.6" - npmlog "^4.0.2" - rc "^1.2.7" - rimraf "^2.6.1" - semver "^5.3.0" - tar "^4.4.2" - node-releases@^1.1.53: - version "1.1.53" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.53.tgz#2d821bfa499ed7c5dffc5e2f28c88e78a08ee3f4" - integrity sha512-wp8zyQVwef2hpZ/dJH7SfSrIPD6YoJz6BDQDpGEkcA0s3LpAQoxBIYmfIq6QAhC1DhwsyCgTaTTcONwX8qzCuQ== + version "1.1.55" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.55.tgz#8af23b7c561d8e2e6e36a46637bab84633b07cee" + integrity sha512-H3R3YR/8TjT5WPin/wOoHOUPHgvj8leuU/Keta/rwelEQN9pA/S2Dx8/se4pZ2LBxSd0nAGzsNzhqwa77v7F1w== node-sass-tilde-importer@^1.0.2: version "1.0.2" @@ -6885,15 +5579,7 @@ nopt@3.x: dependencies: abbrev "1" -nopt@^4.0.1: - version "4.0.3" - resolved "https://registry.yarnpkg.com/nopt/-/nopt-4.0.3.tgz#a375cad9d02fd921278d954c2254d5aa57e15e48" - integrity sha512-CvaGwVMztSMJLOeXPrez7fyfObdZqNUK1cPAEzLHrTybIua9pMdmmPR5YwtfNftIOMv3DPUhFaxsZMNTQO20Kg== - dependencies: - abbrev "1" - osenv "^0.1.4" - -normalize-package-data@^2.0.0, normalize-package-data@^2.3.0, normalize-package-data@^2.3.2, normalize-package-data@^2.3.4, normalize-package-data@^2.3.5, normalize-package-data@^2.4.0, normalize-package-data@^2.5.0: +normalize-package-data@^2.3.0, normalize-package-data@^2.3.2, normalize-package-data@^2.3.4, normalize-package-data@^2.3.5, normalize-package-data@^2.5.0: version "2.5.0" resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.5.0.tgz#e66db1838b200c1dfc233225d12cb36520e234a8" integrity sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA== @@ -6920,7 +5606,7 @@ normalize-path@^3.0.0, normalize-path@~3.0.0: resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== -normalize-url@^3.0.0, normalize-url@^3.3.0: +normalize-url@^3.0.0: version "3.3.0" resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-3.3.0.tgz#b2e1c4dc4f7c6d57743df733a4f5978d18650559" integrity sha512-U+JJi7duF1o+u2pynbp2zXDW2/PADgC30f0GsHZtRh+HOcXHnw137TrNlyxxRvWW5fjKd3bcLHPxofWuCjaeZg== @@ -6932,51 +5618,6 @@ now-and-later@^2.0.0: dependencies: once "^1.3.2" -npm-bundled@^1.0.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/npm-bundled/-/npm-bundled-1.1.1.tgz#1edd570865a94cdb1bc8220775e29466c9fb234b" - integrity sha512-gqkfgGePhTpAEgUsGEgcq1rqPXA+tv/aVBlgEzfXwA1yiUJF7xtEt3CtVwOjNYQOVknDk0F20w58Fnm3EtG0fA== - dependencies: - npm-normalize-package-bin "^1.0.1" - -npm-lifecycle@^3.1.2: - version "3.1.5" - resolved "https://registry.yarnpkg.com/npm-lifecycle/-/npm-lifecycle-3.1.5.tgz#9882d3642b8c82c815782a12e6a1bfeed0026309" - integrity sha512-lDLVkjfZmvmfvpvBzA4vzee9cn+Me4orq0QF8glbswJVEbIcSNWib7qGOffolysc3teCqbbPZZkzbr3GQZTL1g== - dependencies: - byline "^5.0.0" - graceful-fs "^4.1.15" - node-gyp "^5.0.2" - resolve-from "^4.0.0" - slide "^1.1.6" - uid-number "0.0.6" - umask "^1.1.0" - which "^1.3.1" - -npm-normalize-package-bin@^1.0.0, npm-normalize-package-bin@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/npm-normalize-package-bin/-/npm-normalize-package-bin-1.0.1.tgz#6e79a41f23fd235c0623218228da7d9c23b8f6e2" - integrity sha512-EPfafl6JL5/rU+ot6P3gRSCpPDW5VmIzX959Ob1+ySFUuuYHWHekXpwdUZcKP5C+DS4GEtdJluwBjnsNDl+fSA== - -"npm-package-arg@^4.0.0 || ^5.0.0 || ^6.0.0", npm-package-arg@^6.0.0, npm-package-arg@^6.1.0: - version "6.1.1" - resolved "https://registry.yarnpkg.com/npm-package-arg/-/npm-package-arg-6.1.1.tgz#02168cb0a49a2b75bf988a28698de7b529df5cb7" - integrity sha512-qBpssaL3IOZWi5vEKUKW0cO7kzLeT+EQO9W8RsLOZf76KF9E/K9+wH0C7t06HXPpaH8WH5xF1MExLuCwbTqRUg== - dependencies: - hosted-git-info "^2.7.1" - osenv "^0.1.5" - semver "^5.6.0" - validate-npm-package-name "^3.0.0" - -npm-packlist@^1.1.6, npm-packlist@^1.4.4: - version "1.4.8" - resolved "https://registry.yarnpkg.com/npm-packlist/-/npm-packlist-1.4.8.tgz#56ee6cc135b9f98ad3d51c1c95da22bbb9b2ef3e" - integrity sha512-5+AZgwru5IevF5ZdnFglB5wNlHG1AOOuw28WhUq8/8emhBmLv6jX5by4WJCh7lW0uSYZYS6DXqIsyZVIXRZU9A== - dependencies: - ignore-walk "^3.0.1" - npm-bundled "^1.0.1" - npm-normalize-package-bin "^1.0.1" - npm-path@^2.0.2: version "2.0.4" resolved "https://registry.yarnpkg.com/npm-path/-/npm-path-2.0.4.tgz#c641347a5ff9d6a09e4d9bce5580c4f505278e64" @@ -6984,15 +5625,6 @@ npm-path@^2.0.2: dependencies: which "^1.2.10" -npm-pick-manifest@^3.0.0: - version "3.0.2" - resolved "https://registry.yarnpkg.com/npm-pick-manifest/-/npm-pick-manifest-3.0.2.tgz#f4d9e5fd4be2153e5f4e5f9b7be8dc419a99abb7" - integrity sha512-wNprTNg+X5nf+tDi+hbjdHhM4bX+mKqv6XmPh7B5eG+QY9VARfQPfCEH013H5GqfNj6ee8Ij2fg8yk0mzps1Vw== - dependencies: - figgy-pudding "^3.5.1" - npm-package-arg "^6.0.0" - semver "^5.4.1" - npm-run-path@^2.0.0: version "2.0.2" resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f" @@ -7009,16 +5641,6 @@ npm-which@^3.0.1: npm-path "^2.0.2" which "^1.2.10" -npmlog@^4.0.2, npmlog@^4.1.2: - version "4.1.2" - resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b" - integrity sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg== - dependencies: - are-we-there-yet "~1.1.2" - console-control-strings "~1.1.0" - gauge "~2.7.3" - set-blocking "~2.0.0" - nth-check@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/nth-check/-/nth-check-1.0.2.tgz#b2bd295c37e3dd58a3bf0700376663ba4d9cf05c" @@ -7190,19 +5812,11 @@ os-name@^3.1.0: macos-release "^2.2.0" windows-release "^3.1.0" -os-tmpdir@^1.0.0, os-tmpdir@^1.0.1, os-tmpdir@~1.0.2: +os-tmpdir@^1.0.1, os-tmpdir@~1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" integrity sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ= -osenv@^0.1.4, osenv@^0.1.5: - version "0.1.5" - resolved "https://registry.yarnpkg.com/osenv/-/osenv-0.1.5.tgz#85cdfafaeb28e8677f416e287592b5f3f49ea410" - integrity sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g== - dependencies: - os-homedir "^1.0.0" - os-tmpdir "^1.0.0" - p-finally@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" @@ -7215,7 +5829,7 @@ p-limit@^1.1.0: dependencies: p-try "^1.0.0" -p-limit@^2.0.0: +p-limit@^2.0.0, p-limit@^2.2.0: version "2.3.0" resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== @@ -7236,19 +5850,19 @@ p-locate@^3.0.0: dependencies: p-limit "^2.0.0" -p-map-series@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/p-map-series/-/p-map-series-1.0.0.tgz#bf98fe575705658a9e1351befb85ae4c1f07bdca" - integrity sha1-v5j+V1cFZYqeE1G++4WuTB8Hvco= +p-locate@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-4.1.0.tgz#a3428bb7088b3a60292f66919278b7c297ad4f07" + integrity sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A== dependencies: - p-reduce "^1.0.0" + p-limit "^2.2.0" p-map@^1.1.1: version "1.2.0" resolved "https://registry.yarnpkg.com/p-map/-/p-map-1.2.0.tgz#e4e94f311eabbc8633a1e79908165fca26241b6b" integrity sha512-r6zKACMNhjPJMTl8KcFH4li//gkrXWfbD6feV8l6doRHlzljFWGJ2AP6iKaCJXyZmAUMOPtvbW7EXkbWO/pLEA== -p-map@^2.0.0, p-map@^2.1.0: +p-map@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/p-map/-/p-map-2.1.0.tgz#310928feef9c9ecc65b68b17693018a665cea175" integrity sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw== @@ -7260,23 +5874,6 @@ p-map@^3.0.0: dependencies: aggregate-error "^3.0.0" -p-pipe@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/p-pipe/-/p-pipe-1.2.0.tgz#4b1a11399a11520a67790ee5a0c1d5881d6befe9" - integrity sha1-SxoROZoRUgpneQ7loMHViB1r7+k= - -p-queue@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/p-queue/-/p-queue-4.0.0.tgz#ed0eee8798927ed6f2c2f5f5b77fdb2061a5d346" - integrity sha512-3cRXXn3/O0o3+eVmUroJPSj/esxoEFIm0ZOno/T+NzG/VZgPOqQ8WKmlNqubSEpZmCIngEy34unkHGg83ZIBmg== - dependencies: - eventemitter3 "^3.1.0" - -p-reduce@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/p-reduce/-/p-reduce-1.0.0.tgz#18c2b0dd936a4690a529f8231f58a0fdb6a47dfa" - integrity sha1-GMKw3ZNqRpClKfgjH1ig/bakffo= - p-try@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3" @@ -7287,13 +5884,6 @@ p-try@^2.0.0: resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== -p-waterfall@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/p-waterfall/-/p-waterfall-1.0.0.tgz#7ed94b3ceb3332782353af6aae11aa9fc235bb00" - integrity sha1-ftlLPOszMngjU69qrhGqn8I1uwA= - dependencies: - p-reduce "^1.0.0" - pako@~1.0.5: version "1.0.11" resolved "https://registry.yarnpkg.com/pako/-/pako-1.0.11.tgz#6c9599d340d54dfd3946380252a35705a6b992bf" @@ -7315,7 +5905,7 @@ parent-module@^1.0.0: dependencies: callsites "^3.0.0" -parse-asn1@^5.0.0: +parse-asn1@^5.0.0, parse-asn1@^5.1.5: version "5.1.5" resolved "https://registry.yarnpkg.com/parse-asn1/-/parse-asn1-5.1.5.tgz#003271343da58dc94cace494faef3d2147ecea0e" integrity sha512-jkMYn1dcJqF6d5CpU689bq7w/b5ALS9ROVSpQDPrZsqqesUJii9qutvoT5ltGedNXMO2e16YUWIghG9KxaViTQ== @@ -7352,23 +5942,15 @@ parse-json@^4.0.0: error-ex "^1.3.1" json-parse-better-errors "^1.0.1" -parse-path@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/parse-path/-/parse-path-4.0.1.tgz#0ec769704949778cb3b8eda5e994c32073a1adff" - integrity sha512-d7yhga0Oc+PwNXDvQ0Jv1BuWkLVPXcAoQ/WREgd6vNNoKYaW52KI+RdOFjI63wjkmps9yUE8VS4veP+AgpQ/hA== - dependencies: - is-ssh "^1.3.0" - protocols "^1.4.0" - -parse-url@^5.0.0: - version "5.0.1" - resolved "https://registry.yarnpkg.com/parse-url/-/parse-url-5.0.1.tgz#99c4084fc11be14141efa41b3d117a96fcb9527f" - integrity sha512-flNUPP27r3vJpROi0/R3/2efgKkyXqnXwyP1KQ2U0SfFRgdizOdWfvrrvJg1LuOoxs7GQhmxJlq23IpQ/BkByg== +parse-json@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-5.0.0.tgz#73e5114c986d143efa3712d4ea24db9a4266f60f" + integrity sha512-OOY5b7PAEFV0E2Fir1KOkxchnZNCdowAJgQ5NuxjpBKTRP3pQhwkrkxqQjeoKJ+fO7bCpmIZaogI4eZGDMEGOw== dependencies: - is-ssh "^1.3.0" - normalize-url "^3.3.0" - parse-path "^4.0.0" - protocols "^1.4.0" + "@babel/code-frame" "^7.0.0" + error-ex "^1.3.1" + json-parse-better-errors "^1.0.1" + lines-and-columns "^1.1.6" parse5@1.0.0: version "1.0.0" @@ -7421,6 +6003,11 @@ path-exists@^3.0.0: resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" integrity sha1-zg6+ql94yxiSXqfYENe1mwEP1RU= +path-exists@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" + integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== + path-is-absolute@^1.0.0, path-is-absolute@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" @@ -7490,7 +6077,7 @@ performance-now@^2.1.0: resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns= -picomatch@^2.0.4, picomatch@^2.0.5, picomatch@^2.0.7, picomatch@^2.2.1: +picomatch@^2.0.4, picomatch@^2.0.5, picomatch@^2.2.1: version "2.2.2" resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.2.2.tgz#21f333e9b6b8eaff02468f5146ea406d345f4dad" integrity sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg== @@ -7885,14 +6472,14 @@ postcss-value-parser@^3.0.0, postcss-value-parser@^3.2.3: integrity sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ== postcss-value-parser@^4.0.2: - version "4.0.3" - resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-4.0.3.tgz#651ff4593aa9eda8d5d0d66593a2417aeaeb325d" - integrity sha512-N7h4pG+Nnu5BEIzyeaaIYWs0LI5XC40OrRh5L60z0QjFsqGWcHcbkBvpe1WYpcIS9yQ8sOi/vIPt1ejQCrMVrg== + version "4.1.0" + resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-4.1.0.tgz#443f6a20ced6481a2bda4fa8532a6e55d789a2cb" + integrity sha512-97DXOFbQJhk71ne5/Mt6cOu6yxsSfM0QGQyl0L25Gca4yGWEGJaig7l7gbCX623VqTBNGLRLaVUCnNkcedlRSQ== postcss@^7.0.0, postcss@^7.0.1, postcss@^7.0.14, postcss@^7.0.17, postcss@^7.0.18, postcss@^7.0.2, postcss@^7.0.21, postcss@^7.0.27: - version "7.0.27" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-7.0.27.tgz#cc67cdc6b0daa375105b7c424a85567345fc54d9" - integrity sha512-WuQETPMcW9Uf1/22HWUWP9lgsIC+KEHg2kozMflKjbeUtw9ujvFX6QmIfozaErDkmLWS9WEnEdEe6Uo9/BNTdQ== + version "7.0.30" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-7.0.30.tgz#cc9378beffe46a02cbc4506a0477d05fcea9a8e2" + integrity sha512-nu/0m+NtIzoubO+xdAlwZl/u5S5vi/y6BCsoL8D+8IxsD3XvBS8X4YEADNIVXKVuQvduiucnRv+vPIqj56EGMQ== dependencies: chalk "^2.4.2" source-map "^0.6.1" @@ -7936,38 +6523,6 @@ promise-inflight@^1.0.1: resolved "https://registry.yarnpkg.com/promise-inflight/-/promise-inflight-1.0.1.tgz#98472870bf228132fcbdd868129bad12c3c029e3" integrity sha1-mEcocL8igTL8vdhoEputEsPAKeM= -promise-retry@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/promise-retry/-/promise-retry-1.1.1.tgz#6739e968e3051da20ce6497fb2b50f6911df3d6d" - integrity sha1-ZznpaOMFHaIM5kl/srUPaRHfPW0= - dependencies: - err-code "^1.0.0" - retry "^0.10.0" - -promzard@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/promzard/-/promzard-0.3.0.tgz#26a5d6ee8c7dee4cb12208305acfb93ba382a9ee" - integrity sha1-JqXW7ox97kyxIggwWs+5O6OCqe4= - dependencies: - read "1" - -proto-list@~1.2.1: - version "1.2.4" - resolved "https://registry.yarnpkg.com/proto-list/-/proto-list-1.2.4.tgz#212d5bfe1318306a420f6402b8e26ff39647a849" - integrity sha1-IS1b/hMYMGpCD2QCuOJv85ZHqEk= - -protocols@^1.1.0, protocols@^1.4.0: - version "1.4.7" - resolved "https://registry.yarnpkg.com/protocols/-/protocols-1.4.7.tgz#95f788a4f0e979b291ffefcf5636ad113d037d32" - integrity sha512-Fx65lf9/YDn3hUX08XUc0J8rSux36rEsyiv21ZGUC1mOyeM3lTRpZLcrm8aAolzS4itwVfm7TAPyxC2E5zd6xg== - -protoduck@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/protoduck/-/protoduck-5.0.1.tgz#03c3659ca18007b69a50fd82a7ebcc516261151f" - integrity sha512-WxoCeDCoCBY55BMvj4cAEjdVUFGRWed9ZxPlqTKYyw1nDDTQ4pqmnIMAGfJlg7Dx35uB/M+PHJPTmGOvaCaPTg== - dependencies: - genfun "^5.0.0" - proxyquire@^2.1.0: version "2.1.3" resolved "https://registry.yarnpkg.com/proxyquire/-/proxyquire-2.1.3.tgz#2049a7eefa10a9a953346a18e54aab2b4268df39" @@ -8079,6 +6634,11 @@ quick-lru@^1.0.0: resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-1.1.0.tgz#4360b17c61136ad38078397ff11416e186dcfbb8" integrity sha1-Q2CxfGETatOAeDl/8RQW4Ybc+7g= +quick-lru@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-4.0.1.tgz#5b8878f113a58217848c6482026c73e1ba57727f" + integrity sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g== + ramda@^0.27.0: version "0.27.0" resolved "https://registry.yarnpkg.com/ramda/-/ramda-0.27.0.tgz#915dc29865c0800bf3f69b8fd6c279898b59de43" @@ -8122,16 +6682,6 @@ raw-loader@^3.1.0: loader-utils "^1.1.0" schema-utils "^2.0.1" -rc@^1.2.7: - version "1.2.8" - resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed" - integrity sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw== - dependencies: - deep-extend "^0.6.0" - ini "~1.3.0" - minimist "^1.2.0" - strip-json-comments "~2.0.1" - read-cache@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/read-cache/-/read-cache-1.0.0.tgz#e664ef31161166c9751cdbe8dbcf86b5fb58f774" @@ -8139,34 +6689,6 @@ read-cache@^1.0.0: dependencies: pify "^2.3.0" -read-cmd-shim@^1.0.1: - version "1.0.5" - resolved "https://registry.yarnpkg.com/read-cmd-shim/-/read-cmd-shim-1.0.5.tgz#87e43eba50098ba5a32d0ceb583ab8e43b961c16" - integrity sha512-v5yCqQ/7okKoZZkBQUAfTsQ3sVJtXdNfbPnI5cceppoxEVLYA3k+VtV2omkeo8MS94JCy4fSiUwlRBAwCVRPUA== - dependencies: - graceful-fs "^4.1.2" - -"read-package-json@1 || 2", read-package-json@^2.0.0, read-package-json@^2.0.13: - version "2.1.1" - resolved "https://registry.yarnpkg.com/read-package-json/-/read-package-json-2.1.1.tgz#16aa66c59e7d4dad6288f179dd9295fd59bb98f1" - integrity sha512-dAiqGtVc/q5doFz6096CcnXhpYk0ZN8dEKVkGLU0CsASt8SrgF6SF7OTKAYubfvFhWaqofl+Y8HK19GR8jwW+A== - dependencies: - glob "^7.1.1" - json-parse-better-errors "^1.0.1" - normalize-package-data "^2.0.0" - npm-normalize-package-bin "^1.0.0" - optionalDependencies: - graceful-fs "^4.1.2" - -read-package-tree@^5.1.6: - version "5.3.1" - resolved "https://registry.yarnpkg.com/read-package-tree/-/read-package-tree-5.3.1.tgz#a32cb64c7f31eb8a6f31ef06f9cedf74068fe636" - integrity sha512-mLUDsD5JVtlZxjSlPPx1RETkNjjvQYuweKwNVt1Sn8kP5Jh44pvYuUHCp6xSVDZWbNxVxG5lyZJ921aJH61sTw== - dependencies: - read-package-json "^2.0.0" - readdir-scoped-modules "^1.0.0" - util-promisify "^2.1.0" - read-pkg-up@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-1.0.1.tgz#9d63c13276c065918d57f002a57f40a1b643fb02" @@ -8183,6 +6705,15 @@ read-pkg-up@^3.0.0: find-up "^2.0.0" read-pkg "^3.0.0" +read-pkg-up@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-7.0.1.tgz#f3a6135758459733ae2b95638056e1854e7ef507" + integrity sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg== + dependencies: + find-up "^4.1.0" + read-pkg "^5.2.0" + type-fest "^0.8.1" + read-pkg@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-1.1.0.tgz#f5ffaa5ecd29cb31c0474bca7d756b6bb29e3f28" @@ -8201,14 +6732,17 @@ read-pkg@^3.0.0: normalize-package-data "^2.3.2" path-type "^3.0.0" -read@1, read@~1.0.1: - version "1.0.7" - resolved "https://registry.yarnpkg.com/read/-/read-1.0.7.tgz#b3da19bd052431a97671d44a42634adf710b40c4" - integrity sha1-s9oZvQUkMal2cdRKQmNK33ELQMQ= +read-pkg@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-5.2.0.tgz#7bf295438ca5a33e56cd30e053b34ee7250c93cc" + integrity sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg== dependencies: - mute-stream "~0.0.4" + "@types/normalize-package-data" "^2.4.0" + normalize-package-data "^2.5.0" + parse-json "^5.0.0" + type-fest "^0.6.0" -"readable-stream@1 || 2", readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.5, readable-stream@^2.0.6, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.3.3, readable-stream@^2.3.5, readable-stream@^2.3.6, readable-stream@~2.3.6: +"readable-stream@1 || 2", readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.5, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.3.3, readable-stream@^2.3.5, readable-stream@^2.3.6, readable-stream@~2.3.6: version "2.3.7" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57" integrity sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw== @@ -8221,7 +6755,7 @@ read@1, read@~1.0.1: string_decoder "~1.1.1" util-deprecate "~1.0.1" -"readable-stream@2 || 3", readable-stream@^3.0.2: +"readable-stream@2 || 3", readable-stream@^3.0.2, readable-stream@^3.6.0: version "3.6.0" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.0.tgz#337bbda3adc0706bd3e024426a286d4b4b2c9198" integrity sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA== @@ -8230,16 +6764,6 @@ read@1, read@~1.0.1: string_decoder "^1.1.1" util-deprecate "^1.0.1" -readdir-scoped-modules@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/readdir-scoped-modules/-/readdir-scoped-modules-1.1.0.tgz#8d45407b4f870a0dcaebc0e28670d18e74514309" - integrity sha512-asaikDeqAQg7JifRsZn1NJZXo9E+VwlyCfbkZhwyISinqk5zNS6266HS5kah6P0SaQKGF6SkNnZVHUzHFYxYDw== - dependencies: - debuglog "^1.0.1" - dezalgo "^1.0.0" - graceful-fs "^4.1.2" - once "^1.3.0" - readdirp@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-2.2.1.tgz#0e87622a3325aa33e892285caf8b4e846529a525" @@ -8249,12 +6773,12 @@ readdirp@^2.2.1: micromatch "^3.1.10" readable-stream "^2.0.2" -readdirp@~3.3.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.3.0.tgz#984458d13a1e42e2e9f5841b129e162f369aff17" - integrity sha512-zz0pAkSPOXXm1viEwygWIPSPkcBYjW1xU5j/JBh5t9bGCJwa6f9+BJa6VaB2g+b55yVrmXzqkyLf4xaWYM0IkQ== +readdirp@~3.4.0: + version "3.4.0" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.4.0.tgz#9fdccdf9e9155805449221ac645e8303ab5b9ada" + integrity sha512-0xe001vZBnJEK+uKcj8qOhyAKPzIT+gStxWr3LCB0DwcXR5NZJ3IaC+yGnHCYzB/S7ov3m3EEbZI2zeNvX+hGQ== dependencies: - picomatch "^2.0.7" + picomatch "^2.2.1" rechoir@^0.6.2: version "0.6.2" @@ -8279,6 +6803,14 @@ redent@^2.0.0: indent-string "^3.0.0" strip-indent "^2.0.0" +redent@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/redent/-/redent-3.0.0.tgz#e557b7998316bb53c9f1f56fa626352c6963059f" + integrity sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg== + dependencies: + indent-string "^4.0.0" + strip-indent "^3.0.0" + regenerator-runtime@^0.11.0: version "0.11.1" resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz#be05ad7f9bf7d22e056f9726cee5017fbf19e2e9" @@ -8337,11 +6869,11 @@ repeating@^2.0.0: is-finite "^1.0.0" replace-ext@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/replace-ext/-/replace-ext-1.0.0.tgz#de63128373fcbf7c3ccfa4de5a480c45a67958eb" - integrity sha1-3mMSg3P8v3w8z6TeWkgMRaZ5WOs= + version "1.0.1" + resolved "https://registry.yarnpkg.com/replace-ext/-/replace-ext-1.0.1.tgz#2d6d996d04a15855d967443631dd5f77825b016a" + integrity sha512-yD5BHCe7quCgBph4rMQ+0KkIRKwWCrHDOX1p1Gp6HwjPM5kVoCdKGNhN7ydqqsX6lJEnQDKZ/tFMiEdQ1dvPEw== -request@^2.51.0, request@^2.83.0, request@^2.88.0: +request@^2.51.0, request@^2.83.0: version "2.88.2" resolved "https://registry.yarnpkg.com/request/-/request-2.88.2.tgz#d73c918731cb5a87da047e207234146f664d12b3" integrity sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw== @@ -8394,13 +6926,6 @@ requizzle@~0.2.1: dependencies: lodash "^4.17.14" -resolve-cwd@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/resolve-cwd/-/resolve-cwd-2.0.0.tgz#00a9f7387556e27038eae232caa372a6a59b665a" - integrity sha1-AKn3OHVW4nA46uIyyqNypqWbZlo= - dependencies: - resolve-from "^3.0.0" - resolve-from@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-3.0.0.tgz#b22c7af7d9d6881bc8b6e653335eebcb0a188748" @@ -8456,11 +6981,6 @@ ret@~0.1.10: resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc" integrity sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg== -retry@^0.10.0: - version "0.10.1" - resolved "https://registry.yarnpkg.com/retry/-/retry-0.10.1.tgz#e76388d217992c252750241d3d3956fed98d8ff4" - integrity sha1-52OI0heZLCUnUCQdPTlW/tmNj/Q= - reusify@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" @@ -8488,7 +7008,7 @@ rimraf@2.6.3: dependencies: glob "^7.1.3" -rimraf@^2.5.4, rimraf@^2.6.0, rimraf@^2.6.1, rimraf@^2.6.2, rimraf@^2.6.3: +rimraf@^2.5.4, rimraf@^2.6.0, rimraf@^2.6.2, rimraf@^2.6.3: version "2.7.1" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec" integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w== @@ -8511,11 +7031,9 @@ ripemd160@^2.0.0, ripemd160@^2.0.1: inherits "^2.0.1" run-async@^2.2.0, run-async@^2.4.0: - version "2.4.0" - resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.4.0.tgz#e59054a5b86876cfae07f431d18cbaddc594f1e8" - integrity sha512-xJTbh/d7Lm7SBhc1tNvTpeCHaEzoyxPrqNlvSdMfBTYwaY++UJFyXUOxAtsRUXjlqOfj8luNaR9vjCh4KeV+pg== - dependencies: - is-promise "^2.1.0" + version "2.4.1" + resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.4.1.tgz#8440eccf99ea3e70bd409d49aab88e10c189a455" + integrity sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ== run-parallel@^1.1.9: version "1.1.9" @@ -8537,9 +7055,9 @@ rxjs@^6.3.3, rxjs@^6.4.0, rxjs@^6.5.3: tslib "^1.9.0" safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@^5.2.0, safe-buffer@~5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.0.tgz#b74daec49b1148f88c64b68d49b1e815c1f2f519" - integrity sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg== + version "5.2.1" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" + integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== safe-buffer@~5.1.0, safe-buffer@~5.1.1: version "5.1.2" @@ -8558,7 +7076,7 @@ safe-regex@^1.1.0: resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== -sax@^1.2.4, sax@~1.2.4: +sax@~1.2.4: version "1.2.4" resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw== @@ -8579,7 +7097,7 @@ schema-utils@^1.0.0: ajv-errors "^1.0.0" ajv-keywords "^3.1.0" -schema-utils@^2.0.1, schema-utils@^2.6.5: +schema-utils@^2.0.1, schema-utils@^2.6.5, schema-utils@^2.6.6: version "2.6.6" resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-2.6.6.tgz#299fe6bd4a3365dc23d99fd446caff8f1d6c330c" integrity sha512-wHutF/WPSbIi9x6ctjGGk2Hvl0VOz5l3EKEuKbjPlB30mKZUzb9A5k9yEXRX3pwyqVLPvpfZZEllaFq/M718hA== @@ -8592,7 +7110,7 @@ semver-compare@^1.0.0: resolved "https://registry.yarnpkg.com/semver-compare/-/semver-compare-1.0.0.tgz#0dee216a1c941ab37e9efb1788f6afc5ff5537fc" integrity sha1-De4hahyUGrN+nvsXiPavxf9VN/w= -"semver@2 || 3 || 4 || 5", "semver@2.x || 3.x || 4 || 5", semver@^5.3.0, semver@^5.4.1, semver@^5.5.0, semver@^5.5.1, semver@^5.6.0, semver@^5.7.0, semver@^5.7.1: +"semver@2 || 3 || 4 || 5", semver@^5.3.0, semver@^5.4.1, semver@^5.5.0, semver@^5.5.1, semver@^5.6.0, semver@^5.7.0: version "5.7.1" resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== @@ -8607,7 +7125,7 @@ serialize-javascript@^2.1.2: resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-2.1.2.tgz#ecec53b0e0317bdc95ef76ab7074b7384785fa61" integrity sha512-rs9OggEUF0V4jUSecXazOYsLfu7OGK2qIn3c7IPBiffz32XniEp/TX9Xmc9LQfK2nQ2QKHvZ2oygKUGU0lG4jQ== -set-blocking@^2.0.0, set-blocking@~2.0.0: +set-blocking@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" integrity sha1-BF+XgtARrppoA93TgrJDkrPYkPc= @@ -8640,13 +7158,6 @@ sha.js@^2.4.0, sha.js@^2.4.8: inherits "^2.0.1" safe-buffer "^5.0.1" -shallow-clone@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/shallow-clone/-/shallow-clone-3.0.1.tgz#8f2981ad92531f55035b01fb230769a40e02efa3" - integrity sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA== - dependencies: - kind-of "^6.0.2" - shebang-command@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" @@ -8660,9 +7171,9 @@ shebang-regex@^1.0.0: integrity sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM= shelljs@^0.8.1, shelljs@^0.8.3: - version "0.8.3" - resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.8.3.tgz#a7f3319520ebf09ee81275b2368adb286659b097" - integrity sha512-fc0BKlAWiLpwZljmOvAOTE/gXawtCoNrP5oaY7KIaQbbyHeQVg01pSEuEGvGh3HEdBU4baCD7wQBwADmM/7f7A== + version "0.8.4" + resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.8.4.tgz#de7684feeb767f8716b326078a8a00875890e3c2" + integrity sha512-7gk3UZ9kOfPLIAbslLzyWeGiEqx9e3rxwZM0KE6EL8GlGwjym9Mrlx5/p33bWTu9YG6vcS4MBxYZDHYr5lr8BQ== dependencies: glob "^7.0.0" interpret "^1.0.0" @@ -8680,6 +7191,11 @@ simple-swizzle@^0.2.2: dependencies: is-arrayish "^0.3.1" +sinon-chai@^3.5.0: + version "3.5.0" + resolved "https://registry.yarnpkg.com/sinon-chai/-/sinon-chai-3.5.0.tgz#c9a78304b0e15befe57ef68e8a85a00553f5c60e" + integrity sha512-IifbusYiQBpUxxFJkR3wTU68xzBN0+bxCScEaKMjBvAQERg6FnTTc1F17rseLb1tjmkJ23730AXpFI0c47FgAg== + sinon@^7.3.2: version "7.5.0" resolved "https://registry.yarnpkg.com/sinon/-/sinon-7.5.0.tgz#e9488ea466070ea908fd44a3d6478fd4923c67ec" @@ -8706,11 +7222,6 @@ slash@^1.0.0: resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55" integrity sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU= -slash@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/slash/-/slash-2.0.0.tgz#de552851a1759df3a8f206535442f5ec4ddeab44" - integrity sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A== - slash@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" @@ -8730,16 +7241,6 @@ slice-ansi@^2.1.0: astral-regex "^1.0.0" is-fullwidth-code-point "^2.0.0" -slide@^1.1.6: - version "1.1.6" - resolved "https://registry.yarnpkg.com/slide/-/slide-1.1.6.tgz#56eb027d65b4d2dce6cb2e2d32c4d4afc9e1d707" - integrity sha1-VusCfWW00tzmyy4tMsTUr8nh1wc= - -smart-buffer@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/smart-buffer/-/smart-buffer-4.1.0.tgz#91605c25d91652f4661ea69ccf45f1b331ca21ba" - integrity sha512-iVICrxOzCynf/SNaBQCw34eM9jROU/s5rzIhpOvzhzuYHfJR/DhZfDkXiZSgKXfgv26HT3Yni3AV/DGw0cGnnw== - snapdragon-node@^2.0.1: version "2.1.1" resolved "https://registry.yarnpkg.com/snapdragon-node/-/snapdragon-node-2.1.1.tgz#6c175f86ff14bdb0724563e8f3c1b021a286853b" @@ -8816,29 +7317,6 @@ socket.io@2.1.1: socket.io-client "2.1.1" socket.io-parser "~3.2.0" -socks-proxy-agent@^4.0.0: - version "4.0.2" - resolved "https://registry.yarnpkg.com/socks-proxy-agent/-/socks-proxy-agent-4.0.2.tgz#3c8991f3145b2799e70e11bd5fbc8b1963116386" - integrity sha512-NT6syHhI9LmuEMSK6Kd2V7gNv5KFZoLE7V5udWmn0de+3Mkj3UMA/AJPLyeNUVmElCurSHtUdM3ETpR3z770Wg== - dependencies: - agent-base "~4.2.1" - socks "~2.3.2" - -socks@~2.3.2: - version "2.3.3" - resolved "https://registry.yarnpkg.com/socks/-/socks-2.3.3.tgz#01129f0a5d534d2b897712ed8aceab7ee65d78e3" - integrity sha512-o5t52PCNtVdiOvzMry7wU4aOqYWL0PeCXRWBEiJow4/i/wr+wpsJQ9awEu1EonLIqsfGd5qSgDdxEOvCdmBEpA== - dependencies: - ip "1.1.5" - smart-buffer "^4.1.0" - -sort-keys@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/sort-keys/-/sort-keys-2.0.0.tgz#658535584861ec97d730d6cf41822e1f56684128" - integrity sha1-ZYU1WEhh7JfXMNbPQYIuH1ZoQSg= - dependencies: - is-plain-obj "^1.0.0" - source-list-map@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-2.0.1.tgz#3993bd873bfc48479cca9ea3a547835c7c154b34" @@ -8863,9 +7341,9 @@ source-map-support@^0.4.15: source-map "^0.5.6" source-map-support@~0.5.12: - version "0.5.18" - resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.18.tgz#f5f33489e270bd7f7d7e7b8debf283f3a4066960" - integrity sha512-9luZr/BZ2QeU6tO2uG8N2aZpVSli4TSAOAqFOyTO51AJcD9P99c0K1h6dD6r6qo5dyT44BR5exweOaLLeldTkQ== + version "0.5.19" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.19.tgz#a98b62f86dcaf4f67399648c085291ab9e8fed61" + integrity sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw== dependencies: buffer-from "^1.0.0" source-map "^0.6.0" @@ -8906,9 +7384,9 @@ spdx-exceptions@^2.1.0: integrity sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A== spdx-expression-parse@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz#99e119b7a5da00e05491c9fa338b7904823b41d0" - integrity sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg== + version "3.0.1" + resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz#cf70f50482eefdc98e3ce0a6833e4a53ceeba679" + integrity sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q== dependencies: spdx-exceptions "^2.1.0" spdx-license-ids "^3.0.0" @@ -8959,7 +7437,7 @@ sshpk@^1.7.0: safer-buffer "^2.0.2" tweetnacl "~0.14.0" -ssri@^6.0.0, ssri@^6.0.1: +ssri@^6.0.1: version "6.0.1" resolved "https://registry.yarnpkg.com/ssri/-/ssri-6.0.1.tgz#2a3c41b28dd45b62b63676ecb74001265ae9edd8" integrity sha512-3Wge10hNcT1Kur4PDFwEieXSCMCJs/7WvSACcrMYrNp+b8kDL1/0wJch5Ni2WrtwEa2IO8OsVfeKIciKCDx/QA== @@ -9191,27 +7669,25 @@ strip-indent@^2.0.0: resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-2.0.0.tgz#5ef8db295d01e6ed6cbf7aab96998d7822527b68" integrity sha1-XvjbKV0B5u1sv3qrlpmNeCJSe2g= +strip-indent@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-3.0.0.tgz#c32e1cee940b6b3432c771bc2c54bcce73cd3001" + integrity sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ== + dependencies: + min-indent "^1.0.0" + strip-json-comments@2.0.1, strip-json-comments@^2.0.1, strip-json-comments@~2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo= -strong-log-transformer@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/strong-log-transformer/-/strong-log-transformer-2.1.0.tgz#0f5ed78d325e0421ac6f90f7f10e691d6ae3ae10" - integrity sha512-B3Hgul+z0L9a236FAUC9iZsL+nVHgoCJnqCbN588DjYxvGXaXaaFbfmQ/JhvKjZwsOukuR72XbHv71Qkug0HxA== - dependencies: - duplexer "^0.1.1" - minimist "^1.2.0" - through "^2.3.4" - style-loader@^1.0.0: - version "1.1.4" - resolved "https://registry.yarnpkg.com/style-loader/-/style-loader-1.1.4.tgz#1ad81283cefe51096756fd62697258edad933230" - integrity sha512-SbBHRD8fwK3pX+4UDF4ETxUF0+rCvk29LWTTI7Rt0cgsDjAj3SWM76ByTe6u2+4IlJ/WwluB7wuslWETCoPQdg== + version "1.2.1" + resolved "https://registry.yarnpkg.com/style-loader/-/style-loader-1.2.1.tgz#c5cbbfbf1170d076cfdd86e0109c5bba114baa1a" + integrity sha512-ByHSTQvHLkWE9Ir5+lGbVOXhxX10fbprhLvdg96wedFZb4NDekDPxVKv5Fwmio+QcMlkkNfuK+5W1peQ5CUhZg== dependencies: loader-utils "^2.0.0" - schema-utils "^2.6.5" + schema-utils "^2.6.6" stylehacks@^4.0.0: version "4.0.3" @@ -9318,36 +7794,6 @@ tapable@^1.0.0, tapable@^1.1.3: resolved "https://registry.yarnpkg.com/tapable/-/tapable-1.1.3.tgz#a1fccc06b58db61fd7a45da2da44f5f3a3e67ba2" integrity sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA== -tar@^4.4.10, tar@^4.4.12, tar@^4.4.2, tar@^4.4.8: - version "4.4.13" - resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.13.tgz#43b364bc52888d555298637b10d60790254ab525" - integrity sha512-w2VwSrBoHa5BsSyH+KxEqeQBAllHhccyMFVHtGtdMpF4W7IRWfZjFiQceJPChOeTsSDVUpER2T8FA93pr0L+QA== - dependencies: - chownr "^1.1.1" - fs-minipass "^1.2.5" - minipass "^2.8.6" - minizlib "^1.2.1" - mkdirp "^0.5.0" - safe-buffer "^5.1.2" - yallist "^3.0.3" - -temp-dir@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/temp-dir/-/temp-dir-1.0.0.tgz#0a7c0ea26d3a39afa7e0ebea9c1fc0bc4daa011d" - integrity sha1-CnwOom06Oa+n4OvqnB/AvE2qAR0= - -temp-write@^3.4.0: - version "3.4.0" - resolved "https://registry.yarnpkg.com/temp-write/-/temp-write-3.4.0.tgz#8cff630fb7e9da05f047c74ce4ce4d685457d492" - integrity sha1-jP9jD7fp2gXwR8dM5M5NaFRX1JI= - dependencies: - graceful-fs "^4.1.2" - is-stream "^1.1.0" - make-dir "^1.0.0" - pify "^3.0.0" - temp-dir "^1.0.0" - uuid "^3.0.1" - terser-webpack-plugin@^1.4.3: version "1.4.3" resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-1.4.3.tgz#5ecaf2dbdc5fb99745fd06791f46fc9ddb1c9a7c" @@ -9364,9 +7810,9 @@ terser-webpack-plugin@^1.4.3: worker-farm "^1.7.0" terser@^4.1.2: - version "4.6.11" - resolved "https://registry.yarnpkg.com/terser/-/terser-4.6.11.tgz#12ff99fdd62a26de2a82f508515407eb6ccd8a9f" - integrity sha512-76Ynm7OXUG5xhOpblhytE7X58oeNSmC8xnNhjWVo8CksHit0U0kO4hfNbPrrYwowLWFgM2n9L176VNx2QaHmtA== + version "4.6.13" + resolved "https://registry.yarnpkg.com/terser/-/terser-4.6.13.tgz#e879a7364a5e0db52ba4891ecde007422c56a916" + integrity sha512-wMvqukYgVpQlymbnNbabVZbtM6PN63AzqexpwJL8tbh/mRT9LE5o+ruVduAGL7D6Fpjl+Q+06U5I9Ul82odAhw== dependencies: commander "^2.20.0" source-map "~0.6.1" @@ -9382,20 +7828,6 @@ text-table@^0.2.0: resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" integrity sha1-f17oI66AUgfACvLfSoTsP8+lcLQ= -thenify-all@^1.0.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/thenify-all/-/thenify-all-1.6.0.tgz#1a1918d402d8fc3f98fbf234db0bcc8cc10e9726" - integrity sha1-GhkY1ALY/D+Y+/I02wvMjMEOlyY= - dependencies: - thenify ">= 3.1.0 < 4" - -"thenify@>= 3.1.0 < 4": - version "3.3.0" - resolved "https://registry.yarnpkg.com/thenify/-/thenify-3.3.0.tgz#e69e38a1babe969b0108207978b9f62b88604839" - integrity sha1-5p44obq+lpsBCCB5eLn2K4hgSDk= - dependencies: - any-promise "^1.0.0" - through2-filter@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/through2-filter/-/through2-filter-3.0.0.tgz#700e786df2367c2c88cd8aa5be4cf9c1e7831254" @@ -9419,7 +7851,7 @@ through2@^3.0.0, through2@^3.0.1: dependencies: readable-stream "2 || 3" -through@2, "through@>=2.2.7 <3", through@^2.3.4, through@^2.3.6: +through@2, "through@>=2.2.7 <3", through@^2.3.6: version "2.3.8" resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" integrity sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU= @@ -9523,13 +7955,6 @@ tough-cookie@~2.5.0: psl "^1.1.28" punycode "^2.1.1" -tr46@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/tr46/-/tr46-1.0.1.tgz#a8b13fd6bfd2489519674ccde55ba3693b706d09" - integrity sha1-qLE/1r/SSJUZZ0zN5VujaTtwbQk= - dependencies: - punycode "^2.1.0" - trim-newlines@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-1.0.0.tgz#5887966bb582a4503a41eb524f7d35011815a613" @@ -9540,6 +7965,11 @@ trim-newlines@^2.0.0: resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-2.0.0.tgz#b403d0b91be50c331dfc4b82eeceb22c3de16d20" integrity sha1-tAPQuRvlDDMd/EuC7s6yLD3hbSA= +trim-newlines@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-3.0.0.tgz#79726304a6a898aa8373427298d54c2ee8b1cb30" + integrity sha512-C4+gOpvmxaSMKuEf9Qc134F1ZuOHVXKRbtEflf4NTtuuJDEIJ9p5PXsalL8SkeRw+qit1Mo+yuvMPAKwWg/1hA== + trim-off-newlines@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/trim-off-newlines/-/trim-off-newlines-1.0.1.tgz#9f9ba9d9efa8764c387698bcbfeb2c848f11adb3" @@ -9551,9 +7981,9 @@ trim-right@^1.0.1: integrity sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM= tslib@^1.9.0: - version "1.11.1" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.11.1.tgz#eb15d128827fbee2841549e171f45ed338ac7e35" - integrity sha512-aZW88SY8kQbU7gpV19lN24LtXh/yD4ZZg6qieAJDDg+YBsJcSmLGK9QpnUjAKVG/xefmvJGd1WUmfpT/g6AJGA== + version "1.13.0" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.13.0.tgz#c881e13cc7015894ed914862d276436fa9a47043" + integrity sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q== tty-browserify@0.0.0: version "0.0.0" @@ -9589,10 +8019,20 @@ type-fest@^0.11.0: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.11.0.tgz#97abf0872310fed88a5c466b25681576145e33f1" integrity sha512-OdjXJxnCN1AvyLSzeKIgXTXxV+99ZuXl3Hpo9XpJAv9MBcHrrJOQ5kV7ypXOuQie+AmWG25hLbiKdwYTifzcfQ== -type-fest@^0.3.0: - version "0.3.1" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.3.1.tgz#63d00d204e059474fe5e1b7c011112bbd1dc29e1" - integrity sha512-cUGJnCdr4STbePCgqNFbpVNCepa+kAVohJs1sLhxzdH+gnEoOd8VhbYa7pD3zZYGiURWM2xzEII3fQcRizDkYQ== +type-fest@^0.13.1: + version "0.13.1" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.13.1.tgz#0172cb5bce80b0bd542ea348db50c7e21834d934" + integrity sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg== + +type-fest@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.6.0.tgz#8d2a2370d3df886eb5c90ada1c5bf6188acf838b" + integrity sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg== + +type-fest@^0.8.1: + version "0.8.1" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.8.1.tgz#09e249ebde851d3b1e48d27c105444667f17b83d" + integrity sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA== type-is@~1.6.17: version "1.6.18" @@ -9618,27 +8058,17 @@ typedarray@^0.0.6: integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= uglify-js@^3.1.4: - version "3.9.1" - resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.9.1.tgz#a56a71c8caa2d36b5556cc1fd57df01ae3491539" - integrity sha512-JUPoL1jHsc9fOjVFHdQIhqEEJsQvfKDjlubcCilu8U26uZ73qOg8VsN8O1jbuei44ZPlwL7kmbAdM4tzaUvqnA== + version "3.9.3" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.9.3.tgz#4a285d1658b8a2ebaef9e51366b3a0f7acd79ec2" + integrity sha512-r5ImcL6QyzQGVimQoov3aL2ZScywrOgBXGndbWrdehKoSvGe/RmiE5Jpw/v+GvxODt6l2tpBXwA7n+qZVlHBMA== dependencies: commander "~2.20.3" -uid-number@0.0.6: - version "0.0.6" - resolved "https://registry.yarnpkg.com/uid-number/-/uid-number-0.0.6.tgz#0ea10e8035e8eb5b8e4449f06da1c730663baa81" - integrity sha1-DqEOgDXo61uOREnwbaHHMGY7qoE= - ultron@~1.1.0: version "1.1.1" resolved "https://registry.yarnpkg.com/ultron/-/ultron-1.1.1.tgz#9fe1536a10a664a65266a1e3ccf85fd36302bc9c" integrity sha512-UIEXBNeYmKptWH6z8ZnqTeS8fV74zG0/eRU9VGkpzz+LIJNs8W/zM/L+7ctCkRrgbNnnR0xxw4bKOr0cW0N0Og== -umask@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/umask/-/umask-1.1.0.tgz#f29cebf01df517912bb58ff9c4e50fde8e33320d" - integrity sha1-8pzr8B31F5ErtY/5xOUP3o4zMg0= - unc-path-regex@^0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/unc-path-regex/-/unc-path-regex-0.1.2.tgz#e73dd3d7b0d7c5ed86fbac6b0ae7d8c6a69d50fa" @@ -9728,7 +8158,7 @@ unset-value@^1.0.0: has-value "^0.3.1" isobject "^3.0.0" -upath@^1.1.1, upath@^1.1.2, upath@^1.2.0: +upath@^1.1.1: version "1.2.0" resolved "https://registry.yarnpkg.com/upath/-/upath-1.2.0.tgz#8f66dbcd55a883acdae4408af8b035a5044c1894" integrity sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg== @@ -9776,13 +8206,6 @@ util-deprecate@^1.0.1, util-deprecate@~1.0.1: resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= -util-promisify@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/util-promisify/-/util-promisify-2.1.0.tgz#3c2236476c4d32c5ff3c47002add7c13b9a82a53" - integrity sha1-PCI2R2xNMsX/PEcAKt18E7moKlM= - dependencies: - object.getownpropertydescriptors "^2.0.3" - util.promisify@~1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/util.promisify/-/util.promisify-1.0.1.tgz#6baf7774b80eeb0f7520d8b81d07982a59abbaee" @@ -9812,12 +8235,12 @@ utils-merge@1.0.1: resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" integrity sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM= -uuid@^3.0.1, uuid@^3.1.0, uuid@^3.3.2: +uuid@^3.1.0, uuid@^3.3.2: version "3.4.0" resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== -validate-npm-package-license@^3.0.1, validate-npm-package-license@^3.0.3: +validate-npm-package-license@^3.0.1: version "3.0.4" resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a" integrity sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew== @@ -9825,13 +8248,6 @@ validate-npm-package-license@^3.0.1, validate-npm-package-license@^3.0.3: spdx-correct "^3.0.0" spdx-expression-parse "^3.0.0" -validate-npm-package-name@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/validate-npm-package-name/-/validate-npm-package-name-3.0.0.tgz#5fa912d81eb7d0c74afc140de7317f0ca7df437e" - integrity sha1-X6kS2B630MdK/BQN5zF/DKffQ34= - dependencies: - builtins "^1.0.3" - value-or-function@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/value-or-function/-/value-or-function-3.0.0.tgz#1c243a50b595c1be54a754bfece8563b9ff8d813" @@ -9922,26 +8338,23 @@ walkdir@^0.4.1: resolved "https://registry.yarnpkg.com/walkdir/-/walkdir-0.4.1.tgz#dc119f83f4421df52e3061e514228a2db20afa39" integrity sha512-3eBwRyEln6E1MSzcxcVpQIhRG8Q1jLvEqRmCZqS3dsfXEDR/AhOF4d+jHg1qvDCpYaVRZjENPQyrVxAkQqxPgQ== -watchpack@^1.6.1: - version "1.6.1" - resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-1.6.1.tgz#280da0a8718592174010c078c7585a74cd8cd0e2" - integrity sha512-+IF9hfUFOrYOOaKyfaI7h7dquUIOgyEMoQMLA7OP5FxegKA2+XdXThAZ9TU2kucfhDH7rfMHs1oPYziVGWRnZA== +watchpack-chokidar2@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/watchpack-chokidar2/-/watchpack-chokidar2-2.0.0.tgz#9948a1866cbbd6cb824dea13a7ed691f6c8ddff0" + integrity sha512-9TyfOyN/zLUbA288wZ8IsMZ+6cbzvsNyEzSBp6e/zkifi6xxbl8SmQ/CxQq32k8NNqrdVEVUVSEf56L4rQ/ZxA== dependencies: chokidar "^2.1.8" - graceful-fs "^4.1.2" - neo-async "^2.5.0" -wcwidth@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/wcwidth/-/wcwidth-1.0.1.tgz#f0b0dcf915bc5ff1528afadb2c0e17b532da2fe8" - integrity sha1-8LDc+RW8X/FSivrbLA4XtTLaL+g= +watchpack@^1.6.1: + version "1.7.2" + resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-1.7.2.tgz#c02e4d4d49913c3e7e122c3325365af9d331e9aa" + integrity sha512-ymVbbQP40MFTp+cNMvpyBpBtygHnPzPkHqoIwRRj/0B8KhqQwV8LaKjtbaxF2lK4vl8zN9wCxS46IFCU5K4W0g== dependencies: - defaults "^1.0.3" - -webidl-conversions@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.2.tgz#a855980b1f0b6b359ba1d5d9fb39ae941faa63ad" - integrity sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg== + graceful-fs "^4.1.2" + neo-async "^2.5.0" + optionalDependencies: + chokidar "^3.4.0" + watchpack-chokidar2 "^2.0.0" webpack-dev-middleware@^2.0.6: version "2.0.6" @@ -10003,28 +8416,19 @@ webpack@^4.39.1: watchpack "^1.6.1" webpack-sources "^1.4.1" -whatwg-url@^7.0.0: - version "7.1.0" - resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-7.1.0.tgz#c2c492f1eca612988efd3d2266be1b9fc6170d06" - integrity sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg== - dependencies: - lodash.sortby "^4.7.0" - tr46 "^1.0.1" - webidl-conversions "^4.0.2" - which-module@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" integrity sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho= -which@1.3.1, which@^1.1.1, which@^1.2.1, which@^1.2.10, which@^1.2.9, which@^1.3.1: +which@1.3.1, which@^1.1.1, which@^1.2.1, which@^1.2.10, which@^1.2.9: version "1.3.1" resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== dependencies: isexe "^2.0.0" -wide-align@1.1.3, wide-align@^1.1.0: +wide-align@1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.3.tgz#ae074e6bdc0c14a431e804e624549c633b000457" integrity sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA== @@ -10082,47 +8486,6 @@ wrappy@1: resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= -write-file-atomic@^2.0.0, write-file-atomic@^2.3.0, write-file-atomic@^2.4.2: - version "2.4.3" - resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-2.4.3.tgz#1fd2e9ae1df3e75b8d8c367443c692d4ca81f481" - integrity sha512-GaETH5wwsX+GcnzhPgKcKjJ6M2Cq3/iZp1WyY/X1CSqrW+jVNM9Y7D8EC2sM4ZG/V8wZlSniJnCKWPmBYAucRQ== - dependencies: - graceful-fs "^4.1.11" - imurmurhash "^0.1.4" - signal-exit "^3.0.2" - -write-json-file@^2.2.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/write-json-file/-/write-json-file-2.3.0.tgz#2b64c8a33004d54b8698c76d585a77ceb61da32f" - integrity sha1-K2TIozAE1UuGmMdtWFp3zrYdoy8= - dependencies: - detect-indent "^5.0.0" - graceful-fs "^4.1.2" - make-dir "^1.0.0" - pify "^3.0.0" - sort-keys "^2.0.0" - write-file-atomic "^2.0.0" - -write-json-file@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/write-json-file/-/write-json-file-3.2.0.tgz#65bbdc9ecd8a1458e15952770ccbadfcff5fe62a" - integrity sha512-3xZqT7Byc2uORAatYiP3DHUUAVEkNOswEWNs9H5KXiicRTvzYzYqKjYc4G7p+8pltvAw641lVByKVtMpf+4sYQ== - dependencies: - detect-indent "^5.0.0" - graceful-fs "^4.1.15" - make-dir "^2.1.0" - pify "^4.0.1" - sort-keys "^2.0.0" - write-file-atomic "^2.4.2" - -write-pkg@^3.1.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/write-pkg/-/write-pkg-3.2.0.tgz#0e178fe97820d389a8928bc79535dbe68c2cff21" - integrity sha512-tX2ifZ0YqEFOF1wjRW2Pk93NLsj02+n1UP5RvO6rCs0K6R2g1padvf006cY74PQJKMGS2r42NK7FD0dG6Y6paw== - dependencies: - sort-keys "^2.0.0" - write-json-file "^2.2.0" - write@1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/write/-/write-1.0.3.tgz#0800e14523b923a387e415123c865616aae0f5c3" @@ -10159,7 +8522,7 @@ yallist@^2.1.2: resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" integrity sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI= -yallist@^3.0.0, yallist@^3.0.2, yallist@^3.0.3: +yallist@^3.0.2: version "3.1.1" resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== @@ -10172,13 +8535,6 @@ yargs-parser@13.1.2, yargs-parser@^13.1.2: camelcase "^5.0.0" decamelize "^1.2.0" -yargs-parser@^10.0.0: - version "10.1.0" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-10.1.0.tgz#7202265b89f7e9e9f2e5765e0fe735a905edbaa8" - integrity sha512-VCIyR1wJoEBZUqk5PA+oOBF6ypbwh5aNB3I50guxAL/quggdfs4TtNHQrSazFA3fYZ+tEqfs0zIGlv0c/rgjbQ== - dependencies: - camelcase "^4.1.0" - yargs-parser@^15.0.1: version "15.0.1" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-15.0.1.tgz#54786af40b820dcb2fb8025b11b4d659d76323b3" @@ -10187,6 +8543,14 @@ yargs-parser@^15.0.1: camelcase "^5.0.0" decamelize "^1.2.0" +yargs-parser@^18.1.3: + version "18.1.3" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-18.1.3.tgz#be68c4975c6b2abf469236b0c870362fab09a7b0" + integrity sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ== + dependencies: + camelcase "^5.0.0" + decamelize "^1.2.0" + yargs-unparser@1.6.0: version "1.6.0" resolved "https://registry.yarnpkg.com/yargs-unparser/-/yargs-unparser-1.6.0.tgz#ef25c2c769ff6bd09e4b0f9d7c605fb27846ea9f" @@ -10212,7 +8576,7 @@ yargs@13.3.2, yargs@^13.3.0: y18n "^4.0.0" yargs-parser "^13.1.2" -yargs@^14.2.0, yargs@^14.2.2: +yargs@^14.2.0: version "14.2.3" resolved "https://registry.yarnpkg.com/yargs/-/yargs-14.2.3.tgz#1a1c3edced1afb2a2fea33604bc6d1d8d688a414" integrity sha512-ZbotRWhF+lkjijC/VhmOT9wSgyBQ7+zr13+YLkhfsSiTriYsMzkTUFP18pFhWwBeMa5gUc1MzbhrO6/VB7c9Xg==