-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Spaces and quotes aren't handled correctly by bun run #53
Labels
Comments
KishanBagaria
changed the title
Spaces and quotes aren't handled correctly by bun
Spaces and quotes aren't handled correctly by bun run
Nov 4, 2021
working on a fix |
Not sure if the following issue is related: ❯ bat -p package.json
{
"name": "blank",
"version": "0.0.3",
"module": "src/index.js",
"scripts": {
"demo": "echo \"test\""
},
"devDependencies": {
"bun-types": "latest"
}
}
❯ npm run demo
> blank@0.0.3 demo
> echo "test"
test
❯ bun run demo
$ echo \"test\"
"test" Basically npm does JSON parsing but bun doesn't seem to do it. |
Thanks for reproducing, @kidonng, confirmed it's still an issue as of |
Electroid
added
the
bun install
Something that relates to the npm-compatible client
label
Jan 18, 2023
This was referenced Mar 21, 2023
Confirming this is still an issue with "scripts": {
"start": "bun run src/app.ts",
"add:article": "curl -X POST -H 'Content-Type: application/json' -d '{\"id\":1,\"title\":\"Test article\",\"body\":\"Test body\"}' http://localhost:4000/articles/"
} Running this won’t work with Bun: $ bun run add:article
$ curl -X POST -H 'Content-Type: application/json' -d '{\"id\":1,\"title\":\"Test article\",\"body\":\"Test body\"}' http://localhost:4000/articles/
{
"title": "Bad Request",
"status": 400,
"detail": "Unable to parse JSON: JSON Parse error: Unrecognized token '\\'"
} But it does with npm: $ npm run add:article
> @ add:article
> curl -X POST -H 'Content-Type: application/json' -d '{"id":1,"title":"Test article","body":"Test body"}' http://localhost:4000/articles/ The reason is clearly that Bun doesn’t parse JSON as stated above. |
alexlamsl
added a commit
to alexlamsl/bun
that referenced
this issue
Jun 12, 2023
alexlamsl
added a commit
to alexlamsl/bun
that referenced
this issue
Jun 12, 2023
alexlamsl
added a commit
to alexlamsl/bun
that referenced
this issue
Jun 13, 2023
Jarred-Sumner
pushed a commit
that referenced
this issue
Jun 13, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
package.json:
The text was updated successfully, but these errors were encountered: