@stim-cli/metro 1.38.0 → 1.39.0

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/README.md +12 -3
  2. package/package.json +3 -3
package/README.md CHANGED
@@ -11,12 +11,20 @@ npm install --save-dev @stim-cli/metro
11
11
 
12
12
  ## Shared transforms
13
13
 
14
+ Set `cacheStores` on the final merged Metro config:
15
+
14
16
  ```js
15
17
  const { sharedCacheStores } = require('@stim-cli/metro');
18
+ const { name } = require('./package.json');
16
19
 
17
- config.cacheStores = sharedCacheStores('my-app');
20
+ config.cacheStores = sharedCacheStores(name, { cwd: __dirname });
18
21
  ```
19
22
 
23
+ For bare React Native under Stim, this explicitly selects one shared transform
24
+ store. Stim's automatic setup preserves Metro's default `os.tmpdir()/metro-cache`
25
+ store; this assignment replaces it and any custom stores in `cacheStores`.
26
+ Using the package name lets Stim recognize the shared store without adding another.
27
+
20
28
  Set `STIM_METRO_CACHE` to an absolute path to override the shared cache location.
21
29
  A relative value is ignored with a warning.
22
30
 
@@ -57,8 +65,9 @@ The reporter must be attached to the config passed directly to
57
65
  `Metro.runServer`. React Native and Expo CLIs can replace a reporter declared in
58
66
  `metro.config.js`.
59
67
 
60
- Stim supplies this integration automatically for Stim-managed servers. Add the
61
- package directly only for Metro processes that run outside Stim.
68
+ Stim supplies this integration automatically for Stim-managed servers. Direct
69
+ configuration is optional: use it for the explicit store choice above or for
70
+ Metro processes that run outside Stim.
62
71
 
63
72
  See the [cache package documentation](https://stim.appandflow.com/docs/cache-packages)
64
73
  for current usage and cleanup guidance.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stim-cli/metro",
3
- "version": "1.38.0",
3
+ "version": "1.39.0",
4
4
  "description": "Metro integration for Stim: shared transforms across worktrees and structured logs.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -24,8 +24,8 @@
24
24
  }
25
25
  },
26
26
  "dependencies": {
27
- "@stim-cli/cache": "1.38.0",
28
- "@stim-cli/core": "1.38.0"
27
+ "@stim-cli/cache": "1.39.0",
28
+ "@stim-cli/core": "1.39.0"
29
29
  },
30
30
  "peerDependencies": {
31
31
  "metro-cache": "*"