From ea8811b444dc191fe9666562547c0cb654b3757a Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Fri, 16 Aug 2019 13:57:37 -0500 Subject: [PATCH] Backport PR #7013: Do not fail on deduplicate and ignore optional --- buildutils/src/update-core-mode.ts | 2 +- jupyterlab/commands.py | 2 +- jupyterlab/staging/.yarnrc | 1 + package.json | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/buildutils/src/update-core-mode.ts b/buildutils/src/update-core-mode.ts index 36429be7708b..99da37a4ab40 100644 --- a/buildutils/src/update-core-mode.ts +++ b/buildutils/src/update-core-mode.ts @@ -36,7 +36,7 @@ utils.writePackageData(path.join(staging, 'package.json'), data); fs.removeSync(path.join(staging, 'yarn.lock')); utils.run('jlpm', { cwd: staging }); try { - utils.run('jlpm yarn-deduplicate -s fewer --fail', { cwd: staging }); + utils.run('jlpm yarn-deduplicate -s fewer', { cwd: staging }); } catch { // re-run install if we deduped packages! utils.run('jlpm', { cwd: staging }); diff --git a/jupyterlab/commands.py b/jupyterlab/commands.py index d2e2c89c638e..87ec97ff49d3 100644 --- a/jupyterlab/commands.py +++ b/jupyterlab/commands.py @@ -163,7 +163,7 @@ def dedupe_yarn(path, logger=None): pins above, for example, known-bad versions """ had_dupes = ProgressProcess( - ['node', YARN_PATH, 'yarn-deduplicate', '-s', 'fewer', '--fail'], + ['node', YARN_PATH, 'yarn-deduplicate', '-s', 'fewer'], cwd=path, logger=logger ).wait() != 0 diff --git a/jupyterlab/staging/.yarnrc b/jupyterlab/staging/.yarnrc index b3fd51732629..be4f5194ad3a 100644 --- a/jupyterlab/staging/.yarnrc +++ b/jupyterlab/staging/.yarnrc @@ -1 +1,2 @@ yarn-path "./yarn.js" +ignore-optional true diff --git a/package.json b/package.json index 0790ee3d7fbd..c44c8fc1f98e 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,7 @@ "create:package": "node buildutils/lib/create-package.js", "create:test": "node buildutils/lib/create-test-package.js", "create:theme": "node buildutils/lib/create-theme.js", - "deduplicate": "jlpm yarn-deduplicate -s fewer --fail", + "deduplicate": "jlpm yarn-deduplicate -s fewer", "docs": "lerna run docs", "eslint": "eslint --fix .", "eslint:check": "eslint .",