mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-04 20:42:52 +00:00
refactor: update package.json recommendations
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user