paperlint 10.4.1 → 11.0.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/.github/workflows/deadlines.yml +27 -7
- package/README.md +16 -15
- package/dist/adapters/hotcrp/index.d.ts +6 -4
- package/dist/adapters/hotcrp/index.d.ts.map +1 -1
- package/dist/adapters/hotcrp/index.js +6 -4
- package/dist/adapters/hotcrp/index.js.map +1 -1
- package/dist/adapters/hotcrp/portal.io.d.ts +3 -1
- package/dist/adapters/hotcrp/portal.io.d.ts.map +1 -1
- package/dist/adapters/hotcrp/portal.io.js +36 -11
- package/dist/adapters/hotcrp/portal.io.js.map +1 -1
- package/dist/adapters/hotcrp/response.d.ts +6 -1
- package/dist/adapters/hotcrp/response.d.ts.map +1 -1
- package/dist/adapters/hotcrp/response.js +17 -0
- package/dist/adapters/hotcrp/response.js.map +1 -1
- package/dist/adapters/hotcrp/site.d.ts +9 -0
- package/dist/adapters/hotcrp/site.d.ts.map +1 -0
- package/dist/adapters/hotcrp/site.js +22 -0
- package/dist/adapters/hotcrp/site.js.map +1 -0
- package/dist/adapters/hotcrp/token.d.ts +13 -0
- package/dist/adapters/hotcrp/token.d.ts.map +1 -0
- package/dist/adapters/hotcrp/token.js +48 -0
- package/dist/adapters/hotcrp/token.js.map +1 -0
- package/dist/adapters/latex/abstract.d.ts +22 -0
- package/dist/adapters/latex/abstract.d.ts.map +1 -0
- package/dist/adapters/latex/abstract.js +187 -0
- package/dist/adapters/latex/abstract.js.map +1 -0
- package/dist/adapters/latex/headings.d.ts +6 -0
- package/dist/adapters/latex/headings.d.ts.map +1 -1
- package/dist/adapters/latex/headings.js +5 -4
- package/dist/adapters/latex/headings.js.map +1 -1
- package/dist/adapters/latex/index.d.ts.map +1 -1
- package/dist/adapters/latex/index.js +2 -0
- package/dist/adapters/latex/index.js.map +1 -1
- package/dist/adapters/latex/parse.d.ts +15 -0
- package/dist/adapters/latex/parse.d.ts.map +1 -1
- package/dist/adapters/latex/parse.js +58 -1
- package/dist/adapters/latex/parse.js.map +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +20 -8
- package/dist/cli.js.map +1 -1
- package/dist/cycle-rules.d.ts.map +1 -1
- package/dist/cycle-rules.js +3 -4
- package/dist/cycle-rules.js.map +1 -1
- package/dist/domain/deadline.d.ts +8 -1
- package/dist/domain/deadline.d.ts.map +1 -1
- package/dist/domain/deadline.js +26 -12
- package/dist/domain/deadline.js.map +1 -1
- package/dist/domain/portal-token.d.ts +44 -0
- package/dist/domain/portal-token.d.ts.map +1 -0
- package/dist/domain/portal-token.js +32 -0
- package/dist/domain/portal-token.js.map +1 -0
- package/dist/domain/submission.d.ts +30 -0
- package/dist/domain/submission.d.ts.map +1 -1
- package/dist/domain/submission.js +68 -0
- package/dist/domain/submission.js.map +1 -1
- package/dist/lib/paper-config.d.ts +1 -1
- package/dist/lib/paper-config.d.ts.map +1 -1
- package/dist/lib/paper-config.js +6 -4
- package/dist/lib/paper-config.js.map +1 -1
- package/dist/paper-settings.d.ts +3 -1
- package/dist/paper-settings.d.ts.map +1 -1
- package/dist/paper-settings.js +11 -5
- package/dist/paper-settings.js.map +1 -1
- package/dist/ports/latex.d.ts +23 -0
- package/dist/ports/latex.d.ts.map +1 -1
- package/dist/ports/submission-portal.d.ts +39 -2
- package/dist/ports/submission-portal.d.ts.map +1 -1
- package/dist/ports/venue-deadlines.d.ts +1 -1
- package/dist/submission.d.ts +49 -11
- package/dist/submission.d.ts.map +1 -1
- package/dist/submission.js +332 -44
- package/dist/submission.js.map +1 -1
- package/docs/configuration.md +2 -1
- package/docs/rules/cycle/record.md +9 -6
- package/docs/submission.md +47 -48
- package/eslint.config.mjs +3 -0
- package/lib/paper-config.ts +7 -4
- package/package.json +6 -1
- package/presets/msr.jsonc +9 -7
- package/presets/msr.md +14 -10
- package/scripts/check.ts +1 -1
- package/scripts/refresh-deadlines/compare.test.ts +75 -0
- package/scripts/refresh-deadlines/compare.ts +101 -0
- package/scripts/refresh-deadlines/main.test.ts +140 -0
- package/scripts/refresh-deadlines/main.ts +56 -0
- package/scripts/refresh-deadlines/refresh.test.ts +287 -0
- package/scripts/refresh-deadlines/refresh.ts +183 -0
- package/skills/submission-portal/SKILL.md +60 -44
- package/skills/submission-portal/SKILL.md.spec.ts +62 -43
- package/skills/submission-portal/submission-portal.test.ts +4 -73
- package/src/adapters/hotcrp/cassette/README.md +4 -4
- package/src/adapters/hotcrp/cassette/deadlines-msr2027.html +9 -9
- package/src/adapters/hotcrp/deadlines.io.test.ts +2 -2
- package/src/adapters/hotcrp/deadlines.test.ts +3 -3
- package/src/adapters/hotcrp/index.ts +15 -3
- package/src/adapters/hotcrp/portal.io.ts +61 -17
- package/src/adapters/hotcrp/portal.test.ts +105 -1
- package/src/adapters/hotcrp/response.ts +21 -0
- package/src/adapters/hotcrp/site.ts +34 -0
- package/src/adapters/hotcrp/token.test.ts +69 -0
- package/src/adapters/hotcrp/token.ts +51 -0
- package/src/adapters/latex/abstract.test.ts +280 -0
- package/src/adapters/latex/abstract.ts +272 -0
- package/src/adapters/latex/headings.ts +5 -4
- package/src/adapters/latex/index.test.ts +31 -1
- package/src/adapters/latex/index.ts +2 -0
- package/src/adapters/latex/parse.ts +64 -3
- package/src/cli.test.ts +20 -8
- package/src/cli.ts +22 -13
- package/src/cycle-rules.test.ts +6 -6
- package/src/cycle-rules.ts +7 -4
- package/src/domain/deadline.test.ts +31 -2
- package/src/domain/deadline.ts +42 -16
- package/src/domain/portal-token.test.ts +55 -0
- package/src/domain/portal-token.ts +63 -0
- package/src/domain/submission.test.ts +88 -0
- package/src/domain/submission.ts +99 -0
- package/src/new-paper.test.ts +1 -0
- package/src/paper-settings.test.ts +20 -0
- package/src/paper-settings.ts +17 -5
- package/src/ports/latex.ts +25 -0
- package/src/ports/submission-portal.ts +43 -1
- package/src/ports/venue-deadlines.ts +1 -1
- package/src/presets.test.ts +8 -5
- package/src/submission-new.test.ts +569 -0
- package/src/submission-show.test.ts +210 -0
- package/src/submission-update.test.ts +160 -0
- package/src/submission.test.ts +140 -518
- package/src/submission.ts +494 -61
- package/scripts/refresh-deadlines.test.ts +0 -431
- package/scripts/refresh-deadlines.ts +0 -387
package/src/ports/latex.ts
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* parser. The one implementation is `src/adapters/latex/` (unified-latex); `src/cli.ts` wires it.
|
|
4
4
|
*/
|
|
5
5
|
import type { Include } from "../domain/paper-source.ts";
|
|
6
|
+
import type { Result } from "../domain/result.ts";
|
|
6
7
|
import type {
|
|
7
8
|
ClassLine,
|
|
8
9
|
DocumentClass,
|
|
@@ -25,6 +26,24 @@ export interface Filecontents {
|
|
|
25
26
|
readonly body: Span;
|
|
26
27
|
}
|
|
27
28
|
|
|
29
|
+
/** Why a source's abstract cannot be read as plain text. */
|
|
30
|
+
export type AbstractProblem =
|
|
31
|
+
| { readonly kind: "none" }
|
|
32
|
+
| {
|
|
33
|
+
readonly kind: "unreadable";
|
|
34
|
+
/** What it is, in words: `\toolname, which no \newcommand … defines`. */
|
|
35
|
+
readonly what: string;
|
|
36
|
+
/** Its offset in the source. */
|
|
37
|
+
readonly at: number;
|
|
38
|
+
}
|
|
39
|
+
| {
|
|
40
|
+
/** A macro the abstract uses that the source defines more than once: which one TeX uses is not guessed. */
|
|
41
|
+
readonly kind: "redefined";
|
|
42
|
+
readonly name: string;
|
|
43
|
+
/** Each definition's offset in the source, in order. */
|
|
44
|
+
readonly at: readonly number[];
|
|
45
|
+
};
|
|
46
|
+
|
|
28
47
|
export interface LatexReader {
|
|
29
48
|
/** The source's `\documentclass`, as one of its states. */
|
|
30
49
|
readonly documentClass: (src: string) => ClassLine;
|
|
@@ -74,4 +93,10 @@ export interface LatexReader {
|
|
|
74
93
|
src: string,
|
|
75
94
|
jobname: string,
|
|
76
95
|
) => readonly Filecontents[];
|
|
96
|
+
/**
|
|
97
|
+
* The body of `src`'s `abstract` environment as one paragraph of plain text — the author's
|
|
98
|
+
* argument-less macros expanded, TeX's dashes and quotes, citations and comments dropped — or
|
|
99
|
+
* what stops it, with its offset in `src`.
|
|
100
|
+
*/
|
|
101
|
+
readonly abstractText: (src: string) => Result<string, AbstractProblem>;
|
|
77
102
|
}
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* A conference portal holding a paper's submission — the port `paperlint submission` talks through.
|
|
3
|
-
* Shaped by what the command needs (read one submission, send one change), not by any
|
|
3
|
+
* Shaped by what the command needs (read one submission, send one change, create one), not by any
|
|
4
|
+
* portal's API;
|
|
4
5
|
* one adapter per portal kind (`src/adapters/hotcrp/`).
|
|
5
6
|
*/
|
|
6
7
|
import type { Result } from "../domain/result.ts";
|
|
7
8
|
import type {
|
|
9
|
+
CreateOutcome,
|
|
10
|
+
NewSubmission,
|
|
8
11
|
PortalFailure,
|
|
9
12
|
SubmissionChange,
|
|
10
13
|
SubmissionView,
|
|
@@ -23,4 +26,43 @@ export interface SubmissionPortal {
|
|
|
23
26
|
change: SubmissionChange,
|
|
24
27
|
o: { readonly save: boolean },
|
|
25
28
|
): Promise<Result<UpdateOutcome, PortalFailure>>;
|
|
29
|
+
/**
|
|
30
|
+
* Create a submission. Without `save` the portal only checks it (a dry run), keeps nothing and
|
|
31
|
+
* chooses no id; with it, the outcome carries the id the portal chose.
|
|
32
|
+
*/
|
|
33
|
+
create(
|
|
34
|
+
paper: NewSubmission,
|
|
35
|
+
o: { readonly save: boolean },
|
|
36
|
+
): Promise<Result<CreateOutcome, PortalFailure>>;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/** How an author makes a token for a portal site, in the words the command prints. */
|
|
40
|
+
export interface CredentialHelp {
|
|
41
|
+
/** The site's page where tokens are made. */
|
|
42
|
+
readonly page: string;
|
|
43
|
+
/** Where that page is in the site's menus. */
|
|
44
|
+
readonly where: string;
|
|
45
|
+
/** The permissions to give the token, per subcommand. */
|
|
46
|
+
readonly scopes: string;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* A portal site before any token — what the command needs to find one, to say how to make one, and
|
|
51
|
+
* to say what is left to do on the site — and the portal itself once there is a token. One adapter
|
|
52
|
+
* per portal kind supplies it; the app prints what it returns.
|
|
53
|
+
*/
|
|
54
|
+
export interface PortalSite {
|
|
55
|
+
/** The environment variable this site's token is read from. */
|
|
56
|
+
readonly tokenVariable: string;
|
|
57
|
+
/** The site-less variable no longer read: named when still set, never used. */
|
|
58
|
+
readonly siteLessVariable: string;
|
|
59
|
+
/** The shape of a site's variable, for a message about another site's. */
|
|
60
|
+
readonly variablePattern: string;
|
|
61
|
+
readonly credentials: CredentialHelp;
|
|
62
|
+
/** What `submission new` does not send: done on the site by the author. */
|
|
63
|
+
readonly siteOnly: readonly string[];
|
|
64
|
+
/** A submission's page on the site; null: the one just created, before it has a number. */
|
|
65
|
+
readonly submissionPage: (id: number | null) => string;
|
|
66
|
+
/** The portal, read and changed with `token`. */
|
|
67
|
+
readonly connect: (token: string) => SubmissionPortal;
|
|
26
68
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* A venue's deadlines as its portal publishes them — the port the scheduled refresh of the shipped
|
|
3
|
-
* presets reads through (`scripts/refresh-deadlines
|
|
3
|
+
* presets reads through (`scripts/refresh-deadlines/`). Shaped by what the refresh needs (the
|
|
4
4
|
* portal's deadlines, once), not by any portal's page; one adapter per portal kind
|
|
5
5
|
* (`src/adapters/hotcrp/`).
|
|
6
6
|
*/
|
package/src/presets.test.ts
CHANGED
|
@@ -103,23 +103,26 @@ describe("shipped presets: paperlint:msr", () => {
|
|
|
103
103
|
kind: "hotcrp",
|
|
104
104
|
url: "https://msr2027.hotcrp.com",
|
|
105
105
|
});
|
|
106
|
-
// The portal's deadlines, read 2026-10-05 off
|
|
106
|
+
// The portal's deadlines, read 2026-10-19 18:05 UTC off https://msr2027.hotcrp.com/deadlines:
|
|
107
|
+
// «Wednesday Oct 21, 2026, 7:59:59 AM EDT» (`"sub":1792583999`) and «Saturday Oct 24, 2026,
|
|
108
|
+
// 7:59:59 AM EDT» (#235).
|
|
107
109
|
expect(r.value.deadlines).toEqual([
|
|
108
110
|
{
|
|
109
111
|
what: "submission",
|
|
110
|
-
at: "2026-10-
|
|
112
|
+
at: "2026-10-21T11:59:59Z",
|
|
111
113
|
source: "portal",
|
|
112
114
|
url: "https://msr2027.hotcrp.com/deadlines",
|
|
113
|
-
read: "2026-10-
|
|
115
|
+
read: "2026-10-19",
|
|
114
116
|
},
|
|
115
117
|
{
|
|
116
118
|
what: "resubmission",
|
|
117
|
-
at: "2026-10-
|
|
119
|
+
at: "2026-10-24T11:59:59Z",
|
|
118
120
|
source: "portal",
|
|
119
121
|
url: "https://msr2027.hotcrp.com/deadlines",
|
|
120
|
-
read: "2026-10-
|
|
122
|
+
read: "2026-10-19",
|
|
121
123
|
},
|
|
122
124
|
]);
|
|
125
|
+
expect(Date.parse("2026-10-21T11:59:59Z") / 1000).toBe(1792583999);
|
|
123
126
|
// No rule turned on: the IEEE capitalization rule has not been read and quoted.
|
|
124
127
|
expect(r.value.rules).toEqual({});
|
|
125
128
|
expect(r.value.registerAnchors).toEqual([]);
|