cli: get version from core
MODIFY
packages/@romejs/cli/cli.ts
packages/@romejs/cli/cli.ts
@@ -14,9 +14,9 @@ import {
DEFAULT_CLIENT_FLAGS,
masterCommands,
localCommands,
+ VERSION
} from '@romejs/core';
import setProcessTitle from './utils/setProcessTitle';
-import {VERSION} from './utils/getRomeVersion';
import {parseCLIFlagsFromProcess} from '@romejs/cli-flags';
import {
createAbsoluteFilePath,
@@ -55,7 +55,7 @@ export default async function cli() {
const p = parseCLIFlagsFromProcess({
programName: 'rome',
usage: '[command] [flags]',
- version: `v${VERSION}`,
+ version: VERSION,
defineFlags(c: Consumer): {
cliFlags: CLIFlags;
clientFlags: ClientFlags;

DELETE
packages/@romejs/cli/utils/getRomeVersion.ts
-/**
- * Copyright (c) Facebook, Inc. and its affiliates.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
-
-import packageJson from '../../../../package.json';
-
-export const VERSION = String(packageJson.version);

cli: get version from core