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: Add createdAt key to json in registry #532

Merged
merged 7 commits into from
Apr 11, 2024
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 1.18.0

- feat: Registry target now adds key `created` with current timestamp to json file

## 1.17.2

- No documented changes.
Expand Down
6 changes: 5 additions & 1 deletion src/targets/registry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,11 @@ export class RegistryTarget extends BaseTarget {
);
}
// Update the manifest
const updatedManifest = { ...packageManifest, version };
const updatedManifest: { [key: string]: any } = {
...packageManifest,
version,
};
updatedManifest.createdAt = new Date().toISOString();
Copy link
Member

Choose a reason for hiding this comment

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

Just to confirm: the manifest is what ends up here, correct? If yes, then I think adding a new field should be safe

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes


// Add file links if it's a generic app (legacy)
if (registryConfig.type === RegistryPackageType.APP) {
Expand Down
Loading