From 350505524cb2044e5b8fc6e4dde8994994230aa9 Mon Sep 17 00:00:00 2001 From: denys-bondarenko Date: Mon, 28 Oct 2024 16:47:36 +0100 Subject: [PATCH 1/2] fix: constants import --- lib/index.ts | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/index.ts b/lib/index.ts index 7b36cb5..4220950 100644 --- a/lib/index.ts +++ b/lib/index.ts @@ -1,10 +1,10 @@ -import * as constants from '@/constants'; import { formatOptions, shouldDataBeCached } from '@/helpers'; import MapStorage from '@/storage/Map'; import type { ICacheOptions } from '@/types/lcache'; import { buildCacheKey } from '@/utils'; import type { FastifyInstance, FastifyPluginCallback } from 'fastify'; import fp from 'fastify-plugin'; +import * as constants from './constants'; const defaultOpts: ICacheOptions = { ttlInMinutes: constants.TTL_IN_MINUTES, diff --git a/package.json b/package.json index 64ff5ce..65a6d8c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fastify-lcache", - "version": "2.1.3", + "version": "2.1.4", "description": "Light cache plugin for fastify", "main": "dist/index.js", "types": "dist/index.d.ts", From f28e7ebc1522f0032976786ec402f276d1f587ca Mon Sep 17 00:00:00 2001 From: denys-bondarenko Date: Mon, 28 Oct 2024 17:10:35 +0100 Subject: [PATCH 2/2] change TS path aliases to relative path --- lib/index.ts | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/index.ts b/lib/index.ts index 4220950..559ae4e 100644 --- a/lib/index.ts +++ b/lib/index.ts @@ -1,9 +1,9 @@ -import { formatOptions, shouldDataBeCached } from '@/helpers'; -import MapStorage from '@/storage/Map'; -import type { ICacheOptions } from '@/types/lcache'; -import { buildCacheKey } from '@/utils'; import type { FastifyInstance, FastifyPluginCallback } from 'fastify'; import fp from 'fastify-plugin'; +import { formatOptions, shouldDataBeCached } from './helpers'; +import MapStorage from './storage/Map'; +import type { ICacheOptions } from './types/lcache'; +import { buildCacheKey } from './utils'; import * as constants from './constants'; const defaultOpts: ICacheOptions = { diff --git a/package.json b/package.json index 65a6d8c..0e83686 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fastify-lcache", - "version": "2.1.4", + "version": "2.1.5", "description": "Light cache plugin for fastify", "main": "dist/index.js", "types": "dist/index.d.ts",