@bleedingdev/modern-js-create 3.2.0-ultramodern.14 → 3.2.0-ultramodern.16

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/index.js CHANGED
@@ -1919,6 +1919,7 @@ function createTemplateManifest(modernVersion, packageSource) {
1919
1919
  ],
1920
1920
  postMaterializationValidation: [
1921
1921
  'ultramodern-workspace-contract-check',
1922
+ 'pnpm-11-policy-enforced',
1922
1923
  'template-manifest-retained'
1923
1924
  ],
1924
1925
  expectedCommands: [
@@ -2222,6 +2223,7 @@ function createBuiltinTemplateManifest(version) {
2222
2223
  'oxfmt.config.ts',
2223
2224
  'oxlint.config.ts',
2224
2225
  'package.json',
2226
+ 'pnpm-workspace.yaml',
2225
2227
  'postcss.config.mjs',
2226
2228
  'rstest.config.mts',
2227
2229
  "scripts/**",
@@ -2258,11 +2260,12 @@ function createBuiltinTemplateManifest(version) {
2258
2260
  'ultramodern-contract-check',
2259
2261
  'dependency-install-with-lifecycle-deny',
2260
2262
  'package-source-retained',
2263
+ 'pnpm-11-policy-enforced',
2261
2264
  'rstest-smoke-tests',
2262
2265
  'template-manifest-retained'
2263
2266
  ],
2264
2267
  expectedCommands: [
2265
- "pnpm install --ignore-scripts",
2268
+ 'pnpm install',
2266
2269
  'pnpm test',
2267
2270
  'pnpm run ultramodern:check'
2268
2271
  ]
package/package.json CHANGED
@@ -21,7 +21,7 @@
21
21
  "engines": {
22
22
  "node": ">=20"
23
23
  },
24
- "version": "3.2.0-ultramodern.14",
24
+ "version": "3.2.0-ultramodern.16",
25
25
  "types": "./dist/types/index.d.ts",
26
26
  "main": "./dist/index.js",
27
27
  "bin": {
@@ -41,7 +41,7 @@
41
41
  "@types/node": "^25.8.0",
42
42
  "@typescript/native-preview": "7.0.0-dev.20260516.1",
43
43
  "tsx": "^4.22.0",
44
- "@modern-js/i18n-utils": "npm:@bleedingdev/modern-js-i18n-utils@3.2.0-ultramodern.14"
44
+ "@modern-js/i18n-utils": "npm:@bleedingdev/modern-js-i18n-utils@3.2.0-ultramodern.16"
45
45
  },
46
46
  "publishConfig": {
47
47
  "registry": "https://registry.npmjs.org/",
@@ -54,6 +54,6 @@
54
54
  "start": "node ./dist/index.js"
55
55
  },
56
56
  "ultramodern": {
57
- "frameworkVersion": "3.2.0-ultramodern.14"
57
+ "frameworkVersion": "3.2.0-ultramodern.16"
58
58
  }
59
59
  }
@@ -21,7 +21,7 @@ jobs:
21
21
  cache: pnpm
22
22
 
23
23
  - name: Install Dependencies
24
- run: pnpm install --ignore-scripts
24
+ run: pnpm install
25
25
 
26
26
  - name: Validate Ultramodern Contract
27
27
  run: pnpm run ultramodern:check
@@ -73,13 +73,5 @@
73
73
  "engines": {
74
74
  "node": ">=20",
75
75
  "pnpm": ">=11.0.0"
76
- },
77
- "pnpm": {
78
- "onlyBuiltDependencies": [
79
- "@swc/core",
80
- "core-js",
81
- "esbuild",
82
- "msgpackr-extract"
83
- ]
84
76
  }
85
77
  }
@@ -0,0 +1,24 @@
1
+ minimumReleaseAge: 1440
2
+ minimumReleaseAgeStrict: true
3
+ minimumReleaseAgeIgnoreMissingTime: false
4
+ minimumReleaseAgeExclude:
5
+ - '@modern-js/*'
6
+ - '@bleedingdev/*'
7
+ - '@effect/tsgo'
8
+ - '@effect/tsgo-*'
9
+ - '@typescript/native-preview'
10
+ - '@typescript/native-preview-*'
11
+ trustPolicy: no-downgrade
12
+ trustPolicyIgnoreAfter: 1440
13
+ blockExoticSubdeps: true
14
+ engineStrict: true
15
+ pmOnFail: error
16
+ verifyDepsBeforeRun: error
17
+ strictDepBuilds: true
18
+
19
+ allowBuilds:
20
+ '@swc/core': true
21
+ core-js: true
22
+ esbuild: true
23
+ msgpackr-extract: true
24
+ simple-git-hooks: true
@@ -53,6 +53,7 @@ const requiredPostMaterialization = [
53
53
  'ultramodern-contract-check',
54
54
  'dependency-install-with-lifecycle-deny',
55
55
  'package-source-retained',
56
+ 'pnpm-11-policy-enforced',
56
57
  'rstest-smoke-tests',
57
58
  'template-manifest-retained',
58
59
  ];
@@ -66,6 +67,7 @@ const requiredPaths = [
66
67
  'scripts/bootstrap-agent-skills.mjs',
67
68
  {{/unless}}
68
69
  '.modernjs/ultramodern-package-source.json',
70
+ 'pnpm-workspace.yaml',
69
71
  'rstest.config.mts',
70
72
  'scripts/check-i18n-strings.mjs',
71
73
  'config/public/locales/en/translation.json',
@@ -162,6 +164,10 @@ if (manifestErrors.length > 0) {
162
164
  const packageJson = JSON.parse(
163
165
  fs.readFileSync(path.resolve(process.cwd(), 'package.json'), 'utf-8'),
164
166
  );
167
+ const pnpmWorkspace = fs.readFileSync(
168
+ path.resolve(process.cwd(), 'pnpm-workspace.yaml'),
169
+ 'utf-8',
170
+ );
165
171
  const packageSource = JSON.parse(fs.readFileSync(packageSourcePath, 'utf-8'));
166
172
  const unresolvedTemplateMarker = String.fromCodePoint(123, 123);
167
173
  if (JSON.stringify(packageJson).includes(unresolvedTemplateMarker)) {
@@ -225,6 +231,36 @@ if (packageJson.engines?.pnpm !== '>=11.0.0') {
225
231
  process.exit(1);
226
232
  }
227
233
 
234
+ if (packageJson.pnpm !== undefined) {
235
+ console.error('Generated app must keep pnpm policy in pnpm-workspace.yaml, not package.json');
236
+ process.exit(1);
237
+ }
238
+
239
+ for (const requiredSnippet of [
240
+ 'minimumReleaseAge: 1440',
241
+ 'minimumReleaseAgeStrict: true',
242
+ 'minimumReleaseAgeIgnoreMissingTime: false',
243
+ "minimumReleaseAgeExclude:\n - '@modern-js/*'\n - '@bleedingdev/*'\n - '@effect/tsgo'\n - '@effect/tsgo-*'\n - '@typescript/native-preview'\n - '@typescript/native-preview-*'",
244
+ 'trustPolicy: no-downgrade',
245
+ 'trustPolicyIgnoreAfter: 1440',
246
+ 'blockExoticSubdeps: true',
247
+ 'engineStrict: true',
248
+ 'pmOnFail: error',
249
+ 'verifyDepsBeforeRun: error',
250
+ 'strictDepBuilds: true',
251
+ "allowBuilds:\n '@swc/core': true\n core-js: true\n esbuild: true\n msgpackr-extract: true\n simple-git-hooks: true",
252
+ ]) {
253
+ if (!pnpmWorkspace.includes(requiredSnippet)) {
254
+ console.error(`pnpm-workspace.yaml must retain ${requiredSnippet.split('\n')[0]}`);
255
+ process.exit(1);
256
+ }
257
+ }
258
+
259
+ if (pnpmWorkspace.includes('onlyBuiltDependencies')) {
260
+ console.error('pnpm-workspace.yaml must use pnpm 11 allowBuilds instead of onlyBuiltDependencies');
261
+ process.exit(1);
262
+ }
263
+
228
264
  if (packageJson.modernjs?.preset !== 'presetUltramodern') {
229
265
  console.error('package.json must declare presetUltramodern metadata');
230
266
  process.exit(1);
@@ -4,14 +4,27 @@ packages:
4
4
  - services/*
5
5
  - packages/*
6
6
 
7
+ minimumReleaseAge: 1440
8
+ minimumReleaseAgeStrict: true
9
+ minimumReleaseAgeIgnoreMissingTime: false
10
+ minimumReleaseAgeExclude:
11
+ - '@modern-js/*'
12
+ - '@bleedingdev/*'
13
+ - '@effect/tsgo'
14
+ - '@effect/tsgo-*'
15
+ - '@typescript/native-preview'
16
+ - '@typescript/native-preview-*'
17
+ trustPolicy: no-downgrade
18
+ trustPolicyIgnoreAfter: 1440
19
+ blockExoticSubdeps: true
20
+ engineStrict: true
21
+ pmOnFail: error
22
+ verifyDepsBeforeRun: error
23
+ strictDepBuilds: true
24
+
7
25
  allowBuilds:
8
26
  '@swc/core': true
9
27
  core-js: true
10
28
  esbuild: true
11
29
  msgpackr-extract: true
12
-
13
- onlyBuiltDependencies:
14
- - '@swc/core'
15
- - core-js
16
- - esbuild
17
- - msgpackr-extract
30
+ simple-git-hooks: true
@@ -142,14 +142,28 @@ assert(rootPackage.packageManager === 'pnpm@11.1.2', 'Root must pin pnpm 11.1.2'
142
142
  assert(rootPackage.engines?.pnpm === '>=11.0.0', 'Root must require pnpm >=11');
143
143
  for (const requiredSnippet of [
144
144
  'packages:\n - apps/*\n - apps/remotes/*\n - services/*\n - packages/*',
145
- "allowBuilds:\n '@swc/core': true\n core-js: true\n esbuild: true\n msgpackr-extract: true",
146
- "onlyBuiltDependencies:\n - '@swc/core'\n - core-js\n - esbuild\n - msgpackr-extract",
145
+ 'minimumReleaseAge: 1440',
146
+ 'minimumReleaseAgeStrict: true',
147
+ 'minimumReleaseAgeIgnoreMissingTime: false',
148
+ "minimumReleaseAgeExclude:\n - '@modern-js/*'\n - '@bleedingdev/*'\n - '@effect/tsgo'\n - '@effect/tsgo-*'\n - '@typescript/native-preview'\n - '@typescript/native-preview-*'",
149
+ 'trustPolicy: no-downgrade',
150
+ 'trustPolicyIgnoreAfter: 1440',
151
+ 'blockExoticSubdeps: true',
152
+ 'engineStrict: true',
153
+ 'pmOnFail: error',
154
+ 'verifyDepsBeforeRun: error',
155
+ 'strictDepBuilds: true',
156
+ "allowBuilds:\n '@swc/core': true\n core-js: true\n esbuild: true\n msgpackr-extract: true\n simple-git-hooks: true",
147
157
  ]) {
148
158
  assert(
149
159
  pnpmWorkspace.includes(requiredSnippet),
150
160
  `pnpm-workspace.yaml must retain ${requiredSnippet.split('\n')[0]}`,
151
161
  );
152
162
  }
163
+ assert(
164
+ !pnpmWorkspace.includes('onlyBuiltDependencies'),
165
+ 'pnpm-workspace.yaml must use pnpm 11 allowBuilds instead of onlyBuiltDependencies',
166
+ );
153
167
  assert(
154
168
  rootPackage.modernjs?.packageSource?.config === './.modernjs/ultramodern-package-source.json',
155
169
  'Root must point to the UltraModern package source metadata',
@@ -488,5 +502,9 @@ assert(
488
502
  manifest.validation?.expectedCommands?.includes('pnpm run ultramodern:check'),
489
503
  'Template manifest must document the validation command',
490
504
  );
505
+ assert(
506
+ manifest.validation?.postMaterializationValidation?.includes('pnpm-11-policy-enforced'),
507
+ 'Template manifest must document pnpm 11 policy validation',
508
+ );
491
509
 
492
510
  console.log('UltraModern workspace scaffold validated');