From bd651b2c8391fdd5f54a4839d0b9c1c30037821b Mon Sep 17 00:00:00 2001 From: Carlos Garcia Date: Wed, 10 Feb 2021 15:30:30 +0100 Subject: [PATCH] List all dependencies when checking licenses in NPM 7 (#28909) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Update for listing all dependencies when checking licenses NPM 7 by default only prints the first level of dependencies but we need all of them for this script. * Update scripts CHANGELOG * Update CHANGELOG.md Co-authored-by: Greg Ziółkowski --- packages/scripts/CHANGELOG.md | 4 ++++ packages/scripts/scripts/check-licenses.js | 1 + 2 files changed, 5 insertions(+) diff --git a/packages/scripts/CHANGELOG.md b/packages/scripts/CHANGELOG.md index bb929e09d299d1..8c3889fa21b1a8 100644 --- a/packages/scripts/CHANGELOG.md +++ b/packages/scripts/CHANGELOG.md @@ -2,6 +2,10 @@ ## Unreleased +### Enhancements + +- Make `check-licenses` command compatible with npm v7 ([#28909](https://github.com/WordPress/gutenberg/pull/28909)). + ## 13.0.0 (2021-01-21) ### Breaking Changes diff --git a/packages/scripts/scripts/check-licenses.js b/packages/scripts/scripts/check-licenses.js index 502cfe1fae599b..dfd01f8c67fb52 100644 --- a/packages/scripts/scripts/check-licenses.js +++ b/packages/scripts/scripts/check-licenses.js @@ -173,6 +173,7 @@ const child = spawn.sync( 'ls', '--json', '--long', + '--all', ...( prod ? [ '--prod' ] : [] ), ...( dev ? [ '--dev' ] : [] ), ],