@uniflowed/config 0.9.0 → 0.10.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/internal/schema.js +20 -213
  2. package/package.json +1 -1
@@ -19,13 +19,16 @@
19
19
  // against the paths `uf_config::UniflowedConfig` serializes — in both
20
20
  // directions, because a key declared here and read by nothing is an option that
21
21
  // silently does nothing, which is the same defect wearing the other face.
22
+ // `tests/unread_keys.rs` beside it goes one step further and holds every key
23
+ // declared here to code that reads it: ubugeeei-prod/uf#1387 removed 110
24
+ // that nothing did.
22
25
  //
23
26
  // The value *types* are still this file's own judgement, and deliberately so.
24
27
  // A test over names cannot say whether `"biome" | "prettier" | "none"` is the
25
28
  // right set, and several keys below are narrower than what the loader will
26
- // parse — `orm.module` is `"@uniflowed/orm"` because there is one
27
- // implementation, where the loader takes any string. Where this package means
28
- // to be more opinionated than the parser, that is what these say.
29
+ // parse — `release.tagPrefix` is `"uf@"`, where the loader takes any string.
30
+ // Where this package means to be more opinionated than the parser, that is
31
+ // what these say.
29
32
  //
30
33
  // # What an editor shows
31
34
  //
@@ -358,19 +361,12 @@ export type UniflowedConfig = {
358
361
  },
359
362
  },
360
363
  readonly app?: {
361
- // Whether a component with no directive is rendered on the server or
362
- // shipped to the browser.
363
- readonly componentDefault?: "server" | "client",
364
364
  readonly framework?: "uniflowed" | "react" | "react-native",
365
365
  readonly react?: {
366
366
  // React 19's Strict Mode, on by default in `uf dev`: it double-invokes
367
367
  // render and effects so an impurity shows up in development rather
368
368
  // than in production. Off has to be a choice a project makes.
369
369
  readonly strictMode?: boolean,
370
- readonly version?: string,
371
- readonly asyncReact?: boolean,
372
- readonly suspense?: boolean,
373
- readonly useHook?: boolean,
374
370
  },
375
371
  // Whether the project builds React Server Components at all, and whether
376
372
  // a `"use server"` export is wired to an endpoint.
@@ -378,48 +374,20 @@ export type UniflowedConfig = {
378
374
  readonly serverActions?: boolean,
379
375
  // The runtimes the build must satisfy.
380
376
  readonly targets?: $ReadOnlyArray<"web" | "react-native" | "server" | "hermes">,
381
- readonly orm?: {
382
- readonly enabled?: boolean,
383
- readonly module?: "@uniflowed/orm",
384
- readonly native?: true,
385
- readonly generatedFlowTypes?: true,
386
- readonly preparedByDefault?: true,
387
- },
388
377
  readonly builtins?: {
389
- readonly data?: "uniflowed-query",
390
- readonly effect?: "uniflowed-effect",
391
- readonly fetch?: {
392
- readonly module?: "@uniflowed/fetch",
393
- readonly overrideGlobalFetch?: false,
394
- },
395
- readonly cell?: boolean,
396
- readonly frameworkLints?: boolean,
397
- readonly nativeTestRunner?: boolean,
398
- readonly reactTestingLibrary?: boolean,
399
378
  readonly relay?: boolean,
400
379
  readonly style?: "style-x",
401
380
  readonly reactCompiler?: {
402
381
  readonly enabled?: boolean,
403
- readonly implementation?: "official-rust",
404
382
  readonly mode?: "syntax",
405
383
  },
406
- readonly graphql?: {
407
- readonly module?: "@uniflowed/graphql",
408
- readonly relayBase?: true,
409
- },
410
- readonly loader?: {
411
- readonly module?: "@uniflowed/loader",
412
- readonly stateModule?: "@uniflowed/state",
413
- readonly cache?: "opt-in",
414
- },
415
384
  readonly markdown?: {
416
- readonly module?: "@uniflowed/markdown",
417
- readonly engine?: "ox-content-wasm",
418
385
  readonly mdx?: {
419
386
  readonly enabled?: boolean,
420
- readonly extensions?: $ReadOnlyArray<".mdx">,
421
- readonly jsxImportSource?: "@uniflowed/jsx-runtime",
422
- readonly pipelinePlugin?: "built-in",
387
+ // Where compiled MDX imports its JSX runtime from: `"react"` when
388
+ // absent. Any package exporting `jsx-runtime` — the specifier MDX
389
+ // appends `/jsx-runtime` to.
390
+ readonly jsxImportSource?: string,
423
391
  // Colours are computed during the build and written into the HTML,
424
392
  // so nothing ships to the browser to do it. Both themes are emitted
425
393
  // together as CSS variables, because a build cannot know which the
@@ -434,7 +402,6 @@ export type UniflowedConfig = {
434
402
  readonly langs?: $ReadOnlyArray<string>,
435
403
  },
436
404
  },
437
- readonly cache?: "opt-in",
438
405
  },
439
406
  readonly images?: {
440
407
  readonly enabled?: boolean,
@@ -501,37 +468,6 @@ export type UniflowedConfig = {
501
468
  // own. uf embeds none, so a project that draws cards points at one.
502
469
  readonly font?: string | null,
503
470
  },
504
- readonly motion?: {
505
- readonly module?: "@uniflowed/motion",
506
- readonly engine?: "uf-native",
507
- readonly compilerSafe?: true,
508
- readonly serverComponentSafe?: true,
509
- readonly reducedMotionDefault?: true,
510
- },
511
- readonly tui?: {
512
- readonly module?: "@uniflowed/tui",
513
- readonly stdModule?: "@uniflowed/std/tui",
514
- readonly standard?: "open-tui",
515
- readonly nativeRenderer?: true,
516
- readonly beatReactInk?: true,
517
- readonly richMedia?: true,
518
- readonly inMemoryTests?: true,
519
- },
520
- readonly pwa?: {
521
- readonly module?: "@uniflowed/pwa",
522
- readonly enabledByDefault?: false,
523
- readonly cache?: "opt-in",
524
- },
525
- readonly temporal?: {
526
- readonly module?: "@uniflowed/temporal",
527
- readonly lite?: true,
528
- },
529
- readonly web?: {
530
- readonly module?: "@uniflowed/web",
531
- readonly typedRoutes?: true,
532
- readonly linkPrefetch?: "off" | "intent" | "render",
533
- readonly cache?: "opt-in",
534
- },
535
471
  },
536
472
  readonly runtime?: {
537
473
  readonly default?: RuntimeEngine,
@@ -556,7 +492,6 @@ export type UniflowedConfig = {
556
492
  readonly entry?: string,
557
493
  readonly root?: string,
558
494
  readonly manifest?: string,
559
- readonly convention?: "file-system",
560
495
  // Turning the file-system router off is what makes a project a
561
496
  // **library** rather than an application, and `uf build` reads it: see
562
497
  // `build.lib` below and docs/app/reference/config.
@@ -621,7 +556,6 @@ export type UniflowedConfig = {
621
556
  // clear it. See docs/app/guide/routing and docs/app/guide/cache.
622
557
  readonly staleTime?: number,
623
558
  readonly cache?: {
624
- readonly actions?: boolean,
625
559
  readonly data?: boolean,
626
560
  readonly fetch?: boolean,
627
561
  readonly route?: boolean,
@@ -649,8 +583,6 @@ export type UniflowedConfig = {
649
583
  readonly perAsset?: SizeBudget,
650
584
  },
651
585
  readonly entries?: $ReadOnlyArray<string>,
652
- // Commands to run around the build, in the same shape as `tasks`.
653
- readonly hooks?: { readonly [string]: TaskDefinition },
654
586
  readonly outDir?: string,
655
587
  // Prerender every route and leave no server bundle behind. Read together
656
588
  // with `app.rendering.modes`; see docs/app/reference/config.
@@ -735,15 +667,10 @@ export type UniflowedConfig = {
735
667
  // server reachable from the network with no host allow-list is a file
736
668
  // server for your source tree.
737
669
  readonly allowedHosts?: $ReadOnlyArray<string>,
738
- readonly allowedOrigins?: $ReadOnlyArray<string>,
739
670
  },
740
671
  readonly docs?: {
741
- readonly enabled?: boolean,
742
- readonly app?: string,
743
- readonly source?: string,
672
+ // Where a documentation build is written; `uf clean` removes it.
744
673
  readonly outDir?: string,
745
- readonly staticBuild?: boolean,
746
- readonly deploy?: "void",
747
674
  },
748
675
  /**
749
676
  * The `.env` cascade and the mode it is read for.
@@ -770,11 +697,6 @@ export type UniflowedConfig = {
770
697
  readonly fmt?: {
771
698
  readonly indentWidth?: number,
772
699
  readonly lineWidth?: number,
773
- readonly maxBlankLines?: number,
774
- readonly flow?: {
775
- readonly parser?: "official-flow-rust",
776
- readonly printer?: "uf-rust",
777
- },
778
700
  readonly nonFlow?: {
779
701
  readonly formatter?: "biome" | "prettier" | "none",
780
702
  /**
@@ -806,9 +728,6 @@ export type UniflowedConfig = {
806
728
  */
807
729
  readonly ignore?: $ReadOnlyArray<string>,
808
730
  readonly lint?: {
809
- readonly engine?: "rust",
810
- // Globs to lint.
811
- readonly files?: $ReadOnlyArray<string>,
812
731
  /**
813
732
  * The old spelling of the top-level `ignore`.
814
733
  *
@@ -820,21 +739,10 @@ export type UniflowedConfig = {
820
739
  * See ubugeeei-prod/uf#575.
821
740
  */
822
741
  readonly ignore?: $ReadOnlyArray<string>,
823
- readonly flow?: {
824
- readonly builtins?: "mixed",
825
- readonly parser?: "official-flow-rust",
826
- },
827
742
  // Changes to uf's rule table, not the whole of it: a rule you did not
828
743
  // mention keeps the level uf ships. Say `"off"` to switch one off.
829
744
  readonly rules?: { readonly [string]: RuleLevel },
830
745
  },
831
- readonly package?: {
832
- readonly generator?: "napi-rs",
833
- readonly targets?: $ReadOnlyArray<
834
- "node-napi" | "bun-napi" | "deno-napi" | "edge-wasm" | "serverless-napi",
835
- >,
836
- readonly typescriptDeclarationsToFlow?: true,
837
- },
838
746
  /**
839
747
  * The package manager `uf install`, `uf add`, `uf update` and the rest drive,
840
748
  * and optionally which release of it: `"pnpm@12.0.0"`.
@@ -849,8 +757,6 @@ export type UniflowedConfig = {
849
757
  // refuses any that reaches outside the project root.
850
758
  readonly plugins?: $ReadOnlyArray<PluginEntry>,
851
759
  readonly pm?: {
852
- readonly module?: "@uniflowed/pm",
853
- readonly resolver?: "uf-native",
854
760
  readonly lockfile?: "uf.lock",
855
761
  readonly storeDir?: string,
856
762
  readonly allowLifecycleScripts?: false,
@@ -903,15 +809,6 @@ export type UniflowedConfig = {
903
809
  */
904
810
  readonly provenance?: "report" | "off",
905
811
  },
906
- readonly rm?: {
907
- readonly module?: "@uniflowed/rm",
908
- readonly inferFromConfig?: true,
909
- readonly version?: "node@system" | string,
910
- readonly autoSwitch?: boolean,
911
- readonly acquisition?: "auto",
912
- readonly apply?: "config-and-host",
913
- readonly doctor?: boolean,
914
- },
915
812
  /**
916
813
  * The runtime every command runs on unless a section names its own, and
917
814
  * optionally which release of it: `"node@26"`.
@@ -923,16 +820,6 @@ export type UniflowedConfig = {
923
820
  * `RuntimeSpec`.
924
821
  */
925
822
  readonly runtime?: RuntimeSpec,
926
- readonly server?: {
927
- readonly engine?: "native-rust",
928
- readonly native?: {
929
- readonly streaming?: boolean,
930
- readonly zeroCopyHttp?: boolean,
931
- readonly adapters?: $ReadOnlyArray<
932
- "uf" | "node" | "bun" | "deno" | "edge" | "serverless" | "container",
933
- >,
934
- },
935
- },
936
823
  // Where the built site is served from, and what `uf build` may therefore
937
824
  // write for a crawler. `url` is the switch: without it no `sitemap.xml` and
938
825
  // no `robots.txt` are written at all, because a build cannot guess the host
@@ -946,91 +833,19 @@ export type UniflowedConfig = {
946
833
  readonly disallow?: $ReadOnlyArray<string>,
947
834
  },
948
835
  },
949
- readonly std?: {
950
- readonly module?: "@uniflowed/std",
951
- readonly wintertcAligned?: true,
952
- readonly nativeBindings?: boolean,
953
- readonly modules?: $ReadOnlyArray<
954
- | "vfs"
955
- | "fs"
956
- | "types"
957
- | "pipeline"
958
- | "effect"
959
- | "env"
960
- | "format"
961
- | "stdio"
962
- | "hash"
963
- | "debug"
964
- | "defs"
965
- | "lock"
966
- | "colors"
967
- | "qs"
968
- | "equality"
969
- | "http"
970
- | "buffer"
971
- | "ws"
972
- | "sql"
973
- | "json"
974
- | "yaml"
975
- | "toml"
976
- | "collections"
977
- | "crypto"
978
- | "dotenv"
979
- | "math"
980
- | "os"
981
- | "net"
982
- | "dns"
983
- | "path"
984
- | "stream"
985
- | "url"
986
- | "wasm"
987
- | "glob"
988
- | "motion"
989
- | "tui"
990
- | "cron"
991
- | "s3"
992
- | "sigv4"
993
- | "functions"
994
- | "uuid"
995
- | "zip"
996
- | "import-meta"
997
- | "defer",
998
- >,
999
- },
1000
836
  readonly publish?: {
837
+ // Where `uf publish` pushes a package; also where uf reads from when
838
+ // `pm.registry` is absent.
1001
839
  readonly registry?: string,
1002
- readonly dryRun?: boolean,
1003
- readonly firstPublish?: {
1004
- readonly mode?: "local",
1005
- readonly localBootstrap?: true,
1006
- },
1007
- readonly trustedPublish?: {
1008
- readonly enabled?: true,
1009
- readonly provider?: "github-actions-oidc",
1010
- readonly tokenless?: true,
1011
- readonly trigger?: "tag-push",
1012
- },
1013
840
  },
1014
841
  readonly release?: {
1015
842
  readonly tagPrefix?: "uf@",
1016
- readonly command?: "uf release alpha" | string,
1017
- readonly publish?: true,
1018
- },
1019
- readonly story?: {
1020
- readonly enabled?: boolean,
1021
- readonly module?: "@uniflowed/story",
1022
- readonly mocks?: {
1023
- readonly module?: "@uniflowed/mock",
1024
- readonly mswCompatible?: boolean,
1025
- },
1026
- readonly browser?: {
1027
- readonly module?: "@uniflowed/browser",
1028
- readonly playwrightCompatible?: boolean,
1029
- },
1030
843
  },
1031
844
  readonly taskRunner?: {
1032
- readonly engine?: "vite-task",
1033
- readonly allowPackageScripts?: false,
845
+ // Whether a task with no `command` may be handed to Vite+'s task runner,
846
+ // `vp run <name>`, which runs the `package.json` script of that name.
847
+ // `true` when absent; `false` refuses such a task by name.
848
+ readonly allowPackageScripts?: boolean,
1034
849
  },
1035
850
  readonly test?: {
1036
851
  readonly module?: "@uniflowed/test",
@@ -1056,21 +871,15 @@ export type UniflowedConfig = {
1056
871
  * What runs the suite: `"uf"`, the default, or `"bun[@version]"`. See
1057
872
  * `TestRunnerSpec`.
1058
873
  *
1059
- * The object is the old description of uf's own runner, field by field,
1060
- * and is **deprecated**: it still parses, and `applicationTarget` in it is
1061
- * still read when `target` is absent.
874
+ * The object is the old description of uf's own runner, and is
875
+ * **deprecated**: `applicationTarget`, the one field of it anything read,
876
+ * is still read when `target` is absent.
1062
877
  */
1063
878
  readonly runner?:
1064
879
  | TestRunnerSpec
1065
880
  | {
1066
881
  readonly applicationTarget?: "auto" | "web" | "react-native",
1067
- readonly runtime?: "vite-task" | "capability-js-host" | "uf-self-hosted",
1068
- readonly jsHosts?: $ReadOnlyArray<CapabilityJsHost>,
1069
- readonly scheduler?: "vite-task-cache" | "native-work-stealing",
1070
- readonly performanceTarget?: "vite-task" | "faster-than-bun",
1071
- readonly officialFlowParser?: true,
1072
882
  },
1073
- readonly reactTestingLibraryNative?: true,
1074
883
  /**
1075
884
  * Let `uf test` split a long test file into shares that run on several
1076
885
  * workers at once, each importing the file and running its own contiguous
@@ -1141,8 +950,6 @@ export type UniflowedConfig = {
1141
950
  */
1142
951
  readonly vite?: { readonly [string]: mixed },
1143
952
  readonly vrt?: {
1144
- readonly enabled?: boolean,
1145
- readonly module?: "@uniflowed/vrt",
1146
953
  readonly baselines?: string,
1147
954
  readonly threshold?: number,
1148
955
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniflowed/config",
3
- "version": "0.9.0",
3
+ "version": "0.10.0",
4
4
  "description": "Flow declarations for @uniflowed/config, part of the Unified Toolchain for Flow.",
5
5
  "type": "module",
6
6
  "license": "MIT",