@faststore/core 0.3.13 → 0.3.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Conventional Changelog](https://github.com/conventional-changelog/conventional-changelog),
6
6
  and this project adheres to [Calendar Versioning](https://calver.org/).
7
7
 
8
+ ### [0.3.14](https://github.com/vtex-sites/nextjs.store/compare/0.3.13...0.3.14) (2022-12-19)
9
+
10
+
11
+ ### Chores
12
+
13
+ * improve log message when component not found in cms ([#331](https://github.com/vtex-sites/nextjs.store/issues/331)) ([cee1226](https://github.com/vtex-sites/nextjs.store/commit/cee122668a3225c15731100af1e8c740efa8a5a9))
14
+
8
15
  ### [0.3.13](https://github.com/vtex-sites/nextjs.store/compare/0.3.12...0.3.13) (2022-12-19)
9
16
 
10
17
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@faststore/core",
3
- "version": "0.3.13",
3
+ "version": "0.3.14",
4
4
  "license": "MIT",
5
5
  "browserslist": "supports es6-module and not dead",
6
6
  "scripts": {
@@ -38,6 +38,7 @@
38
38
  "@types/react": "^18.0.14",
39
39
  "@vtex/client-cms": "^0.2.12",
40
40
  "autoprefixer": "^10.4.0",
41
+ "chalk": "^5.2.0",
41
42
  "css-loader": "^6.7.1",
42
43
  "eslint": "^7.22.0",
43
44
  "eslint-config-next": "12.1.5",
@@ -1,4 +1,5 @@
1
1
  /* eslint-disable @typescript-eslint/no-explicit-any */
2
+ import chalk from 'chalk'
2
3
  import type { ComponentType } from 'react'
3
4
 
4
5
  import SectionBoundary from './SectionBoundary'
@@ -15,11 +16,14 @@ const RenderPageSections = ({ sections = [], context, components }: Props) => (
15
16
  const Component = components[name]
16
17
 
17
18
  if (!Component) {
19
+ // TODO: add a documentation link to help to do this
18
20
  console.info(
19
- `Could not find component for block ${name}. Add a new component for this block or remove it from the CMS`
21
+ `${chalk.yellow(
22
+ 'warn'
23
+ )} - ${name} not found. Add a new component for this section or remove it from the CMS`
20
24
  )
21
25
 
22
- return <></>
26
+ return null
23
27
  }
24
28
 
25
29
  return (