@datamitsu/datamitsu-linux-arm64 0.0.3-alpha-4 → 0.0.3-alpha-6

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 (3) hide show
  1. package/README.md +36 -6
  2. package/datamitsu +0 -0
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -97,9 +97,21 @@ By default, `cache clear` clears only the current project's cache, which include
97
97
 
98
98
  Use `--all` to clear caches for all projects. Use `--dry-run` to preview what would be deleted without actually deleting anything.
99
99
 
100
- ## Using Project Cache in Configurations
100
+ ## Template Placeholders
101
101
 
102
- Tools that maintain their own cache (e.g., `tsc` with `--incremental`) can use `facts().projectCachePath` to store cache files in the correct location:
102
+ Tool arguments and paths in configurations support template placeholders that are resolved at execution time:
103
+
104
+ | Placeholder | Resolves To | Example |
105
+ | ------------- | --------------------------------------- | --------------------------- |
106
+ | `{cwd}` | Per-project working directory | `"{cwd}/src"` |
107
+ | `{root}` | Git repository root | `"{root}/.config"` |
108
+ | `{toolCache}` | Per-project, per-tool cache directory | `"{toolCache}/tsbuildinfo"` |
109
+ | `{file}` | Single file path (per-file scope tools) | `"{file}"` |
110
+ | `{files}` | Space-separated file list | `"{files}"` |
111
+
112
+ ### Using Project Cache in Configurations
113
+
114
+ Tools that maintain their own cache (e.g., `tsc` with `--incremental`) can use the `{toolCache}` placeholder to store cache files in the correct location:
103
115
 
104
116
  ```ts
105
117
  tsc: {
@@ -110,7 +122,7 @@ tsc: {
110
122
  "--noEmit",
111
123
  "--incremental",
112
124
  "--tsBuildInfoFile",
113
- tools.Path.join(facts().projectCachePath, "tsbuildinfo"),
125
+ "{toolCache}/tsbuildinfo",
114
126
  ],
115
127
  command: "tsc",
116
128
  globs: ["**/*.ts", "**/*.tsx"],
@@ -122,9 +134,27 @@ tsc: {
122
134
 
123
135
  This ensures that:
124
136
 
125
- 1. Tool caches are stored in a dedicated location (`~/.cache/datamitsu/projects/{hash}/cache/`)
126
- 2. `cache clear` correctly cleans up tool caches alongside lint/fix results
127
- 3. Tool caches don't pollute `node_modules` or other project directories
137
+ 1. Tool caches are isolated per project and per tool (`~/.cache/datamitsu/projects/{hash}/cache/{projectPath}/{toolName}/`)
138
+ 2. In monorepos, each project gets its own cache namespace (e.g., `cache/packages/frontend/tsc/`, `cache/packages/backend/tsc/`)
139
+ 3. Repository-scope tools use `cache/{toolName}/` (no project path component)
140
+ 4. `cache clear` correctly cleans up tool caches alongside lint/fix results
141
+ 5. Tool caches don't pollute `node_modules` or other project directories
142
+
143
+ ### Facts API vs Templates
144
+
145
+ The `facts()` function provides platform and environment information for conditional logic in configs:
146
+
147
+ - `facts().os`, `facts().arch` - Platform detection
148
+ - `facts().isInGitRepo`, `facts().isMonorepo` - Git state
149
+ - `facts().packageName`, `facts().binaryCommand`, `facts().binaryPath` - Binary info
150
+ - `facts().env` - Environment variables
151
+
152
+ All path references use template placeholders instead. The following facts fields have been removed (breaking change):
153
+
154
+ - `facts().cwd` - use `{cwd}` template
155
+ - `facts().gitRoot` - use `{root}` template
156
+ - `facts().projectRoot` - use `{root}` template
157
+ - `facts().projectCachePath` - use `{toolCache}` template
128
158
 
129
159
  ## Examples
130
160
 
package/datamitsu CHANGED
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@datamitsu/datamitsu-linux-arm64",
3
- "version": "0.0.3-alpha-4",
3
+ "version": "0.0.3-alpha-6",
4
4
  "description": "The Linux ARM64 binary for datamitsu, configuration management and binary distribution tool",
5
5
  "repository": {
6
6
  "type": "git",