@nstarkman/data-resolver 20261023.0.0 → 20261023.0.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.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,13 @@
3
3
  Versions are dates, `YYYYMMDD.0.N`; the four research-kit packages are released together at one
4
4
  version. A breaking change says how to migrate.
5
5
 
6
+ ## 20261023.0.1
7
+
8
+ ### Fixed
9
+
10
+ - `collect()` put the co-authors of every item it reached on the paper's collaborator map — its
11
+ packages' papers' too; it now puts only the paper's own co-authors.
12
+
6
13
  ## 20261023.0.0
7
14
 
8
15
  First release.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nstarkman/data-resolver",
3
- "version": "20261023.0.0",
3
+ "version": "20261023.0.1",
4
4
  "description": "The nstarkman.space data layer as a store, and the collector a paper site snapshots from.",
5
5
  "type": "module",
6
6
  "license": "MIT",
package/src/collect.js CHANGED
@@ -53,7 +53,8 @@ export async function collect(id, reader, { card } = {}) {
53
53
 
54
54
  const config = Object.fromEntries(await Promise.all(CONFIG.map(async (k) => [k, JSON.parse(await reader.read(`config/${k}.json`))])));
55
55
  const all = [...items.values()];
56
- const orcids = new Set(all.flatMap((i) => (i.authors ?? []).map((a) => a.orcid)).filter(Boolean));
56
+ // The map is the paper's own co-authors: not those of the papers it reaches (its packages').
57
+ const orcids = new Set((root.authors ?? []).map((a) => a.orcid).filter(Boolean));
57
58
  const people = config.collaborators.people.filter((p) => orcids.has(p.orcid));
58
59
  const orgs = new Set([
59
60
  ...people.flatMap((p) => p.affiliations.map((a) => a.organization)),