@fedify/init 2.2.0-dev.700 → 2.2.0-dev.735
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/action/configs.js +10 -4
- package/dist/deno.js +1 -1
- package/package.json +3 -3
package/dist/action/configs.js
CHANGED
|
@@ -8,7 +8,7 @@ import { getLogger } from "@logtape/logtape";
|
|
|
8
8
|
import { realpathSync } from "node:fs";
|
|
9
9
|
import { join, relative } from "node:path";
|
|
10
10
|
import { execFileSync } from "node:child_process";
|
|
11
|
-
import {
|
|
11
|
+
import { concat, filter, head, isArray, isEmpty, isNull, isString, keys, map, pick, pipe, prop, toArray, uniq, unless, when, zip } from "@fxts/core/index.js";
|
|
12
12
|
//#region src/action/configs.ts
|
|
13
13
|
const logger = getLogger([
|
|
14
14
|
"fedify",
|
|
@@ -34,13 +34,19 @@ const loadDenoConfig = (data) => ({
|
|
|
34
34
|
...data.testMode && !data.dryRun ? { links: getLinks(data) } : {}
|
|
35
35
|
}
|
|
36
36
|
});
|
|
37
|
-
const getUnstable = ({ kv: { denoUnstable: kv = [] }, mq: { denoUnstable: mq = [] } }) =>
|
|
37
|
+
const getUnstable = ({ kv: { denoUnstable: kv = [] }, mq: { denoUnstable: mq = [] } }) => {
|
|
38
|
+
const unstable = pipe(needsUnstableTemporal() ? ["temporal"] : [], concat(kv), concat(mq), uniq, toArray);
|
|
39
|
+
return isEmpty(unstable) ? {} : { unstable };
|
|
40
|
+
};
|
|
38
41
|
const TEMPORAL_STABLE_FROM = [
|
|
39
42
|
2,
|
|
40
43
|
7,
|
|
41
44
|
0
|
|
42
45
|
];
|
|
43
|
-
const needsUnstableTemporal = () =>
|
|
46
|
+
const needsUnstableTemporal = () => {
|
|
47
|
+
const version = pipe(getDenoVersionFromRuntime(), when(isNull, getDenoVersionFromCommand), when(isString, parseVersion));
|
|
48
|
+
return isArray(version) ? !isLaterOrEqualThan(TEMPORAL_STABLE_FROM)(version) : false;
|
|
49
|
+
};
|
|
44
50
|
const getDenoVersionFromCommand = () => {
|
|
45
51
|
try {
|
|
46
52
|
return execFileSync("deno", ["--version"], {
|
|
@@ -57,7 +63,7 @@ const getDenoVersionFromCommand = () => {
|
|
|
57
63
|
}
|
|
58
64
|
};
|
|
59
65
|
const getDenoVersionFromRuntime = () => pipe(globalThis, prop("Deno"), prop("version"), prop("deno"));
|
|
60
|
-
const parseVersion = (deno) => pipe(deno.match(/^(\d+)\.(\d+)\.(\d+)/), unless(isNull, (
|
|
66
|
+
const parseVersion = (deno) => pipe(deno.match(/^(\d+)\.(\d+)\.(\d+)/), unless(isNull, ([, ...segments]) => segments.map(Number)));
|
|
61
67
|
const isLaterOrEqualThan = (basis) => (target) => pipe(zip(basis, target), filter(([b, t]) => t !== b), head, (a) => a ? a[0] < a[1] : true);
|
|
62
68
|
const getLinks = ({ kv, mq, initializer, dir }) => pipe({ "@fedify/fedify": "" }, merge(initializer.dependencies), merge(kv.dependencies), merge(mq.dependencies), keys, filter((dep) => dep.includes("@fedify/")), map((dep) => dep.replace("@fedify/", "")), map((dep) => join(getPackagesPath(), dep)), map(realpathSync), map((realAbsolutePath) => relative(realpathSync(dir), realAbsolutePath)), toArray);
|
|
63
69
|
/**
|
package/dist/deno.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fedify/init",
|
|
3
|
-
"version": "2.2.0-dev.
|
|
3
|
+
"version": "2.2.0-dev.735+4c2bace2",
|
|
4
4
|
"description": "Project initializer for Fedify",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"fedify",
|
|
@@ -52,8 +52,8 @@
|
|
|
52
52
|
"@fxts/core": "^1.20.0",
|
|
53
53
|
"@inquirer/prompts": "^7.8.4",
|
|
54
54
|
"@logtape/logtape": "^2.0.5",
|
|
55
|
-
"@optique/core": "^0.
|
|
56
|
-
"@optique/run": "^0.
|
|
55
|
+
"@optique/core": "^1.0.0",
|
|
56
|
+
"@optique/run": "^1.0.0",
|
|
57
57
|
"chalk": "^5.6.2",
|
|
58
58
|
"es-toolkit": "1.43.0",
|
|
59
59
|
"inquirer-toggle": "^1.0.1"
|