@ihyeon/error-to-test 0.1.5 → 0.1.6

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.
Files changed (2) hide show
  1. package/dist/input.js +2 -1
  2. package/package.json +1 -1
package/dist/input.js CHANGED
@@ -172,8 +172,9 @@ export function parseInput(content, options = {}) {
172
172
  let raw;
173
173
  if (isJson) {
174
174
  let parsed;
175
+ // Ignore a file's BOM only while parsing; provenance hashes the original content.
175
176
  try {
176
- parsed = JSON.parse(content);
177
+ parsed = JSON.parse(content.replace(/^\uFEFF/, ''));
177
178
  }
178
179
  catch {
179
180
  throw new Error('Malformed JSON input');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ihyeon/error-to-test",
3
- "version": "0.1.5",
3
+ "version": "0.1.6",
4
4
  "description": "Turn captured browser errors and pasted error reports into traceable regression test candidates.",
5
5
  "license": "MIT",
6
6
  "author": "Hyeonse Im",