projen 0.84.8 → 0.84.9

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 (162) hide show
  1. package/.jsii +263 -220
  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-backport.js +1 -1
  48. package/lib/github/pull-request-lint.js +1 -1
  49. package/lib/github/stale.js +1 -1
  50. package/lib/github/task-workflow-job.js +1 -1
  51. package/lib/github/task-workflow.js +1 -1
  52. package/lib/github/workflow-actions.js +1 -1
  53. package/lib/github/workflow-jobs.js +1 -1
  54. package/lib/github/workflow-steps.js +1 -1
  55. package/lib/github/workflows.js +1 -1
  56. package/lib/gitlab/configuration-model.d.ts +2 -0
  57. package/lib/gitlab/configuration-model.js +1 -1
  58. package/lib/gitlab/configuration.d.ts +5 -1
  59. package/lib/gitlab/configuration.js +4 -2
  60. package/lib/gitlab/gitlab-configuration.js +1 -1
  61. package/lib/gitlab/nested-configuration.js +1 -1
  62. package/lib/gitpod.js +1 -1
  63. package/lib/ignore-file.js +1 -1
  64. package/lib/ini.js +1 -1
  65. package/lib/java/java-project.js +1 -1
  66. package/lib/java/junit.js +1 -1
  67. package/lib/java/maven-compile.js +1 -1
  68. package/lib/java/maven-packaging.js +1 -1
  69. package/lib/java/maven-sample.js +1 -1
  70. package/lib/java/pom.js +1 -1
  71. package/lib/java/projenrc.js +1 -1
  72. package/lib/javascript/bundler.js +1 -1
  73. package/lib/javascript/eslint.js +1 -1
  74. package/lib/javascript/jest.js +4 -4
  75. package/lib/javascript/license-checker.js +1 -1
  76. package/lib/javascript/node-package.js +1 -1
  77. package/lib/javascript/node-project.js +1 -1
  78. package/lib/javascript/npm-config.js +1 -1
  79. package/lib/javascript/prettier.js +1 -1
  80. package/lib/javascript/projenrc.js +1 -1
  81. package/lib/javascript/typescript-config.js +2 -2
  82. package/lib/javascript/upgrade-dependencies.js +2 -2
  83. package/lib/javascript/yarnrc.js +1 -1
  84. package/lib/json-patch.js +1 -1
  85. package/lib/json.js +1 -1
  86. package/lib/license.js +1 -1
  87. package/lib/logger.js +1 -1
  88. package/lib/makefile.js +1 -1
  89. package/lib/object-file.js +1 -1
  90. package/lib/project-build.js +1 -1
  91. package/lib/project-tree.js +1 -1
  92. package/lib/project.js +1 -1
  93. package/lib/projects.js +1 -1
  94. package/lib/projenrc-json.js +2 -2
  95. package/lib/projenrc.js +1 -1
  96. package/lib/python/pip.js +1 -1
  97. package/lib/python/poetry.js +2 -2
  98. package/lib/python/projenrc.js +1 -1
  99. package/lib/python/pytest-sample.js +1 -1
  100. package/lib/python/pytest.js +1 -1
  101. package/lib/python/python-project.js +1 -1
  102. package/lib/python/python-sample.js +1 -1
  103. package/lib/python/requirements-file.js +1 -1
  104. package/lib/python/setuppy.js +1 -1
  105. package/lib/python/setuptools.js +1 -1
  106. package/lib/python/venv.js +1 -1
  107. package/lib/readme.js +1 -1
  108. package/lib/release/publisher.js +1 -1
  109. package/lib/release/release-trigger.js +1 -1
  110. package/lib/release/release.js +1 -1
  111. package/lib/renovatebot.js +1 -1
  112. package/lib/sample-file.js +2 -2
  113. package/lib/semver.js +1 -1
  114. package/lib/source-code.js +1 -1
  115. package/lib/task-runtime.js +1 -1
  116. package/lib/task.js +1 -1
  117. package/lib/tasks.js +1 -1
  118. package/lib/testing.js +1 -1
  119. package/lib/textfile.js +1 -1
  120. package/lib/toml.js +1 -1
  121. package/lib/typescript/projenrc-ts.js +1 -1
  122. package/lib/typescript/projenrc.js +1 -1
  123. package/lib/typescript/typescript-typedoc.js +1 -1
  124. package/lib/typescript/typescript.js +6 -6
  125. package/lib/version.js +2 -2
  126. package/lib/vscode/devcontainer.js +1 -1
  127. package/lib/vscode/extensions.js +1 -1
  128. package/lib/vscode/launch-config.js +1 -1
  129. package/lib/vscode/settings.js +1 -1
  130. package/lib/vscode/vscode.js +1 -1
  131. package/lib/web/next.js +3 -3
  132. package/lib/web/postcss.js +1 -1
  133. package/lib/web/react.js +4 -4
  134. package/lib/web/tailwind.js +1 -1
  135. package/lib/xmlfile.js +1 -1
  136. package/lib/yaml.js +1 -1
  137. package/node_modules/yaml/browser/dist/compose/compose-collection.js +15 -3
  138. package/node_modules/yaml/browser/dist/compose/compose-node.js +1 -1
  139. package/node_modules/yaml/browser/dist/compose/resolve-block-map.js +1 -1
  140. package/node_modules/yaml/browser/dist/compose/resolve-props.js +3 -3
  141. package/node_modules/yaml/browser/dist/nodes/Collection.js +0 -1
  142. package/node_modules/yaml/browser/dist/parse/lexer.js +2 -6
  143. package/node_modules/yaml/browser/dist/stringify/foldFlowLines.js +2 -0
  144. package/node_modules/yaml/dist/cli.d.ts +1 -2
  145. package/node_modules/yaml/dist/cli.mjs +8 -4
  146. package/node_modules/yaml/dist/compose/compose-collection.d.ts +7 -1
  147. package/node_modules/yaml/dist/compose/compose-collection.js +15 -3
  148. package/node_modules/yaml/dist/compose/compose-node.d.ts +1 -0
  149. package/node_modules/yaml/dist/compose/compose-node.js +1 -1
  150. package/node_modules/yaml/dist/compose/resolve-block-map.d.ts +1 -2
  151. package/node_modules/yaml/dist/compose/resolve-block-map.js +1 -1
  152. package/node_modules/yaml/dist/compose/resolve-block-seq.d.ts +1 -1
  153. package/node_modules/yaml/dist/compose/resolve-props.d.ts +1 -1
  154. package/node_modules/yaml/dist/compose/resolve-props.js +3 -3
  155. package/node_modules/yaml/dist/nodes/Collection.d.ts +0 -1
  156. package/node_modules/yaml/dist/nodes/Collection.js +0 -1
  157. package/node_modules/yaml/dist/nodes/identity.d.ts +1 -1
  158. package/node_modules/yaml/dist/parse/lexer.js +2 -6
  159. package/node_modules/yaml/dist/schema/yaml-1.1/omap.d.ts +3 -3
  160. package/node_modules/yaml/dist/stringify/foldFlowLines.js +2 -0
  161. package/node_modules/yaml/package.json +1 -1
  162. package/package.json +1 -1
@@ -1,7 +1,6 @@
1
- import type { ParsedNode } from '../nodes/Node.js';
2
1
  import { YAMLMap } from '../nodes/YAMLMap.js';
3
2
  import type { BlockMap } from '../parse/cst.js';
4
3
  import { CollectionTag } from '../schema/types.js';
5
4
  import type { ComposeContext, ComposeNode } from './compose-node.js';
6
5
  import type { ComposeErrorHandler } from './composer.js';
7
- export declare function resolveBlockMap({ composeNode, composeEmptyNode }: ComposeNode, ctx: ComposeContext, bm: BlockMap, onError: ComposeErrorHandler, tag?: CollectionTag): YAMLMap.Parsed<ParsedNode, ParsedNode | null>;
6
+ export declare function resolveBlockMap({ composeNode, composeEmptyNode }: ComposeNode, ctx: ComposeContext, bm: BlockMap, onError: ComposeErrorHandler, tag?: CollectionTag): YAMLMap.Parsed;
@@ -44,7 +44,7 @@ function resolveBlockMap({ composeNode, composeEmptyNode }, ctx, bm, onError, ta
44
44
  }
45
45
  continue;
46
46
  }
47
- if (keyProps.hasNewlineAfterProp || utilContainsNewline.containsNewline(key)) {
47
+ if (keyProps.newlineAfterProp || utilContainsNewline.containsNewline(key)) {
48
48
  onError(key ?? start[start.length - 1], 'MULTILINE_IMPLICIT_KEY', 'Implicit keys need to be on a single line');
49
49
  }
50
50
  }
@@ -3,4 +3,4 @@ import type { BlockSequence } from '../parse/cst.js';
3
3
  import { CollectionTag } from '../schema/types.js';
4
4
  import type { ComposeContext, ComposeNode } from './compose-node.js';
5
5
  import type { ComposeErrorHandler } from './composer.js';
6
- export declare function resolveBlockSeq({ composeNode, composeEmptyNode }: ComposeNode, ctx: ComposeContext, bs: BlockSequence, onError: ComposeErrorHandler, tag?: CollectionTag): YAMLSeq.Parsed<import("../index.js").ParsedNode>;
6
+ export declare function resolveBlockSeq({ composeNode, composeEmptyNode }: ComposeNode, ctx: ComposeContext, bs: BlockSequence, onError: ComposeErrorHandler, tag?: CollectionTag): YAMLSeq.Parsed;
@@ -15,9 +15,9 @@ export declare function resolveProps(tokens: SourceToken[], { flow, indicator, n
15
15
  spaceBefore: boolean;
16
16
  comment: string;
17
17
  hasNewline: boolean;
18
- hasNewlineAfterProp: boolean;
19
18
  anchor: SourceToken | null;
20
19
  tag: SourceToken | null;
20
+ newlineAfterProp: SourceToken | null;
21
21
  end: number;
22
22
  start: number;
23
23
  };
@@ -7,11 +7,11 @@ function resolveProps(tokens, { flow, indicator, next, offset, onError, parentIn
7
7
  let comment = '';
8
8
  let commentSep = '';
9
9
  let hasNewline = false;
10
- let hasNewlineAfterProp = false;
11
10
  let reqSpace = false;
12
11
  let tab = null;
13
12
  let anchor = null;
14
13
  let tag = null;
14
+ let newlineAfterProp = null;
15
15
  let comma = null;
16
16
  let found = null;
17
17
  let start = null;
@@ -65,7 +65,7 @@ function resolveProps(tokens, { flow, indicator, next, offset, onError, parentIn
65
65
  atNewline = true;
66
66
  hasNewline = true;
67
67
  if (anchor || tag)
68
- hasNewlineAfterProp = true;
68
+ newlineAfterProp = token;
69
69
  hasSpace = true;
70
70
  break;
71
71
  case 'anchor':
@@ -139,9 +139,9 @@ function resolveProps(tokens, { flow, indicator, next, offset, onError, parentIn
139
139
  spaceBefore,
140
140
  comment,
141
141
  hasNewline,
142
- hasNewlineAfterProp,
143
142
  anchor,
144
143
  tag,
144
+ newlineAfterProp,
145
145
  end,
146
146
  start: start ?? end
147
147
  };
@@ -4,7 +4,6 @@ import { NodeBase } from './Node.js';
4
4
  export declare function collectionFromPath(schema: Schema, path: unknown[], value: unknown): import("./Node.js").Node;
5
5
  export declare const isEmptyPath: (path: Iterable<unknown> | null | undefined) => path is null | undefined;
6
6
  export declare abstract class Collection extends NodeBase {
7
- static maxFlowStringSingleLineLength: number;
8
7
  schema: Schema | undefined;
9
8
  [NODE_TYPE]: symbol;
10
9
  items: unknown[];
@@ -145,7 +145,6 @@ class Collection extends Node.NodeBase {
145
145
  }
146
146
  }
147
147
  }
148
- Collection.maxFlowStringSingleLineLength = 60;
149
148
 
150
149
  exports.Collection = Collection;
151
150
  exports.collectionFromPath = collectionFromPath;
@@ -13,7 +13,7 @@ export declare const SCALAR: unique symbol;
13
13
  export declare const SEQ: unique symbol;
14
14
  export declare const NODE_TYPE: unique symbol;
15
15
  export declare const isAlias: (node: any) => node is Alias;
16
- export declare const isDocument: <T extends Node = Node>(node: any) => node is Document<T, true>;
16
+ export declare const isDocument: <T extends Node = Node>(node: any) => node is Document<T>;
17
17
  export declare const isMap: <K = unknown, V = unknown>(node: any) => node is YAMLMap<K, V>;
18
18
  export declare const isPair: <K = unknown, V = unknown>(node: any) => node is Pair<K, V>;
19
19
  export declare const isScalar: <T = unknown>(node: any) => node is Scalar<T>;
@@ -292,15 +292,11 @@ class Lexer {
292
292
  if (!this.atEnd && !this.hasChars(4))
293
293
  return this.setNext('line-start');
294
294
  const s = this.peek(3);
295
- if (s === '---' && isEmpty(this.charAt(3))) {
295
+ if ((s === '---' || s === '...') && isEmpty(this.charAt(3))) {
296
296
  yield* this.pushCount(3);
297
297
  this.indentValue = 0;
298
298
  this.indentNext = 0;
299
- return 'doc';
300
- }
301
- else if (s === '...' && isEmpty(this.charAt(3))) {
302
- yield* this.pushCount(3);
303
- return 'stream';
299
+ return s === '---' ? 'doc' : 'stream';
304
300
  }
305
301
  }
306
302
  this.indentValue = yield* this.pushSpaces(false);
@@ -9,12 +9,12 @@ export declare class YAMLOMap extends YAMLSeq {
9
9
  add: (pair: import("../../index.js").Pair<any, any> | {
10
10
  key: any;
11
11
  value: any;
12
- }, overwrite?: boolean | undefined) => void;
12
+ }, overwrite?: boolean) => void;
13
13
  delete: (key: unknown) => boolean;
14
14
  get: {
15
15
  (key: unknown, keepScalar: true): import("../../index.js").Scalar<any> | undefined;
16
- (key: unknown, keepScalar?: false | undefined): any;
17
- (key: unknown, keepScalar?: boolean | undefined): any;
16
+ (key: unknown, keepScalar?: false): any;
17
+ (key: unknown, keepScalar?: boolean): any;
18
18
  };
19
19
  has: (key: unknown) => boolean;
20
20
  set: (key: any, value: any) => void;
@@ -11,6 +11,8 @@ const FOLD_QUOTED = 'quoted';
11
11
  function foldFlowLines(text, indent, mode = 'flow', { indentAtStart, lineWidth = 80, minContentWidth = 20, onFold, onOverflow } = {}) {
12
12
  if (!lineWidth || lineWidth < 0)
13
13
  return text;
14
+ if (lineWidth < minContentWidth)
15
+ minContentWidth = 0;
14
16
  const endStep = Math.max(1 + minContentWidth, 1 + lineWidth - indent.length);
15
17
  if (text.length <= endStep)
16
18
  return text;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yaml",
3
- "version": "2.4.5",
3
+ "version": "2.5.0",
4
4
  "license": "ISC",
5
5
  "author": "Eemeli Aro <eemeli@gmail.com>",
6
6
  "repository": "github:eemeli/yaml",
package/package.json CHANGED
@@ -130,7 +130,7 @@
130
130
  "publishConfig": {
131
131
  "access": "public"
132
132
  },
133
- "version": "0.84.8",
133
+ "version": "0.84.9",
134
134
  "jest": {
135
135
  "coverageProvider": "v8",
136
136
  "coverageReporters": [