@bleedingdev/modern-js-create 3.4.0-ultramodern.1 → 3.4.0-ultramodern.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/cjs/ultramodern-workspace/add-vertical.cjs +18 -0
- package/dist/cjs/ultramodern-workspace/contracts.cjs +3 -3
- package/dist/cjs/ultramodern-workspace/descriptors.cjs +2 -2
- package/dist/cjs/ultramodern-workspace/module-federation.cjs +10 -1
- package/dist/cjs/ultramodern-workspace/package-json.cjs +74 -13
- package/dist/cjs/ultramodern-workspace/versions.cjs +1 -5
- package/dist/cjs/ultramodern-workspace/workspace-scripts.cjs +7 -0
- package/dist/cjs/ultramodern-workspace/write-workspace.cjs +3 -7
- package/dist/esm/ultramodern-workspace/add-vertical.js +19 -1
- package/dist/esm/ultramodern-workspace/contracts.js +4 -4
- package/dist/esm/ultramodern-workspace/descriptors.js +2 -2
- package/dist/esm/ultramodern-workspace/module-federation.js +10 -1
- package/dist/esm/ultramodern-workspace/package-json.js +62 -10
- package/dist/esm/ultramodern-workspace/versions.js +2 -3
- package/dist/esm/ultramodern-workspace/workspace-scripts.js +5 -1
- package/dist/esm/ultramodern-workspace/write-workspace.js +5 -9
- package/dist/esm-node/ultramodern-workspace/add-vertical.js +19 -1
- package/dist/esm-node/ultramodern-workspace/contracts.js +4 -4
- package/dist/esm-node/ultramodern-workspace/descriptors.js +2 -2
- package/dist/esm-node/ultramodern-workspace/module-federation.js +10 -1
- package/dist/esm-node/ultramodern-workspace/package-json.js +62 -10
- package/dist/esm-node/ultramodern-workspace/versions.js +2 -3
- package/dist/esm-node/ultramodern-workspace/workspace-scripts.js +5 -1
- package/dist/esm-node/ultramodern-workspace/write-workspace.js +5 -9
- package/dist/types/ultramodern-workspace/package-json.d.ts +11 -2
- package/dist/types/ultramodern-workspace/versions.d.ts +1 -2
- package/dist/types/ultramodern-workspace/workspace-scripts.d.ts +1 -0
- package/package.json +4 -4
- package/template-workspace/AGENTS.md.handlebars +2 -1
- package/template-workspace/README.md.handlebars +7 -0
- package/template-workspace/oxfmt.config.ts +3 -1
- package/template-workspace/oxlint.config.ts +3 -1
- package/template-workspace/scripts/bootstrap-agent-skills.mjs +23 -8
- package/templates/app/ultramodern-route-head.tsx.handlebars +20 -8
- package/templates/packages/shared-contracts-index.ts +206 -272
- package/templates/workspace-scripts/ultramodern-typecheck.mjs +197 -0
- package/templates/workspace-scripts/validate-ultramodern-workspace.mjs.handlebars +104 -2
|
@@ -9,9 +9,8 @@ const TAILWIND_POSTCSS_VERSION = '4.3.1';
|
|
|
9
9
|
const POSTCSS_VERSION = '8.5.15';
|
|
10
10
|
const EFFECT_TSGO_VERSION = '0.14.6';
|
|
11
11
|
const TYPESCRIPT_STABLE_VERSION = '6.0.3';
|
|
12
|
-
const TYPESCRIPT_7_VERSION = '7.0.1-rc';
|
|
13
|
-
const TYPESCRIPT_VERSION = TYPESCRIPT_STABLE_VERSION;
|
|
14
12
|
const TYPESCRIPT_NATIVE_PREVIEW_VERSION = '7.0.0-dev.20260624.1';
|
|
13
|
+
const TYPESCRIPT_VERSION = TYPESCRIPT_STABLE_VERSION;
|
|
15
14
|
const OXLINT_VERSION = '1.71.0';
|
|
16
15
|
const OXFMT_VERSION = '0.55.0';
|
|
17
16
|
const ULTRACITE_VERSION = '7.8.3';
|
|
@@ -33,4 +32,4 @@ const ultramodernWorkspaceVersions = {
|
|
|
33
32
|
tailwind: TAILWIND_VERSION,
|
|
34
33
|
tailwindPostcss: TAILWIND_POSTCSS_VERSION
|
|
35
34
|
};
|
|
36
|
-
export { CLOUDFLARE_COMPATIBILITY_DATE, EFFECT_TSGO_VERSION, I18NEXT_VERSION, LEFTHOOK_VERSION, MODULE_FEDERATION_AGENT_SKILLS_COMMIT, MODULE_FEDERATION_VERSION, NODE_FETCH_VERSION, NODE_VERSION, OXFMT_VERSION, OXLINT_VERSION, PNPM_VERSION, POSTCSS_VERSION, REACT_DOM_VERSION, REACT_ROUTER_VERSION, REACT_VERSION, RSTACK_AGENT_SKILLS_COMMIT, TAILWIND_POSTCSS_VERSION, TAILWIND_VERSION, TANSTACK_ROUTER_VERSION,
|
|
35
|
+
export { CLOUDFLARE_COMPATIBILITY_DATE, EFFECT_TSGO_VERSION, I18NEXT_VERSION, LEFTHOOK_VERSION, MODULE_FEDERATION_AGENT_SKILLS_COMMIT, MODULE_FEDERATION_VERSION, NODE_FETCH_VERSION, NODE_VERSION, OXFMT_VERSION, OXLINT_VERSION, PNPM_VERSION, POSTCSS_VERSION, REACT_DOM_VERSION, REACT_ROUTER_VERSION, REACT_VERSION, RSTACK_AGENT_SKILLS_COMMIT, TAILWIND_POSTCSS_VERSION, TAILWIND_VERSION, TANSTACK_ROUTER_VERSION, TYPESCRIPT_NATIVE_PREVIEW_VERSION, TYPESCRIPT_STABLE_VERSION, TYPESCRIPT_VERSION, TYPES_REACT_DOM_VERSION, TYPES_REACT_VERSION, ULTRACITE_VERSION, WRANGLER_VERSION, ZEPHYR_AGENT_VERSION, ZEPHYR_RSPACK_PLUGIN_VERSION, ultramodernWorkspaceVersions };
|
|
@@ -79,6 +79,9 @@ function createPerformanceReadinessConfigScript() {
|
|
|
79
79
|
function createPerformanceReadinessScript() {
|
|
80
80
|
return readFileTemplate("workspace-scripts/ultramodern-performance-readiness.mjs");
|
|
81
81
|
}
|
|
82
|
+
function createUltramodernTypecheckScript() {
|
|
83
|
+
return readFileTemplate("workspace-scripts/ultramodern-typecheck.mjs");
|
|
84
|
+
}
|
|
82
85
|
function writeGeneratedWorkspaceScripts(targetDir, scope, enableTailwind, remotes = []) {
|
|
83
86
|
writeFileReplacing(targetDir, "scripts/assert-mf-types.mjs", createAssertMfTypesScript(remotes));
|
|
84
87
|
writeFileReplacing(targetDir, "scripts/validate-ultramodern-workspace.mjs", createWorkspaceValidationScript(scope, enableTailwind, remotes));
|
|
@@ -88,5 +91,6 @@ function writeGeneratedWorkspaceScripts(targetDir, scope, enableTailwind, remote
|
|
|
88
91
|
writeFileReplacing(targetDir, "scripts/proof-cloudflare-version.mjs", createCloudflareVersionProofScript());
|
|
89
92
|
writeFileReplacing(targetDir, "scripts/ultramodern-performance-readiness.config.mjs", createPerformanceReadinessConfigScript());
|
|
90
93
|
writeFileReplacing(targetDir, "scripts/ultramodern-performance-readiness.mjs", createPerformanceReadinessScript());
|
|
94
|
+
writeFileReplacing(targetDir, "scripts/ultramodern-typecheck.mjs", createUltramodernTypecheckScript());
|
|
91
95
|
}
|
|
92
|
-
export { createAssertMfTypesScript, createCloudflareProofHelperScript, createCloudflareVersionProofScript, createPerformanceReadinessConfigScript, createPerformanceReadinessScript, createPublicSurfaceAssetsScript, createWorkspaceI18nBoundaryValidationScript, createWorkspaceValidationScript, writeGeneratedWorkspaceScripts };
|
|
96
|
+
export { createAssertMfTypesScript, createCloudflareProofHelperScript, createCloudflareVersionProofScript, createPerformanceReadinessConfigScript, createPerformanceReadinessScript, createPublicSurfaceAssetsScript, createUltramodernTypecheckScript, createWorkspaceI18nBoundaryValidationScript, createWorkspaceValidationScript, writeGeneratedWorkspaceScripts };
|
|
@@ -8,9 +8,9 @@ import { copyRootTemplate, writeFile, writeJson } from "./fs-io.js";
|
|
|
8
8
|
import { createFileSnapshot, createGenerationResult, diffFileSnapshots } from "./generation-result.js";
|
|
9
9
|
import { createAppPublicLocaleMessages } from "./locales.js";
|
|
10
10
|
import { createAppModernConfig, createRemoteModuleFederationConfig, createShellModuleFederationConfig, createUltramodernBuildModule } from "./module-federation.js";
|
|
11
|
-
import { assertUniqueTailwindPrefixes,
|
|
11
|
+
import { assertUniqueTailwindPrefixes, toPackageScope } from "./naming.js";
|
|
12
12
|
import { runCodeSmithOverlays } from "./overlays.js";
|
|
13
|
-
import { createAppPackage,
|
|
13
|
+
import { createAppPackage, createAppTsConfig, createRootPackageJson, createRootTsConfig, createSharedContractsIndex, createSharedPackage, createSharedPackageTsConfig, createTsConfigBase } from "./package-json.js";
|
|
14
14
|
import { resolvePackageSource } from "./package-source.js";
|
|
15
15
|
import { createPublicWebAppArtifacts } from "./public-surface.js";
|
|
16
16
|
import { NODE_FETCH_VERSION, NODE_VERSION, PNPM_VERSION, TANSTACK_ROUTER_VERSION, TYPESCRIPT_VERSION } from "./versions.js";
|
|
@@ -22,7 +22,7 @@ function writeApp(targetDir, scope, app, packageSource, enableTailwind, remotes
|
|
|
22
22
|
writeFile(targetDir, `${resolvedApp.directory}/${relativePath}`, content);
|
|
23
23
|
};
|
|
24
24
|
writeJson(targetDir, `${resolvedApp.directory}/package.json`, createAppPackage(scope, resolvedApp, packageSource, enableTailwind, remotes));
|
|
25
|
-
writeJson(targetDir, `${resolvedApp.directory}/tsconfig.json`,
|
|
25
|
+
writeJson(targetDir, `${resolvedApp.directory}/tsconfig.json`, createAppTsConfig(resolvedApp, remotes));
|
|
26
26
|
writeFile(targetDir, `${resolvedApp.directory}/src/modern-app-env.d.ts`, createAppEnvDts(resolvedApp, remotes));
|
|
27
27
|
writeFile(targetDir, `${resolvedApp.directory}/src/ultramodern-build.ts`, createUltramodernBuildModule(scope, resolvedApp));
|
|
28
28
|
writeFile(targetDir, publicWeb.jsonLdHelperFile.path, publicWeb.jsonLdHelperFile.content);
|
|
@@ -65,12 +65,7 @@ function writeApp(targetDir, scope, app, packageSource, enableTailwind, remotes
|
|
|
65
65
|
function writeSharedPackages(targetDir, scope) {
|
|
66
66
|
for (const sharedPackage of sharedPackages){
|
|
67
67
|
writeJson(targetDir, `${sharedPackage.directory}/package.json`, createSharedPackage(scope, sharedPackage.id, sharedPackage.description));
|
|
68
|
-
writeJson(targetDir, `${sharedPackage.directory}/tsconfig.json`,
|
|
69
|
-
extends: `${relativeRootFor(sharedPackage.directory)}/tsconfig.base.json`,
|
|
70
|
-
include: [
|
|
71
|
-
'src'
|
|
72
|
-
]
|
|
73
|
-
});
|
|
68
|
+
writeJson(targetDir, `${sharedPackage.directory}/tsconfig.json`, createSharedPackageTsConfig(sharedPackage.directory));
|
|
74
69
|
}
|
|
75
70
|
writeFile(targetDir, 'packages/shared-contracts/src/index.ts', createSharedContractsIndex());
|
|
76
71
|
writeFile(targetDir, 'packages/shared-design-tokens/src/index.ts', `export const sharedDesignTokens = {
|
|
@@ -112,6 +107,7 @@ function generateUltramodernWorkspace(options) {
|
|
|
112
107
|
});
|
|
113
108
|
writeJson(options.targetDir, 'package.json', createRootPackageJson(scope, packageSource, initialVerticals));
|
|
114
109
|
writeJson(options.targetDir, 'tsconfig.base.json', createTsConfigBase());
|
|
110
|
+
writeJson(options.targetDir, 'tsconfig.json', createRootTsConfig(createdApps));
|
|
115
111
|
writeJson(options.targetDir, 'topology/reference-topology.json', createTopology(scope, initialVerticals));
|
|
116
112
|
writeJson(options.targetDir, 'topology/ownership.json', createOwnership(scope, initialVerticals));
|
|
117
113
|
writeJson(options.targetDir, 'topology/local-overlays/development.json', createDevelopmentOverlay(initialVerticals));
|
|
@@ -14,7 +14,7 @@ import { createAppPublicLocaleMessages } from "./locales.js";
|
|
|
14
14
|
import { createShellModuleFederationConfig } from "./module-federation.js";
|
|
15
15
|
import { assertUniqueTailwindPrefixes, normalizePath, packageName, toEnvSegment, toKebabCase, toPackageScope, toPascalCase } from "./naming.js";
|
|
16
16
|
import { runCodeSmithOverlays } from "./overlays.js";
|
|
17
|
-
import { createAppPackage, createRootPackageJson } from "./package-json.js";
|
|
17
|
+
import { createAppPackage, createAppTsConfig, createRootPackageJson, createRootTsConfig } from "./package-json.js";
|
|
18
18
|
import { resolvePackageSource } from "./package-source.js";
|
|
19
19
|
import { createCloudflareDeployContract } from "./policy.js";
|
|
20
20
|
import { createPublicWebAppArtifacts, rewriteWorkspaceAssetsForApp } from "./public-surface.js";
|
|
@@ -86,6 +86,7 @@ function rewriteShellAppFiles(workspaceRoot, scope, packageSource, enableTailwin
|
|
|
86
86
|
const shellHost = createShellHost(remotes);
|
|
87
87
|
const publicWeb = createPublicWebAppArtifacts(shellHost);
|
|
88
88
|
writeJsonFile(node_path.join(workspaceRoot, `${shellApp.directory}/package.json`), createAppPackage(scope, shellHost, packageSource, enableTailwind, remotes));
|
|
89
|
+
writeJsonFile(node_path.join(workspaceRoot, `${shellApp.directory}/tsconfig.json`), createAppTsConfig(shellHost, remotes));
|
|
89
90
|
writeFileReplacing(workspaceRoot, `${shellApp.directory}/src/modern-app-env.d.ts`, createAppEnvDts(shellHost, remotes));
|
|
90
91
|
writeFileReplacing(workspaceRoot, publicWeb.jsonLdHelperFile.path, publicWeb.jsonLdHelperFile.content);
|
|
91
92
|
writeFileReplacing(workspaceRoot, publicWeb.routeMetadataFile.path, publicWeb.routeMetadataFile.content);
|
|
@@ -426,6 +427,16 @@ function createDryRunJsonMutations(preflight, manifestUrl) {
|
|
|
426
427
|
pointer: '/dependencies',
|
|
427
428
|
description: `Wire shell dependencies for ${vertical.id}`
|
|
428
429
|
},
|
|
430
|
+
{
|
|
431
|
+
path: 'tsconfig.json',
|
|
432
|
+
pointer: '/references',
|
|
433
|
+
description: `Add ${vertical.id} to the root TS-Go build graph`
|
|
434
|
+
},
|
|
435
|
+
{
|
|
436
|
+
path: `${shellApp.directory}/tsconfig.json`,
|
|
437
|
+
pointer: '/references',
|
|
438
|
+
description: `Add ${vertical.id} to the shell TS-Go project references`
|
|
439
|
+
},
|
|
429
440
|
{
|
|
430
441
|
path: GENERATED_CONTRACT_PATH,
|
|
431
442
|
pointer: '/apps',
|
|
@@ -489,6 +500,13 @@ function addUltramodernVertical(options) {
|
|
|
489
500
|
addShellZephyrDependency(options.workspaceRoot, scope, vertical);
|
|
490
501
|
addShellWorkspaceDependency(options.workspaceRoot, scope, vertical);
|
|
491
502
|
updateRootWorkspaceScripts(options.workspaceRoot, scope, packageSource, updatedVerticals);
|
|
503
|
+
writeJsonFile(node_path.join(options.workspaceRoot, 'tsconfig.json'), createRootTsConfig([
|
|
504
|
+
{
|
|
505
|
+
...shellApp,
|
|
506
|
+
verticalRefs: updatedVerticals.map((vertical)=>vertical.id)
|
|
507
|
+
},
|
|
508
|
+
...updatedVerticals
|
|
509
|
+
]));
|
|
492
510
|
const afterFiles = createFileSnapshot(options.workspaceRoot);
|
|
493
511
|
const { createdPaths, rewrittenPaths } = diffFileSnapshots(beforeFiles, afterFiles);
|
|
494
512
|
const result = createGenerationResult({
|
|
@@ -8,7 +8,7 @@ import { createRspackChunkLoadingGlobal, createRspackUniqueName, packageName, ta
|
|
|
8
8
|
import { createCloudflareDeployContract, createCloudflareSecurityContract } from "./policy.js";
|
|
9
9
|
import { createPublicWebAppArtifacts } from "./public-surface.js";
|
|
10
10
|
import { createLocalisedUrlsMap, createPublicRouteMetadata, createRouteOwnedI18nPaths } from "./routes.js";
|
|
11
|
-
import { CLOUDFLARE_COMPATIBILITY_DATE, I18NEXT_VERSION, MODULE_FEDERATION_AGENT_SKILLS_COMMIT, MODULE_FEDERATION_VERSION, NODE_VERSION, PNPM_VERSION, RSTACK_AGENT_SKILLS_COMMIT, TANSTACK_ROUTER_VERSION,
|
|
11
|
+
import { CLOUDFLARE_COMPATIBILITY_DATE, I18NEXT_VERSION, MODULE_FEDERATION_AGENT_SKILLS_COMMIT, MODULE_FEDERATION_VERSION, NODE_VERSION, PNPM_VERSION, RSTACK_AGENT_SKILLS_COMMIT, TANSTACK_ROUTER_VERSION, TYPESCRIPT_NATIVE_PREVIEW_VERSION, TYPESCRIPT_VERSION, WRANGLER_VERSION, ZEPHYR_AGENT_VERSION, ZEPHYR_RSPACK_PLUGIN_VERSION } from "./versions.js";
|
|
12
12
|
const baselineAgentSkills = [
|
|
13
13
|
'rsbuild-best-practices',
|
|
14
14
|
'rspack-best-practices',
|
|
@@ -186,7 +186,7 @@ function createAppConfigContract(app) {
|
|
|
186
186
|
],
|
|
187
187
|
default: '/'
|
|
188
188
|
},
|
|
189
|
-
disableTsChecker:
|
|
189
|
+
disableTsChecker: false,
|
|
190
190
|
distPath: {
|
|
191
191
|
html: './'
|
|
192
192
|
},
|
|
@@ -598,8 +598,8 @@ function createGeneratedContract(scope, apps = [
|
|
|
598
598
|
toolchain: 'mise'
|
|
599
599
|
},
|
|
600
600
|
versions: {
|
|
601
|
-
typescript:
|
|
602
|
-
|
|
601
|
+
typescript: TYPESCRIPT_NATIVE_PREVIEW_VERSION,
|
|
602
|
+
typescriptCompatibility: TYPESCRIPT_VERSION,
|
|
603
603
|
typescriptNativePreview: TYPESCRIPT_NATIVE_PREVIEW_VERSION,
|
|
604
604
|
moduleFederation: MODULE_FEDERATION_VERSION,
|
|
605
605
|
tanstackRouter: TANSTACK_ROUTER_VERSION,
|
|
@@ -36,12 +36,12 @@ const sharedPackages = [
|
|
|
36
36
|
{
|
|
37
37
|
id: 'shared-contracts',
|
|
38
38
|
directory: 'packages/shared-contracts',
|
|
39
|
-
description: '
|
|
39
|
+
description: 'Generated route, ownership, and topology contracts.'
|
|
40
40
|
},
|
|
41
41
|
{
|
|
42
42
|
id: 'shared-design-tokens',
|
|
43
43
|
directory: 'packages/shared-design-tokens',
|
|
44
|
-
description: '
|
|
44
|
+
description: 'Generated design tokens consumed by shell and verticals.'
|
|
45
45
|
}
|
|
46
46
|
];
|
|
47
47
|
function createNeutralOwnership(id, tier = 'tier-2-vertical') {
|
|
@@ -123,7 +123,7 @@ ${bffConfig} ...(cloudflareDeployEnabled
|
|
|
123
123
|
},
|
|
124
124
|
output: {
|
|
125
125
|
assetPrefix,
|
|
126
|
-
disableTsChecker:
|
|
126
|
+
disableTsChecker: false,
|
|
127
127
|
distPath: {
|
|
128
128
|
html: './',
|
|
129
129
|
},
|
|
@@ -179,6 +179,10 @@ ${bffPluginEntry} moduleFederationPlugin(),
|
|
|
179
179
|
},
|
|
180
180
|
},
|
|
181
181
|
source: {
|
|
182
|
+
alias: {
|
|
183
|
+
'@modern-js/plugin-i18n/runtime':
|
|
184
|
+
'@modern-js/plugin-i18n/runtime/no-react-i18next',
|
|
185
|
+
},
|
|
182
186
|
globalVars: {
|
|
183
187
|
ULTRAMODERN_SITE_URL: siteUrl,
|
|
184
188
|
},
|
|
@@ -214,6 +218,11 @@ ${bffPluginEntry} moduleFederationPlugin(),
|
|
|
214
218
|
}
|
|
215
219
|
function createSharedModuleFederationConfig() {
|
|
216
220
|
return ` shared: {
|
|
221
|
+
'@modern-js/plugin-i18n/runtime/no-react-i18next': {
|
|
222
|
+
requiredVersion: pluginI18nVersion,
|
|
223
|
+
singleton: true,
|
|
224
|
+
treeShaking: false,
|
|
225
|
+
},
|
|
217
226
|
'@modern-js/plugin-i18n/runtime': {
|
|
218
227
|
requiredVersion: pluginI18nVersion,
|
|
219
228
|
singleton: true,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import "node:module";
|
|
2
2
|
import { WORKSPACE_PACKAGE_VERSION, modernPackageSpecifier } from "../ultramodern-package-source.js";
|
|
3
|
-
import { appHasEffectApi, remoteDependencyAlias, resolveRemoteRefs, shellApp, verticalEffectApps, zephyrRemoteDependency } from "./descriptors.js";
|
|
3
|
+
import { appHasEffectApi, remoteDependencyAlias, resolveRemoteRefs, sharedPackages, shellApp, verticalEffectApps, zephyrRemoteDependency } from "./descriptors.js";
|
|
4
4
|
import { readFileTemplate } from "./fs-io.js";
|
|
5
5
|
import { packageName, relativeRootFor } from "./naming.js";
|
|
6
6
|
import { createPublicSurfaceGenerationCommand } from "./public-surface.js";
|
|
7
7
|
import { EFFECT_TSGO_VERSION, I18NEXT_VERSION, LEFTHOOK_VERSION, MODULE_FEDERATION_VERSION, NODE_FETCH_VERSION, OXFMT_VERSION, OXLINT_VERSION, PNPM_VERSION, POSTCSS_VERSION, REACT_DOM_VERSION, REACT_ROUTER_VERSION, REACT_VERSION, TAILWIND_POSTCSS_VERSION, TAILWIND_VERSION, TANSTACK_ROUTER_VERSION, TYPESCRIPT_NATIVE_PREVIEW_VERSION, TYPESCRIPT_VERSION, TYPES_REACT_DOM_VERSION, TYPES_REACT_VERSION, ULTRACITE_VERSION, WRANGLER_VERSION, ZEPHYR_AGENT_VERSION, ZEPHYR_RSPACK_PLUGIN_VERSION } from "./versions.js";
|
|
8
|
-
const
|
|
8
|
+
const createEffectTsgoTypecheckCommand = (packageDir)=>`node ${relativeRootFor(packageDir)}/scripts/ultramodern-typecheck.mjs --project tsconfig.json`;
|
|
9
9
|
const effectDiagnostics = [
|
|
10
10
|
'anyUnknownInErrorContext',
|
|
11
11
|
'classSelfMismatch',
|
|
@@ -151,7 +151,7 @@ function createRootPackageJson(scope, packageSource, remotes = []) {
|
|
|
151
151
|
'format:check': "oxfmt --check . '!repos/**'",
|
|
152
152
|
lint: 'oxlint apps verticals packages',
|
|
153
153
|
'lint:fix': 'oxlint apps verticals packages --fix',
|
|
154
|
-
typecheck:
|
|
154
|
+
typecheck: "node ./scripts/ultramodern-typecheck.mjs --build tsconfig.json",
|
|
155
155
|
'cloudflare:build': `${remoteCloudflareBuildPrefix}pnpm --filter "./apps/shell-super-app" run cloudflare:build && pnpm mf:types`,
|
|
156
156
|
'cloudflare:deploy': `${remoteCloudflareDeployPrefix}pnpm --filter "./apps/shell-super-app" run cloudflare:deploy`,
|
|
157
157
|
'cloudflare:proof': "node ./scripts/proof-cloudflare-version.mjs --out .codex/reports/cloudflare-version-proof/public-url-proof.json",
|
|
@@ -252,17 +252,69 @@ function createTsConfigBase() {
|
|
|
252
252
|
}
|
|
253
253
|
};
|
|
254
254
|
}
|
|
255
|
-
function
|
|
256
|
-
const
|
|
255
|
+
function createTsBuildInfoFile(packageDir) {
|
|
256
|
+
const cacheKey = packageDir.replace(/[^a-zA-Z0-9._-]+/gu, '__');
|
|
257
|
+
return `${relativeRootFor(packageDir)}/node_modules/.cache/tsgo/${cacheKey}.tsbuildinfo`;
|
|
258
|
+
}
|
|
259
|
+
function createReferences(packageDir, references) {
|
|
260
|
+
return [
|
|
261
|
+
...new Set(references)
|
|
262
|
+
].filter((reference)=>reference !== packageDir).map((reference)=>({
|
|
263
|
+
path: `${relativeRootFor(packageDir)}/${reference}`
|
|
264
|
+
}));
|
|
265
|
+
}
|
|
266
|
+
function createPackageTsConfig(packageDir, options = {}) {
|
|
267
|
+
const resolvedOptions = 'boolean' == typeof options ? {
|
|
268
|
+
includeApi: options
|
|
269
|
+
} : options;
|
|
270
|
+
const include = resolvedOptions.include ?? [
|
|
257
271
|
'src',
|
|
258
272
|
'modern.config.ts',
|
|
259
273
|
'module-federation.config.ts'
|
|
260
274
|
];
|
|
261
|
-
if (includeApi) include.push('api', 'shared');
|
|
262
|
-
|
|
275
|
+
if (resolvedOptions.includeApi) include.push('api', 'shared');
|
|
276
|
+
const references = createReferences(packageDir, resolvedOptions.references ?? []);
|
|
277
|
+
const tsconfig = {
|
|
263
278
|
extends: `${relativeRootFor(packageDir)}/tsconfig.base.json`,
|
|
279
|
+
compilerOptions: {
|
|
280
|
+
composite: true,
|
|
281
|
+
incremental: true,
|
|
282
|
+
tsBuildInfoFile: createTsBuildInfoFile(packageDir)
|
|
283
|
+
},
|
|
264
284
|
include
|
|
265
285
|
};
|
|
286
|
+
if (references.length > 0) tsconfig.references = references;
|
|
287
|
+
return tsconfig;
|
|
288
|
+
}
|
|
289
|
+
function createAppTsConfig(app, remotes = []) {
|
|
290
|
+
const references = [
|
|
291
|
+
...sharedPackages.map((sharedPackage)=>sharedPackage.directory),
|
|
292
|
+
...'shell' === app.kind ? verticalEffectApps(remotes).map((remote)=>remote.directory) : resolveRemoteRefs(app, remotes).map((remote)=>remote.directory)
|
|
293
|
+
];
|
|
294
|
+
return createPackageTsConfig(app.directory, {
|
|
295
|
+
includeApi: appHasEffectApi(app),
|
|
296
|
+
references
|
|
297
|
+
});
|
|
298
|
+
}
|
|
299
|
+
function createSharedPackageTsConfig(packageDir) {
|
|
300
|
+
return createPackageTsConfig(packageDir, {
|
|
301
|
+
include: [
|
|
302
|
+
'src'
|
|
303
|
+
]
|
|
304
|
+
});
|
|
305
|
+
}
|
|
306
|
+
function createRootTsConfig(apps = []) {
|
|
307
|
+
return {
|
|
308
|
+
files: [],
|
|
309
|
+
references: [
|
|
310
|
+
...sharedPackages.map((sharedPackage)=>({
|
|
311
|
+
path: sharedPackage.directory
|
|
312
|
+
})),
|
|
313
|
+
...apps.map((app)=>({
|
|
314
|
+
path: app.directory
|
|
315
|
+
}))
|
|
316
|
+
]
|
|
317
|
+
};
|
|
266
318
|
}
|
|
267
319
|
function createAppPackage(scope, app, packageSource, enableTailwind, remotes = []) {
|
|
268
320
|
const publicSurfaceBuildCommand = createPublicSurfaceGenerationCommand(app, 'dist');
|
|
@@ -284,7 +336,7 @@ function createAppPackage(scope, app, packageSource, enableTailwind, remotes = [
|
|
|
284
336
|
'cloudflare:preview': 'pnpm run cloudflare:build && wrangler dev --config .output/wrangler.json',
|
|
285
337
|
'cloudflare:proof': `node ${relativeRootFor(app.directory)}/scripts/proof-cloudflare-version.mjs --app ${app.id}`,
|
|
286
338
|
serve: 'modern serve',
|
|
287
|
-
typecheck:
|
|
339
|
+
typecheck: createEffectTsgoTypecheckCommand(app.directory)
|
|
288
340
|
},
|
|
289
341
|
modernjs: {
|
|
290
342
|
preset: 'presetUltramodern',
|
|
@@ -320,7 +372,7 @@ function createSharedPackage(scope, id, description) {
|
|
|
320
372
|
'.': './src/index.ts'
|
|
321
373
|
},
|
|
322
374
|
scripts: {
|
|
323
|
-
typecheck:
|
|
375
|
+
typecheck: createEffectTsgoTypecheckCommand(`packages/${id}`)
|
|
324
376
|
},
|
|
325
377
|
devDependencies: {
|
|
326
378
|
'@effect/tsgo': EFFECT_TSGO_VERSION,
|
|
@@ -336,4 +388,4 @@ function createSharedPackage(scope, id, description) {
|
|
|
336
388
|
function createSharedContractsIndex() {
|
|
337
389
|
return readFileTemplate('packages/shared-contracts-index.ts');
|
|
338
390
|
}
|
|
339
|
-
export { appDependencies, appDevDependencies, createAppPackage, createPackageTsConfig, createRootPackageJson, createSharedContractsIndex, createSharedPackage, createTsConfigBase, createZephyrDependencies, effectDiagnostics
|
|
391
|
+
export { appDependencies, appDevDependencies, createAppPackage, createAppTsConfig, createEffectTsgoTypecheckCommand, createPackageTsConfig, createRootPackageJson, createRootTsConfig, createSharedContractsIndex, createSharedPackage, createSharedPackageTsConfig, createTsConfigBase, createZephyrDependencies, effectDiagnostics };
|
|
@@ -10,9 +10,8 @@ const TAILWIND_POSTCSS_VERSION = '4.3.1';
|
|
|
10
10
|
const POSTCSS_VERSION = '8.5.15';
|
|
11
11
|
const EFFECT_TSGO_VERSION = '0.14.6';
|
|
12
12
|
const TYPESCRIPT_STABLE_VERSION = '6.0.3';
|
|
13
|
-
const TYPESCRIPT_7_VERSION = '7.0.1-rc';
|
|
14
|
-
const TYPESCRIPT_VERSION = TYPESCRIPT_STABLE_VERSION;
|
|
15
13
|
const TYPESCRIPT_NATIVE_PREVIEW_VERSION = '7.0.0-dev.20260624.1';
|
|
14
|
+
const TYPESCRIPT_VERSION = TYPESCRIPT_STABLE_VERSION;
|
|
16
15
|
const OXLINT_VERSION = '1.71.0';
|
|
17
16
|
const OXFMT_VERSION = '0.55.0';
|
|
18
17
|
const ULTRACITE_VERSION = '7.8.3';
|
|
@@ -34,4 +33,4 @@ const ultramodernWorkspaceVersions = {
|
|
|
34
33
|
tailwind: TAILWIND_VERSION,
|
|
35
34
|
tailwindPostcss: TAILWIND_POSTCSS_VERSION
|
|
36
35
|
};
|
|
37
|
-
export { CLOUDFLARE_COMPATIBILITY_DATE, EFFECT_TSGO_VERSION, I18NEXT_VERSION, LEFTHOOK_VERSION, MODULE_FEDERATION_AGENT_SKILLS_COMMIT, MODULE_FEDERATION_VERSION, NODE_FETCH_VERSION, NODE_VERSION, OXFMT_VERSION, OXLINT_VERSION, PNPM_VERSION, POSTCSS_VERSION, REACT_DOM_VERSION, REACT_ROUTER_VERSION, REACT_VERSION, RSTACK_AGENT_SKILLS_COMMIT, TAILWIND_POSTCSS_VERSION, TAILWIND_VERSION, TANSTACK_ROUTER_VERSION,
|
|
36
|
+
export { CLOUDFLARE_COMPATIBILITY_DATE, EFFECT_TSGO_VERSION, I18NEXT_VERSION, LEFTHOOK_VERSION, MODULE_FEDERATION_AGENT_SKILLS_COMMIT, MODULE_FEDERATION_VERSION, NODE_FETCH_VERSION, NODE_VERSION, OXFMT_VERSION, OXLINT_VERSION, PNPM_VERSION, POSTCSS_VERSION, REACT_DOM_VERSION, REACT_ROUTER_VERSION, REACT_VERSION, RSTACK_AGENT_SKILLS_COMMIT, TAILWIND_POSTCSS_VERSION, TAILWIND_VERSION, TANSTACK_ROUTER_VERSION, TYPESCRIPT_NATIVE_PREVIEW_VERSION, TYPESCRIPT_STABLE_VERSION, TYPESCRIPT_VERSION, TYPES_REACT_DOM_VERSION, TYPES_REACT_VERSION, ULTRACITE_VERSION, WRANGLER_VERSION, ZEPHYR_AGENT_VERSION, ZEPHYR_RSPACK_PLUGIN_VERSION, ultramodernWorkspaceVersions };
|
|
@@ -80,6 +80,9 @@ function createPerformanceReadinessConfigScript() {
|
|
|
80
80
|
function createPerformanceReadinessScript() {
|
|
81
81
|
return readFileTemplate("workspace-scripts/ultramodern-performance-readiness.mjs");
|
|
82
82
|
}
|
|
83
|
+
function createUltramodernTypecheckScript() {
|
|
84
|
+
return readFileTemplate("workspace-scripts/ultramodern-typecheck.mjs");
|
|
85
|
+
}
|
|
83
86
|
function writeGeneratedWorkspaceScripts(targetDir, scope, enableTailwind, remotes = []) {
|
|
84
87
|
writeFileReplacing(targetDir, "scripts/assert-mf-types.mjs", createAssertMfTypesScript(remotes));
|
|
85
88
|
writeFileReplacing(targetDir, "scripts/validate-ultramodern-workspace.mjs", createWorkspaceValidationScript(scope, enableTailwind, remotes));
|
|
@@ -89,5 +92,6 @@ function writeGeneratedWorkspaceScripts(targetDir, scope, enableTailwind, remote
|
|
|
89
92
|
writeFileReplacing(targetDir, "scripts/proof-cloudflare-version.mjs", createCloudflareVersionProofScript());
|
|
90
93
|
writeFileReplacing(targetDir, "scripts/ultramodern-performance-readiness.config.mjs", createPerformanceReadinessConfigScript());
|
|
91
94
|
writeFileReplacing(targetDir, "scripts/ultramodern-performance-readiness.mjs", createPerformanceReadinessScript());
|
|
95
|
+
writeFileReplacing(targetDir, "scripts/ultramodern-typecheck.mjs", createUltramodernTypecheckScript());
|
|
92
96
|
}
|
|
93
|
-
export { createAssertMfTypesScript, createCloudflareProofHelperScript, createCloudflareVersionProofScript, createPerformanceReadinessConfigScript, createPerformanceReadinessScript, createPublicSurfaceAssetsScript, createWorkspaceI18nBoundaryValidationScript, createWorkspaceValidationScript, writeGeneratedWorkspaceScripts };
|
|
97
|
+
export { createAssertMfTypesScript, createCloudflareProofHelperScript, createCloudflareVersionProofScript, createPerformanceReadinessConfigScript, createPerformanceReadinessScript, createPublicSurfaceAssetsScript, createUltramodernTypecheckScript, createWorkspaceI18nBoundaryValidationScript, createWorkspaceValidationScript, writeGeneratedWorkspaceScripts };
|
|
@@ -9,9 +9,9 @@ import { copyRootTemplate, writeFile, writeJson } from "./fs-io.js";
|
|
|
9
9
|
import { createFileSnapshot, createGenerationResult, diffFileSnapshots } from "./generation-result.js";
|
|
10
10
|
import { createAppPublicLocaleMessages } from "./locales.js";
|
|
11
11
|
import { createAppModernConfig, createRemoteModuleFederationConfig, createShellModuleFederationConfig, createUltramodernBuildModule } from "./module-federation.js";
|
|
12
|
-
import { assertUniqueTailwindPrefixes,
|
|
12
|
+
import { assertUniqueTailwindPrefixes, toPackageScope } from "./naming.js";
|
|
13
13
|
import { runCodeSmithOverlays } from "./overlays.js";
|
|
14
|
-
import { createAppPackage,
|
|
14
|
+
import { createAppPackage, createAppTsConfig, createRootPackageJson, createRootTsConfig, createSharedContractsIndex, createSharedPackage, createSharedPackageTsConfig, createTsConfigBase } from "./package-json.js";
|
|
15
15
|
import { resolvePackageSource } from "./package-source.js";
|
|
16
16
|
import { createPublicWebAppArtifacts } from "./public-surface.js";
|
|
17
17
|
import { NODE_FETCH_VERSION, NODE_VERSION, PNPM_VERSION, TANSTACK_ROUTER_VERSION, TYPESCRIPT_VERSION } from "./versions.js";
|
|
@@ -23,7 +23,7 @@ function writeApp(targetDir, scope, app, packageSource, enableTailwind, remotes
|
|
|
23
23
|
writeFile(targetDir, `${resolvedApp.directory}/${relativePath}`, content);
|
|
24
24
|
};
|
|
25
25
|
writeJson(targetDir, `${resolvedApp.directory}/package.json`, createAppPackage(scope, resolvedApp, packageSource, enableTailwind, remotes));
|
|
26
|
-
writeJson(targetDir, `${resolvedApp.directory}/tsconfig.json`,
|
|
26
|
+
writeJson(targetDir, `${resolvedApp.directory}/tsconfig.json`, createAppTsConfig(resolvedApp, remotes));
|
|
27
27
|
writeFile(targetDir, `${resolvedApp.directory}/src/modern-app-env.d.ts`, createAppEnvDts(resolvedApp, remotes));
|
|
28
28
|
writeFile(targetDir, `${resolvedApp.directory}/src/ultramodern-build.ts`, createUltramodernBuildModule(scope, resolvedApp));
|
|
29
29
|
writeFile(targetDir, publicWeb.jsonLdHelperFile.path, publicWeb.jsonLdHelperFile.content);
|
|
@@ -66,12 +66,7 @@ function writeApp(targetDir, scope, app, packageSource, enableTailwind, remotes
|
|
|
66
66
|
function writeSharedPackages(targetDir, scope) {
|
|
67
67
|
for (const sharedPackage of sharedPackages){
|
|
68
68
|
writeJson(targetDir, `${sharedPackage.directory}/package.json`, createSharedPackage(scope, sharedPackage.id, sharedPackage.description));
|
|
69
|
-
writeJson(targetDir, `${sharedPackage.directory}/tsconfig.json`,
|
|
70
|
-
extends: `${relativeRootFor(sharedPackage.directory)}/tsconfig.base.json`,
|
|
71
|
-
include: [
|
|
72
|
-
'src'
|
|
73
|
-
]
|
|
74
|
-
});
|
|
69
|
+
writeJson(targetDir, `${sharedPackage.directory}/tsconfig.json`, createSharedPackageTsConfig(sharedPackage.directory));
|
|
75
70
|
}
|
|
76
71
|
writeFile(targetDir, 'packages/shared-contracts/src/index.ts', createSharedContractsIndex());
|
|
77
72
|
writeFile(targetDir, 'packages/shared-design-tokens/src/index.ts', `export const sharedDesignTokens = {
|
|
@@ -113,6 +108,7 @@ function generateUltramodernWorkspace(options) {
|
|
|
113
108
|
});
|
|
114
109
|
writeJson(options.targetDir, 'package.json', createRootPackageJson(scope, packageSource, initialVerticals));
|
|
115
110
|
writeJson(options.targetDir, 'tsconfig.base.json', createTsConfigBase());
|
|
111
|
+
writeJson(options.targetDir, 'tsconfig.json', createRootTsConfig(createdApps));
|
|
116
112
|
writeJson(options.targetDir, 'topology/reference-topology.json', createTopology(scope, initialVerticals));
|
|
117
113
|
writeJson(options.targetDir, 'topology/ownership.json', createOwnership(scope, initialVerticals));
|
|
118
114
|
writeJson(options.targetDir, 'topology/local-overlays/development.json', createDevelopmentOverlay(initialVerticals));
|
|
@@ -1,12 +1,21 @@
|
|
|
1
1
|
import type { JsonValue, ResolvedPackageSource, WorkspaceApp } from './types';
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const createEffectTsgoTypecheckCommand: (packageDir: string) => string;
|
|
3
3
|
export declare const effectDiagnostics: string[];
|
|
4
4
|
export declare function appDependencies(scope: string, packageSource: ResolvedPackageSource, app: WorkspaceApp, remotes?: WorkspaceApp[]): Record<string, string>;
|
|
5
5
|
export declare function appDevDependencies(packageSource: ResolvedPackageSource, enableTailwind: boolean): Record<string, string>;
|
|
6
6
|
export declare function createRootPackageJson(scope: string, packageSource: ResolvedPackageSource, remotes?: WorkspaceApp[]): JsonValue;
|
|
7
7
|
export declare function createZephyrDependencies(scope: string, app: WorkspaceApp, remotes?: WorkspaceApp[]): JsonValue;
|
|
8
8
|
export declare function createTsConfigBase(): JsonValue;
|
|
9
|
-
|
|
9
|
+
type CreatePackageTsConfigOptions = {
|
|
10
|
+
include?: string[];
|
|
11
|
+
includeApi?: boolean;
|
|
12
|
+
references?: string[];
|
|
13
|
+
};
|
|
14
|
+
export declare function createPackageTsConfig(packageDir: string, options?: CreatePackageTsConfigOptions | boolean): JsonValue;
|
|
15
|
+
export declare function createAppTsConfig(app: WorkspaceApp, remotes?: WorkspaceApp[]): JsonValue;
|
|
16
|
+
export declare function createSharedPackageTsConfig(packageDir: string): JsonValue;
|
|
17
|
+
export declare function createRootTsConfig(apps?: WorkspaceApp[]): JsonValue;
|
|
10
18
|
export declare function createAppPackage(scope: string, app: WorkspaceApp, packageSource: ResolvedPackageSource, enableTailwind: boolean, remotes?: WorkspaceApp[]): JsonValue;
|
|
11
19
|
export declare function createSharedPackage(scope: string, id: string, description: string): JsonValue;
|
|
12
20
|
export declare function createSharedContractsIndex(): string;
|
|
21
|
+
export {};
|
|
@@ -14,9 +14,8 @@ export declare const TAILWIND_POSTCSS_VERSION = "4.3.1";
|
|
|
14
14
|
export declare const POSTCSS_VERSION = "8.5.15";
|
|
15
15
|
export declare const EFFECT_TSGO_VERSION = "0.14.6";
|
|
16
16
|
export declare const TYPESCRIPT_STABLE_VERSION = "6.0.3";
|
|
17
|
-
export declare const TYPESCRIPT_7_VERSION = "7.0.1-rc";
|
|
18
|
-
export declare const TYPESCRIPT_VERSION = "6.0.3";
|
|
19
17
|
export declare const TYPESCRIPT_NATIVE_PREVIEW_VERSION = "7.0.0-dev.20260624.1";
|
|
18
|
+
export declare const TYPESCRIPT_VERSION = "6.0.3";
|
|
20
19
|
export declare const OXLINT_VERSION = "1.71.0";
|
|
21
20
|
export declare const OXFMT_VERSION = "0.55.0";
|
|
22
21
|
export declare const ULTRACITE_VERSION = "7.8.3";
|
|
@@ -7,4 +7,5 @@ export declare function createCloudflareProofHelperScript(): string;
|
|
|
7
7
|
export declare function createCloudflareVersionProofScript(): string;
|
|
8
8
|
export declare function createPerformanceReadinessConfigScript(): string;
|
|
9
9
|
export declare function createPerformanceReadinessScript(): string;
|
|
10
|
+
export declare function createUltramodernTypecheckScript(): string;
|
|
10
11
|
export declare function writeGeneratedWorkspaceScripts(targetDir: string, scope: string, enableTailwind: boolean, remotes?: WorkspaceApp[]): void;
|
package/package.json
CHANGED
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"engines": {
|
|
22
22
|
"node": ">=20"
|
|
23
23
|
},
|
|
24
|
-
"version": "3.4.0-ultramodern.
|
|
24
|
+
"version": "3.4.0-ultramodern.2",
|
|
25
25
|
"types": "./dist/types/index.d.ts",
|
|
26
26
|
"main": "./dist/esm-node/index.js",
|
|
27
27
|
"bin": {
|
|
@@ -75,11 +75,11 @@
|
|
|
75
75
|
],
|
|
76
76
|
"dependencies": {
|
|
77
77
|
"@modern-js/codesmith": "2.6.9",
|
|
78
|
-
"@modern-js/i18n-utils": "npm:@bleedingdev/modern-js-i18n-utils@3.4.0-ultramodern.
|
|
78
|
+
"@modern-js/i18n-utils": "npm:@bleedingdev/modern-js-i18n-utils@3.4.0-ultramodern.2"
|
|
79
79
|
},
|
|
80
80
|
"devDependencies": {
|
|
81
81
|
"@rslib/core": "0.23.0",
|
|
82
|
-
"@types/node": "^26.0.
|
|
82
|
+
"@types/node": "^26.0.1",
|
|
83
83
|
"@typescript/native-preview": "7.0.0-dev.20260624.1",
|
|
84
84
|
"tsx": "^4.22.4",
|
|
85
85
|
"typescript": "^6.0.3",
|
|
@@ -97,6 +97,6 @@
|
|
|
97
97
|
"test": "rm -rf dist && rslib build -c rslibconfig.mts && rstest --passWithNoTests"
|
|
98
98
|
},
|
|
99
99
|
"ultramodern": {
|
|
100
|
-
"frameworkVersion": "3.4.0-ultramodern.
|
|
100
|
+
"frameworkVersion": "3.4.0-ultramodern.2"
|
|
101
101
|
}
|
|
102
102
|
}
|
|
@@ -12,7 +12,7 @@ baseline; do not reintroduce Corepack or older pnpm aliases.
|
|
|
12
12
|
|
|
13
13
|
- `pnpm lint` runs Oxlint with the Ultracite preset.
|
|
14
14
|
- `pnpm format` runs oxfmt.
|
|
15
|
-
- `pnpm typecheck` runs effect-tsgo
|
|
15
|
+
- `pnpm typecheck` runs TS7 native-preview through effect-tsgo in project-reference build mode with parallel `--checkers` and `--builders`.
|
|
16
16
|
- `pnpm i18n:boundaries` verifies workspace source boundaries through `@modern-js/code-tools`.
|
|
17
17
|
- `pnpm contract:check` verifies the generated workspace contract.
|
|
18
18
|
- `pnpm mf:types` verifies Module Federation type outputs after builds.
|
|
@@ -72,6 +72,7 @@ Agents may read files under `repos/` to understand upstream patterns, APIs, and
|
|
|
72
72
|
## Project Priorities
|
|
73
73
|
|
|
74
74
|
- Keep `presetUltramodern` as the single preset.
|
|
75
|
+
- Maximize TS7 latest dev usage through `@typescript/native-preview` and TS-Go. Keep classic `typescript` on latest TS6 only for compatibility peers and tooling that cannot consume native-preview yet.
|
|
75
76
|
- Keep the initial workspace shell-only unless a user explicitly asks for a
|
|
76
77
|
starter vertical.
|
|
77
78
|
- Use `create <domain> --vertical` as the growth path for real business
|
|
@@ -68,6 +68,13 @@ Generated CI does not call the local aggregate. It runs format, lint,
|
|
|
68
68
|
typecheck, skills, i18n boundary validation, contract validation, and build as
|
|
69
69
|
separate matrix jobs so failures are isolated and parallelizable.
|
|
70
70
|
|
|
71
|
+
Type checking is TS7-first. `pnpm typecheck` runs
|
|
72
|
+
`scripts/ultramodern-typecheck.mjs` in TS-Go build mode over
|
|
73
|
+
`tsconfig.json` project references, with native-preview `--checkers` and
|
|
74
|
+
`--builders` enabled by default. `@typescript/native-preview` is the TS7 latest
|
|
75
|
+
dev compiler lane. The classic `typescript` package is pinned to latest TS6
|
|
76
|
+
only where compatibility peers or tooling still require it.
|
|
77
|
+
|
|
71
78
|
Read-only agent reference repositories under `repos/` (Effect and
|
|
72
79
|
UltraModern.js source lookup using squashed git subtrees) are an explicit
|
|
73
80
|
opt-in step: run `pnpm agents:refs:install` when you want them. `pnpm install`
|
|
@@ -5,13 +5,15 @@ export default defineConfig({
|
|
|
5
5
|
extends: [ultracite],
|
|
6
6
|
ignorePatterns: [
|
|
7
7
|
'.agents',
|
|
8
|
+
'.output',
|
|
8
9
|
'**/*.json',
|
|
9
10
|
'dist',
|
|
10
11
|
'node_modules',
|
|
11
12
|
'repos/**',
|
|
12
13
|
'.modern',
|
|
13
14
|
'.modernjs',
|
|
14
|
-
'**/
|
|
15
|
+
'**/modern-tanstack/**',
|
|
16
|
+
'**/routeTree.gen.*',
|
|
15
17
|
],
|
|
16
18
|
singleQuote: true,
|
|
17
19
|
});
|
|
@@ -10,11 +10,13 @@ export default defineConfig({
|
|
|
10
10
|
extends: [core, react],
|
|
11
11
|
ignorePatterns: [
|
|
12
12
|
'.agents',
|
|
13
|
+
'.output',
|
|
13
14
|
'dist',
|
|
14
15
|
'node_modules',
|
|
15
16
|
'repos/**',
|
|
16
17
|
'.modern',
|
|
17
18
|
'.modernjs',
|
|
18
|
-
'**/
|
|
19
|
+
'**/modern-tanstack/**',
|
|
20
|
+
'**/routeTree.gen.*',
|
|
19
21
|
],
|
|
20
22
|
});
|
|
@@ -47,17 +47,18 @@ const requireGit = () => {
|
|
|
47
47
|
);
|
|
48
48
|
};
|
|
49
49
|
|
|
50
|
-
const
|
|
50
|
+
const gitTopLevel = () => {
|
|
51
51
|
try {
|
|
52
|
-
return run('git', ['rev-parse', '--
|
|
52
|
+
return run('git', ['rev-parse', '--show-toplevel']).trim();
|
|
53
53
|
} catch {
|
|
54
|
-
return
|
|
54
|
+
return undefined;
|
|
55
55
|
}
|
|
56
56
|
};
|
|
57
57
|
|
|
58
58
|
const initializeGitRepository = () => {
|
|
59
|
-
|
|
60
|
-
|
|
59
|
+
const topLevel = gitTopLevel();
|
|
60
|
+
if (topLevel !== undefined) {
|
|
61
|
+
return path.resolve(topLevel) === root;
|
|
61
62
|
}
|
|
62
63
|
|
|
63
64
|
try {
|
|
@@ -66,9 +67,24 @@ const initializeGitRepository = () => {
|
|
|
66
67
|
run('git', ['init'], { stdio: 'inherit' });
|
|
67
68
|
run('git', ['branch', '-M', 'main'], { stdio: 'inherit' });
|
|
68
69
|
}
|
|
70
|
+
return true;
|
|
69
71
|
};
|
|
70
72
|
|
|
71
73
|
const installLefthook = () => {
|
|
74
|
+
if (!commandExists('git')) {
|
|
75
|
+
console.warn(
|
|
76
|
+
'Skipping lefthook hook installation because git is not available. Install git and run lefthook install from the generated workspace root to enable local hooks.',
|
|
77
|
+
);
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
if (!initializeGitRepository()) {
|
|
82
|
+
console.log(
|
|
83
|
+
'Skipping lefthook hook installation because this generated workspace is nested inside another Git worktree. Run git init from the generated workspace root before installing hooks if you want workspace-local hooks.',
|
|
84
|
+
);
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
|
|
72
88
|
try {
|
|
73
89
|
run('lefthook', ['install'], { stdio: 'inherit' });
|
|
74
90
|
} catch (error) {
|
|
@@ -199,8 +215,8 @@ if (checkOnly) {
|
|
|
199
215
|
}
|
|
200
216
|
|
|
201
217
|
if (missingCloneInstalled.length > 0) {
|
|
202
|
-
console.
|
|
203
|
-
`
|
|
218
|
+
console.log(
|
|
219
|
+
`Advisory: clone-installed agent skills are not present: ${missingCloneInstalled.join(', ')}. This is expected in CI, nested generated workspaces, and postinstall-only installs; run pnpm skills:install when you need those skills.`,
|
|
204
220
|
);
|
|
205
221
|
} else {
|
|
206
222
|
console.log('All pinned agent skills are installed.');
|
|
@@ -218,7 +234,6 @@ if (postinstall && !cloneOptIn) {
|
|
|
218
234
|
|
|
219
235
|
fs.mkdirSync(installDir, { recursive: true });
|
|
220
236
|
requireGit();
|
|
221
|
-
initializeGitRepository();
|
|
222
237
|
|
|
223
238
|
for (const source of [...requiredCloneSources, ...optionalCloneSources]) {
|
|
224
239
|
const tempDir = fs.mkdtempSync(path.join(os.tmpdir(), 'ultramodern-skills-'));
|