@bigcommerce/stencil-paper
Advanced tools
Comparing version 3.0.3 to 3.0.4
# Changelog | ||
## Pending | ||
## 3.0.4 (2022-03-18) | ||
- bump paper-handlerbars [#273](https://github.com/bigcommerce/paper/pull/273) | ||
- STRF-9705 MessageFormat errors mark as warning [#272](https://github.com/bigcommerce/paper/pull/272) | ||
## 3.0.3 (2022-03-02) | ||
@@ -5,0 +9,0 @@ - STRF-9658 logger accepts strings instead of objects [#270](https://github.com/bigcommerce/paper/pull/270) |
@@ -108,3 +108,3 @@ 'use strict'; | ||
} catch (err) { | ||
this._logger.error(err.message); | ||
this._logger.warn(err.message); | ||
return ''; | ||
@@ -167,3 +167,3 @@ } | ||
if (err.name === 'SyntaxError') { | ||
this._logger.error(`Language File Syntax Error: ${err.message} for key "${key}"`, err.expected); | ||
this._logger.warn(`Language File Syntax Error: ${err.message} for key "${key}"`, err.expected); | ||
return () => ''; | ||
@@ -170,0 +170,0 @@ } |
@@ -128,3 +128,3 @@ 'use strict'; | ||
} catch (err) { | ||
logger.error(`Failed to flatten ${locale} - Error: ${err}`); | ||
logger.warn(`Failed to flatten ${locale} - Error: ${err}`); | ||
result[locale] = {}; | ||
@@ -131,0 +131,0 @@ } |
{ | ||
"name": "@bigcommerce/stencil-paper", | ||
"version": "3.0.3", | ||
"version": "3.0.4", | ||
"description": "A Stencil plugin to load template files and render pages using backend renderer plugins.", | ||
@@ -27,3 +27,3 @@ "main": "index.js", | ||
"dependencies": { | ||
"@bigcommerce/stencil-paper-handlebars": "4.5.3", | ||
"@bigcommerce/stencil-paper-handlebars": "4.5.4", | ||
"accept-language-parser": "~1.4.1", | ||
@@ -30,0 +30,0 @@ "messageformat": "~0.2.2" |
@@ -51,2 +51,3 @@ 'use strict'; | ||
error: Sinon.fake(), | ||
warn: Sinon.fake(), | ||
}; | ||
@@ -116,3 +117,3 @@ | ||
expect(translator.translate('bye')).to.equal('Bye bye'); | ||
expect(loggerStub.error.called).to.equal(true); | ||
expect(loggerStub.warn.called).to.equal(true); | ||
@@ -135,4 +136,4 @@ done(); | ||
expect(translator.translate('hello')).to.equal(''); | ||
expect(loggerStub.error.called).to.equal(true); | ||
expect(loggerStub.error.getCall(0).args[0]).to.equal("MessageFormat: Data required for 'name'.") | ||
expect(loggerStub.warn.called).to.equal(true); | ||
expect(loggerStub.warn.getCall(0).args[0]).to.equal("MessageFormat: Data required for 'name'.") | ||
@@ -152,4 +153,4 @@ done(); | ||
expect(result).to.equal(""); | ||
expect(loggerStub.error.called).to.equal(true); | ||
expect(loggerStub.error.getCall(0).args[0]).to.equal(errMessage); | ||
expect(loggerStub.warn.called).to.equal(true); | ||
expect(loggerStub.warn.getCall(0).args[0]).to.equal(errMessage); | ||
@@ -156,0 +157,0 @@ done(); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
110838
2431
+ Added@bigcommerce/stencil-paper-handlebars@4.5.4(transitive)
- Removed@bigcommerce/stencil-paper-handlebars@4.5.3(transitive)