@dbx-tools/projen 0.6.39 → 0.6.40

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.
Files changed (2) hide show
  1. package/package.json +4 -4
  2. package/src/project.ts +9 -8
package/package.json CHANGED
@@ -9,9 +9,9 @@
9
9
  },
10
10
  "dependencies": {
11
11
  "@clack/prompts": "^1.7.0",
12
- "@dbx-tools/core": "^0.6.39",
13
- "@dbx-tools/path": "^0.6.39",
14
- "@dbx-tools/shared-core": "^0.6.39",
12
+ "@dbx-tools/core": "^0.6.40",
13
+ "@dbx-tools/path": "^0.6.40",
14
+ "@dbx-tools/shared-core": "^0.6.40",
15
15
  "commander": "^15.0.0",
16
16
  "concurrently": "^10.0.3",
17
17
  "constructs": "^10.6.0",
@@ -32,7 +32,7 @@
32
32
  },
33
33
  "main": "index.ts",
34
34
  "license": "Apache-2.0",
35
- "version": "0.6.39",
35
+ "version": "0.6.40",
36
36
  "types": "index.ts",
37
37
  "type": "module",
38
38
  "exports": {
package/src/project.ts CHANGED
@@ -746,15 +746,16 @@ function registerRootTasks(project: javascript.NodeProject): void {
746
746
  }
747
747
 
748
748
  /**
749
- * `tsx <rel>/tasks/<script>` command for a projen task, relative to `project.outdir`.
750
- * Resolves the engine's `tasks/` dir off its installed package root (via
751
- * {@link resolvePkgRoot}), so it works both in-repo and when the engine is a
752
- * dependency in a consumer's `node_modules` - no filesystem walking.
749
+ * `tsx node_modules/@dbx-tools/projen/tasks/<script>` command for a projen task.
750
+ *
751
+ * Use the stable package symlink, never `require.resolve()`'s physical pnpm
752
+ * store path. A later install can change the peer-hash directory while leaving
753
+ * the package symlink valid; persisting the physical path made every generated
754
+ * task fail with ERR_MODULE_NOT_FOUND after such an update.
753
755
  */
754
- export function taskScript(project: javascript.NodeProject, script: string, args = ""): string {
755
- const scriptPath = join(resolvePkgRoot(), "tasks", script);
756
- const rel = toPosix(relative(resolve(project.outdir), scriptPath));
757
- return args ? `tsx ${rel} ${args}` : `tsx ${rel}`;
756
+ export function taskScript(_project: javascript.NodeProject, script: string, args = ""): string {
757
+ const scriptPath = toPosix(join("node_modules", "@dbx-tools", "projen", "tasks", script));
758
+ return args ? `tsx ${scriptPath} ${args}` : `tsx ${scriptPath}`;
758
759
  }
759
760
 
760
761
  /**