Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adopt package-lock.json #40146

Merged
merged 4 commits into from
Aug 21, 2020
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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

2 changes: 1 addition & 1 deletion .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 Down
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

2 changes: 1 addition & 1 deletion .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 Down
2 changes: 1 addition & 1 deletion .github/workflows/sync-branch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@ jobs:
git config user.name "TypeScript Bot"
git fetch origin master
git merge origin/master --no-ff
npm install
npm ci
npm test
git push
2 changes: 1 addition & 1 deletion .github/workflows/update-lkg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
run: |
git config user.email "ts_bot@rcavanaugh.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
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@weswigham @andrewbranch Is there a better way to test this than confirming it ran the night after this PR merged?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably, but I don’t think any of them are as good as the way you mentioned. You can add a workflow_dispatch trigger in addition to the schedule trigger to be able to run it manually.


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 "ts_bot@rcavanaugh.com"
amcasey marked this conversation as resolved.
Show resolved Hide resolved
git config user.name "TypeScript Bot"
npm install --package-lock-only
git add package-lock.json
git commit -m "Update package-lock.json"
git push
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ tests/cases/user/*/**/*.d.ts
tests/baselines/reference/dt
.failed-tests
TEST-results.xml
package-lock.json
amcasey marked this conversation as resolved.
Show resolved Hide resolved
tests/cases/user/TypeScript-React-Starter/TypeScript-React-Starter
tests/cases/user/TypeScript-Node-Starter/TypeScript-Node-Starter
tests/cases/user/TypeScript-React-Native-Starter/TypeScript-React-Native-Starter
Expand Down
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