@tinycld/bootstrap 2.4.1 → 2.4.2
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/dist/assemble-workspace.js +129 -25
- package/dist/assemble-workspace.js.map +1 -1
- package/dist/index.js +0 -0
- package/package.json +46 -48
- package/templates/workspace/scripts/link-members.ts +79 -8
- package/templates/workspace/tests/expo-image-stub.tsx +11 -0
- package/templates/workspace/tinycld.packages.ts +9 -4
- package/templates/workspace/vitest.config.ts +8 -0
|
@@ -94,6 +94,70 @@ function pnpmWorkspaceYaml(dir) {
|
|
|
94
94
|
'',
|
|
95
95
|
].join('\n');
|
|
96
96
|
}
|
|
97
|
+
/**
|
|
98
|
+
* .watchmanconfig contents: the directories watchman must NOT crawl or subscribe
|
|
99
|
+
* to. The motivating failure is native build artifacts — tinycld/ios (Pods) and
|
|
100
|
+
* tinycld/android (.gradle, .cxx, build/) are multi-GB and churn on every native
|
|
101
|
+
* build, overflowing the fsevents kernel queue ("MustScanSubDirs UserDropped")
|
|
102
|
+
* and forcing slow recrawls that stall Metro starts.
|
|
103
|
+
*
|
|
104
|
+
* CRITICAL: the root node_modules is NOT ignored. Under node-linker=hoisted it's
|
|
105
|
+
* the flat store Metro resolves EVERY dependency from (incl. expo-router/entry,
|
|
106
|
+
* the app entry point); hiding it from watchman makes Metro's file map miss those
|
|
107
|
+
* files → "Unable to resolve module ./node_modules/...". Only node_modules/.cache
|
|
108
|
+
* (Metro's transform cache, never a resolvable path) is excluded. Each MEMBER's
|
|
109
|
+
* own node_modules IS ignored — under hoisting those are near-empty (deps resolve
|
|
110
|
+
* up to the root store), so Metro never reads them and they're pure crawl cost.
|
|
111
|
+
*
|
|
112
|
+
* Ignore_dirs matches path prefixes relative to the watch root, so the bare
|
|
113
|
+
* ".git" covers only the root-level one and every member's .git is listed
|
|
114
|
+
* explicitly. Listing an ignore_dir that doesn't exist is harmless — watchman
|
|
115
|
+
* skips absent paths.
|
|
116
|
+
*
|
|
117
|
+
* NON_MEMBER_DIRS are sibling dirs that aren't workspace members (so they're
|
|
118
|
+
* absent from the member union above) but routinely exist in a dev checkout and
|
|
119
|
+
* carry their own node_modules/.git: bootstrap (cloned for development), and the
|
|
120
|
+
* utils/web ecosystem tooling. Their node_modules/.git/dist are excluded too —
|
|
121
|
+
* none are part of the Metro app graph.
|
|
122
|
+
*/
|
|
123
|
+
const NON_MEMBER_DIRS = ['bootstrap', 'utils', 'web'];
|
|
124
|
+
function watchmanConfig(dir) {
|
|
125
|
+
const members = [...new Set([...ALL_MEMBERS, ...discoverPresentMembers(dir)])];
|
|
126
|
+
const memberDirs = members.flatMap((m) => [`${m}/node_modules`, `${m}/.git`]);
|
|
127
|
+
const testResultDirs = members.filter((m) => !m.startsWith('tinycld')).map((m) => `${m}/test-results`);
|
|
128
|
+
const nonMemberDirs = NON_MEMBER_DIRS.flatMap((d) => [`${d}/node_modules`, `${d}/.git`, `${d}/dist`]);
|
|
129
|
+
const ignoreDirs = [
|
|
130
|
+
// Root-level .git only. The root node_modules is deliberately NOT ignored:
|
|
131
|
+
// under node-linker=hoisted it's the flat store Metro resolves every dep
|
|
132
|
+
// from (incl. expo-router/entry), so hiding it breaks module resolution.
|
|
133
|
+
'.git',
|
|
134
|
+
// Metro's own transform cache under the root store — churns every build,
|
|
135
|
+
// never a resolvable module path.
|
|
136
|
+
'node_modules/.cache',
|
|
137
|
+
...memberDirs,
|
|
138
|
+
...nonMemberDirs,
|
|
139
|
+
// App-shell native + generated output that churns on builds. ios/android
|
|
140
|
+
// are multi-GB and the original motivation for this file.
|
|
141
|
+
'tinycld/ios',
|
|
142
|
+
'tinycld/android',
|
|
143
|
+
'tinycld/modules/app-updater/android/build',
|
|
144
|
+
'tinycld/modules/app-updater/ios/build',
|
|
145
|
+
'tinycld/.expo',
|
|
146
|
+
'tinycld/dist',
|
|
147
|
+
'tinycld/server/pb_data',
|
|
148
|
+
'tinycld/server/pb_test_data',
|
|
149
|
+
'tinycld/test-results',
|
|
150
|
+
'tinycld/playwright-report',
|
|
151
|
+
...testResultDirs,
|
|
152
|
+
];
|
|
153
|
+
const config = {
|
|
154
|
+
enable_parallel_crawl: true,
|
|
155
|
+
fsevents_try_resync: true,
|
|
156
|
+
fsevents_latency: 0.05,
|
|
157
|
+
ignore_dirs: [...new Set(ignoreDirs)],
|
|
158
|
+
};
|
|
159
|
+
return `${JSON.stringify(config, null, 4)}\n`;
|
|
160
|
+
}
|
|
97
161
|
/**
|
|
98
162
|
* Write (or merge into) the workspace-root coordination files in `dir`:
|
|
99
163
|
* package.json, pnpm-workspace.yaml, and scripts/link-members.ts.
|
|
@@ -160,6 +224,11 @@ export function writeWorkspaceManifest(dir) {
|
|
|
160
224
|
// pnpm-workspace.yaml is the source of truth for members + settings — always
|
|
161
225
|
// rewrite it (unlike package.json, no human-owned fields live here).
|
|
162
226
|
writeFileSync(join(dir, 'pnpm-workspace.yaml'), pnpmWorkspaceYaml(dir));
|
|
227
|
+
// .watchmanconfig is derived from the member list, like pnpm-workspace.yaml —
|
|
228
|
+
// always rewrite so it self-heals and can't drift to a stale ignore list (a
|
|
229
|
+
// hand-maintained one kept missing the hoisted root node_modules, which is
|
|
230
|
+
// what stalls Metro starts). No human-owned fields live here.
|
|
231
|
+
writeFileSync(join(dir, '.watchmanconfig'), watchmanConfig(dir));
|
|
163
232
|
// Minimal .npmrc: all pnpm settings live in pnpm-workspace.yaml (pnpm 10+
|
|
164
233
|
// reads them there, not from .npmrc). Only written when absent (don't
|
|
165
234
|
// clobber a real checkout's).
|
|
@@ -169,38 +238,73 @@ export function writeWorkspaceManifest(dir) {
|
|
|
169
238
|
}
|
|
170
239
|
writeRootBiomeConfig(dir);
|
|
171
240
|
}
|
|
241
|
+
// Re-root a biome glob written against the canonical's dir (<root>/tinycld/) so
|
|
242
|
+
// it means the same thing one level up at the workspace root. `**`-anchored globs
|
|
243
|
+
// already match at any depth; only bare relative segments need the tinycld/ prefix.
|
|
244
|
+
function rerootBiomeGlob(glob) {
|
|
245
|
+
const negated = glob.startsWith('!');
|
|
246
|
+
const body = negated ? glob.slice(1) : glob;
|
|
247
|
+
if (body.startsWith('**') || body.startsWith('/'))
|
|
248
|
+
return glob;
|
|
249
|
+
const rerooted = `tinycld/${body}`;
|
|
250
|
+
return negated ? `!${rerooted}` : rerooted;
|
|
251
|
+
}
|
|
252
|
+
function rerootBiomePluginPath(p) {
|
|
253
|
+
if (p.startsWith('/'))
|
|
254
|
+
return p;
|
|
255
|
+
return `./tinycld/${p.replace(/^\.\//, '')}`;
|
|
256
|
+
}
|
|
172
257
|
/**
|
|
173
258
|
* Write the workspace-root biome.json. Biome searches only UPWARD for config,
|
|
174
259
|
* and the canonical biome.json lives at <root>/tinycld/ — a SIBLING of the
|
|
175
|
-
* feature members, never an ancestor. Without a root config
|
|
176
|
-
* inside a
|
|
177
|
-
* biome's built-in defaults, flooding output with
|
|
178
|
-
*
|
|
179
|
-
* so it's resolvable from anywhere. Members may add their own `root: false`
|
|
180
|
-
* biome.json extending canonical to override rules; most don't.
|
|
260
|
+
* feature members, never an ancestor. Without a `root: true` config above the
|
|
261
|
+
* members, running biome from inside a sibling (or via the editor/LSP) finds
|
|
262
|
+
* nothing and falls back to biome's built-in defaults, flooding output with
|
|
263
|
+
* bogus reformatting.
|
|
181
264
|
*
|
|
182
|
-
*
|
|
183
|
-
*
|
|
184
|
-
*
|
|
185
|
-
*
|
|
186
|
-
*
|
|
265
|
+
* This config must NOT use `extends: ['./tinycld/biome.json']`: Biome 2.5.0
|
|
266
|
+
* silently DROPS the entire `plugins` array from any config reached through a
|
|
267
|
+
* file-path `extends` (biome #8488, only partially fixed by #8524, which covers
|
|
268
|
+
* `extends: "//"` but not a root extending a sibling file). Rules still load, so
|
|
269
|
+
* the GritQL pbtsdb guards would just never run. So the root config must INLINE
|
|
270
|
+
* the canonical's rules + plugins. The generator (tinycld/scripts/generate.ts,
|
|
271
|
+
* run by every install's postinstall) is the authoritative writer and re-derives
|
|
272
|
+
* this file from the canonical each install; this seed only has to be correct for
|
|
273
|
+
* the window between `--assemble-only` and the first install.
|
|
187
274
|
*
|
|
188
|
-
*
|
|
189
|
-
*
|
|
190
|
-
*
|
|
191
|
-
*
|
|
192
|
-
*
|
|
193
|
-
*
|
|
194
|
-
*
|
|
195
|
-
*
|
|
275
|
+
* Bootstrap can only inline when the canonical is already on disk (a re-assemble
|
|
276
|
+
* onto an existing workspace, or after the tinycld clone). On a fresh assemble the
|
|
277
|
+
* tinycld repo isn't cloned yet, so we fall back to a minimal `root: true` seed
|
|
278
|
+
* with no plugins — harmless because nothing is installed to lint yet, and the
|
|
279
|
+
* first install's generator immediately replaces it with the full inlined config.
|
|
280
|
+
*
|
|
281
|
+
* `files.includes`/plugin paths are re-rooted (the canonical writes them relative
|
|
282
|
+
* to tinycld/; inlining moves them up one dir). `vcs.root` points at tinycld/, not
|
|
283
|
+
* the workspace root: the canonical relies on tinycld/.gitignore to exclude
|
|
284
|
+
* generated/build artifacts, and every invocation under the workspace root
|
|
285
|
+
* resolves THIS config as the root and inherits its vcs settings. A fresh
|
|
286
|
+
* workspace root has no .gitignore (and isn't a git repo), so anchoring vcs there
|
|
287
|
+
* would error "couldn't find an ignore file".
|
|
196
288
|
*/
|
|
197
289
|
function writeRootBiomeConfig(root) {
|
|
198
|
-
const
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
290
|
+
const canonicalPath = join(root, 'tinycld', 'biome.json');
|
|
291
|
+
const config = existsSync(canonicalPath)
|
|
292
|
+
? (() => {
|
|
293
|
+
const canonical = JSON.parse(readFileSync(canonicalPath, 'utf8'));
|
|
294
|
+
const c = { ...canonical, root: true };
|
|
295
|
+
delete c.extends;
|
|
296
|
+
if (c.files?.includes) {
|
|
297
|
+
c.files = { ...c.files, includes: c.files.includes.map(rerootBiomeGlob) };
|
|
298
|
+
}
|
|
299
|
+
if (Array.isArray(c.plugins)) {
|
|
300
|
+
c.plugins = c.plugins.map((entry) => typeof entry === 'string'
|
|
301
|
+
? rerootBiomePluginPath(entry)
|
|
302
|
+
: { ...entry, path: rerootBiomePluginPath(entry.path) });
|
|
303
|
+
}
|
|
304
|
+
return c;
|
|
305
|
+
})()
|
|
306
|
+
: { $schema: 'https://biomejs.dev/schemas/2.5.0/schema.json', root: true };
|
|
307
|
+
config.vcs = { enabled: true, clientKind: 'git', useIgnoreFile: true, root: 'tinycld' };
|
|
204
308
|
writeFileSync(join(root, 'biome.json'), `${JSON.stringify(config, null, 4)}\n`);
|
|
205
309
|
}
|
|
206
310
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assemble-workspace.js","sourceRoot":"","sources":["../src/assemble-workspace.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAC9C,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,WAAW,EAAE,YAAY,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAC3G,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAExC,gFAAgF;AAChF,iFAAiF;AACjF,kFAAkF;AAClF,MAAM,YAAY,GAAG,CAAC,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,uBAAuB,CAAU,CAAA;AAEhH,8EAA8E;AAC9E,iFAAiF;AACjF,gFAAgF;AAChF,8EAA8E;AAC9E,qEAAqE;AAErE,6EAA6E;AAC7E,6EAA6E;AAC7E,uEAAuE;AACvE,MAAM,WAAW,GAAG,CAAC,SAAS,EAAE,cAAc,EAAE,yBAAyB,EAAE,GAAG,YAAY,CAAU,CAAA;AAEpG,8EAA8E;AAC9E,gFAAgF;AAChF,wCAAwC;AACxC,MAAM,YAAY,GAAG,QAAQ,CAAA;AAE7B;;;;;;;;;;G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KAAK,CAAC,GAAG,QAAQ,IAAI,IAAI,MAAM,EAAE,IAAI,EAAE,GAAG,CAAC;YAAE,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IACvE,CAAC;IACD,OAAO,OAAO,CAAA;AAClB,CAAC"}
|
package/dist/index.js
CHANGED
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,49 +1,47 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
"
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
"
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
"packageManager": "pnpm@11.3.0"
|
|
49
|
-
}
|
|
2
|
+
"name": "@tinycld/bootstrap",
|
|
3
|
+
"version": "2.4.2",
|
|
4
|
+
"description": "Scaffolder for @tinycld feature packages",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/tinycld/bootstrap.git"
|
|
10
|
+
},
|
|
11
|
+
"bin": {
|
|
12
|
+
"bootstrap": "dist/index.js"
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
"dist",
|
|
16
|
+
"templates"
|
|
17
|
+
],
|
|
18
|
+
"publishConfig": {
|
|
19
|
+
"access": "public"
|
|
20
|
+
},
|
|
21
|
+
"dependencies": {
|
|
22
|
+
"@clack/prompts": "^0.8.0",
|
|
23
|
+
"picocolors": "^1.1.0"
|
|
24
|
+
},
|
|
25
|
+
"devDependencies": {
|
|
26
|
+
"@biomejs/biome": "^2.4.12",
|
|
27
|
+
"@types/node": "^22.10.0",
|
|
28
|
+
"tsx": "^4.21.0",
|
|
29
|
+
"typescript": "^5.9.0",
|
|
30
|
+
"vitest": "^3.0.0"
|
|
31
|
+
},
|
|
32
|
+
"engines": {
|
|
33
|
+
"node": ">=24"
|
|
34
|
+
},
|
|
35
|
+
"scripts": {
|
|
36
|
+
"clean": "rm -rf dist",
|
|
37
|
+
"build": "pnpm run clean && tsc",
|
|
38
|
+
"dev": "tsx src/index.ts",
|
|
39
|
+
"lint": "biome check .",
|
|
40
|
+
"lint:fix": "biome check --write .",
|
|
41
|
+
"typecheck": "tsc --noEmit",
|
|
42
|
+
"checks": "pnpm run lint && pnpm run typecheck",
|
|
43
|
+
"test": "vitest run --exclude '**/tests/integration/**'",
|
|
44
|
+
"test:integration": "vitest run tests/integration",
|
|
45
|
+
"release": "pnpm publish"
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -27,6 +27,15 @@ import { getPackages } from '../tinycld.packages'
|
|
|
27
27
|
|
|
28
28
|
const WS_ROOT = path.resolve(import.meta.dirname, '..')
|
|
29
29
|
|
|
30
|
+
// Absolute path to the app shell dir, which holds the nested core/,
|
|
31
|
+
// package-scripts/, and the generated output. Normally <WS_ROOT>/tinycld, but
|
|
32
|
+
// EAS cloud builds clone the shell into a dir named 'build', so the EAS install
|
|
33
|
+
// script exports TINYCLD_APP_DIR. Resolved as an absolute path to match the
|
|
34
|
+
// generator's scripts/paths.ts contract for the same env var.
|
|
35
|
+
const APP_DIR = process.env.TINYCLD_APP_DIR
|
|
36
|
+
? path.resolve(process.env.TINYCLD_APP_DIR)
|
|
37
|
+
: path.join(WS_ROOT, 'tinycld')
|
|
38
|
+
|
|
30
39
|
// Map a member's package name to its on-disk sibling dir by scanning the
|
|
31
40
|
// workspace root (the dir name need not equal the package name — e.g.
|
|
32
41
|
// @tinycld/google-takeout-import lives in google-takeout-import/).
|
|
@@ -45,11 +54,11 @@ function memberDirsByName(): Map<string, string> {
|
|
|
45
54
|
// not a dir, or no/unreadable package.json — skip
|
|
46
55
|
}
|
|
47
56
|
}
|
|
48
|
-
// @tinycld/core lives nested in the
|
|
57
|
+
// @tinycld/core lives nested in the app shell (<WS_ROOT>/<APP_DIR>/core/);
|
|
49
58
|
// the top-level scan won't find it. Register it explicitly so the
|
|
50
59
|
// node_modules/@tinycld/core symlink is still created.
|
|
51
60
|
if (!index.has('@tinycld/core')) {
|
|
52
|
-
const nestedCore = path.join(
|
|
61
|
+
const nestedCore = path.join(APP_DIR, 'core')
|
|
53
62
|
try {
|
|
54
63
|
const name = JSON.parse(
|
|
55
64
|
fs.readFileSync(path.join(nestedCore, 'package.json'), 'utf8')
|
|
@@ -83,13 +92,73 @@ function linkInto(nodeModulesDir: string, scopeName: string, targetDir: string):
|
|
|
83
92
|
fs.symlinkSync(relTarget, linkPath)
|
|
84
93
|
}
|
|
85
94
|
|
|
95
|
+
const GITIGNORE_BEGIN = '# >>> tinycld members (auto-managed by link-members.ts) >>>'
|
|
96
|
+
const GITIGNORE_END = '# <<< tinycld members <<<'
|
|
97
|
+
|
|
98
|
+
// Keep the workspace-root .gitignore's member list in sync with the
|
|
99
|
+
// independent repos present on disk. Every top-level dir that is its own git
|
|
100
|
+
// repo or carries a package.json (members like mail/drive, plus sibling repos
|
|
101
|
+
// like bootstrap/utils/web) must never be tracked by the workspace repo — each
|
|
102
|
+
// has its own history + remote, and the workspace repo commits only
|
|
103
|
+
// coordination files. Nested members (e.g. tinycld/core) are already covered by
|
|
104
|
+
// ignoring /tinycld/. The block is delimited so we rewrite only between the
|
|
105
|
+
// markers and never clobber hand-written rules (.env, node_modules, scratch).
|
|
106
|
+
function discoverSiblingRepos(): string[] {
|
|
107
|
+
const names = new Set<string>()
|
|
108
|
+
for (const entry of fs.readdirSync(WS_ROOT)) {
|
|
109
|
+
if (entry === 'node_modules') continue
|
|
110
|
+
const dir = path.join(WS_ROOT, entry)
|
|
111
|
+
try {
|
|
112
|
+
if (!fs.statSync(dir).isDirectory()) continue
|
|
113
|
+
} catch {
|
|
114
|
+
continue
|
|
115
|
+
}
|
|
116
|
+
const isRepo = fs.existsSync(path.join(dir, '.git'))
|
|
117
|
+
const hasPkg = fs.existsSync(path.join(dir, 'package.json'))
|
|
118
|
+
if (isRepo || hasPkg) names.add(`/${entry}/`)
|
|
119
|
+
}
|
|
120
|
+
return [...names].sort()
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
function syncGitignore(): void {
|
|
124
|
+
const topLevel = discoverSiblingRepos()
|
|
125
|
+
if (topLevel.length === 0) return
|
|
126
|
+
|
|
127
|
+
const block = [GITIGNORE_BEGIN, ...topLevel, GITIGNORE_END].join('\n')
|
|
128
|
+
const gitignorePath = path.join(WS_ROOT, '.gitignore')
|
|
129
|
+
let existing = ''
|
|
130
|
+
try {
|
|
131
|
+
existing = fs.readFileSync(gitignorePath, 'utf8')
|
|
132
|
+
} catch {
|
|
133
|
+
// no .gitignore yet — we'll create one
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
const beginIdx = existing.indexOf(GITIGNORE_BEGIN)
|
|
137
|
+
const endIdx = existing.indexOf(GITIGNORE_END)
|
|
138
|
+
let next: string
|
|
139
|
+
if (beginIdx !== -1 && endIdx !== -1 && endIdx > beginIdx) {
|
|
140
|
+
// Replace the existing managed block in place.
|
|
141
|
+
const before = existing.slice(0, beginIdx)
|
|
142
|
+
const after = existing.slice(endIdx + GITIGNORE_END.length)
|
|
143
|
+
next = `${before}${block}${after}`
|
|
144
|
+
} else {
|
|
145
|
+
// Append a fresh block, separated by a blank line if there's prior content.
|
|
146
|
+
const sep = existing.length > 0 && !existing.endsWith('\n\n') ? '\n\n' : ''
|
|
147
|
+
const prefix = existing.length > 0 && !existing.endsWith('\n') ? '\n' : ''
|
|
148
|
+
next = `${existing}${prefix}${sep}${block}\n`
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
if (next !== existing) {
|
|
152
|
+
fs.writeFileSync(gitignorePath, next)
|
|
153
|
+
console.log(`[link-members] synced ${topLevel.length} member(s) into .gitignore`)
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
|
|
86
157
|
function main(): void {
|
|
87
158
|
const names = getPackages() // ['@tinycld/core', '@tinycld/calc', ...]
|
|
88
159
|
const dirs = memberDirsByName()
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
path.join(WS_ROOT, 'tinycld', 'node_modules'),
|
|
92
|
-
]
|
|
160
|
+
syncGitignore()
|
|
161
|
+
const targets = [path.join(WS_ROOT, 'node_modules'), path.join(APP_DIR, 'node_modules')]
|
|
93
162
|
|
|
94
163
|
let linked = 0
|
|
95
164
|
for (const name of names) {
|
|
@@ -112,13 +181,15 @@ function main(): void {
|
|
|
112
181
|
// `@tinycld/app-generated/*` imports resolve by name from any consumer that
|
|
113
182
|
// pulls core in via its exports map. Skip if the generated dir doesn't exist
|
|
114
183
|
// yet (generator runs in the same postinstall, but ordering/partial runs vary).
|
|
115
|
-
const appGeneratedDir = path.join(
|
|
184
|
+
const appGeneratedDir = path.join(APP_DIR, 'lib', 'generated')
|
|
116
185
|
if (fs.existsSync(appGeneratedDir)) {
|
|
117
186
|
for (const nm of targets) {
|
|
118
187
|
if (fs.existsSync(nm)) linkInto(nm, 'app-generated', appGeneratedDir)
|
|
119
188
|
}
|
|
120
189
|
} else {
|
|
121
|
-
console.warn(
|
|
190
|
+
console.warn(
|
|
191
|
+
'[link-members] tinycld/lib/generated not present — skipping @tinycld/app-generated link'
|
|
192
|
+
)
|
|
122
193
|
}
|
|
123
194
|
|
|
124
195
|
console.log(`[link-members] linked ${linked} workspace member(s) into node_modules/@tinycld/`)
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// Test-only stub for expo-image. The real package transitively imports
|
|
2
|
+
// expo-modules-core, whose module-load-time side effects (e.g. reading
|
|
3
|
+
// the `__DEV__` global) don't survive a bare Node test environment.
|
|
4
|
+
// Tests that pull a component importing <Image> only need a harmless
|
|
5
|
+
// placeholder — they assert on logic, not on rendered pixels.
|
|
6
|
+
|
|
7
|
+
import type { ReactElement } from 'react'
|
|
8
|
+
|
|
9
|
+
export function Image(_props: unknown): ReactElement | null {
|
|
10
|
+
return null
|
|
11
|
+
}
|
|
@@ -49,11 +49,16 @@ export function getPackages(): string[] {
|
|
|
49
49
|
if (hasManifest(dir)) features.push(name)
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
-
// @tinycld/core moved INSIDE the
|
|
53
|
-
//
|
|
54
|
-
// still listed first.
|
|
52
|
+
// @tinycld/core moved INSIDE the app shell (at <appDir>/core/); the
|
|
53
|
+
// top-level scan above won't see it. Look for it explicitly so it is
|
|
54
|
+
// still listed first. The app dir is normally <wsRoot>/tinycld, but EAS
|
|
55
|
+
// cloud builds clone the shell into a dir named 'build' and export
|
|
56
|
+
// TINYCLD_APP_DIR (absolute path) — honor it to match scripts/paths.ts.
|
|
55
57
|
if (!core) {
|
|
56
|
-
const
|
|
58
|
+
const appDir = process.env.TINYCLD_APP_DIR
|
|
59
|
+
? path.resolve(process.env.TINYCLD_APP_DIR)
|
|
60
|
+
: path.join(wsRoot, 'tinycld')
|
|
61
|
+
const nestedCorePkg = path.join(appDir, 'core', 'package.json')
|
|
57
62
|
try {
|
|
58
63
|
const name = JSON.parse(fs.readFileSync(nestedCorePkg, 'utf8')).name
|
|
59
64
|
if (name === CORE_NAME) core = name
|
|
@@ -75,6 +75,14 @@ export default defineConfig({
|
|
|
75
75
|
find: /^expo-clipboard$/,
|
|
76
76
|
replacement: path.join(ROOT, 'tests/expo-clipboard-stub.ts'),
|
|
77
77
|
},
|
|
78
|
+
// expo-image pulls in expo-modules-core the same way (its Platform
|
|
79
|
+
// module reads the global __DEV__ at load). Any unit test that
|
|
80
|
+
// imports a component rendering a Thumbnail / <Image> would
|
|
81
|
+
// otherwise crash at collect time.
|
|
82
|
+
{
|
|
83
|
+
find: /^expo-image$/,
|
|
84
|
+
replacement: path.join(ROOT, 'tests/expo-image-stub.tsx'),
|
|
85
|
+
},
|
|
78
86
|
// expo-router's CJS entry does `require("./global")` at module top,
|
|
79
87
|
// which Node can't resolve when reached through a member symlink.
|
|
80
88
|
{
|