Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@bigcommerce/stencil-paper

Package Overview
Dependencies
Maintainers
16
Versions
162
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bigcommerce/stencil-paper - npm Package Compare versions

Comparing version 3.0.3 to 3.0.4

4

CHANGELOG.md
# 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)

4

lib/translator/index.js

@@ -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();

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc