@cdktn/hcl2cdk 0.25.0-pre.2 → 0.25.0-pre.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cdktn/hcl2cdk",
3
- "version": "0.25.0-pre.2",
3
+ "version": "0.25.0-pre.4",
4
4
  "description": "Transform HCL into CDK",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",
@@ -38,11 +38,11 @@
38
38
  "prettier": "2.8.8",
39
39
  "reserved-words": "0.1.2",
40
40
  "zod": "4.4.3",
41
- "@cdktn/commons": "0.25.0-pre.2",
42
- "@cdktn/hcl2json": "0.25.0-pre.2",
43
- "@cdktn/provider-generator": "0.25.0-pre.2",
44
- "@cdktn/provider-schema": "0.25.0-pre.2",
45
- "cdktn": "0.25.0-pre.2"
41
+ "@cdktn/hcl2json": "0.25.0-pre.4",
42
+ "@cdktn/commons": "0.25.0-pre.4",
43
+ "@cdktn/provider-generator": "0.25.0-pre.4",
44
+ "@cdktn/provider-schema": "0.25.0-pre.4",
45
+ "cdktn": "0.25.0-pre.4"
46
46
  },
47
47
  "devDependencies": {
48
48
  "@types/babel__generator": "7.27.0",
@@ -76,8 +76,8 @@
76
76
  "watch": "tsc -w",
77
77
  "watch-preserve-output": "tsc -w --preserveWatchOutput",
78
78
  "test:update": "jest -u",
79
- "package": "./package.sh",
79
+ "package": "bash package.sh",
80
80
  "dist-clean": "rm -rf dist",
81
- "package:js": "./package.sh"
81
+ "package:js": "bash package.sh"
82
82
  }
83
83
  }
@@ -176,7 +176,12 @@ async function copyBaseProject(baseDir: string, projectDir: string) {
176
176
  await fs.symlink(
177
177
  path.join(baseDir, "node_modules"),
178
178
  path.join(projectDir, "node_modules"),
179
- "dir",
179
+ // A "dir" symlink needs Developer Mode or an elevated shell on Windows and
180
+ // otherwise fails with EPERM. A junction is created without either and
181
+ // resolves the same way for reads, which is all this shared, read-only
182
+ // node_modules is used for. Junctions require an absolute target, which
183
+ // baseDir always is.
184
+ process.platform === "win32" ? "junction" : "dir",
180
185
  );
181
186
  }
182
187
 
@@ -15,7 +15,22 @@ import * as path from "path";
15
15
  export function createTmpHelper(): (prefix: string) => string {
16
16
  const dirs: string[] = [];
17
17
  afterAll(() => {
18
- for (const d of dirs) fs.rmSync(d, { recursive: true, force: true });
18
+ for (const d of dirs) {
19
+ try {
20
+ // Windows frequently holds transient handles on just-written files
21
+ // (search indexer, AV scanners), which surfaces as EBUSY/EPERM. Retry,
22
+ // and never let cleanup of a temp directory fail the suite itself --
23
+ // these live under os.tmpdir() and the OS reclaims them regardless.
24
+ fs.rmSync(d, {
25
+ recursive: true,
26
+ force: true,
27
+ maxRetries: 5,
28
+ retryDelay: 100,
29
+ });
30
+ } catch (e) {
31
+ console.warn(`Could not remove temp dir ${d}: ${(e as Error).message}`);
32
+ }
33
+ }
19
34
  });
20
35
  return (prefix: string) => {
21
36
  const d = fs.mkdtempSync(path.join(os.tmpdir(), prefix));