@tegami/dart 1.2.3 → 1.2.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.
Files changed (2) hide show
  1. package/dist/index.js +8 -5
  2. package/package.json +4 -4
package/dist/index.js CHANGED
@@ -410,7 +410,6 @@ function dart({ updateLockFile = true, bumpDep: getBumpDepType } = {}) {
410
410
  let active = false;
411
411
  return {
412
412
  name: "dart",
413
- enforce: "post",
414
413
  async resolve() {
415
414
  const packages = await discoverDartPackages(this.cwd);
416
415
  for (const pkg of packages) this.graph.add(pkg);
@@ -507,10 +506,9 @@ function depsPolicy({ graph }, getBumpDepType = ({ kind }) => {
507
506
  if (!(pkg instanceof DartPackage)) return;
508
507
  const deps = dependentMap.get(pkg.id);
509
508
  if (!deps) return;
510
- const group = graph.getPackageGroup(pkg.id);
511
509
  if (!plan.bumpVersion(pkg)) return;
512
510
  for (const dep of deps) {
513
- if (group?.options.syncBump && graph.getPackageGroup(dep.dependent.id) === group) continue;
511
+ if (pkg.group?.options.syncBump && dep.dependent.group === pkg.group) continue;
514
512
  const bumpType = getBumpDepType(dep);
515
513
  if (bumpType === false) continue;
516
514
  this.bumpPackage(dep.dependent, {
@@ -578,12 +576,17 @@ function satisfiesDartRange(version, range) {
578
576
  });
579
577
  }
580
578
  async function discoverDartPackages(cwd) {
579
+ const out = [];
581
580
  const root = await readPubspec(cwd);
582
- if (!root?.data.workspace?.length) return [];
581
+ if (!root?.data.workspace?.length) return out;
583
582
  const files = /* @__PURE__ */ new Map();
584
583
  files.set(root.path, root);
585
584
  await collectWorkspaceFiles(root, files);
586
- return Array.from(files.values()).filter((file) => Boolean(file.data.name)).map((file) => new DartPackage(path.dirname(file.path), file));
585
+ for (const file of files.values()) {
586
+ if (!file.data.name) continue;
587
+ out.push(new DartPackage(path.dirname(file.path), file));
588
+ }
589
+ return out;
587
590
  }
588
591
  async function collectWorkspaceFiles(root, files) {
589
592
  const rootDir = path.dirname(root.path);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tegami/dart",
3
- "version": "1.2.3",
3
+ "version": "1.2.4",
4
4
  "description": "Dart pub workspace support and pub.dev publishing for Tegami",
5
5
  "license": "MIT",
6
6
  "author": "Fuma Nama",
@@ -31,11 +31,11 @@
31
31
  "tsdown": "^0.22.3",
32
32
  "typescript": "6.0.3",
33
33
  "typia": "^12.1.1",
34
- "@repo/typescript-config": "0.0.0",
35
- "tegami": "1.2.3"
34
+ "tegami": "1.2.4",
35
+ "@repo/typescript-config": "0.0.0"
36
36
  },
37
37
  "peerDependencies": {
38
- "tegami": "1.2.3"
38
+ "tegami": "1.2.4"
39
39
  },
40
40
  "inlinedDependencies": {
41
41
  "typia": "12.1.1"