@10stars/config 17.0.6 → 17.0.8
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/package.json +4 -4
- package/src/linking/link-remote.ts +24 -9
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@10stars/config",
|
|
3
|
-
"version": "17.0.
|
|
3
|
+
"version": "17.0.8",
|
|
4
4
|
"private": false,
|
|
5
5
|
"bin": {
|
|
6
6
|
"config": "./src/index.ts"
|
|
@@ -27,9 +27,9 @@
|
|
|
27
27
|
"@types/react": "^19.2.17",
|
|
28
28
|
"@types/react-dom": "^19.2.3",
|
|
29
29
|
"husky": "^9.1.7",
|
|
30
|
-
"oxfmt": "0.
|
|
31
|
-
"oxlint": "^1.
|
|
32
|
-
"oxlint-tsgolint": "^0.
|
|
30
|
+
"oxfmt": "0.59.0",
|
|
31
|
+
"oxlint": "^1.74.0",
|
|
32
|
+
"oxlint-tsgolint": "^0.25.0",
|
|
33
33
|
"tsx": "^4.23.1",
|
|
34
34
|
"type-fest": "^5.8.0",
|
|
35
35
|
"typescript": "7.0.2"
|
|
@@ -5,6 +5,7 @@ import { promisify } from "node:util"
|
|
|
5
5
|
|
|
6
6
|
import type * as TF from "type-fest"
|
|
7
7
|
|
|
8
|
+
import { patchVanillaExtract } from "../vanilla-extract/patch-vanilla-extract"
|
|
8
9
|
import { dedupeSingletons, linkSelf } from "./link-packages"
|
|
9
10
|
|
|
10
11
|
interface Config {
|
|
@@ -37,8 +38,14 @@ interface LinkRemoteOptions {
|
|
|
37
38
|
type Sibling = { abs: string; ref: string | null }
|
|
38
39
|
|
|
39
40
|
// execFile (not a shell) so branch names / refs / SHAs can't inject shell syntax.
|
|
40
|
-
|
|
41
|
-
|
|
41
|
+
// quiet: ignore the child's stderr (used by tryGit, whose callers tolerate failure — otherwise
|
|
42
|
+
// git's "fatal: …" for an expected miss, e.g. `describe` on a tagless shallow clone, spams the log).
|
|
43
|
+
const git = (args: string[], cwd?: string, quiet = false): string =>
|
|
44
|
+
execFileSync(`git`, args, {
|
|
45
|
+
cwd,
|
|
46
|
+
encoding: `utf8`,
|
|
47
|
+
...(quiet && { stdio: [`ignore`, `pipe`, `ignore`] }),
|
|
48
|
+
}).trim()
|
|
42
49
|
|
|
43
50
|
const execFileAsync = promisify(execFile)
|
|
44
51
|
|
|
@@ -51,21 +58,29 @@ const gitAsync = (args: string[], cwd?: string): Promise<unknown> =>
|
|
|
51
58
|
|
|
52
59
|
const tryGit = (args: string[], cwd?: string): string | null => {
|
|
53
60
|
try {
|
|
54
|
-
return git(args, cwd)
|
|
61
|
+
return git(args, cwd, true) // quiet: failure is expected/tolerated, so don't leak git's stderr
|
|
55
62
|
} catch {
|
|
56
63
|
return null
|
|
57
64
|
}
|
|
58
65
|
}
|
|
59
66
|
|
|
60
|
-
// --ignore-scripts: a sibling is only a dependency here, so skip its postinstall
|
|
61
|
-
//
|
|
62
|
-
//
|
|
63
|
-
//
|
|
64
|
-
//
|
|
65
|
-
//
|
|
67
|
+
// --ignore-scripts: a sibling is only a dependency here, so skip the bulk of its postinstall
|
|
68
|
+
// (`config prepare` — husky/vscode/etc.); the cross-repo `@types/*` dedupe runs once via the
|
|
69
|
+
// consumer's `dedupe` afterwards. We DO re-run the two install-time steps a sibling's own tree
|
|
70
|
+
// needs when it's consumed as a `file:` dep:
|
|
71
|
+
// - linkSelf: restore its self-symlink so `<self>/src/…` self-imports resolve at realpath in the
|
|
72
|
+
// flat-peer layout. (Workspace-root siblings, e.g. backend-api, get subpackage self-links from
|
|
73
|
+
// bun's own workspace linking, so linkSelf no-ops on them.)
|
|
74
|
+
// - patchVanillaExtract: rewrite the VE `cssFileFilter` in the sibling's OWN node_modules. The
|
|
75
|
+
// consumer's build resolves `@vanilla-extract/vite-plugin`/`integration` from a workspace
|
|
76
|
+
// sibling's hoisted node_modules (e.g. `@bundling/frontend-dev-mode` → ../bundling/node_modules),
|
|
77
|
+
// and the consumer's own patch skips symlinked siblings — so without this the build loads an
|
|
78
|
+
// unpatched filter, our `css.ts` modules go untransformed, and prerender throws "Styles were
|
|
79
|
+
// unable to be assigned to a file". No-op for siblings without VE.
|
|
66
80
|
const bunInstall = async (cwd: string): Promise<void> => {
|
|
67
81
|
await execFileAsync(`bun`, [`install`, `--ignore-scripts`], { cwd })
|
|
68
82
|
await linkSelf(cwd)
|
|
83
|
+
await patchVanillaExtract(cwd)
|
|
69
84
|
}
|
|
70
85
|
|
|
71
86
|
const exists = (p: string): Promise<boolean> =>
|