projen 0.61.13 → 0.61.16

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 (151) hide show
  1. package/.jsii +325 -33
  2. package/docs/api/API.md +166 -0
  3. package/docs/escape-hatches.md +3 -3
  4. package/lib/awscdk/auto-discover.js +5 -5
  5. package/lib/awscdk/awscdk-app-java.js +1 -1
  6. package/lib/awscdk/awscdk-app-py.js +1 -1
  7. package/lib/awscdk/awscdk-app-ts.js +1 -1
  8. package/lib/awscdk/awscdk-construct.js +2 -2
  9. package/lib/awscdk/awscdk-deps-java.js +1 -1
  10. package/lib/awscdk/awscdk-deps-js.js +1 -1
  11. package/lib/awscdk/awscdk-deps.js +1 -1
  12. package/lib/awscdk/cdk-config.js +1 -1
  13. package/lib/awscdk/cdk-tasks.js +1 -1
  14. package/lib/awscdk/integration-test.js +1 -1
  15. package/lib/awscdk/lambda-extension.js +1 -1
  16. package/lib/awscdk/lambda-function.js +2 -2
  17. package/lib/build/build-workflow.js +1 -1
  18. package/lib/cdk/auto-discover-base.js +2 -2
  19. package/lib/cdk/construct-lib.js +1 -1
  20. package/lib/cdk/integration-test-base.js +1 -1
  21. package/lib/cdk/jsii-docgen.js +1 -1
  22. package/lib/cdk/jsii-project.d.ts +1 -0
  23. package/lib/cdk/jsii-project.js +3 -2
  24. package/lib/cdk8s/auto-discover.js +2 -2
  25. package/lib/cdk8s/cdk8s-app-py.js +1 -1
  26. package/lib/cdk8s/cdk8s-app-ts.js +1 -1
  27. package/lib/cdk8s/cdk8s-construct.js +1 -1
  28. package/lib/cdk8s/cdk8s-deps-py.js +1 -1
  29. package/lib/cdk8s/cdk8s-deps.js +1 -1
  30. package/lib/cdk8s/integration-test.js +1 -1
  31. package/lib/cdktf/cdktf-construct.js +1 -1
  32. package/lib/circleci/circleci.js +1 -1
  33. package/lib/component.js +1 -1
  34. package/lib/dependencies.js +1 -1
  35. package/lib/dev-env.js +1 -1
  36. package/lib/docker-compose.js +2 -2
  37. package/lib/file.js +1 -1
  38. package/lib/gitattributes.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/workflows.js +1 -1
  51. package/lib/gitlab/configuration.js +1 -1
  52. package/lib/gitlab/gitlab-configuration.js +1 -1
  53. package/lib/gitlab/nested-configuration.js +1 -1
  54. package/lib/gitpod.js +1 -1
  55. package/lib/ignore-file.js +1 -1
  56. package/lib/index.d.ts +1 -0
  57. package/lib/index.js +2 -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 +1 -1
  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.d.ts +75 -0
  77. package/lib/json-patch.js +105 -0
  78. package/lib/json.js +1 -1
  79. package/lib/license.js +1 -1
  80. package/lib/logger.js +1 -1
  81. package/lib/makefile.js +1 -1
  82. package/lib/object-file.d.ts +36 -0
  83. package/lib/object-file.js +39 -3
  84. package/lib/project-build.js +1 -1
  85. package/lib/project.js +1 -1
  86. package/lib/projects.js +1 -1
  87. package/lib/projenrc-json.js +1 -1
  88. package/lib/python/pip.js +1 -1
  89. package/lib/python/poetry.js +2 -2
  90. package/lib/python/projenrc.js +1 -1
  91. package/lib/python/pytest-sample.js +1 -1
  92. package/lib/python/pytest.js +1 -1
  93. package/lib/python/python-project.js +1 -1
  94. package/lib/python/python-sample.js +1 -1
  95. package/lib/python/requirements-file.js +1 -1
  96. package/lib/python/setuppy.js +1 -1
  97. package/lib/python/setuptools.js +1 -1
  98. package/lib/python/venv.js +1 -1
  99. package/lib/readme.js +1 -1
  100. package/lib/release/publisher.js +1 -1
  101. package/lib/release/release-trigger.js +1 -1
  102. package/lib/release/release.js +1 -1
  103. package/lib/renovatebot.js +1 -1
  104. package/lib/run-task.js +1833 -0
  105. package/lib/sample-file.js +2 -2
  106. package/lib/semver.js +1 -1
  107. package/lib/source-code.js +1 -1
  108. package/lib/task-runtime.js +1 -1
  109. package/lib/task.js +1 -1
  110. package/lib/tasks.js +1 -1
  111. package/lib/testing.js +1 -1
  112. package/lib/textfile.js +1 -1
  113. package/lib/toml.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/launch-config.js +1 -1
  120. package/lib/vscode/vscode.js +1 -1
  121. package/lib/web/next.js +3 -3
  122. package/lib/web/postcss.js +1 -1
  123. package/lib/web/react.js +4 -4
  124. package/lib/web/tailwind.js +1 -1
  125. package/lib/xmlfile.js +1 -1
  126. package/lib/yaml.js +1 -1
  127. package/node_modules/fast-json-patch/LICENSE.txt +22 -0
  128. package/node_modules/fast-json-patch/README.md +428 -0
  129. package/node_modules/fast-json-patch/commonjs/core.d.ts +111 -0
  130. package/node_modules/fast-json-patch/commonjs/core.js +441 -0
  131. package/node_modules/fast-json-patch/commonjs/duplex.d.ts +23 -0
  132. package/node_modules/fast-json-patch/commonjs/duplex.js +181 -0
  133. package/node_modules/fast-json-patch/commonjs/helpers.d.ts +41 -0
  134. package/node_modules/fast-json-patch/commonjs/helpers.js +181 -0
  135. package/node_modules/fast-json-patch/dist/fast-json-patch.js +928 -0
  136. package/node_modules/fast-json-patch/dist/fast-json-patch.min.js +14 -0
  137. package/node_modules/fast-json-patch/index.d.ts +34 -0
  138. package/node_modules/fast-json-patch/index.js +11 -0
  139. package/node_modules/fast-json-patch/index.mjs +29 -0
  140. package/node_modules/fast-json-patch/index.ts +31 -0
  141. package/node_modules/fast-json-patch/jasmine-run.mjs +23 -0
  142. package/node_modules/fast-json-patch/module/core.d.ts +111 -0
  143. package/node_modules/fast-json-patch/module/core.mjs +433 -0
  144. package/node_modules/fast-json-patch/module/duplex.d.ts +23 -0
  145. package/node_modules/fast-json-patch/module/duplex.mjs +176 -0
  146. package/node_modules/fast-json-patch/module/helpers.d.ts +41 -0
  147. package/node_modules/fast-json-patch/module/helpers.mjs +171 -0
  148. package/node_modules/fast-json-patch/package.json +65 -0
  149. package/node_modules/fast-json-patch/tsc-to-mjs.sh +10 -0
  150. package/node_modules/fast-json-patch/webpack.config.js +63 -0
  151. package/package.json +3 -1
@@ -0,0 +1,171 @@
1
+ /*!
2
+ * https://github.com/Starcounter-Jack/JSON-Patch
3
+ * (c) 2017-2022 Joachim Wester
4
+ * MIT licensed
5
+ */
6
+ var __extends = (this && this.__extends) || (function () {
7
+ var extendStatics = function (d, b) {
8
+ extendStatics = Object.setPrototypeOf ||
9
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
10
+ function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
11
+ return extendStatics(d, b);
12
+ };
13
+ return function (d, b) {
14
+ extendStatics(d, b);
15
+ function __() { this.constructor = d; }
16
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
17
+ };
18
+ })();
19
+ var _hasOwnProperty = Object.prototype.hasOwnProperty;
20
+ export function hasOwnProperty(obj, key) {
21
+ return _hasOwnProperty.call(obj, key);
22
+ }
23
+ export function _objectKeys(obj) {
24
+ if (Array.isArray(obj)) {
25
+ var keys_1 = new Array(obj.length);
26
+ for (var k = 0; k < keys_1.length; k++) {
27
+ keys_1[k] = "" + k;
28
+ }
29
+ return keys_1;
30
+ }
31
+ if (Object.keys) {
32
+ return Object.keys(obj);
33
+ }
34
+ var keys = [];
35
+ for (var i in obj) {
36
+ if (hasOwnProperty(obj, i)) {
37
+ keys.push(i);
38
+ }
39
+ }
40
+ return keys;
41
+ }
42
+ ;
43
+ /**
44
+ * Deeply clone the object.
45
+ * https://jsperf.com/deep-copy-vs-json-stringify-json-parse/25 (recursiveDeepCopy)
46
+ * @param {any} obj value to clone
47
+ * @return {any} cloned obj
48
+ */
49
+ export function _deepClone(obj) {
50
+ switch (typeof obj) {
51
+ case "object":
52
+ return JSON.parse(JSON.stringify(obj)); //Faster than ES5 clone - http://jsperf.com/deep-cloning-of-objects/5
53
+ case "undefined":
54
+ return null; //this is how JSON.stringify behaves for array items
55
+ default:
56
+ return obj; //no need to clone primitives
57
+ }
58
+ }
59
+ //3x faster than cached /^\d+$/.test(str)
60
+ export function isInteger(str) {
61
+ var i = 0;
62
+ var len = str.length;
63
+ var charCode;
64
+ while (i < len) {
65
+ charCode = str.charCodeAt(i);
66
+ if (charCode >= 48 && charCode <= 57) {
67
+ i++;
68
+ continue;
69
+ }
70
+ return false;
71
+ }
72
+ return true;
73
+ }
74
+ /**
75
+ * Escapes a json pointer path
76
+ * @param path The raw pointer
77
+ * @return the Escaped path
78
+ */
79
+ export function escapePathComponent(path) {
80
+ if (path.indexOf('/') === -1 && path.indexOf('~') === -1)
81
+ return path;
82
+ return path.replace(/~/g, '~0').replace(/\//g, '~1');
83
+ }
84
+ /**
85
+ * Unescapes a json pointer path
86
+ * @param path The escaped pointer
87
+ * @return The unescaped path
88
+ */
89
+ export function unescapePathComponent(path) {
90
+ return path.replace(/~1/g, '/').replace(/~0/g, '~');
91
+ }
92
+ export function _getPathRecursive(root, obj) {
93
+ var found;
94
+ for (var key in root) {
95
+ if (hasOwnProperty(root, key)) {
96
+ if (root[key] === obj) {
97
+ return escapePathComponent(key) + '/';
98
+ }
99
+ else if (typeof root[key] === 'object') {
100
+ found = _getPathRecursive(root[key], obj);
101
+ if (found != '') {
102
+ return escapePathComponent(key) + '/' + found;
103
+ }
104
+ }
105
+ }
106
+ }
107
+ return '';
108
+ }
109
+ export function getPath(root, obj) {
110
+ if (root === obj) {
111
+ return '/';
112
+ }
113
+ var path = _getPathRecursive(root, obj);
114
+ if (path === '') {
115
+ throw new Error("Object not found in root");
116
+ }
117
+ return "/" + path;
118
+ }
119
+ /**
120
+ * Recursively checks whether an object has any undefined values inside.
121
+ */
122
+ export function hasUndefined(obj) {
123
+ if (obj === undefined) {
124
+ return true;
125
+ }
126
+ if (obj) {
127
+ if (Array.isArray(obj)) {
128
+ for (var i_1 = 0, len = obj.length; i_1 < len; i_1++) {
129
+ if (hasUndefined(obj[i_1])) {
130
+ return true;
131
+ }
132
+ }
133
+ }
134
+ else if (typeof obj === "object") {
135
+ var objKeys = _objectKeys(obj);
136
+ var objKeysLength = objKeys.length;
137
+ for (var i = 0; i < objKeysLength; i++) {
138
+ if (hasUndefined(obj[objKeys[i]])) {
139
+ return true;
140
+ }
141
+ }
142
+ }
143
+ }
144
+ return false;
145
+ }
146
+ function patchErrorMessageFormatter(message, args) {
147
+ var messageParts = [message];
148
+ for (var key in args) {
149
+ var value = typeof args[key] === 'object' ? JSON.stringify(args[key], null, 2) : args[key]; // pretty print
150
+ if (typeof value !== 'undefined') {
151
+ messageParts.push(key + ": " + value);
152
+ }
153
+ }
154
+ return messageParts.join('\n');
155
+ }
156
+ var PatchError = /** @class */ (function (_super) {
157
+ __extends(PatchError, _super);
158
+ function PatchError(message, name, index, operation, tree) {
159
+ var _newTarget = this.constructor;
160
+ var _this = _super.call(this, patchErrorMessageFormatter(message, { name: name, index: index, operation: operation, tree: tree })) || this;
161
+ _this.name = name;
162
+ _this.index = index;
163
+ _this.operation = operation;
164
+ _this.tree = tree;
165
+ Object.setPrototypeOf(_this, _newTarget.prototype); // restore prototype chain, see https://stackoverflow.com/a/48342359
166
+ _this.message = patchErrorMessageFormatter(message, { name: name, index: index, operation: operation, tree: tree });
167
+ return _this;
168
+ }
169
+ return PatchError;
170
+ }(Error));
171
+ export { PatchError };
@@ -0,0 +1,65 @@
1
+ {
2
+ "name": "fast-json-patch",
3
+ "version": "3.1.1",
4
+ "description": "Fast implementation of JSON-Patch (RFC-6902) with duplex (observe changes) capabilities",
5
+ "homepage": "https://github.com/Starcounter-Jack/JSON-Patch",
6
+ "keywords": [
7
+ "json",
8
+ "patch",
9
+ "http",
10
+ "rest"
11
+ ],
12
+ "repository": {
13
+ "type": "git",
14
+ "url": "git://github.com/Starcounter-Jack/JSON-Patch.git"
15
+ },
16
+ "bugs": {
17
+ "url": "https://github.com/Starcounter-Jack/JSON-Patch/issues"
18
+ },
19
+ "author": {
20
+ "name": "Joachim Wester",
21
+ "email": "joachimwester@me.com",
22
+ "url": "http://www.starcounter.com/"
23
+ },
24
+ "license": "MIT",
25
+ "main": "index.js",
26
+ "module": "index.mjs",
27
+ "typings": "index.d.ts",
28
+ "devDependencies": {
29
+ "benchmark": "^2.1.4",
30
+ "bluebird": "^3.5.5",
31
+ "bluebird-retry": "^0.11.0",
32
+ "chalk": "^2.4.2",
33
+ "event-target-shim": "^5.0.1",
34
+ "fast-deep-equal": "^2.0.1",
35
+ "http-server": "^0.12.3",
36
+ "jasmine": "^3.4.0",
37
+ "request": "^2.88.0",
38
+ "sauce-connect-launcher": "^1.2.7",
39
+ "saucelabs": "^2.1.9",
40
+ "selenium-webdriver": "^4.0.0-alpha.4",
41
+ "typescript": "~3.5.2",
42
+ "webpack": "^4.35.0",
43
+ "webpack-cli": "^3.3.5"
44
+ },
45
+ "scripts": {
46
+ "tsc": "npm run tsc-common && npm run tsc-module",
47
+ "tsc-common": "tsc",
48
+ "tsc-module": "tsc --module esnext --moduleResolution node --outDir \"module/\" && npm run tsc-to-mjs",
49
+ "tsc-to-mjs": "bash tsc-to-mjs.sh",
50
+ "version": "npm run tsc && webpack && git add -A",
51
+ "build": "npm run tsc && webpack",
52
+ "serve": "http-server -p 5000 --silent",
53
+ "tsc-watch": "tsc -w",
54
+ "test": "npm run tsc && npm run test-core && npm run test-duplex && npm run test-commonjs && npm run test-webpack-import && npm run test-typings",
55
+ "test-sauce": "npm run build && node test/Sauce/Runner.js",
56
+ "test-commonjs": "jasmine test/spec/commonjs/requireSpec.js",
57
+ "test-webpack-import": "webpack --env.NODE_ENV=test && jasmine test/spec/webpack/importSpec.build.js",
58
+ "test-typings": "tsc test/spec/typings/typingsSpec.ts",
59
+ "test-duplex": "node --experimental-modules jasmine-run.mjs test/**/*[sS]pec.mjs",
60
+ "test-core": "node --experimental-modules jasmine-run.mjs 'test/spec/{jsonPatchTestsSpec,coreSpec,validateSpec}.mjs'",
61
+ "bench": "npm run bench-core && npm run bench-duplex",
62
+ "bench-core": "node test/spec/coreBenchmark.js",
63
+ "bench-duplex": "node test/spec/coreBenchmark.js && node test/spec/duplexBenchmark.js"
64
+ }
65
+ }
@@ -0,0 +1,10 @@
1
+ #!/bin/bash
2
+ cd module
3
+ mv core.js core.mjs && mv duplex.js duplex.mjs && mv helpers.js helpers.mjs
4
+ # Unlike Ubuntu, OS X requires the extension to be explicitly specified
5
+ # https://myshittycode.com/2014/07/24/os-x-sed-extra-characters-at-the-end-of-l-command-error/
6
+ if [[ "$OSTYPE" == "darwin"* ]]; then
7
+ sed -i '' 's/\.js/\.mjs/g' duplex.mjs core.mjs
8
+ else
9
+ sed -i 's/\.js/\.mjs/g' duplex.mjs core.mjs
10
+ fi
@@ -0,0 +1,63 @@
1
+ var webpack = require('webpack');
2
+ const package = require('./package.json');
3
+ const path = require('path');
4
+
5
+ module.exports = env => {
6
+ if(env && env.NODE_ENV === "test") {
7
+ return [
8
+ {
9
+ entry: './test/spec/webpack/importSpec.src.js',
10
+ mode: 'production',
11
+ output: {
12
+ path: path.resolve(__dirname, 'test/spec/webpack'),
13
+ filename: 'importSpec.build.js'
14
+ },
15
+ target: 'node',
16
+ resolve: {
17
+ extensions: ['.js']
18
+ }
19
+ }
20
+ ];
21
+ }
22
+ else {
23
+ return [
24
+ {
25
+ entry: './index.js',
26
+ mode: 'production',
27
+ optimization: {
28
+ minimize: false
29
+ },
30
+ output: {
31
+ filename: 'fast-json-patch.js',
32
+ library: 'jsonpatch',
33
+ libraryTarget: 'var'
34
+ },
35
+ resolve: {
36
+ extensions: ['.js']
37
+ },
38
+ plugins: [
39
+ new webpack.BannerPlugin('fast-json-patch, version: ' + package['version'])
40
+ ]
41
+ },
42
+ {
43
+ entry: './index.js',
44
+ mode: 'production',
45
+ output: {
46
+ filename: 'fast-json-patch.min.js',
47
+ library: 'jsonpatch',
48
+ libraryTarget: 'var'
49
+ },
50
+ resolve: {
51
+ extensions: ['.js']
52
+ },
53
+ plugins: [
54
+ new webpack.BannerPlugin('fast-json-patch, version: ' + package['version'])
55
+ ]
56
+ }
57
+ ];
58
+ }
59
+ };
60
+
61
+
62
+
63
+
package/package.json CHANGED
@@ -86,6 +86,7 @@
86
86
  "case": "^1.6.3",
87
87
  "chalk": "^4.1.2",
88
88
  "conventional-changelog-config-spec": "^2.1.0",
89
+ "fast-json-patch": "^3.1.1",
89
90
  "fs-extra": "^9.1.0",
90
91
  "glob": "^7",
91
92
  "ini": "^2.0.0",
@@ -101,6 +102,7 @@
101
102
  "case",
102
103
  "chalk",
103
104
  "conventional-changelog-config-spec",
105
+ "fast-json-patch",
104
106
  "fs-extra",
105
107
  "glob",
106
108
  "ini",
@@ -124,7 +126,7 @@
124
126
  },
125
127
  "main": "lib/index.js",
126
128
  "license": "Apache-2.0",
127
- "version": "0.61.13",
129
+ "version": "0.61.16",
128
130
  "jest": {
129
131
  "maxWorkers": "50%",
130
132
  "testMatch": [