mirror of
https://github.com/verdaccio/verdaccio.git
synced 2024-12-30 22:34:10 -05:00
fix: emit warning for upgrade 5.x and publish on previous
This commit is contained in:
parent
e54a8871ea
commit
a760e6814d
4 changed files with 1753 additions and 1179 deletions
|
@ -27,3 +27,5 @@ test/functional/store/*
|
|||
storage_default_storage/*
|
||||
docker-examples/
|
||||
.prettierignore
|
||||
*.sh
|
||||
.secrets-baseline
|
||||
|
|
2895
.secrets-baseline
2895
.secrets-baseline
File diff suppressed because it is too large
Load diff
|
@ -10,4 +10,4 @@ echo "Bumping version to new tag: ${lastTag}"
|
|||
echo "//$REGISTRY_URL/:_authToken=$REGISTRY_AUTH_TOKEN" > .npmrc
|
||||
|
||||
# Publish to NPM
|
||||
npm publish --registry https://$REGISTRY_URL/
|
||||
npm publish --registry https://$REGISTRY_URL/ --tag previous
|
||||
|
|
|
@ -13,21 +13,13 @@ import { parseConfigFile } from './utils';
|
|||
require('pkginfo')(module);
|
||||
|
||||
if (process.getuid && process.getuid() === 0) {
|
||||
global.console.warn(
|
||||
bgYellow().red(
|
||||
"*** WARNING: Verdaccio doesn't need superuser privileges. Don't run it under root! ***"
|
||||
)
|
||||
);
|
||||
global.console.warn(bgYellow().red("*** WARNING: Verdaccio doesn't need superuser privileges. Don't run it under root! ***"));
|
||||
}
|
||||
|
||||
const MIN_NODE_VERSION = '6.9.0';
|
||||
|
||||
if (semver.satisfies(process.version, `>=${MIN_NODE_VERSION}`) === false) {
|
||||
global.console.error(
|
||||
bgRed(
|
||||
`Verdaccio requires at least Node.js ${MIN_NODE_VERSION} or higher, please upgrade your Node.js distribution`
|
||||
)
|
||||
);
|
||||
global.console.error(bgRed(`Verdaccio requires at least Node.js ${MIN_NODE_VERSION} or higher, please upgrade your Node.js distribution`));
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
|
@ -67,20 +59,11 @@ function init() {
|
|||
}
|
||||
|
||||
logger.logger.warn({ file: configPathLocation }, 'config file - @{file}');
|
||||
|
||||
startVerdaccio(
|
||||
verdaccioConfiguration,
|
||||
cliListener,
|
||||
configPathLocation,
|
||||
pkgVersion,
|
||||
pkgName,
|
||||
listenDefaultCallback
|
||||
);
|
||||
process.emitWarning(`verdaccio 4.x is deprecated and won't longer recieve security support, please
|
||||
update to 5.x or higher`);
|
||||
startVerdaccio(verdaccioConfiguration, cliListener, configPathLocation, pkgVersion, pkgName, listenDefaultCallback);
|
||||
} catch (err) {
|
||||
logger.logger.fatal(
|
||||
{ file: configPathLocation, err: err },
|
||||
'cannot open config file @{file}: @{!err.message}'
|
||||
);
|
||||
logger.logger.fatal({ file: configPathLocation, err: err }, 'cannot open config file @{file}: @{!err.message}');
|
||||
process.exit(1);
|
||||
}
|
||||
}
|
||||
|
@ -94,7 +77,7 @@ if (commander.info) {
|
|||
Binaries: ['Node', 'Yarn', 'npm'],
|
||||
Virtualization: ['Docker'],
|
||||
Browsers: ['Chrome', 'Edge', 'Firefox', 'Safari'],
|
||||
npmGlobalPackages: ['verdaccio']
|
||||
npmGlobalPackages: ['verdaccio'],
|
||||
});
|
||||
// eslint-disable-next-line no-console
|
||||
console.log(data);
|
||||
|
@ -113,7 +96,7 @@ if (commander.info) {
|
|||
process.on('uncaughtException', function (err) {
|
||||
logger.logger.fatal(
|
||||
{
|
||||
err: err
|
||||
err: err,
|
||||
},
|
||||
'uncaught exception, please report this\n@{err.stack}'
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue