Skip to content

feat!: bump to cdktn 0.24 and use the pre-built @cdktn/provider-azapi bindings - #128

Draft
so0k (so0k) wants to merge 2 commits into
Azure:mainfrom
so0k:feat/cdktn-0.24-prebuilt-azapi
Draft

so0k (so0k) wants to merge 2 commits into
Azure:mainfrom
so0k:feat/cdktn-0.24-prebuilt-azapi

Conversation

@so0k

Copy link
Copy Markdown

Draft, stacked on the projen PR. The diff includes that PR's commit until it merges. Held in draft pending cdktn 0.25 (its release PR follows merged PRs adopting jsii 6.0 and TypeScript 6) and a matching @cdktn/provider-azapi release; the current 1.0.0 peer-depends on cdktn ^0.24.0. Once those ship, this PR will be retargeted to 0.25, which also means moving jsiiVersion/typescriptVersion to 6.x.

Summary

Replaces the ~9k lines of AZAPI bindings vendored under src/core-azure/lib/azapi/providers-azapi/ (generated for azapi 2.7.0) with the community-published @cdktn/provider-azapi package (azapi 2.13.0, tracks ~> 2.11), and bumps cdktn to 0.24.

Breaking changes

  • @cdktn/provider-azapi becomes a peer dependency. TypeScript users install @microsoft/terraform-cdk-constructs @cdktn/provider-azapi; Python users add cdktn-provider-azapi.
  • AzapiProvider and its config types are no longer types of this package. The TypeScript re-export from core-azure still works, but in Python (and Java/.NET/Go if re-enabled) the class now lives in the provider module. API.md reflects this (~700 removed lines, ~1.9k added for the new foreign references).
  • Synthesized required_providers moves from ~> 2.7 to ~> 2.13; cdktf.json updated to match.
  • constructs minimum 10.5.0 → 10.7.2 (cdktn 0.24 and the provider require >=10.6.0 <10.8.0).

Why

  • One type identity: today a user who also installs @cdktn/provider-azapi gets two incompatible AzapiProvider classes.
  • No duplicate publishing of the provider bindings under the Microsoft namespace in every jsii language.
  • Provider updates become a dependency bump instead of regenerating and committing bindings (the vendored copy lagged six azapi minors).

Trade-off: the single-package install story is gone, and this repo now follows the cdktn/provider release cadence.

Changes

  • .projenrc.ts: cdktnVersion: "0.24.0", constructsVersion: "10.7.2", @cdktn/provider-azapi@^1.0.0 as peer + dev dep, eslint ignore for the vendored dir removed.
  • 55 import sites rewritten to @cdktn/provider-azapi/lib/<module>; every other source diff is eslint import-order auto-fix.
  • yarn.lock: jsii 5.9.31 → 5.9.55 within the existing ~5.9.0 range. Older 5.9.x could not resolve the provider's deep-import type FQNs (JSII9002 ... not exported from the package.json "main" file).
  • README / ARCHITECTURE describe the provider as a peer dependency.

Not included yet: the new cdktn feature flags (canonicalAssetHashes, failOnConstructsOutsideOfStacks, validateFunctionVersions) in cdktf.json. Worth a follow-up once the spec suites are checked against them.

Test plan

npx projen build locally: compile ✅, 59 suites / 1978 tests ✅, eslint 0 errors (57 pre-existing warnings), docgen ✅, pacmak js + python ✅. Integration tests (npm run integration) not run.

🤖 Generated with Claude Code

so0k (so0k) and others added 2 commits October 12, 2026 11:34
…ct type

projen 0.104 ships `cdktn.ConstructLibraryCdktn`, so the repo no longer needs
to emulate it with `cdktf.ConstructLibraryCdktf` plus a manual
`removeDependency("cdktf")` and a `keywords` override.

Project type and dependencies
- `.projenrc.ts` now uses `cdktn.ConstructLibraryCdktn({ cdktnVersion: "0.22.0" })`.
  cdktn and constructs become peer + dev dependencies (jsii convention);
  `cdktn` is removed from runtime `dependencies`, where the old projenrc had
  added it explicitly.
- projen ^0.81 -> ^0.104.4.
- constructs minimum 10.4.2 -> 10.5.0 (projen 0.104 peer-depends on
  ^10.5.0; still within cdktn@0.22.0's ^10.4.2 peer range). API.md gains the
  inherited `with(mixins)` method that constructs 10.5 added to every construct.
- minNodeVersion 20.16.0 -> 22.19.0: cdktn@0.22.0 already declares
  `engines.node >= 22.19.0`, and cdktn's v0.23 upgrade guide announces Node 22
  as the upcoming minimum. Workflows now set up Node 22.19.0.

Pinned to preserve current behaviour
- `tsconfigDevFile: "tsconfig.dev.json"`: newer projen defaults the dev
  tsconfig to `<testdir>/tsconfig.json`, which is invalid with `testdir: ""`.
- `tsconfig.compilerOptions.module: "commonjs"`: projen's new jsii default is
  `node16`, which rejects the extension-less dynamic `import()` calls in
  azapi-resource.ts. jsii's strict ruleset accepts commonjs.
- Drop the empty eslint lint pattern that `testdir: ""` produces; eslint 9
  errors on it.

Generated-file churn from the projen upgrade
- eslint 8 -> 9 (legacy config mode), typescript-eslint 6 -> 8,
  standard-version -> commit-and-tag-version, jest-junit 15 -> 17.
- GitHub Actions pinned to commit SHAs, package jobs rebuilt from the
  build artifact, release workflow gains a dry-run input.
- `package-lock.json` removed (yarn classic is the package manager).
- eslint's new `curly` rule added braces around four single-line throws in
  src/testing/index.ts.

Verified locally with `npx projen build`: compile, 59 test suites /
1978 tests, eslint, docgen and jsii-pacmak (js + python) all pass.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
… bindings

BREAKING CHANGE: the AZAPI provider classes are no longer vendored in this
package. They now come from `@cdktn/provider-azapi` (peer dependency), so
consumers must install it alongside this library, and non-TypeScript users
import `AzapiProvider` from the provider package rather than from
`microsoft_cdktfconstructs`.

- cdktn 0.22.0 -> 0.24.0; constructs 10.5.0 -> 10.7.2 (cdktn 0.24 and the
  provider require >=10.6.0 <10.8.0).
- Add `@cdktn/provider-azapi@^1.0.0` as peer + dev dependency and delete
  `src/core-azure/lib/azapi/providers-azapi/` (~9k generated lines for
  azapi 2.7.0). The pre-built package tracks azapi `~> 2.11` (2.13.0 today), so
  the synthesized `required_providers` constraint moves from `~> 2.7` to
  `~> 2.13`; `cdktf.json` updated to match.
- Rewrite the 55 import sites to `@cdktn/provider-azapi/lib/<module>`; all
  other source changes are eslint import-order fixes.
- jsii lockfile bump 5.9.31 -> 5.9.55 within the existing `~5.9.0` range:
  older 5.9.x could not resolve the provider's deep-import type FQNs.
- README / ARCHITECTURE: describe the provider as a peer dependency.

Verified locally with `npx projen build`: compile, 59 suites / 1978 tests,
eslint (57 pre-existing-style warnings, 0 errors), docgen, pacmak js+python.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

This branch is waiting to be deployed

1 waiting deployment
Build — 4475d298 Waiting Oct 12, 2026 by so0k via build #197
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