Skip to content

feat: V1 - #14

Open
aripalo wants to merge 12 commits into
mainfrom
updates-20260804
Open

feat: V1#14
aripalo wants to merge 12 commits into
mainfrom
updates-20260804

Conversation

@aripalo

@aripalo aripalo commented Aug 4, 2026

Copy link
Copy Markdown
Contributor
  • global src/constant.ts to hold values used by .projenrc.ts (this project itself) and src/AlmaCdkConstructLibrary.ts (downstream projects)
  • Bump pnpm version to v11
  • Disallow use of incorrect pnpm versions
  • Bump up deps (and fix audit issues)
  • Upgrade constructs peer dep to constructs@v10.7
  • Use Projen@0.101.x and jsii@6 toolchain
  • Require at least NodeJS v22 (since v20 is EOL'd)
  • Release as major v1

aripalo and others added 8 commits August 4, 2026 14:44
Extract the versions and commands that were duplicated between this
repository's own .projenrc.ts and the AlmaCdkConstructLibrary project type
into a single module, so the root project and downstream projects share one
source of truth.

CDK_DEFAULT_VERSION and CONSTRUCTS_DEFAULT_VERSION move out of
src/schemas/almaCdkConstructLibraryOptions.ts and keep their public names,
so this is not an API change: jsii ignores module-level constants, and both
API.md and .jsii are unaffected.

Purely mechanical: every value is identical, and the existing snapshot
passes untouched.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
pnpmVersion only reached the generated workflows, so a local `pnpm` in the
project directory kept resolving to whatever version was installed globally.
Write the package.json `packageManager` field as well: pnpm self-downloads
and runs that exact version (`managePackageManagerVersions` is on by default
since pnpm v10), so local runs and CI now agree. Both values derive from the
single PNPM_VERSION constant, so they cannot drift.

The field is set in NodeConfig, which both this repository's .projenrc.ts and
AlmaCdkConstructLibrary instantiate, so downstream projects get the same pin.

Migrating onlyBuiltDependencies to allowBuilds is part of the same change:
pnpm v11 deprecates the former and ignores it, which with strictDepBuilds
made `pnpm i` fail with ERR_PNPM_IGNORED_BUILDS for unrs-resolver. That would
have broken CI as soon as the workflows moved to pnpm 11, independently of
the local pin.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
managePackageManagerVersions downloads the pinned pnpm, but nothing catches
the paths where that did not happen: a contributor who disabled the setting,
or a stale corepack pin. Enabling packageManagerStrictVersion turns those into
a hard failure instead of silently installing with a different pnpm.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
pnpm v11 does not implement this setting: switchCliVersion() runs the exact
version from the `packageManager` field unconditionally – it switches down as
readily as up, ignores manage-package-manager-versions=false, and errors out
when the field names another package manager. The string "strictVersion" no
longer appears anywhere in the pnpm 11.19.0 distribution.

The safety net it was meant to add is therefore already built in, and writing
the setting into every generated pnpm-workspace.yaml only implied a guarantee
that pnpm silently ignored.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
pnpm v11 no longer implements these, so accepting them let downstream
projects write pnpm-workspace.yaml entries that are silently ignored – the
failure mode we hit with onlyBuiltDependencies, where the build was skipped
and strictDepBuilds failed the install.

Superseded by allowBuilds (which pnpm documents as replacing them, and which
is the only key its createAllowBuildFunction consults besides
dangerouslyAllowAllBuilds):

  onlyBuiltDependencies, onlyBuiltDependenciesFile,
  ignoredBuiltDependencies, neverBuiltDependencies

Now enforced unconditionally by pnpm, so no longer configurable:

  packageManagerStrict, packageManagerStrictVersion,
  managePackageManagerVersions

Renamed or removed, with their replacements still present:

  allowNonAppliedPatches (-> allowUnusedPatches), ignorePatchFailures,
  ignoreDepScripts (-> ignoreScripts), useNodeVersion (-> nodeVersion)

Every removal was checked against the pnpm 11.19.0 distribution: none of
these names appear in it, in either camelCase or kebab-case.

The public pnpmSettings type still comes from the upstream JSON schema, so
these keys remain type-visible and are now rejected at synth instead.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Restores the guard dropped in 6baea34. That commit was right that pnpm v11
never reads packageManagerStrictVersion, and wrong that this makes the setting
pointless: it is read by whatever pnpm the project is launched with, which is
precisely when it earns its place.

Verified against a project pinned to pnpm@11.19.0:

  pnpm 10.33.4, self-switching disabled  ->  ERROR This project is configured
                                             to use v11.19.0 of pnpm. Your
                                             current pnpm is v10.33.4
  same, guard absent                     ->  silently installs as 10.33.4

Written to .npmrc rather than pnpm-workspace.yaml because pnpm v9 reads
settings only from .npmrc – it rejects a settings-only workspace file with
"packages field missing or empty" – while v10.16+ honours either and v11
ignores both. One entry therefore covers every version that implements it.

Also restores packageManagerStrict, packageManagerStrictVersion and
managePackageManagerVersions to the pnpmSettings schema, for the same reason:
they are evaluated by the launching pnpm, so "absent from v11" was the wrong
test for them. The install-time settings pruned in 239ea49 stay out, since a
mismatched client is now stopped before it can install.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Aug 4, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@aripalo, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 32 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 5c2f9fa1-4b5d-4297-a2f0-0626f42f2bd5

📥 Commits

Reviewing files that changed from the base of the PR and between 5dc11da and 6584762.

⛔ Files ignored due to path filters (1)
  • test/__snapshots__/AlmaCdkConstructLibrary.test.ts.snap is excluded by !**/*.snap
📒 Files selected for processing (3)
  • package.json
  • src/constants.ts
  • test/schemas/almaCdkConstructLibraryOptions.test.ts
📝 Walkthrough

Walkthrough

The project centralizes tool versions, updates pnpm workspace and TypeScript configuration, modernizes generated tasks, upgrades CI and release workflows, and refreshes API and upgrade documentation.

Changes

Toolchain modernization

Layer / File(s) Summary
Compiler and project configuration
.eslintrc.json, .gitattributes, .gitignore, .npmignore, .npmrc, .projen/files.json, src/constants.ts, src/schemas/*, tsconfig.json, projenrc/tsconfig.json, test/tsconfig.json
TypeScript project settings, generated-file tracking, ignore rules, schema settings, and strict pnpm version enforcement now use the updated configuration.
pnpm workspace integration
src/pnpmWorkspaceSettings.ts, src/NodeConfig.ts, src/AlmaCdkConstructLibrary.ts, src/index.ts, .projenrc.ts, pnpm-workspace.yaml, test/*
Shared constants and dedicated workspace utilities now configure pnpm settings through Projen. Tests cover merged workspace settings and updated defaults.
Generated project and release tasks
package.json, .projen/deps.json, .projen/tasks.json, .projenrc.ts
Dependencies, Node.js support, Projen commands, structured task arguments, and release version bumping now use updated values and task definitions.
CI and release artifact flow
.github/workflows/build.yml, .github/workflows/release.yml, .github/workflows/upgrade-main.yml, .github/workflows/pull-request-lint.yml, .mergify.yml
Workflows use newer actions, pinned pnpm setup, artifact IDs, step identifiers, and optional release dry runs. Mergify uses structured commit formatting and retains merged head branches.
API and project documentation
API.md, README.md
Documentation reflects current Projen APIs, stable package status, supported versions, pnpm commands, lifecycle methods, and upgrade procedures.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant ReleaseWorkflow
  participant BuildJob
  participant ArtifactStorage
  participant GitHubReleaseJob
  participant NpmReleaseJob
  ReleaseWorkflow->>BuildJob: start release build
  BuildJob->>ArtifactStorage: upload build artifact
  ArtifactStorage-->>BuildJob: return artifact_id
  BuildJob-->>ReleaseWorkflow: expose artifact_id
  ReleaseWorkflow->>GitHubReleaseJob: pass artifact_id and dry_run
  GitHubReleaseJob->>ArtifactStorage: download artifact by artifact_id
  ReleaseWorkflow->>NpmReleaseJob: pass artifact_id and dry_run
  NpmReleaseJob->>ArtifactStorage: download artifact by artifact_id
  GitHubReleaseJob-->>ReleaseWorkflow: skip publishing when dry_run is enabled
  NpmReleaseJob-->>ReleaseWorkflow: pass dry-run mode to publib
Loading
🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title identifies a V1 feature but does not clearly summarize the broad release, tooling, dependency, and Node.js changes. Use a specific title such as "feat: prepare stable v1 release and upgrade toolchain".
✅ Passed checks (3 passed)
Check name Status Explanation
Description check ✅ Passed The description clearly summarizes the main changes, but it does not include the template's issue reference section.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch updates-20260804

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@aripalo aripalo changed the title Updates 20260804 feat: V1 Aug 4, 2026
aripalo and others added 2 commits August 5, 2026 13:12
Projen's `NodePackage` unconditionally declares `pnpm-workspace.yaml` for
every pnpm project (via `javascript.PnpmWorkspaceYaml`), so writing that
file from our own component now aborts synthesis with "There is already a
file under pnpm-workspace.yaml" -- a construct-tree uniqueness check, not
a refusal to overwrite anything on disk.

Move the hardened workspace defaults into `buildPnpmWorkspaceYamlOptions()`
and feed them in as `pnpmOptions.workspaceYamlOptions`. That is the only
supported route: projen creates its file with `omitEmpty`, and raw
overrides are dropped whenever the base object resolves to nothing, so
`addOverride` would silently delete the file instead of extending it.

`NodeConfig` keeps the rest of the toolchain pinning (.nvmrc, the
`packageManager` field, and the .npmrc strict-version guard).

Also part of this upgrade:

- bump jsii/jsii-rosetta to ~6.0.7 and the minimum Node version to 22
- adopt projen 0.101's TypeScript config layout, where tsconfig.json,
  test/tsconfig.json and projenrc/tsconfig.json replace tsconfig.dev.json
- refresh assertions that the upgrade made stale (codecov-action v6,
  Node 22) and the project snapshot

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@aripalo
aripalo marked this pull request as ready for review August 5, 2026 10:22

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@API.md`:
- Around line 551-554: Update the dependency-resolution explanation in API.md to
state that npm install can produce multiple concrete constructs versions when
dependency ranges conflict, alongside manual symlinks and monorepo tooling.
Preserve the existing instanceof warning while removing the claim that npm
install cannot create duplicate constructs installations.

In `@README.md`:
- Line 82: Update the README’s generated-files guidance to include all
Projen-managed outputs, specifically .projen/deps.json, .projen/files.json, and
.projen/tasks.json, alongside package.json, .github/workflows/*, and
pnpm-lock.yaml; instruct users to commit changes to these generated files.

In `@src/constants.ts`:
- Around line 43-47: Update CONSTRUCTS_DEFAULT_VERSION in constants.ts to the
intended V1 constructs version, 10.7.2, so omitted constructsVersion values and
generated peer dependencies use ^10.7.2. Refresh the generated .projen/deps.json
and the affected test snapshot, leaving CDK_DEFAULT_VERSION unchanged.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: ca793749-fe68-4134-baa9-c2e32757a0bd

📥 Commits

Reviewing files that changed from the base of the PR and between 8709a75 and 5dc11da.

⛔ Files ignored due to path filters (2)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
  • test/__snapshots__/AlmaCdkConstructLibrary.test.ts.snap is excluded by !**/*.snap
📒 Files selected for processing (31)
  • .eslintrc.json
  • .gitattributes
  • .github/workflows/build.yml
  • .github/workflows/pull-request-lint.yml
  • .github/workflows/release.yml
  • .github/workflows/upgrade-main.yml
  • .gitignore
  • .mergify.yml
  • .npmignore
  • .npmrc
  • .projen/deps.json
  • .projen/files.json
  • .projen/tasks.json
  • .projenrc.ts
  • API.md
  • README.md
  • package.json
  • pnpm-workspace.yaml
  • projenrc/tsconfig.json
  • src/AlmaCdkConstructLibrary.ts
  • src/NodeConfig.ts
  • src/constants.ts
  • src/index.ts
  • src/pnpmWorkspaceSettings.ts
  • src/schemas/almaCdkConstructLibraryOptions.ts
  • src/schemas/pnpmSettings.ts
  • test/AlmaCdkConstructLibrary.test.ts
  • test/pnpmWorkspaceSettings.test.ts
  • test/schemas/almaCdkConstructLibraryOptions.test.ts
  • test/tsconfig.json
  • tsconfig.json

Comment thread API.md
Comment thread README.md
Comment thread src/constants.ts Outdated
aripalo and others added 2 commits August 5, 2026 13:50
`NODEJS_WORKFLOW_VERSION` was an alias of `NODEJS_MAX_VERSION`, so widening
the supported range would also have moved every generated workflow onto Node
26. Give it its own value so the supported ceiling and the version CI builds
on can move independently; workflows and .nvmrc stay on 24.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant