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

feat: release date #5960

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/config/definitions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1595,7 +1595,7 @@ const options: RenovateOptions[] = [
Update: '{{{updateType}}}',
'Current value': '{{{currentValue}}}',
'New value': '{{{newValue}}}',
Change: '`{{{displayFrom}}}` -> `{{{displayTo}}}`',
Change: '`{{{displayFrom}}}` -> `{{{displayTo}}}` {{{releaseTimestamp}}}',
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
Change: '`{{{displayFrom}}}` -> `{{{displayTo}}}` {{{releaseTimestamp}}}',
Change: '`{{{displayFrom}}}` -> `{{{displayTo}}}`',

revert

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sure

References: '{{{references}}}',
'Package file': '{{{packageFile}}}',
},
Expand Down
2 changes: 1 addition & 1 deletion lib/manager/npm/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ export const defaultConfig = {
versioning: npmVersioning.id,
prBodyDefinitions: {
Change:
"[{{#if displayFrom}}`{{{displayFrom}}}` -> {{else}}{{#if currentValue}}`{{{currentValue}}}` -> {{/if}}{{/if}}{{#if displayTo}}`{{{displayTo}}}`{{else}}`{{{newValue}}}`{{/if}}](https://renovatebot.com/diffs/npm/{{replace '/' '%2f' depName}}/{{{fromVersion}}}/{{{toVersion}}})",
"[{{#if displayFrom}}`{{{displayFrom}}}` -> {{else}}{{#if currentValue}}`{{{currentValue}}}` -> {{/if}}{{/if}}{{#if displayTo}}`{{{displayTo}}}`{{else}}`{{{newValue}}}`{{/if}}](https://renovatebot.com/diffs/npm/{{replace '/' '%2f' depName}}/{{{fromVersion}}}/{{{toVersion}}}) {{#if releaseTimestamp}}({{{releaseTimestamp}}}){{/if}}",
Copy link
Collaborator

Choose a reason for hiding this comment

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

revert this

Copy link
Contributor Author

Choose a reason for hiding this comment

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

okay

},
};
1 change: 1 addition & 0 deletions lib/util/template/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ export const allowedFields = {
depType: 'The dependency type (if extracted - manager-dependent)',
displayFrom: 'The current value, formatted for display',
displayTo: 'The to value, formatted for display',
releaseTimestamp: 'The release timeStamp of the newer version',
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
releaseTimestamp: 'The release timeStamp of the newer version',
releaseDate: 'The release date of the newer version',

fromVersion:
'The version that would be currently installed. For example, if currentValue is ^3.0.0 then currentVersion might be 3.1.0.',
isLockfileUpdate: 'true if the branch is a lock file update',
Expand Down
2 changes: 1 addition & 1 deletion lib/workers/pr/body/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { getControls } from './controls';
import { BranchConfig } from '../../common';

function massageUpdateMetadata(config: BranchConfig): void {
config.upgrades.forEach((upgrade) => {
config.upgrades.forEach(upgrade => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Update your prettier (e.g. run yarn to update node_modules) and then run yarn prettier-fix to revert this change.

/* eslint-disable no-param-reassign */
const { homepage, sourceUrl, sourceDirectory, changelogUrl } = upgrade;
let depNameLinked = upgrade.depName;
Expand Down
3 changes: 2 additions & 1 deletion lib/workers/pr/body/updates-table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ function getTableDefinition(config: BranchConfig): TableDefinition[] {
const value = config.prBodyDefinitions[header];
res.push({ header, value });
}

Copy link
Collaborator

Choose a reason for hiding this comment

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

revert all changes in this file

return res;
}

Expand All @@ -36,7 +37,7 @@ function getNonEmptyColumns(

export function getPrUpdatesTable(config: BranchConfig): string {
const tableDefinitions = getTableDefinition(config);
const tableValues = config.upgrades.map((upgrade) => {
const tableValues = config.upgrades.map(upgrade => {
const res: Record<string, string> = {};
for (const column of tableDefinitions) {
const { header, value } = column;
Expand Down