@fedify/init 2.5.0-dev.2541 → 2.5.0-dev.2568
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 +13 -6
- package/dist/packages/init/deno.js +1 -1
- package/package.json +1 -1
package/dist/action/configs.js
CHANGED
|
@@ -25,7 +25,7 @@ const logger = getLogger([
|
|
|
25
25
|
* @returns Configuration object with path and Deno-specific settings
|
|
26
26
|
*/
|
|
27
27
|
const loadDenoConfig = (data) => {
|
|
28
|
-
const lintExcludes =
|
|
28
|
+
const lintExcludes = getDenoLintExcludes(data);
|
|
29
29
|
return {
|
|
30
30
|
path: "deno.json",
|
|
31
31
|
data: {
|
|
@@ -35,18 +35,25 @@ const loadDenoConfig = (data) => {
|
|
|
35
35
|
imports: joinDepsReg("deno")(getDependencies(data)),
|
|
36
36
|
lint: {
|
|
37
37
|
plugins: ["jsr:@fedify/lint"],
|
|
38
|
-
|
|
38
|
+
rules: { exclude: lintExcludes }
|
|
39
39
|
},
|
|
40
40
|
...data.testMode && !data.dryRun ? { links: getLinks(data) } : {}
|
|
41
41
|
}
|
|
42
42
|
};
|
|
43
43
|
};
|
|
44
44
|
/**
|
|
45
|
-
* Deno Lint reports every plugin rule as an error, so
|
|
46
|
-
*
|
|
47
|
-
*
|
|
45
|
+
* Deno Lint reports every plugin rule as an error, so advisory rules that the
|
|
46
|
+
* generated scaffold cannot satisfy have to be excluded. The default actor
|
|
47
|
+
* template has no profile page, so `actor-profile-url-required` would
|
|
48
|
+
* otherwise fail `deno lint`. The interactive prompts already label the
|
|
49
|
+
* `denokv` option as deprecated, so the corresponding deprecation rules are
|
|
50
|
+
* excluded when selected.
|
|
48
51
|
*/
|
|
49
|
-
const
|
|
52
|
+
const getDenoLintExcludes = ({ kvStore, messageQueue }) => [
|
|
53
|
+
"fedify-lint/actor-profile-url-required",
|
|
54
|
+
...kvStore === "denokv" ? ["fedify-lint/deno-kv-store-deprecated"] : [],
|
|
55
|
+
...messageQueue === "denokv" ? ["fedify-lint/deno-kv-message-queue-deprecated"] : []
|
|
56
|
+
];
|
|
50
57
|
const getUnstable = ({ kv: { denoUnstable: kv = [] }, mq: { denoUnstable: mq = [] } }) => {
|
|
51
58
|
const unstable = pipe(needsUnstableTemporal() ? ["temporal"] : [], concat(kv), concat(mq), uniq, toArray);
|
|
52
59
|
return isEmpty(unstable) ? {} : { unstable };
|