@icebreakers/monorepo-templates 1.2.0 → 1.2.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.
@@ -49,12 +49,14 @@ jobs:
49
49
  runs-on: ubuntu-latest
50
50
  steps:
51
51
  - name: Checkout Repo
52
- uses: actions/checkout@v7
52
+ uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
53
+ with:
54
+ fetch-depth: 0
53
55
 
54
- - uses: pnpm/action-setup@v6
56
+ - uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
55
57
 
56
58
  - name: Setup Node.js environment
57
- uses: actions/setup-node@v7
59
+ uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
58
60
  with:
59
61
  node-version: 24
60
62
  cache: pnpm
@@ -2,20 +2,13 @@ packages:
2
2
  - apps/*
3
3
  - packages/*
4
4
  - templates/*
5
- - '!**/test/**'
6
-
5
+ - "!**/test/**"
7
6
  minimumReleaseAge: 0
8
-
9
7
  versioning:
10
- fixed:
11
- - ['@icebreakers/monorepo', repoctl]
12
- ignore:
13
- - '@icebreakers/client'
14
8
  changelog:
15
9
  storage: repository
16
-
17
10
  allowBuilds:
18
- '@tailwindcss/oxide': true
11
+ "@tailwindcss/oxide": true
19
12
  esbuild: true
20
13
  msgpackr-extract: true
21
14
  sharp: true
package/dist/cli.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { t as prepareAssets } from "./prepare-CNCmvco-.mjs";
1
+ import { t as prepareAssets } from "./prepare--cxFop8c.mjs";
2
2
  import process from "node:process";
3
3
  //#region src/cli.ts
4
4
  async function main() {
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { a as toPublishGitignorePath, c as assetsDir, d as templatesDir, f as assetTargets$1, i as isGitignoreFile, l as packageDir, n as createTemplateCopyFilter, o as toWorkspaceGitignorePath, p as getAssetTargets$1, r as shouldSkipTemplatePath, s as templateChoices$1, t as prepareAssets, u as skeletonDir } from "./prepare-CNCmvco-.mjs";
1
+ import { a as toPublishGitignorePath, c as assetsDir, d as templatesDir, f as assetTargets$1, i as isGitignoreFile, l as packageDir, n as createTemplateCopyFilter, o as toWorkspaceGitignorePath, p as getAssetTargets$1, r as shouldSkipTemplatePath, s as templateChoices$1, t as prepareAssets, u as skeletonDir } from "./prepare--cxFop8c.mjs";
2
2
  import path from "node:path";
3
3
  import fs, { access, open, rm } from "node:fs/promises";
4
4
  import exec from "nanoexec";
@@ -2,6 +2,7 @@ import * as path$1 from "node:path";
2
2
  import path from "node:path";
3
3
  import { fileURLToPath } from "node:url";
4
4
  import fs from "node:fs/promises";
5
+ import YAML from "yaml";
5
6
  //#region assets-data.mjs
6
7
  const coreAssetTargets = [
7
8
  ".changeset",
@@ -201,6 +202,14 @@ const sourceRepoReleaseToolingBuildStepPattern = /\r?\n\s+- name: Build Release
201
202
  function removeSourceRepoReleaseToolingBuildStepContent(content) {
202
203
  return content.replaceAll(sourceRepoReleaseToolingBuildStepPattern, "\n");
203
204
  }
205
+ function sanitizePublishedWorkspaceContent(content) {
206
+ const workspace = YAML.parse(content);
207
+ if (!workspace?.versioning || typeof workspace.versioning !== "object") return content;
208
+ delete workspace.versioning["fixed"];
209
+ delete workspace.versioning["ignore"];
210
+ delete workspace.versioning["lanes"];
211
+ return YAML.stringify(workspace);
212
+ }
204
213
  async function pathExists(targetPath) {
205
214
  try {
206
215
  await fs.access(targetPath);
@@ -286,6 +295,15 @@ async function writePublishedToolingConfigs() {
286
295
  if (await pathExists(targetPath)) await fs.writeFile(targetPath, content);
287
296
  }));
288
297
  }
298
+ async function sanitizePublishedWorkspace() {
299
+ const workspacePath = path$1.join(assetsDir, "pnpm-workspace.yaml");
300
+ if (!await pathExists(workspacePath)) return;
301
+ const content = await fs.readFile(workspacePath, "utf8");
302
+ await fs.writeFile(workspacePath, sanitizePublishedWorkspaceContent(content), "utf8");
303
+ }
304
+ async function removePublishedReleaseState() {
305
+ await fs.rm(path$1.join(assetsDir, ".changeset", "ledger.yaml"), { force: true });
306
+ }
289
307
  async function removeSourceRepoReleaseToolingBuildStep() {
290
308
  const releaseWorkflowPath = path$1.join(assetsDir, ".github/workflows/release.yml");
291
309
  if (!await pathExists(releaseWorkflowPath)) return;
@@ -310,6 +328,8 @@ async function prepareAssets(options = {}) {
310
328
  await resetDir(assetsDir, overwriteExisting);
311
329
  await resetDir(templatesDir, overwriteExisting);
312
330
  await copyAssets(repoRoot, overwriteExisting);
331
+ await sanitizePublishedWorkspace();
332
+ await removePublishedReleaseState();
313
333
  await writePublishedToolingConfigs();
314
334
  await removeSourceRepoReleaseToolingBuildStep();
315
335
  await copyTemplates(repoRoot, overwriteExisting);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@icebreakers/monorepo-templates",
3
3
  "type": "module",
4
- "version": "1.2.0",
4
+ "version": "1.2.1",
5
5
  "description": "Built-in project templates and managed workspace assets for repoctl",
6
6
  "author": "ice breaker <hi@sonofmagic.top>",
7
7
  "license": "MIT",
@@ -49,7 +49,8 @@
49
49
  "@inquirer/input": "^5.1.2",
50
50
  "@inquirer/select": "^5.2.1",
51
51
  "commander": "^15.0.0",
52
- "nanoexec": "^1.1.0"
52
+ "nanoexec": "^1.1.0",
53
+ "yaml": "^2.9.0"
53
54
  },
54
55
  "publishConfig": {
55
56
  "access": "public"
@@ -57,6 +58,7 @@
57
58
  "scripts": {
58
59
  "dev": "tsdown --watch --sourcemap",
59
60
  "build": "tsdown",
61
+ "test": "vitest run",
60
62
  "typecheck": "node ../../node_modules/typescript/bin/tsc -p tsconfig.json",
61
63
  "tsd": "pnpm build && tsd --files test-d/**/*.test-d.ts",
62
64
  "sync:assets": "pnpm run build && node dist/cli.mjs",
@@ -1,51 +0,0 @@
1
- "@icebreakers/monorepo-templates@1.1.0":
2
- dir: packages/monorepo-templates
3
- intents:
4
- - pnpm-native-versioning
5
- - release-ci-token
6
- - repoctl-release-orchestration
7
- - vitest-native-config
8
- "@icebreakers/monorepo-templates@1.2.0":
9
- dir: packages/monorepo-templates
10
- intents:
11
- - repoctl-brand-and-i18n
12
- "@icebreakers/monorepo@5.1.0":
13
- dir: packages/monorepo
14
- intents:
15
- - close-legacy-release-pr
16
- - human-readable-release-notes
17
- - pnpm-native-versioning
18
- - publish-versioned-packages
19
- - release-ci-token
20
- - release-links
21
- - release-npm-links
22
- - release-npm-links-prepublish
23
- - release-pr-body
24
- - release-pr-layout
25
- - release-test-isolation
26
- - repoctl-release-orchestration
27
- "@icebreakers/monorepo@5.1.1":
28
- dir: packages/monorepo
29
- intents:
30
- - release-publish-summary
31
- - repair-release-notes
32
- "@icebreakers/monorepo@5.2.0":
33
- dir: packages/monorepo
34
- intents:
35
- - repoctl-brand-and-i18n
36
- create-icebreaker@1.1.0:
37
- dir: packages/create-icebreaker
38
- intents:
39
- - pnpm-native-versioning
40
- create-icebreaker@1.1.1:
41
- dir: packages/create-icebreaker
42
- intents:
43
- - repoctl-brand-and-i18n
44
- create-repoctl@0.1.0:
45
- dir: packages/create-repoctl
46
- intents:
47
- - repoctl-brand-and-i18n
48
- repoctl@5.2.0:
49
- dir: packages/repoctl
50
- intents:
51
- - repoctl-brand-and-i18n