@kurvball/rehearse 1.5.0 → 1.6.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.
@@ -27,6 +27,7 @@ export interface FileSpec {
27
27
  output: OutputSpec | OutputSpec[];
28
28
  setAside?: {
29
29
  columns?: string[];
30
+ keys?: string[];
30
31
  values?: string[];
31
32
  keep?: string[];
32
33
  };
@@ -209,6 +209,7 @@ async function runOne(s, ctx) {
209
209
  }
210
210
  const rulesFor = (rules, spec, o, outputs) => ({
211
211
  ...rules,
212
+ keys: [...rules.keys, ...(spec.setAside?.keys ?? []).map((k) => new RegExp(k))],
212
213
  values: [...rules.values, ...(spec.setAside?.values ?? []).map((v) => new RegExp(v))],
213
214
  keep: [...rules.keep, ...(spec.setAside?.keep ?? [])],
214
215
  unordered: rules.unordered || (outputs.find((x) => x.file === o.file)?.unordered ?? false),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kurvball/rehearse",
3
- "version": "1.5.0",
3
+ "version": "1.6.0",
4
4
  "description": "Rehearse a change before it ships: bring the product up, sign in as named people, start from named worlds, and compare any scenario on the base and on the head.",
5
5
  "homepage": "https://rehearse.kurvball.ca/",
6
6
  "repository": {
@@ -95,6 +95,13 @@
95
95
  "type": "string"
96
96
  }
97
97
  },
98
+ "keys": {
99
+ "description": "Regular expressions over the keys of a JSON output, whose values are set aside, such as ^ms$ or ^version$.",
100
+ "type": "array",
101
+ "items": {
102
+ "type": "string"
103
+ }
104
+ },
98
105
  "values": {
99
106
  "type": "array",
100
107
  "items": {