Title: feature request: option to disable TEXT_ENCODING env check · Issue #219 · msgpack/msgpack-javascript · GitHub
Open Graph Title: feature request: option to disable TEXT_ENCODING env check · Issue #219 · msgpack/msgpack-javascript
X Title: feature request: option to disable TEXT_ENCODING env check · Issue #219 · msgpack/msgpack-javascript
Description: Hi, I am using this library in deno, and I noticed part of the encode/decode flow checks for the TEXT_ENCODING environment variable. It seems like this is a useful env var for testing, but I do not need it in production. In deno, I have ...
Open Graph Description: Hi, I am using this library in deno, and I noticed part of the encode/decode flow checks for the TEXT_ENCODING environment variable. It seems like this is a useful env var for testing, but I do not...
X Description: Hi, I am using this library in deno, and I noticed part of the encode/decode flow checks for the TEXT_ENCODING environment variable. It seems like this is a useful env var for testing, but I do not...
Opengraph URL: https://github.com/msgpack/msgpack-javascript/issues/219
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"feature request: option to disable TEXT_ENCODING env check","articleBody":"Hi, I am using this library in deno, and I noticed part of the encode/decode flow checks for the `TEXT_ENCODING` environment variable. It seems like this is a useful env var for testing, but I do not need it in production. In deno, I have to allow access to this var explicitly, and will have to tell users of my library to do the same, which feels confusing if this is in fact a testing var. I was wondering if it would be possible to send along a flag like\r\n```ts\r\nimport * as msgpack from 'npm:@msgpack/msgpack'\r\n\r\nmsgpack.decode(buffer, { env_check: false })\r\n// or\r\nmsgpack.decode(buffer, { text_encoding: false })\r\n```\r\n\r\n\r\nfor reference, this is the warning deno will share when I do not allow access to env with msgpack.\r\n```\r\n./test/functional.test.ts (uncaught error)\r\nerror: PermissionDenied: Requires env access to \"TEXT_ENCODING\", run again with the --allow-env flag\r\n return Deno.env.get(name);\r\n ^\r\n at Object.getEnv [as get] (deno:runtime/js/30_os.js:86:16)\r\n at denoEnvGet (https://deno.land/std@0.171.0/node/_process/process.ts:38:21)\r\n at Object.get (https://deno.land/std@0.171.0/node/_process/process.ts:59:24)\r\n at Object.\u003canonymous\u003e (file:///home/andrew/.cache/deno/npm/registry.npmjs.org/@msgpack/msgpack/2.8.0/dist/utils/utf8.js:7:177)\r\n at Object.\u003canonymous\u003e (file:///home/andrew/.cache/deno/npm/registry.npmjs.org/@msgpack/msgpack/2.8.0/dist/utils/utf8.js:168:4)\r\n```\r\n\r\n\r\nNone of this is really a blocker for using this library, I just believe it could make usage a bit more friendly for the deno audience :)","author":{"url":"https://github.com/andykais","@type":"Person","name":"andykais"},"datePublished":"2023-01-11T02:24:47.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":4},"url":"https://github.com/219/msgpack-javascript/issues/219"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:50c91c32-8de5-5ad2-2e3e-083467ec2909 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BA96:23950F:18B4230:21FF5D1:6A53E88C |
| html-safe-nonce | bce8f9ed2b0d8e1362689f3a801093db575d0c7d5f8e582653bc8c9afcb2f823 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQTk2OjIzOTUwRjoxOEI0MjMwOjIxRkY1RDE6NkE1M0U4OEMiLCJ2aXNpdG9yX2lkIjoiMjY5Mzg5MDgxNTExMDE0NjE4OCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | eca17f8fecf97251b2140c196222ca3c684fec4110ea3c7e5786708029d0e7d4 |
| hovercard-subject-tag | issue:1528305595 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/msgpack/msgpack-javascript/219/issue_layout |
| twitter:image | https://opengraph.githubassets.com/d11dd8b63a7c500160ae9b9d1bf0f8972f9c2a820d65f49c353395072c560739/msgpack/msgpack-javascript/issues/219 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/d11dd8b63a7c500160ae9b9d1bf0f8972f9c2a820d65f49c353395072c560739/msgpack/msgpack-javascript/issues/219 |
| og:image:alt | Hi, I am using this library in deno, and I noticed part of the encode/decode flow checks for the TEXT_ENCODING environment variable. It seems like this is a useful env var for testing, but I do not... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | andykais |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| turbo-cache-control | no-preview |
| go-import | github.com/msgpack/msgpack-javascript git https://github.com/msgpack/msgpack-javascript.git |
| octolytics-dimension-user_id | 198264 |
| octolytics-dimension-user_login | msgpack |
| octolytics-dimension-repository_id | 2761854 |
| octolytics-dimension-repository_nwo | msgpack/msgpack-javascript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 2761854 |
| octolytics-dimension-repository_network_root_nwo | msgpack/msgpack-javascript |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 07a982c1d40157c619b364352b704c3ce66bb332 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width