@intentius/chant-lexicon-forgejo 0.51.0 → 0.52.1

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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "algorithm": "sha256",
3
3
  "artifacts": {
4
- "manifest.json": "580bdb583efe7df3b7846037b93c278303f8319221d7d2a585cecaeca51e86dc",
4
+ "manifest.json": "a20b17dcc0a12c37d6d823ff86848de5ff56cd9eaa8cce18287f634cdad9c85a",
5
5
  "meta.json": "44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a",
6
6
  "types/index.d.ts": "66204549b2a864ab5489e3f02c1878e73ab4b3c9d938cfb480b66f71543a43de",
7
7
  "rules/delegate-to-github.ts": "1060cda40f4b73d6cca3ba3fa13b80b4886147d4034c88584c2d80c5510dbe5e",
@@ -9,5 +9,5 @@
9
9
  "rules/wfj011.ts": "fcb8bf6685d744af20ad804ce929488257995c74b9a3353b2eacae3768d1c83e",
10
10
  "skills/chant-forgejo.md": "a1a560429db736c187e0b34cf8dd9efc6ad771afefcbf6f802d160d3d5274257"
11
11
  },
12
- "composite": "0e6aded4e697386765a9ada084e81b7d5f5d7fd5c643eea1672b4ba64fdb465b"
12
+ "composite": "426e7088620d50b36b568d39d7cb46a0d1e3c3c018ecb531a2f4c7735b3eea98"
13
13
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "forgejo",
3
- "version": "0.51.0",
3
+ "version": "0.52.1",
4
4
  "chantVersion": ">=0.1.0",
5
5
  "namespace": "Forgejo",
6
6
  "intrinsics": [],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intentius/chant-lexicon-forgejo",
3
- "version": "0.51.0",
3
+ "version": "0.52.1",
4
4
  "description": "Forgejo / Codeberg / Gitea Actions lexicon for chant — a thin GitHub Actions dialect",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://intentius.io/chant",
@@ -54,8 +54,8 @@
54
54
  },
55
55
  "peerDependencies": {
56
56
  "zod": "^4.3.6",
57
- "@intentius/chant": "^0.51.0",
58
- "@intentius/chant-lexicon-github": "^0.51.0"
57
+ "@intentius/chant": "^0.52.1",
58
+ "@intentius/chant-lexicon-github": "^0.52.1"
59
59
  },
60
60
  "scripts": {
61
61
  "generate": "tsx src/codegen/generate-cli.ts",
@@ -1,5 +1,5 @@
1
1
  import { describe, test, expect } from "vitest";
2
- import { Workflow, Job, Step, Checkout, SetupNode } from "@intentius/chant-lexicon-github";
2
+ import { Workflow, Job, Step, Checkout, SetupNode, PrPlanReport } from "@intentius/chant-lexicon-github";
3
3
  import type { Declarable } from "@intentius/chant/declarable";
4
4
  import type { SerializerResult } from "@intentius/chant/serializer";
5
5
  import { forgejoSerializer } from "./serializer";
@@ -122,3 +122,34 @@ describe("forgejoSerializer — multi-workflow output", () => {
122
122
  expect(Object.keys(result.files ?? {})).toContain("release.yml");
123
123
  });
124
124
  });
125
+
126
+ // #1983 — the github lexicon's `PrPlanReport` composite reaches forgejo purely
127
+ // through the re-export (`src/index.ts`'s `export * from
128
+ // "@intentius/chant-lexicon-github"`); nothing forgejo-specific is written for
129
+ // it. This is the functional check that inheritance actually holds, not just
130
+ // that the type is importable: the dialect still drops the job's
131
+ // `permissions` and remaps its runner label, while the sticky-comment step —
132
+ // a plain `gh api` script with no `uses:` at all — passes through untouched,
133
+ // since Forgejo's API accepts the same calls against its GitHub-compatible
134
+ // surface.
135
+ describe("forgejoSerializer — inherits PrPlanReport from github (#1983)", () => {
136
+ test("dialect still applies to a github-lexicon composite's job", () => {
137
+ const workflow = new Workflow({
138
+ name: "pr-plan",
139
+ on: { pull_request: { types: ["opened", "synchronize"] } },
140
+ }) as unknown as Declarable;
141
+ const { job } = PrPlanReport({ environment: "prod" });
142
+ const out = forgejoSerializer.serialize(
143
+ new Map<string, Declarable>([["workflow", workflow], ["plan", job as unknown as Declarable]]),
144
+ );
145
+ const result = asResult(out);
146
+ expect(result.primary).toContain("runs-on: docker");
147
+ expect(result.primary).not.toContain("ubuntu-latest");
148
+ // The job carries `permissions` — dropped by the dialect, warned once.
149
+ expect(result.primary).not.toContain("permissions:");
150
+ expect((result.warnings ?? []).filter((w) => w.includes("permissions"))).toHaveLength(1);
151
+ // The sticky-comment mechanism is a raw script, nothing to remap or drop.
152
+ expect(result.primary).toContain("Post or update PR comment");
153
+ expect(result.primary).toContain("gh api");
154
+ });
155
+ });