yaml 2.6.1 → 2.7.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.
Files changed (86) hide show
  1. package/README.md +29 -8
  2. package/browser/dist/compose/compose-collection.js +2 -2
  3. package/browser/dist/compose/resolve-props.js +1 -1
  4. package/browser/dist/log.js +1 -4
  5. package/browser/dist/parse/parser.js +14 -1
  6. package/browser/dist/schema/yaml-1.1/binary.js +4 -11
  7. package/browser/dist/schema/yaml-1.1/timestamp.js +1 -1
  8. package/browser/dist/util.js +1 -1
  9. package/dist/compose/compose-collection.d.ts +4 -4
  10. package/dist/compose/compose-collection.js +2 -2
  11. package/dist/compose/compose-doc.d.ts +6 -6
  12. package/dist/compose/compose-node.d.ts +7 -7
  13. package/dist/compose/compose-scalar.d.ts +4 -4
  14. package/dist/compose/composer.d.ts +7 -6
  15. package/dist/compose/composer.js +2 -1
  16. package/dist/compose/resolve-block-map.d.ts +5 -5
  17. package/dist/compose/resolve-block-scalar.d.ts +5 -5
  18. package/dist/compose/resolve-block-seq.d.ts +5 -5
  19. package/dist/compose/resolve-end.d.ts +2 -2
  20. package/dist/compose/resolve-flow-collection.d.ts +7 -7
  21. package/dist/compose/resolve-flow-scalar.d.ts +4 -4
  22. package/dist/compose/resolve-props.d.ts +2 -2
  23. package/dist/compose/resolve-props.js +1 -1
  24. package/dist/compose/util-contains-newline.d.ts +1 -1
  25. package/dist/compose/util-empty-scalar-position.d.ts +1 -1
  26. package/dist/compose/util-flow-indent-check.d.ts +2 -2
  27. package/dist/compose/util-map-includes.d.ts +3 -3
  28. package/dist/doc/Document.d.ts +11 -11
  29. package/dist/doc/anchors.d.ts +2 -2
  30. package/dist/doc/createNode.d.ts +4 -4
  31. package/dist/doc/directives.d.ts +1 -1
  32. package/dist/index.d.ts +21 -18
  33. package/dist/log.js +4 -2
  34. package/dist/nodes/Alias.d.ts +9 -8
  35. package/dist/nodes/Collection.d.ts +4 -4
  36. package/dist/nodes/Node.d.ts +10 -10
  37. package/dist/nodes/Pair.d.ts +9 -8
  38. package/dist/nodes/Scalar.d.ts +4 -3
  39. package/dist/nodes/YAMLMap.d.ts +10 -10
  40. package/dist/nodes/YAMLSeq.d.ts +10 -10
  41. package/dist/nodes/addPairToJSMap.d.ts +3 -3
  42. package/dist/nodes/identity.d.ts +7 -7
  43. package/dist/nodes/toJS.d.ts +2 -2
  44. package/dist/options.d.ts +10 -10
  45. package/dist/parse/cst-scalar.d.ts +4 -4
  46. package/dist/parse/cst-stringify.d.ts +1 -1
  47. package/dist/parse/cst-visit.d.ts +2 -2
  48. package/dist/parse/cst.d.ts +4 -3
  49. package/dist/parse/lexer.d.ts +1 -1
  50. package/dist/parse/parser.d.ts +4 -4
  51. package/dist/parse/parser.js +16 -2
  52. package/dist/public-api.d.ts +6 -5
  53. package/dist/schema/Schema.d.ts +4 -4
  54. package/dist/schema/common/map.d.ts +1 -1
  55. package/dist/schema/common/null.d.ts +1 -1
  56. package/dist/schema/common/seq.d.ts +1 -1
  57. package/dist/schema/common/string.d.ts +1 -1
  58. package/dist/schema/core/bool.d.ts +1 -1
  59. package/dist/schema/core/float.d.ts +1 -1
  60. package/dist/schema/core/int.d.ts +1 -1
  61. package/dist/schema/core/schema.d.ts +1 -1
  62. package/dist/schema/json/schema.d.ts +1 -1
  63. package/dist/schema/tags.d.ts +2 -2
  64. package/dist/schema/types.d.ts +8 -8
  65. package/dist/schema/yaml-1.1/binary.d.ts +1 -1
  66. package/dist/schema/yaml-1.1/binary.js +8 -5
  67. package/dist/schema/yaml-1.1/bool.d.ts +1 -1
  68. package/dist/schema/yaml-1.1/float.d.ts +1 -1
  69. package/dist/schema/yaml-1.1/int.d.ts +1 -1
  70. package/dist/schema/yaml-1.1/merge.d.ts +3 -3
  71. package/dist/schema/yaml-1.1/omap.d.ts +11 -17
  72. package/dist/schema/yaml-1.1/pairs.d.ts +7 -7
  73. package/dist/schema/yaml-1.1/schema.d.ts +1 -1
  74. package/dist/schema/yaml-1.1/set.d.ts +9 -9
  75. package/dist/schema/yaml-1.1/timestamp.d.ts +1 -1
  76. package/dist/schema/yaml-1.1/timestamp.js +1 -1
  77. package/dist/stringify/stringify.d.ts +3 -3
  78. package/dist/stringify/stringifyCollection.d.ts +2 -2
  79. package/dist/stringify/stringifyDocument.d.ts +3 -3
  80. package/dist/stringify/stringifyNumber.d.ts +1 -1
  81. package/dist/stringify/stringifyPair.d.ts +2 -2
  82. package/dist/stringify/stringifyString.d.ts +2 -2
  83. package/dist/util.d.ts +16 -12
  84. package/dist/util.js +2 -2
  85. package/dist/visit.d.ts +7 -7
  86. package/package.json +4 -4
@@ -1,3 +1,3 @@
1
- import type { Pair } from '../nodes/Pair.js';
2
- import { StringifyContext } from './stringify.js';
1
+ import type { Pair } from '../nodes/Pair';
2
+ import type { StringifyContext } from './stringify';
3
3
  export declare function stringifyPair({ key, value }: Readonly<Pair>, ctx: StringifyContext, onComment?: () => void, onChompKeep?: () => void): string;
@@ -1,5 +1,5 @@
1
- import { Scalar } from '../nodes/Scalar.js';
2
- import type { StringifyContext } from './stringify.js';
1
+ import { Scalar } from '../nodes/Scalar';
2
+ import type { StringifyContext } from './stringify';
3
3
  interface StringifyScalar {
4
4
  value: string;
5
5
  comment?: string | null;
package/dist/util.d.ts CHANGED
@@ -1,12 +1,16 @@
1
- export { createNode, CreateNodeContext } from './doc/createNode.js';
2
- export { debug, LogLevelId, warn } from './log.js';
3
- export { createPair } from './nodes/Pair.js';
4
- export { findPair } from './nodes/YAMLMap.js';
5
- export { toJS, ToJSContext } from './nodes/toJS.js';
6
- export { map as mapTag } from './schema/common/map.js';
7
- export { seq as seqTag } from './schema/common/seq.js';
8
- export { string as stringTag } from './schema/common/string.js';
9
- export { foldFlowLines, FoldOptions } from './stringify/foldFlowLines';
10
- export { StringifyContext } from './stringify/stringify.js';
11
- export { stringifyNumber } from './stringify/stringifyNumber.js';
12
- export { stringifyString } from './stringify/stringifyString.js';
1
+ export { createNode } from './doc/createNode';
2
+ export type { CreateNodeContext } from './doc/createNode';
3
+ export { debug, warn } from './log';
4
+ export type { LogLevelId } from './log';
5
+ export { createPair } from './nodes/Pair';
6
+ export { toJS } from './nodes/toJS';
7
+ export type { ToJSContext } from './nodes/toJS';
8
+ export { findPair } from './nodes/YAMLMap';
9
+ export { map as mapTag } from './schema/common/map';
10
+ export { seq as seqTag } from './schema/common/seq';
11
+ export { string as stringTag } from './schema/common/string';
12
+ export { foldFlowLines } from './stringify/foldFlowLines';
13
+ export type { FoldOptions } from './stringify/foldFlowLines';
14
+ export type { StringifyContext } from './stringify/stringify';
15
+ export { stringifyNumber } from './stringify/stringifyNumber';
16
+ export { stringifyString } from './stringify/stringifyString';
package/dist/util.js CHANGED
@@ -3,8 +3,8 @@
3
3
  var createNode = require('./doc/createNode.js');
4
4
  var log = require('./log.js');
5
5
  var Pair = require('./nodes/Pair.js');
6
- var YAMLMap = require('./nodes/YAMLMap.js');
7
6
  var toJS = require('./nodes/toJS.js');
7
+ var YAMLMap = require('./nodes/YAMLMap.js');
8
8
  var map = require('./schema/common/map.js');
9
9
  var seq = require('./schema/common/seq.js');
10
10
  var string = require('./schema/common/string.js');
@@ -18,8 +18,8 @@ exports.createNode = createNode.createNode;
18
18
  exports.debug = log.debug;
19
19
  exports.warn = log.warn;
20
20
  exports.createPair = Pair.createPair;
21
- exports.findPair = YAMLMap.findPair;
22
21
  exports.toJS = toJS.toJS;
22
+ exports.findPair = YAMLMap.findPair;
23
23
  exports.mapTag = map.map;
24
24
  exports.seqTag = seq.seq;
25
25
  exports.stringTag = string.string;
package/dist/visit.d.ts CHANGED
@@ -1,10 +1,10 @@
1
- import type { Document } from './doc/Document.js';
2
- import type { Alias } from './nodes/Alias.js';
3
- import { Node } from './nodes/Node.js';
4
- import type { Pair } from './nodes/Pair.js';
5
- import type { Scalar } from './nodes/Scalar.js';
6
- import type { YAMLMap } from './nodes/YAMLMap.js';
7
- import type { YAMLSeq } from './nodes/YAMLSeq.js';
1
+ import type { Document } from './doc/Document';
2
+ import type { Alias } from './nodes/Alias';
3
+ import type { Node } from './nodes/Node';
4
+ import type { Pair } from './nodes/Pair';
5
+ import type { Scalar } from './nodes/Scalar';
6
+ import type { YAMLMap } from './nodes/YAMLMap';
7
+ import type { YAMLSeq } from './nodes/YAMLSeq';
8
8
  export type visitorFn<T> = (key: number | 'key' | 'value' | null, node: T, path: readonly (Document | Node | Pair)[]) => void | symbol | number | Node | Pair;
9
9
  export type visitor = visitorFn<unknown> | {
10
10
  Alias?: visitorFn<Alias>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yaml",
3
- "version": "2.6.1",
3
+ "version": "2.7.1",
4
4
  "license": "ISC",
5
5
  "author": "Eemeli Aro <eemeli@gmail.com>",
6
6
  "repository": "github:eemeli/yaml",
@@ -74,7 +74,7 @@
74
74
  "@eslint/js": "^9.9.1",
75
75
  "@rollup/plugin-babel": "^6.0.3",
76
76
  "@rollup/plugin-replace": "^5.0.2",
77
- "@rollup/plugin-typescript": "^11.0.0",
77
+ "@rollup/plugin-typescript": "^12.1.1",
78
78
  "@types/jest": "^29.2.4",
79
79
  "@types/node": "^20.11.20",
80
80
  "babel-jest": "^29.0.1",
@@ -86,8 +86,8 @@
86
86
  "jest-ts-webcompat-resolver": "^1.0.0",
87
87
  "prettier": "^3.0.2",
88
88
  "rollup": "^4.12.0",
89
- "tslib": "^2.1.0",
90
- "typescript": "^5.0.3",
89
+ "tslib": "^2.8.1",
90
+ "typescript": "^5.7.2",
91
91
  "typescript-eslint": "^8.4.0"
92
92
  },
93
93
  "engines": {