@ca-plant-list/ca-plant-list 0.4.12 → 0.4.13
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/data/taxa.csv +1 -1
- package/lib/genera.js +1 -1
- package/lib/index.d.ts +4 -4
- package/lib/taxa.js +5 -2
- package/package.json +1 -1
package/data/taxa.csv
CHANGED
@@ -674,7 +674,7 @@ Eremalche exilis,,N,24546,3045,58199,White Mallow
|
|
674
674
|
Eremalche parryi subsp. parryi,,N,50324,3049,58936,Parry's Mallow
|
675
675
|
Eremothera boothii subsp. decorticans,shredding evening-primrose,N,89263,11654,79836,Desert Shredding Primrose
|
676
676
|
Eriastrum abramsii,,N,24587,3052,57203,Abrams' Woollystar
|
677
|
-
Eriastrum ertterae,Lime Ridge eriastrum,N,99214,13079,473592,Lime Ridge Eriastrum,,,,,3786,1B.1,
|
677
|
+
Eriastrum ertterae,Lime Ridge eriastrum,N,99214,13079,473592,Lime Ridge Eriastrum,,,,,3786,1B.1,CE,,S1,G1
|
678
678
|
Eriastrum pluriflorum subsp. pluriflorum,,N,50337,11660,79842,Many-flowered Eriastrum
|
679
679
|
Eriastrum pluriflorum,many-flowered eriastrum,N,24595,3065,58239,Many Flowered Eriastrum
|
680
680
|
Ericameria arborescens,golden-fleece,N,2583,3071,63924,Golden Fleece
|
package/lib/genera.js
CHANGED
package/lib/index.d.ts
CHANGED
@@ -6,14 +6,14 @@ export class Config {
|
|
6
6
|
prefix: string,
|
7
7
|
name: string,
|
8
8
|
subcategory?: string,
|
9
|
-
defaultValue?: string
|
9
|
+
defaultValue?: string,
|
10
10
|
): string;
|
11
11
|
getCountyCodes(): string[];
|
12
12
|
getLabel(name: string, dflt: string): string;
|
13
13
|
}
|
14
14
|
|
15
15
|
export class CSV {
|
16
|
-
static parseFile(dir: string, fileName: string):
|
16
|
+
static parseFile(dir: string, fileName: string): Record<string, string>[];
|
17
17
|
}
|
18
18
|
|
19
19
|
export class ErrorLog {
|
@@ -31,7 +31,7 @@ export class Files {
|
|
31
31
|
static exists(fileName: string): boolean;
|
32
32
|
static fetch(
|
33
33
|
url: string | URL,
|
34
|
-
targetFileName: string | undefined
|
34
|
+
targetFileName: string | undefined,
|
35
35
|
): Promise<Headers>;
|
36
36
|
static mkdir(dir: string): void;
|
37
37
|
static rmDir(dir: string): void;
|
@@ -50,7 +50,7 @@ export class Taxa {
|
|
50
50
|
showFlowerErrors: boolean,
|
51
51
|
taxonFactory?: (td: TaxonData, g: Genera) => Taxon,
|
52
52
|
extraTaxa?: TaxonData[],
|
53
|
-
extraSynonyms?: SynonymData[]
|
53
|
+
extraSynonyms?: SynonymData[],
|
54
54
|
);
|
55
55
|
getTaxon(name: string): Taxon;
|
56
56
|
getTaxonList(): Taxon[];
|
package/lib/taxa.js
CHANGED
@@ -62,18 +62,21 @@ class Taxa {
|
|
62
62
|
const dataDir = Config.getPackageDir() + "/data";
|
63
63
|
|
64
64
|
this.#families = new Families();
|
65
|
+
const genera = new Genera(this.#families);
|
65
66
|
|
66
67
|
const taxaCSV = new TaxaCSV(dataDir);
|
67
68
|
this.#loadTaxa(
|
68
69
|
taxaCSV.getTaxa(),
|
69
70
|
inclusionList,
|
70
71
|
taxonFactory,
|
72
|
+
genera,
|
71
73
|
showFlowerErrors,
|
72
74
|
);
|
73
75
|
this.#loadTaxa(
|
74
76
|
extraTaxa,
|
75
77
|
inclusionList,
|
76
78
|
taxonFactory,
|
79
|
+
genera,
|
77
80
|
showFlowerErrors,
|
78
81
|
);
|
79
82
|
|
@@ -184,10 +187,10 @@ class Taxa {
|
|
184
187
|
* @param {TaxonData[]} taxaCSV
|
185
188
|
* @param {Object<string,TaxonData>|true} inclusionList
|
186
189
|
* @param {function(TaxonData,Genera):Taxon} taxonFactory
|
190
|
+
* @param {Genera} genera
|
187
191
|
* @param {boolean} showFlowerErrors
|
188
192
|
*/
|
189
|
-
#loadTaxa(taxaCSV, inclusionList, taxonFactory, showFlowerErrors) {
|
190
|
-
const genera = new Genera(this.#families);
|
193
|
+
#loadTaxa(taxaCSV, inclusionList, taxonFactory, genera, showFlowerErrors) {
|
191
194
|
for (const row of taxaCSV) {
|
192
195
|
const name = row["taxon_name"];
|
193
196
|
|