From 6225fedcb8f2176b4571ea72a7326c016109a7d1 Mon Sep 17 00:00:00 2001 From: Peter Bacon Darwin Date: Mon, 9 Oct 2017 11:18:51 +0100 Subject: [PATCH] build(aio): freeze lockfile when installing example dependencies (#19616) PR Close #19616 --- aio/tools/ng-packages-installer/index.js | 2 +- aio/tools/ng-packages-installer/index.spec.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/aio/tools/ng-packages-installer/index.js b/aio/tools/ng-packages-installer/index.js index d6c5aca5cb..702dec212c 100644 --- a/aio/tools/ng-packages-installer/index.js +++ b/aio/tools/ng-packages-installer/index.js @@ -128,7 +128,7 @@ class NgPackagesInstaller { * Yarn will also delete the local marker file for us. */ restoreNpmDependencies() { - this._installDeps('--check-files'); + this._installDeps('--freeze-lockfile', '--check-files'); } // Protected helpers diff --git a/aio/tools/ng-packages-installer/index.spec.js b/aio/tools/ng-packages-installer/index.spec.js index 55ba1c5384..8d8c430172 100644 --- a/aio/tools/ng-packages-installer/index.spec.js +++ b/aio/tools/ng-packages-installer/index.spec.js @@ -194,10 +194,10 @@ describe('NgPackagesInstaller', () => { }); describe('restoreNpmDependencies()', () => { - it('should run `yarn install --check-files` in the specified directory', () => { + it('should run `yarn install` in the specified directory, with the correct options', () => { spyOn(installer, '_installDeps'); installer.restoreNpmDependencies(); - expect(installer._installDeps).toHaveBeenCalledWith('--check-files'); + expect(installer._installDeps).toHaveBeenCalledWith('--freeze-lockfile', '--check-files'); }); });