projen 0.71.24 → 0.71.26

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 (243) hide show
  1. package/.jsii +3 -3
  2. package/lib/awscdk/auto-discover.js +5 -5
  3. package/lib/awscdk/awscdk-app-java.js +1 -1
  4. package/lib/awscdk/awscdk-app-py.js +1 -1
  5. package/lib/awscdk/awscdk-app-ts.js +1 -1
  6. package/lib/awscdk/awscdk-construct.js +2 -2
  7. package/lib/awscdk/awscdk-deps-java.js +1 -1
  8. package/lib/awscdk/awscdk-deps-js.js +1 -1
  9. package/lib/awscdk/awscdk-deps-py.js +1 -1
  10. package/lib/awscdk/awscdk-deps.js +1 -1
  11. package/lib/awscdk/cdk-config.js +1 -1
  12. package/lib/awscdk/cdk-tasks.js +1 -1
  13. package/lib/awscdk/integration-test.js +1 -1
  14. package/lib/awscdk/lambda-extension.js +1 -1
  15. package/lib/awscdk/lambda-function.js +2 -2
  16. package/lib/build/build-workflow.js +1 -1
  17. package/lib/cdk/auto-discover-base.js +2 -2
  18. package/lib/cdk/construct-lib.js +1 -1
  19. package/lib/cdk/integration-test-base.js +1 -1
  20. package/lib/cdk/jsii-docgen.js +1 -1
  21. package/lib/cdk/jsii-project.js +1 -1
  22. package/lib/cdk8s/auto-discover.js +2 -2
  23. package/lib/cdk8s/cdk8s-app-py.js +1 -1
  24. package/lib/cdk8s/cdk8s-app-ts.js +1 -1
  25. package/lib/cdk8s/cdk8s-construct.js +1 -1
  26. package/lib/cdk8s/cdk8s-deps-py.js +1 -1
  27. package/lib/cdk8s/cdk8s-deps.js +1 -1
  28. package/lib/cdk8s/integration-test.js +1 -1
  29. package/lib/cdktf/cdktf-construct.js +1 -1
  30. package/lib/circleci/circleci.js +1 -1
  31. package/lib/component.js +1 -1
  32. package/lib/dependencies.js +1 -1
  33. package/lib/dev-env.js +1 -1
  34. package/lib/docker-compose/docker-compose-service.js +1 -1
  35. package/lib/docker-compose/docker-compose.js +1 -1
  36. package/lib/file.js +1 -1
  37. package/lib/gitattributes.js +1 -1
  38. package/lib/github/actions-provider.js +1 -1
  39. package/lib/github/auto-approve.js +1 -1
  40. package/lib/github/auto-merge.js +1 -1
  41. package/lib/github/dependabot.js +1 -1
  42. package/lib/github/github-credentials.js +1 -1
  43. package/lib/github/github-project.js +1 -1
  44. package/lib/github/github.js +1 -1
  45. package/lib/github/mergify.js +1 -1
  46. package/lib/github/pr-template.js +1 -1
  47. package/lib/github/pull-request-lint.js +1 -1
  48. package/lib/github/stale.js +1 -1
  49. package/lib/github/task-workflow.js +1 -1
  50. package/lib/github/workflow-actions.js +1 -1
  51. package/lib/github/workflow-jobs.js +1 -1
  52. package/lib/github/workflows.js +1 -1
  53. package/lib/gitlab/configuration.js +1 -1
  54. package/lib/gitlab/gitlab-configuration.js +1 -1
  55. package/lib/gitlab/nested-configuration.js +1 -1
  56. package/lib/gitpod.js +1 -1
  57. package/lib/ignore-file.js +1 -1
  58. package/lib/ini.js +1 -1
  59. package/lib/java/java-project.js +1 -1
  60. package/lib/java/junit.js +1 -1
  61. package/lib/java/maven-compile.js +1 -1
  62. package/lib/java/maven-packaging.js +1 -1
  63. package/lib/java/maven-sample.js +1 -1
  64. package/lib/java/pom.js +1 -1
  65. package/lib/java/projenrc.js +1 -1
  66. package/lib/javascript/bundler.js +1 -1
  67. package/lib/javascript/eslint.js +1 -1
  68. package/lib/javascript/jest.js +4 -4
  69. package/lib/javascript/node-package.js +1 -1
  70. package/lib/javascript/node-project.js +1 -1
  71. package/lib/javascript/npm-config.js +1 -1
  72. package/lib/javascript/prettier.js +1 -1
  73. package/lib/javascript/projenrc.js +1 -1
  74. package/lib/javascript/typescript-config.js +1 -1
  75. package/lib/javascript/upgrade-dependencies.js +2 -2
  76. package/lib/json-patch.js +1 -1
  77. package/lib/json.js +1 -1
  78. package/lib/license.js +1 -1
  79. package/lib/logger.js +1 -1
  80. package/lib/makefile.js +1 -1
  81. package/lib/object-file.js +1 -1
  82. package/lib/project-build.js +1 -1
  83. package/lib/project.js +1 -1
  84. package/lib/projects.js +1 -1
  85. package/lib/projenrc-json.js +2 -2
  86. package/lib/projenrc.js +1 -1
  87. package/lib/python/pip.js +1 -1
  88. package/lib/python/poetry.js +2 -2
  89. package/lib/python/projenrc.js +1 -1
  90. package/lib/python/pytest-sample.js +1 -1
  91. package/lib/python/pytest.js +1 -1
  92. package/lib/python/python-project.js +1 -1
  93. package/lib/python/python-sample.js +1 -1
  94. package/lib/python/requirements-file.js +1 -1
  95. package/lib/python/setuppy.js +1 -1
  96. package/lib/python/setuptools.js +1 -1
  97. package/lib/python/venv.js +1 -1
  98. package/lib/readme.js +1 -1
  99. package/lib/release/publisher.js +1 -1
  100. package/lib/release/release-trigger.js +1 -1
  101. package/lib/release/release.js +1 -1
  102. package/lib/renovatebot.js +1 -1
  103. package/lib/run-task.js +1 -1880
  104. package/lib/sample-file.js +2 -2
  105. package/lib/semver.js +1 -1
  106. package/lib/source-code.js +1 -1
  107. package/lib/task-runtime.js +1 -1
  108. package/lib/task.js +1 -1
  109. package/lib/tasks.js +1 -1
  110. package/lib/testing.js +1 -1
  111. package/lib/textfile.js +1 -1
  112. package/lib/toml.js +1 -1
  113. package/lib/typescript/projenrc-ts.js +1 -1
  114. package/lib/typescript/projenrc.js +1 -1
  115. package/lib/typescript/typescript-typedoc.js +1 -1
  116. package/lib/typescript/typescript.js +3 -3
  117. package/lib/version.js +1 -1
  118. package/lib/vscode/devcontainer.js +1 -1
  119. package/lib/vscode/extensions.js +1 -1
  120. package/lib/vscode/launch-config.js +1 -1
  121. package/lib/vscode/settings.js +1 -1
  122. package/lib/vscode/vscode.js +1 -1
  123. package/lib/web/next.js +3 -3
  124. package/lib/web/postcss.js +1 -1
  125. package/lib/web/react.js +4 -4
  126. package/lib/web/tailwind.js +1 -1
  127. package/lib/xmlfile.js +1 -1
  128. package/lib/yaml.js +1 -1
  129. package/node_modules/xmlbuilder2/node_modules/@types/node/README.md +1 -1
  130. package/node_modules/xmlbuilder2/node_modules/@types/node/globals.d.ts +1 -1
  131. package/node_modules/xmlbuilder2/node_modules/@types/node/package.json +2 -2
  132. package/node_modules/xmlbuilder2/node_modules/@types/node/ts4.8/v8.d.ts +94 -0
  133. package/node_modules/xmlbuilder2/node_modules/@types/node/v8.d.ts +94 -0
  134. package/node_modules/yaml/README.md +1 -1
  135. package/node_modules/yaml/browser/dist/compose/compose-collection.js +1 -1
  136. package/node_modules/yaml/browser/dist/compose/compose-doc.js +2 -2
  137. package/node_modules/yaml/browser/dist/compose/compose-node.js +4 -2
  138. package/node_modules/yaml/browser/dist/compose/compose-scalar.js +6 -7
  139. package/node_modules/yaml/browser/dist/compose/composer.js +2 -3
  140. package/node_modules/yaml/browser/dist/compose/resolve-block-map.js +13 -10
  141. package/node_modules/yaml/browser/dist/compose/resolve-block-scalar.js +1 -1
  142. package/node_modules/yaml/browser/dist/compose/resolve-block-seq.js +5 -5
  143. package/node_modules/yaml/browser/dist/compose/resolve-flow-collection.js +3 -4
  144. package/node_modules/yaml/browser/dist/compose/resolve-flow-scalar.js +1 -2
  145. package/node_modules/yaml/browser/dist/compose/resolve-props.js +6 -2
  146. package/node_modules/yaml/browser/dist/compose/util-empty-scalar-position.js +1 -1
  147. package/node_modules/yaml/browser/dist/compose/util-flow-indent-check.js +1 -1
  148. package/node_modules/yaml/browser/dist/doc/Document.js +6 -6
  149. package/node_modules/yaml/browser/dist/doc/createNode.js +6 -8
  150. package/node_modules/yaml/browser/dist/errors.js +1 -1
  151. package/node_modules/yaml/browser/dist/nodes/Collection.js +2 -1
  152. package/node_modules/yaml/browser/dist/nodes/Pair.js +2 -2
  153. package/node_modules/yaml/browser/dist/nodes/Scalar.js +1 -1
  154. package/node_modules/yaml/browser/dist/nodes/YAMLMap.js +9 -10
  155. package/node_modules/yaml/browser/dist/nodes/YAMLSeq.js +4 -12
  156. package/node_modules/yaml/browser/dist/nodes/addPairToJSMap.js +1 -1
  157. package/node_modules/yaml/browser/dist/nodes/toJS.js +1 -1
  158. package/node_modules/yaml/browser/dist/parse/cst-scalar.js +1 -2
  159. package/node_modules/yaml/browser/dist/parse/cst-visit.js +2 -2
  160. package/node_modules/yaml/browser/dist/parse/lexer.js +1 -2
  161. package/node_modules/yaml/browser/dist/parse/parser.js +24 -26
  162. package/node_modules/yaml/browser/dist/public-api.js +3 -4
  163. package/node_modules/yaml/browser/dist/schema/Schema.js +1 -1
  164. package/node_modules/yaml/browser/dist/schema/yaml-1.1/omap.js +1 -1
  165. package/node_modules/yaml/browser/dist/schema/yaml-1.1/pairs.js +1 -2
  166. package/node_modules/yaml/browser/dist/schema/yaml-1.1/set.js +6 -1
  167. package/node_modules/yaml/browser/dist/stringify/stringify.js +8 -8
  168. package/node_modules/yaml/browser/dist/stringify/stringifyCollection.js +4 -5
  169. package/node_modules/yaml/browser/dist/stringify/stringifyDocument.js +1 -2
  170. package/node_modules/yaml/browser/dist/stringify/stringifyPair.js +45 -20
  171. package/node_modules/yaml/browser/dist/stringify/stringifyString.js +17 -12
  172. package/node_modules/yaml/browser/dist/visit.js +5 -6
  173. package/node_modules/yaml/dist/compose/compose-collection.js +1 -1
  174. package/node_modules/yaml/dist/compose/compose-doc.js +2 -2
  175. package/node_modules/yaml/dist/compose/compose-node.d.ts +3 -2
  176. package/node_modules/yaml/dist/compose/compose-node.js +4 -2
  177. package/node_modules/yaml/dist/compose/compose-scalar.js +6 -7
  178. package/node_modules/yaml/dist/compose/composer.d.ts +2 -2
  179. package/node_modules/yaml/dist/compose/composer.js +2 -3
  180. package/node_modules/yaml/dist/compose/resolve-block-map.js +13 -10
  181. package/node_modules/yaml/dist/compose/resolve-block-scalar.js +1 -1
  182. package/node_modules/yaml/dist/compose/resolve-block-seq.js +5 -5
  183. package/node_modules/yaml/dist/compose/resolve-flow-collection.js +3 -4
  184. package/node_modules/yaml/dist/compose/resolve-flow-scalar.js +1 -2
  185. package/node_modules/yaml/dist/compose/resolve-props.d.ts +1 -0
  186. package/node_modules/yaml/dist/compose/resolve-props.js +6 -2
  187. package/node_modules/yaml/dist/compose/util-empty-scalar-position.js +1 -1
  188. package/node_modules/yaml/dist/compose/util-flow-indent-check.js +1 -1
  189. package/node_modules/yaml/dist/doc/Document.d.ts +11 -11
  190. package/node_modules/yaml/dist/doc/Document.js +6 -6
  191. package/node_modules/yaml/dist/doc/anchors.d.ts +1 -1
  192. package/node_modules/yaml/dist/doc/applyReviver.d.ts +1 -1
  193. package/node_modules/yaml/dist/doc/createNode.js +6 -8
  194. package/node_modules/yaml/dist/errors.d.ts +2 -2
  195. package/node_modules/yaml/dist/errors.js +1 -1
  196. package/node_modules/yaml/dist/index.d.ts +2 -0
  197. package/node_modules/yaml/dist/log.d.ts +1 -1
  198. package/node_modules/yaml/dist/nodes/Alias.d.ts +1 -1
  199. package/node_modules/yaml/dist/nodes/Collection.d.ts +2 -2
  200. package/node_modules/yaml/dist/nodes/Collection.js +2 -1
  201. package/node_modules/yaml/dist/nodes/Node.d.ts +17 -11
  202. package/node_modules/yaml/dist/nodes/Pair.d.ts +1 -1
  203. package/node_modules/yaml/dist/nodes/Pair.js +2 -2
  204. package/node_modules/yaml/dist/nodes/Scalar.js +1 -1
  205. package/node_modules/yaml/dist/nodes/YAMLMap.d.ts +8 -4
  206. package/node_modules/yaml/dist/nodes/YAMLMap.js +9 -10
  207. package/node_modules/yaml/dist/nodes/YAMLSeq.d.ts +4 -1
  208. package/node_modules/yaml/dist/nodes/YAMLSeq.js +4 -12
  209. package/node_modules/yaml/dist/nodes/addPairToJSMap.d.ts +2 -1
  210. package/node_modules/yaml/dist/nodes/addPairToJSMap.js +1 -1
  211. package/node_modules/yaml/dist/nodes/toJS.js +1 -1
  212. package/node_modules/yaml/dist/options.d.ts +15 -7
  213. package/node_modules/yaml/dist/parse/cst-scalar.js +1 -2
  214. package/node_modules/yaml/dist/parse/cst-visit.d.ts +2 -2
  215. package/node_modules/yaml/dist/parse/cst-visit.js +2 -2
  216. package/node_modules/yaml/dist/parse/cst.d.ts +3 -3
  217. package/node_modules/yaml/dist/parse/lexer.js +1 -2
  218. package/node_modules/yaml/dist/parse/parser.js +24 -26
  219. package/node_modules/yaml/dist/public-api.js +3 -4
  220. package/node_modules/yaml/dist/schema/Schema.d.ts +3 -3
  221. package/node_modules/yaml/dist/schema/Schema.js +1 -1
  222. package/node_modules/yaml/dist/schema/json-schema.d.ts +69 -0
  223. package/node_modules/yaml/dist/schema/tags.d.ts +2 -2
  224. package/node_modules/yaml/dist/schema/types.d.ts +1 -1
  225. package/node_modules/yaml/dist/schema/yaml-1.1/omap.d.ts +7 -3
  226. package/node_modules/yaml/dist/schema/yaml-1.1/omap.js +1 -1
  227. package/node_modules/yaml/dist/schema/yaml-1.1/pairs.js +1 -2
  228. package/node_modules/yaml/dist/schema/yaml-1.1/set.d.ts +6 -2
  229. package/node_modules/yaml/dist/schema/yaml-1.1/set.js +6 -1
  230. package/node_modules/yaml/dist/stringify/foldFlowLines.d.ts +1 -1
  231. package/node_modules/yaml/dist/stringify/stringify.d.ts +2 -1
  232. package/node_modules/yaml/dist/stringify/stringify.js +8 -8
  233. package/node_modules/yaml/dist/stringify/stringifyCollection.js +4 -5
  234. package/node_modules/yaml/dist/stringify/stringifyDocument.js +1 -2
  235. package/node_modules/yaml/dist/stringify/stringifyPair.js +45 -20
  236. package/node_modules/yaml/dist/stringify/stringifyString.d.ts +7 -1
  237. package/node_modules/yaml/dist/stringify/stringifyString.js +17 -12
  238. package/node_modules/yaml/dist/test-events.js +2 -3
  239. package/node_modules/yaml/dist/visit.d.ts +4 -4
  240. package/node_modules/yaml/dist/visit.js +5 -6
  241. package/node_modules/yaml/package.json +11 -11
  242. package/package.json +2 -2
  243. package/node_modules/yaml/dist/node_modules/tslib/tslib.es6.js +0 -76
package/lib/xmlfile.js CHANGED
@@ -31,6 +31,6 @@ class XmlFile extends object_file_1.ObjectFile {
31
31
  }
32
32
  }
33
33
  _a = JSII_RTTI_SYMBOL_1;
34
- XmlFile[_a] = { fqn: "projen.XmlFile", version: "0.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W5lZCB7XG4gICAgY29uc3Qgb2JqID0gc3VwZXIuc3ludGhlc2l6ZUNvbnRlbnQocmVzb2x2ZXIpO1xuICAgIGlmICghb2JqKSB7XG4gICAgICByZXR1cm4gdW5kZWZpbmVkO1xuICAgIH1cblxuICAgIGNvbnN0IHhtbFN0cmluZyA9IGNyZWF0ZXhtbCh7IGVuY29kaW5nOiBcIlVURi04XCIgfSwgb2JqKS5lbmQoe1xuICAgICAgcHJldHR5UHJpbnQ6IHRydWUsXG4gICAgICBpbmRlbnQ6IFwiIFwiLnJlcGVhdCg0KSxcbiAgICB9KTtcblxuICAgIHJldHVybiBbXG4gICAgICB4bWxTdHJpbmcsXG4gICAgICAuLi4odGhpcy5tYXJrZXIgPyBbYDwhLS0gJHt0aGlzLm1hcmtlcn0gLS0+YF0gOiBbXSksXG4gICAgXS5qb2luKFwiXFxuXCIpO1xuICB9XG59XG4iXX0=
package/lib/yaml.js CHANGED
@@ -29,6 +29,6 @@ class YamlFile extends object_file_1.ObjectFile {
29
29
  }
30
30
  }
31
31
  _a = JSII_RTTI_SYMBOL_1;
32
- YamlFile[_a] = { fqn: "projen.YamlFile", version: "0.71.24" };
32
+ YamlFile[_a] = { fqn: "projen.YamlFile", version: "0.71.26" };
33
33
  exports.YamlFile = YamlFile;
34
34
  //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoieWFtbC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy95YW1sLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7O0FBQUEsNkJBQTZCO0FBRTdCLCtDQUE4RDtBQWU5RDs7R0FFRztBQUNILE1BQWEsUUFBUyxTQUFRLHdCQUFVO0lBTXRDLFlBQVksT0FBZ0IsRUFBRSxRQUFnQixFQUFFLE9BQXdCO1FBQ3RFLEtBQUssQ0FBQyxPQUFPLEVBQUUsUUFBUSxFQUFFLE9BQU8sQ0FBQyxDQUFD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pbmVXaWR0aDogdGhpcy5saW5lV2lkdGgsXG4gICAgICB9KSxcbiAgICBdLmpvaW4oXCJcXG5cIik7XG4gIH1cbn1cbiJdfQ==
@@ -8,7 +8,7 @@ This package contains type definitions for Node.js (https://nodejs.org/).
8
8
  Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node.
9
9
 
10
10
  ### Additional Details
11
- * Last updated: Sun, 23 Apr 2023 05:02:41 GMT
11
+ * Last updated: Tue, 25 Apr 2023 21:32:47 GMT
12
12
  * Dependencies: none
13
13
  * Global values: `AbortController`, `AbortSignal`, `__dirname`, `__filename`, `console`, `exports`, `gc`, `global`, `module`, `process`, `require`, `structuredClone`
14
14
 
@@ -159,7 +159,7 @@ declare namespace NodeJS {
159
159
  /**
160
160
  * Name of the script [if this function was defined in a script]
161
161
  */
162
- getFileName(): string | null;
162
+ getFileName(): string | undefined;
163
163
 
164
164
  /**
165
165
  * Current line number [if this function was defined in a script]
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/node",
3
- "version": "18.16.0",
3
+ "version": "18.16.1",
4
4
  "description": "TypeScript definitions for Node.js",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
6
6
  "license": "MIT",
@@ -232,6 +232,6 @@
232
232
  },
233
233
  "scripts": {},
234
234
  "dependencies": {},
235
- "typesPublisherContentHash": "a33ada7d817296d3a0955f57b75fdf38201a158b99b66db3bb81316dfddd470b",
235
+ "typesPublisherContentHash": "d3663b78bd3d78e553ddfd126c148f35e1fe8e6b19795a15ed31c5fed7562192",
236
236
  "typeScriptVersion": "4.3"
237
237
  }
@@ -441,6 +441,100 @@ declare module 'v8' {
441
441
  spaceAvailableSize: number;
442
442
  physicalSpaceSize: number;
443
443
  }
444
+ /**
445
+ * Called when a promise is constructed. This does not mean that corresponding before/after events will occur, only that the possibility exists. This will
446
+ * happen if a promise is created without ever getting a continuation.
447
+ * @since v17.1.0, v16.14.0
448
+ * @param promise The promise being created.
449
+ * @param parent The promise continued from, if applicable.
450
+ */
451
+ interface Init {
452
+ (promise: Promise<unknown>, parent: Promise<unknown>): void;
453
+ }
454
+ /**
455
+ * Called before a promise continuation executes. This can be in the form of `then()`, `catch()`, or `finally()` handlers or an await resuming.
456
+ *
457
+ * The before callback will be called 0 to N times. The before callback will typically be called 0 times if no continuation was ever made for the promise.
458
+ * The before callback may be called many times in the case where many continuations have been made from the same promise.
459
+ * @since v17.1.0, v16.14.0
460
+ */
461
+ interface Before {
462
+ (promise: Promise<unknown>): void;
463
+ }
464
+ /**
465
+ * Called immediately after a promise continuation executes. This may be after a `then()`, `catch()`, or `finally()` handler or before an await after another await.
466
+ * @since v17.1.0, v16.14.0
467
+ */
468
+ interface After {
469
+ (promise: Promise<unknown>): void;
470
+ }
471
+ /**
472
+ * Called when the promise receives a resolution or rejection value. This may occur synchronously in the case of {@link Promise.resolve()} or
473
+ * {@link Promise.reject()}.
474
+ * @since v17.1.0, v16.14.0
475
+ */
476
+ interface Settled {
477
+ (promise: Promise<unknown>): void;
478
+ }
479
+ /**
480
+ * Key events in the lifetime of a promise have been categorized into four areas: creation of a promise, before/after a continuation handler is called or
481
+ * around an await, and when the promise resolves or rejects.
482
+ *
483
+ * Because promises are asynchronous resources whose lifecycle is tracked via the promise hooks mechanism, the `init()`, `before()`, `after()`, and
484
+ * `settled()` callbacks must not be async functions as they create more promises which would produce an infinite loop.
485
+ * @since v17.1.0, v16.14.0
486
+ */
487
+ interface HookCallbacks {
488
+ init?: Init;
489
+ before?: Before;
490
+ after?: After;
491
+ settled?: Settled;
492
+ }
493
+ interface PromiseHooks {
494
+ /**
495
+ * The `init` hook must be a plain function. Providing an async function will throw as it would produce an infinite microtask loop.
496
+ * @since v17.1.0, v16.14.0
497
+ * @param init The {@link Init | `init` callback} to call when a promise is created.
498
+ * @return Call to stop the hook.
499
+ */
500
+ onInit: (init: Init) => Function;
501
+ /**
502
+ * The `settled` hook must be a plain function. Providing an async function will throw as it would produce an infinite microtask loop.
503
+ * @since v17.1.0, v16.14.0
504
+ * @param settled The {@link Settled | `settled` callback} to call when a promise is created.
505
+ * @return Call to stop the hook.
506
+ */
507
+ onSettled: (settled: Settled) => Function;
508
+ /**
509
+ * The `before` hook must be a plain function. Providing an async function will throw as it would produce an infinite microtask loop.
510
+ * @since v17.1.0, v16.14.0
511
+ * @param before The {@link Before | `before` callback} to call before a promise continuation executes.
512
+ * @return Call to stop the hook.
513
+ */
514
+ onBefore: (before: Before) => Function;
515
+ /**
516
+ * The `after` hook must be a plain function. Providing an async function will throw as it would produce an infinite microtask loop.
517
+ * @since v17.1.0, v16.14.0
518
+ * @param after The {@link After | `after` callback} to call after a promise continuation executes.
519
+ * @return Call to stop the hook.
520
+ */
521
+ onAfter: (after: After) => Function;
522
+ /**
523
+ * Registers functions to be called for different lifetime events of each promise.
524
+ * The callbacks `init()`/`before()`/`after()`/`settled()` are called for the respective events during a promise's lifetime.
525
+ * All callbacks are optional. For example, if only promise creation needs to be tracked, then only the init callback needs to be passed.
526
+ * The hook callbacks must be plain functions. Providing async functions will throw as it would produce an infinite microtask loop.
527
+ * @since v17.1.0, v16.14.0
528
+ * @param callbacks The {@link HookCallbacks | Hook Callbacks} to register
529
+ * @return Used for disabling hooks
530
+ */
531
+ createHook: (callbacks: HookCallbacks) => Function;
532
+ }
533
+ /**
534
+ * The `promiseHooks` interface can be used to track promise lifecycle events.
535
+ * @since v17.1.0, v16.14.0
536
+ */
537
+ const promiseHooks: PromiseHooks;
444
538
  }
445
539
  declare module 'node:v8' {
446
540
  export * from 'v8';
@@ -441,6 +441,100 @@ declare module 'v8' {
441
441
  spaceAvailableSize: number;
442
442
  physicalSpaceSize: number;
443
443
  }
444
+ /**
445
+ * Called when a promise is constructed. This does not mean that corresponding before/after events will occur, only that the possibility exists. This will
446
+ * happen if a promise is created without ever getting a continuation.
447
+ * @since v17.1.0, v16.14.0
448
+ * @param promise The promise being created.
449
+ * @param parent The promise continued from, if applicable.
450
+ */
451
+ interface Init {
452
+ (promise: Promise<unknown>, parent: Promise<unknown>): void;
453
+ }
454
+ /**
455
+ * Called before a promise continuation executes. This can be in the form of `then()`, `catch()`, or `finally()` handlers or an await resuming.
456
+ *
457
+ * The before callback will be called 0 to N times. The before callback will typically be called 0 times if no continuation was ever made for the promise.
458
+ * The before callback may be called many times in the case where many continuations have been made from the same promise.
459
+ * @since v17.1.0, v16.14.0
460
+ */
461
+ interface Before {
462
+ (promise: Promise<unknown>): void;
463
+ }
464
+ /**
465
+ * Called immediately after a promise continuation executes. This may be after a `then()`, `catch()`, or `finally()` handler or before an await after another await.
466
+ * @since v17.1.0, v16.14.0
467
+ */
468
+ interface After {
469
+ (promise: Promise<unknown>): void;
470
+ }
471
+ /**
472
+ * Called when the promise receives a resolution or rejection value. This may occur synchronously in the case of {@link Promise.resolve()} or
473
+ * {@link Promise.reject()}.
474
+ * @since v17.1.0, v16.14.0
475
+ */
476
+ interface Settled {
477
+ (promise: Promise<unknown>): void;
478
+ }
479
+ /**
480
+ * Key events in the lifetime of a promise have been categorized into four areas: creation of a promise, before/after a continuation handler is called or
481
+ * around an await, and when the promise resolves or rejects.
482
+ *
483
+ * Because promises are asynchronous resources whose lifecycle is tracked via the promise hooks mechanism, the `init()`, `before()`, `after()`, and
484
+ * `settled()` callbacks must not be async functions as they create more promises which would produce an infinite loop.
485
+ * @since v17.1.0, v16.14.0
486
+ */
487
+ interface HookCallbacks {
488
+ init?: Init;
489
+ before?: Before;
490
+ after?: After;
491
+ settled?: Settled;
492
+ }
493
+ interface PromiseHooks {
494
+ /**
495
+ * The `init` hook must be a plain function. Providing an async function will throw as it would produce an infinite microtask loop.
496
+ * @since v17.1.0, v16.14.0
497
+ * @param init The {@link Init | `init` callback} to call when a promise is created.
498
+ * @return Call to stop the hook.
499
+ */
500
+ onInit: (init: Init) => Function;
501
+ /**
502
+ * The `settled` hook must be a plain function. Providing an async function will throw as it would produce an infinite microtask loop.
503
+ * @since v17.1.0, v16.14.0
504
+ * @param settled The {@link Settled | `settled` callback} to call when a promise is created.
505
+ * @return Call to stop the hook.
506
+ */
507
+ onSettled: (settled: Settled) => Function;
508
+ /**
509
+ * The `before` hook must be a plain function. Providing an async function will throw as it would produce an infinite microtask loop.
510
+ * @since v17.1.0, v16.14.0
511
+ * @param before The {@link Before | `before` callback} to call before a promise continuation executes.
512
+ * @return Call to stop the hook.
513
+ */
514
+ onBefore: (before: Before) => Function;
515
+ /**
516
+ * The `after` hook must be a plain function. Providing an async function will throw as it would produce an infinite microtask loop.
517
+ * @since v17.1.0, v16.14.0
518
+ * @param after The {@link After | `after` callback} to call after a promise continuation executes.
519
+ * @return Call to stop the hook.
520
+ */
521
+ onAfter: (after: After) => Function;
522
+ /**
523
+ * Registers functions to be called for different lifetime events of each promise.
524
+ * The callbacks `init()`/`before()`/`after()`/`settled()` are called for the respective events during a promise's lifetime.
525
+ * All callbacks are optional. For example, if only promise creation needs to be tracked, then only the init callback needs to be passed.
526
+ * The hook callbacks must be plain functions. Providing async functions will throw as it would produce an infinite microtask loop.
527
+ * @since v17.1.0, v16.14.0
528
+ * @param callbacks The {@link HookCallbacks | Hook Callbacks} to register
529
+ * @return Used for disabling hooks
530
+ */
531
+ createHook: (callbacks: HookCallbacks) => Function;
532
+ }
533
+ /**
534
+ * The `promiseHooks` interface can be used to track promise lifecycle events.
535
+ * @since v17.1.0, v16.14.0
536
+ */
537
+ const promiseHooks: PromiseHooks;
444
538
  }
445
539
  declare module 'node:v8' {
446
540
  export * from 'v8';
@@ -1,6 +1,6 @@
1
1
  # YAML <a href="https://www.npmjs.com/package/yaml"><img align="right" src="https://badge.fury.io/js/yaml.svg" title="npm package" /></a>
2
2
 
3
- `yaml` is a definitive library for [YAML](http://yaml.org/), the human friendly data serialization standard.
3
+ `yaml` is a definitive library for [YAML](https://yaml.org/), the human friendly data serialization standard.
4
4
  This library:
5
5
 
6
6
  - Supports both YAML 1.1 and YAML 1.2 and all common data schemas,
@@ -51,7 +51,7 @@ function composeCollection(CN, ctx, token, tagToken, onError) {
51
51
  : new Scalar(res);
52
52
  node.range = coll.range;
53
53
  node.tag = tagName;
54
- if (tag === null || tag === void 0 ? void 0 : tag.format)
54
+ if (tag?.format)
55
55
  node.format = tag.format;
56
56
  return node;
57
57
  }
@@ -4,7 +4,7 @@ import { resolveEnd } from './resolve-end.js';
4
4
  import { resolveProps } from './resolve-props.js';
5
5
 
6
6
  function composeDoc(options, directives, { offset, start, value, end }, onError) {
7
- const opts = Object.assign({ directives }, options);
7
+ const opts = Object.assign({ _directives: directives }, options);
8
8
  const doc = new Document(undefined, opts);
9
9
  const ctx = {
10
10
  atRoot: true,
@@ -14,7 +14,7 @@ function composeDoc(options, directives, { offset, start, value, end }, onError)
14
14
  };
15
15
  const props = resolveProps(start, {
16
16
  indicator: 'doc-start',
17
- next: value !== null && value !== void 0 ? value : end === null || end === void 0 ? void 0 : end[0],
17
+ next: value ?? end?.[0],
18
18
  offset,
19
19
  onError,
20
20
  startOnNewline: true
@@ -54,7 +54,7 @@ function composeNode(ctx, token, props, onError) {
54
54
  node.srcToken = token;
55
55
  return node;
56
56
  }
57
- function composeEmptyNode(ctx, offset, before, pos, { spaceBefore, comment, anchor, tag }, onError) {
57
+ function composeEmptyNode(ctx, offset, before, pos, { spaceBefore, comment, anchor, tag, end }, onError) {
58
58
  const token = {
59
59
  type: 'scalar',
60
60
  offset: emptyScalarPosition(offset, before, pos),
@@ -69,8 +69,10 @@ function composeEmptyNode(ctx, offset, before, pos, { spaceBefore, comment, anch
69
69
  }
70
70
  if (spaceBefore)
71
71
  node.spaceBefore = true;
72
- if (comment)
72
+ if (comment) {
73
73
  node.comment = comment;
74
+ node.range[2] = end;
75
+ }
74
76
  return node;
75
77
  }
76
78
  function composeAlias({ options }, { offset, source, end }, onError) {
@@ -17,12 +17,12 @@ function composeScalar(ctx, token, tagToken, onError) {
17
17
  : ctx.schema[SCALAR];
18
18
  let scalar;
19
19
  try {
20
- const res = tag.resolve(value, msg => onError(tagToken !== null && tagToken !== void 0 ? tagToken : token, 'TAG_RESOLVE_FAILED', msg), ctx.options);
20
+ const res = tag.resolve(value, msg => onError(tagToken ?? token, 'TAG_RESOLVE_FAILED', msg), ctx.options);
21
21
  scalar = isScalar(res) ? res : new Scalar(res);
22
22
  }
23
23
  catch (error) {
24
24
  const msg = error instanceof Error ? error.message : String(error);
25
- onError(tagToken !== null && tagToken !== void 0 ? tagToken : token, 'TAG_RESOLVE_FAILED', msg);
25
+ onError(tagToken ?? token, 'TAG_RESOLVE_FAILED', msg);
26
26
  scalar = new Scalar(value);
27
27
  }
28
28
  scalar.range = range;
@@ -38,7 +38,6 @@ function composeScalar(ctx, token, tagToken, onError) {
38
38
  return scalar;
39
39
  }
40
40
  function findScalarTagByName(schema, value, tagName, tagToken, onError) {
41
- var _a;
42
41
  if (tagName === '!')
43
42
  return schema[SCALAR]; // non-specific tag
44
43
  const matchWithTest = [];
@@ -51,7 +50,7 @@ function findScalarTagByName(schema, value, tagName, tagToken, onError) {
51
50
  }
52
51
  }
53
52
  for (const tag of matchWithTest)
54
- if ((_a = tag.test) === null || _a === void 0 ? void 0 : _a.test(value))
53
+ if (tag.test?.test(value))
55
54
  return tag;
56
55
  const kt = schema.knownTags[tagName];
57
56
  if (kt && !kt.collection) {
@@ -64,10 +63,10 @@ function findScalarTagByName(schema, value, tagName, tagToken, onError) {
64
63
  return schema[SCALAR];
65
64
  }
66
65
  function findScalarTagByTest({ directives, schema }, value, token, onError) {
67
- var _a;
68
- const tag = schema.tags.find(tag => { var _a; return tag.default && ((_a = tag.test) === null || _a === void 0 ? void 0 : _a.test(value)); }) || schema[SCALAR];
66
+ const tag = schema.tags.find(tag => tag.default && tag.test?.test(value)) || schema[SCALAR];
69
67
  if (schema.compat) {
70
- const compat = (_a = schema.compat.find(tag => { var _a; return tag.default && ((_a = tag.test) === null || _a === void 0 ? void 0 : _a.test(value)); })) !== null && _a !== void 0 ? _a : schema[SCALAR];
68
+ const compat = schema.compat.find(tag => tag.default && tag.test?.test(value)) ??
69
+ schema[SCALAR];
71
70
  if (tag.tag !== compat.tag) {
72
71
  const ts = directives.tagString(tag.tag);
73
72
  const cs = directives.tagString(compat.tag);
@@ -14,7 +14,6 @@ function getErrorPos(src) {
14
14
  return [offset, offset + (typeof source === 'string' ? source.length : 1)];
15
15
  }
16
16
  function parsePrelude(prelude) {
17
- var _a;
18
17
  let comment = '';
19
18
  let atComment = false;
20
19
  let afterEmptyLine = false;
@@ -29,7 +28,7 @@ function parsePrelude(prelude) {
29
28
  afterEmptyLine = false;
30
29
  break;
31
30
  case '%':
32
- if (((_a = prelude[i + 1]) === null || _a === void 0 ? void 0 : _a[0]) !== '#')
31
+ if (prelude[i + 1]?.[0] !== '#')
33
32
  i += 1;
34
33
  atComment = false;
35
34
  break;
@@ -204,7 +203,7 @@ class Composer {
204
203
  this.doc = null;
205
204
  }
206
205
  else if (forceDoc) {
207
- const opts = Object.assign({ directives: this.directives }, this.options);
206
+ const opts = Object.assign({ _directives: this.directives }, this.options);
208
207
  const doc = new Document(undefined, opts);
209
208
  if (this.atDirectives)
210
209
  this.onError(endOffset, 'MISSING_CHAR', 'Missing directives-end indicator line');
@@ -7,17 +7,17 @@ import { mapIncludes } from './util-map-includes.js';
7
7
 
8
8
  const startColMsg = 'All mapping items must start at the same column';
9
9
  function resolveBlockMap({ composeNode, composeEmptyNode }, ctx, bm, onError) {
10
- var _a;
11
10
  const map = new YAMLMap(ctx.schema);
12
11
  if (ctx.atRoot)
13
12
  ctx.atRoot = false;
14
13
  let offset = bm.offset;
14
+ let commentEnd = null;
15
15
  for (const collItem of bm.items) {
16
16
  const { start, key, sep, value } = collItem;
17
17
  // key properties
18
18
  const keyProps = resolveProps(start, {
19
19
  indicator: 'explicit-key-ind',
20
- next: key !== null && key !== void 0 ? key : sep === null || sep === void 0 ? void 0 : sep[0],
20
+ next: key ?? sep?.[0],
21
21
  offset,
22
22
  onError,
23
23
  startOnNewline: true
@@ -31,7 +31,7 @@ function resolveBlockMap({ composeNode, composeEmptyNode }, ctx, bm, onError) {
31
31
  onError(offset, 'BAD_INDENT', startColMsg);
32
32
  }
33
33
  if (!keyProps.anchor && !keyProps.tag && !sep) {
34
- // TODO: assert being at last item?
34
+ commentEnd = keyProps.end;
35
35
  if (keyProps.comment) {
36
36
  if (map.comment)
37
37
  map.comment += '\n' + keyProps.comment;
@@ -40,12 +40,13 @@ function resolveBlockMap({ composeNode, composeEmptyNode }, ctx, bm, onError) {
40
40
  }
41
41
  continue;
42
42
  }
43
+ if (keyProps.hasNewlineAfterProp || containsNewline(key)) {
44
+ onError(key ?? start[start.length - 1], 'MULTILINE_IMPLICIT_KEY', 'Implicit keys need to be on a single line');
45
+ }
43
46
  }
44
- else if (((_a = keyProps.found) === null || _a === void 0 ? void 0 : _a.indent) !== bm.indent)
47
+ else if (keyProps.found?.indent !== bm.indent) {
45
48
  onError(offset, 'BAD_INDENT', startColMsg);
46
- if (implicitKey && containsNewline(key))
47
- onError(key, // checked by containsNewline()
48
- 'MULTILINE_IMPLICIT_KEY', 'Implicit keys need to be on a single line');
49
+ }
49
50
  // key value
50
51
  const keyStart = keyProps.end;
51
52
  const keyNode = key
@@ -56,7 +57,7 @@ function resolveBlockMap({ composeNode, composeEmptyNode }, ctx, bm, onError) {
56
57
  if (mapIncludes(ctx, map.items, keyNode))
57
58
  onError(keyStart, 'DUPLICATE_KEY', 'Map keys must be unique');
58
59
  // value properties
59
- const valueProps = resolveProps(sep !== null && sep !== void 0 ? sep : [], {
60
+ const valueProps = resolveProps(sep ?? [], {
60
61
  indicator: 'map-value-ind',
61
62
  next: value,
62
63
  offset: keyNode.range[2],
@@ -66,7 +67,7 @@ function resolveBlockMap({ composeNode, composeEmptyNode }, ctx, bm, onError) {
66
67
  offset = valueProps.end;
67
68
  if (valueProps.found) {
68
69
  if (implicitKey) {
69
- if ((value === null || value === void 0 ? void 0 : value.type) === 'block-map' && !valueProps.hasNewline)
70
+ if (value?.type === 'block-map' && !valueProps.hasNewline)
70
71
  onError(offset, 'BLOCK_AS_IMPLICIT_KEY', 'Nested mappings are not allowed in compact mappings');
71
72
  if (ctx.options.strict &&
72
73
  keyProps.start < valueProps.found.offset - 1024)
@@ -100,7 +101,9 @@ function resolveBlockMap({ composeNode, composeEmptyNode }, ctx, bm, onError) {
100
101
  map.items.push(pair);
101
102
  }
102
103
  }
103
- map.range = [bm.offset, offset, offset];
104
+ if (commentEnd && commentEnd < offset)
105
+ onError(commentEnd, 'IMPOSSIBLE', 'Map comment with trailing content');
106
+ map.range = [bm.offset, offset, commentEnd ?? offset];
104
107
  return map;
105
108
  }
106
109
 
@@ -182,7 +182,7 @@ function splitLines(source) {
182
182
  const split = source.split(/\n( *)/);
183
183
  const first = split[0];
184
184
  const m = first.match(/^( *)/);
185
- const line0 = (m === null || m === void 0 ? void 0 : m[1])
185
+ const line0 = m?.[1]
186
186
  ? [m[1], first.slice(m[1].length)]
187
187
  : ['', first];
188
188
  const lines = [line0];
@@ -7,6 +7,7 @@ function resolveBlockSeq({ composeNode, composeEmptyNode }, ctx, bs, onError) {
7
7
  if (ctx.atRoot)
8
8
  ctx.atRoot = false;
9
9
  let offset = bs.offset;
10
+ let commentEnd = null;
10
11
  for (const { start, value } of bs.items) {
11
12
  const props = resolveProps(start, {
12
13
  indicator: 'seq-item-ind',
@@ -15,16 +16,15 @@ function resolveBlockSeq({ composeNode, composeEmptyNode }, ctx, bs, onError) {
15
16
  onError,
16
17
  startOnNewline: true
17
18
  });
18
- offset = props.end;
19
19
  if (!props.found) {
20
20
  if (props.anchor || props.tag || value) {
21
21
  if (value && value.type === 'block-seq')
22
- onError(offset, 'BAD_INDENT', 'All sequence items must start at the same column');
22
+ onError(props.end, 'BAD_INDENT', 'All sequence items must start at the same column');
23
23
  else
24
24
  onError(offset, 'MISSING_CHAR', 'Sequence item without - indicator');
25
25
  }
26
26
  else {
27
- // TODO: assert being at last item?
27
+ commentEnd = props.end;
28
28
  if (props.comment)
29
29
  seq.comment = props.comment;
30
30
  continue;
@@ -32,13 +32,13 @@ function resolveBlockSeq({ composeNode, composeEmptyNode }, ctx, bs, onError) {
32
32
  }
33
33
  const node = value
34
34
  ? composeNode(ctx, value, props, onError)
35
- : composeEmptyNode(ctx, offset, start, null, props, onError);
35
+ : composeEmptyNode(ctx, props.end, start, null, props, onError);
36
36
  if (ctx.schema.compat)
37
37
  flowIndentCheck(bs.indent, value, onError);
38
38
  offset = node.range[2];
39
39
  seq.items.push(node);
40
40
  }
41
- seq.range = [bs.offset, offset, offset];
41
+ seq.range = [bs.offset, offset, commentEnd ?? offset];
42
42
  return seq;
43
43
  }
44
44
 
@@ -10,7 +10,6 @@ import { mapIncludes } from './util-map-includes.js';
10
10
  const blockMsg = 'Block collections are not allowed within flow collections';
11
11
  const isBlock = (token) => token && (token.type === 'block-map' || token.type === 'block-seq');
12
12
  function resolveFlowCollection({ composeNode, composeEmptyNode }, ctx, fc, onError) {
13
- var _a;
14
13
  const isMap = fc.start.source === '{';
15
14
  const fcName = isMap ? 'flow map' : 'flow sequence';
16
15
  const coll = isMap
@@ -27,7 +26,7 @@ function resolveFlowCollection({ composeNode, composeEmptyNode }, ctx, fc, onErr
27
26
  const props = resolveProps(start, {
28
27
  flow: fcName,
29
28
  indicator: 'explicit-key-ind',
30
- next: key !== null && key !== void 0 ? key : sep === null || sep === void 0 ? void 0 : sep[0],
29
+ next: key ?? sep?.[0],
31
30
  offset,
32
31
  onError,
33
32
  startOnNewline: false
@@ -75,7 +74,7 @@ function resolveFlowCollection({ composeNode, composeEmptyNode }, ctx, fc, onErr
75
74
  if (prevItemComment) {
76
75
  let prev = coll.items[coll.items.length - 1];
77
76
  if (isPair(prev))
78
- prev = (_a = prev.value) !== null && _a !== void 0 ? _a : prev.key;
77
+ prev = prev.value ?? prev.key;
79
78
  if (prev.comment)
80
79
  prev.comment += '\n' + prevItemComment;
81
80
  else
@@ -105,7 +104,7 @@ function resolveFlowCollection({ composeNode, composeEmptyNode }, ctx, fc, onErr
105
104
  if (isBlock(key))
106
105
  onError(keyNode.range, 'BLOCK_IN_FLOW', blockMsg);
107
106
  // value properties
108
- const valueProps = resolveProps(sep !== null && sep !== void 0 ? sep : [], {
107
+ const valueProps = resolveProps(sep ?? [], {
109
108
  flow: fcName,
110
109
  indicator: 'map-value-ind',
111
110
  next: value,
@@ -72,7 +72,6 @@ function singleQuotedValue(source, onError) {
72
72
  return foldLines(source.slice(1, -1)).replace(/''/g, "'");
73
73
  }
74
74
  function foldLines(source) {
75
- var _a;
76
75
  /**
77
76
  * The negative lookbehind here and in the `re` RegExp is to
78
77
  * prevent causing a polynomial search time in certain cases.
@@ -112,7 +111,7 @@ function foldLines(source) {
112
111
  const last = /[ \t]*(.*)/sy;
113
112
  last.lastIndex = pos;
114
113
  match = last.exec(source);
115
- return res + sep + ((_a = match === null || match === void 0 ? void 0 : match[1]) !== null && _a !== void 0 ? _a : '');
114
+ return res + sep + (match?.[1] ?? '');
116
115
  }
117
116
  function doubleQuotedValue(source, onError) {
118
117
  let res = '';
@@ -5,6 +5,7 @@ function resolveProps(tokens, { flow, indicator, next, offset, onError, startOnN
5
5
  let comment = '';
6
6
  let commentSep = '';
7
7
  let hasNewline = false;
8
+ let hasNewlineAfterProp = false;
8
9
  let reqSpace = false;
9
10
  let anchor = null;
10
11
  let tag = null;
@@ -54,6 +55,8 @@ function resolveProps(tokens, { flow, indicator, next, offset, onError, startOnN
54
55
  commentSep += token.source;
55
56
  atNewline = true;
56
57
  hasNewline = true;
58
+ if (anchor || tag)
59
+ hasNewlineAfterProp = true;
57
60
  hasSpace = true;
58
61
  break;
59
62
  case 'anchor':
@@ -84,7 +87,7 @@ function resolveProps(tokens, { flow, indicator, next, offset, onError, startOnN
84
87
  if (anchor || tag)
85
88
  onError(token, 'BAD_PROP_ORDER', `Anchors and tags must be after the ${token.source} indicator`);
86
89
  if (found)
87
- onError(token, 'UNEXPECTED_TOKEN', `Unexpected ${token.source} in ${flow !== null && flow !== void 0 ? flow : 'collection'}`);
90
+ onError(token, 'UNEXPECTED_TOKEN', `Unexpected ${token.source} in ${flow ?? 'collection'}`);
88
91
  found = token;
89
92
  atNewline = false;
90
93
  hasSpace = false;
@@ -120,10 +123,11 @@ function resolveProps(tokens, { flow, indicator, next, offset, onError, startOnN
120
123
  spaceBefore,
121
124
  comment,
122
125
  hasNewline,
126
+ hasNewlineAfterProp,
123
127
  anchor,
124
128
  tag,
125
129
  end,
126
- start: start !== null && start !== void 0 ? start : end
130
+ start: start ?? end
127
131
  };
128
132
  }
129
133
 
@@ -14,7 +14,7 @@ function emptyScalarPosition(offset, before, pos) {
14
14
  // Technically, an empty scalar is immediately after the last non-empty
15
15
  // node, but it's more useful to place it after any whitespace.
16
16
  st = before[++i];
17
- while ((st === null || st === void 0 ? void 0 : st.type) === 'space') {
17
+ while (st?.type === 'space') {
18
18
  offset += st.source.length;
19
19
  st = before[++i];
20
20
  }
@@ -1,7 +1,7 @@
1
1
  import { containsNewline } from './util-contains-newline.js';
2
2
 
3
3
  function flowIndentCheck(indent, fc, onError) {
4
- if ((fc === null || fc === void 0 ? void 0 : fc.type) === 'flow-collection') {
4
+ if (fc?.type === 'flow-collection') {
5
5
  const end = fc.end[0];
6
6
  if (end.indent === indent &&
7
7
  (end.source === ']' || end.source === '}') &&