From a76f015f9bc9474e52481640f1f07e3fe89a4314 Mon Sep 17 00:00:00 2001 From: Andrew Casey Date: Tue, 22 Sep 2020 10:33:23 -0700 Subject: [PATCH] Backport package-lock infra changes to 4.0 From #40146 Fixes #40692 --- .github/workflows/new-release-branch.yaml | 4 ++-- .github/workflows/release-branch-artifact.yaml | 4 +--- .github/workflows/set-version.yaml | 4 ++-- .github/workflows/sync-branch.yaml | 4 ++-- .github/workflows/update-lkg.yml | 4 ++-- Dockerfile | 2 +- README.md | 2 +- 7 files changed, 11 insertions(+), 13 deletions(-) diff --git a/.github/workflows/new-release-branch.yaml b/.github/workflows/new-release-branch.yaml index 1e145a0932f79..8cb80522ae283 100644 --- a/.github/workflows/new-release-branch.yaml +++ b/.github/workflows/new-release-branch.yaml @@ -23,7 +23,7 @@ jobs: sed -i -e 's/const versionMajorMinor = ".*"/const versionMajorMinor = "${{ github.event.client_payload.core_major_minor }}"/g' tests/baselines/reference/api/typescript.d.ts sed -i -e 's/const versionMajorMinor = ".*"/const versionMajorMinor = "${{ github.event.client_payload.core_major_minor }}"/g' tests/baselines/reference/api/tsserverlibrary.d.ts sed -i -e 's/const version = `${versionMajorMinor}.0-.*`/const version = `${versionMajorMinor}.0-${{ github.event.client_payload.core_tag || 'dev' }}`/g' src/compiler/corePublic.ts - npm install + npm ci gulp LKG npm test git diff @@ -32,7 +32,7 @@ jobs: git add tests/baselines/reference/api/typescript.d.ts git add tests/baselines/reference/api/tsserverlibrary.d.ts git add ./lib - git config user.email "ts_bot@rcavanaugh.com" + git config user.email "typescriptbot@microsoft.com" git config user.name "TypeScript Bot" git commit -m 'Bump version to ${{ github.event.client_payload.package_version }} and LKG' git push --set-upstream origin ${{ github.event.client_payload.branch_name }} diff --git a/.github/workflows/release-branch-artifact.yaml b/.github/workflows/release-branch-artifact.yaml index ed50cfeb6464c..7683b7623acee 100644 --- a/.github/workflows/release-branch-artifact.yaml +++ b/.github/workflows/release-branch-artifact.yaml @@ -21,8 +21,7 @@ jobs: npm uninstall tslint --no-save - name: npm install and test run: | - npm install - npm update + npm ci npm test env: CI: true @@ -41,4 +40,3 @@ jobs: with: name: tgz path: typescript.tgz - \ No newline at end of file diff --git a/.github/workflows/set-version.yaml b/.github/workflows/set-version.yaml index a31d849cb4131..f337d5b58f472 100644 --- a/.github/workflows/set-version.yaml +++ b/.github/workflows/set-version.yaml @@ -29,7 +29,7 @@ jobs: sed -i -e 's/const versionMajorMinor = ".*"/const versionMajorMinor = "${{ github.event.client_payload.core_major_minor }}"/g' tests/baselines/reference/api/typescript.d.ts sed -i -e 's/const versionMajorMinor = ".*"/const versionMajorMinor = "${{ github.event.client_payload.core_major_minor }}"/g' tests/baselines/reference/api/tsserverlibrary.d.ts sed -i -e 's/const version = .*;/const version = "${{ github.event.client_payload.package_version }}" as string;/g' src/compiler/corePublic.ts - npm install + npm ci gulp LKG npm test git diff @@ -38,7 +38,7 @@ jobs: git add tests/baselines/reference/api/typescript.d.ts git add tests/baselines/reference/api/tsserverlibrary.d.ts git add ./lib - git config user.email "ts_bot@rcavanaugh.com" + git config user.email "typescriptbot@microsoft.com" git config user.name "TypeScript Bot" git commit -m 'Bump version to ${{ github.event.client_payload.package_version }} and LKG' git push diff --git a/.github/workflows/sync-branch.yaml b/.github/workflows/sync-branch.yaml index 642a353aa3c69..7c1e6b3667696 100644 --- a/.github/workflows/sync-branch.yaml +++ b/.github/workflows/sync-branch.yaml @@ -20,10 +20,10 @@ jobs: # required client_payload members: # branch_name - the target branch - run: | - git config user.email "ts_bot@rcavanaugh.com" + git config user.email "typescriptbot@microsoft.com" git config user.name "TypeScript Bot" git fetch origin master git merge master --no-ff - npm install + npm ci npm test git push diff --git a/.github/workflows/update-lkg.yml b/.github/workflows/update-lkg.yml index 8864d1316c0be..cf81cc97db9fb 100644 --- a/.github/workflows/update-lkg.yml +++ b/.github/workflows/update-lkg.yml @@ -17,9 +17,9 @@ jobs: - name: Configure Git and Update LKG run: | - git config user.email "ts_bot@rcavanaugh.com" + git config user.email "typescriptbot@microsoft.com" git config user.name "TypeScript Bot" - npm install + npm ci gulp LKG npm test git diff diff --git a/Dockerfile b/Dockerfile index 8898a69af6d38..5606df961119b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,6 +2,6 @@ FROM node:current COPY . /typescript WORKDIR /typescript -RUN npm install +RUN npm ci RUN npm i -g gulp-cli RUN gulp configure-insiders && gulp LKG && gulp clean && npm pack . \ No newline at end of file diff --git a/README.md b/README.md index 848f1f4dd8c4b..723522332a738 100644 --- a/README.md +++ b/README.md @@ -67,7 +67,7 @@ Install [Gulp](https://gulpjs.com/) tools and dev dependencies: ```bash npm install -g gulp -npm install +npm ci ``` Use one of the following to build and test: