Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error thrown if Object type default value has a property with a period #271

Open
shane-tomlinson opened this issue Sep 6, 2018 · 3 comments · Fixed by A-312/node-blueconfig#1

Comments

@shane-tomlinson
Copy link

shane-tomlinson commented Sep 6, 2018

This test case fails:

diff --git a/test/validation-tests.js b/test/validation-tests.js
index d3a3dfe..45f7dcd 100644
--- a/test/validation-tests.js
+++ b/test/validation-tests.js
@@ -239,4 +239,19 @@ describe('schema contains an object property with a custom format', function() {
       config.validate({ allowed: 'strict' });
     }).must.not.throw();
   });
+  it("must not throw if an object's default value property name contains a period", function() {
+    (function() {
+      const config = convict({
+        object: {
+          doc: 'default value contains property name that contains a period',
+          format: Object,
+          default: {
+            'foo.bar': ''
+          }
+        }
+      });
+
+      config.validate();
+    }).must.not.throw();
+  });
 });

blocks mozilla/fxa-content-server#6445

@vladikoff
Copy link
Contributor

@madarche i think this was fixed in #269 ?

madarche added a commit that referenced this issue Oct 22, 2018
@madarche madarche reopened this Oct 22, 2018
@madarche
Copy link
Collaborator

madarche commented Oct 22, 2018

@vladikoff at the time of the last release, when I was filling the release notes, I had seen @shane-tomlinson's ticket and checked it against #269. I should have written about it in this ticket. Sorry. Unfortunately #269 doesn't solve Shane's provided test 😞

With 55646f6 I've just added Shane's test.

But I've skip-ped the test in the mocha tests so that the build is not shown as failed. But everyone can check for themselves that the provided test still fails: just remove the .skip string in the test description.

shane-tomlinson pushed a commit to mozilla/browserid-verifier that referenced this issue Nov 8, 2018
The only one not updated is convict, because it breaks on default
values that contain an object with a key that contains a period.

See mozilla/node-convict#271
shane-tomlinson pushed a commit to mozilla/browserid-verifier that referenced this issue Nov 8, 2018
The only one not updated is convict, because it breaks on default
values that contain an object with a key that contains a period.

See mozilla/node-convict#271
shane-tomlinson pushed a commit to mozilla/browserid-verifier that referenced this issue Jan 4, 2019
The only one not updated is convict, because it breaks on default
values that contain an object with a key that contains a period.

See mozilla/node-convict#271

fixes #117
shane-tomlinson pushed a commit to mozilla/browserid-verifier that referenced this issue Jan 4, 2019
The only one not updated is convict, because it breaks on default
values that contain an object with a key that contains a period.

See mozilla/node-convict#271

fixes #117
@A-312
Copy link
Contributor

A-312 commented Dec 7, 2019

Duplicate/Similar to : #250

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants