diff --git a/.gitignore b/.gitignore index 7374b1c8..c810fce3 100755 --- a/.gitignore +++ b/.gitignore @@ -12,4 +12,6 @@ gitcommit.fish .env.test .env -.next \ No newline at end of file +.next + +old-tests/ \ No newline at end of file diff --git a/playground/main.ts b/playground/main.ts index 8c25e209..0aa2d3de 100644 --- a/playground/main.ts +++ b/playground/main.ts @@ -1,4 +1,6 @@ -import StoryblokClient, { RichtextSchema } from '../' +import StoryblokClient, { RichtextResolver, RichtextSchema } from '../' const client = new StoryblokClient({}) -console.log(client, RichtextSchema) + +// TODO: Remove when deprecation of `RichtextResolver` is done +console.log(new RichtextResolver().render()) \ No newline at end of file diff --git a/src/index.ts b/src/index.ts index 9b03ffa5..74053c13 100755 --- a/src/index.ts +++ b/src/index.ts @@ -75,6 +75,7 @@ class Storyblok { private resolveCounter: number public relations: RelationsType public links: LinksType + // TODO: Remove on v7.x.x public richTextResolver: RichTextResolver public resolveNestedRelations: boolean private stringifiedStoriesCache: Record diff --git a/src/richTextResolver.ts b/src/richTextResolver.ts index d8b67eb3..ba624ea5 100644 --- a/src/richTextResolver.ts +++ b/src/richTextResolver.ts @@ -83,6 +83,9 @@ class RichTextResolver { data?: ISbRichtext, options: RenderOptions = { optimizeImages: false } ) { + console.warn( + "Warning ⚠️: The RichTextResolver class is deprecated and will be removed in the next major release. Please use the `@storyblok/richtext` instead. https://github.com/storyblok/richtext/" + ); if (data && data.content && Array.isArray(data.content)) { let html = ''