Skip to content

Commit f15e5a7

Browse files
committed
use yarn --frozen-lockfile for builds
1 parent b266566 commit f15e5a7

9 files changed

Lines changed: 11 additions & 14 deletions

build/azure-pipelines/darwin/continuous-build-darwin.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ steps:
1111
inputs:
1212
versionSpec: "1.10.1"
1313
- script: |
14-
yarn
14+
yarn --frozen-lockfile
1515
displayName: Install Dependencies
1616
condition: ne(variables['CacheRestored'], 'true')
1717
- task: 1ESLighthouseEng.PipelineArtifactCaching.SaveCacheV1.SaveCache@1

build/azure-pipelines/darwin/product-build-darwin.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ steps:
3737

3838
- script: |
3939
set -e
40-
yarn
40+
yarn --frozen-lockfile
4141
displayName: Install dependencies
4242

4343
- script: |

build/azure-pipelines/linux/continuous-build-linux.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ steps:
1919
inputs:
2020
versionSpec: "1.10.1"
2121
- script: |
22-
yarn
22+
yarn --frozen-lockfile
2323
displayName: Install Dependencies
2424
condition: ne(variables['CacheRestored'], 'true')
2525
- task: 1ESLighthouseEng.PipelineArtifactCaching.SaveCacheV1.SaveCache@1

build/azure-pipelines/linux/product-build-linux-alpine.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ steps:
4646

4747
- script: |
4848
set -e
49-
CHILD_CONCURRENCY=1 yarn
49+
CHILD_CONCURRENCY=1 yarn --frozen-lockfile
5050
displayName: Install dependencies
5151

5252
- script: |

build/azure-pipelines/linux/product-build-linux-arm.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ steps:
4646

4747
- script: |
4848
set -e
49-
CHILD_CONCURRENCY=1 yarn
49+
CHILD_CONCURRENCY=1 yarn --frozen-lockfile
5050
displayName: Install dependencies
5151

5252
- script: |

build/azure-pipelines/linux/product-build-linux.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ steps:
3838

3939
- script: |
4040
set -e
41-
CHILD_CONCURRENCY=1 yarn
41+
CHILD_CONCURRENCY=1 yarn --frozen-lockfile
4242
displayName: Install dependencies
4343

4444
- script: |

build/azure-pipelines/win32/continuous-build-win32.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ steps:
1515
targetfolder: '**/node_modules, !**/node_modules/**/node_modules'
1616
vstsFeed: '$(ArtifactFeed)'
1717
- powershell: |
18-
yarn
18+
yarn --frozen-lockfile
1919
displayName: Install Dependencies
2020
condition: ne(variables['CacheRestored'], 'true')
2121
- task: 1ESLighthouseEng.PipelineArtifactCaching.SaveCacheV1.SaveCache@1

build/azure-pipelines/win32/product-build-win32.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ steps:
4040
$ErrorActionPreference = "Stop"
4141
$env:npm_config_arch="$(VSCODE_ARCH)"
4242
$env:CHILD_CONCURRENCY="1"
43-
exec { yarn }
43+
exec { yarn --frozen-lockfile }
4444
displayName: Install dependencies
4545

4646
- powershell: |

build/npm/postinstall.js

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,10 @@ function yarnInstall(location, opts) {
2020
const raw = process.env['npm_config_argv'] || '{}';
2121
const argv = JSON.parse(raw);
2222
const original = argv.original || [];
23-
const args = ['install'];
23+
const args = original.filter(arg => arg === '--ignore-optional' || arg === '--frozen-lockfile');
2424

25-
if (original.indexOf('--ignore-optional') > -1) {
26-
args.push('--ignore-optional');
27-
}
28-
29-
console.log('Installing dependencies in \'%s\'.', location);
25+
console.log(`Installing dependencies in ${location}...`);
26+
console.log(`$ yarn ${args.join(' ')}`);
3027
const result = cp.spawnSync(yarn, args, opts);
3128

3229
if (result.error || result.status !== 0) {

0 commit comments

Comments
 (0)