fix: chokidar and npm rely on outdated version of tar#1059
Conversation
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1059 +/- ##
==========================================
- Coverage 87.70% 87.64% -0.06%
==========================================
Files 72 72
Lines 10102 10121 +19
Branches 1335 1334 -1
==========================================
+ Hits 8860 8871 +11
- Misses 1217 1225 +8
Partials 25 25
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
Upgrades key Node tooling dependencies to move off tar v6 by bumping chokidar (for cdk watch) and npm (for cli-integ), along with necessary code and build config adjustments.
Changes:
- Upgrade
chokidarfrom v3 → v4 across CLI, toolkit-lib, and integ-runner (plus updated watch event typing/filtering). - Upgrade
npmfrom v10 → v11 in@aws-cdk-testing/cli-integ(and update lockfile graph, includingtarv7). - Update bundling config/tasks and adjust watcher shutdown behavior/tests (remove
unrefusage).
Reviewed changes
Copilot reviewed 17 out of 18 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| yarn.lock | Updates the dependency graph for chokidar v4, npm v11, and newer tar/related transitive deps. |
| packages/aws-cdk/package.json | Bumps runtime dependency chokidar to ^4. |
| packages/aws-cdk/lib/cli/cdk-toolkit.ts | Updates watch handling for chokidar v4 event typing/filtering. |
| packages/aws-cdk/THIRD_PARTY_LICENSES | Updates bundled third-party attributions (currently missing chokidar attribution). |
| packages/aws-cdk/.projen/tasks.json | Updates node-backpack pack/validate command lines (removes fsevents externalization). |
| packages/aws-cdk/.projen/deps.json | Aligns projen-managed deps to chokidar@^4. |
| packages/@aws-cdk/toolkit-lib/test/actions/watch.test.ts | Updates tests to reflect watcher shutdown changes (no unref). |
| packages/@aws-cdk/toolkit-lib/package.json | Bumps runtime dependency chokidar to ^4. |
| packages/@aws-cdk/toolkit-lib/lib/toolkit/toolkit.ts | Updates watch logic to accept chokidar v4 event types and removes unref. |
| packages/@aws-cdk/toolkit-lib/.projen/deps.json | Aligns projen-managed deps to chokidar@^4. |
| packages/@aws-cdk/integ-runner/package.json | Bumps runtime dependency chokidar to ^4. |
| packages/@aws-cdk/integ-runner/lib/runner/integ-test-runner.ts | Updates chokidar watch event typing/filtering for v4. |
| packages/@aws-cdk/integ-runner/THIRD_PARTY_LICENSES | Updates bundled third-party attributions (currently missing chokidar attribution). |
| packages/@aws-cdk/integ-runner/.projen/tasks.json | Updates node-backpack pack/validate command lines (removes fsevents externalization). |
| packages/@aws-cdk/integ-runner/.projen/deps.json | Aligns projen-managed deps to chokidar@^4. |
| packages/@aws-cdk-testing/cli-integ/package.json | Bumps runtime dependency npm to ^11. |
| packages/@aws-cdk-testing/cli-integ/.projen/deps.json | Aligns projen-managed deps to npm@^11. |
| .projenrc.ts | Updates projen project dependency declarations and bundling configuration to match new versions. |
Comments suppressed due to low confidence (2)
packages/aws-cdk/THIRD_PARTY_LICENSES:21572
THIRD_PARTY_LICENSESno longer contains an attribution entry forchokidar, butaws-cdkstill declareschokidaras a runtime dependency (now ^4). Please regenerate/update the attributions so the new chokidar version (and any new transitive deps likereaddirp@^4) are included; otherwise the published package/bundle will be missing required third-party notices.
packages/@aws-cdk/integ-runner/THIRD_PARTY_LICENSES:21414THIRD_PARTY_LICENSESno longer contains an attribution entry forchokidar, but@aws-cdk/integ-runnerstill declareschokidaras a runtime dependency (now ^4). Please regenerate/update the attributions so the new chokidar version (and any new transitive deps likereaddirp@^4) are included; otherwise the published package/bundle will be missing required third-party notices.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Fixes #1126. In CDK CLI v2.1103.0, we released #1059 which migrated our chokidar dependency from v3 to v4. We missed a breaking change in this migration: [glob is no longer supported](https://dev.to/43081j/migrating-from-chokidar-3x-to-4x-5ab5). This causes `cdk watch` in CDK CLI v2.1102.0 - v2.1105.0 to work improperly with `include` or `exclude` parameters that utilize globs -- including the default configuration that is `include: ['**']`. Using the default `include` causes `cdk watch` to not watch any files at all. Since CDK CLI exposes an `include` and `exclude` property that users can set in their own `cdk.json` configuration, and we support globs, we must continue to do so. Therefore, this PR migrates globs into the new format that chokidar v4 understands - a `includes` path adn an `ignored` function. This code was written with the help of AI, including all tests, and also inspired by similar updates to other projects like this [one](https://github.com/11ty/eleventy/blob/deb6dbe62f95545aba80ff4d7bafe5e3d0b72f08/src/Util/GlobStripper.js). --- By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license
Fixes #1044
Gets us off of tar mv 6 by upgrading chokidar from v3 -> v4 (used by
cdk watch), and npm from v10 -> v11 (used bycli-integ)By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license