Skip to content

Commit

Permalink
Merge pull request #40146 from amcasey/PackageLock
Browse files Browse the repository at this point in the history
Adopt package-lock.json
  • Loading branch information
amcasey authored Aug 21, 2020
2 parents f9e360d + c12bc7b commit 4eb9fb4
Show file tree
Hide file tree
Showing 12 changed files with 8,824 additions and 17 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
run: |
npm uninstall typescript --no-save
npm uninstall tslint --no-save
- run: npm install
- run: npm ci
- run: npm update

# Re: https://github.com/actions/setup-node/pull/125
Expand All @@ -45,4 +45,4 @@ jobs:

- name: Validate the browser can import TypeScript
run: gulp test-browser-integration

4 changes: 2 additions & 2 deletions .github/workflows/new-release-branch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 }}
4 changes: 1 addition & 3 deletions .github/workflows/release-branch-artifact.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -41,4 +40,3 @@ jobs:
with:
name: tgz
path: typescript.tgz

4 changes: 2 additions & 2 deletions .github/workflows/set-version.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
4 changes: 2 additions & 2 deletions .github/workflows/sync-branch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,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 origin/master --no-ff
npm install
npm ci
npm test
git push
4 changes: 2 additions & 2 deletions .github/workflows/update-lkg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
27 changes: 27 additions & 0 deletions .github/workflows/update-package-lock.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Update package-lock.json

on:
schedule:
# This is probably 6am UTC, which is 10pm PST or 11pm PDT
# Alternatively, 6am local is also fine
- cron: '0 6 * * *'

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12
registry-url: https://registry.npmjs.org/

- name: Configure git and update package-lock.json
run: |
git config user.email "[email protected]"
git config user.name "TypeScript Bot"
npm install --package-lock-only
git add -f package-lock.json
git commit -m "Update package-lock.json"
git push
1 change: 0 additions & 1 deletion .npmrc

This file was deleted.

2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ branches:

install:
- npm uninstall typescript --no-save
- npm install
- npm ci

cache:
directories:
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 .
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Loading

0 comments on commit 4eb9fb4

Please sign in to comment.