projen 0.28.20 → 0.28.24
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/.jsii +3 -3
- package/API.md +2 -2
- package/lib/awscdk-app-ts.js +1 -1
- package/lib/awscdk-construct.d.ts +2 -2
- package/lib/awscdk-construct.js +5 -5
- package/lib/cdk8s-app-ts.js +1 -1
- package/lib/cdk8s-construct.js +1 -1
- package/lib/cdktf-construct.js +1 -1
- package/lib/cli/cmds/new.js +6 -20
- package/lib/component.js +1 -1
- package/lib/construct-lib.js +1 -1
- package/lib/deps/dependencies.js +1 -1
- package/lib/dev-env.js +1 -1
- package/lib/docker-compose.js +2 -2
- package/lib/eslint.js +1 -1
- package/lib/file.js +1 -1
- package/lib/git/gitattributes.js +1 -1
- package/lib/github/auto-approve.js +1 -1
- package/lib/github/auto-merge.js +1 -1
- package/lib/github/dependabot.js +1 -1
- package/lib/github/github.js +1 -1
- package/lib/github/mergify.js +1 -1
- package/lib/github/pr-template.js +1 -1
- package/lib/github/stale.js +1 -1
- package/lib/github/task-workflow.js +1 -1
- package/lib/github/workflows.js +1 -1
- package/lib/gitpod.js +1 -1
- package/lib/ignore-file.js +1 -1
- package/lib/ini.js +1 -1
- package/lib/java/java-project.js +1 -1
- package/lib/java/junit.js +1 -1
- package/lib/java/maven-compile.js +1 -1
- package/lib/java/maven-packaging.js +1 -1
- package/lib/java/maven-sample.js +1 -1
- package/lib/java/pom.js +1 -1
- package/lib/java/projenrc.js +3 -3
- package/lib/javascript/npm-config.js +1 -1
- package/lib/javascript/projenrc.js +1 -1
- package/lib/jest.js +1 -1
- package/lib/jsii-project.js +1 -1
- package/lib/json/projenrc.js +1 -1
- package/lib/json.js +1 -1
- package/lib/license.js +1 -1
- package/lib/logger.js +1 -1
- package/lib/makefile.js +1 -1
- package/lib/node-package.js +1 -1
- package/lib/node-project.js +2 -2
- package/lib/object-file.js +1 -1
- package/lib/project.js +2 -2
- package/lib/python/pip.js +1 -1
- package/lib/python/poetry.js +2 -2
- package/lib/python/projenrc.js +1 -1
- package/lib/python/pytest.js +1 -1
- package/lib/python/python-project.js +1 -1
- package/lib/python/python-sample.js +1 -1
- package/lib/python/requirements-file.js +1 -1
- package/lib/python/setuppy.js +1 -1
- package/lib/python/setuptools.js +1 -1
- package/lib/python/venv.js +1 -1
- package/lib/readme.js +1 -1
- package/lib/release/publisher.js +1 -1
- package/lib/release/release.js +1 -1
- package/lib/sample-file.js +2 -2
- package/lib/semver.js +1 -1
- package/lib/source-code.js +1 -1
- package/lib/tasks/runtime.js +1 -1
- package/lib/tasks/task.js +1 -1
- package/lib/tasks/tasks.js +1 -1
- package/lib/textfile.js +1 -1
- package/lib/toml.js +1 -1
- package/lib/typescript/projenrc.js +1 -1
- package/lib/typescript-config.js +1 -1
- package/lib/typescript.js +3 -3
- package/lib/upgrade-dependencies.js +2 -2
- package/lib/version.js +1 -1
- package/lib/vscode/devcontainer.js +1 -1
- package/lib/vscode/launch-config.js +1 -1
- package/lib/vscode/vscode.js +1 -1
- package/lib/web/next.js +3 -3
- package/lib/web/postcss.js +1 -1
- package/lib/web/react.js +4 -4
- package/lib/web/tailwind.js +1 -1
- package/lib/xmlfile.js +1 -1
- package/lib/yaml.js +1 -1
- package/package.json +3 -3
- package/.all-contributorsrc +0 -546
- package/.devcontainer.json +0 -4
- package/.gitattributes +0 -27
- package/.gitpod.yml +0 -7
- package/.markdownlint.json +0 -8
- package/ARCHITECTURE.md +0 -99
- package/CODE_OF_CONDUCT.md +0 -130
- package/CONTRIBUTING.md +0 -137
- package/SECURITY.md +0 -18
- package/VISION.md +0 -64
- package/projen.bash +0 -8
- package/scripts/readme-projects.js +0 -5
package/ARCHITECTURE.md
DELETED
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
# Architecture
|
|
2
|
-
|
|
3
|
-
This document attempts to document the high-level architecture of projen. This
|
|
4
|
-
could be useful if you're trying to contribute to projen, trying to debug an
|
|
5
|
-
error message, or if you're just curious!
|
|
6
|
-
|
|
7
|
-
## How are a project's files synthesized?
|
|
8
|
-
|
|
9
|
-
### Bird's eye view
|
|
10
|
-
|
|
11
|
-
When `npx projen` is run, the command-line process executes the project's
|
|
12
|
-
projenrc file. This is usually a file like `.projenrc.js` or `projenrc.java`.
|
|
13
|
-
|
|
14
|
-
> The "rc" in the name is a common convention for configuration files - see
|
|
15
|
-
https://en.wikipedia.org/wiki/Configuration_file.
|
|
16
|
-
|
|
17
|
-
projenrc files follow a general structure:
|
|
18
|
-
|
|
19
|
-
1. they define one or more `Project` instances
|
|
20
|
-
2. these projects are configured and customized
|
|
21
|
-
3. `project.synth()` is called on the root project
|
|
22
|
-
|
|
23
|
-
For simplicity, most of this document will just assume there is a single project
|
|
24
|
-
unless otherwise specified.
|
|
25
|
-
|
|
26
|
-
Steps 1 and 2 only serve to initialize an in-memory representation of the
|
|
27
|
-
project. projen runs on Node.js; so in the JavaScript runtime, these steps
|
|
28
|
-
create a hierarchy of objects (called `Component`'s), each with various fields
|
|
29
|
-
specifying the names of files, tasks, options, and so on. The data within each
|
|
30
|
-
component provides enough information to uniquely determine the structure and
|
|
31
|
-
contents of the files it is responsible for. Components can add other components
|
|
32
|
-
to the project, and even make changes to existing components through common
|
|
33
|
-
interfaces like `project.tasks`, `project.deps`, or
|
|
34
|
-
`project.tryFindObjectFile()`.
|
|
35
|
-
|
|
36
|
-
Step 3 is the only step that actually performs any changes to files in the
|
|
37
|
-
user's project / file system.
|
|
38
|
-
|
|
39
|
-
### Synthesizing actual files
|
|
40
|
-
|
|
41
|
-
The `synth()` method of `Project` performs the actual synthesizing (and
|
|
42
|
-
updating) of all configuration files managed by projen. This is achieved by
|
|
43
|
-
deleting all projen-managed files (if there are any), and then re-synthesizing
|
|
44
|
-
them based on the latest configuration specified by the user. In code, this
|
|
45
|
-
breaks down as follows (slightly simplified):
|
|
46
|
-
|
|
47
|
-
1. the project's `preSynthesize()` method is called
|
|
48
|
-
2. all components' `preSynthesize()` methods are called
|
|
49
|
-
3. all projen-synthesized files are cleaned up
|
|
50
|
-
4. all components' `synthesize()` methods are called (most files are generated)
|
|
51
|
-
5. all components' `postSynthesize()` methods are called
|
|
52
|
-
6. the project's `postSynthesize()` method is called
|
|
53
|
-
|
|
54
|
-
In the above list, step 3 is critical since it's important that only files that
|
|
55
|
-
are managed by projen get cleaned up - we don't want user source code to be
|
|
56
|
-
deleted! Moreover, if a file was synthesized by projen at one point in time, but
|
|
57
|
-
later a user changes their projenrc configuration so it is no longer necessary,
|
|
58
|
-
we want it to be automatically cleaned up.
|
|
59
|
-
|
|
60
|
-
Rather than manually keeping track of synthesized files with some form of stored
|
|
61
|
-
state (which could easily get desynced by tampering from users or other tools),
|
|
62
|
-
projen simply looks for files with the _magic string_ that you get by
|
|
63
|
-
concatenating `"~~ Generated by "` and `"projen"`, and removes them. See
|
|
64
|
-
[cleanup.ts](src/cleanup.ts).
|
|
65
|
-
|
|
66
|
-
Since any file with this string gets automatically cleaned up, you should not
|
|
67
|
-
include this magic string verbatim in source code files. If you are writing your
|
|
68
|
-
own projen project type or component, you can simply reference this magic string
|
|
69
|
-
via `FileBase.PROJEN_MARKER`.
|
|
70
|
-
|
|
71
|
-
----
|
|
72
|
-
|
|
73
|
-
Steps 1, 2, 4, 5, and 6 are more straightforward. `synthesize()` is used to
|
|
74
|
-
generate the actual files in the user's file system (including applying
|
|
75
|
-
appropriate read/write permissions). `preSynthesize()` and `postSynthesize()`
|
|
76
|
-
are complementary methods that can used to enable components to perform
|
|
77
|
-
additional logic before and after synthesis. See the source code of `Component`
|
|
78
|
-
and `FileBase` for more details.
|
|
79
|
-
|
|
80
|
-
> Note: in practice, there are many existing components for creating specific
|
|
81
|
-
> types of files (such as `JsonFile` and `TextFile`), so we recommend using
|
|
82
|
-
> these over hand-making components wherever possible. (Believe in the power of
|
|
83
|
-
> abstractions!)
|
|
84
|
-
|
|
85
|
-
Since `preSynthesize()` is called before any files are cleaned up, it can be
|
|
86
|
-
used for e.g. observing any changes made to a generated file, and then adjusting
|
|
87
|
-
how the file is re-synthesized based on those changes. (As an example, running
|
|
88
|
-
`npm install` or `yarn install` can change the dependencies listed in the
|
|
89
|
-
`package.json` file of JavaScript projects. The built-in `NodeProject` uses
|
|
90
|
-
`preSynthesize()` to automatically integrate these changes to the `package.json`
|
|
91
|
-
file synthesized by projen, instead of overriding them.)
|
|
92
|
-
|
|
93
|
-
## How can projenrc files be written in multiple languages?
|
|
94
|
-
|
|
95
|
-
The projen library is transpiled by [jsii](https://github.com/aws/jsii) so that
|
|
96
|
-
projenrc files can be written in languages besides JavaScript. Under the hood,
|
|
97
|
-
API calls made in projen's Java/Python/etc. libraries communicate with a
|
|
98
|
-
JavaScript runtime to deliver the same behavior as if you wrote the code in
|
|
99
|
-
JavaScript. For more information, check out [jsii](https://github.com/aws/jsii).
|
package/CODE_OF_CONDUCT.md
DELETED
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
# Contributor Covenant Code of Conduct
|
|
3
|
-
|
|
4
|
-
## Our Pledge
|
|
5
|
-
|
|
6
|
-
We as members, contributors, and leaders pledge to make participation in our
|
|
7
|
-
community a harassment-free experience for everyone, regardless of age, body
|
|
8
|
-
size, visible or invisible disability, ethnicity, sex characteristics, gender
|
|
9
|
-
identity and expression, level of experience, education, socio-economic status,
|
|
10
|
-
nationality, personal appearance, race, religion, or sexual identity
|
|
11
|
-
and orientation.
|
|
12
|
-
|
|
13
|
-
We pledge to act and interact in ways that contribute to an open, welcoming,
|
|
14
|
-
diverse, inclusive, and healthy community.
|
|
15
|
-
|
|
16
|
-
## Our Standards
|
|
17
|
-
|
|
18
|
-
Examples of behavior that contributes to a positive environment for our
|
|
19
|
-
community include:
|
|
20
|
-
|
|
21
|
-
* Demonstrating empathy and kindness toward other people
|
|
22
|
-
* Being respectful of differing opinions, viewpoints, and experiences
|
|
23
|
-
* Giving and gracefully accepting constructive feedback
|
|
24
|
-
* Accepting responsibility and apologizing to those affected by our mistakes,
|
|
25
|
-
and learning from the experience
|
|
26
|
-
* Focusing on what is best not just for us as individuals, but for the
|
|
27
|
-
overall community
|
|
28
|
-
|
|
29
|
-
Examples of unacceptable behavior include:
|
|
30
|
-
|
|
31
|
-
* The use of sexualized language or imagery, and sexual attention or
|
|
32
|
-
advances of any kind
|
|
33
|
-
* Trolling, insulting or derogatory comments, and personal or political attacks
|
|
34
|
-
* Public or private harassment
|
|
35
|
-
* Publishing others' private information, such as a physical or email
|
|
36
|
-
address, without their explicit permission
|
|
37
|
-
* Other conduct which could reasonably be considered inappropriate in a
|
|
38
|
-
professional setting
|
|
39
|
-
|
|
40
|
-
## Enforcement Responsibilities
|
|
41
|
-
|
|
42
|
-
Community leaders are responsible for clarifying and enforcing our standards of
|
|
43
|
-
acceptable behavior and will take appropriate and fair corrective action in
|
|
44
|
-
response to any behavior that they deem inappropriate, threatening, offensive,
|
|
45
|
-
or harmful.
|
|
46
|
-
|
|
47
|
-
Community leaders have the right and responsibility to remove, edit, or reject
|
|
48
|
-
comments, commits, code, wiki edits, issues, and other contributions that are
|
|
49
|
-
not aligned to this Code of Conduct, and will communicate reasons for moderation
|
|
50
|
-
decisions when appropriate.
|
|
51
|
-
|
|
52
|
-
## Scope
|
|
53
|
-
|
|
54
|
-
This Code of Conduct applies within all community spaces, and also applies when
|
|
55
|
-
an individual is officially representing the community in public spaces.
|
|
56
|
-
Examples of representing our community include using an official e-mail address,
|
|
57
|
-
posting via an official social media account, or acting as an appointed
|
|
58
|
-
representative at an online or offline event.
|
|
59
|
-
|
|
60
|
-
## Enforcement
|
|
61
|
-
|
|
62
|
-
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
|
63
|
-
reported to the community leaders responsible for enforcement at
|
|
64
|
-
elad.benisrael@gmail.com. All complaints will be reviewed and investigated
|
|
65
|
-
promptly and fairly.
|
|
66
|
-
|
|
67
|
-
All community leaders are obligated to respect the privacy and security of the
|
|
68
|
-
reporter of any incident.
|
|
69
|
-
|
|
70
|
-
## Enforcement Guidelines
|
|
71
|
-
|
|
72
|
-
Community leaders will follow these Community Impact Guidelines in determining
|
|
73
|
-
the consequences for any action they deem in violation of this Code of Conduct:
|
|
74
|
-
|
|
75
|
-
### 1. Correction
|
|
76
|
-
|
|
77
|
-
**Community Impact**: Use of inappropriate language or other behavior deemed
|
|
78
|
-
unprofessional or unwelcome in the community.
|
|
79
|
-
|
|
80
|
-
**Consequence**: A private, written warning from community leaders, providing
|
|
81
|
-
clarity around the nature of the violation and an explanation of why the
|
|
82
|
-
behavior was inappropriate. A public apology may be requested.
|
|
83
|
-
|
|
84
|
-
### 2. Warning
|
|
85
|
-
|
|
86
|
-
**Community Impact**: A violation through a single incident or series
|
|
87
|
-
of actions.
|
|
88
|
-
|
|
89
|
-
**Consequence**: A warning with consequences for continued behavior. No
|
|
90
|
-
interaction with the people involved, including unsolicited interaction with
|
|
91
|
-
those enforcing the Code of Conduct, for a specified period of time. This
|
|
92
|
-
includes avoiding interactions in community spaces as well as external channels
|
|
93
|
-
like social media. Violating these terms may lead to a temporary or
|
|
94
|
-
permanent ban.
|
|
95
|
-
|
|
96
|
-
### 3. Temporary Ban
|
|
97
|
-
|
|
98
|
-
**Community Impact**: A serious violation of community standards, including
|
|
99
|
-
sustained inappropriate behavior.
|
|
100
|
-
|
|
101
|
-
**Consequence**: A temporary ban from any sort of interaction or public
|
|
102
|
-
communication with the community for a specified period of time. No public or
|
|
103
|
-
private interaction with the people involved, including unsolicited interaction
|
|
104
|
-
with those enforcing the Code of Conduct, is allowed during this period.
|
|
105
|
-
Violating these terms may lead to a permanent ban.
|
|
106
|
-
|
|
107
|
-
### 4. Permanent Ban
|
|
108
|
-
|
|
109
|
-
**Community Impact**: Demonstrating a pattern of violation of community
|
|
110
|
-
standards, including sustained inappropriate behavior, harassment of an
|
|
111
|
-
individual, or aggression toward or disparagement of classes of individuals.
|
|
112
|
-
|
|
113
|
-
**Consequence**: A permanent ban from any sort of public interaction within
|
|
114
|
-
the community.
|
|
115
|
-
|
|
116
|
-
## Attribution
|
|
117
|
-
|
|
118
|
-
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
|
119
|
-
version 2.0, available at
|
|
120
|
-
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
|
|
121
|
-
|
|
122
|
-
Community Impact Guidelines were inspired by [Mozilla's code of conduct
|
|
123
|
-
enforcement ladder](https://github.com/mozilla/diversity).
|
|
124
|
-
|
|
125
|
-
[homepage]: https://www.contributor-covenant.org
|
|
126
|
-
|
|
127
|
-
For answers to common questions about this code of conduct, see the FAQ at
|
|
128
|
-
https://www.contributor-covenant.org/faq. Translations are available at
|
|
129
|
-
https://www.contributor-covenant.org/translations.
|
|
130
|
-
|
package/CONTRIBUTING.md
DELETED
|
@@ -1,137 +0,0 @@
|
|
|
1
|
-
# Contributing to projen
|
|
2
|
-
|
|
3
|
-
Thanks for your interest in contributing to projen! :heart:
|
|
4
|
-
|
|
5
|
-
This document describes how to set up a development environment and submit your
|
|
6
|
-
contributions. Please read it carefully and let us know if it's not up-to date
|
|
7
|
-
(or even better, submit a pull request with your corrections! :wink:).
|
|
8
|
-
|
|
9
|
-
## Prerequisites
|
|
10
|
-
|
|
11
|
-
### Manually install tools
|
|
12
|
-
|
|
13
|
-
The following tools need to be installed to develop on projen locally.
|
|
14
|
-
|
|
15
|
-
- [Node]
|
|
16
|
-
- [Yarn]
|
|
17
|
-
- [Maven]
|
|
18
|
-
|
|
19
|
-
[Node]: https://nodejs.org/en/download/
|
|
20
|
-
[Yarn]: https://yarnpkg.com/en/docs/install
|
|
21
|
-
[Maven]: https://maven.apache.org/install
|
|
22
|
-
|
|
23
|
-
## Getting Started
|
|
24
|
-
|
|
25
|
-
The basic commands to get the repository cloned and built locally follow:
|
|
26
|
-
|
|
27
|
-
```console
|
|
28
|
-
$ git clone git@github.com:projen/projen
|
|
29
|
-
$ cd projen
|
|
30
|
-
$ yarn # install dependencies
|
|
31
|
-
$ yarn build # build projen
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
## Code Organization
|
|
35
|
-
|
|
36
|
-
Check out [this recording](https://www.youtube.com/watch?v=8dHwnuSND14) from a walkthrough of the projen codebase.
|
|
37
|
-
|
|
38
|
-
### Development workflow
|
|
39
|
-
|
|
40
|
-
The projen package has the following scripts:
|
|
41
|
-
|
|
42
|
-
- `build` - builds the package and runs all unit tests
|
|
43
|
-
- `watch` - watches for file changes and builds them progressively
|
|
44
|
-
- `test` - executes all unit tests
|
|
45
|
-
- `test:update` - executes all unit tests and overwrites snapshot expectations (those `.snap` files).
|
|
46
|
-
- `test:watch` - runs all unit tests and reruns tests when files are changed
|
|
47
|
-
- `package` - emits publishable artifacts to `dist`.
|
|
48
|
-
- `eslint` - run linter against source code
|
|
49
|
-
|
|
50
|
-
Each of these scripts can be executed using `yarn <script>` or `npx projen <script>`.
|
|
51
|
-
|
|
52
|
-
Tests are located under `src/__tests__` and executed from javascript code, so
|
|
53
|
-
make sure to compile once before running any tests.
|
|
54
|
-
|
|
55
|
-
One trick for quickly iterating is to run `yarn watch` in one terminal, and
|
|
56
|
-
`yarn test:watch` in another. Then, when you change your unit tests the code
|
|
57
|
-
will automatically recompile, thus triggering the tests to automatically re-run.
|
|
58
|
-
|
|
59
|
-
#### Linting & Formatting
|
|
60
|
-
|
|
61
|
-
Eslint is used to lint and format our typescript code. The `eslint`
|
|
62
|
-
script can be run from the root of the package.
|
|
63
|
-
|
|
64
|
-
You can integrate the linting and formatting workflow with your editor or ide by
|
|
65
|
-
installing the approporiate eslint plugin. For example, when using Visual Studio
|
|
66
|
-
Code, the [eslint plugin](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint)
|
|
67
|
-
exposes a number of options including "fix on save". This will auto correct lint
|
|
68
|
-
and formatting errors whenever possible while saving a document.
|
|
69
|
-
|
|
70
|
-
### Testing against local projects
|
|
71
|
-
|
|
72
|
-
When your local version of projen builds successfully, you can test it to create
|
|
73
|
-
a new project by going into another directory and invoking the binary directly:
|
|
74
|
-
|
|
75
|
-
First, tell yarn to create a link from your local development copy:
|
|
76
|
-
|
|
77
|
-
```console
|
|
78
|
-
$ cd /path/to/local/projen
|
|
79
|
-
$ yarn link
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
Now, to create new projects:
|
|
83
|
-
|
|
84
|
-
```console
|
|
85
|
-
$ mkdir /my/new/project
|
|
86
|
-
$ cd /my/new/project
|
|
87
|
-
$ yarn link projen
|
|
88
|
-
$ alias pj="node_modules/projen/bin/projen"
|
|
89
|
-
$ pj new TYPE
|
|
90
|
-
$ yarn link projen # <-- important to run this again
|
|
91
|
-
```
|
|
92
|
-
|
|
93
|
-
If you already have an existing project and you want to test a new projen
|
|
94
|
-
feature against it:
|
|
95
|
-
|
|
96
|
-
```console
|
|
97
|
-
$ cd /my/other/project
|
|
98
|
-
$ yarn link projen
|
|
99
|
-
$ pj
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
From now on, running `pj` in this session will use the local development version of
|
|
103
|
-
projen instead of the latest one from npm.
|
|
104
|
-
|
|
105
|
-
```console
|
|
106
|
-
$ yarn unlink projen
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
### Version bumping
|
|
110
|
-
|
|
111
|
-
Currently projen bumps versions automatically thru a GitHub action when a commit
|
|
112
|
-
pushed to master successfully builds. Projen follows [semantic versioning](https://semver.org/)
|
|
113
|
-
through the [standard-version](https://github.com/conventional-changelog/standard-version)
|
|
114
|
-
npm utility.
|
|
115
|
-
|
|
116
|
-
## Making a pull request
|
|
117
|
-
|
|
118
|
-
* Commit title and message (and PR title and description) must adhere to [conventionalcommits](https://www.conventionalcommits.org).
|
|
119
|
-
* The title must begin with `feat(module): title`, `fix(module): title`,
|
|
120
|
-
`refactor(module): title` or `chore(module): title`, where the module refers
|
|
121
|
-
to the projects or components that the change centers on.
|
|
122
|
-
The module can be omitted, so "feat: title" is okay as well.
|
|
123
|
-
* Title should be lowercase.
|
|
124
|
-
* No period at the end of the title.
|
|
125
|
-
* Commit message should describe _motivation_. Think about your code reviewers and what information they need in
|
|
126
|
-
order to understand what you did. If it's a big commit (hopefully not), try to provide some good entry points so
|
|
127
|
-
it will be easier to follow.
|
|
128
|
-
* Commit message should indicate which issues are fixed: `fixes #<issue>` or `closes #<issue>`.
|
|
129
|
-
* Shout out to collaborators.
|
|
130
|
-
* If not obvious (i.e. from unit tests), describe how you verified that your change works.
|
|
131
|
-
* If this commit includes breaking changes, they must be listed at the end in the following format (notice how multiple breaking changes should be formatted):
|
|
132
|
-
|
|
133
|
-
```
|
|
134
|
-
BREAKING CHANGE: Description of what broke and how to achieve this behavior now
|
|
135
|
-
* **module-name:** Another breaking change
|
|
136
|
-
* **module-name:** Yet another breaking change
|
|
137
|
-
```
|
package/SECURITY.md
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
# Security Policy
|
|
2
|
-
|
|
3
|
-
## Supported Versions
|
|
4
|
-
|
|
5
|
-
Use this section to tell people about which versions of your project are
|
|
6
|
-
currently being supported with security updates.
|
|
7
|
-
|
|
8
|
-
| Version | Supported |
|
|
9
|
-
| ------- | ------------------ |
|
|
10
|
-
| 0.x | :white_check_mark: |
|
|
11
|
-
|
|
12
|
-
## Reporting a Vulnerability
|
|
13
|
-
|
|
14
|
-
Use this section to tell people how to report a vulnerability.
|
|
15
|
-
|
|
16
|
-
Tell them where to go, how often they can expect to get an update on a
|
|
17
|
-
reported vulnerability, what to expect if the vulnerability is accepted or
|
|
18
|
-
declined, etc.
|
package/VISION.md
DELETED
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
# The vision of projen
|
|
2
|
-
|
|
3
|
-
This is basically a paper napkin for ideas for the roadmap for the project. Comments/PRs are more than welcome!
|
|
4
|
-
|
|
5
|
-
## Ecosystem
|
|
6
|
-
|
|
7
|
-
"Batteries included" is a very powerful concept. It allows users to discover the breadth of their options using a
|
|
8
|
-
single experience, instead of having to read the manual for 4 different plugins with horrible versioning conflicts.
|
|
9
|
-
|
|
10
|
-
On the other hand, one of the goals of projen is to support the ever-increasing amount of tools people use in order to build software,
|
|
11
|
-
and to allow teams to use projen internally for their needs and to do that, we must have an open ecosystem which allows anyone to
|
|
12
|
-
freely publish and consume components and projects.
|
|
13
|
-
|
|
14
|
-
So we need to solve a few problems:
|
|
15
|
-
|
|
16
|
-
- Discovery: projects/components from ecosystem libraries should feel 1st class.
|
|
17
|
-
- Velocity: a single codebase can easily manage breaking changes in APIs, but it's much harder to do that at the
|
|
18
|
-
ecosystem level, and usually a source of a lot of frustration.
|
|
19
|
-
|
|
20
|
-
### Discovery
|
|
21
|
-
|
|
22
|
-
The desired experience is that `projen new --help` will list all public project types, including types from ecosystem libraries.
|
|
23
|
-
|
|
24
|
-
A simple solution that may go a long way is to create a "sources" file in the projen repo, and allow anyone to add their library
|
|
25
|
-
to the file through a pull request. The source list will be basically names of npm modules. During _build_, we will process this
|
|
26
|
-
list by downloading the package information from npm, and injest their `.jsii` manifests into the CLI.
|
|
27
|
-
|
|
28
|
-
Yes, this means that new sources will be added only when projen is released. But projen is released for every merged PR.
|
|
29
|
-
|
|
30
|
-
We will also need to indicate major version compatibility of each project/component (see "Velocity" below).
|
|
31
|
-
|
|
32
|
-
### Velocity
|
|
33
|
-
|
|
34
|
-
In semver (semantic versioning), the only right way to introduce a breaking change (API or behavioral) is to release
|
|
35
|
-
a new major version. It will take a couple of years for projen to stabilize, and we want the ecosystem to grow with it.
|
|
36
|
-
A monolithic module makes this less of a problem because there aren't many libraries that depend on projen, so a major
|
|
37
|
-
version once in a while is tolerable.
|
|
38
|
-
|
|
39
|
-
This means that projen will release major versions all the time. Think 232.4.34.
|
|
40
|
-
|
|
41
|
-
So we need our ecosystem to continuously take updates and release new versions that were tested with the new major version.
|
|
42
|
-
In most cases, projects and component won't get broken, but sometimes they will and then the maintainer will need to resolve.
|
|
43
|
-
Luckily this mechanism already exists in projen (`projenUpgradeSecret`).
|
|
44
|
-
It is opt-in because it requires a the user to upload a GitHub secret, but maybe if we implement some support for secret management,
|
|
45
|
-
we could make that the default behavior.
|
|
46
|
-
|
|
47
|
-
As mentioned above, when we process our "sources" during build, we can check the projen version they were tested with and
|
|
48
|
-
determine if it's compatible with the version on the user's system.
|
|
49
|
-
|
|
50
|
-
## Services
|
|
51
|
-
|
|
52
|
-
projen should be able to deploy & manage cloud services related to your development environment. For example,
|
|
53
|
-
a service to manage secrets for me in AWS Secrets Manager, a cloud development account, CI/CD infrastructure, etc.
|
|
54
|
-
|
|
55
|
-
Using the CDKs (AWS CDK, CDK for Terraform, CDK for Kubernetes), complete services can be expressed as constructs
|
|
56
|
-
and shared and published as libraries. It is fairly easy (#) to simply allow CDK constructs to be freely used
|
|
57
|
-
inside projen components.
|
|
58
|
-
|
|
59
|
-
## Ideas
|
|
60
|
-
|
|
61
|
-
- [ ] Components: re-think/re-factor how components and projects interact to allow more modular and composable usage.
|
|
62
|
-
- [ ] Discoverability of external components/modules through the CLI
|
|
63
|
-
- [ ] Support projenrc in YAML (fully declarative, if one desires)
|
|
64
|
-
- [x] CLI bash completion
|
package/projen.bash
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
# ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen".
|
|
3
|
-
set -euo pipefail
|
|
4
|
-
if [ ! -f lib/cli/index.js ]; then
|
|
5
|
-
echo "bootstrapping..."
|
|
6
|
-
npx jsii --silence-warnings=reserved-word --no-fix-peer-dependencies
|
|
7
|
-
fi
|
|
8
|
-
exec bin/projen $@
|