FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

require: warn invalid json by martinschulzofficial · Pull Request #1700 · browserify/browserify · GitHub

Repository navigation

require: warn invalid json - #1700

Merged
goto-bus-stop merged 4 commits into
browserify:masterfrom
martinschulzofficial:master
Nov 19, 2019
Merged

goto-bus-stop merged 4 commits into
browserify:masterfrom
martinschulzofficial:master

Conversation

Copy link
Copy Markdown
Contributor

closes #1580

goto-bus-stop self-requested a review January 4, 2018 10:20

goto-bus-stop left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

thanks for picking this up! & sorry for the long wait. would you mind rebasing this?

Comment thread index.js Outdated
goto-bus-stop added this to the v17 milestone Nov 15, 2018
goto-bus-stop merged commit e52476b into browserify:master Nov 19, 2019

Copy link
Copy Markdown

This broke our script that transforms a JSON file to JavaScript file because it is checking the transformed output that is no longer JSON:

"$BASEDIR"/node_modules/browserify/bin/cmd.js "$INPUT"/data/data.json -t "$BASEDIR"/scripts/transform.js -o "$DEST"/data.js

SyntaxError: While parsing /[...]/data.json: Unexpected token ( in JSON at position 0
    at JSON.parse (<anonymous>)
    at DestroyableTransform._transform (/home/nike/stuff/mw/jquery.uls/node_modules/browserify/index.js:669:22)
    at DestroyableTransform.Transform._read (/home/nike/stuff/mw/jquery.uls/node_modules/readable-stream/lib/_stream_transform.js:184:10)
    at DestroyableTransform.Transform._write (/home/nike/stuff/mw/jquery.uls/node_modules/readable-stream/lib/_stream_transform.js:172:83)
    at Labeled.Pipeline._write (/home/nike/stuff/mw/jquery.uls/node_modules/stream-splicer/index.js:70:22)
    at doWrite (/home/nike/stuff/mw/jquery.uls/node_modules/readable-stream/lib/_stream_writable.js:428:64)
    at writeOrBuffer (/home/nike/stuff/mw/jquery.uls/node_modules/readable-stream/lib/_stream_writable.js:417:5)
    at Labeled.Writable.write (/home/nike/stuff/mw/jquery.uls/node_modules/readable-stream/lib/_stream_writable.js:334:11)
    at Labeled.ondata (/home/nike/stuff/mw/jquery.uls/node_modules/readable-stream/lib/_stream_readable.js:619:20)
    at Labeled.emit (events.js:198:13)

Is there a better way to do this?

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Browserify tolerates require() of invalid JSON

4 participants


Back | FazBrowse Home | New Git URL