paperlint 2.0.0 → 2.1.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/ci.yml +4 -4
- package/CLAUDE.md +3 -3
- package/CONTRIBUTING.md +21 -0
- package/LICENSE +1 -1
- package/README.md +81 -24
- package/action.harness.mjs +10 -10
- package/action.mutations.mjs +3 -3
- package/action.yml +11 -11
- package/bin/{rpp.mjs → paperlint.mjs} +2 -2
- package/dist/adapters/banal/invocation.js +3 -3
- package/dist/adapters/banal/invocation.js.map +1 -1
- package/dist/adapters/banal/run.d.ts +1 -1
- package/dist/adapters/banal/run.js +1 -1
- package/dist/adapters/banal/run.js.map +1 -1
- package/dist/adapters/banal/settings.d.ts +4 -4
- package/dist/adapters/banal/settings.d.ts.map +1 -1
- package/dist/adapters/banal/settings.js +4 -4
- package/dist/adapters/banal/settings.js.map +1 -1
- package/dist/adapters/banal/xml.js +1 -1
- package/dist/adapters/banal/xml.js.map +1 -1
- package/dist/adapters/curl/download.io.d.ts.map +1 -1
- package/dist/adapters/curl/download.io.js +2 -2
- package/dist/adapters/curl/download.io.js.map +1 -1
- package/dist/build-engine.d.ts +1 -1
- package/dist/build-engine.d.ts.map +1 -1
- package/dist/build-engine.js +6 -3
- package/dist/build-engine.js.map +1 -1
- package/dist/build.d.ts +1 -1
- package/dist/build.d.ts.map +1 -1
- package/dist/build.js +5 -4
- package/dist/build.js.map +1 -1
- package/dist/cli.d.ts +29 -30
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +174 -98
- package/dist/cli.js.map +1 -1
- package/dist/doctor.d.ts.map +1 -1
- package/dist/doctor.js +21 -6
- package/dist/doctor.js.map +1 -1
- package/dist/engine.d.ts +2 -2
- package/dist/engine.d.ts.map +1 -1
- package/dist/engine.js +1 -1
- package/dist/facts-file.d.ts +33 -9
- package/dist/facts-file.d.ts.map +1 -1
- package/dist/facts-file.js +117 -17
- package/dist/facts-file.js.map +1 -1
- package/dist/hooks-settings.d.ts +0 -18
- package/dist/hooks-settings.d.ts.map +1 -1
- package/dist/hooks-settings.js +70 -42
- package/dist/hooks-settings.js.map +1 -1
- package/dist/init.d.ts +13 -10
- package/dist/init.d.ts.map +1 -1
- package/dist/init.js +74 -42
- package/dist/init.js.map +1 -1
- package/dist/link-skills.js +2 -2
- package/dist/link-skills.js.map +1 -1
- package/dist/new-paper.d.ts +2 -2
- package/dist/new-paper.d.ts.map +1 -1
- package/dist/new-paper.js +17 -2
- package/dist/new-paper.js.map +1 -1
- package/dist/paper-settings.d.ts +68 -0
- package/dist/paper-settings.d.ts.map +1 -0
- package/dist/paper-settings.js +144 -0
- package/dist/paper-settings.js.map +1 -0
- package/dist/presets.d.ts +84 -0
- package/dist/presets.d.ts.map +1 -0
- package/dist/presets.js +186 -0
- package/dist/presets.js.map +1 -0
- package/dist/rules-config.d.ts +8 -1
- package/dist/rules-config.d.ts.map +1 -1
- package/dist/rules-config.js +13 -8
- package/dist/rules-config.js.map +1 -1
- package/dist/structure.d.ts.map +1 -1
- package/dist/structure.js +2 -1
- package/dist/structure.js.map +1 -1
- package/dist/tex-requirements.d.ts +63 -7
- package/dist/tex-requirements.d.ts.map +1 -1
- package/dist/tex-requirements.js +91 -24
- package/dist/tex-requirements.js.map +1 -1
- package/dist/toolchain.d.ts +2 -2
- package/dist/toolchain.d.ts.map +1 -1
- package/dist/toolchain.js +8 -8
- package/dist/toolchain.js.map +1 -1
- package/dist/types.d.ts +4 -4
- package/dist/types.d.ts.map +1 -1
- package/dist/venue-rules.d.ts +109 -0
- package/dist/venue-rules.d.ts.map +1 -0
- package/dist/venue-rules.js +387 -0
- package/dist/venue-rules.js.map +1 -0
- package/docs/configuration.md +73 -17
- package/docs/e2e.md +3 -4
- package/docs/install.md +11 -3
- package/docs/optional-rules.md +26 -25
- package/docs/rules.md +132 -3
- package/docs/toolchain.md +5 -5
- package/eslint-rules/paper-typography.mjs +1 -1
- package/eslint-rules/paper-typography.mutations.mjs +1 -1
- package/eslint-rules/papers.mjs +6 -2
- package/eslint-rules/pdf-last-page-balance.harness.mjs +5 -3
- package/eslint-rules/pdf-last-page-balance.mjs +23 -2
- package/fixtures/build-e2e/acmart/paperlint.json +1 -0
- package/fixtures/build-e2e/guards/paper.tex +1 -1
- package/fixtures/pdf-facts/README.md +1 -1
- package/fixtures/real-markdown-paper/baseline.json +1 -1
- package/fixtures/real-markdown-paper/baseline.mjs +2 -2
- package/fixtures/toolchain-mirror/install-tl +2 -2
- package/fixtures/toolchain-mirror/stub-pdflatex +1 -1
- package/fixtures/toolchain-mirror/stub-tlmgr +1 -1
- package/hooks/hooks.harness.mjs +1 -1
- package/lib/paper-config.d.mts +7 -0
- package/lib/paper-config.harness.mjs +3 -3
- package/lib/paper-config.mjs +34 -3
- package/lib/skill-trigger-cases.harness.mjs +1 -1
- package/package.json +4 -4
- package/plugin/hooks/hooks.json +3 -3
- package/scripts/check.mjs +1 -1
- package/scripts/harness-api.frozen.json +1 -1
- package/scripts/harness-api.test.ts +2 -2
- package/scripts/layer-legacy.frozen.json +1 -1
- package/scripts/mutation-batteries-frozen.harness.mjs +1 -1
- package/scripts/mutation-batteries.frozen.json +2 -2
- package/scripts/release-config.test.ts +1 -1
- package/skills/find-venue/SKILL.md +5 -1
- package/skills/find-venue/SKILL.md.spec.ts +4 -0
- package/skills/paper-pipeline/PIPELINE-MAP.md +14 -4
- package/skills/paper-pipeline/SKILL.md +4 -3
- package/skills/paper-pipeline/SKILL.md.spec.ts +3 -2
- package/skills/paper-pipeline/description-language.eval.mjs +1 -1
- package/skills/paper-pipeline/framing-vs-vocabulary.eval.mjs +1 -1
- package/skills/paper-pipeline/grade-paper-writing-ablation.eval.mjs +2 -2
- package/skills/paper-pipeline/pipeline-firing.eval.mjs +1 -1
- package/skills/paper-pipeline/pipeline-language.eval.mjs +1 -1
- package/skills/paper-pipeline/scripts/consumer.d.mts +1 -0
- package/skills/paper-pipeline/scripts/consumer.harness.mjs +10 -4
- package/skills/paper-pipeline/scripts/consumer.mjs +8 -1
- package/skills/paper-pipeline/scripts/consumer.mutations.mjs +1 -1
- package/skills/render-paper/SKILL.md +3 -3
- package/skills/render-paper/SKILL.md.spec.ts +2 -2
- package/skills/render-paper/extract-pdf-facts.harness.mjs +6 -6
- package/skills/render-paper/extract-pdf-facts.mjs +4 -4
- package/skills/study-accepted-papers/SKILL.md +2 -1
- package/skills/study-accepted-papers/SKILL.md.spec.ts +1 -0
- package/skills/submit-paper/SKILL.md +9 -1
- package/skills/submit-paper/SKILL.md.spec.ts +8 -0
- package/skills/submit-paper/references/venues/acm-sigconf.jsonc +86 -0
- package/skills/submit-paper/references/venues/agenticdev.jsonc +34 -102
- package/skills/submit-paper/references/venues/aisec.jsonc +21 -82
- package/skills/submit-paper/references/venues/realm.jsonc +45 -43
- package/skills/submit-paper/references/venues/tex-base.jsonc +1 -1
- package/skills/submit-paper/references/venues/venue-profile.schema.json +120 -30
- package/src/adapters/banal/index.test.ts +1 -1
- package/src/adapters/banal/invocation.test.ts +3 -3
- package/src/adapters/banal/invocation.ts +3 -3
- package/src/adapters/banal/locate.test.ts +4 -4
- package/src/adapters/banal/run.ts +2 -2
- package/src/adapters/banal/settings.test.ts +12 -6
- package/src/adapters/banal/settings.ts +9 -5
- package/src/adapters/banal/xml.test.ts +1 -1
- package/src/adapters/banal/xml.ts +1 -1
- package/src/adapters/curl/download.io.ts +4 -2
- package/src/adapters/curl/download.test.ts +3 -1
- package/src/adapters/node/files.test.ts +1 -1
- package/src/adapters/node/process.test.ts +2 -2
- package/src/adapters/node/workspace.test.ts +4 -4
- package/src/build-engine.harness.mjs +2 -2
- package/src/build-engine.ts +11 -3
- package/src/build.harness.mjs +27 -22
- package/src/build.mutations.mjs +3 -2
- package/src/build.ts +6 -5
- package/src/cli.harness.mjs +72 -131
- package/src/cli.mutations.mjs +7 -32
- package/src/cli.ts +204 -121
- package/src/doctor.harness.mjs +9 -25
- package/src/doctor.ts +28 -5
- package/src/engine.harness.mjs +4 -2
- package/src/engine.ts +2 -2
- package/src/facts-file.test.ts +54 -7
- package/src/facts-file.ts +145 -24
- package/src/hooks-settings.harness.mjs +24 -15
- package/src/hooks-settings.mutations.mjs +2 -4
- package/src/hooks-settings.ts +92 -49
- package/src/init.ts +88 -52
- package/src/latex-log.harness.mjs +1 -1
- package/src/link-skills.harness.mjs +3 -1
- package/src/link-skills.mutations.mjs +1 -1
- package/src/link-skills.ts +2 -2
- package/src/new-paper.harness.mjs +10 -7
- package/src/new-paper.test.ts +145 -0
- package/src/new-paper.ts +22 -2
- package/src/paper-settings-commands.test.ts +311 -0
- package/src/paper-settings.test.ts +220 -0
- package/src/paper-settings.ts +206 -0
- package/src/pdf-facts.harness.mjs +1 -1
- package/src/presets.test.ts +236 -0
- package/src/presets.ts +307 -0
- package/src/rules-config.ts +14 -9
- package/src/structure.harness.mjs +4 -4
- package/src/structure.ts +2 -1
- package/src/tex-requirements.harness.mjs +12 -18
- package/src/tex-requirements.ts +179 -29
- package/src/toolchain.harness.mjs +34 -25
- package/src/toolchain.ts +14 -8
- package/src/types.ts +4 -4
- package/src/venue-rules.test.ts +545 -0
- package/src/venue-rules.ts +573 -0
- package/templates/paper/paperlint.json +4 -0
- package/fixtures/build-e2e/acmart/venue.json +0 -1
- package/plugin/.claude-plugin/plugin.json +0 -8
package/.github/workflows/ci.yml
CHANGED
|
@@ -260,23 +260,23 @@ jobs:
|
|
|
260
260
|
# No `restore-keys`, deliberately: a partial restore would carry the old year's tree into the
|
|
261
261
|
# new entry, and the old tree is never deleted, so the cache would grow by a whole TeX Live.
|
|
262
262
|
- name: where TeX Live is cached
|
|
263
|
-
run: echo "
|
|
263
|
+
run: echo "PAPERLINT_TEXLIVE_DIR=$HOME/.cache/paperlint-texlive" >> "$GITHUB_ENV"
|
|
264
264
|
|
|
265
265
|
- name: TeX Live from cache
|
|
266
266
|
uses: actions/cache@v6
|
|
267
267
|
with:
|
|
268
|
-
path: ~/.cache/
|
|
268
|
+
path: ~/.cache/paperlint-texlive
|
|
269
269
|
key: texlive-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('skills/submit-paper/references/venues/*.jsonc') }}
|
|
270
270
|
|
|
271
271
|
# The same command a user runs. On a cache hit it verifies and says "nothing to do"; on a miss
|
|
272
272
|
# it installs from an empty directory and verifies every declared file with kpsewhich.
|
|
273
|
-
# `node bin/
|
|
273
|
+
# `node bin/paperlint.mjs`, not `npx paperlint`: inside this repository npx would look the name up on npm.
|
|
274
274
|
# It also downloads banal, the Perl script HotCRP runs to measure page geometry (~90 KB, pinned
|
|
275
275
|
# commit, sha256-checked, then run once on a test page). paperlint keeps banal and no longer needs
|
|
276
276
|
# poppler: paperlint now writes the XML banal reads, which poppler's pdftohtml used to write.
|
|
277
277
|
# Both runner images ship perl. The download is too small to be worth an Actions cache.
|
|
278
278
|
- name: paperlint toolchain
|
|
279
|
-
run: node bin/
|
|
279
|
+
run: node bin/paperlint.mjs toolchain
|
|
280
280
|
timeout-minutes: 15
|
|
281
281
|
|
|
282
282
|
# Proves banal works without poppler. This runner has no poppler, and the test also limits
|
package/CLAUDE.md
CHANGED
|
@@ -149,7 +149,7 @@ Rule 5 is about the tool you are replacing; this one is about the order of work.
|
|
|
149
149
|
Four proposals were made and withdrawn in one session on 2026-09-17 for exactly this reason —
|
|
150
150
|
[`docs/incidents.md`](docs/incidents.md).
|
|
151
151
|
|
|
152
|
-
**10. Effects live in adapters, and WHERE
|
|
152
|
+
**10. Effects live in adapters, and WHERE paperlint IS INSTALLED lives in ONE of them.** Rule 6 generalised: the caller's cwd is one case of it. Checking logic — lint rules,
|
|
153
153
|
skills, hooks — must not know its own location, nor its distance from anything else. Every
|
|
154
154
|
answer to _where_ comes from `skills/paper-pipeline/scripts/consumer.mjs`, which adapts per
|
|
155
155
|
channel: own checkout · `node_modules` · plugin cache · CI. A skill naming a script by an
|
|
@@ -166,10 +166,10 @@ outside `consumer.mjs` a finding. Prose will not hold this class — four silent
|
|
|
166
166
|
_while_ comments explaining the hazard sat directly above the code
|
|
167
167
|
([`docs/incidents.md`](docs/incidents.md)).
|
|
168
168
|
|
|
169
|
-
**11. Installing and using
|
|
169
|
+
**11. Installing and using paperlint must be as smooth as possible.** Count the actions between "I
|
|
170
170
|
want this" and "it works": every command to copy, flag to pass or file to edit is one more place
|
|
171
171
|
to give up. The target is `npm i` plus one command. A per-paper script, a manual TeX install or a
|
|
172
|
-
"now add this to your config" step is a defect in
|
|
172
|
+
"now add this to your config" step is a defect in paperlint, not a user task. The only exception is a
|
|
173
173
|
choice that really belongs to the user (irreversible, paid, privacy), and then it is named at the
|
|
174
174
|
moment it is asked. The converse holds too: an automatic step that can fail silently is worse
|
|
175
175
|
than an explicit one — it works, or it says loudly that it did not. Measured example of the
|
package/CONTRIBUTING.md
CHANGED
|
@@ -109,6 +109,27 @@ node scripts/run-mutations.mjs # run the remaining batteries (deprecated, #52
|
|
|
109
109
|
None of these are needed to USE the tool — they are here because the gates are part of the
|
|
110
110
|
argument, not decoration.
|
|
111
111
|
|
|
112
|
+
## Adding a venue
|
|
113
|
+
|
|
114
|
+
A venue is a **preset**, a JSONC file in `skills/submit-paper/references/venues/`, validated by
|
|
115
|
+
`venue-profile.schema.json` beside it. Adding one is three files and no code:
|
|
116
|
+
|
|
117
|
+
1. **The preset, thin.** `venues/<name>.jsonc` extends the template family it is built on
|
|
118
|
+
(`"extends": "paperlint:acm-sigconf"` for an ACM venue) and adds only what the call for papers
|
|
119
|
+
sets: `format.kinds` (the page limit of each kind of paper) and, when the venue's producer asks
|
|
120
|
+
for something an optional rule checks, `rules`. Every number carries the quote it came from.
|
|
121
|
+
A venue on a template with no family yet stands alone (`template`, `tex`, `format`) — or, better,
|
|
122
|
+
add the family first: measured on a real template build (banal + pdf.js), not copied from
|
|
123
|
+
documentation ([#88](https://github.com/zernie/paperlint/issues/88)).
|
|
124
|
+
2. **The card.** `venues/<name>.md` — prose about the venue: deadlines, tracks, the blind model,
|
|
125
|
+
what the form asks.
|
|
126
|
+
3. **A test.** A case in `src/presets.test.ts` that `paperlint:<name>` resolves over its family with
|
|
127
|
+
the kinds you declared; `src/tex-requirements.harness.mjs` already checks every shipped preset
|
|
128
|
+
against the schema.
|
|
129
|
+
|
|
130
|
+
`paperlint toolchain` picks the new preset's packages up by itself, and the README and
|
|
131
|
+
[`docs/rules.md`](docs/rules.md#checks-against-the-venue) list the shipped presets — update both.
|
|
132
|
+
|
|
112
133
|
## Releases
|
|
113
134
|
|
|
114
135
|
Every push to `main` runs semantic-release (`.github/workflows/release.yml`). The squash commit —
|
package/LICENSE
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
MIT License
|
|
2
2
|
|
|
3
|
-
Copyright (c) 2026
|
|
3
|
+
Copyright (c) 2026 paperlint contributors
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
package/README.md
CHANGED
|
@@ -1,15 +1,37 @@
|
|
|
1
1
|
# paperlint
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/paperlint)
|
|
4
|
-

|
|
5
|
+
|
|
6
|
+
A linter for scientific papers written in LaTeX. It catches the mechanical mistakes that get a
|
|
7
|
+
paper desk-rejected or sent back at camera-ready, before you submit.
|
|
8
|
+
|
|
9
|
+
A LaTeX paper can build without an error and still be wrong. The ACM template silently switches to
|
|
10
|
+
another font when one of its font packages is missing, and the pages break differently. The same
|
|
11
|
+
source paginates differently on a machine with another version of the template. The submitted PDF
|
|
12
|
+
gets overwritten a week later and nobody can say what was sent. You find out from a reviewer or a
|
|
13
|
+
publisher, or never. paperlint checks for these on your machine and in CI:
|
|
14
|
+
|
|
15
|
+
- **Checks against your venue.** Point the paper's `paperlint.json` at a venue preset
|
|
16
|
+
(`"extends": "paperlint:aisec"`), build, lint: the page limit for your kind of paper, embedded
|
|
17
|
+
fonts and the template's font families, the paper size and column count, and the font sizes, as
|
|
18
|
+
the venue's call for papers sets them — plus the checks the venue implies, such as a balanced last
|
|
19
|
+
page. Presets ship for the ACM `acmart` sigconf family and three venues — AgenticDev and AISec
|
|
20
|
+
(ACM) and REALM (ACL); for any other venue, a preset is one JSON file in your repository
|
|
21
|
+
([`docs/rules.md`](docs/rules.md#writing-your-own-venue-preset)).
|
|
22
|
+
- **Builds the same PDF everywhere.** `paperlint toolchain` installs TeX Live with exactly the
|
|
23
|
+
packages your venue's template needs and checks that each one is really there, so the silent
|
|
24
|
+
font switch cannot happen and your laptop and CI build with the same TeX Live.
|
|
25
|
+
- **Keeps what you submitted.** Record "submitted on 22 July, as this PDF", and paperlint fails if
|
|
26
|
+
that PDF changes or disappears, or its LaTeX source was not kept beside it.
|
|
27
|
+
- **Knows the classic slips.** An ACM paper that overrides the title-page commands and loses part
|
|
28
|
+
of page 1; "code will be released" left in a camera-ready; references without a DOI or URL; an
|
|
29
|
+
unbalanced last page, for publishers that ask for balanced columns (an optional check).
|
|
30
|
+
- **Works with coding agents.** Hooks and skills for Claude Code run the checks after every edit
|
|
31
|
+
and stop an agent from rewriting the paper around them.
|
|
10
32
|
|
|
11
33
|
It is for researchers and engineers who write papers in LaTeX inside git and submit them to
|
|
12
|
-
conferences or journals.
|
|
34
|
+
conferences or journals.
|
|
13
35
|
|
|
14
36
|
## Install and set up
|
|
15
37
|
|
|
@@ -27,7 +49,7 @@ your project's `node_modules`, so run without the install it has nothing to link
|
|
|
27
49
|
first paper, and sets up the optional Claude Code skills and hooks. It installs no software. It
|
|
28
50
|
asks questions only when you run it in a terminal; an agent, CI or `--yes` gets the defaults, and
|
|
29
51
|
each default it takes is printed. It ends by running `paperlint doctor`, which checks the setup.
|
|
30
|
-
Exactly what it writes: [`docs/install.md`](docs/install.md#what-
|
|
52
|
+
Exactly what it writes: [`docs/install.md`](docs/install.md#what-paperlint-init-writes).
|
|
31
53
|
|
|
32
54
|
## What you get
|
|
33
55
|
|
|
@@ -60,11 +82,17 @@ npx paperlint new my-paper
|
|
|
60
82
|
✓ created papers/my-paper
|
|
61
83
|
+ PIPELINE-STATUS.md (from the package template)
|
|
62
84
|
+ paper.tex (from the package template)
|
|
85
|
+
+ paperlint.json (from the package template)
|
|
63
86
|
|
|
64
87
|
config: package.json
|
|
65
|
-
|
|
88
|
+
…/papers/my-paper/paper.tex
|
|
89
|
+
1:1 warning this paper names no venue preset yet, so its page limit, fonts and format are not checked — set "extends" in papers/my-paper/paperlint.json (e.g. "paperlint:agenticdev"; see docs/rules.md) pdf/measured
|
|
90
|
+
|
|
91
|
+
✖ 1 problem (0 errors, 1 warning)
|
|
66
92
|
```
|
|
67
93
|
|
|
94
|
+
The warning is the only thing left to do: the paper does not say where it is going yet.
|
|
95
|
+
|
|
68
96
|
You now have one folder per paper:
|
|
69
97
|
|
|
70
98
|
```
|
|
@@ -72,10 +100,30 @@ papers/
|
|
|
72
100
|
my-paper/
|
|
73
101
|
paper.tex the paper, in LaTeX
|
|
74
102
|
PIPELINE-STATUS.md the paper's record: its research question and the stages it reached
|
|
103
|
+
paperlint.json this paper's settings: its venue preset and kind — `new` writes it
|
|
75
104
|
reviews/*.md review notes (optional)
|
|
76
105
|
versions/ the exact PDF and source you sent at each stage, never edited
|
|
77
106
|
```
|
|
78
107
|
|
|
108
|
+
`paperlint new` writes `paperlint.json` with `"extends": null` and a comment saying what goes
|
|
109
|
+
there. To have the paper checked against its venue, name the venue preset and the kind of paper:
|
|
110
|
+
|
|
111
|
+
```json
|
|
112
|
+
{ "extends": "paperlint:aisec", "kind": "research" }
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
Settings come in three levels, each named after the tool:
|
|
116
|
+
|
|
117
|
+
```
|
|
118
|
+
package.json "paperlint": { "papersDir": "papers" } the project
|
|
119
|
+
papers/my-paper/
|
|
120
|
+
paperlint.json { "extends": "paperlint:aisec", … } this paper
|
|
121
|
+
paperlint:aisec a venue preset: shipped, or ./your-venue.jsonc the venue
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
More in [`docs/configuration.md`](docs/configuration.md#three-levels-of-settings).
|
|
125
|
+
`paperlint.json` replaces `venue.json` (2.1.0); `npx paperlint init` moves it.
|
|
126
|
+
|
|
79
127
|
A **stage** is a point the paper has reached, such as `submitted` or `camera-ready` (the final
|
|
80
128
|
version for the proceedings). The name may use `a-z`, `0-9`, `.`, `_` and `-`. On a folder that
|
|
81
129
|
already exists, `paperlint new` adds only the missing files. To use your own templates, put files with
|
|
@@ -139,7 +187,7 @@ never fail the run unless you pass `--max-warnings <n>`. `--json` prints the fin
|
|
|
139
187
|
`paperlint init` offers to write this GitHub Actions workflow step for you. By hand:
|
|
140
188
|
|
|
141
189
|
```yaml
|
|
142
|
-
- uses: zernie/
|
|
190
|
+
- uses: zernie/paperlint@v2.0.0
|
|
143
191
|
with:
|
|
144
192
|
paths: papers
|
|
145
193
|
```
|
|
@@ -152,19 +200,28 @@ shows up red. Optional inputs: `config`, `max-warnings` (default `-1`, no limit)
|
|
|
152
200
|
|
|
153
201
|
## What the checks catch
|
|
154
202
|
|
|
155
|
-
| check | level | catches
|
|
156
|
-
| ------------------------------ | ------- |
|
|
157
|
-
| `paper/stages` | error | a stage's PDF is missing, or it is not the same file any more (its size changed)
|
|
158
|
-
| `paper/source` | error | a stage has no frozen source file next to its PDF
|
|
159
|
-
| `paper/author-list` | warning | a stage is declared, but `PIPELINE-STATUS.md` does not record that the author list was checked
|
|
160
|
-
| `paper/research-question` | warning | the research question is missing from `PIPELINE-STATUS.md`, or the paper does not contain that sentence
|
|
161
|
-
| `paper/typography` | warning | more `§`, `.05`-style decimals, mixed `Fig.`/`Figure`, or references without a DOI or URL than you allowed
|
|
162
|
-
| `tex/future-promise` | warning | a camera-ready still says your code "will be released"
|
|
163
|
-
| `tex/acm-frontmatter-override` | error | an ACM paper overrides the template's title-page commands, so parts of page 1 go missing
|
|
164
|
-
| `review/findings-cause` | error | a review note lists several findings and names no cause for any of them
|
|
165
|
-
| `doc/fields` | warning | a review note's front matter is missing a field you require (off unless configured)
|
|
166
|
-
|
|
167
|
-
|
|
203
|
+
| check | level | catches |
|
|
204
|
+
| ------------------------------ | ------- | ---------------------------------------------------------------------------------------------------------------- |
|
|
205
|
+
| `paper/stages` | error | a stage's PDF is missing, or it is not the same file any more (its size changed) |
|
|
206
|
+
| `paper/source` | error | a stage has no frozen source file next to its PDF |
|
|
207
|
+
| `paper/author-list` | warning | a stage is declared, but `PIPELINE-STATUS.md` does not record that the author list was checked |
|
|
208
|
+
| `paper/research-question` | warning | the research question is missing from `PIPELINE-STATUS.md`, or the paper does not contain that sentence |
|
|
209
|
+
| `paper/typography` | warning | more `§`, `.05`-style decimals, mixed `Fig.`/`Figure`, or references without a DOI or URL than you allowed |
|
|
210
|
+
| `tex/future-promise` | warning | a camera-ready still says your code "will be released" |
|
|
211
|
+
| `tex/acm-frontmatter-override` | error | an ACM paper overrides the template's title-page commands, so parts of page 1 go missing |
|
|
212
|
+
| `review/findings-cause` | error | a review note lists several findings and names no cause for any of them |
|
|
213
|
+
| `doc/fields` | warning | a review note's front matter is missing a field you require (off unless configured) |
|
|
214
|
+
| `pdf/limits` | error | more body or reference pages than the venue allows for your kind of paper, or a reference font size out of range |
|
|
215
|
+
| `pdf/fonts` | error | a Type 3 or unembedded font, or the venue template's fonts are missing (a silent Computer Modern fallback) |
|
|
216
|
+
| `pdf/geometry` | error | the paper size or column count differs from the venue's |
|
|
217
|
+
| `pdf/body-size` | warning | the body font size is off the venue's |
|
|
218
|
+
| `pdf/profile` | error | the paper's `extends` names no preset (a typo), or a kind of paper the venue does not have |
|
|
219
|
+
| `pdf/fresh` | error | the build facts describe an earlier PDF than the one on disk |
|
|
220
|
+
| `pdf/measured` | warning | the venue checks did not run: the paper names no venue preset yet, or was not built |
|
|
221
|
+
|
|
222
|
+
The `pdf/` checks run only for a paper whose `paperlint.json` extends a venue preset, and they judge the PDF
|
|
223
|
+
`paperlint build` made: build, then lint. Errors fail the run; warnings only print. What each check
|
|
224
|
+
reads: [`docs/rules.md`](docs/rules.md).
|
|
168
225
|
Checks that only some venues need are off until you turn them on:
|
|
169
226
|
[`docs/optional-rules.md`](docs/optional-rules.md).
|
|
170
227
|
|
|
@@ -219,7 +276,7 @@ with a normal file edit — those are not blocked.
|
|
|
219
276
|
- **It does not write or grade the paper.** `paperlint lint` checks records and a few mechanical
|
|
220
277
|
mistakes; judging the writing is what the optional skills are for.
|
|
221
278
|
- **New papers are LaTeX.** Markdown papers (`paper.md`) are still read but deprecated
|
|
222
|
-
([#57](https://github.com/zernie/
|
|
279
|
+
([#57](https://github.com/zernie/paperlint/issues/57)).
|
|
223
280
|
- **No Yarn Plug'n'Play.** npm and pnpm are supported
|
|
224
281
|
([`docs/install.md`](docs/install.md#package-managers)).
|
|
225
282
|
|
package/action.harness.mjs
CHANGED
|
@@ -25,7 +25,7 @@ import * as yaml from "js-yaml";
|
|
|
25
25
|
import { guard } from "./scripts/eslint-report-guard.mjs";
|
|
26
26
|
|
|
27
27
|
const HERE = dirname(fileURLToPath(import.meta.url));
|
|
28
|
-
const TMP = realpathSync(mkdtempSync(join(tmpdir(), "
|
|
28
|
+
const TMP = realpathSync(mkdtempSync(join(tmpdir(), "paperlint-action-")));
|
|
29
29
|
const action = yaml.load(readFileSync(join(HERE, "action.yml"), "utf8"));
|
|
30
30
|
|
|
31
31
|
// ── I. SHAPE, read as nodes ───────────────────────────────────────────────────────────────────
|
|
@@ -43,12 +43,12 @@ assert.ok(eslintStep, `no step named "paperlint lint" among: ${names}`);
|
|
|
43
43
|
// 🔴 THE ACTION MUST CALL THE PACKAGE'S OWN CLI, NOT ESLINT. This is not tidiness: while the step
|
|
44
44
|
// invoked `npx eslint` directly it was a SECOND implementation of the same job, and it had already
|
|
45
45
|
// drifted — the directory-structure check (a paper directory with no PIPELINE-STATUS.md gets zero
|
|
46
|
-
// rules and reports clean) lives in `bin/
|
|
46
|
+
// rules and reports clean) lives in `bin/paperlint.mjs`, so in CI it did not run at all. Any future edit
|
|
47
47
|
// that reaches past the CLI reintroduces exactly that gap, silently and greenly.
|
|
48
48
|
assert.match(
|
|
49
49
|
eslintStep.run,
|
|
50
50
|
/npx paperlint lint/,
|
|
51
|
-
"the lint step must call this package's own CLI — invoking eslint directly bypasses
|
|
51
|
+
"the lint step must call this package's own CLI — invoking eslint directly bypasses the settings and the structure check",
|
|
52
52
|
);
|
|
53
53
|
assert.doesNotMatch(
|
|
54
54
|
eslintStep.run,
|
|
@@ -59,8 +59,8 @@ assert.doesNotMatch(
|
|
|
59
59
|
// `overrideConfigFile: true`, so a consumer's nested config cannot reach the run. The guarantee
|
|
60
60
|
// moved from a flag into the code — assert the code, not the flag.
|
|
61
61
|
//
|
|
62
|
-
// 🔴 AND ASSERT IT IN THE FILE THAT HOLDS IT. This read said `bin/
|
|
63
|
-
// TypeScript; `bin/
|
|
62
|
+
// 🔴 AND ASSERT IT IN THE FILE THAT HOLDS IT. This read said `bin/paperlint.mjs` until the CLI moved to
|
|
63
|
+
// TypeScript; `bin/paperlint.mjs` is now a loader shim and contains no such call, so the assertion went
|
|
64
64
|
// red on a move that changed no behaviour. That redness is the point — the same assertion written
|
|
65
65
|
// as a grep over "the CLI" would have kept passing against whichever file still matched, which is
|
|
66
66
|
// how a check quietly stops watching its subject.
|
|
@@ -72,7 +72,7 @@ assert.match(
|
|
|
72
72
|
// The redirect into a report file is only sound while `--json` keeps stdout clean.
|
|
73
73
|
assert.match(
|
|
74
74
|
eslintStep.run,
|
|
75
|
-
/--json > "\$RUNNER_TEMP\/
|
|
75
|
+
/--json > "\$RUNNER_TEMP\/paperlint-report\.json"/,
|
|
76
76
|
"the machine-readable report must be redirected whole — it is what the guard reads",
|
|
77
77
|
);
|
|
78
78
|
// The guard must be CALLED, and by file — an inline blob would be untestable.
|
|
@@ -93,7 +93,7 @@ assert.match(
|
|
|
93
93
|
// So: execute the REAL `run:` block under the REAL flags, with a stub standing in for `npx`, and
|
|
94
94
|
// require that the guard was reached and that ESLint's code came through it.
|
|
95
95
|
const stubbedStepRun = (stubRc) => {
|
|
96
|
-
const bin = realpathSync(mkdtempSync(join(tmpdir(), "
|
|
96
|
+
const bin = realpathSync(mkdtempSync(join(tmpdir(), "paperlint-bin-")));
|
|
97
97
|
writeFileSync(
|
|
98
98
|
join(bin, "npx"),
|
|
99
99
|
// Stub prints the report TO STDOUT, not to a file by the `-o` flag: the step no longer passes
|
|
@@ -115,9 +115,9 @@ const stubbedStepRun = (stubRc) => {
|
|
|
115
115
|
PATH: `${bin}:${process.env.PATH}`,
|
|
116
116
|
RUNNER_TEMP: TMP,
|
|
117
117
|
GITHUB_ACTION_PATH: HERE,
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
118
|
+
PAPERLINT_CONFIG: "eslint.config.mjs",
|
|
119
|
+
PAPERLINT_PATHS: ".",
|
|
120
|
+
PAPERLINT_MAXWARN: "-1",
|
|
121
121
|
STUB_RC: String(stubRc),
|
|
122
122
|
REPORT_JSON: JSON.stringify([{ filePath: "/x/a.md", messages: [] }]),
|
|
123
123
|
},
|
package/action.mutations.mjs
CHANGED
|
@@ -45,10 +45,10 @@ const M = [
|
|
|
45
45
|
[
|
|
46
46
|
ACTION,
|
|
47
47
|
"the step goes back around the CLI to eslint (the words `paperlint lint` left in the comments)",
|
|
48
|
-
"reinstate the bypass:
|
|
48
|
+
"reinstate the bypass: the settings unread, the directory-structure check absent in CI, and a " +
|
|
49
49
|
"consumer's nested config free to decide the rule set — while a grep still finds `paperlint lint`",
|
|
50
|
-
"npx paperlint lint $
|
|
51
|
-
'npx eslint --config "$
|
|
50
|
+
"npx paperlint lint $PAPERLINT_PATHS",
|
|
51
|
+
'npx eslint --config "$PAPERLINT_CONFIG" $PAPERLINT_PATHS',
|
|
52
52
|
],
|
|
53
53
|
[
|
|
54
54
|
ACTION,
|
package/action.yml
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
# 🔴 THIS ACTION CALLS THE PACKAGE'S OWN CLI. It used to invoke `npx eslint` directly, and that was
|
|
4
4
|
# not a style question — it was a second implementation of the same job, and it had already drifted:
|
|
5
5
|
# the CLI's directory-structure check (a paper directory missing PIPELINE-STATUS.md gets ZERO rules
|
|
6
|
-
# and reports clean) lived only in `bin/
|
|
7
|
-
# which is the one place it has to hold. The same bypass also meant
|
|
6
|
+
# and reports clean) lived only in `bin/paperlint.mjs`, so the gate existed locally and was ABSENT in CI,
|
|
7
|
+
# which is the one place it has to hold. The same bypass also meant the consumer's settings were never read and
|
|
8
8
|
# the caller still had to keep an ESLint flat config — the exact thing the CLI exists to remove.
|
|
9
9
|
#
|
|
10
10
|
# WHY AN ACTION AND NOT A DOCUMENTED `run:` BLOCK. Two steps have to happen in this order and
|
|
@@ -26,7 +26,7 @@ description: Install the toolchain the texcount/* rules need, run ESLint, and re
|
|
|
26
26
|
inputs:
|
|
27
27
|
config:
|
|
28
28
|
description: >-
|
|
29
|
-
Path to `
|
|
29
|
+
Path to the `package.json` holding the `paperlint` settings. Optional: `paperlint lint` finds it by walking up from the working directory,
|
|
30
30
|
the way eslint and tsc find theirs, so most callers never set this. Pass it only when the
|
|
31
31
|
file is somewhere the walk cannot reach. ⚠️ Until 2026-09-18 this input took a path to an
|
|
32
32
|
ESLint FLAT CONFIG and defaulted to `eslint.config.mjs`; a caller still passing one will
|
|
@@ -72,9 +72,9 @@ runs:
|
|
|
72
72
|
- name: paths was actually given
|
|
73
73
|
shell: bash
|
|
74
74
|
env:
|
|
75
|
-
|
|
75
|
+
PAPERLINT_PATHS: ${{ inputs.paths }}
|
|
76
76
|
run: |
|
|
77
|
-
if [ -z "${
|
|
77
|
+
if [ -z "${PAPERLINT_PATHS// /}" ]; then
|
|
78
78
|
echo "::error::input \`paths\` is required and was empty. Name what to lint, e.g." \
|
|
79
79
|
"\`paths: papers\`. There is no default on purpose: linting the whole checkout" \
|
|
80
80
|
"by accident produces a green job over a scope nobody chose."
|
|
@@ -121,9 +121,9 @@ runs:
|
|
|
121
121
|
shell: bash
|
|
122
122
|
working-directory: ${{ inputs.working-directory }}
|
|
123
123
|
env:
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
124
|
+
PAPERLINT_CONFIG: ${{ inputs.config }}
|
|
125
|
+
PAPERLINT_PATHS: ${{ inputs.paths }}
|
|
126
|
+
PAPERLINT_MAXWARN: ${{ inputs.max-warnings }}
|
|
127
127
|
run: |
|
|
128
128
|
# 🔴 `|| RC=$?` IS LOAD-BEARING, NOT STYLE. GitHub runs composite `shell: bash` as
|
|
129
129
|
# `bash --noprofile --norc -eo pipefail`, so a bare `npx paperlint lint` that exits non-zero
|
|
@@ -132,7 +132,7 @@ runs:
|
|
|
132
132
|
# (a bad config, an unreadable report, findings), so under `-e` the guard was reachable
|
|
133
133
|
# ONLY on success, which is the one case it was not written for.
|
|
134
134
|
RC=0
|
|
135
|
-
npx paperlint lint $
|
|
136
|
-
--max-warnings="$
|
|
135
|
+
npx paperlint lint $PAPERLINT_PATHS ${PAPERLINT_CONFIG:+--config "$PAPERLINT_CONFIG"} \
|
|
136
|
+
--max-warnings="$PAPERLINT_MAXWARN" --json > "$RUNNER_TEMP/paperlint-report.json" || RC=$?
|
|
137
137
|
node "$GITHUB_ACTION_PATH/scripts/eslint-report-guard.mjs" \
|
|
138
|
-
"$RUNNER_TEMP/
|
|
138
|
+
"$RUNNER_TEMP/paperlint-report.json" "$RC" "$PAPERLINT_PATHS" "${PAPERLINT_CONFIG:-package.json}"
|
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
* 🔴 WHY NOT MOVE `bin` TO `dist/cli.js`. This path is a PUBLIC CONTRACT, and it already has
|
|
7
7
|
* two consumers outside the package:
|
|
8
8
|
* 1. `plugin/hooks/hooks.json` calls
|
|
9
|
-
* node "${CLAUDE_PROJECT_DIR}/node_modules/paperlint/bin/
|
|
9
|
+
* node "${CLAUDE_PROJECT_DIR}/node_modules/paperlint/bin/paperlint.mjs" hook <name>
|
|
10
10
|
* — the hook wiring was fixed exactly because it addressed a file the consumer did not have;
|
|
11
11
|
* changing it the next day would be the same class of error;
|
|
12
|
-
* 2. docs/configuration.md documents `import { buildConfig } from "paperlint/bin/
|
|
12
|
+
* 2. docs/configuration.md documents `import { buildConfig } from "paperlint/bin/paperlint.mjs"`.
|
|
13
13
|
* A move would cost both, and yield zero: a file name says nothing about what language it is in.
|
|
14
14
|
*
|
|
15
15
|
* 🔴 AND WHY THE FAILURE HERE IS LOUD. A consumer who installed the package from the registry
|
|
@@ -6,13 +6,13 @@ export const shQuote = (s) => `'${s.replace(/'/g, `'"'"'`)}'`;
|
|
|
6
6
|
/** The stub standing in for `pdftohtml`: it answers `-v` and refuses to convert anything. */
|
|
7
7
|
export const PDFTOHTML_STUB = [
|
|
8
8
|
"#!/bin/sh",
|
|
9
|
-
"#
|
|
10
|
-
"# asks `pdftohtml -v` which dialect to expect; this answers with the one
|
|
9
|
+
"# paperlint: banal reads the banal input XML it writes, never a PDF. banal still",
|
|
10
|
+
"# asks `pdftohtml -v` which dialect to expect; this answers with the one paperlint writes.",
|
|
11
11
|
'if [ "$1" = "-v" ]; then',
|
|
12
12
|
` echo "pdftohtml version ${XML_DIALECT.version}"`,
|
|
13
13
|
" exit 0",
|
|
14
14
|
"fi",
|
|
15
|
-
'echo "
|
|
15
|
+
'echo "paperlint: this pdftohtml only answers -v; banal was given a PDF instead of the banal input XML" >&2',
|
|
16
16
|
"exit 1",
|
|
17
17
|
"",
|
|
18
18
|
].join("\n");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"invocation.js","sourceRoot":"","sources":["../../../src/adapters/banal/invocation.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAEhD,2EAA2E;AAC3E,MAAM,CAAC,MAAM,YAAY,GAAG,OAAO,CAAC;AAKpC,mGAAmG;AACnG,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,CAAS,EAAY,EAAE,CAC7C,IAAI,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,GAAe,CAAC;AAE9C,6FAA6F;AAC7F,MAAM,CAAC,MAA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AC,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,IAAI,CAAC;KACnC,CAAC;AACnB,CAAC;AAED,mFAAmF;AACnF,MAAM,UAAU,YAAY,CAC1B,KAAmB,EACnB,MAAmB,EACnB,OAAyC;IAEzC,OAAO;QACL,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,CAAC,GAAG,CAAC;QACnD,GAAG,EAAE,EAAE,GAAG,OAAO,EAAE,SAAS,EAAE,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE;QACpD,SAAS,EAAE,YAAY;QACvB,cAAc,EAAE,EAAE,GAAG,IAAI,GAAG,IAAI;KACjC,CAAC;AACJ,CAAC"}
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
*
|
|
9
9
|
* ── THE LICENCE BOUNDARY ────────────────────────────────────────────────────────
|
|
10
10
|
* banal is GPL-2.0-or-later; paperlint is MIT. paperlint therefore never contains banal: `paperlint toolchain`
|
|
11
|
-
* DOWNLOADS it from HotCRP at a pinned commit, checks its sha256, and stores it in
|
|
11
|
+
* DOWNLOADS it from HotCRP at a pinned commit, checks its sha256, and stores it in paperlint's cache, and
|
|
12
12
|
* paperlint EXECUTES it as a separate program (`perl banal …`), reading its JSON output. Nothing of banal
|
|
13
13
|
* is copied, vendored, linked or translated into this package.
|
|
14
14
|
*
|
|
@@ -9,7 +9,7 @@ import { acceptProbe, PROBE_PAGE } from "./probe.js";
|
|
|
9
9
|
export const BANAL_DOWNLOAD_SECONDS = 60;
|
|
10
10
|
/** Run `banal` on `pages` in a scratch directory that is gone when this returns. */
|
|
11
11
|
function runBanal(d, s, banal, pages) {
|
|
12
|
-
return d.workspace.within("
|
|
12
|
+
return d.workspace.within("paperlint-banal-", (scratch) => parseBanalOutput(d.run.run(banalCommand(banal, stage(scratch, stageBanalInput(pages)), s.processEnv))));
|
|
13
13
|
}
|
|
14
14
|
/**
|
|
15
15
|
* The page geometry banal measures for `pages` — the banal found by `$BANAL`, the project's
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run.js","sourceRoot":"","sources":["../../../src/adapters/banal/run.ts"],"names":[],"mappings":"AAgCA,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,EAAE,EAAe,MAAM,wBAAwB,CAAC;AAEvE,OAAO,EACL,YAAY,EACZ,YAAY,EACZ,KAAK,EACL,eAAe,GAChB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzD,OAAO,EACL,cAAc,EACd,WAAW,EACX,SAAS,GAIV,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,UAAU,EACV,gBAAgB,GAEjB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAoB,MAAM,UAAU,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAIrD,gCAAgC;AAChC,MAAM,CAAC,MAAM,sBAAsB,GAAG,EAAE,CAAC;AA+BzC,oFAAoF;AACpF,SAAS,QAAQ,CACf,CAAY,EACZ,CAAgB,EAChB,KAAmB,EACnB,KAA4B;IAE5B,OAAO,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"run.js","sourceRoot":"","sources":["../../../src/adapters/banal/run.ts"],"names":[],"mappings":"AAgCA,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,EAAE,EAAe,MAAM,wBAAwB,CAAC;AAEvE,OAAO,EACL,YAAY,EACZ,YAAY,EACZ,KAAK,EACL,eAAe,GAChB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzD,OAAO,EACL,cAAc,EACd,WAAW,EACX,SAAS,GAIV,MAAM,aAAa,CAA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} from "../../domain/host.ts";
|
|
2
2
|
import type { AbsolutePath } from "../../domain/paths.ts";
|
|
3
|
-
/** An explicit banal to use instead of
|
|
3
|
+
/** An explicit banal to use instead of paperlint's (a path to the script). */
|
|
4
4
|
export declare const BANAL_ENV = "BANAL";
|
|
5
|
-
/** Where `paperlint toolchain` stores banal. Default: `$XDG_CACHE_HOME/
|
|
6
|
-
export declare const BANAL_DIR_ENV = "
|
|
5
|
+
/** Where `paperlint toolchain` stores banal. Default: `$XDG_CACHE_HOME/paperlint/banal`, else `~/.cache/paperlint/banal`. */
|
|
6
|
+
export declare const BANAL_DIR_ENV = "PAPERLINT_BANAL_DIR";
|
|
7
7
|
export interface BanalSettings {
|
|
8
8
|
/** `$BANAL`: the user's explicit choice; null when unset. */
|
|
9
9
|
readonly explicit: AbsolutePath | null;
|
|
10
|
-
/** `$
|
|
10
|
+
/** `$PAPERLINT_BANAL_DIR` › `$XDG_CACHE_HOME/paperlint/banal` › `<home>/.cache/paperlint/banal`. */
|
|
11
11
|
readonly cacheDir: AbsolutePath;
|
|
12
12
|
/** Where scratch directories go. */
|
|
13
13
|
readonly tmpDir: AbsolutePath;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../../src/adapters/banal/settings.ts"],"names":[],"mappings":"AAMA,OAAO,EAEL,KAAK,WAAW,EAChB,KAAK,QAAQ,EACd,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAE1D,
|
|
1
|
+
{"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../../src/adapters/banal/settings.ts"],"names":[],"mappings":"AAMA,OAAO,EAEL,KAAK,WAAW,EAChB,KAAK,QAAQ,EACd,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAE1D,8EAA8E;AAC9E,eAAO,MAAM,SAAS,UAAU,CAAC;AACjC,6HAA6H;AAC7H,eAAO,MAAM,aAAa,wBAAwB,CAAC;AAEnD,MAAM,WAAW,aAAa;IAC5B,6DAA6D;IAC7D,QAAQ,CAAC,QAAQ,EAAE,YAAY,GAAG,IAAI,CAAC;IACvC,oGAAoG;IACpG,QAAQ,CAAC,QAAQ,EAAE,YAAY,CAAC;IAChC,oCAAoC;IACpC,QAAQ,CAAC,MAAM,EAAE,YAAY,CAAC;IAC9B,+FAA+F;IAC/F,QAAQ,CAAC,UAAU,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;CACvD;AAoBD,wBAAgB,kBAAkB,CAChC,GAAG,EAAE,WAAW,EAChB,IAAI,EAAE,QAAQ,GACb,aAAa,CAQf"}
|
|
@@ -5,17 +5,17 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { join, resolve } from "node:path";
|
|
7
7
|
import { childEnv, } from "../../domain/host.js";
|
|
8
|
-
/** An explicit banal to use instead of
|
|
8
|
+
/** An explicit banal to use instead of paperlint's (a path to the script). */
|
|
9
9
|
export const BANAL_ENV = "BANAL";
|
|
10
|
-
/** Where `paperlint toolchain` stores banal. Default: `$XDG_CACHE_HOME/
|
|
11
|
-
export const BANAL_DIR_ENV = "
|
|
10
|
+
/** Where `paperlint toolchain` stores banal. Default: `$XDG_CACHE_HOME/paperlint/banal`, else `~/.cache/paperlint/banal`. */
|
|
11
|
+
export const BANAL_DIR_ENV = "PAPERLINT_BANAL_DIR";
|
|
12
12
|
/** `resolve` with an absolute base never consults the process's cwd. */
|
|
13
13
|
const absolute = (cwd, p) => resolve(cwd, p);
|
|
14
14
|
/** An unset variable and an empty one mean the same: not set. */
|
|
15
15
|
const set = (v) => (v ? v : null);
|
|
16
16
|
function cacheDirOf(env, d) {
|
|
17
17
|
return (set(env[BANAL_DIR_ENV]) ??
|
|
18
|
-
join(set(env["XDG_CACHE_HOME"]) ?? join(d.home, ".cache"), "
|
|
18
|
+
join(set(env["XDG_CACHE_HOME"]) ?? join(d.home, ".cache"), "paperlint", "banal"));
|
|
19
19
|
}
|
|
20
20
|
export function parseBanalSettings(env, dirs) {
|
|
21
21
|
const explicit = set(env[BANAL_ENV]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settings.js","sourceRoot":"","sources":["../../../src/adapters/banal/settings.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EACL,QAAQ,GAGT,MAAM,sBAAsB,CAAC;AAG9B,
|
|
1
|
+
{"version":3,"file":"settings.js","sourceRoot":"","sources":["../../../src/adapters/banal/settings.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EACL,QAAQ,GAGT,MAAM,sBAAsB,CAAC;AAG9B,8EAA8E;AAC9E,MAAM,CAAC,MAAM,SAAS,GAAG,OAAO,CAAC;AACjC,6HAA6H;AAC7H,MAAM,CAAC,MAAM,aAAa,GAAG,qBAAqB,CAAC;AAanD,wEAAwE;AACxE,MAAM,QAAQ,GAAG,CAAC,GAAW,EAAE,CAAS,EAAgB,EAAE,CACxD,OAAO,CAAC,GAAG,EAAE,CAAC,CAAiB,CAAC;AAElC,iEAAiE;AACjE,MAAM,GAAG,GAAG,CAAC,CAAqB,EAAiB,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;AAErE,SAAS,UAAU,CAAC,GAAgB,EAAE,CAAW;IAC/C,OAAO,CACL,GAAG,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;QACvB,IAAI,CACF,GAAG,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE,QAAQ,CAAC,EACpD,WAAW,EACX,OAAO,CACR,CACF,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,kBAAkB,CAChC,GAAgB,EAChB,IAAc;IAEd,MAAM,QAAQ,GAAG,GAAG,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC;IACrC,OAAO;QACL,QAAQ,EAAE,QAAQ,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,EAAE,QAAQ,CAAC;QACjE,QAAQ,EAAE,QAAQ,CAAC,IAAI,CAAC,GAAG,EAAE,UAAU,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;QACnD,MAAM,EAAE,QAAQ,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC;QACpC,UAAU,EAAE,QAAQ,CAAC,GAAG,CAAC;KAC1B,CAAC;AACJ,CAAC"}
|
|
@@ -58,7 +58,7 @@ export function pdf2xml(pages) {
|
|
|
58
58
|
const lines = [
|
|
59
59
|
'<?xml version="1.0" encoding="UTF-8"?>',
|
|
60
60
|
'<!DOCTYPE pdf2xml SYSTEM "pdf2xml.dtd">',
|
|
61
|
-
`<pdf2xml producer="
|
|
61
|
+
`<pdf2xml producer="paperlint (pdf.js)" version="${XML_DIALECT.version}">`,
|
|
62
62
|
...pages.flatMap((p, i) => pageXml(p, i + 1, fonts)),
|
|
63
63
|
"</pdf2xml>",
|
|
64
64
|
];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"xml.js","sourceRoot":"","sources":["../../../src/adapters/banal/xml.ts"],"names":[],"mappings":"AAiCA;;;;GAIG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,SAAS,EAAW,CAAC;AAEpE,MAAM,KAAK,GAAG,SAAS,CAAC;AAExB,gFAAgF;AAChF,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,CAAU,EAAW,EAAE,CAC7C,CAAC,CAAC,OAAO,IAAI,CAAC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OAAO,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,KAAK,CAAC,CAAC;QACpD,YAAY;KACb,CAAC;IACF,OAAO,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC;AACjC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"download.io.d.ts","sourceRoot":"","sources":["../../../src/adapters/curl/download.io.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAGtE,gFAAgF;AAChF,wBAAgB,WAAW,CAAC,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,IAAI,CAQzD;AAUD;;;GAGG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAAE;IAC9B,QAAQ,CAAC,GAAG,EAAE,UAAU,CAAC;IACzB,QAAQ,CAAC,GAAG,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IAC/C,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB,GAAG,QAAQ,
|
|
1
|
+
{"version":3,"file":"download.io.d.ts","sourceRoot":"","sources":["../../../src/adapters/curl/download.io.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAGtE,gFAAgF;AAChF,wBAAgB,WAAW,CAAC,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,IAAI,CAQzD;AAUD;;;GAGG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAAE;IAC9B,QAAQ,CAAC,GAAG,EAAE,UAAU,CAAC;IACzB,QAAQ,CAAC,GAAG,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IAC/C,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB,GAAG,QAAQ,CAkCX"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* `Download` through `curl -fsSL`. Not Node's `fetch`: undici's `fetch` ignores `HTTPS_PROXY` unless
|
|
3
|
-
* a proxy agent is installed, and
|
|
3
|
+
* a proxy agent is installed, and paperlint's CI and the containers it runs in reach the network only
|
|
4
4
|
* through a proxy. curl reads the proxy variables itself. (A claim from documentation, not measured
|
|
5
5
|
* here — the port is what makes trying the other adapter cheap.)
|
|
6
6
|
*/
|
|
@@ -36,7 +36,7 @@ const readOrNull = (p) => {
|
|
|
36
36
|
export function curlDownload(o) {
|
|
37
37
|
return {
|
|
38
38
|
fetch(url, timeoutMs) {
|
|
39
|
-
const dir = realpathSync(mkdtempSync(join(o.tmpDir, "
|
|
39
|
+
const dir = realpathSync(mkdtempSync(join(o.tmpDir, "paperlint-download-")));
|
|
40
40
|
const out = join(dir, "body");
|
|
41
41
|
try {
|
|
42
42
|
const seconds = String(Math.ceil(timeoutMs / 1000));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"download.io.js","sourceRoot":"","sources":["../../../src/adapters/curl/download.io.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAC1E,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAGjD,OAAO,EAAE,GAAG,EAAE,EAAE,EAAE,MAAM,wBAAwB,CAAC;AAEjD,gFAAgF;AAChF,MAAM,UAAU,WAAW,CAAC,CAAc;IACxC,IAAI,CAAC,CAAC,IAAI,KAAK,QAAQ,IAAI,CAAC,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC;IACvD,IAAI,CA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