@washy-washy/core 1.5.3 → 1.5.5
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/dist/index.d.mts +2 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +17 -7
package/dist/index.d.mts
CHANGED
|
@@ -8,7 +8,7 @@ import { A as mixTags, B as formatTemperature, C as ColourGroup, D as Variant, E
|
|
|
8
8
|
* const instructions = parseInstructions(csvFileContents, machine);
|
|
9
9
|
* ```
|
|
10
10
|
*/
|
|
11
|
-
declare function parseInstructions(source: string, machine: Machine): Instruction[];
|
|
11
|
+
export declare function parseInstructions(source: string, machine: Machine): Instruction[];
|
|
12
12
|
//#endregion
|
|
13
|
-
export { Blocker, COLUMNS, CONFIG_SCHEMA_URL, ColourGroup, Config, Instruction, Iron, IronSetting, MAX_WASHER_OPTION_LENGTH, MAX_WASHER_PROGRAM_LENGTH, MAX_WASHER_SPIN_LENGTH, MAX_WASHER_TEMPERATURE_LENGTH, Machine, MixTag, ResolvedInstruction, Row, RowError, Variant, Washer, blockerCode, blockerLegend, canMix, cardGroups, chartFromJson, chartToJson, colourGroups, configFromJson, configToJson, durationsOf, formatTemperature, instructionsFromRows, ironGroups, ironSetting, ironSettingKeys, loadGroups, mixBlocker, mixTags, parseConfig,
|
|
13
|
+
export { Blocker, COLUMNS, CONFIG_SCHEMA_URL, ColourGroup, Config, Instruction, Iron, IronSetting, MAX_WASHER_OPTION_LENGTH, MAX_WASHER_PROGRAM_LENGTH, MAX_WASHER_SPIN_LENGTH, MAX_WASHER_TEMPERATURE_LENGTH, Machine, MixTag, ResolvedInstruction, Row, RowError, Variant, Washer, blockerCode, blockerLegend, canMix, cardGroups, chartFromJson, chartToJson, colourGroups, configFromJson, configToJson, durationsOf, formatTemperature, instructionsFromRows, ironGroups, ironSetting, ironSettingKeys, loadGroups, mixBlocker, mixTags, parseConfig, parseMachine, resolve, rowsFromInstructions, variants, washGroups };
|
|
14
14
|
//# sourceMappingURL=index.d.mts.map
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":[],"sources":["../src/csv.ts"],"sourcesContent":["import { parse } from \"csv-parse/sync\";\nimport type { Machine } from \"./machine\";\nimport { instructionsFromRows } from \"./rows\";\nimport type { Instruction } from \"./types\";\n\n/**\n * Parses the instruction CSV. See `instructionsFromRows` for the row rules.\n *\n * @example\n * ```ts\n * const instructions = parseInstructions(csvFileContents, machine);\n * ```\n */\nexport function parseInstructions(source: string, machine: Machine): Instruction[] {\n const records: Record<string, string>[] = parse(source, {\n columns: true,\n skip_empty_lines: true,\n trim: true,\n bom: true,\n });\n if (records.length === 0) throw new Error(\"the CSV has a header but no rows\");\n return instructionsFromRows(records, machine);\n}\n"],"mappings":";;;;;;;;;;;AAaA,SAAgB,kBAAkB,QAAgB,SAAiC;CACjF,MAAM,UAAoC,MAAM,QAAQ;EACtD,SAAS;EACT,kBAAkB;EAClB,MAAM;
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../src/csv.ts"],"sourcesContent":["import { parse } from \"csv-parse/sync\";\nimport type { Machine } from \"./machine\";\nimport { instructionsFromRows } from \"./rows\";\nimport type { Instruction } from \"./types\";\n\n/**\n * Parses the instruction CSV. See `instructionsFromRows` for the row rules.\n *\n * @example\n * ```ts\n * const instructions = parseInstructions(csvFileContents, machine);\n * ```\n */\nexport function parseInstructions(source: string, machine: Machine): Instruction[] {\n const records: Record<string, string>[] = parse(source, {\n columns: true,\n skip_empty_lines: true,\n trim: true,\n // Stryker disable next-line BooleanLiteral: equivalent given `trim`\n // above. `trim` strips leading/trailing whitespace per RFC, and the\n // BOM character (U+FEFF) is itself in ECMA-262's WhiteSpace set, so\n // `trim: true` already removes a leading BOM from a string input —\n // confirmed empirically (csv-parse@7.0.2, Node) that `bom: true` vs\n // `false` produce byte-identical output whenever `trim: true` is set.\n // Kept for the case a caller feeds this a Buffer instead of a string,\n // where csv-parse's own decoding runs before `trim` ever sees the data.\n bom: true,\n });\n if (records.length === 0) throw new Error(\"the CSV has a header but no rows\");\n return instructionsFromRows(records, machine);\n}\n"],"mappings":";;;;;;;;;;;AAaA,SAAgB,kBAAkB,QAAgB,SAAiC;CACjF,MAAM,UAAoC,MAAM,QAAQ;EACtD,SAAS;EACT,kBAAkB;EAClB,MAAM;EASN,KAAK;CACP,CAAC;CACD,IAAI,QAAQ,WAAW,GAAG,MAAM,IAAI,MAAM,kCAAkC;CAC5E,OAAO,qBAAqB,SAAS,OAAO;AAC9C"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@washy-washy/core",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.5",
|
|
4
4
|
"description": "Chart parsing, mixing rules and machine validation for washy-washy — a laundry chart generator.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"laundry",
|
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
"default": "./dist/browser.mjs"
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
|
+
"types": "./dist/index.d.mts",
|
|
28
29
|
"files": [
|
|
29
30
|
"dist",
|
|
30
31
|
"schema",
|
|
@@ -33,7 +34,7 @@
|
|
|
33
34
|
],
|
|
34
35
|
"scripts": {
|
|
35
36
|
"build": "tsdown",
|
|
36
|
-
"check": "bun run lint && bun run lint:md && bun run lint:yaml && bun run lint:package-json && bun run lint:prose && bun run lint:schema && bun run typecheck && bun test",
|
|
37
|
+
"check": "bun run lint && bun run lint:md && bun run lint:yaml && bun run lint:package-json && bun run lint:prose && bun run lint:schema && bun run lint:types-d && bun run typecheck && bun test",
|
|
37
38
|
"docs": "typedoc",
|
|
38
39
|
"format": "prettier --write .",
|
|
39
40
|
"lint": "biome check .",
|
|
@@ -43,36 +44,45 @@
|
|
|
43
44
|
"lint:prose": ".tools/vale --glob='!{styles/**,CHANGELOG.md}' --minAlertLevel=error .",
|
|
44
45
|
"lint:prose:advice": ".tools/vale --glob='!{styles/**,CHANGELOG.md}' .",
|
|
45
46
|
"lint:schema": "bun run schema && git diff --exit-code schema/",
|
|
47
|
+
"lint:types-d": "bun run build && tsd --files \"test-d/**/*.test-d.ts\"",
|
|
46
48
|
"lint:yaml": "prettier --check \"**/*.{yml,yaml}\"",
|
|
49
|
+
"mutation": "stryker run",
|
|
47
50
|
"prepare": "lefthook install",
|
|
48
51
|
"prose:sync": "bun run scripts/install-vale.ts && .tools/vale sync",
|
|
49
52
|
"schema": "ts-json-schema-generator --path src/config.ts --type Config --tsconfig tsconfig.json -o schema/config.schema.json && biome format --write schema/config.schema.json",
|
|
50
53
|
"test": "bun test",
|
|
51
54
|
"typecheck": "tsc --noEmit"
|
|
52
55
|
},
|
|
56
|
+
"overrides": {
|
|
57
|
+
"qs": "6.16.0",
|
|
58
|
+
"smol-toml": "1.7.2"
|
|
59
|
+
},
|
|
53
60
|
"dependencies": {
|
|
54
61
|
"csv-parse": "7.0.2"
|
|
55
62
|
},
|
|
56
63
|
"devDependencies": {
|
|
57
|
-
"@biomejs/biome": "2.5.
|
|
64
|
+
"@biomejs/biome": "2.5.12",
|
|
58
65
|
"@commitlint/cli": "21.2.2",
|
|
59
66
|
"@commitlint/config-conventional": "21.2.2",
|
|
67
|
+
"@hughescr/stryker-bun-runner": "1.3.8",
|
|
60
68
|
"@semantic-release/changelog": "7.0.0",
|
|
61
69
|
"@semantic-release/git": "11.0.1",
|
|
62
70
|
"@semantic-release/github": "12.0.9",
|
|
63
71
|
"@semantic-release/npm": "13.1.5",
|
|
64
72
|
"@semantic-release/release-notes-generator": "14.1.1",
|
|
65
|
-
"@
|
|
73
|
+
"@stryker-mutator/core": "10.0.0",
|
|
74
|
+
"@types/bun": "1.4.2",
|
|
66
75
|
"conventional-changelog-conventionalcommits": "9.3.1",
|
|
67
|
-
"lefthook": "2.1.
|
|
76
|
+
"lefthook": "2.1.12",
|
|
68
77
|
"markdownlint-cli2": "0.23.2",
|
|
69
78
|
"prettier": "3.9.6",
|
|
70
79
|
"semantic-release": "25.0.9",
|
|
71
80
|
"sort-package-json": "4.0.0",
|
|
72
81
|
"ts-json-schema-generator": "2.9.0",
|
|
73
|
-
"
|
|
82
|
+
"tsd": "0.33.0",
|
|
83
|
+
"tsdown": "0.23.0",
|
|
74
84
|
"typedoc": "0.28.20",
|
|
75
|
-
"typescript": "
|
|
85
|
+
"typescript": "7.0.2"
|
|
76
86
|
},
|
|
77
87
|
"engines": {
|
|
78
88
|
"node": ">=18"
|