Repository navigation
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
Draft
so0k (so0k) wants to merge 2 commits into
so0k (so0k) wants to merge 2 commits into
Conversation
…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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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-azapipackage (azapi 2.13.0, tracks~> 2.11), and bumps cdktn to 0.24.Breaking changes
@cdktn/provider-azapibecomes a peer dependency. TypeScript users install@microsoft/terraform-cdk-constructs @cdktn/provider-azapi; Python users addcdktn-provider-azapi.AzapiProviderand its config types are no longer types of this package. The TypeScript re-export fromcore-azurestill 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).required_providersmoves from~> 2.7to~> 2.13;cdktf.jsonupdated to match.10.5.0→10.7.2(cdktn 0.24 and the provider require>=10.6.0 <10.8.0).Why
@cdktn/provider-azapigets two incompatibleAzapiProviderclasses.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.0as peer + dev dep, eslint ignore for the vendored dir removed.@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.0range. Older 5.9.x could not resolve the provider's deep-import type FQNs (JSII9002 ... not exported from the package.json "main" file).Not included yet: the new cdktn feature flags (
canonicalAssetHashes,failOnConstructsOutsideOfStacks,validateFunctionVersions) incdktf.json. Worth a follow-up once the spec suites are checked against them.Test plan
npx projen buildlocally: 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