@icebreakers/monorepo 0.6.3 → 0.6.4

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.
@@ -13,7 +13,7 @@ import set from "set-value";
13
13
 
14
14
  // package.json
15
15
  var name = "@icebreakers/monorepo";
16
- var version = "0.6.3";
16
+ var version = "0.6.4";
17
17
 
18
18
  // src/logger.ts
19
19
  import { createConsola } from "consola";
package/dist/cli.cjs CHANGED
@@ -32,7 +32,7 @@ var import_commander = require("commander");
32
32
 
33
33
  // package.json
34
34
  var name = "@icebreakers/monorepo";
35
- var version = "0.6.3";
35
+ var version = "0.6.4";
36
36
 
37
37
  // src/lib.ts
38
38
  var import_node_process = __toESM(require("process"), 1);
@@ -376,7 +376,7 @@ async function cleanProjects(cwd3) {
376
376
  // src/monorepo/context.ts
377
377
  var import_pathe5 = __toESM(require("pathe"), 1);
378
378
 
379
- // src/monorepo/utils.ts
379
+ // src/monorepo/workspace.ts
380
380
  var import_workspace = require("@pnpm/workspace.find-packages");
381
381
 
382
382
  // ../../node_modules/.pnpm/defu@6.1.4/node_modules/defu/dist/defu.mjs
@@ -447,15 +447,21 @@ var defuArrayFn = createDefu((object, key, currentValue) => {
447
447
  }
448
448
  });
449
449
 
450
- // src/monorepo/utils.ts
450
+ // src/monorepo/workspace.ts
451
451
  var import_pathe4 = __toESM(require("pathe"), 1);
452
452
  async function getWorkspacePackages(cwd3, options) {
453
453
  const posixCwd = import_pathe4.default.normalize(cwd3);
454
- const { ignoreRootPackage } = defu(options, {
455
- ignoreRootPackage: true
454
+ const { ignoreRootPackage, ignorePrivatePackage } = defu(options, {
455
+ ignoreRootPackage: true,
456
+ ignorePrivatePackage: true
456
457
  });
457
458
  const packages = await (0, import_workspace.findWorkspacePackages)(cwd3);
458
- let pkgs = packages.map((project) => {
459
+ let pkgs = packages.filter((x) => {
460
+ if (ignorePrivatePackage && x.manifest.private) {
461
+ return false;
462
+ }
463
+ return true;
464
+ }).map((project) => {
459
465
  const pkgJsonPath = import_pathe4.default.resolve(project.rootDir, "package.json");
460
466
  return {
461
467
  ...project,
@@ -571,6 +577,7 @@ async function init(cwd3) {
571
577
  var import_execa = require("execa");
572
578
  async function syncNpmMirror(cwd3) {
573
579
  const packages = await getWorkspacePackages(cwd3);
580
+ logger.info("[\u5373\u5C06\u540C\u6B65\u7684\u5305]:", packages.filter((x) => x.manifest.name).map((x) => x.manifest.name));
574
581
  for (const project of packages) {
575
582
  if (project.manifest.name) {
576
583
  await (0, import_execa.execa)({
package/dist/cli.js CHANGED
@@ -5,7 +5,7 @@ import {
5
5
  name,
6
6
  upgradeMonorepo,
7
7
  version
8
- } from "./chunk-36LZD73K.js";
8
+ } from "./chunk-UU4G2QIU.js";
9
9
 
10
10
  // src/program.ts
11
11
  import process from "node:process";
@@ -87,7 +87,7 @@ async function cleanProjects(cwd2) {
87
87
  // src/monorepo/context.ts
88
88
  import path4 from "pathe";
89
89
 
90
- // src/monorepo/utils.ts
90
+ // src/monorepo/workspace.ts
91
91
  import { findWorkspacePackages } from "@pnpm/workspace.find-packages";
92
92
 
93
93
  // ../../node_modules/.pnpm/defu@6.1.4/node_modules/defu/dist/defu.mjs
@@ -158,15 +158,21 @@ var defuArrayFn = createDefu((object, key, currentValue) => {
158
158
  }
159
159
  });
160
160
 
161
- // src/monorepo/utils.ts
161
+ // src/monorepo/workspace.ts
162
162
  import path3 from "pathe";
163
163
  async function getWorkspacePackages(cwd2, options) {
164
164
  const posixCwd = path3.normalize(cwd2);
165
- const { ignoreRootPackage } = defu(options, {
166
- ignoreRootPackage: true
165
+ const { ignoreRootPackage, ignorePrivatePackage } = defu(options, {
166
+ ignoreRootPackage: true,
167
+ ignorePrivatePackage: true
167
168
  });
168
169
  const packages = await findWorkspacePackages(cwd2);
169
- let pkgs = packages.map((project) => {
170
+ let pkgs = packages.filter((x) => {
171
+ if (ignorePrivatePackage && x.manifest.private) {
172
+ return false;
173
+ }
174
+ return true;
175
+ }).map((project) => {
170
176
  const pkgJsonPath = path3.resolve(project.rootDir, "package.json");
171
177
  return {
172
178
  ...project,
@@ -282,6 +288,7 @@ async function init(cwd2) {
282
288
  import { execa } from "execa";
283
289
  async function syncNpmMirror(cwd2) {
284
290
  const packages = await getWorkspacePackages(cwd2);
291
+ logger.info("[\u5373\u5C06\u540C\u6B65\u7684\u5305]:", packages.filter((x) => x.manifest.name).map((x) => x.manifest.name));
285
292
  for (const project of packages) {
286
293
  if (project.manifest.name) {
287
294
  await execa({
package/dist/index.cjs CHANGED
@@ -55,7 +55,7 @@ var import_set_value = __toESM(require("set-value"), 1);
55
55
 
56
56
  // package.json
57
57
  var name = "@icebreakers/monorepo";
58
- var version = "0.6.3";
58
+ var version = "0.6.4";
59
59
 
60
60
  // src/logger.ts
61
61
  var import_consola = require("consola");
package/dist/index.js CHANGED
@@ -2,7 +2,7 @@ import {
2
2
  createNewProject,
3
3
  setPkgJson,
4
4
  upgradeMonorepo
5
- } from "./chunk-36LZD73K.js";
5
+ } from "./chunk-UU4G2QIU.js";
6
6
  export {
7
7
  createNewProject,
8
8
  setPkgJson,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@icebreakers/monorepo",
3
3
  "type": "module",
4
- "version": "0.6.3",
4
+ "version": "0.6.4",
5
5
  "description": "icebreaker's monorepo config generator",
6
6
  "author": "ice breaker <1324318532@qq.com>",
7
7
  "license": "MIT",