Skip to content

Commit

Permalink
feat: print yesterday update packages (#461)
Browse files Browse the repository at this point in the history
  • Loading branch information
fengmk2 authored Aug 30, 2023
1 parent 5923e5e commit 87c5d33
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ on:
pull_request:
# The branches below must be a subset of the branches above
branches: [ master ]
schedule:
- cron: '25 22 * * 0'

jobs:
analyze:
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,10 @@ on:
push:
branches: [ master ]

workflow_dispatch: {}

jobs:
release:
name: Node.js
uses: artusjs/github-actions/.github/workflows/node-release.yml@v1
uses: node-modules/github-actions/.github/workflows/node-release.yml@master
secrets:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GIT_TOKEN: ${{ secrets.GIT_TOKEN }}
Expand Down
6 changes: 5 additions & 1 deletion lib/local_install.js
Original file line number Diff line number Diff line change
Expand Up @@ -433,15 +433,19 @@ function recordRecentlyUpdates(options) {
}

const today = moment().format('YYYY-MM-DD');
const yesterday = moment().add(-1, 'days').format('YYYY-MM-DD');
const keys = Object.keys(displays).sort((a, b) => {
return a > b ? -1 : 1;
});

recentlyUpdatesText += '\n';
for (const key of keys) {
const isToday = key === today;
const isYesterday = key === yesterday;
const label = isToday ? 'Today:' : key;
const logToConsole = !options.onlyShowTodayUpdateToConsole || (options.onlyShowTodayUpdateToConsole && isToday);
// today or yesterday
const logToConsole = !options.onlyShowTodayUpdateToConsole ||
(options.onlyShowTodayUpdateToConsole && (isToday || isYesterday));
const text = ` ${label}`;
recentlyUpdatesText += `${text}\n`;

Expand Down

0 comments on commit 87c5d33

Please sign in to comment.