@vvedantb/config 0.13.0 → 0.14.1
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/CHANGELOG.md +21 -3
- package/README.md +4 -4
- package/bin/vvedantb-android-release.js +2 -0
- package/bin/vvedantb-check-asar.js +2 -0
- package/bin/vvedantb-check-no-source-text.js +2 -0
- package/bin/vvedantb-check-shared-ui.js +2 -0
- package/bin/vvedantb-clerk-allow.js +2 -0
- package/bin/vvedantb-config.js +2 -0
- package/bin/vvedantb-doctor.js +2 -0
- package/dist/android-release-cli.js +3 -2
- package/dist/android-release.d.ts +18 -0
- package/dist/android-release.js +37 -4
- package/dist/check-asar-cli.js +0 -0
- package/dist/check-no-source-text-cli.js +0 -0
- package/dist/check-shared-ui-cli.js +0 -0
- package/dist/clerk-allow-cli.js +0 -0
- package/dist/cli.js +0 -0
- package/dist/doctor-cli.js +0 -0
- package/dist/doctor.js +11 -4
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/vite.d.ts +6 -0
- package/package.json +11 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.14.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#337](https://github.com/vvedantb/packages/pull/337) [`8bb6944`](https://github.com/vvedantb/packages/commit/8bb69441de755f833033b02fb2a65d72d692dd24) Thanks [@vvedantb](https://github.com/vvedantb)! - `vvedantb-android-release` can request ABIs for `reactNativeArchitectures` through the `REACT_NATIVE_ARCHITECTURES` env var or the `reactNativeArchitectures` config field, in that order. The default stays `arm64-v8a`. New helpers: `resolveReactNativeArchitectures` and `buildGradlePropertyEdits`.
|
|
8
|
+
|
|
9
|
+
## 0.14.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [#335](https://github.com/vvedantb/packages/pull/335) [`86d63c8`](https://github.com/vvedantb/packages/commit/86d63c83d4a927575fb2a7a812895442de095b22) Thanks [@vvedantb](https://github.com/vvedantb)! - `defineWebVitestConfig` takes `dedupe` (`resolve.dedupe`, as `defineWebViteConfig` does). Pass `dedupe: REACT_DEDUPE` when the tests load a workspace package from source: without it that package can load another copy of React than the app's.
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- [#335](https://github.com/vvedantb/packages/pull/335) [`86d63c8`](https://github.com/vvedantb/packages/commit/86d63c83d4a927575fb2a7a812895442de095b22) Thanks [@vvedantb](https://github.com/vvedantb)! - The `vvedantb-*` bins are now small committed files in `bin/` that import the built CLI from `dist`. pnpm links a bin only when its file exists at install: in a workspace `dist` does not exist yet, so no bin was linked and scripts such as `vvedantb-check-shared-ui` failed. The commands and their behaviour do not change.
|
|
18
|
+
|
|
19
|
+
- [#335](https://github.com/vvedantb/packages/pull/335) [`86d63c8`](https://github.com/vvedantb/packages/commit/86d63c83d4a927575fb2a7a812895442de095b22) Thanks [@vvedantb](https://github.com/vvedantb)! - `vvedantb-doctor` accepts the shared workflow from `vvedantb/workflows`. Before, `ci-reusable-workflow` and `ci-commands` failed for a repo that called `vvedantb/workflows/.github/workflows/ci-app.yml`, because the doctor looked only for the `vvedantb/packages` path. A call to the older path still passes.
|
|
20
|
+
|
|
3
21
|
## 0.13.0
|
|
4
22
|
|
|
5
23
|
### Minor Changes
|
|
@@ -11,7 +29,7 @@
|
|
|
11
29
|
### Minor Changes
|
|
12
30
|
|
|
13
31
|
- [#318](https://github.com/vvedantb/packages/pull/318) [`5f7ce9d`](https://github.com/vvedantb/packages/commit/5f7ce9d342f04bfd979baacc17fd00930f34bb56) Thanks [@vvedantb](https://github.com/vvedantb)! - Speed up the shared Android APK release path.
|
|
14
|
-
|
|
32
|
+
|
|
15
33
|
- Add `pickAndroidReleaseVersion` and its helpers (`compareSemver`, `highestSemver`, `publishedVersionNames`). The tests own the version rules. The `release-android-apk.yml` version step now lists tags once, takes published versionNames from tag suffixes and downloads `release.json` only for the highest semver tag, instead of every release.
|
|
16
34
|
- `vvedantb-android-release` builds `arm64-v8a` only (no `x86_64`), sets `org.gradle.workers.max=8` (replacing Expo's lower default) and `org.gradle.parallel=true`. `org.gradle.configuration-cache` stays off: ephemeral CI runners never reuse the cache, so a cold release build only pays the store cost, and native modules can still be incompatible on release tasks.
|
|
17
35
|
- Add the config flags `syncAppVersion` (write the version to `app.json` and the root `package.json`) and `versionNameFromAppJson` (use `expo.version` when `VERSION_NAME` is unset) so v-store can use the shared bin. Both default to `false`.
|
|
@@ -40,7 +58,7 @@
|
|
|
40
58
|
### Minor Changes
|
|
41
59
|
|
|
42
60
|
- [#292](https://github.com/vvedantb/packages/pull/292) [`dfd2849`](https://github.com/vvedantb/packages/commit/dfd2849e95d2f55e2a697767d3de171aaf1fe763) Thanks [@vvedantb](https://github.com/vvedantb)! - Add a shared-worker Vitest preset and a `vvedantb-doctor` CLI.
|
|
43
|
-
|
|
61
|
+
|
|
44
62
|
- `sharedWorkerVitestConfig` (and `SHARED_WORKER_SETUP`): an opt-in Vitest preset that lets test files share a worker (`isolate: false`), shuffles file order, and resets mocks, env stubs, global stubs and fake timers after each test. Trades per-file isolation for a faster run; adopt it per repo where tests are independent.
|
|
45
63
|
- `vvedantb-doctor`: a dependency-free CLI that inspects a repo for drift from the shared CI and tooling house rules (ESLint, Prettier, plain `tsc`, missing `tsrs`, missing `oxlint` dep or script, an older `@vvedantb/config` minor, a CI workflow that does not call the shared reusable workflow). It walks workspace packages, supports `--json` and a per-repo waiver file, makes no network requests, and exits non-zero on drift.
|
|
46
64
|
|
|
@@ -85,7 +103,7 @@
|
|
|
85
103
|
### Minor Changes
|
|
86
104
|
|
|
87
105
|
- [#225](https://github.com/vvedantb/packages/pull/225) [`4eada13`](https://github.com/vvedantb/packages/commit/4eada137e0ff7871dd1003c9b92e92fa29c1b892) Thanks [@vvedantb](https://github.com/vvedantb)! - Add four shared tooling items used across the apps:
|
|
88
|
-
|
|
106
|
+
|
|
89
107
|
- `withReleaseSigning`: an Expo config plugin that signs the Android `release` build type from a keystore (environment, else `keystore.properties`), failing a release when a value is missing. `expo/config-plugins` is an optional, lazily resolved peer. Marker is configurable and defaults to a value containing `plugins/withReleaseSigning.js` so build-script greps pass.
|
|
90
108
|
- `singletons` (and `nativeWindConfig`) on `defineExpoMetroConfig`: rewrites `originModulePath` to the app's `package.json` for the given module heads so a single copy resolves. Backward compatible for apps that omit it.
|
|
91
109
|
- `vvedantb-android-release`: a config-driven Android release build bin that merges the per-app build scripts into one and keeps the reusable-workflow `GITHUB_OUTPUT` interface (`apk`, `release_json`, `version_name`, `version_code`, `sha256`). Runs on Linux CI.
|
package/README.md
CHANGED
|
@@ -201,7 +201,7 @@ Each check has a stable id:
|
|
|
201
201
|
| `oxlint-dep` | No `oxlint` dependency. |
|
|
202
202
|
| `oxlint-script` | No `lint` script that runs `oxlint`. |
|
|
203
203
|
| `config-version` | The `@vvedantb/config` range floor is an older minor than the running `vvedantb-doctor` version. |
|
|
204
|
-
| `ci-reusable-workflow` | No workflow calls `vvedantb/
|
|
204
|
+
| `ci-reusable-workflow` | No workflow calls `vvedantb/workflows/.github/workflows/ci-app.yml`. A call to the older `vvedantb/packages/.github/workflows/ci-app.yml` also passes. |
|
|
205
205
|
| `ci-runner` | A job uses a runner the Boat policy does not allow. `boat`, `boat-small` and `boat-xlarge` pass, as do GitHub-hosted labels and `${{ ... }}` expressions. `boat-large` is for Android release builds only: it passes as `runs_on` for `release-android-apk.yml` or `release-gallery-android.yml`, or in a workflow file with `android` in its name, and fails on check jobs such as `ci-app.yml`. An unknown `boat*` label such as `boat-medium` fails. |
|
|
206
206
|
| `ci-commands` | A line in the `commands` input of the shared workflow is not `lint`, `typecheck` or `test` and has no written reason, or a reason names a command that CI does not run. |
|
|
207
207
|
|
|
@@ -262,7 +262,7 @@ export default defineConfig({
|
|
|
262
262
|
|
|
263
263
|
Keys that are not asked for are left out, so `resolve` and `build` appear only when set. `reactPlugins(setup)` and `vendorChunkBuild(tests?)` are exported on their own.
|
|
264
264
|
|
|
265
|
-
`defineWebVitestConfig` takes `plugins`, `tsconfigPaths`, `alias`, `automaticJsx` (`esbuild: { jsx: "automatic" }`), `include` (default `["src/**/*.test.ts"]`)
|
|
265
|
+
`defineWebVitestConfig` takes `plugins`, `tsconfigPaths`, `alias`, `automaticJsx` (`esbuild: { jsx: "automatic" }`), `include` (default `["src/**/*.test.ts"]`), `inline` (`test.server.deps.inline`) and `dedupe` (`resolve.dedupe`). Pass `dedupe: REACT_DEDUPE` when the tests load a workspace package from source (`workspace:*` with `inline`): without it that package can load another copy of React than the app's, and hooks fail. It always sets `test.environment: "node"`. Pass the result to `defineConfig` from `vitest/config`.
|
|
266
266
|
|
|
267
267
|
### Shared-worker Vitest preset (opt-in, faster)
|
|
268
268
|
|
|
@@ -569,7 +569,7 @@ Paths and filters are as read from each app's current script. Check them against
|
|
|
569
569
|
|
|
570
570
|
### Gradle settings
|
|
571
571
|
|
|
572
|
-
The bin edits `android/gradle.properties` (`DEFAULT_GRADLE_PROPERTY_EDITS`): `reactNativeArchitectures=arm64-v8a` (published APKs run on phones; emulator builds in `apps/native-gallery` set `x86_64` themselves), `org.gradle.workers.max=8` and `org.gradle.parallel=true` (boat-large has 8 cores; both override Expo's defaults). `org.gradle.configuration-cache` stays off: ephemeral CI runners never reuse the cache, so a cold `assembleRelease` only pays the store cost, and Expo and third-party native modules can still be incompatible on release tasks. After prebuild the bin checks `versionCode`, `versionName` and signing in `android/app/build.gradle`.
|
|
572
|
+
The bin edits `android/gradle.properties` (`DEFAULT_GRADLE_PROPERTY_EDITS`): `reactNativeArchitectures=arm64-v8a` by default (published APKs run on phones; emulator builds in `apps/native-gallery` set `x86_64` themselves). The `REACT_NATIVE_ARCHITECTURES` env var, then the config field `reactNativeArchitectures`, override it, such as `arm64-v8a,x86_64` for an app whose start-up test runs on an x86_64 emulator. It also sets `org.gradle.workers.max=8` and `org.gradle.parallel=true` (boat-large has 8 cores; both override Expo's defaults). `org.gradle.configuration-cache` stays off: ephemeral CI runners never reuse the cache, so a cold `assembleRelease` only pays the store cost, and Expo and third-party native modules can still be incompatible on release tasks. After prebuild the bin checks `versionCode`, `versionName` and signing in `android/app/build.gradle`.
|
|
573
573
|
|
|
574
574
|
### Version pick
|
|
575
575
|
|
|
@@ -577,7 +577,7 @@ The bin edits `android/gradle.properties` (`DEFAULT_GRADLE_PROPERTY_EDITS`): `re
|
|
|
577
577
|
|
|
578
578
|
Not covered, so it stays local: the keystore location (a `withReleaseSigning` plugin option), velth's own signing-completeness pre-check (the Gradle plugin enforces it), and eva's Clerk native-API check (use the workflow's `pre_build_command`).
|
|
579
579
|
|
|
580
|
-
Pure helpers (`pickAndroidReleaseVersion`, `readExpoVersion`, `syncExpoVersion`, `syncPackageJsonVersion`, `gradleVersionNameOk`, `validateVersionName`, `validateVersionCode`, `publicEnvDefault`, `easProfileEntries`, `gradlePropertiesEdits`, `parseBadging`, `releaseJson`, `formatReleaseJson`, `formatGithubOutput`, `apkFileName`, `parseAndroidReleaseConfig`) are exported from the root and unit-tested. The full Android build was not exercised on Windows.
|
|
580
|
+
Pure helpers (`pickAndroidReleaseVersion`, `readExpoVersion`, `syncExpoVersion`, `syncPackageJsonVersion`, `gradleVersionNameOk`, `validateVersionName`, `validateVersionCode`, `publicEnvDefault`, `easProfileEntries`, `gradlePropertiesEdits`, `buildGradlePropertyEdits`, `resolveReactNativeArchitectures`, `parseBadging`, `releaseJson`, `formatReleaseJson`, `formatGithubOutput`, `apkFileName`, `parseAndroidReleaseConfig`) are exported from the root and unit-tested. The full Android build was not exercised on Windows.
|
|
581
581
|
|
|
582
582
|
## Versions
|
|
583
583
|
|
|
@@ -17,7 +17,7 @@ import { spawnSync } from "node:child_process";
|
|
|
17
17
|
import { createHash } from "node:crypto";
|
|
18
18
|
import { appendFileSync, chmodSync, copyFileSync, existsSync, readdirSync, readFileSync, rmSync, writeFileSync, } from "node:fs";
|
|
19
19
|
import { dirname, join, resolve } from "node:path";
|
|
20
|
-
import { apkFileName, easProfileEntries, formatGithubOutput, formatReleaseJson, gradlePropertiesEdits, gradleVersionNameOk, parseAndroidReleaseConfig, parseBadging, publicEnvDefault, readExpoVersion, releaseJson, syncExpoVersion, syncPackageJsonVersion, validateVersionCode, validateVersionName, } from "./android-release.js";
|
|
20
|
+
import { apkFileName, easProfileEntries, formatGithubOutput, formatReleaseJson, buildGradlePropertyEdits, gradlePropertiesEdits, resolveReactNativeArchitectures, gradleVersionNameOk, parseAndroidReleaseConfig, parseBadging, publicEnvDefault, readExpoVersion, releaseJson, syncExpoVersion, syncPackageJsonVersion, validateVersionCode, validateVersionName, } from "./android-release.js";
|
|
21
21
|
function fail(message) {
|
|
22
22
|
console.error(message);
|
|
23
23
|
process.exit(1);
|
|
@@ -222,7 +222,8 @@ if (config.gradleWrapperPin !== undefined) {
|
|
|
222
222
|
}
|
|
223
223
|
const propsPath = join(appDir, "android", "gradle.properties");
|
|
224
224
|
const propsText = existsSync(propsPath) ? readFileSync(propsPath, "utf8") : "";
|
|
225
|
-
|
|
225
|
+
// Architectures precedence: REACT_NATIVE_ARCHITECTURES env, config field, arm64-v8a.
|
|
226
|
+
writeFileSync(propsPath, gradlePropertiesEdits(propsText, buildGradlePropertyEdits(resolveReactNativeArchitectures(process.env.REACT_NATIVE_ARCHITECTURES, config.reactNativeArchitectures))));
|
|
226
227
|
writeFileSync(join(appDir, "android", "local.properties"), `sdk.dir=${sdkRoot}\n`);
|
|
227
228
|
const outDir = join(appDir, "android", "app", "build", "outputs", "apk", "release");
|
|
228
229
|
const apk = join(outDir, "app-release.apk");
|
|
@@ -53,7 +53,19 @@ export interface GradlePropertyEdit {
|
|
|
53
53
|
/** Replace an existing line (true) or only append when absent (false). */
|
|
54
54
|
replace: boolean;
|
|
55
55
|
}
|
|
56
|
+
/** Default `reactNativeArchitectures`: published APKs target phones. */
|
|
57
|
+
export declare const DEFAULT_REACT_NATIVE_ARCHITECTURES = "arm64-v8a";
|
|
58
|
+
/**
|
|
59
|
+
* Resolves the `reactNativeArchitectures` value. Precedence: explicit `option`
|
|
60
|
+
* (for example the `REACT_NATIVE_ARCHITECTURES` env var), then `fallback` (the
|
|
61
|
+
* config field), then `arm64-v8a`. Empty or blank values are skipped. The
|
|
62
|
+
* existing `gradle.properties` value is not preserved: Expo's prebuild default
|
|
63
|
+
* is fat, so keeping it would widen every app that relies on the arm64 force.
|
|
64
|
+
*/
|
|
65
|
+
export declare function resolveReactNativeArchitectures(option?: string, fallback?: string): string;
|
|
56
66
|
/** The edits the release build makes to `gradle.properties`, in order. */
|
|
67
|
+
export declare function buildGradlePropertyEdits(reactNativeArchitectures?: string): readonly GradlePropertyEdit[];
|
|
68
|
+
/** The default edits (arm64-v8a only), in order. */
|
|
57
69
|
export declare const DEFAULT_GRADLE_PROPERTY_EDITS: readonly GradlePropertyEdit[];
|
|
58
70
|
/**
|
|
59
71
|
* Applies the release edits to `gradle.properties` contents and returns the new
|
|
@@ -124,6 +136,12 @@ export interface AndroidReleaseConfig {
|
|
|
124
136
|
ifContains: string;
|
|
125
137
|
distributionUrl: string;
|
|
126
138
|
};
|
|
139
|
+
/**
|
|
140
|
+
* ABIs for `reactNativeArchitectures` in `gradle.properties`, such as
|
|
141
|
+
* `"arm64-v8a,x86_64"`. The `REACT_NATIVE_ARCHITECTURES` env var wins over it.
|
|
142
|
+
* Default `"arm64-v8a"`.
|
|
143
|
+
*/
|
|
144
|
+
reactNativeArchitectures?: string;
|
|
127
145
|
/** Label and env var for the final summary line, such as `{ label: "Convex", envVar: "EXPO_PUBLIC_CONVEX_URL" }`. */
|
|
128
146
|
summary?: {
|
|
129
147
|
label: string;
|
package/dist/android-release.js
CHANGED
|
@@ -97,10 +97,24 @@ export function publicEnvDefault(name, options) {
|
|
|
97
97
|
}
|
|
98
98
|
return "";
|
|
99
99
|
}
|
|
100
|
-
/**
|
|
101
|
-
export const
|
|
102
|
-
|
|
103
|
-
|
|
100
|
+
/** Default `reactNativeArchitectures`: published APKs target phones. */
|
|
101
|
+
export const DEFAULT_REACT_NATIVE_ARCHITECTURES = "arm64-v8a";
|
|
102
|
+
/**
|
|
103
|
+
* Resolves the `reactNativeArchitectures` value. Precedence: explicit `option`
|
|
104
|
+
* (for example the `REACT_NATIVE_ARCHITECTURES` env var), then `fallback` (the
|
|
105
|
+
* config field), then `arm64-v8a`. Empty or blank values are skipped. The
|
|
106
|
+
* existing `gradle.properties` value is not preserved: Expo's prebuild default
|
|
107
|
+
* is fat, so keeping it would widen every app that relies on the arm64 force.
|
|
108
|
+
*/
|
|
109
|
+
export function resolveReactNativeArchitectures(option, fallback) {
|
|
110
|
+
for (const candidate of [option, fallback]) {
|
|
111
|
+
const trimmed = candidate?.trim();
|
|
112
|
+
if (trimmed !== undefined && trimmed !== "")
|
|
113
|
+
return trimmed;
|
|
114
|
+
}
|
|
115
|
+
return DEFAULT_REACT_NATIVE_ARCHITECTURES;
|
|
116
|
+
}
|
|
117
|
+
const BASE_GRADLE_PROPERTY_EDITS = [
|
|
104
118
|
{ key: "org.gradle.jvmargs", value: "-Xmx4096m -XX:MaxMetaspaceSize=1024m", replace: true },
|
|
105
119
|
// boat-large has 8 cores. Replace Expo's lower default.
|
|
106
120
|
{ key: "org.gradle.workers.max", value: "8", replace: true },
|
|
@@ -109,6 +123,19 @@ export const DEFAULT_GRADLE_PROPERTY_EDITS = [
|
|
|
109
123
|
// the cache, and native modules may still be incompatible on release tasks.
|
|
110
124
|
{ key: "android.lint.checkReleaseBuilds", value: "false", replace: false },
|
|
111
125
|
];
|
|
126
|
+
/** The edits the release build makes to `gradle.properties`, in order. */
|
|
127
|
+
export function buildGradlePropertyEdits(reactNativeArchitectures) {
|
|
128
|
+
return [
|
|
129
|
+
{
|
|
130
|
+
key: "reactNativeArchitectures",
|
|
131
|
+
value: resolveReactNativeArchitectures(reactNativeArchitectures),
|
|
132
|
+
replace: true,
|
|
133
|
+
},
|
|
134
|
+
...BASE_GRADLE_PROPERTY_EDITS,
|
|
135
|
+
];
|
|
136
|
+
}
|
|
137
|
+
/** The default edits (arm64-v8a only), in order. */
|
|
138
|
+
export const DEFAULT_GRADLE_PROPERTY_EDITS = buildGradlePropertyEdits();
|
|
112
139
|
function withTrailingNewline(contents) {
|
|
113
140
|
if (contents.length === 0)
|
|
114
141
|
return contents;
|
|
@@ -243,6 +270,12 @@ export function parseAndroidReleaseConfig(input) {
|
|
|
243
270
|
}
|
|
244
271
|
if (raw.gradleWrapperPin !== undefined)
|
|
245
272
|
config.gradleWrapperPin = parseWrapperPin(raw.gradleWrapperPin);
|
|
273
|
+
if (raw.reactNativeArchitectures !== undefined) {
|
|
274
|
+
if (typeof raw.reactNativeArchitectures !== "string") {
|
|
275
|
+
throw new Error('android-release config: "reactNativeArchitectures" must be a string.');
|
|
276
|
+
}
|
|
277
|
+
config.reactNativeArchitectures = raw.reactNativeArchitectures;
|
|
278
|
+
}
|
|
246
279
|
if (raw.summary !== undefined)
|
|
247
280
|
config.summary = parseSummary(raw.summary);
|
|
248
281
|
return config;
|
package/dist/check-asar-cli.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/dist/clerk-allow-cli.js
CHANGED
|
File without changes
|
package/dist/cli.js
CHANGED
|
File without changes
|
package/dist/doctor-cli.js
CHANGED
|
File without changes
|
package/dist/doctor.js
CHANGED
|
@@ -303,7 +303,14 @@ export function checkConfigVersion(repo, runningVersion) {
|
|
|
303
303
|
}
|
|
304
304
|
return result("config-version", "@vvedantb/config is current to the running minor", details);
|
|
305
305
|
}
|
|
306
|
-
|
|
306
|
+
/** Where the shared ci-app.yml lives. A repo may call either one; the first is the one to use from now on. */
|
|
307
|
+
const CI_WORKFLOW_REFS = [
|
|
308
|
+
"vvedantb/workflows/.github/workflows/ci-app.yml",
|
|
309
|
+
"vvedantb/packages/.github/workflows/ci-app.yml",
|
|
310
|
+
];
|
|
311
|
+
function callsSharedCi(text) {
|
|
312
|
+
return CI_WORKFLOW_REFS.some((ref) => text.includes(ref));
|
|
313
|
+
}
|
|
307
314
|
export function checkCiReusableWorkflow(repo) {
|
|
308
315
|
const dir = join(repo.root, ".github", "workflows");
|
|
309
316
|
if (!existsSync(dir)) {
|
|
@@ -314,14 +321,14 @@ export function checkCiReusableWorkflow(repo) {
|
|
|
314
321
|
if (!/\.ya?ml$/.test(name))
|
|
315
322
|
continue;
|
|
316
323
|
try {
|
|
317
|
-
if (readFileSync(join(dir, name), "utf8")
|
|
324
|
+
if (callsSharedCi(readFileSync(join(dir, name), "utf8")))
|
|
318
325
|
found = true;
|
|
319
326
|
}
|
|
320
327
|
catch {
|
|
321
328
|
// Unreadable workflow file: ignore and keep scanning.
|
|
322
329
|
}
|
|
323
330
|
}
|
|
324
|
-
const details = found ? [] : [`no workflow calls ${
|
|
331
|
+
const details = found ? [] : [`no workflow calls ${CI_WORKFLOW_REFS[0]}`];
|
|
325
332
|
return result("ci-reusable-workflow", "CI calls the shared ci-app.yml workflow", details);
|
|
326
333
|
}
|
|
327
334
|
function workflowFiles(root) {
|
|
@@ -433,7 +440,7 @@ export function checkCiRunner(repo) {
|
|
|
433
440
|
export function ciCommands(repo) {
|
|
434
441
|
const found = [];
|
|
435
442
|
for (const file of workflowFiles(repo.root)) {
|
|
436
|
-
if (!file.text
|
|
443
|
+
if (!callsSharedCi(file.text))
|
|
437
444
|
continue;
|
|
438
445
|
let blockIndent = -1;
|
|
439
446
|
for (const line of file.text.split(/\r?\n/)) {
|
package/dist/index.d.ts
CHANGED
|
@@ -10,5 +10,5 @@ export { CHECK_IDS, checkCiReusableWorkflow, checkConfigVersion, checkNoEslint,
|
|
|
10
10
|
export { REACT_DEDUPE, defineWebViteConfig, defineWebVitestConfig, reactPlugins, srcAlias, vendorChunkBuild, type AliasOptions, type BabelReactCompiler, type PathOptions, type ReactSetup, type ResolveConfig, type RouterPluginOptions, type VendorChunk, type VendorChunkGroup, type VitePlugin, type VitePluginOption, type WebBuildConfig, type WebViteConfig, type WebViteOptions, type WebVitestConfig, type WebVitestOptions, } from "./vite.js";
|
|
11
11
|
export { defineExpoMetroConfig, expoBabelConfig, type BabelApi, type ExpoBabelConfig, type ExpoMetroOptions, type MetroConfigLike, type MetroResolveContext, type MetroResolveRequest, type NativeWindMetroOptions, } from "./expo.js";
|
|
12
12
|
export { DEFAULT_RELEASE_SIGNING_MARKER, appendReleaseSigning, releaseSigningGradle, withReleaseSigning, type AppBuildGradleMod, type ReleaseSigningOptions, type ReleaseSigningPropertyKeys, type WithAppBuildGradle, type WithReleaseSigningOptions, } from "./release-signing.js";
|
|
13
|
-
export { DEFAULT_GRADLE_PROPERTY_EDITS, apkFileName, easProfileEntries, formatGithubOutput, formatReleaseJson, gradlePropertiesEdits, parseAndroidReleaseConfig, parseBadging, publicEnvDefault, readExpoVersion, releaseJson, syncPackageJsonVersion, syncExpoVersion, validateVersionCode, validateVersionName, gradleVersionNameOk, type AndroidReleaseConfig, type BadgingFields, type GradlePropertyEdit, type PublicEnvSource, type ReadAppFile, type ReleaseJson, } from "./android-release.js";
|
|
13
|
+
export { DEFAULT_GRADLE_PROPERTY_EDITS, DEFAULT_REACT_NATIVE_ARCHITECTURES, buildGradlePropertyEdits, resolveReactNativeArchitectures, apkFileName, easProfileEntries, formatGithubOutput, formatReleaseJson, gradlePropertiesEdits, parseAndroidReleaseConfig, parseBadging, publicEnvDefault, readExpoVersion, releaseJson, syncPackageJsonVersion, syncExpoVersion, validateVersionCode, validateVersionName, gradleVersionNameOk, type AndroidReleaseConfig, type BadgingFields, type GradlePropertyEdit, type PublicEnvSource, type ReadAppFile, type ReleaseJson, } from "./android-release.js";
|
|
14
14
|
export { compareSemver, highestSemver, isSemver, pickAndroidReleaseVersion, publishedVersionNames, type AndroidReleaseVersion, type PickAndroidReleaseVersionInput, type PublishedReleases, type VersionNameSource, } from "./android-release-version.js";
|
package/dist/index.js
CHANGED
|
@@ -10,5 +10,5 @@ export { CHECK_IDS, checkCiReusableWorkflow, checkConfigVersion, checkNoEslint,
|
|
|
10
10
|
export { REACT_DEDUPE, defineWebViteConfig, defineWebVitestConfig, reactPlugins, srcAlias, vendorChunkBuild, } from "./vite.js";
|
|
11
11
|
export { defineExpoMetroConfig, expoBabelConfig, } from "./expo.js";
|
|
12
12
|
export { DEFAULT_RELEASE_SIGNING_MARKER, appendReleaseSigning, releaseSigningGradle, withReleaseSigning, } from "./release-signing.js";
|
|
13
|
-
export { DEFAULT_GRADLE_PROPERTY_EDITS, apkFileName, easProfileEntries, formatGithubOutput, formatReleaseJson, gradlePropertiesEdits, parseAndroidReleaseConfig, parseBadging, publicEnvDefault, readExpoVersion, releaseJson, syncPackageJsonVersion, syncExpoVersion, validateVersionCode, validateVersionName, gradleVersionNameOk, } from "./android-release.js";
|
|
13
|
+
export { DEFAULT_GRADLE_PROPERTY_EDITS, DEFAULT_REACT_NATIVE_ARCHITECTURES, buildGradlePropertyEdits, resolveReactNativeArchitectures, apkFileName, easProfileEntries, formatGithubOutput, formatReleaseJson, gradlePropertiesEdits, parseAndroidReleaseConfig, parseBadging, publicEnvDefault, readExpoVersion, releaseJson, syncPackageJsonVersion, syncExpoVersion, validateVersionCode, validateVersionName, gradleVersionNameOk, } from "./android-release.js";
|
|
14
14
|
export { compareSemver, highestSemver, isSemver, pickAndroidReleaseVersion, publishedVersionNames, } from "./android-release-version.js";
|
package/dist/vite.d.ts
CHANGED
|
@@ -101,6 +101,12 @@ export interface WebVitestOptions extends PathOptions {
|
|
|
101
101
|
include?: string[];
|
|
102
102
|
/** Packages Vitest transforms instead of loading from node_modules (`test.server.deps.inline`). */
|
|
103
103
|
inline?: string[];
|
|
104
|
+
/**
|
|
105
|
+
* `resolve.dedupe`, as given. See `REACT_DEDUPE`. Set it when the tests load a
|
|
106
|
+
* workspace package from source: without it that package can load another copy
|
|
107
|
+
* of React than the app's.
|
|
108
|
+
*/
|
|
109
|
+
dedupe?: readonly string[];
|
|
104
110
|
}
|
|
105
111
|
export interface WebVitestConfig {
|
|
106
112
|
plugins?: VitePluginOption[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vvedantb/config",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.14.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Shared tsconfig bases, oxlint base, Vite, Vitest, Babel and Metro presets, a WXT preset and host-permission helper for Chrome extensions, pinned tool versions, a sync CLI for Claude commands, CLAUDE.md, Cursor environment and Convex tsconfig, a packaged Electron app.asar module check, a shared header and footer check, a no-source-text-in-tests check, shared oxlint JS plugins and a CLI that adds an extension to Clerk's allowed origins.",
|
|
6
6
|
"type": "module",
|
|
@@ -14,13 +14,13 @@
|
|
|
14
14
|
"directory": "packages/config"
|
|
15
15
|
},
|
|
16
16
|
"bin": {
|
|
17
|
-
"vvedantb-config": "./
|
|
18
|
-
"vvedantb-check-asar": "./
|
|
19
|
-
"vvedantb-clerk-allow": "./
|
|
20
|
-
"vvedantb-android-release": "./
|
|
21
|
-
"vvedantb-check-shared-ui": "./
|
|
22
|
-
"vvedantb-check-no-source-text": "./
|
|
23
|
-
"vvedantb-doctor": "./
|
|
17
|
+
"vvedantb-config": "./bin/vvedantb-config.js",
|
|
18
|
+
"vvedantb-check-asar": "./bin/vvedantb-check-asar.js",
|
|
19
|
+
"vvedantb-clerk-allow": "./bin/vvedantb-clerk-allow.js",
|
|
20
|
+
"vvedantb-android-release": "./bin/vvedantb-android-release.js",
|
|
21
|
+
"vvedantb-check-shared-ui": "./bin/vvedantb-check-shared-ui.js",
|
|
22
|
+
"vvedantb-check-no-source-text": "./bin/vvedantb-check-no-source-text.js",
|
|
23
|
+
"vvedantb-doctor": "./bin/vvedantb-doctor.js"
|
|
24
24
|
},
|
|
25
25
|
"exports": {
|
|
26
26
|
".": {
|
|
@@ -46,6 +46,7 @@
|
|
|
46
46
|
},
|
|
47
47
|
"types": "./dist/index.d.ts",
|
|
48
48
|
"files": [
|
|
49
|
+
"bin",
|
|
49
50
|
"dist",
|
|
50
51
|
"files",
|
|
51
52
|
"tsconfig",
|
|
@@ -76,8 +77,9 @@
|
|
|
76
77
|
"esbuild": "0.28.2",
|
|
77
78
|
"eslint-plugin-react-you-might-not-need-an-effect": "1.0.2",
|
|
78
79
|
"@vitejs/plugin-react": "^6.1.2",
|
|
80
|
+
"happy-dom": "18.0.1",
|
|
79
81
|
"oxlint": "^1.80.0",
|
|
80
|
-
"typescript": "
|
|
82
|
+
"typescript": "7.0.2",
|
|
81
83
|
"vite": "^8.3.4",
|
|
82
84
|
"vitest": "^3.2.0"
|
|
83
85
|
},
|