yaml 1.7.1 → 1.8.2
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/browser/dist/Anchors.js +24 -39
- package/browser/dist/Document.js +86 -110
- package/browser/dist/addComment.js +2 -11
- package/browser/dist/constants.js +3 -11
- package/browser/dist/cst/Alias.js +19 -36
- package/browser/dist/cst/BlankLine.js +25 -38
- package/browser/dist/cst/BlockValue.js +29 -51
- package/browser/dist/cst/Collection.js +42 -65
- package/browser/dist/cst/CollectionItem.js +33 -55
- package/browser/dist/cst/Comment.js +19 -35
- package/browser/dist/cst/Directive.js +20 -56
- package/browser/dist/cst/Document.js +47 -71
- package/browser/dist/cst/FlowCollection.js +38 -61
- package/browser/dist/cst/Node.js +26 -46
- package/browser/dist/cst/ParseContext.js +100 -140
- package/browser/dist/cst/PlainValue.js +21 -38
- package/browser/dist/cst/QuoteDouble.js +26 -42
- package/browser/dist/cst/QuoteSingle.js +25 -41
- package/browser/dist/cst/Range.js +9 -19
- package/browser/dist/cst/parse.js +5 -16
- package/browser/dist/cst/source-utils.js +3 -14
- package/browser/dist/errors.js +42 -78
- package/browser/dist/foldFlowLines.js +4 -15
- package/browser/dist/index.js +24 -44
- package/browser/dist/listTagNames.js +10 -24
- package/browser/dist/schema/Alias.js +32 -49
- package/browser/dist/schema/Collection.js +54 -65
- package/browser/dist/schema/Map.js +39 -49
- package/browser/dist/schema/Merge.js +32 -52
- package/browser/dist/schema/Node.js +3 -12
- package/browser/dist/schema/Pair.js +40 -58
- package/browser/dist/schema/Scalar.js +18 -33
- package/browser/dist/schema/Seq.js +23 -40
- package/browser/dist/schema/index.js +66 -80
- package/browser/dist/schema/parseMap.js +52 -72
- package/browser/dist/schema/parseSeq.js +30 -45
- package/browser/dist/schema/parseUtils.js +12 -25
- package/browser/dist/stringify.js +39 -45
- package/browser/dist/tags/core.js +30 -37
- package/browser/dist/tags/failsafe/index.js +4 -17
- package/browser/dist/tags/failsafe/map.js +17 -26
- package/browser/dist/tags/failsafe/seq.js +7 -18
- package/browser/dist/tags/failsafe/string.js +7 -19
- package/browser/dist/tags/index.js +35 -49
- package/browser/dist/tags/json.js +11 -38
- package/browser/dist/tags/options.js +8 -20
- package/browser/dist/tags/yaml-1.1/binary.js +16 -29
- package/browser/dist/tags/yaml-1.1/index.js +34 -54
- package/browser/dist/tags/yaml-1.1/omap.js +39 -58
- package/browser/dist/tags/yaml-1.1/pairs.js +15 -34
- package/browser/dist/tags/yaml-1.1/set.js +35 -61
- package/browser/dist/tags/yaml-1.1/timestamp.js +6 -16
- package/browser/dist/test-events.js +7 -19
- package/browser/dist/toJSON.js +1 -8
- package/browser/dist/warnings.js +3 -15
- package/dist/Document.js +7 -7
- package/dist/cst/BlankLine.js +4 -0
- package/dist/cst/BlockValue.js +1 -1
- package/dist/cst/Directive.js +0 -16
- package/dist/cst/Node.js +0 -5
- package/dist/cst/ParseContext.js +41 -55
- package/dist/schema/Alias.js +1 -0
- package/dist/schema/Collection.js +22 -5
- package/dist/schema/Map.js +12 -5
- package/dist/schema/Merge.js +3 -4
- package/dist/schema/Pair.js +1 -0
- package/dist/schema/index.js +11 -5
- package/dist/schema/parseMap.js +3 -1
- package/dist/schema/parseUtils.js +5 -6
- package/dist/stringify.js +17 -8
- package/dist/tags/core.js +27 -10
- package/dist/tags/failsafe/map.js +5 -1
- package/dist/tags/failsafe/seq.js +1 -1
- package/dist/tags/index.js +13 -1
- package/dist/tags/json.js +2 -9
- package/dist/tags/yaml-1.1/index.js +6 -6
- package/dist/tags/yaml-1.1/omap.js +3 -5
- package/dist/tags/yaml-1.1/pairs.js +1 -1
- package/dist/tags/yaml-1.1/set.js +3 -1
- package/package.json +40 -16
- package/types.mjs +20 -0
- package/util.mjs +24 -0
|
@@ -17,7 +17,9 @@ var _Scalar = _interopRequireDefault(require("../../schema/Scalar"));
|
|
|
17
17
|
|
|
18
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
19
|
|
|
20
|
-
function
|
|
20
|
+
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
|
|
21
|
+
|
|
22
|
+
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
21
23
|
|
|
22
24
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
23
25
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "yaml",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.8.2",
|
|
4
4
|
"license": "ISC",
|
|
5
5
|
"author": "Eemeli Aro <eemeli@gmail.com>",
|
|
6
6
|
"repository": "github:eemeli/yaml",
|
|
@@ -16,8 +16,10 @@
|
|
|
16
16
|
"dist/",
|
|
17
17
|
"types/",
|
|
18
18
|
"*.js",
|
|
19
|
+
"*.mjs",
|
|
19
20
|
"!.*.js"
|
|
20
21
|
],
|
|
22
|
+
"type": "commonjs",
|
|
21
23
|
"main": "./index.js",
|
|
22
24
|
"browser": {
|
|
23
25
|
"./index.js": "./browser/index.js",
|
|
@@ -35,6 +37,25 @@
|
|
|
35
37
|
"./types/timestamp.js": "./browser/types/timestamp.js",
|
|
36
38
|
"./util.js": "./browser/util.js"
|
|
37
39
|
},
|
|
40
|
+
"exports": {
|
|
41
|
+
".": "./index.js",
|
|
42
|
+
"./": "./",
|
|
43
|
+
"./parse-cst": "./parse-cst.js",
|
|
44
|
+
"./types": [
|
|
45
|
+
{
|
|
46
|
+
"default": "./types.js",
|
|
47
|
+
"import": "./types.mjs"
|
|
48
|
+
},
|
|
49
|
+
"./types.js"
|
|
50
|
+
],
|
|
51
|
+
"./util": [
|
|
52
|
+
{
|
|
53
|
+
"default": "./util.js",
|
|
54
|
+
"import": "./util.mjs"
|
|
55
|
+
},
|
|
56
|
+
"./util.js"
|
|
57
|
+
]
|
|
58
|
+
},
|
|
38
59
|
"scripts": {
|
|
39
60
|
"browser:build": "BABEL_ENV=browser babel src/ --out-dir browser/dist/",
|
|
40
61
|
"browser:copy": "cpy '*.js' '!*.config.js' types/ browser/ --parents",
|
|
@@ -54,6 +75,9 @@
|
|
|
54
75
|
},
|
|
55
76
|
"browserslist": "> 0.5%, not dead",
|
|
56
77
|
"jest": {
|
|
78
|
+
"collectCoverageFrom": [
|
|
79
|
+
"src/**/*.js"
|
|
80
|
+
],
|
|
57
81
|
"testMatch": [
|
|
58
82
|
"**/tests/**/*.js"
|
|
59
83
|
],
|
|
@@ -67,25 +91,25 @@
|
|
|
67
91
|
"singleQuote": true
|
|
68
92
|
},
|
|
69
93
|
"devDependencies": {
|
|
70
|
-
"@babel/cli": "^7.
|
|
71
|
-
"@babel/core": "^7.
|
|
72
|
-
"@babel/plugin-proposal-class-properties": "^7.
|
|
73
|
-
"@babel/plugin-transform-runtime": "^7.
|
|
74
|
-
"@babel/preset-env": "^7.
|
|
75
|
-
"babel-eslint": "^10.0
|
|
76
|
-
"babel-jest": "^
|
|
94
|
+
"@babel/cli": "^7.8.4",
|
|
95
|
+
"@babel/core": "^7.8.7",
|
|
96
|
+
"@babel/plugin-proposal-class-properties": "^7.8.3",
|
|
97
|
+
"@babel/plugin-transform-runtime": "^7.8.3",
|
|
98
|
+
"@babel/preset-env": "^7.8.7",
|
|
99
|
+
"babel-eslint": "^10.1.0",
|
|
100
|
+
"babel-jest": "^25.1.0",
|
|
77
101
|
"babel-plugin-trace": "^1.1.0",
|
|
78
102
|
"common-tags": "^1.8.0",
|
|
79
|
-
"cpy-cli": "^
|
|
80
|
-
"eslint": "^6.
|
|
81
|
-
"eslint-config-prettier": "^6.
|
|
82
|
-
"eslint-plugin-prettier": "^3.1.
|
|
83
|
-
"fast-check": "^1.
|
|
84
|
-
"jest": "^
|
|
85
|
-
"prettier": "^1.
|
|
103
|
+
"cpy-cli": "^3.1.0",
|
|
104
|
+
"eslint": "^6.8.0",
|
|
105
|
+
"eslint-config-prettier": "^6.10.0",
|
|
106
|
+
"eslint-plugin-prettier": "^3.1.2",
|
|
107
|
+
"fast-check": "^1.23.0",
|
|
108
|
+
"jest": "^25.1.0",
|
|
109
|
+
"prettier": "^1.19.1"
|
|
86
110
|
},
|
|
87
111
|
"dependencies": {
|
|
88
|
-
"@babel/runtime": "^7.
|
|
112
|
+
"@babel/runtime": "^7.8.7"
|
|
89
113
|
},
|
|
90
114
|
"engines": {
|
|
91
115
|
"node": ">= 6"
|
package/types.mjs
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import opt from './dist/tags/options.js'
|
|
2
|
+
export const binaryOptions = opt.binaryOptions
|
|
3
|
+
export const boolOptions = opt.boolOptions
|
|
4
|
+
export const nullOptions = opt.nullOptions
|
|
5
|
+
export const strOptions = opt.strOptions
|
|
6
|
+
|
|
7
|
+
import schema from './dist/schema/index.js'
|
|
8
|
+
export const Schema = schema.default
|
|
9
|
+
|
|
10
|
+
import map from './dist/schema/Map.js'
|
|
11
|
+
export const YAMLMap = map.default
|
|
12
|
+
|
|
13
|
+
import seq from './dist/schema/Seq.js'
|
|
14
|
+
export const YAMLSeq = seq.default
|
|
15
|
+
|
|
16
|
+
import pair from './dist/schema/Pair.js'
|
|
17
|
+
export const Pair = pair.default
|
|
18
|
+
|
|
19
|
+
import scalar from './dist/schema/Scalar.js'
|
|
20
|
+
export const Scalar = scalar.default
|
package/util.mjs
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import map from './dist/schema/Map.js'
|
|
2
|
+
export const findPair = map.findPair
|
|
3
|
+
|
|
4
|
+
import parseMapPkg from './dist/schema/parseMap.js'
|
|
5
|
+
export const parseMap = parseMapPkg.default
|
|
6
|
+
|
|
7
|
+
import parseSeqPkg from './dist/schema/parseSeq.js'
|
|
8
|
+
export const parseSeq = parseSeqPkg.default
|
|
9
|
+
|
|
10
|
+
import str from './dist/stringify.js'
|
|
11
|
+
export const stringifyNumber = str.stringifyNumber
|
|
12
|
+
export const stringifyString = str.stringifyString
|
|
13
|
+
|
|
14
|
+
import toJsonPkg from './dist/toJSON.js'
|
|
15
|
+
export const toJSON = toJsonPkg.default
|
|
16
|
+
|
|
17
|
+
import constants from './dist/constants.js'
|
|
18
|
+
export const Type = constants.Type
|
|
19
|
+
|
|
20
|
+
import err from './dist/errors.js'
|
|
21
|
+
export const YAMLReferenceError = err.YAMLReferenceError
|
|
22
|
+
export const YAMLSemanticError = err.YAMLSemanticError
|
|
23
|
+
export const YAMLSyntaxError = err.YAMLSyntaxError
|
|
24
|
+
export const YAMLWarning = err.YAMLWarning
|