Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: aws/aws-cdk-cli
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: @aws-cdk/cloud-assembly-schema@v41.0.0
Choose a base ref
...
head repository: aws/aws-cdk-cli
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: @aws-cdk/cloud-assembly-schema@v41.2.0
Choose a head ref

Commits on Mar 6, 2025

  1. feat(toolkit-lib): additional messages contain structured data (#193)

    Adds many more explicit codes and message payload to messages that
    previously were default messages.
    
    Within `toolkit-lib` replace all previous message helpers with the new
    Message Maker pattern: `CODES.CDK_CAT_I1234.msg("my message")`.
    
    ---
    By submitting this pull request, I confirm that my contribution is made
    under the terms of the Apache-2.0 license
    
    ---------
    
    Signed-off-by: github-actions <github-actions@github.com>
    Co-authored-by: Eli Polonsky <Eli.polonsky@gmail.com>
    Co-authored-by: github-actions <github-actions@github.com>
    3 people authored Mar 6, 2025
    Copy the full SHA
    a3160a7 View commit details
  2. feat(toolkit-lib): can disable cloud assembly version and enum checks…

    … for sources (#202)
    
    Fixes #201
    
    Feature request was for `cli-lib-alpha`, however we are instead adding
    this to the new package that should be used going forward.
    
    ---
    By submitting this pull request, I confirm that my contribution is made
    under the terms of the Apache-2.0 license
    mrgrain authored Mar 6, 2025
    Copy the full SHA
    6e0b7f2 View commit details
  3. feat(toolkit-lib): wrap errors from assembly builder into AssemblyErr…

    …or (#200)
    
    Fixes errors thrown from a CloudAssembly produced by a builder function
    are unstructured. Wrapping errors will allow better handling by
    implementors.
    
    Also introduced the `source` property on `ToolkitError`s as per the RFC,
    to denote the source of an error (user or toolkit).
    
    ---
    By submitting this pull request, I confirm that my contribution is made
    under the terms of the Apache-2.0 license
    mrgrain authored Mar 6, 2025
    Copy the full SHA
    e3b0856 View commit details
  4. chore: enforce consistent-type-imports eslint rule on modern packag…

    …es (#204)
    
    I would have liked to use the `verbatimModuleSyntax` tsconfig, but
    that's only available for ESM projects.
    
    ---
    By submitting this pull request, I confirm that my contribution is made
    under the terms of the Apache-2.0 license
    mrgrain authored Mar 6, 2025
    Copy the full SHA
    47a4e1d View commit details
  5. refactor(cli): require approval is a part of the CliIoHost (#151)

    `CliIoHost` now governs when to ask for approval or not. This was
    previously passed into deploy via deployOptions.
    
    - `deployOptions.requireApproval` was deprecated before, and now it is
    no longer being used (this may have to be pulled into a different change
    that removes the `requireApproval` option entirely in a minor version
    bump of toolkit-lib.
    - `CliIoHost` has a property, `requireApproval` that can be set. When
    the `requestResponse` API is called, we check to see if the message code
    is a known `requireApproval` code and if so, see if the request is
    necessary or if the default can be used.
    
    ---
    By submitting this pull request, I confirm that my contribution is made
    under the terms of the Apache-2.0 license
    
    ---------
    
    Signed-off-by: github-actions <github-actions@github.com>
    Co-authored-by: github-actions <github-actions@github.com>
    kaizencc and github-actions authored Mar 6, 2025
    Copy the full SHA
    7b00dd1 View commit details

Commits on Mar 7, 2025

  1. chore(toolkit-lib): fixes "ambiguous redirect" error during docs publ…

    …ishing (#205)
    
    It makes the job fail.
    
    ---
    By submitting this pull request, I confirm that my contribution is made
    under the terms of the Apache-2.0 license
    mrgrain authored Mar 7, 2025
    Copy the full SHA
    8c5ec76 View commit details
  2. chore(toolkit-lib): rename CODES to IO (#206)

    I don't want to type `CODES` all the time and the new name is more
    inline with the new purpose of a message builder registry anyway.
    
    ---
    By submitting this pull request, I confirm that my contribution is made
    under the terms of the Apache-2.0 license
    mrgrain authored Mar 7, 2025
    Copy the full SHA
    a6d4516 View commit details
  3. feat: record CLI version in manifest package (#184)

    Record the current CLI version in the manifest package when we release
    the manifest.
    
    This by itself will not trigger a new release of the
    `cloud-assembly-schema` package, so the version only gets recorded (and
    published!) when there is a new version of `cloud-assembly-schema` to
    publish anyway, and the version will only be displayed back to the user
    if there is an incompatibility of the major version number.
    
    That means we won't necessarily show the *lowest* possible CLI version
    number when the user needs to upgrade, but we'll show a valid CLI
    version number that will definitely support the given manifest.
    
    ---
    By submitting this pull request, I confirm that my contribution is made
    under the terms of the Apache-2.0 license
    
    ---------
    
    Signed-off-by: github-actions <github-actions@github.com>
    Co-authored-by: github-actions <github-actions@github.com>
    rix0rrr and github-actions authored Mar 7, 2025
    Copy the full SHA
    ef550a0 View commit details
  4. chore: remove .d.ts.map files (#208)

    ---
    By submitting this pull request, I confirm that my contribution is made
    under the terms of the Apache-2.0 license
    rix0rrr authored Mar 7, 2025
    Copy the full SHA
    2dca898 View commit details
  5. refactor(cli): make the cli use more shared code (#207)

    Removes duplicated interfaces.
    
    I know this is messy. Please bear with me 🙈 
    
    ---
    By submitting this pull request, I confirm that my contribution is made
    under the terms of the Apache-2.0 license
    mrgrain authored Mar 7, 2025
    Copy the full SHA
    db6aa96 View commit details
  6. fix: --force flag does not applies to assets (#197)

    The `cdk deploy --force` flag is intended to disable all smartness
    around saving work. If set, it won't check whether assets already exist
    in the cloud, and remove the build and publishing steps from the work
    graph.
    
    However, this by itself is not enough to make sure the asset truly gets
    published again, because the `publish()` action has its own version of
    short-circuiting again.
    
    Rather than remove the short-circuiting behavior from `cdk-assets`, we
    add another `{ force }` flag there as well, which gets its value from
    the CLI's `--force` flag.
    
    This will make it possible to recover from corrupted assets which were
    accidentally published, as fixed in
    aws/aws-cdk#33692, by running `rm -rf cdk.out &&
    cdk deploy --force`.
    
    Fixes aws/aws-cdk#14474.
    
    ---
    By submitting this pull request, I confirm that my contribution is made
    under the terms of the Apache-2.0 license
    
    ---------
    
    Signed-off-by: github-actions <github-actions@github.com>
    Co-authored-by: github-actions <github-actions@github.com>
    Co-authored-by: Kaizen Conroy <36202692+kaizencc@users.noreply.github.com>
    Co-authored-by: Momo Kornher <kornherm@amazon.co.uk>
    4 people authored Mar 7, 2025
    Copy the full SHA
    da515f4 View commit details
  7. refactor(cli): use IoHelper in internal APIs (#209)

    This PR is a lot. There is no good way of reviewing it, so thanks for
    taking the time.
    
    The main change here is the usage of the `IoHelper` in all internal
    APIs. Previously we would pass an `IoHost` and an `action` around as
    pair, but separate value. Instead we now use the `IoHelper` which knows
    how to send messages with an action.
    
    I also decided to rename all properties and params respectively. This is
    partly what makes the PR so large. Note that all changes are to private
    APIs.
    
    ---
    By submitting this pull request, I confirm that my contribution is made
    under the terms of the Apache-2.0 license
    mrgrain authored Mar 7, 2025
    Copy the full SHA
    c71caf0 View commit details

Commits on Mar 9, 2025

  1. docs(toolkit-lib): ensure all message data interfaces are documented …

    …and other improvements (#210)
    
    Main change here is to fail the build when the docs generation has
    warnings. This enforces that all referenced message data interfaces are
    exported and documented.
    
    Made some organizational changes and how the message registry is
    presented.
    Also added basic support for links to external interface from `cxapi`.
    
    ---
    By submitting this pull request, I confirm that my contribution is made
    under the terms of the Apache-2.0 license
    mrgrain authored Mar 9, 2025
    Copy the full SHA
    ac56f9b View commit details

Commits on Mar 10, 2025

  1. refactor(cli): replace getters and setters with a public field (#215)

    The `CliIoHost` had a number of fields that had the following pattern:
    
    ```ts
    class CliIoHost {
      private _someField: string;
    
      /** Get someField */
      public get someField() {
        return this._someField;
      }
    
      /** Set someField */
      public set someField(value: string) {
        this._someField = value;
      }
    }
    ```
    
    There is no additional code in the getters and setters other than
    directly forwarding every access to a private field, so the above is
    equivalent to the following:
    
    ```ts
    class CliIoHost {
      public someField: string;
    }
    ```
    
    Since the above is simpler, this PR proposed to remove the getters and
    setters and just expose the field mutably.
    
    If we ever want to run additional code in a setter in some of these
    fields, we can refactor back to a getter and setter pair without
    impacting source or binary compatibility (forwards compatibility was the
    argument in the olden C++ and Java days for pre-emptively wrapping
    fields in getters and setters, but doesn't apply in JS land).
    
    (🤖 This PR was generated using AI)
    
    ---
    By submitting this pull request, I confirm that my contribution is made
    under the terms of the Apache-2.0 license
    rix0rrr authored Mar 10, 2025
    Copy the full SHA
    4566d8d View commit details
  2. chore: remove unused dependencies (#216)

    - `glob` and `uuid` ship with types in their latest versions (which we
    use)
    - `make-runnable` is an unused dev dependency
    - `json-diff` and `source-map-support` are unused prod dependencies
    - We don't need the `CLI_SDK_VERSION` switch anymore, everything is on
    v3
    
    ---
    By submitting this pull request, I confirm that my contribution is made
    under the terms of the Apache-2.0 license
    mrgrain authored Mar 10, 2025
    Copy the full SHA
    db60595 View commit details
  3. refactor(cli): remove generic argument from notify<T>() (#217)

    The `IIoHost` interface has the following method:
    
    ```ts
    interface IIoHost {
      notify<T>(msg: IoMessage<T>): Promise<void>;
    }
    ```
    
    The generic parameter `T` is only used once, without bounds, for a
    singleton argument in input position. This means it is equivalent to the
    following:
    
    ```ts
    interface IIoHost {
      notify(msg: IoMessage<unknown>): Promise<void>;
    }
    ```
    
    (Preferring `unknown` over `any` so that implementors are forced to test
    for the type of the `data` field, just like they would need to do with
    an argument of type `T`)
    
    In the words of the [Java generics
    tutorial](https://docs.oracle.com/javase/tutorial/extra/generics/methods.html):
    
    > Generic methods allow type parameters to be used to express
    > dependencies among the types of one or more arguments to a method
    and/or
    > its return type. If there isn't such a dependency, a generic method
    > should not be used.
    
    Or [similar advice for
    TypeScript](https://effectivetypescript.com/2020/08/12/generics-golden-rule/):
    
    > Type Parameters Should Appear Twice
    >
    > Type parameters are for relating the types of multiple values. If a
    > type parameter is only used once in the function signature, it's not
    > relating anything.
    
    ---
    By submitting this pull request, I confirm that my contribution is made
    under the terms of the Apache-2.0 license
    
    ---------
    
    Co-authored-by: Momo Kornher <kornherm@amazon.co.uk>
    rix0rrr and mrgrain authored Mar 10, 2025
    Copy the full SHA
    e20f1a8 View commit details
  4. refactor(toolkit-lib): move message definitions to shared package (#220)

    Move the message definitions to the shared package and make them public.
    This also required moving a bunch of type definitions to the shared
    package because they are used as payloads for the message types.
    
    In the CLI it's now possible to access those numbers and access their
    associated payload types in a type-checked way.
    
    A type-safe `switch` statement now looks like this:
    
    <img width="583" alt="image"
    src="https://github.com/user-attachments/assets/01c1cbf6-2e1a-4b8f-bd5c-180f72ff2f55"
    />
    
    This change also makes the `data` field of an `IoMessage` required. The
    type of a message without payload is now `IoMessage<void>`: `data: void`
    is only inhabited by `data: undefined` which sort of tracks because
    `m.data === undefined` even if there is no payload (don't look too
    closely at the different behavior for `'data' in m` 😎 ). The type can no
    longer be `never` because a type like `{ data: never }` can not be
    inhabited by any values. We could also use `data: undefined`, *also*
    only admitting `undefined`, but `void` reads more clearly for its
    intent.
    
    ---
    By submitting this pull request, I confirm that my contribution is made
    under the terms of the Apache-2.0 license
    rix0rrr authored Mar 10, 2025
    Copy the full SHA
    0c21495 View commit details

Commits on Mar 11, 2025

  1. chore: in tests, publish both upstream and candidate versions of sche…

    …ma (#222)
    
    We need 2 different versions of `@aws-cdk/cloud-assembly-schema`
    versions available at the same time:
    
    - The candidate version is used by `cdk-assets` (which doesn't bundle
    it)
    - The released version is used by `aws-cdk-lib` (which is used as part
    of tests.
    
    Requires updating to a new version of cdklabs-projen-project-types.
    
    ---
    By submitting this pull request, I confirm that my contribution is made
    under the terms of the Apache-2.0 license
    rix0rrr authored Mar 11, 2025
    Copy the full SHA
    1b22ebc View commit details
  2. feat(toolkit-lib): emit marker messages during actions (#219)

    Introduces the new concept of "Message Spans" to connect multiple
    messages for toolkit sub-tasks like "synth" or "build-assets" together.
    A span consists of a number of messages that have the same `span` value.
    
    At a minimum, a span is a pair of a `start` and an `end` message. Every
    end message also reports the elapsed time since the start of the span.
    
    Message spans will allow integrators to more easily track the flow of
    "tasks" completed in the Toolkit.
    
    ## Changes
    
    - Refactors the previous `Timer` class to "Message Spans"
    - Introduces a new registry for spans at the bottom of the existing
    messages registry. A span consists of a start and an end message maker.
    - This PR makes use of the new `IoHelper` to provide a nicer API
    - There is some more of type magic to ensure correct payloads, I don't
    think this can be tested further
    - I also changed the message registry to be private again, we are not
    ready to have it as part of the public interface (this doesn't affect
    our packages)
    - Made some improvements to the bundling of declaration files. It's
    currently really slow because it ends up scanning through A LOT of SDK
    types. Will look into this more in a follow-up PR.
    
    Fixes aws/aws-cdk#33286
    
    ---
    By submitting this pull request, I confirm that my contribution is made
    under the terms of the Apache-2.0 license
    mrgrain authored Mar 11, 2025
    Copy the full SHA
    84d0b54 View commit details
  3. feat(toolkit-lib): structured log monitoring events (#218)

    Moves more of the APIs to use modern IO infrastructure.
    
    ---
    By submitting this pull request, I confirm that my contribution is made
    under the terms of the Apache-2.0 license
    
    ---------
    
    Signed-off-by: github-actions <github-actions@github.com>
    Co-authored-by: github-actions <github-actions@github.com>
    mrgrain and github-actions authored Mar 11, 2025
    Copy the full SHA
    1bef263 View commit details

Commits on Mar 13, 2025

  1. fix(cdk-assets): --profile is ignored while publishing assets (#224)

    We neglected to configure the main credentials when assuming the file
    publishing role. The main credentials are where the profile is already
    configured.
    
    - Integration Test: aws/aws-cdk-cli-testing#59
    
    Fixes #212
    
    ---
    By submitting this pull request, I confirm that my contribution is made
    under the terms of the Apache-2.0 license
    iliapolo authored Mar 13, 2025
    Copy the full SHA
    f0ad96e View commit details
  2. chore(cli): fix tests are grouped incorrectly (#228)

    This just annoyed me a lot. Let's fix it!
    No other changes than moving tests around.
    
    ---
    By submitting this pull request, I confirm that my contribution is made
    under the terms of the Apache-2.0 license
    mrgrain authored Mar 13, 2025
    Copy the full SHA
    59d44ee View commit details
  3. chore(deps-dev): bump axios from 1.8.1 to 1.8.2 (#213)

    Bumps [axios](https://github.com/axios/axios) from 1.8.1 to 1.8.2.
    <details>
    <summary>Release notes</summary>
    <p><em>Sourced from <a
    href="https://github.com/axios/axios/releases">axios's
    releases</a>.</em></p>
    <blockquote>
    <h2>Release v1.8.2</h2>
    <h2>Release notes:</h2>
    <h3>Bug Fixes</h3>
    <ul>
    <li><strong>http-adapter:</strong> add allowAbsoluteUrls to path
    building (<a
    href="https://redirect.github.com/axios/axios/issues/6810">#6810</a>)
    (<a
    href="https://github.com/axios/axios/commit/fb8eec214ce7744b5ca787f2c3b8339b2f54b00f">fb8eec2</a>)</li>
    </ul>
    <h3>Contributors to this release</h3>
    <ul>
    <li><!-- raw HTML omitted --> <a href="https://github.com/lexcorp16"
    title="+1/-1 ([#6810](axios/axios#6810)
    )">Fasoro-Joseph Alexander</a></li>
    </ul>
    </blockquote>
    </details>
    <details>
    <summary>Changelog</summary>
    <p><em>Sourced from <a
    href="https://github.com/axios/axios/blob/v1.x/CHANGELOG.md">axios's
    changelog</a>.</em></p>
    <blockquote>
    <h2><a
    href="https://github.com/axios/axios/compare/v1.8.1...v1.8.2">1.8.2</a>
    (2025-03-07)</h2>
    <h3>Bug Fixes</h3>
    <ul>
    <li><strong>http-adapter:</strong> add allowAbsoluteUrls to path
    building (<a
    href="https://redirect.github.com/axios/axios/issues/6810">#6810</a>)
    (<a
    href="https://github.com/axios/axios/commit/fb8eec214ce7744b5ca787f2c3b8339b2f54b00f">fb8eec2</a>)</li>
    </ul>
    <h3>Contributors to this release</h3>
    <ul>
    <li><!-- raw HTML omitted --> <a href="https://github.com/lexcorp16"
    title="+1/-1 ([#6810](axios/axios#6810)
    )">Fasoro-Joseph Alexander</a></li>
    </ul>
    </blockquote>
    </details>
    <details>
    <summary>Commits</summary>
    <ul>
    <li><a
    href="https://github.com/axios/axios/commit/a9f7689b0c4b6d68c7f587c3aa376860da509d94"><code>a9f7689</code></a>
    chore(release): v1.8.2 (<a
    href="https://redirect.github.com/axios/axios/issues/6812">#6812</a>)</li>
    <li><a
    href="https://github.com/axios/axios/commit/fb8eec214ce7744b5ca787f2c3b8339b2f54b00f"><code>fb8eec2</code></a>
    fix(http-adapter): add allowAbsoluteUrls to path building (<a
    href="https://redirect.github.com/axios/axios/issues/6810">#6810</a>)</li>
    <li><a
    href="https://github.com/axios/axios/commit/98120457559e573024862e2925d56295a965ad7e"><code>9812045</code></a>
    chore(sponsor): update sponsor block (<a
    href="https://redirect.github.com/axios/axios/issues/6804">#6804</a>)</li>
    <li><a
    href="https://github.com/axios/axios/commit/72acf759373ef4e211d5299818d19e50e08c02f8"><code>72acf75</code></a>
    chore(sponsor): update sponsor block (<a
    href="https://redirect.github.com/axios/axios/issues/6794">#6794</a>)</li>
    <li>See full diff in <a
    href="https://github.com/axios/axios/compare/v1.8.1...v1.8.2">compare
    view</a></li>
    </ul>
    </details>
    <br />
    
    
    [![Dependabot compatibility
    score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=axios&package-manager=npm_and_yarn&previous-version=1.8.1&new-version=1.8.2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
    
    Dependabot will resolve any conflicts with this PR as long as you don't
    alter it yourself. You can also trigger a rebase manually by commenting
    `@dependabot rebase`.
    
    [//]: # (dependabot-automerge-start)
    [//]: # (dependabot-automerge-end)
    
    ---
    
    <details>
    <summary>Dependabot commands and options</summary>
    <br />
    
    You can trigger Dependabot actions by commenting on this PR:
    - `@dependabot rebase` will rebase this PR
    - `@dependabot recreate` will recreate this PR, overwriting any edits
    that have been made to it
    - `@dependabot merge` will merge this PR after your CI passes on it
    - `@dependabot squash and merge` will squash and merge this PR after
    your CI passes on it
    - `@dependabot cancel merge` will cancel a previously requested merge
    and block automerging
    - `@dependabot reopen` will reopen this PR if it is closed
    - `@dependabot close` will close this PR and stop Dependabot recreating
    it. You can achieve the same result by closing it manually
    - `@dependabot show <dependency name> ignore conditions` will show all
    of the ignore conditions of the specified dependency
    - `@dependabot ignore this major version` will close this PR and stop
    Dependabot creating any more for this major version (unless you reopen
    the PR or upgrade to it yourself)
    - `@dependabot ignore this minor version` will close this PR and stop
    Dependabot creating any more for this minor version (unless you reopen
    the PR or upgrade to it yourself)
    - `@dependabot ignore this dependency` will close this PR and stop
    Dependabot creating any more for this dependency (unless you reopen the
    PR or upgrade to it yourself)
    You can disable automated security fix PRs for this repo from the
    [Security Alerts
    page](https://github.com/aws/aws-cdk-cli/network/alerts).
    
    </details>
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Mar 13, 2025
    Copy the full SHA
    f1ef615 View commit details
  4. chore: enforce consistent-type-imports everywhere (#229)

    We were already enforcing this rule in `toolkit-lib`. Let's enforce it
    everywhere.
    
    ---
    By submitting this pull request, I confirm that my contribution is made
    under the terms of the Apache-2.0 license
    
    ---------
    
    Signed-off-by: github-actions <github-actions@github.com>
    Co-authored-by: github-actions <github-actions@github.com>
    mrgrain and github-actions authored Mar 13, 2025
    Copy the full SHA
    008590b View commit details
  5. chore(deps): bump @babel/helpers from 7.26.9 to 7.26.10 (#230)

    Bumps
    [@babel/helpers](https://github.com/babel/babel/tree/HEAD/packages/babel-helpers)
    from 7.26.9 to 7.26.10.
    <details>
    <summary>Release notes</summary>
    <p><em>Sourced from <a
    href="https://github.com/babel/babel/releases"><code>@​babel/helpers</code>'s
    releases</a>.</em></p>
    <blockquote>
    <h2>v7.26.10 (2025-03-11)</h2>
    <p>Thanks <a
    href="https://github.com/jordan-choi"><code>@​jordan-choi</code></a> and
    <a
    href="https://github.com/mmmsssttt404"><code>@​mmmsssttt404</code></a>
    for your first PRs!</p>
    <p>This release includes a fix for <a
    href="https://github.com/babel/babel/security/advisories/GHSA-968p-4wvh-cqc8">https://github.com/babel/babel/security/advisories/GHSA-968p-4wvh-cqc8</a>,
    a security vulnerability which affects the <code>.replace</code> method
    of transpiled regular expressions that use named capturing groups.</p>
    <h4>:eyeglasses: Spec Compliance</h4>
    <ul>
    <li><code>babel-parser</code>
    <ul>
    <li><a
    href="https://redirect.github.com/babel/babel/pull/17159">#17159</a>
    Disallow decorator in array pattern (<a
    href="https://github.com/JLHwung"><code>@​JLHwung</code></a>)</li>
    </ul>
    </li>
    </ul>
    <h4>:bug: Bug Fix</h4>
    <ul>
    <li><code>babel-parser</code>, <code>babel-template</code>
    <ul>
    <li><a
    href="https://redirect.github.com/babel/babel/pull/17164">#17164</a>
    Fix: always initialize ExportDeclaration attributes (<a
    href="https://github.com/JLHwung"><code>@​JLHwung</code></a>)</li>
    </ul>
    </li>
    <li><code>babel-core</code>
    <ul>
    <li><a
    href="https://redirect.github.com/babel/babel/pull/17142">#17142</a>
    fix: &quot;Map maximum size exceeded&quot; in deepClone (<a
    href="https://github.com/liuxingbaoyu"><code>@​liuxingbaoyu</code></a>)</li>
    </ul>
    </li>
    <li><code>babel-parser</code>,
    <code>babel-plugin-transform-typescript</code>
    <ul>
    <li><a
    href="https://redirect.github.com/babel/babel/pull/17154">#17154</a>
    Update typescript parser tests (<a
    href="https://github.com/JLHwung"><code>@​JLHwung</code></a>)</li>
    </ul>
    </li>
    <li><code>babel-traverse</code>
    <ul>
    <li><a
    href="https://redirect.github.com/babel/babel/pull/17151">#17151</a>
    fix: Should not evaluate vars in child scope (<a
    href="https://github.com/liuxingbaoyu"><code>@​liuxingbaoyu</code></a>)</li>
    </ul>
    </li>
    <li><code>babel-generator</code>
    <ul>
    <li><a
    href="https://redirect.github.com/babel/babel/pull/17153">#17153</a>
    fix: Correctly generate <code>abstract override</code> (<a
    href="https://github.com/liuxingbaoyu"><code>@​liuxingbaoyu</code></a>)</li>
    </ul>
    </li>
    <li><code>babel-parser</code>
    <ul>
    <li><a
    href="https://redirect.github.com/babel/babel/pull/17107">#17107</a> Fix
    source type detection when parsing TypeScript (<a
    href="https://github.com/JLHwung"><code>@​JLHwung</code></a>)</li>
    </ul>
    </li>
    <li><code>babel-helpers</code>, <code>babel-runtime</code>,
    <code>babel-runtime-corejs2</code>, <code>babel-runtime-corejs3</code>
    <ul>
    <li><a
    href="https://redirect.github.com/babel/babel/pull/17173">#17173</a> Fix
    processing of replacement pattern with named capture groups (<a
    href="https://github.com/%5Bmmmsssttt404%5D(https://github.com/mmmsssttt404)"><code>@​mmmsssttt404</code></a>)</li>
    </ul>
    </li>
    </ul>
    <h4>:nail_care: Polish</h4>
    <ul>
    <li><code>babel-standalone</code>
    <ul>
    <li><a
    href="https://redirect.github.com/babel/babel/pull/17158">#17158</a>
    Avoid warnings when re-bundling <code>@​babel/standalone</code> with
    webpack (<a
    href="https://github.com/liuxingbaoyu"><code>@​liuxingbaoyu</code></a>)</li>
    </ul>
    </li>
    </ul>
    <h4>:house: Internal</h4>
    <ul>
    <li><code>babel-parser</code>
    <ul>
    <li><a
    href="https://redirect.github.com/babel/babel/pull/17160">#17160</a>
    Left-value parsing cleanup (<a
    href="https://github.com/JLHwung"><code>@​JLHwung</code></a>)</li>
    </ul>
    </li>
    </ul>
    <h4>Committers: 6</h4>
    <ul>
    <li>Babel Bot (<a
    href="https://github.com/babel-bot"><code>@​babel-bot</code></a>)</li>
    <li>Huáng Jùnliàng (<a
    href="https://github.com/JLHwung"><code>@​JLHwung</code></a>)</li>
    <li>Nicolò Ribaudo (<a
    href="https://github.com/nicolo-ribaudo"><code>@​nicolo-ribaudo</code></a>)</li>
    <li>Yunyoung Jordan Choi (<a
    href="https://github.com/jordan-choi"><code>@​jordan-choi</code></a>)</li>
    <li><a
    href="https://github.com/liuxingbaoyu"><code>@​liuxingbaoyu</code></a></li>
    <li><a
    href="https://github.com/mmmsssttt404"><code>@​mmmsssttt404</code></a></li>
    </ul>
    </blockquote>
    </details>
    <details>
    <summary>Changelog</summary>
    <p><em>Sourced from <a
    href="https://github.com/babel/babel/blob/main/CHANGELOG.md"><code>@​babel/helpers</code>'s
    changelog</a>.</em></p>
    <blockquote>
    <h2>v7.26.10 (2025-03-11)</h2>
    <h4>:eyeglasses: Spec Compliance</h4>
    <ul>
    <li><code>babel-parser</code>
    <ul>
    <li><a
    href="https://redirect.github.com/babel/babel/pull/17159">#17159</a>
    Disallow decorator in array pattern (<a
    href="https://github.com/JLHwung"><code>@​JLHwung</code></a>)</li>
    </ul>
    </li>
    </ul>
    <h4>:bug: Bug Fix</h4>
    <ul>
    <li><code>babel-parser</code>, <code>babel-template</code>
    <ul>
    <li><a
    href="https://redirect.github.com/babel/babel/pull/17164">#17164</a>
    Fix: always initialize ExportDeclaration attributes (<a
    href="https://github.com/JLHwung"><code>@​JLHwung</code></a>)</li>
    </ul>
    </li>
    <li><code>babel-core</code>
    <ul>
    <li><a
    href="https://redirect.github.com/babel/babel/pull/17142">#17142</a>
    fix: &quot;Map maximum size exceeded&quot; in deepClone (<a
    href="https://github.com/liuxingbaoyu"><code>@​liuxingbaoyu</code></a>)</li>
    </ul>
    </li>
    <li><code>babel-parser</code>,
    <code>babel-plugin-transform-typescript</code>
    <ul>
    <li><a
    href="https://redirect.github.com/babel/babel/pull/17154">#17154</a>
    Update typescript parser tests (<a
    href="https://github.com/JLHwung"><code>@​JLHwung</code></a>)</li>
    </ul>
    </li>
    <li><code>babel-traverse</code>
    <ul>
    <li><a
    href="https://redirect.github.com/babel/babel/pull/17151">#17151</a>
    fix: Should not evaluate vars in child scope (<a
    href="https://github.com/liuxingbaoyu"><code>@​liuxingbaoyu</code></a>)</li>
    </ul>
    </li>
    <li><code>babel-generator</code>
    <ul>
    <li><a
    href="https://redirect.github.com/babel/babel/pull/17153">#17153</a>
    fix: Correctly generate <code>abstract override</code> (<a
    href="https://github.com/liuxingbaoyu"><code>@​liuxingbaoyu</code></a>)</li>
    </ul>
    </li>
    <li><code>babel-parser</code>
    <ul>
    <li><a
    href="https://redirect.github.com/babel/babel/pull/17107">#17107</a> Fix
    source type detection when parsing TypeScript (<a
    href="https://github.com/JLHwung"><code>@​JLHwung</code></a>)</li>
    </ul>
    </li>
    <li><code>babel-helpers</code>, <code>babel-runtime</code>,
    <code>babel-runtime-corejs2</code>, <code>babel-runtime-corejs3</code>
    <ul>
    <li><a
    href="https://redirect.github.com/babel/babel/pull/17173">#17173</a> Fix
    processing of replacement pattern with named capture groups (<a
    href="https://github.com/%5Bmmmsssttt404%5D(https://github.com/mmmsssttt404)"><code>@​mmmsssttt404</code></a>)</li>
    </ul>
    </li>
    </ul>
    <h4>:nail_care: Polish</h4>
    <ul>
    <li><code>babel-standalone</code>
    <ul>
    <li><a
    href="https://redirect.github.com/babel/babel/pull/17158">#17158</a>
    Avoid warnings when re-bundling <code>@​babel/standalone</code> with
    webpack (<a
    href="https://github.com/liuxingbaoyu"><code>@​liuxingbaoyu</code></a>)</li>
    </ul>
    </li>
    </ul>
    <h4>:house: Internal</h4>
    <ul>
    <li><code>babel-parser</code>
    <ul>
    <li><a
    href="https://redirect.github.com/babel/babel/pull/17160">#17160</a>
    Left-value parsing cleanup (<a
    href="https://github.com/JLHwung"><code>@​JLHwung</code></a>)</li>
    </ul>
    </li>
    </ul>
    </blockquote>
    </details>
    <details>
    <summary>Commits</summary>
    <ul>
    <li><a
    href="https://github.com/babel/babel/commit/e1ce99df422971175249509e7bbc2b327b8f7957"><code>e1ce99d</code></a>
    v7.26.10</li>
    <li><a
    href="https://github.com/babel/babel/commit/d5952e80c0faa5ec20e35085531b6e572d31dad4"><code>d5952e8</code></a>
    Fix processing of replacement pattern with named capture groups (<a
    href="https://github.com/babel/babel/tree/HEAD/packages/babel-helpers/issues/17173">#17173</a>)</li>
    <li>See full diff in <a
    href="https://github.com/babel/babel/commits/v7.26.10/packages/babel-helpers">compare
    view</a></li>
    </ul>
    </details>
    <br />
    
    
    [![Dependabot compatibility
    score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=@babel/helpers&package-manager=npm_and_yarn&previous-version=7.26.9&new-version=7.26.10)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
    
    Dependabot will resolve any conflicts with this PR as long as you don't
    alter it yourself. You can also trigger a rebase manually by commenting
    `@dependabot rebase`.
    
    [//]: # (dependabot-automerge-start)
    [//]: # (dependabot-automerge-end)
    
    ---
    
    <details>
    <summary>Dependabot commands and options</summary>
    <br />
    
    You can trigger Dependabot actions by commenting on this PR:
    - `@dependabot rebase` will rebase this PR
    - `@dependabot recreate` will recreate this PR, overwriting any edits
    that have been made to it
    - `@dependabot merge` will merge this PR after your CI passes on it
    - `@dependabot squash and merge` will squash and merge this PR after
    your CI passes on it
    - `@dependabot cancel merge` will cancel a previously requested merge
    and block automerging
    - `@dependabot reopen` will reopen this PR if it is closed
    - `@dependabot close` will close this PR and stop Dependabot recreating
    it. You can achieve the same result by closing it manually
    - `@dependabot show <dependency name> ignore conditions` will show all
    of the ignore conditions of the specified dependency
    - `@dependabot ignore this major version` will close this PR and stop
    Dependabot creating any more for this major version (unless you reopen
    the PR or upgrade to it yourself)
    - `@dependabot ignore this minor version` will close this PR and stop
    Dependabot creating any more for this minor version (unless you reopen
    the PR or upgrade to it yourself)
    - `@dependabot ignore this dependency` will close this PR and stop
    Dependabot creating any more for this dependency (unless you reopen the
    PR or upgrade to it yourself)
    You can disable automated security fix PRs for this repo from the
    [Security Alerts
    page](https://github.com/aws/aws-cdk-cli/network/alerts).
    
    </details>
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Mar 13, 2025
    Copy the full SHA
    3791941 View commit details

Commits on Mar 14, 2025

  1. fix(cli): cannot set progress via app or user configuration (#231)

    In [v2.172.0](https://github.com/aws/aws-cdk/releases/tag/v2.172.0) (via
    aws/aws-cdk@069b72c)
    we accidentally broke the "bar" stack activity progress output mode (*).
    Turns out no-one noticed.
    
    In
    [v2.1002.0](https://github.com/aws/aws-cdk-cli/releases/tag/aws-cdk%40v2.1002.0)
    (via
    0d9912f)
    this got unintentionally fixed and the `--progress` was honored again.
    However the accidental fix didn't consider options set by app or user
    configuration. Again noone really noticed, until this week a user
    alerted my to the issue on the cdk.dev Slack.
    
    This PR fixes `progress` set via app or user configuration.
    
    (*) This line is the culprit:
    
    aws/aws-cdk@069b72c#diff-d03bd87f399ba5824d5442aa691df8b6f08f4f8a3848cfc8492c3d52fab5e48bR105
    Previously "default" verbosity was a `0`, which meant `verbose = 0` and
    later on `!verbose` would turn into `true`.
    The change caused `verbose` to be a value different than `0` and thus
    turning `!verbose` to be `false` and the code would always assume we are
    in verbose logging mode and must use the "events" progress.
    
    ---
    By submitting this pull request, I confirm that my contribution is made
    under the terms of the Apache-2.0 license
    mrgrain authored Mar 14, 2025
    Copy the full SHA
    5631014 View commit details
  2. chore(toolkit-lib): fix s3 docs upload (#232)

    Re-write the script to upload the `toolkit-lib` docs S3. This has been
    AI assisted and actually been tested in a testing repo.
    
    ---
    By submitting this pull request, I confirm that my contribution is made
    under the terms of the Apache-2.0 license
    mrgrain authored Mar 14, 2025
    Copy the full SHA
    dba601a View commit details
  3. fix(cli): fix for code scanning alerts: Prototype-polluting assignment (

    #233)
    
    Fix for
    [https://github.com/aws/aws-cdk-cli/security/code-scanning/5](https://github.com/aws/aws-cdk-cli/security/code-scanning/5)
    [https://github.com/aws/aws-cdk-cli/security/code-scanning/6](https://github.com/aws/aws-cdk-cli/security/code-scanning/6)
    [https://github.com/aws/aws-cdk-cli/security/code-scanning/7](https://github.com/aws/aws-cdk-cli/security/code-scanning/7)
    
    To fix the prototype pollution vulnerability, we need to ensure that the
    keys used in the `deepSet` function do not include any properties that
    can modify `Object.prototype`. This can be achieved by validating the
    keys in the `path` array and rejecting any keys that are `__proto__`,
    `constructor`, or `prototype`.
    
    The best way to fix this problem without changing existing functionality
    is to add a validation step before using the keys in the `path` array.
    We will add a check to ensure that none of the keys in the `path` array
    are `__proto__`, `constructor`, or `prototype`.
    
    ---
    By submitting this pull request, I confirm that my contribution is made
    under the terms of the Apache-2.0 license
    
    ---------
    
    Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
    mrgrain and github-advanced-security[bot] authored Mar 14, 2025
    Copy the full SHA
    f855b15 View commit details

Commits on Mar 17, 2025

  1. docs: compatibility table for CLI/library versions (#239)

    Describe the compatibility model, and add a table linking the CLI and
    library versions.
    
    ---
    By submitting this pull request, I confirm that my contribution is made
    under the terms of the Apache-2.0 license
    rix0rrr authored Mar 17, 2025
    Copy the full SHA
    a1fbefe View commit details
  2. chore: remove unused packages (#240)

    We moved `cdk-build-tools` and `yarn-cling` over from the old repo, but
    they are not really used here.
    
    Just `bockfs` was being used as a testing tool -- move that into the
    `aws-cdk` package using it as a test helper.
    
    ---
    By submitting this pull request, I confirm that my contribution is made
    under the terms of the Apache-2.0 license
    rix0rrr authored Mar 17, 2025
    Copy the full SHA
    cb8a7e0 View commit details

Commits on Mar 18, 2025

  1. refactor(toolkit): resource metadata (#243)

    Pulls out resource-metadata extraction into a separate API so it can
    easily be reused in other places.
    Also adds support for resource metadata to
    `EvaluateCloudFormationTemplate` (internal API) in preparation for a
    change in hotswap.
    
    ---
    By submitting this pull request, I confirm that my contribution is made
    under the terms of the Apache-2.0 license
    mrgrain authored Mar 18, 2025
    Copy the full SHA
    a139c52 View commit details
  2. fix(cli): hotswap is reporting and running changes that don't happen (#…

    …244)
    
    This change is three fold:
    
    - We clean up the private `HotswapOperation` interface (née
    `HotswappableChange`) by removing two unused fields and adding in a new
    filed in preparation for structured data alongside hotswap messages
    - In the hotswap providers, pull gates outside of the apply function.
    This prevents hotswaps being reported when nothing would actually be
    done. These are local checks and now just run a little bit earlier.
    - In `lambda-functions.ts` don't report hotswappable changes for
    versions and aliases. These used to be reported with an empty array for
    `resourceNames` and a noop `apply` function. This means that literally
    nothing happens with these entries, since `apply` doesn't do anything
    and the CLI uses `resourceNames` to print anything. Just removing these
    as they are reported as part of a change to the function.
    
    ---
    By submitting this pull request, I confirm that my contribution is made
    under the terms of the Apache-2.0 license
    mrgrain authored Mar 18, 2025
    Copy the full SHA
    53ea256 View commit details
  3. fix(toolkit-lib): deployment total time includes stray output (#238)

    Fixes an extra `Deployment <number>` at the end of the "Total Time"
    message reporting the total deployment time.
    
    Adds missing test cases for the `MessageSpan` feature (GenAI supported).
    
    ---
    By submitting this pull request, I confirm that my contribution is made
    under the terms of the Apache-2.0 license
    mrgrain authored Mar 18, 2025
    Copy the full SHA
    ec93ebd View commit details
  4. feat(toolkit-lib): report hotswap messages into a message span (#247)

    Requested by early `toolkit-lib` users, all hotswap messages are now
    reported into span. Structured data reported for start and end is
    intentionally limited and will be extended further in future.
    
    ---
    By submitting this pull request, I confirm that my contribution is made
    under the terms of the Apache-2.0 license
    
    ---------
    
    Signed-off-by: github-actions <github-actions@github.com>
    Co-authored-by: github-actions <github-actions@github.com>
    mrgrain and github-actions authored Mar 18, 2025
    Copy the full SHA
    fe143da View commit details
  5. fix(cli): write notices to stderr or don't write them at all (#221)

    (Replaces #188).
    
    On CI systems, the CDK CLI tries to avoid writing to `stderr` because
    there are a couple of CI systems that are commonly configured to fail if
    any output is written to `stderr`. That means all output, like notices,
    must go to `stdout`.
    
    Some commands (like `cdk synth` or `cdk bootstrap --show-template`)
    produce usable output on `stdout`, and these are commonly scripted, like
    piping their output to a file.
    
    However, because notices must go to `stdout`, these now interfere with
    the output of these commands.
    
    This needs a more thorough reworking of the CLI output streams, but
    there is a risk of affecting users who are currently relying on the fact
    that all output goes to `stdout`.
    
    In this PR, we are doing the first steps to solving this situation:
    
    - Notices will always go to `stderr`, so that they will never interfere
    with `stdout` anymore.
    - We try to detect what CI system we are running on, and we will
    completely suppress notices *unless* we determine that we are running on
    a CI system where it is "safe" to write to `sterr` (fail closed).
    
    "Safe" in this case means that the CI system doesn't come with an easy
    to toggle checkbox that makes commands fail based on what they print,
    instead of their exit codes. The only systems I'm aware of that have
    this checkbox are "Azure DevOps", and "TeamCity running PowerShell
    scripts".
    
    Even though we know the systems that are "unsafe", we will only show
    notices on systems known to be "safe".
    
    Fixes aws/aws-cdk#33589.
    
    Also in this PR, because this grew.
    
    * Introduce `IoDefaultMessages` in the CLI package, which helps migrate
    "legacy" logging code to just emit default warning/info/etc messages to
    the IoHost.
    * Removed the ability to log with a `{ message: 'asdf' }` object to the
    global logger functions. This wasn't being used anywhere other than
    tests, and it's sort of pointless: if you know the code you should be
    using the `MessageMaker` to make a message object; if you don't know the
    code you can emit a string. There is no need to look up the right code
    given a level and a message object.
    * Make it possible for result types to be any type, not just object
    types. This is necessary to cover the "result" from legacy logging,
    where the result is just a string.
    * Updated many tests in a test file (`cli-io-host.test.ts`) that failed
    type checking, but succeeded running, and therefore didn't fail the
    build of #220.
    * Centralized `TestIoHost` into the helper package, and renamed it to
    `MockIoHost`.
    * Introducing a `FakeIoHost` in the CLI package to assert on messages
    emitted to an `IoHost`.
    
    ---
    By submitting this pull request, I confirm that my contribution is made
    under the terms of the Apache-2.0 license
    
    ---------
    
    Signed-off-by: github-actions <github-actions@github.com>
    Co-authored-by: github-actions <github-actions@github.com>
    rix0rrr and github-actions authored Mar 18, 2025
    Copy the full SHA
    be378de View commit details
Showing 373 changed files with 6,405 additions and 6,175 deletions.
8 changes: 2 additions & 6 deletions .eslintrc.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions .github/workflows/integ.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

35 changes: 26 additions & 9 deletions .github/workflows/release.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

169 changes: 61 additions & 108 deletions .projenrc.ts
Original file line number Diff line number Diff line change
@@ -376,9 +376,17 @@ new JsiiBuild(cloudAssemblySchema, {
(() => {
cloudAssemblySchema.preCompileTask.exec('tsx projenrc/update.ts');

// This file will be generated at release time. It needs to be gitignored or it will
// fail projen's "no tamper" check, which means it must also be generated every build time.
//
// Crucially, this must also run during release after bumping, but that is satisfied already
// by making it part of preCompile, because that makes it run as part of projen build.
cloudAssemblySchema.preCompileTask.exec('tsx ../../../projenrc/copy-cli-version-to-assembly.task.ts');
cloudAssemblySchema.gitignore.addPatterns('cli-version.json');

cloudAssemblySchema.addPackageIgnore('*.ts');
cloudAssemblySchema.addPackageIgnore('!*.d.ts');
cloudAssemblySchema.addPackageIgnore('** /scripts');
cloudAssemblySchema.addPackageIgnore('**/scripts');
})();

//////////////////////////////////////////////////////////////////////
@@ -460,23 +468,6 @@ const cxApi = overrideEslint(

//////////////////////////////////////////////////////////////////////

const yarnCling = configureProject(
new yarn.TypeScriptWorkspace({
...genericCdkProps({
private: true,
}),
parent: repo,
name: '@aws-cdk/yarn-cling',
description: 'Tool for generating npm-shrinkwrap from yarn.lock',
srcdir: 'lib',
deps: ['@yarnpkg/lockfile', 'semver'],
devDeps: ['@types/semver', '@types/yarnpkg__lockfile'],
}),
);
yarnCling.testTask.prependExec('ln -sf ../../cdk test/test-fixture/jsii/node_modules/');

//////////////////////////////////////////////////////////////////////

const yargsGen = configureProject(
new yarn.TypeScriptWorkspace({
...genericCdkProps({
@@ -518,35 +509,6 @@ nodeBundle.eslint?.addRules({ 'no-console': ['off'] });

//////////////////////////////////////////////////////////////////////

// This should be deprecated, but only after the move
const cdkBuildTools = configureProject(
new yarn.TypeScriptWorkspace({
...genericCdkProps({
private: true,
}),
parent: repo,
name: '@aws-cdk/cdk-build-tools',
description: 'Build tools for CDK packages',
srcdir: 'lib',
deps: [
yarnCling,
nodeBundle,
'fs-extra@^9',
'chalk@^4',
],
devDeps: [
'@types/fs-extra@^9',
],
tsconfig: {
compilerOptions: {
esModuleInterop: false,
},
},
}),
);

//////////////////////////////////////////////////////////////////////

// This should be deprecated, but only after the move
const cliPluginContract = configureProject(
new yarn.TypeScriptWorkspace({
@@ -595,7 +557,6 @@ const cdkAssets = configureProject(
],
devDeps: [
'@types/archiver',
'@types/glob',
'@types/yargs',
'@types/mime@^2',
'fs-extra',
@@ -689,16 +650,16 @@ const tmpToolkitHelpers = configureProject(
name: '@aws-cdk/tmp-toolkit-helpers',
description: 'A temporary package to hold code shared between aws-cdk and @aws-cdk/toolkit-lib',
devDeps: [
cdkBuildTools,
'@types/archiver',
'@types/glob',
'@types/semver',
'fast-check',
],
deps: [
cloudAssemblySchema.name,
'archiver',
'glob',
'semver',
'uuid',
'yaml@^1',
],
tsconfig: {
@@ -720,9 +681,13 @@ tmpToolkitHelpers.package.addField('exports', {
'./util': './lib/util/index.js',
});

//////////////////////////////////////////////////////////////////////
tmpToolkitHelpers.eslint?.addRules({
'@cdklabs/no-throw-default-error': 'error',
});

tmpToolkitHelpers.gitignore.addPatterns('test/**/*.map');

let CLI_SDK_VERSION: '2' | '3' = ('3' as any);
//////////////////////////////////////////////////////////////////////

const cli = configureProject(
new yarn.TypeScriptWorkspace({
@@ -732,35 +697,25 @@ const cli = configureProject(
description: 'AWS CDK CLI, the command line tool for CDK apps',
srcdir: 'lib',
devDeps: [
yarnCling,
nodeBundle,
cdkBuildTools,
yargsGen,
cliPluginContract,
tmpToolkitHelpers,
'@octokit/rest',
'@types/archiver',
'@types/fs-extra@^9',
'@types/glob',
'@types/mockery',
'@types/promptly',
'@types/semver',
'@types/sinon',
'@types/source-map-support',
'@types/uuid',
'@types/yargs@^15',
'aws-cdk-lib',
...CLI_SDK_VERSION === '2' ? [
'aws-sdk-mock@^5',
] : [
],
'axios',
'constructs',
'fast-check',
'jest-environment-node',
'jest-mock',
'madge',
'make-runnable',
'nock',
'sinon',
'ts-mock-imports',
@@ -772,41 +727,37 @@ const cli = configureProject(
cxApi,
'@aws-cdk/region-info',
'archiver',
...CLI_SDK_VERSION === '2' ? [
'aws-sdk',
] : [
`@aws-sdk/client-appsync@${CLI_SDK_V3_RANGE}`,
`@aws-sdk/client-cloudformation@${CLI_SDK_V3_RANGE}`,
`@aws-sdk/client-cloudwatch-logs@${CLI_SDK_V3_RANGE}`,
`@aws-sdk/client-cloudcontrol@${CLI_SDK_V3_RANGE}`,
`@aws-sdk/client-codebuild@${CLI_SDK_V3_RANGE}`,
`@aws-sdk/client-ec2@${CLI_SDK_V3_RANGE}`,
`@aws-sdk/client-ecr@${CLI_SDK_V3_RANGE}`,
`@aws-sdk/client-ecs@${CLI_SDK_V3_RANGE}`,
`@aws-sdk/client-elastic-load-balancing-v2@${CLI_SDK_V3_RANGE}`,
`@aws-sdk/client-iam@${CLI_SDK_V3_RANGE}`,
`@aws-sdk/client-kms@${CLI_SDK_V3_RANGE}`,
`@aws-sdk/client-lambda@${CLI_SDK_V3_RANGE}`,
`@aws-sdk/client-route-53@${CLI_SDK_V3_RANGE}`,
`@aws-sdk/client-s3@${CLI_SDK_V3_RANGE}`,
`@aws-sdk/client-secrets-manager@${CLI_SDK_V3_RANGE}`,
`@aws-sdk/client-sfn@${CLI_SDK_V3_RANGE}`,
`@aws-sdk/client-ssm@${CLI_SDK_V3_RANGE}`,
`@aws-sdk/client-sts@${CLI_SDK_V3_RANGE}`,
`@aws-sdk/credential-providers@${CLI_SDK_V3_RANGE}`,
`@aws-sdk/ec2-metadata-service@${CLI_SDK_V3_RANGE}`,
`@aws-sdk/lib-storage@${CLI_SDK_V3_RANGE}`,
'@aws-sdk/middleware-endpoint',
'@aws-sdk/util-retry',
'@aws-sdk/util-waiter',
'@smithy/middleware-endpoint',
'@smithy/shared-ini-file-loader',
'@smithy/property-provider',
'@smithy/types',
'@smithy/util-retry',
'@smithy/util-stream',
'@smithy/util-waiter',
],
`@aws-sdk/client-appsync@${CLI_SDK_V3_RANGE}`,
`@aws-sdk/client-cloudformation@${CLI_SDK_V3_RANGE}`,
`@aws-sdk/client-cloudwatch-logs@${CLI_SDK_V3_RANGE}`,
`@aws-sdk/client-cloudcontrol@${CLI_SDK_V3_RANGE}`,
`@aws-sdk/client-codebuild@${CLI_SDK_V3_RANGE}`,
`@aws-sdk/client-ec2@${CLI_SDK_V3_RANGE}`,
`@aws-sdk/client-ecr@${CLI_SDK_V3_RANGE}`,
`@aws-sdk/client-ecs@${CLI_SDK_V3_RANGE}`,
`@aws-sdk/client-elastic-load-balancing-v2@${CLI_SDK_V3_RANGE}`,
`@aws-sdk/client-iam@${CLI_SDK_V3_RANGE}`,
`@aws-sdk/client-kms@${CLI_SDK_V3_RANGE}`,
`@aws-sdk/client-lambda@${CLI_SDK_V3_RANGE}`,
`@aws-sdk/client-route-53@${CLI_SDK_V3_RANGE}`,
`@aws-sdk/client-s3@${CLI_SDK_V3_RANGE}`,
`@aws-sdk/client-secrets-manager@${CLI_SDK_V3_RANGE}`,
`@aws-sdk/client-sfn@${CLI_SDK_V3_RANGE}`,
`@aws-sdk/client-ssm@${CLI_SDK_V3_RANGE}`,
`@aws-sdk/client-sts@${CLI_SDK_V3_RANGE}`,
`@aws-sdk/credential-providers@${CLI_SDK_V3_RANGE}`,
`@aws-sdk/ec2-metadata-service@${CLI_SDK_V3_RANGE}`,
`@aws-sdk/lib-storage@${CLI_SDK_V3_RANGE}`,
'@aws-sdk/middleware-endpoint',
'@aws-sdk/util-retry',
'@aws-sdk/util-waiter',
'@smithy/middleware-endpoint',
'@smithy/shared-ini-file-loader',
'@smithy/property-provider',
'@smithy/types',
'@smithy/util-retry',
'@smithy/util-stream',
'@smithy/util-waiter',
'camelcase@^6', // Non-ESM
cdkAssets,
// A version that is guaranteed to still work on Node 16
@@ -816,13 +767,11 @@ const cli = configureProject(
'decamelize@^5', // Non-ESM
'fs-extra@^9',
'glob',
'json-diff',
'minimatch',
'p-limit@^3',
'promptly',
'proxy-agent',
'semver',
'source-map-support',
'strip-ansi@^6',
'table',
'uuid',
@@ -1166,7 +1115,6 @@ const toolkitLib = configureProject(
'yargs@^15',
],
devDeps: [
cdkBuildTools,
'@smithy/types',
'@types/fs-extra',
'@types/split2',
@@ -1219,7 +1167,7 @@ new S3DocsPublishing(toolkitLib, {

// Eslint rules
toolkitLib.eslint?.addRules({
'@cdklabs/no-throw-default-error': ['error'],
'@cdklabs/no-throw-default-error': 'error',
'import/no-restricted-paths': ['error', {
zones: [{
target: './',
@@ -1249,7 +1197,8 @@ toolkitLib.package.addField('exports', {
'./package.json': './package.json',
});

toolkitLib.postCompileTask.exec('ts-node scripts/gen-code-registry.ts');
const registryTask = toolkitLib.addTask('registry', { exec: 'tsx scripts/gen-code-registry.ts' });
toolkitLib.postCompileTask.spawn(registryTask);
toolkitLib.postCompileTask.exec('node build-tools/bundle.mjs');
// Smoke test built JS files
toolkitLib.postCompileTask.exec('node ./lib/index.js >/dev/null 2>/dev/null </dev/null');
@@ -1261,6 +1210,7 @@ toolkitLib.postCompileTask.exec('node ./lib/private/util.js >/dev/null 2>/dev/nu
toolkitLib.npmignore?.addPatterns(
'assets',
'docs',
'docs_html',
'typedoc.json',
'*.d.ts.map',
// Explicitly allow all required files
@@ -1277,7 +1227,7 @@ toolkitLib.npmignore?.addPatterns(

toolkitLib.gitignore.addPatterns(
...ADDITIONAL_CLI_IGNORE_PATTERNS,
'docs',
'docs_html',
'build-info.json',
'lib/**/*.wasm',
'lib/**/*.yaml',
@@ -1396,17 +1346,20 @@ new CdkCliIntegTestsWorkflow(repo, {
testRunsOn: POWERFUL_RUNNER,

localPackages: [
// CloudAssemblySchema is not in this list because in the way we're doing
// Verdaccio now, its 0.0.0 version will shadow the ACTUAL published version
// that aws-cdk-lib depends on, and so will not be found.
//
// Not sure if that will cause problems yet.
cloudAssemblySchema.name,
cloudFormationDiff.name,
cdkAssets.name,
cli.name,
cliLib.name,
cdkAliasPackage.name,
],

allowUpstreamVersions: [
// cloud-assembly-schema gets referenced under multiple versions
// - Candidate version for cdk-assets
// - Previously released version for aws-cdk-lib
cloudAssemblySchema.name,
],
});

new CodeCovWorkflow(repo, {
Loading