paperlint 20.6.2 → 20.7.0
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/.claude-plugin/plugin.json +1 -1
- package/dist/domain/preset-submission-fields.d.ts +15 -0
- package/dist/domain/preset-submission-fields.d.ts.map +1 -0
- package/dist/domain/preset-submission-fields.js +25 -0
- package/dist/domain/preset-submission-fields.js.map +1 -0
- package/dist/domain/venue-scope.d.ts +29 -0
- package/dist/domain/venue-scope.d.ts.map +1 -0
- package/dist/domain/venue-scope.js +18 -0
- package/dist/domain/venue-scope.js.map +1 -0
- package/dist/preset-merge.d.ts +34 -0
- package/dist/preset-merge.d.ts.map +1 -0
- package/dist/preset-merge.js +89 -0
- package/dist/preset-merge.js.map +1 -0
- package/dist/presets.d.ts +3 -2
- package/dist/presets.d.ts.map +1 -1
- package/dist/presets.js +3 -84
- package/dist/presets.js.map +1 -1
- package/dist/tex-requirements.d.ts +4 -1
- package/dist/tex-requirements.d.ts.map +1 -1
- package/dist/tex-requirements.js +3 -20
- package/dist/tex-requirements.js.map +1 -1
- package/docs/venues.md +6 -4
- package/package.json +1 -1
- package/presets/acl-latex.md +1 -1
- package/presets/langcode-2027.jsonc +106 -0
- package/presets/langcode-2027.md +79 -0
- package/presets/naacl-2027.jsonc +19 -0
- package/presets/naacl-2027.md +42 -0
- package/presets/venue-profile.schema.json +22 -1
- package/scripts/eslint-file-length.mjs +4 -4
- package/src/domain/preset-submission-fields.ts +49 -0
- package/src/domain/venue-scope.test.ts +33 -0
- package/src/domain/venue-scope.ts +39 -0
- package/src/paper-settings-commands.test.ts +1 -1
- package/src/preset-card-rule.test.ts +2 -0
- package/src/preset-merge.ts +141 -0
- package/src/presets-scope.test.ts +177 -0
- package/src/presets.test.ts +17 -56
- package/src/presets.ts +5 -130
- package/src/tex-requirements.ts +14 -45
- package/src/tex-venue-rules.test.ts +3 -25
- package/src/venue-rules.test.ts +2 -2
package/src/tex-requirements.ts
CHANGED
|
@@ -34,16 +34,18 @@ import {
|
|
|
34
34
|
type VenueTalk,
|
|
35
35
|
type VenueTalkJson,
|
|
36
36
|
} from "./domain/talk.ts";
|
|
37
|
+
import {
|
|
38
|
+
submissionFieldsOf,
|
|
39
|
+
type SubmissionFieldsJson,
|
|
40
|
+
} from "./domain/preset-submission-fields.ts";
|
|
41
|
+
import {
|
|
42
|
+
scopeOf,
|
|
43
|
+
type VenueScope,
|
|
44
|
+
type VenueScopeJson,
|
|
45
|
+
} from "./domain/venue-scope.ts";
|
|
37
46
|
import type { VenuePortal } from "./domain/submission.ts";
|
|
38
47
|
import type { Reading } from "./domain/deadline.ts";
|
|
39
|
-
import {
|
|
40
|
-
RESERVED_FIELD_KEYS,
|
|
41
|
-
reservedKey,
|
|
42
|
-
declareField,
|
|
43
|
-
type FieldDeclaration,
|
|
44
|
-
type FieldJson,
|
|
45
|
-
type VenueFields,
|
|
46
|
-
} from "./domain/submission-fields.ts";
|
|
48
|
+
import type { VenueFields } from "./domain/submission-fields.ts";
|
|
47
49
|
|
|
48
50
|
/** CTAN package name → the names that prove it is installed. */
|
|
49
51
|
export type PackageProofs = Readonly<Record<string, readonly string[]>>;
|
|
@@ -231,6 +233,8 @@ export interface PresetFile {
|
|
|
231
233
|
readonly registerAnchors: readonly RegisterAnchor[] | null;
|
|
232
234
|
/** What the venue asks a presenter to send; null when the file has no `talk` block. */
|
|
233
235
|
readonly talk: VenueTalk | null;
|
|
236
|
+
/** What the call says the venue is for, verbatim; null when the file records none. */
|
|
237
|
+
readonly scope: VenueScope | null;
|
|
234
238
|
/** Where the venue takes submissions (`paperlint submission`); null when the file does not say. */
|
|
235
239
|
readonly portal: VenuePortal | null;
|
|
236
240
|
/** The edition's deadlines as they were read; null when the file names none (a child's list replaces its parent's). */
|
|
@@ -315,43 +319,7 @@ interface PresetBodyJson {
|
|
|
315
319
|
readonly portal?: VenuePortal;
|
|
316
320
|
readonly deadlines?: readonly Reading[];
|
|
317
321
|
readonly submission_fields?: SubmissionFieldsJson;
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
/** A preset's `submission_fields` after the schema accepted it. */
|
|
321
|
-
interface SubmissionFieldsJson {
|
|
322
|
-
readonly source: VenueFields["source"];
|
|
323
|
-
readonly url: string;
|
|
324
|
-
readonly read: string;
|
|
325
|
-
readonly fields: Readonly<Record<string, FieldJson>>;
|
|
326
|
-
}
|
|
327
|
-
|
|
328
|
-
/** A preset's `submission_fields`, or null when it records none; a reserved field name, or a field that contradicts its kind, is refused. */
|
|
329
|
-
function submissionFieldsOf(
|
|
330
|
-
j: SubmissionFieldsJson | undefined,
|
|
331
|
-
file: string,
|
|
332
|
-
): VenueFields | null {
|
|
333
|
-
if (j === undefined) return null;
|
|
334
|
-
const reserved = reservedKey(Object.keys(j.fields));
|
|
335
|
-
if (reserved !== null)
|
|
336
|
-
throw new Error(
|
|
337
|
-
`${file}: "submission_fields" names "${reserved}", which paperlint sends itself (${RESERVED_FIELD_KEYS.join(", ")}) — a field of that name would overwrite it`,
|
|
338
|
-
);
|
|
339
|
-
const declared = Object.entries(j.fields).map(
|
|
340
|
-
([key, f]) => [key, declareField(f)] as const,
|
|
341
|
-
);
|
|
342
|
-
const fields: readonly (readonly [string, FieldDeclaration])[] =
|
|
343
|
-
declared.flatMap(([key, d]) => (d.ok ? [[key, d.value] as const] : []));
|
|
344
|
-
const errors = declared.flatMap(([key, d]) =>
|
|
345
|
-
d.ok ? [] : [`field "${key}": ${d.error}`],
|
|
346
|
-
);
|
|
347
|
-
if (errors.length > 0)
|
|
348
|
-
throw new Error(`${file}: "submission_fields" ${errors.join("; ")}`);
|
|
349
|
-
return {
|
|
350
|
-
source: j.source,
|
|
351
|
-
url: j.url,
|
|
352
|
-
read: j.read,
|
|
353
|
-
fields: Object.fromEntries(fields),
|
|
354
|
-
};
|
|
322
|
+
readonly scope?: VenueScopeJson;
|
|
355
323
|
}
|
|
356
324
|
|
|
357
325
|
/** An optional field as the typed preset holds it: absent is null. */
|
|
@@ -565,6 +533,7 @@ export function parsePreset(
|
|
|
565
533
|
rules: j.rules ?? {},
|
|
566
534
|
registerAnchors: anchorsOf(j.register),
|
|
567
535
|
talk: j.talk === undefined ? null : venueTalkOf(j.talk),
|
|
536
|
+
scope: scopeOf(j.scope),
|
|
568
537
|
...portalBlocks(j, file),
|
|
569
538
|
};
|
|
570
539
|
}
|
|
@@ -19,6 +19,7 @@ import { resolvePreset } from "./presets.ts";
|
|
|
19
19
|
import { buildConfig, SHIPPED_RULES } from "./cli.ts";
|
|
20
20
|
import { builtPaper } from "../test/recorded-fixture.ts";
|
|
21
21
|
import { venuePreset } from "../test/support.ts";
|
|
22
|
+
import { shippedVenuesExcept } from "../test/shipped-venues.ts";
|
|
22
23
|
import {
|
|
23
24
|
lint,
|
|
24
25
|
PAPER,
|
|
@@ -1433,32 +1434,9 @@ describe("otherVenues", () => {
|
|
|
1433
1434
|
const aidc = resolvePreset("paperlint:aidc-2026", from, deps);
|
|
1434
1435
|
expect(aidc.ok).toBe(true);
|
|
1435
1436
|
if (!aidc.ok) return;
|
|
1437
|
+
// aidc's own chain (AIDC over ieee-conference) and REALM, which does not resolve here, are left out.
|
|
1436
1438
|
expect(otherVenues(aidc.value, deps).map((o) => [o.label, o.year])).toEqual(
|
|
1437
|
-
|
|
1438
|
-
["AAAI", 2027],
|
|
1439
|
-
["aaai-press", null],
|
|
1440
|
-
["acl-latex", null],
|
|
1441
|
-
["acm-acmsmall", null],
|
|
1442
|
-
["acm-sigconf", null],
|
|
1443
|
-
["ACSAC", 2026],
|
|
1444
|
-
["AGENT", 2027],
|
|
1445
|
-
["AgenticDev", 2026],
|
|
1446
|
-
["AGENTVERIFY", 2027],
|
|
1447
|
-
["AISec", 2026],
|
|
1448
|
-
["ASE", 2026],
|
|
1449
|
-
["ACM CCS", 2026],
|
|
1450
|
-
["EMNLP", 2026],
|
|
1451
|
-
["FSE", 2027],
|
|
1452
|
-
["ICML", 2027],
|
|
1453
|
-
["icml-style", null],
|
|
1454
|
-
["ICSE", 2027],
|
|
1455
|
-
["ICSE", 2028],
|
|
1456
|
-
["MSR", 2027],
|
|
1457
|
-
["NeurIPS", 2026],
|
|
1458
|
-
["neurips-style", null],
|
|
1459
|
-
["NLBSE", 2027],
|
|
1460
|
-
["IEEE S&P", 2027],
|
|
1461
|
-
],
|
|
1439
|
+
shippedVenuesExcept("AIDC", "ieee-conference", "REALM"),
|
|
1462
1440
|
);
|
|
1463
1441
|
});
|
|
1464
1442
|
});
|
package/src/venue-rules.test.ts
CHANGED
|
@@ -271,13 +271,13 @@ describe("pdf/profile — the declaration must resolve, or nothing is judged", (
|
|
|
271
271
|
"an unknown venue (a typo would silently disable every check)",
|
|
272
272
|
{ extends: "paperlint:agentic-dev", kind: "short" },
|
|
273
273
|
"preset",
|
|
274
|
-
/acsac-2026, agent-2027, agenticdev-2026, agentverify-2027, aidc-2026, aisec-2026, ase-2026, ccs-2026, emnlp-2026, fse-2027, icml-2027, icml-style, icse-2027, icse-2028, ieee-conference, msr-2027, neurips-2026, neurips-style, nlbse-2027, realm-2026, sp-2027/,
|
|
274
|
+
/acsac-2026, agent-2027, agenticdev-2026, agentverify-2027, aidc-2026, aisec-2026, ase-2026, ccs-2026, emnlp-2026, fse-2027, icml-2027, icml-style, icse-2027, icse-2028, ieee-conference, langcode-2027, msr-2027, naacl-2027, neurips-2026, neurips-style, nlbse-2027, realm-2026, sp-2027/,
|
|
275
275
|
],
|
|
276
276
|
[
|
|
277
277
|
"the base TeX set is not a venue",
|
|
278
278
|
{ extends: "paperlint:tex-base" },
|
|
279
279
|
"preset",
|
|
280
|
-
/acsac-2026, agent-2027, agenticdev-2026, agentverify-2027, aidc-2026, aisec-2026, ase-2026, ccs-2026, emnlp-2026, fse-2027, icml-2027, icml-style, icse-2027, icse-2028, ieee-conference, msr-2027, neurips-2026, neurips-style, nlbse-2027, realm-2026, sp-2027/,
|
|
280
|
+
/acsac-2026, agent-2027, agenticdev-2026, agentverify-2027, aidc-2026, aisec-2026, ase-2026, ccs-2026, emnlp-2026, fse-2027, icml-2027, icml-style, icse-2027, icse-2028, ieee-conference, langcode-2027, msr-2027, naacl-2027, neurips-2026, neurips-style, nlbse-2027, realm-2026, sp-2027/,
|
|
281
281
|
],
|
|
282
282
|
[
|
|
283
283
|
"paperlint.json that is not JSON",
|