yaml 1.0.0 → 1.0.1

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/dist/Document.js CHANGED
@@ -65,7 +65,7 @@ class Document {
65
65
 
66
66
  parse(node) {
67
67
  if (this.options.keepCstNodes) this.cstNode = node;
68
- if (this.options.keepNodeTypes) this.type = "DOCUMENT";
68
+ if (this.options.keepNodeTypes) this.type = 'DOCUMENT';
69
69
  const _node$directives = node.directives,
70
70
  directives = _node$directives === void 0 ? [] : _node$directives,
71
71
  _node$contents = node.contents,
@@ -245,13 +245,13 @@ function plainString(item, ctx, onComment) {
245
245
  return doubleQuotedString(value, ctx);
246
246
  }
247
247
 
248
- if (!value || /^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t ]$/.test(value)) {
248
+ if (!value || /^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(value)) {
249
249
  // not allowed:
250
250
  // - empty string
251
251
  // - start with an indicator character (except [?:-]) or /[?-] /
252
252
  // - '\n ', ': ' or ' \n' anywhere
253
253
  // - '#' not preceded by a non-space char
254
- // - end with ' '
254
+ // - end with ' ' or ':'
255
255
  return implicitKey || inFlow || value.indexOf('\n') === -1 ? value.indexOf('"') !== -1 && value.indexOf("'") === -1 ? singleQuotedString(value, ctx) : doubleQuotedString(value, ctx) : blockString(item, ctx, onComment);
256
256
  }
257
257
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yaml",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "main": "dist/index.js",
5
5
  "license": "ISC",
6
6
  "author": "Eemeli Aro <eemeli@gmail.com>",
@@ -66,16 +66,16 @@
66
66
  "singleQuote": true
67
67
  },
68
68
  "devDependencies": {
69
- "@babel/cli": "^7.1.0",
70
- "@babel/core": "^7.1.0",
69
+ "@babel/cli": "^7.1.5",
70
+ "@babel/core": "^7.1.5",
71
71
  "@babel/plugin-proposal-class-properties": "^7.1.0",
72
- "@babel/preset-env": "^7.1.0",
72
+ "@babel/preset-env": "^7.1.5",
73
73
  "babel-core": "^7.0.0-bridge.0",
74
74
  "babel-jest": "^23.6.0",
75
75
  "babel-plugin-add-module-exports": "^1.0.0",
76
76
  "babel-plugin-trace": "^1.1.0",
77
77
  "jest": "^23.6.0",
78
- "prettier": "^1.14.3"
78
+ "prettier": "^1.15.1"
79
79
  },
80
80
  "dependencies": {},
81
81
  "engines": {