@bleedingdev/modern-js-create 3.5.0-ultramodern.4 → 3.5.0-ultramodern.5

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/README.md CHANGED
@@ -193,8 +193,8 @@ For strict Effect API migrations, update generated package metadata and Modern
193
193
  package aliases through the framework command before hand-editing app code:
194
194
 
195
195
  ```bash
196
- pnpm dlx @bleedingdev/modern-js-create@3.5.0-ultramodern.4 ultramodern \
197
- migrate-strict-effect --version 3.5.0-ultramodern.4
196
+ pnpm dlx @bleedingdev/modern-js-create@3.5.0-ultramodern.5 ultramodern \
197
+ migrate-strict-effect --version 3.5.0-ultramodern.5
198
198
  pnpm api:check
199
199
  pnpm contract:check
200
200
  pnpm check
@@ -213,9 +213,9 @@ Generated strict Effect workspaces pin the compatible Effect cohort through
213
213
  `pnpm-workspace.yaml` overrides: `effect@4.0.0-beta.91` and
214
214
  `@effect/vitest@4.0.0-beta.91`. The generated pnpm policy also excludes the
215
215
  known `effect@4.0.0-beta.91` and `@effect/opentelemetry@4.0.0-beta.91`
216
- trusted-publisher to provenance transitions from no-downgrade checks. Do not
217
- override those in app packages; update the framework cohort when the runtime
218
- moves.
216
+ versions from the 24-hour minimum-release-age gate and their trusted-publisher
217
+ to provenance transitions from no-downgrade checks. Do not override those in
218
+ app packages; update the framework cohort when the runtime moves.
219
219
 
220
220
  Use `--ultramodern-package-source=install` for published cohort proof and pin a
221
221
  specific release with `--ultramodern-package-version` when CI must prove an
@@ -229,7 +229,7 @@ const generatedToolingDependencyPins = new Map([
229
229
  versions_cjs_namespaceObject.ZEPHYR_RSPACK_PLUGIN_VERSION
230
230
  ]
231
231
  ]);
232
- const strictEffectTrustPolicyExclusions = [
232
+ const strictEffectPackageVersionPolicyExclusions = [
233
233
  `effect@${versions_cjs_namespaceObject.EFFECT_VERSION}`,
234
234
  `@effect/opentelemetry@${versions_cjs_namespaceObject.EFFECT_VERSION}`
235
235
  ];
@@ -326,16 +326,17 @@ function replaceYamlLine(source, pattern, replacement) {
326
326
  function ensureYamlListItem(source, key, item) {
327
327
  const itemLine = ` - '${item}'`;
328
328
  const headerPattern = new RegExp(`^${key}:\\n(?:(?: - .+\\n)*)`, 'mu');
329
- const existingItemPattern = new RegExp(`^ - '${item.replace(/[.*+?^${}()|[\]\\]/gu, '\\$&')}'$`, 'mu');
330
- if (existingItemPattern.test(source)) return {
331
- source,
332
- changed: false
333
- };
334
329
  const header = source.match(headerPattern);
335
- if (header) return {
336
- source: source.replace(headerPattern, `${header[0]}${itemLine}\n`),
337
- changed: true
338
- };
330
+ if (header) {
331
+ if (header[0].split('\n').includes(itemLine)) return {
332
+ source,
333
+ changed: false
334
+ };
335
+ return {
336
+ source: source.replace(headerPattern, `${header[0]}${itemLine}\n`),
337
+ changed: true
338
+ };
339
+ }
339
340
  const block = `${key}:\n${itemLine}\n`;
340
341
  const afterTrustPolicyIgnore = source.replace(/^(trustPolicyIgnoreAfter: .+\n)/mu, `$1${block}`);
341
342
  if (afterTrustPolicyIgnore !== source) return {
@@ -371,15 +372,20 @@ function updateGeneratedPnpmWorkspacePolicy(workspaceRoot) {
371
372
  source = result.source;
372
373
  changed = result.changed || changed;
373
374
  }
374
- for (const item of strictEffectTrustPolicyExclusions){
375
+ for (const item of strictEffectPackageVersionPolicyExclusions){
375
376
  const packageName = item.slice(0, item.lastIndexOf('@'));
376
377
  const escapedPackageName = packageName.replace(/[.*+?^${}()|[\]\\]/gu, '\\$&');
377
- const currentVersion = replaceYamlLine(source, new RegExp(`^ {2}- '${escapedPackageName}@[^']+'$`, 'mu'), ` - '${item}'`);
378
+ const currentVersion = replaceYamlLine(source, new RegExp(`^ {2}- '${escapedPackageName}@[^']+'$`, 'gmu'), ` - '${item}'`);
378
379
  source = currentVersion.source;
379
380
  changed = currentVersion.changed || changed;
380
- const trustPolicyExclude = ensureYamlListItem(source, 'trustPolicyExclude', item);
381
- source = trustPolicyExclude.source;
382
- changed = trustPolicyExclude.changed || changed;
381
+ for (const policyKey of [
382
+ 'minimumReleaseAgeExclude',
383
+ 'trustPolicyExclude'
384
+ ]){
385
+ const policyExclude = ensureYamlListItem(source, policyKey, item);
386
+ source = policyExclude.source;
387
+ changed = policyExclude.changed || changed;
388
+ }
383
389
  }
384
390
  if (changed) external_node_fs_default().writeFileSync(workspaceFile, source, 'utf-8');
385
391
  return changed;
@@ -182,7 +182,7 @@ const generatedToolingDependencyPins = new Map([
182
182
  ZEPHYR_RSPACK_PLUGIN_VERSION
183
183
  ]
184
184
  ]);
185
- const strictEffectTrustPolicyExclusions = [
185
+ const strictEffectPackageVersionPolicyExclusions = [
186
186
  `effect@${EFFECT_VERSION}`,
187
187
  `@effect/opentelemetry@${EFFECT_VERSION}`
188
188
  ];
@@ -279,16 +279,17 @@ function replaceYamlLine(source, pattern, replacement) {
279
279
  function ensureYamlListItem(source, key, item) {
280
280
  const itemLine = ` - '${item}'`;
281
281
  const headerPattern = new RegExp(`^${key}:\\n(?:(?: - .+\\n)*)`, 'mu');
282
- const existingItemPattern = new RegExp(`^ - '${item.replace(/[.*+?^${}()|[\]\\]/gu, '\\$&')}'$`, 'mu');
283
- if (existingItemPattern.test(source)) return {
284
- source,
285
- changed: false
286
- };
287
282
  const header = source.match(headerPattern);
288
- if (header) return {
289
- source: source.replace(headerPattern, `${header[0]}${itemLine}\n`),
290
- changed: true
291
- };
283
+ if (header) {
284
+ if (header[0].split('\n').includes(itemLine)) return {
285
+ source,
286
+ changed: false
287
+ };
288
+ return {
289
+ source: source.replace(headerPattern, `${header[0]}${itemLine}\n`),
290
+ changed: true
291
+ };
292
+ }
292
293
  const block = `${key}:\n${itemLine}\n`;
293
294
  const afterTrustPolicyIgnore = source.replace(/^(trustPolicyIgnoreAfter: .+\n)/mu, `$1${block}`);
294
295
  if (afterTrustPolicyIgnore !== source) return {
@@ -324,15 +325,20 @@ function updateGeneratedPnpmWorkspacePolicy(workspaceRoot) {
324
325
  source = result.source;
325
326
  changed = result.changed || changed;
326
327
  }
327
- for (const item of strictEffectTrustPolicyExclusions){
328
+ for (const item of strictEffectPackageVersionPolicyExclusions){
328
329
  const packageName = item.slice(0, item.lastIndexOf('@'));
329
330
  const escapedPackageName = packageName.replace(/[.*+?^${}()|[\]\\]/gu, '\\$&');
330
- const currentVersion = replaceYamlLine(source, new RegExp(`^ {2}- '${escapedPackageName}@[^']+'$`, 'mu'), ` - '${item}'`);
331
+ const currentVersion = replaceYamlLine(source, new RegExp(`^ {2}- '${escapedPackageName}@[^']+'$`, 'gmu'), ` - '${item}'`);
331
332
  source = currentVersion.source;
332
333
  changed = currentVersion.changed || changed;
333
- const trustPolicyExclude = ensureYamlListItem(source, 'trustPolicyExclude', item);
334
- source = trustPolicyExclude.source;
335
- changed = trustPolicyExclude.changed || changed;
334
+ for (const policyKey of [
335
+ 'minimumReleaseAgeExclude',
336
+ 'trustPolicyExclude'
337
+ ]){
338
+ const policyExclude = ensureYamlListItem(source, policyKey, item);
339
+ source = policyExclude.source;
340
+ changed = policyExclude.changed || changed;
341
+ }
336
342
  }
337
343
  if (changed) node_fs.writeFileSync(workspaceFile, source, 'utf-8');
338
344
  return changed;
@@ -183,7 +183,7 @@ const generatedToolingDependencyPins = new Map([
183
183
  ZEPHYR_RSPACK_PLUGIN_VERSION
184
184
  ]
185
185
  ]);
186
- const strictEffectTrustPolicyExclusions = [
186
+ const strictEffectPackageVersionPolicyExclusions = [
187
187
  `effect@${EFFECT_VERSION}`,
188
188
  `@effect/opentelemetry@${EFFECT_VERSION}`
189
189
  ];
@@ -280,16 +280,17 @@ function replaceYamlLine(source, pattern, replacement) {
280
280
  function ensureYamlListItem(source, key, item) {
281
281
  const itemLine = ` - '${item}'`;
282
282
  const headerPattern = new RegExp(`^${key}:\\n(?:(?: - .+\\n)*)`, 'mu');
283
- const existingItemPattern = new RegExp(`^ - '${item.replace(/[.*+?^${}()|[\]\\]/gu, '\\$&')}'$`, 'mu');
284
- if (existingItemPattern.test(source)) return {
285
- source,
286
- changed: false
287
- };
288
283
  const header = source.match(headerPattern);
289
- if (header) return {
290
- source: source.replace(headerPattern, `${header[0]}${itemLine}\n`),
291
- changed: true
292
- };
284
+ if (header) {
285
+ if (header[0].split('\n').includes(itemLine)) return {
286
+ source,
287
+ changed: false
288
+ };
289
+ return {
290
+ source: source.replace(headerPattern, `${header[0]}${itemLine}\n`),
291
+ changed: true
292
+ };
293
+ }
293
294
  const block = `${key}:\n${itemLine}\n`;
294
295
  const afterTrustPolicyIgnore = source.replace(/^(trustPolicyIgnoreAfter: .+\n)/mu, `$1${block}`);
295
296
  if (afterTrustPolicyIgnore !== source) return {
@@ -325,15 +326,20 @@ function updateGeneratedPnpmWorkspacePolicy(workspaceRoot) {
325
326
  source = result.source;
326
327
  changed = result.changed || changed;
327
328
  }
328
- for (const item of strictEffectTrustPolicyExclusions){
329
+ for (const item of strictEffectPackageVersionPolicyExclusions){
329
330
  const packageName = item.slice(0, item.lastIndexOf('@'));
330
331
  const escapedPackageName = packageName.replace(/[.*+?^${}()|[\]\\]/gu, '\\$&');
331
- const currentVersion = replaceYamlLine(source, new RegExp(`^ {2}- '${escapedPackageName}@[^']+'$`, 'mu'), ` - '${item}'`);
332
+ const currentVersion = replaceYamlLine(source, new RegExp(`^ {2}- '${escapedPackageName}@[^']+'$`, 'gmu'), ` - '${item}'`);
332
333
  source = currentVersion.source;
333
334
  changed = currentVersion.changed || changed;
334
- const trustPolicyExclude = ensureYamlListItem(source, 'trustPolicyExclude', item);
335
- source = trustPolicyExclude.source;
336
- changed = trustPolicyExclude.changed || changed;
335
+ for (const policyKey of [
336
+ 'minimumReleaseAgeExclude',
337
+ 'trustPolicyExclude'
338
+ ]){
339
+ const policyExclude = ensureYamlListItem(source, policyKey, item);
340
+ source = policyExclude.source;
341
+ changed = policyExclude.changed || changed;
342
+ }
337
343
  }
338
344
  if (changed) node_fs.writeFileSync(workspaceFile, source, 'utf-8');
339
345
  return changed;
package/package.json CHANGED
@@ -21,7 +21,7 @@
21
21
  "engines": {
22
22
  "node": ">=20"
23
23
  },
24
- "version": "3.5.0-ultramodern.4",
24
+ "version": "3.5.0-ultramodern.5",
25
25
  "types": "./dist/types/index.d.ts",
26
26
  "main": "./dist/esm-node/index.js",
27
27
  "bin": {
@@ -77,7 +77,7 @@
77
77
  "@modern-js/codesmith": "2.6.9",
78
78
  "oxfmt": "0.56.0",
79
79
  "ultracite": "7.8.3",
80
- "@modern-js/i18n-utils": "npm:@bleedingdev/modern-js-i18n-utils@3.5.0-ultramodern.4"
80
+ "@modern-js/i18n-utils": "npm:@bleedingdev/modern-js-i18n-utils@3.5.0-ultramodern.5"
81
81
  },
82
82
  "devDependencies": {
83
83
  "@rslib/core": "0.23.1",
@@ -99,6 +99,6 @@
99
99
  "test": "rm -rf dist && rslib build -c rslibconfig.mts && rstest --passWithNoTests"
100
100
  },
101
101
  "ultramodern": {
102
- "frameworkVersion": "3.5.0-ultramodern.4"
102
+ "frameworkVersion": "3.5.0-ultramodern.5"
103
103
  }
104
104
  }
@@ -169,16 +169,16 @@ in API modules.
169
169
  Generated pnpm overrides pin the framework-compatible Effect cohort. Keep
170
170
  `effect` and `@effect/vitest` aligned with `pnpm-workspace.yaml`; do not add
171
171
  new direct package-level Effect versions unless the whole UltraModern cohort is
172
- upgraded. The generated pnpm trust policy intentionally excludes the matching
173
- `effect` and `@effect/opentelemetry` cohort packages from no-downgrade checks
174
- while Effect's beta publishes move from trusted-publisher metadata to
175
- provenance attestations.
172
+ upgraded. The generated pnpm policy intentionally excludes the matching
173
+ `effect` and `@effect/opentelemetry` cohort versions from the
174
+ minimum-release-age and no-downgrade checks while Effect's beta publishes move
175
+ from trusted-publisher metadata to provenance attestations.
176
176
 
177
177
  For older generated workspaces, run the framework migration command first:
178
178
 
179
179
  ```bash
180
- pnpm dlx @bleedingdev/modern-js-create@3.5.0-ultramodern.4 ultramodern \
181
- migrate-strict-effect --version 3.5.0-ultramodern.4
180
+ pnpm dlx @bleedingdev/modern-js-create@3.5.0-ultramodern.5 ultramodern \
181
+ migrate-strict-effect --version 3.5.0-ultramodern.5
182
182
  pnpm api:check
183
183
  pnpm contract:check
184
184
  ```
@@ -8,6 +8,8 @@ minimumReleaseAgeStrict: true
8
8
  minimumReleaseAgeIgnoreMissingTime: false
9
9
  minimumReleaseAgeExclude:
10
10
  - '@bleedingdev/modern-js-*'
11
+ - 'effect@{{effectVersion}}'
12
+ - '@effect/opentelemetry@{{effectVersion}}'
11
13
  - '@tanstack/react-router'
12
14
  - '@tanstack/router-core'
13
15
  - 'typescript'