projen-modules
A collection of custom projen modules, that can be used to bootstrap and maintain consistent project configuration, tooling, dependencies, and builds.
Getting Started
yarn install
npx projen build
This will:
- Install the dependencies
- Apply any projen changes
- Run tests
- Package project locally
Any files changed by projen should be committed to git.
Running the tests like this will update any snapshot files, this should be reviewed and committed to git.
Testing
Types of testing:
- Snapshot - projen project outputs are stored as a snapshot in the corresponding
__snapshots__directory. When the project changes then it is expected that these snapshots change too and should be reviewed committed alongside the project. - Unit tests - these assert on specific functionality of the project and should be written for any new functionality added.
Creating a New Project
npx projen new {project} --from projen-modules
Some projects may have required fields that need to be specified as part of this command, review any errors for details what needs to be specified.
Project Types
| Project type | Description |
|---|---|
| cdk-typescript-app | A typescript CDK app |
| npm-package | A typescript npm package |
| python-package | A python package |
| jsii-package | A typescript JSII package |
Project Structure
All source is located in src and is grouped by:
components- these are common building blocks that can be used by projects to implement specific project functionality.projects- these are projects that can be built from this project (see #something)utils- these are helper functions that are often reused
test contains tests, and mirrors the src directory structure. Within here there are __snapshots__ which contain snapshots of project tests (see #section).
GitHub Configuration
All pull requests are merged by the Mergify merge queue, configured in .mergify.yml. Once a pull request is approved, or is opened by daveshepherd, and its checks pass, Mergify queues it, brings it up to date with the default branch, waits for the checks again and squash merges it. Draft pull requests and those labelled do-not-merge are not merged.
The repository must be configured as below so that nothing can be merged without going through the queue.
Mergify
Install the Mergify GitHub App and give it access to this repository.
Pull request settings
In Settings → General → Pull Requests:
- Allow squash merging only (untick merge commits and rebase merging), matching the queue's merge method.
- Untick Allow auto-merge, because GitHub's own auto-merge merges outside the queue.
- Tick Automatically delete head branches.
Actions settings
In Settings → Actions → General, set Approval for running fork pull request workflows from contributors to Require approval for all external contributors. A pull request from a fork runs its own copy of the workflows, so it can change how the required checks pass.
Code scanning
CodeQL runs from .github/workflows/codeql.yml, which is managed by projen. In Settings → Advanced Security, leave CodeQL Default setup off, because it cannot run alongside this workflow. Under Protection rules, keep the Check run failure threshold at High or higher for security alerts and Errors for other alerts, as this decides whether the CodeQL check fails. Private repositories also need GitHub Code Security enabled there for code scanning results to be uploaded.
Branch ruleset
In Settings → Rules → Rulesets, create a branch ruleset with enforcement Active that targets the default branch, and set:
- Bypass list: the Mergify app only, in Exempt mode. Do not add admins or other roles, as anyone on this list can merge without the queue.
- Restrict updates: only bypass actors can update the branch, so pull requests cannot be merged from the GitHub UI or CLI and commits cannot be pushed directly.
- Restrict deletions and Block force pushes.
- Require a pull request before merging, with 0 required approvals, because Mergify requires approvals itself for authors other than
daveshepherdand is exempt from this rule. Tick Dismiss stale pull request approvals when new commits are pushed, so that commits pushed after an approval need approving again before the queue merges them. - Require status checks to pass, listing the checks that
.mergify.ymlwaits for:build,package-js,package-python. Leave Require branches to be up to date before merging unticked, as the queue already updates and retests each pull request. - Require code scanning results, with the tool CodeQL, security alerts set to High or higher and alerts set to Errors. Mergify is exempt from this rule, so
.mergify.ymlalso waits for theCodeQLcheck instead.
Do not enable GitHub's own Require merge queue rule, as it competes with Mergify.
If the queue is unavailable and a change has to be merged, add yourself to the bypass list temporarily and remove yourself afterwards.
Known Issues
cdk-typescript-app defaults to Jest 30, which hoists @sinonjs/fake-timers 15 whose bundled types conflict with the @types/sinon used by aws-sdk-client-mock. Projects using aws-sdk-client-mock can set compilerOptions.skipLibCheck on the test tsconfig:
project.tryFindObjectFile('test/tsconfig.json')?.addOverride('compilerOptions.skipLibCheck', true);
Metadata
Release files for projen-modules 5.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| projen_modules-5.0.2.tar.gz | 426.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| projen_modules-5.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 851.9 kB
Release files / projen_modules-5.0.2.tar.gz
| Download URL | projen_modules-5.0.2.tar.gz |
|---|---|
| Size | 426.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8054968ddda5a3bc97265f8e31b825951f54204dfda1ce619f3358dbcbfadb41
|
|
BLAKE2b-256 checksum How to use checksums |
99b730c0f658ab930373f652731cdf792ba1ba91bb89edffa05438e2acd828f7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.14.8
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 11, 2026.
Transparency logRelease files / projen_modules-5.0.2-py3-none-any.whl
| Download URL | projen_modules-5.0.2-py3-none-any.whl |
|---|---|
| Size | 425.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ca1063f718b0a62cdf1ed78266f1f7eaed44b734706124207f8a9d2be17f693b
|
|
BLAKE2b-256 checksum How to use checksums |
3a4b456c01419fef44aa40a9c966b9d5374f5e9e6652c817c21f8f574e3d24be
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.14.8
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 11, 2026.
Transparency log