@datamitsu/datamitsu-darwin-arm64 0.0.3-alpha-4 → 0.0.3-alpha-5
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/README.md +31 -3
- package/datamitsu +0 -0
- 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
|
-
##
|
|
100
|
+
## Template Placeholders
|
|
101
101
|
|
|
102
|
-
|
|
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}` | Project 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
|
-
|
|
125
|
+
"{toolCache}/tsbuildinfo",
|
|
114
126
|
],
|
|
115
127
|
command: "tsc",
|
|
116
128
|
globs: ["**/*.ts", "**/*.tsx"],
|
|
@@ -126,6 +138,22 @@ This ensures that:
|
|
|
126
138
|
2. `cache clear` correctly cleans up tool caches alongside lint/fix results
|
|
127
139
|
3. Tool caches don't pollute `node_modules` or other project directories
|
|
128
140
|
|
|
141
|
+
### Facts API vs Templates
|
|
142
|
+
|
|
143
|
+
The `facts()` function provides platform and environment information for conditional logic in configs:
|
|
144
|
+
|
|
145
|
+
- `facts().os`, `facts().arch` - Platform detection
|
|
146
|
+
- `facts().isInGitRepo`, `facts().isMonorepo` - Git state
|
|
147
|
+
- `facts().packageName`, `facts().binaryCommand`, `facts().binaryPath` - Binary info
|
|
148
|
+
- `facts().env` - Environment variables
|
|
149
|
+
|
|
150
|
+
All path references use template placeholders instead. The following facts fields have been removed (breaking change):
|
|
151
|
+
|
|
152
|
+
- `facts().cwd` - use `{cwd}` template
|
|
153
|
+
- `facts().gitRoot` - use `{root}` template
|
|
154
|
+
- `facts().projectRoot` - use `{root}` template
|
|
155
|
+
- `facts().projectCachePath` - use `{toolCache}` template
|
|
156
|
+
|
|
129
157
|
## Examples
|
|
130
158
|
|
|
131
159
|
Usage examples for runtime-managed apps (multi-version isolation, UV isolation, PNPM plugins) are in [examples/](examples/).
|
package/datamitsu
CHANGED
|
Binary file
|
package/package.json
CHANGED