crissdev / gulp-yaml

A Gulp plugin to convert YAML to JSON
MIT License
24 stars 7 forks source link

"Error: Schema [object Object] is not valid" after upgrade to 1.0.0 #4

Closed barbogast closed 9 years ago

barbogast commented 9 years ago

I get the error "Error: Schema [object Object] is not valid" after the upgrade to 1.0.0

If it is of any help the [object Object] in the error message looks like this:

{ include: 
   [ { include: [Object],
       implicit: [],
       explicit: [],
       compiledImplicit: [Object],
       compiledExplicit: [Object],
       compiledTypeMap: [Object] } ],
  implicit: 
   [ { tag: 'tag:yaml.org,2002:timestamp',
       kind: 'scalar',
       resolve: [Function: resolveYamlTimestamp],
       construct: [Function: constructYamlTimestamp],
       instanceOf: [Function: Date],
       predicate: null,
       represent: [Function: representYamlTimestamp],
       defaultStyle: null,
       styleAliases: {} },
     { tag: 'tag:yaml.org,2002:merge',
       kind: 'scalar',
       resolve: [Function: resolveYamlMerge],
       construct: [Function],
       instanceOf: null,
       predicate: null,
       represent: null,
       defaultStyle: null,
       styleAliases: {} } ],
  explicit: 
   [ { tag: 'tag:yaml.org,2002:binary',
       kind: 'scalar',
...
crissdev commented 9 years ago

@Koblaid Are you trying to pass an object to schema option, instead of a string?

If you provide the schema option then it must be passed as string, ie: gulp.yaml({ schema: 'JSON_SCHEMA' }) or gulp.yaml({ schema: 'json_schema' }).

barbogast commented 9 years ago

@crissdev No, we don't use schema at all.

We use it like this:

.pipe(plugins.yaml({ space: 2 }))
crissdev commented 9 years ago

Thanks. I can see where the problem is. Going to publish a fix in a few minutes.

crissdev commented 9 years ago

@Koblaid Just published a new version 1.0.1. Can you confirm this issue is gone, please? Thanks.

barbogast commented 9 years ago

Yes, it works. Thanks a lot! What a response time... :-D

crissdev commented 9 years ago

Great, thanks.