浏览代码

Merge pull request #5144 from blink1073/show-output

Build utils cleanup (cont)
Ian Rose 6 年之前
父节点
当前提交
f0241259a0

+ 1 - 1
buildutils/src/ensure-repo.ts

@@ -111,7 +111,7 @@ function ensureMetaPackage(): string[] {
 function ensureJupyterlab(): string[] {
   // Get the current version of JupyterLab
   let cmd = 'python setup.py --version';
-  let version = utils.run(cmd, {}, true);
+  let version = utils.run(cmd, { stdio: 'pipe' }, true);
 
   let basePath = path.resolve('.');
   let corePath = path.join(basePath, 'dev_mode', 'package.json');

+ 0 - 10
buildutils/src/prepublish.ts

@@ -7,14 +7,4 @@ import * as utils from './utils';
 utils.run('jlpm run clean:slate');
 utils.run('jlpm run build:packages');
 utils.run('jlpm run build:themes');
-
-// If we are on the main branch, make sure all of the local packages
-// are up to date with npm.
-let branch = utils.run('git rev-parse --abbrev-ref HEAD', {
-  stdio: ['ignore', 'pipe', 'ignore']
-});
-if (branch === 'master') {
-  utils.run('jlpm run update:local');
-}
-
 utils.run('jlpm integrity');

+ 1 - 1
buildutils/src/update-dist-tag.ts

@@ -35,7 +35,7 @@ function handlePackage(packagePath: string): void {
   const pkg = data.name;
 
   cmd = `npm view ${pkg} versions --json`;
-  const versions: string[] = JSON.parse(utils.run(cmd));
+  const versions: string[] = JSON.parse(utils.run(cmd, { stdio: 'pipe' }));
 
   // Find latest stable
   versions.reverse();

+ 0 - 32
buildutils/src/update-local.ts

@@ -1,32 +0,0 @@
-/*-----------------------------------------------------------------------------
-| Copyright (c) Jupyter Development Team.
-| Distributed under the terms of the Modified BSD License.
-|----------------------------------------------------------------------------*/
-
-import * as path from 'path';
-import * as utils from './utils';
-import packageJson = require('package-json');
-
-console.log('Looking for outdated local package versions...');
-utils.getLernaPaths().map(async pkgPath => {
-  const packagePath = path.join(pkgPath, 'package.json');
-  let data: any;
-  try {
-    data = utils.readJSONFile(packagePath);
-  } catch (e) {
-    console.log('Skipping package ' + packagePath);
-    return;
-  }
-  if (data.private === true) {
-    return;
-  }
-  const releaseData = await packageJson(data.name, { version: 'next' });
-  const version = releaseData.version;
-  if (data.version === version) {
-    return;
-  }
-  data.version = version;
-  console.log('Updating', data.name, 'to', version);
-  // Write the file back to disk.
-  utils.writePackageData(packagePath, data);
-});

+ 1 - 1
buildutils/src/utils.ts

@@ -67,7 +67,7 @@ export function run(
   quiet?: boolean
 ): string {
   options = options || {};
-  options['stdio'] = options.stdio || ['ignore', 'pipe', 'pipe'];
+  options['stdio'] = options.stdio || 'inherit';
   if (!quiet) {
     console.log('>', cmd);
   }