diff --git a/packages/utils/src/icon-set/get-icons.ts b/packages/utils/src/icon-set/get-icons.ts
index 70ae7db..ba22ced 100644
--- a/packages/utils/src/icon-set/get-icons.ts
+++ b/packages/utils/src/icon-set/get-icons.ts
@@ -27,6 +27,12 @@ export function getIcons(
const sourceIcons = data.icons;
const sourceAliases = data.aliases || {};
+ // Add lastModified
+ if (data.lastModified) {
+ result.lastModified = data.lastModified;
+ }
+
+ // Get dependencies tree
const tree = getIconsTree(data, names);
let empty = true;
diff --git a/packages/utils/tests/get-icons-test.ts b/packages/utils/tests/get-icons-test.ts
index 7b605b1..6898d1b 100644
--- a/packages/utils/tests/get-icons-test.ts
+++ b/packages/utils/tests/get-icons-test.ts
@@ -61,9 +61,11 @@ describe('Testing retrieving icons from icon set', () => {
});
});
- test('Aliases and characters', () => {
+ test('Aliases, characters, lastModified', () => {
+ const lastModified = 12345;
const data: IconifyJSON = {
prefix: 'foo',
+ lastModified,
icons: {
bar: {
body: '',
@@ -96,6 +98,7 @@ describe('Testing retrieving icons from icon set', () => {
// Alias
expect(getIcons(data, ['foo'])).toEqual({
prefix: 'foo',
+ lastModified,
icons: {
bar: {
body: '',
@@ -112,6 +115,7 @@ describe('Testing retrieving icons from icon set', () => {
// Alias of alias
expect(getIcons(data, ['foo2'])).toEqual({
prefix: 'foo',
+ lastModified,
icons: {
bar: {
body: '',
@@ -132,6 +136,7 @@ describe('Testing retrieving icons from icon set', () => {
expect(getIcons(data, ['missing-alias'])).toBeNull();
expect(getIcons(data, ['missing-alias'], true)).toEqual({
prefix: 'foo',
+ lastModified,
icons: {},
not_found: ['missing-alias'],
});
@@ -146,6 +151,7 @@ describe('Testing retrieving icons from icon set', () => {
expect(getIcons(data, ['f04'])).toBeNull();
expect(getIcons(data, ['f04'], true)).toEqual({
prefix: 'foo',
+ lastModified,
icons: {},
not_found: ['f04'],
});