Skip to content

Commit 95753a9

Browse files
X-GuardianSimon Heather
andauthored
chore(deps): update fs-extra to 11.3.6 across all packages (#328)
### Description Bumps `fs-extra` to `11.3.6` (and `@types/fs-extra` to `11.0.4`) in every package that depends on it, so the whole monorepo resolves a single copy of each. Before this change the versions were inconsistent: five packages were already on the `11.x` line (`11.3.4` / `^11.3.0`), while three — `@cdktn/provider-generator`, `@cdktn/cli-core`, and `cdktn-cli` — plus the standalone `test/` harness were still pinned to `fs-extra@8.1.0` / `@types/fs-extra@8.1.5`. This aligns all of them on the current release. **Packages updated:** | Package | `fs-extra` | `@types/fs-extra` | | --- | --- | --- | | `@cdktn/provider-generator` | `8.1.0` → `11.3.6` | `8.1.5` → `11.0.4` | | `@cdktn/cli-core` | `8.1.0` → `11.3.6` | `8.1.5` → `11.0.4` | | `cdktn-cli` | `8.1.0` → `11.3.6` | `8.1.5` → `11.0.4` | | `test/` (non-workspace) | `^8.1.0` → `^11.3.6` | `^8.1.5` → `^11.0.4` | | `@cdktn/provider-schema` | `11.3.4` → `11.3.6` | `11.0.4` (unchanged) | | `@cdktn/commons` | `11.3.4` → `11.3.6` | `11.0.4` (unchanged) | | `@cdktn/hcl2cdk` | `11.3.4` → `11.3.6` | `11.0.4` (unchanged) | | `@cdktn/hcl2json` | `11.3.4` → `11.3.6` | `11.0.4` (unchanged) | | `@cdktn/hcl-tools` | `^11.3.0` → `^11.3.6` | `11.0.4` (unchanged) | **Two source changes were required.** The three packages crossing the `8.x` → `11.x` boundary were checked against the fs-extra breaking changes in that window. The `@types/fs-extra@11` typings are stricter than `@types/fs-extra@8` and flagged two existing calls that passed a `recursive` option to a copy — `fs.copy`/`fs.copySync` are always recursive, so `recursive` was never a valid `CopyOptions`/`CopyOptionsSync` key; the looser v8 typings silently accepted it. Removing it is a no-op at runtime: - `@cdktn/provider-generator/src/get/constructs-maker.ts` — `error TS2769` on `fs.copy(source, target, { recursive: true, overwrite: false })` → `fs.copy(source, target, { overwrite: false })`. - `cdktn-cli/src/bin/cmds/helper/init.ts` — `error TS2353` on `fs.copySync(src, dest, { recursive: true })` → `fs.copySync(src, dest)`. No behavioural change was needed for the other differences. `move()` defaulting to `overwrite: false` from v9 onward doesn't affect the three `fs.move` call sites in the same file, which already pass `{ overwrite: true }` explicitly. Every other method used across these packages (`existsSync`, `readFile(Sync)`, `writeFile(Sync)`, `remove(Sync)`, `pathExists`, `mkdirp`/`mkdirs`, `copy(Sync)`, `stat`, `readJson(Sync)`, `appendFileSync`, `rmSync`, `unlinkSync`, `accessSync`, `constants`) is unchanged from 8 through 11. The rest of the 8→11 range only dropped support for Node.js < 14, which the repo already requires. ### Checklist - [ ] I have updated the PR title to match [CDKTN's style guide](https://github.com/open-constructs/cdk-terrain/blob/main/CONTRIBUTING.md#pull-requests-1) - [ ] I have run the linter on my code locally - [ ] I have performed a self-review of my code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the [documentation](https://github.com/open-constructs/cdk-terrain-docs/tree/main/content) if applicable - [ ] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works if applicable - [ ] New and existing unit tests pass locally with my changes --------- Co-authored-by: Simon Heather <simon.heather@yulife.com>
1 parent 557a163 commit 95753a9

13 files changed

Lines changed: 156 additions & 54 deletions

File tree

packages/@cdktn/cli-core/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
"codemaker": "1.128.0",
4949
"constructs": "10.6.0",
5050
"cross-spawn": "7.0.6",
51-
"fs-extra": "8.1.0",
51+
"fs-extra": "11.3.6",
5252
"indent-string": "4.0.0",
5353
"minimatch": "10.2.5",
5454
"pkg-up": "3.1.0",
@@ -66,7 +66,7 @@
6666
"devDependencies": {
6767
"@cdktn/provider-generator": "workspace:*",
6868
"@types/cross-spawn": "6.0.6",
69-
"@types/fs-extra": "8.1.5",
69+
"@types/fs-extra": "11.0.4",
7070
"@types/node": "20.19.1",
7171
"@types/semver": "7.7.1",
7272
"nock": "^14.0.0",

packages/@cdktn/commons/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
"codemaker": "1.128.0",
4545
"cross-spawn": "7.0.6",
4646
"follow-redirects": "1.15.11",
47-
"fs-extra": "11.3.4",
47+
"fs-extra": "11.3.6",
4848
"log4js": "6.9.1",
4949
"semver": "7.7.4",
5050
"strip-ansi": "6.0.1",

packages/@cdktn/hcl-tools/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
"url": "https://github.com/open-constructs/cdk-terrain/issues"
4343
},
4444
"dependencies": {
45-
"fs-extra": "^11.3.0"
45+
"fs-extra": "^11.3.6"
4646
},
4747
"devDependencies": {
4848
"@types/fs-extra": "11.0.4",

packages/@cdktn/hcl2cdk/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
"@types/prettier": "2.7.3",
6363
"@types/reserved-words": "0.1.4",
6464
"execa": "5.1.1",
65-
"fs-extra": "11.3.4",
65+
"fs-extra": "11.3.6",
6666
"tsx": "4.6.1",
6767
"typescript": "^5.0.0"
6868
},

packages/@cdktn/hcl2json/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
],
3939
"license": "MPL-2.0",
4040
"dependencies": {
41-
"fs-extra": "11.3.4"
41+
"fs-extra": "11.3.6"
4242
},
4343
"devDependencies": {
4444
"@types/fs-extra": "11.0.4",

packages/@cdktn/provider-generator/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,13 @@
4242
"cdktn": "workspace:*",
4343
"codemaker": "1.128.0",
4444
"constructs": "10.6.0",
45-
"fs-extra": "8.1.0",
45+
"fs-extra": "11.3.6",
4646
"glob": "13.0.6",
4747
"jsii": "~5.9.0",
4848
"jsii-pacmak": "1.128.0"
4949
},
5050
"devDependencies": {
51-
"@types/fs-extra": "8.1.5",
51+
"@types/fs-extra": "11.0.4",
5252
"@types/node": "20.19.37",
5353
"typescript": "^5.0.0"
5454
}

packages/@cdktn/provider-generator/src/get/constructs-maker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ export async function generateJsiiLanguage(
233233
const packageDir = opts.java.package.replace(/\./g, "/");
234234
await fs.mkdirp(path.join(target, "main/java", packageDir));
235235
await fs.mkdirp(path.join(target, "main/resources", packageDir));
236-
await fs.copy(source, target, { recursive: true, overwrite: false });
236+
await fs.copy(source, target, { overwrite: false });
237237
}
238238

239239
if (opts.csharp) {

packages/@cdktn/provider-schema/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
"@cdktn/commons": "workspace:*",
4040
"@cdktn/hcl2json": "workspace:*",
4141
"deepmerge": "4.3.1",
42-
"fs-extra": "11.3.4"
42+
"fs-extra": "11.3.6"
4343
},
4444
"devDependencies": {
4545
"@types/fs-extra": "11.0.4",

packages/cdktn-cli/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,15 +75,15 @@
7575
"@cdktn/provider-schema": "workspace:*",
7676
"@npmcli/ci-detect": "1.4.0",
7777
"@sentry/node": "7.120.4",
78-
"@types/fs-extra": "8.1.5",
78+
"@types/fs-extra": "11.0.4",
7979
"@types/pidusage": "2.0.5",
8080
"@types/semver": "7.7.1",
8181
"@types/yargs": "17.0.35",
8282
"chalk": "4.1.2",
8383
"esbuild": "^0.28.0",
8484
"execa": "5.1.1",
8585
"extract-zip": "2.0.1",
86-
"fs-extra": "8.1.0",
86+
"fs-extra": "11.3.6",
8787
"glob": "13.0.6",
8888
"nock": "13.5.6",
8989
"open": "7.4.2",

packages/cdktn-cli/src/bin/cmds/helper/init.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -324,9 +324,7 @@ function copyLocalModules(
324324
modules
325325
.filter((m) => isLocalModule(m))
326326
.map((m) =>
327-
fs.copySync(path.resolve(sourcePath, m), path.resolve(destination, m), {
328-
recursive: true,
329-
}),
327+
fs.copySync(path.resolve(sourcePath, m), path.resolve(destination, m)),
330328
);
331329
}
332330

0 commit comments

Comments
 (0)