diff --git a/src/common.ts b/src/common.ts index caa18bc6..bbffd1aa 100644 --- a/src/common.ts +++ b/src/common.ts @@ -222,31 +222,31 @@ export function checkPackages( ): void { if (typeof expected === 'undefined') { return; - } + } if (typeof acutal === 'undefined') { reportPackage(expected, development); return; - } + } for (let npmPackage of expected) { const [name, expectedVersion] = npmPackage.split(':'); const installedVersion = acutal[name]; if (typeof installedVersion === 'undefined') { reportPackage(npmPackage, development); continue; - } + } if (typeof expectedVersion === 'undefined') { continue; - } + } if (typeof valid(expectedVersion) === 'string' && !satisfies(installedVersion, expectedVersion)) { npmPackage = npmPackage.replace(':', '@'); - consoleWarn( + consoleWarn( `Version '${installedVersion}' of ${ development ? 'dev ' : ' ' }dependency '${name}' does not satisfy constraint '${expectedVersion}'. Please install with 'npm install --save-exact ${development ? '--save-dev ' : ''}${npmPackage}'.`, - ); - } + ); } + } } /** @@ -796,7 +796,7 @@ export function getRules(configuration: Configuration): Rules { } if (configuration.forPackaging) { - scripts.prepublishOnly = 'npm ci && npm run build'; + scripts.prepublishOnly = 'npm ci && npm run build && npm run test'; files.push(path.join('templates', '.npmignore')); } else { @@ -805,7 +805,7 @@ export function getRules(configuration: Configuration): Rules { } if (configuration.serverSide) { - dependencies.push('@types/node:^10.0.0'); + devDependencies.push('@types/node:^14.0.0'); } if (configuration.standardBuild || configuration.hasCli) { @@ -820,9 +820,9 @@ export function getRules(configuration: Configuration): Rules { } if (configuration.standardDocumentation) { - devDependencies.push('typedoc'); + devDependencies.push('typedoc:0.22.x'); scripts.documentation = - 'typedoc --includeDeclarations --mode modules --out docs --readme README.md --listInvalidSymbolLinks --entryPointStrategy expand src'; + 'typedoc --out docs --readme README.md --listInvalidSymbolLinks --entryPointStrategy expand src'; } for (const ignoreScript of configuration.ignoreScripts) {