parcel icon indicating copy to clipboard operation
parcel copied to clipboard

Ensure that we always emit a diagnostic for JSON5 errors

Open mischnic opened this issue 5 years ago β€’ 9 comments

β†ͺ️ Pull Request

Pull JSON5 parsing & creation of a diagnostic with codeframe into utils and use everywhere.

Inspired by https://github.com/parcel-bundler/parcel/issues/4863

mischnic avatar Jul 08 '20 18:07 mischnic

Link Height tasks by mentioning a task ID in the pull request title or description, commit messages, or comments.

πŸ’‘Tip: You can also use "Close T-X" to automatically close a task when the pull request is merged.

height[bot] avatar Jul 08 '20 18:07 height[bot]

@DeMoorJasper This might throw a diagnostic with a codeframe https://github.com/parcel-bundler/parcel/blob/0007639be612389cce0d6406df407b221054143a/packages/reporters/dev-server/src/Server.js#L303 but errors in a reporter don't go through the CLIReporter / prettifyDiagnostic. How should we handle this? Make the server reporter run prettifyDiagnostic?

mischnic avatar Jul 08 '20 18:07 mischnic

@mischnic we can add a try/catch in the server reporter and manually dispatch it to the logger using logger.error(...)?

DeMoorJasper avatar Jul 08 '20 18:07 DeMoorJasper

Benchmark Results

Kitchen Sink βœ…

Timings

Description Time Difference
Cold 7.37s +196.00ms
Cached 2.59s +46.00ms

Cold Bundles

Bundle Size Difference Time Difference
dist/legacy/parcel.d5807e82.webp 102.94kb +0.00b 265.00ms -63.00ms πŸš€
dist/modern/parcel.d5807e82.webp 102.94kb +0.00b 265.00ms -61.00ms πŸš€
dist/legacy/index.42516b4a.js 1.10kb +0.00b 1.95s +188.00ms ⚠️
dist/modern/index.8a1ced31.js 1.10kb +0.00b 1.95s +188.00ms ⚠️
dist/legacy/index.html 701.00b +0.00b 769.00ms -46.00ms πŸš€
dist/modern/index.html 701.00b +0.00b 767.00ms -45.00ms πŸš€
dist/legacy/index.0e158b6b.css 77.00b +0.00b 1.95s +358.00ms ⚠️

Cached Bundles

Bundle Size Difference Time Difference
dist/legacy/parcel.d5807e82.webp 102.94kb +0.00b 276.00ms -28.00ms πŸš€
dist/modern/parcel.d5807e82.webp 102.94kb +0.00b 277.00ms -28.00ms πŸš€
dist/legacy/index.42516b4a.js 1.10kb +0.00b 504.00ms -94.00ms πŸš€
dist/modern/index.8a1ced31.js 1.10kb +0.00b 503.00ms -95.00ms πŸš€
dist/legacy/index.html 701.00b +0.00b 506.00ms -94.00ms πŸš€
dist/modern/index.html 701.00b +0.00b 503.00ms -95.00ms πŸš€
dist/legacy/index.0e158b6b.css 77.00b +0.00b 504.00ms -95.00ms πŸš€
dist/modern/index.e480862d.css 77.00b +0.00b 503.00ms -95.00ms πŸš€
React HackerNews βœ…

Timings

Description Time Difference
Cold 31.39s -389.00ms
Cached 2.60s -55.00ms

Cold Bundles

Bundle Size Difference Time Difference
dist/logo.24c8bf9e.png 274.00b +0.00b 185.00ms +20.00ms ⚠️

Cached Bundles

Bundle Size Difference Time Difference
dist/index.js 478.15kb +0.00b 259.00ms -119.00ms πŸš€
dist/PermalinkedComment.c85d137d.js 4.22kb +0.00b 256.00ms -119.00ms πŸš€
dist/UserProfile.30e15baf.js 1.62kb +0.00b 256.00ms -119.00ms πŸš€
dist/NotFound.5aa6b041.js 387.00b +0.00b 256.00ms -119.00ms πŸš€
dist/logo.24c8bf9e.png 274.00b +0.00b 140.00ms -136.00ms πŸš€
AtlasKit Editor βœ…

Timings

Description Time Difference
Cold 3.44m -714.00ms
Cached 5.73s +291.00ms ⚠️

Cold Bundles

Bundle Size Difference Time Difference
dist/pdfRenderer.cd742f5e.js 1.11mb +0.00b 1.06m -13.65s πŸš€
dist/editorView.ae59b49f.js 585.98kb +0.00b 1.55m -16.63s πŸš€
dist/popup.4a66e15e.js 170.62kb +0.00b 40.87s -36.20s πŸš€
dist/EmojiPickerComponent.bab709db.js 97.89kb +0.00b 16.09s -1.75s πŸš€
dist/Toolbar.33a83ae3.js 92.34kb +0.00b 1.93m +36.02s ⚠️
dist/media-viewer.1d9322e7.js 69.09kb +0.00b 20.24s -3.10s πŸš€
dist/card.ce67dc35.js 55.09kb +0.00b 17.20s -2.25s πŸš€
dist/card.1007a95f.js 52.86kb +0.00b 1.08m -53.03s πŸš€
dist/Modal.e3bd77d0.js 41.40kb +0.00b 8.26s +1.61s ⚠️
dist/component.59edff1f.js 30.78kb +0.00b 5.03s -3.19s πŸš€
dist/component.37867f50.js 22.51kb +0.00b 8.25s +1.60s ⚠️
dist/js.48be70a4.js 16.40kb +0.00b 8.25s +1.60s ⚠️
dist/dropzone.c8c03b6a.js 14.36kb +0.00b 1.07m -53.65s πŸš€
dist/ui.cee430a3.js 13.97kb +0.00b 17.15s -2.28s πŸš€
dist/smartMediaEditor.7ee0079c.js 13.95kb +0.00b 1.09m -13.34s πŸš€
dist/workerHasher.65b8a1b7.js 11.78kb +0.00b 17.14s -2.29s πŸš€
dist/component.11476a92.js 6.05kb +0.00b 8.80s +1.51s ⚠️
dist/card.4ac5c1b2.js 5.61kb +0.00b 20.23s -3.08s πŸš€
dist/media-viewer.bc661bce.js 3.92kb +0.00b 20.24s -3.09s πŸš€
dist/index.393afe59.css 3.46kb +0.00b 8.38s -1.21m πŸš€
dist/png-chunks-extract.8d15a914.js 3.41kb +0.00b 8.25s +1.60s ⚠️
dist/dropzone.2f1a1e17.js 3.23kb +0.00b 40.83s -9.32s πŸš€
dist/Modal.2835744c.js 3.08kb +0.00b 8.25s +1.60s ⚠️
dist/clipboard.0244488f.js 2.75kb +0.00b 1.07m -13.15s πŸš€
dist/16.d1b8e6f7.js 2.38kb +0.00b 8.66s +7.37s ⚠️
dist/card.cadccd96.js 2.03kb +0.00b 38.13s -7.76s πŸš€
dist/date.d49e64f8.js 1.73kb +0.00b 9.41s +1.19s ⚠️
dist/16.f40c1329.js 1.73kb +0.00b 9.07s +1.50s ⚠️
dist/images.80270b1f.js 1.67kb +0.00b 9.41s -482.00ms πŸš€
dist/16.86a8c7d4.js 1.66kb +0.00b 8.80s +1.51s ⚠️
dist/feedback.8b7c7928.js 1.64kb +0.00b 9.89s +940.00ms ⚠️
dist/browser.16c438d4.js 1.61kb +0.00b 1.07m -14.25s πŸš€
dist/workerHasher.f66f00c7.js 1.54kb +0.00b 1.09m -52.78s πŸš€
dist/list-number.4632b459.js 1.46kb +0.00b 9.55s +1.13s ⚠️
dist/status.cccf04be.js 1.46kb +0.00b 9.80s +1.08s ⚠️
dist/16.cff410ff.js 1.38kb +0.00b 10.28s +2.71s ⚠️
dist/code.af9ca2b3.js 1.38kb +0.00b 9.27s +1.05s ⚠️
dist/16.c1ed07f8.js 1.33kb +0.00b 8.80s +1.51s ⚠️
dist/16.6603f2f3.js 1.33kb +0.00b 10.27s +785.00ms ⚠️
dist/16.a4b392c2.js 1.32kb +0.00b 5.03s +3.74s ⚠️
dist/16.249c644a.js 1.31kb +0.00b 9.27s +1.21s ⚠️
dist/link.d12cc130.js 1.30kb +0.00b 9.55s +1.13s ⚠️
dist/heading6.4c4017db.js 1.30kb +0.00b 9.89s +940.00ms ⚠️
dist/heading3.93606b9c.js 1.29kb +0.00b 9.89s +939.00ms ⚠️
dist/16.ab5c0088.js 1.27kb +0.00b 9.27s +1.21s ⚠️
dist/16.afee1494.js 1.23kb +0.00b 9.07s +1.01s ⚠️
dist/16.e60b4d77.js 1.21kb +0.00b 5.03s +3.74s ⚠️
dist/16.7c7a40c9.js 1.19kb +0.00b 9.07s +1.01s ⚠️
dist/16.06d5a67b.js 1.18kb +0.00b 9.27s +1.05s ⚠️
dist/heading5.dde15cec.js 1.17kb +0.00b 9.89s +940.00ms ⚠️
dist/media-card-analytics-error-boundary.6a25b970.js 1.15kb +0.00b 38.13s -7.80s πŸš€
dist/16.2096b9f3.js 1.14kb +0.00b 5.03s +3.74s ⚠️
dist/16.f040d62d.js 1.14kb +0.00b 9.07s +1.50s ⚠️
dist/16.ecf8a702.js 1.13kb +0.00b 8.80s +1.51s ⚠️
dist/16.1b342686.js 1.13kb +0.00b 10.27s +2.70s ⚠️
dist/16.2e7f52c6.js 1.13kb +0.00b 10.62s +3.05s ⚠️
dist/16.da43aa07.js 1.13kb +0.00b 8.80s +1.51s ⚠️
dist/heading2.e219309a.js 1.11kb +0.00b 9.80s +1.08s ⚠️
dist/16.dd07505e.js 1.10kb +0.00b 5.03s +3.74s ⚠️
dist/mention.b1828447.js 1.07kb +0.00b 9.55s +1.13s ⚠️
dist/heading4.5316f6f2.js 1.06kb +0.00b 9.89s +941.00ms ⚠️
dist/16.317b9164.js 1.05kb +0.00b 9.07s +1.01s ⚠️
dist/layout.ac6734f9.js 1.05kb +0.00b 9.55s +1.13s ⚠️
dist/quote.f4e09143.js 1.02kb +0.00b 9.80s +1.08s ⚠️
dist/action.cb287eb0.js 1.00kb +0.00b 9.27s +1.05s ⚠️
dist/decision.91f3af14.js 1010.00b +0.00b 9.41s +1.19s ⚠️
dist/panel-warning.68b04096.js 1008.00b +0.00b 9.68s +1.09s ⚠️
dist/list.057cb664.js 978.00b +0.00b 9.55s +1.13s ⚠️
dist/heading1.fa66b375.js 976.00b +0.00b 9.80s +1.08s ⚠️
dist/panel-error.c4b05f6f.js 906.00b +0.00b 9.68s +1.09s ⚠️
dist/panel.9dbc048e.js 897.00b +0.00b 9.68s +1.09s ⚠️
dist/table.b35545be.js 889.00b +0.00b 9.80s +1.08s ⚠️
dist/panel-success.7eb0809a.js 845.00b +0.00b 9.68s +1.09s ⚠️
dist/panel-note.ec8386b7.js 841.00b +0.00b 9.68s +1.09s ⚠️
dist/media-picker-analytics-error-boundary.553055f6.js 837.00b +0.00b 1.07m -13.13s πŸš€
dist/media-card-analytics-error-boundary.964206cc.js 833.00b +0.00b 18.51s -2.51s πŸš€
dist/media-card-analytics-error-boundary.57503222.js 833.00b +0.00b 1.09m -52.78s πŸš€
dist/media-viewer-analytics-error-boundary.bbe40a02.js 757.00b +0.00b 20.43s -3.15s πŸš€
dist/simpleHasher.f8e69464.js 528.00b +0.00b 17.14s -2.28s πŸš€
dist/simpleHasher.32d9352e.js 528.00b +0.00b 1.09m -13.47s πŸš€
dist/index.html 119.00b +0.00b 2.70s -4.22s πŸš€

Cached Bundles

Bundle Size Difference Time Difference
dist/index.8fef7fe2.js 2.73mb +0.00b 637.00ms -46.00ms πŸš€
dist/pdfRenderer.cd742f5e.js 1.11mb +2.00b ⚠️ 635.00ms -45.00ms πŸš€
dist/editorView.ae59b49f.js 585.98kb +0.00b 634.00ms -38.00ms πŸš€
dist/popup.4a66e15e.js 170.62kb +0.00b 634.00ms -38.00ms πŸš€
dist/EmojiPickerComponent.bab709db.js 97.89kb +0.00b 635.00ms -46.00ms πŸš€
dist/Toolbar.33a83ae3.js 92.34kb +0.00b 634.00ms -38.00ms πŸš€
dist/media-viewer.1d9322e7.js 69.09kb +0.00b 635.00ms -45.00ms πŸš€
dist/card.ce67dc35.js 55.09kb +0.00b 635.00ms -46.00ms πŸš€
dist/card.1007a95f.js 52.86kb +0.00b 634.00ms -38.00ms πŸš€
dist/Modal.e3bd77d0.js 41.40kb +0.00b 638.00ms -45.00ms πŸš€
dist/component.59edff1f.js 30.78kb +0.00b 638.00ms -45.00ms πŸš€
dist/component.37867f50.js 22.51kb +0.00b 637.00ms -45.00ms πŸš€
dist/DatePicker.cbe44a9b.js 21.17kb +0.00b 635.00ms -46.00ms πŸš€
dist/EmojiPickerComponent.898d8be6.js 18.23kb +0.00b 635.00ms -46.00ms πŸš€
dist/js.48be70a4.js 16.40kb +0.00b 638.00ms -45.00ms πŸš€
dist/dropzone.c8c03b6a.js 14.36kb +0.00b 635.00ms -37.00ms πŸš€
dist/ui.cee430a3.js 13.97kb +0.00b 635.00ms -46.00ms πŸš€
dist/smartMediaEditor.7ee0079c.js 13.95kb +0.00b 634.00ms -38.00ms πŸš€
dist/workerHasher.65b8a1b7.js 11.78kb +0.00b 635.00ms -46.00ms πŸš€
dist/EmojiTypeAheadComponent.9af6e5fc.js 8.67kb +0.00b 635.00ms -46.00ms πŸš€
dist/component.11476a92.js 6.05kb +0.00b 637.00ms -45.00ms πŸš€
dist/card.4ac5c1b2.js 5.61kb +0.00b 635.00ms -46.00ms πŸš€
dist/media-viewer.bc661bce.js 3.92kb +0.00b 635.00ms -45.00ms πŸš€
dist/EmojiPickerComponent.624bf3f4.js 3.58kb +0.00b 635.00ms -46.00ms πŸš€
dist/index.393afe59.css 3.46kb +0.00b 634.00ms -38.00ms πŸš€
dist/png-chunks-extract.8d15a914.js 3.41kb +0.00b 637.00ms -45.00ms πŸš€
dist/dropzone.2f1a1e17.js 3.23kb +0.00b 634.00ms -38.00ms πŸš€
dist/Modal.2835744c.js 3.08kb +0.00b 638.00ms -45.00ms πŸš€
dist/clipboard.0244488f.js 2.75kb +0.00b 634.00ms -38.00ms πŸš€
dist/16.d1b8e6f7.js 2.38kb +0.00b 638.00ms -45.00ms πŸš€
dist/EmojiUploadComponent.88a444df.js 2.18kb +0.00b 635.00ms -46.00ms πŸš€
dist/card.cadccd96.js 2.03kb +0.00b 634.00ms -46.00ms πŸš€
dist/ResourcedEmojiComponent.d9a49606.js 2.00kb +0.00b 638.00ms -45.00ms πŸš€
dist/date.d49e64f8.js 1.73kb +0.00b 636.00ms -45.00ms πŸš€
dist/16.f40c1329.js 1.73kb +0.00b 637.00ms -45.00ms πŸš€
dist/images.80270b1f.js 1.67kb +0.00b 637.00ms -45.00ms πŸš€
dist/16.86a8c7d4.js 1.66kb +0.00b 637.00ms -45.00ms πŸš€
dist/feedback.8b7c7928.js 1.64kb +0.00b 635.00ms -46.00ms πŸš€
dist/browser.16c438d4.js 1.61kb +0.00b 635.00ms -37.00ms πŸš€
dist/workerHasher.9bb425b1.js 1.54kb +0.00b 635.00ms -46.00ms πŸš€
dist/workerHasher.f66f00c7.js 1.54kb +0.00b 634.00ms -38.00ms πŸš€
dist/list-number.4632b459.js 1.46kb +0.00b 636.00ms -46.00ms πŸš€
dist/status.cccf04be.js 1.46kb +0.00b 636.00ms -46.00ms πŸš€
dist/16.cff410ff.js 1.38kb +0.00b 637.00ms -45.00ms πŸš€
dist/code.af9ca2b3.js 1.38kb +0.00b 636.00ms -45.00ms πŸš€
dist/16.c1ed07f8.js 1.33kb +0.00b 637.00ms -45.00ms πŸš€
dist/16.6603f2f3.js 1.33kb +0.00b 637.00ms -45.00ms πŸš€
dist/16.a4b392c2.js 1.32kb +0.00b 638.00ms -45.00ms πŸš€
dist/16.249c644a.js 1.31kb +0.00b 637.00ms -45.00ms πŸš€
dist/link.d12cc130.js 1.30kb +0.00b 636.00ms -46.00ms πŸš€
dist/heading6.4c4017db.js 1.30kb +0.00b 635.00ms -46.00ms πŸš€
dist/heading3.93606b9c.js 1.29kb +0.00b 636.00ms -46.00ms πŸš€
dist/16.ab5c0088.js 1.27kb +0.00b 637.00ms -45.00ms πŸš€
dist/emoji.e603e70e.js 1.23kb +0.00b 637.00ms -45.00ms πŸš€
dist/16.afee1494.js 1.23kb +0.00b 637.00ms -45.00ms πŸš€
dist/16.e60b4d77.js 1.21kb +0.00b 638.00ms -45.00ms πŸš€
dist/16.7c7a40c9.js 1.19kb +0.00b 637.00ms -45.00ms πŸš€
dist/16.06d5a67b.js 1.18kb +0.00b 637.00ms -45.00ms πŸš€
dist/heading5.dde15cec.js 1.17kb +0.00b 635.00ms -46.00ms πŸš€
dist/expand.6889aead.js 1.16kb +0.00b 635.00ms -46.00ms πŸš€
dist/media-card-analytics-error-boundary.6a25b970.js 1.15kb +0.00b 634.00ms -38.00ms πŸš€
dist/16.2096b9f3.js 1.14kb +0.00b 638.00ms -45.00ms πŸš€
dist/16.f040d62d.js 1.14kb +0.00b 637.00ms -45.00ms πŸš€
dist/16.ecf8a702.js 1.13kb +0.00b 637.00ms -45.00ms πŸš€
dist/16.1b342686.js 1.13kb +0.00b 637.00ms -45.00ms πŸš€
dist/16.2e7f52c6.js 1.13kb +0.00b 637.00ms -45.00ms πŸš€
dist/16.da43aa07.js 1.13kb +0.00b 637.00ms -45.00ms πŸš€
dist/heading2.e219309a.js 1.11kb +0.00b 636.00ms -46.00ms πŸš€
dist/16.dd07505e.js 1.10kb +0.00b 638.00ms -45.00ms πŸš€
dist/component.40194190.js 1.07kb +0.00b 638.00ms -45.00ms πŸš€
dist/mention.b1828447.js 1.07kb +0.00b 636.00ms -46.00ms πŸš€
dist/heading4.5316f6f2.js 1.06kb +0.00b 635.00ms -47.00ms πŸš€
dist/16.317b9164.js 1.05kb +0.00b 637.00ms -45.00ms πŸš€
dist/layout.ac6734f9.js 1.05kb +0.00b 637.00ms -45.00ms πŸš€
dist/divider.d2be55a1.js 1.03kb +0.00b 636.00ms -45.00ms πŸš€
dist/quote.f4e09143.js 1.02kb +0.00b 636.00ms -46.00ms πŸš€
dist/action.cb287eb0.js 1.00kb +0.00b 637.00ms -45.00ms πŸš€
dist/decision.91f3af14.js 1010.00b +0.00b 636.00ms -45.00ms πŸš€
dist/panel-warning.68b04096.js 1008.00b +0.00b 636.00ms -46.00ms πŸš€
dist/list.057cb664.js 978.00b +0.00b 636.00ms -46.00ms πŸš€
dist/heading1.fa66b375.js 976.00b +0.00b 636.00ms -46.00ms πŸš€
dist/panel-error.c4b05f6f.js 906.00b +0.00b 636.00ms -46.00ms πŸš€
dist/panel.9dbc048e.js 897.00b +0.00b 636.00ms -46.00ms πŸš€
dist/table.b35545be.js 889.00b +0.00b 636.00ms -46.00ms πŸš€
dist/panel-success.7eb0809a.js 845.00b +0.00b 636.00ms -46.00ms πŸš€
dist/panel-note.ec8386b7.js 841.00b +0.00b 636.00ms -46.00ms πŸš€
dist/media-picker-analytics-error-boundary.553055f6.js 837.00b +0.00b 634.00ms -38.00ms πŸš€
dist/media-card-analytics-error-boundary.964206cc.js 833.00b +0.00b 635.00ms -46.00ms πŸš€
dist/media-card-analytics-error-boundary.57503222.js 833.00b +0.00b 634.00ms -38.00ms πŸš€
dist/media-viewer-analytics-error-boundary.bbe40a02.js 757.00b +0.00b 634.00ms -46.00ms πŸš€
dist/EmojiPickerComponent.a968dafe.js 535.00b +0.00b 635.00ms -46.00ms πŸš€
dist/simpleHasher.f8e69464.js 528.00b +0.00b 635.00ms -46.00ms πŸš€
dist/simpleHasher.32d9352e.js 528.00b +0.00b 634.00ms -38.00ms πŸš€
dist/index.html 119.00b +0.00b 639.00ms -46.00ms πŸš€
Three.js x4 🚨

Timings

Description Time Difference
Cold FAILED -0.00ms
Cached FAILED -0.00ms

Cold Bundles

No bundles found, this is probably a failed build...

Cached Bundles

No bundles found, this is probably a failed build...

Click here to view a detailed benchmark overview.

parcel-benchmark avatar Jul 08 '20 19:07 parcel-benchmark

πŸ‘ Is there a reason this isn't done automatically in the reporter runner? To prevent infinite loops?

That causes the error to be swallowed by the Built message, because the CLI reporter assumes that all errors can be discarded on buildSuccess...

niklas@nmb:~p/_tests/proxy (master*) $ parcel2 index.html
ℹ️ Server running at http://localhost:1234
✨ Built in 841ms
niklas@nmb:~p/_tests/proxy (master*) $ parcel2 index.html | cat
@parcel/reporter-dev-server: Failed to parse JSON5
/Users/niklas/Documents/_dev/_git/parcel/_tests/proxy/.proxyrc:2:2
  1 | {
> 2 | /   "/api": {
>   |  ^ JSON5: invalid character ' ' at 2:2
  3 |     "target": "http://localhost:5000/",
  4 |     "pathRewrite": {
ℹ️ Server running at http://localhost:1234
Bundling...
✨ Built in 632ms

mischnic avatar Jul 08 '20 19:07 mischnic

@mischnic I originally wanted to do it but ran into infinite loops pretty quickly so went with what we currently have, we could also detect such an infinite loop and bail out that point though... but seems like a bit more work.

Feel free to suggest an alternative or help me figure out how to detect an infinite loop in that case

DeMoorJasper avatar Jul 08 '20 20:07 DeMoorJasper

I would say it's fine as it is. I'll just have to figure out how to make that message persist

mischnic avatar Jul 08 '20 21:07 mischnic

Just dropping a note to emphasize the importance of this, since it seems like it may have stagnated. I'm in the process of porting my codebase to TS, so lots of code churn in between test runs. Somewhere along the way I started getting the error, below.

The one thing conspicuously missing from this error is any mention of the tsconfig.json file that was causing the problem. (You can repro this by doing echo "foo" > tsconfig.json)

Had I not gotten lucky and guessed that tsconfig might be the source of the issue, this could have easily sucked an hour or more of my time trying to manually bisect all of the changes I'd stacked up.


@parcel/transformer-js: JSON5: invalid character 'o' at 1:2

  SyntaxError: JSON5: invalid character 'o' at 1:2
  at syntaxError (/Users/kieffer/projects/npmgraph/node_modules/@parcel/core/node_modules/json5/lib/parse.js:1:12901)
  at invalidChar (/Users/kieffer/projects/npmgraph/node_modules/@parcel/core/node_modules/json5/lib/parse.js:1:12115)
  at literal (/Users/kieffer/projects/npmgraph/node_modules/@parcel/core/node_modules/json5/lib/parse.js:1:8770)
  at Object.value (/Users/kieffer/projects/npmgraph/node_modules/@parcel/core/node_modules/json5/lib/parse.js:1:3148)
  at lex (/Users/kieffer/projects/npmgraph/node_modules/@parcel/core/node_modules/json5/lib/parse.js:1:1618)
  at parse (/Users/kieffer/projects/npmgraph/node_modules/@parcel/core/node_modules/json5/lib/parse.js:1:930)
  at loadConfig (/Users/kieffer/projects/npmgraph/node_modules/@parcel/core/node_modules/@parcel/utils/lib/config.js:124:18)
  at async PublicConfig.getConfigFrom (/Users/kieffer/projects/npmgraph/node_modules/@parcel/core/lib/public/Config.js:156:16)
  at async loadConfig (/Users/kieffer/projects/npmgraph/node_modules/@parcel/transformer-js/lib/JSTransformer.js:208:22)
  at async loadPluginConfig (/Users/kieffer/projects/npmgraph/node_modules/@parcel/core/lib/requests/ConfigRequest.js:65:21)

broofa avatar Nov 15 '21 02:11 broofa

We previously already added a workaround for Babel config which can also be JSON5: https://github.com/parcel-bundler/parcel/pull/7022, so maybe for tsconfig as well

mischnic avatar Nov 16 '21 09:11 mischnic