@tegami/dart 1.2.3 → 1.2.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/dist/index.d.ts +1 -5
- package/dist/index.js +11 -8
- package/package.json +5 -5
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Document } from "yaml";
|
|
2
2
|
import { BumpType, TegamiPlugin, WorkspacePackage } from "tegami";
|
|
3
|
-
|
|
4
3
|
//#region src/schema.d.ts
|
|
5
4
|
type DartDependency = string | {
|
|
6
5
|
version?: string;
|
|
@@ -62,10 +61,7 @@ interface DartPluginOptions {
|
|
|
62
61
|
*/
|
|
63
62
|
bumpDep?: (opts: DependentRef) => BumpType | false;
|
|
64
63
|
}
|
|
65
|
-
declare function dart({
|
|
66
|
-
updateLockFile,
|
|
67
|
-
bumpDep: getBumpDepType
|
|
68
|
-
}?: DartPluginOptions): TegamiPlugin;
|
|
64
|
+
declare function dart({ updateLockFile, bumpDep: getBumpDepType }?: DartPluginOptions): TegamiPlugin;
|
|
69
65
|
declare function updateConstraintRange(range: string, version: string): string;
|
|
70
66
|
declare function isPackagePublished(name: string, version: string, hostedUrl: string): Promise<boolean>;
|
|
71
67
|
//#endregion
|
package/dist/index.js
CHANGED
|
@@ -6,7 +6,7 @@ import { x } from "tinyexec";
|
|
|
6
6
|
import { parseDocument } from "yaml";
|
|
7
7
|
import { WorkspacePackage } from "tegami";
|
|
8
8
|
import { execFailure, fetchFailure, isCI, joinPath } from "tegami/utils";
|
|
9
|
-
//#region ../../node_modules/.pnpm/typia@12.1.1_@types+node@26.1.
|
|
9
|
+
//#region ../../node_modules/.pnpm/typia@12.1.1_@types+node@26.1.1_typescript@6.0.3/node_modules/typia/lib/TypeGuardError.mjs
|
|
10
10
|
/**
|
|
11
11
|
* Error thrown when type assertion fails.
|
|
12
12
|
*
|
|
@@ -89,14 +89,14 @@ var TypeGuardError = class extends Error {
|
|
|
89
89
|
}
|
|
90
90
|
};
|
|
91
91
|
//#endregion
|
|
92
|
-
//#region ../../node_modules/.pnpm/typia@12.1.1_@types+node@26.1.
|
|
92
|
+
//#region ../../node_modules/.pnpm/typia@12.1.1_@types+node@26.1.1_typescript@6.0.3/node_modules/typia/lib/internal/_assertGuard.mjs
|
|
93
93
|
const _assertGuard = (exceptionable, props, factory) => {
|
|
94
94
|
if (exceptionable === true) if (factory) throw factory(props);
|
|
95
95
|
else throw new TypeGuardError(props);
|
|
96
96
|
return false;
|
|
97
97
|
};
|
|
98
98
|
//#endregion
|
|
99
|
-
//#region ../../node_modules/.pnpm/typia@12.1.1_@types+node@26.1.
|
|
99
|
+
//#region ../../node_modules/.pnpm/typia@12.1.1_@types+node@26.1.1_typescript@6.0.3/node_modules/typia/lib/internal/_accessExpressionAsString.mjs
|
|
100
100
|
const _accessExpressionAsString = (str) => variable(str) ? `.${str}` : `[${JSON.stringify(str)}]`;
|
|
101
101
|
const variable = (str) => reserved(str) === false && /^[a-zA-Z_$][a-zA-Z_$0-9]*$/g.test(str);
|
|
102
102
|
const reserved = (str) => RESERVED.has(str);
|
|
@@ -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 &&
|
|
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
|
-
|
|
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
|
+
"version": "1.2.5",
|
|
4
4
|
"description": "Dart pub workspace support and pub.dev publishing for Tegami",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Fuma Nama",
|
|
@@ -26,16 +26,16 @@
|
|
|
26
26
|
"yaml": "^2.9.0"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@types/node": "^26.1.
|
|
29
|
+
"@types/node": "^26.1.1",
|
|
30
30
|
"@types/semver": "^7.7.1",
|
|
31
|
-
"tsdown": "^0.22.
|
|
31
|
+
"tsdown": "^0.22.4",
|
|
32
32
|
"typescript": "6.0.3",
|
|
33
33
|
"typia": "^12.1.1",
|
|
34
34
|
"@repo/typescript-config": "0.0.0",
|
|
35
|
-
"tegami": "1.2.
|
|
35
|
+
"tegami": "1.2.5"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
38
|
-
"tegami": "1.2.
|
|
38
|
+
"tegami": "^1.2.0"
|
|
39
39
|
},
|
|
40
40
|
"inlinedDependencies": {
|
|
41
41
|
"typia": "12.1.1"
|