{"id":18739592,"url":"https://github.com/springmeyer/node-addon-env-debug","last_synced_at":"2025-10-18T01:02:41.424Z","repository":{"id":23427527,"uuid":"26790462","full_name":"springmeyer/node-addon-env-debug","owner":"springmeyer","description":"Testcase for how process.env works in Node.js across platforms","archived":false,"fork":false,"pushed_at":"2014-11-18T21:35:44.000Z","size":203,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-12-28T18:28:22.695Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/springmeyer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-11-18T03:37:14.000Z","updated_at":"2019-08-13T15:55:42.000Z","dependencies_parsed_at":"2022-07-25T10:02:12.264Z","dependency_job_id":null,"html_url":"https://github.com/springmeyer/node-addon-env-debug","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/springmeyer%2Fnode-addon-env-debug","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/springmeyer%2Fnode-addon-env-debug/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/springmeyer%2Fnode-addon-env-debug/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/springmeyer%2Fnode-addon-env-debug/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/springmeyer","download_url":"https://codeload.github.com/springmeyer/node-addon-env-debug/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239619570,"owners_count":19669447,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-07T15:36:26.059Z","updated_at":"2025-10-18T01:02:41.341Z","avatar_url":"https://github.com/springmeyer.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"Testcase for how process.env works in Node.js across platforms.\n\nThis testcase asks the question:\n\n\u003e Can you set environment variables by modifying `process.env` at startup such that that C-land code that calls `getenv` will see the environment setting?\n\nThis impacts both node-addons that might bind libraries that call `getenv` or might themselves need to respond to values in the environment.\n\nIt also impacts the whether [libuv will respect `UV_THREADPOOL_SIZE`](https://github.com/joyent/node/blob/cfcb1de130867197cbc9c6012b7e84e08e53d032/deps/uv/src/threadpool.c#L142) if it is set within a node.js script by doing `process.env.UV_THREADPOOL_SIZE = N`. Or whether this needs to be set in the shell's environment before starting node.\n\n\n[![Build Status](https://travis-ci.org/springmeyer/node-addon-env-debug.svg)](https://travis-ci.org/springmeyer/node-addon-env-debug)\n[![Build status](https://ci.appveyor.com/api/projects/status/gqa2glfstmlu7thn?svg=true)](https://ci.appveyor.com/project/Mapbox/node-addon-env-debug)\n\n## Testing\n\nTo run the testcase do:\n\n    node test.js\n\n## Observations\n\n - Behavior is stable across node versions (both v0.10.33 and v0.11.13 were tested); but\n - Behavior is not stable across platforms.\n\n#### Linux / OSX\n\n - Values returned from `getenv` respect those set on `process.env` both if `process.env` is modified before the node-addon is required and after\n\n#### Windows with node.exe from http://nodejs.org/download/\n\nNOTE: this node.exe is likely compiled with visual studio 2013\n\n - Values returned from `getenv` respect those set on `process.env` only if `process.env` is modified before the node-addon is required\n\n#### Windows with node.exe from https://github.com/mapbox/node-cpp11\n\nNOTE: this node.exe is [compiled with Visual Studio 2014 CTP 4](https://github.com/mapbox/node/pull/2)\n\n - Values returned from `getenv` are empty and do no respect any values set on `process.env`. The only way for `getenv` to see environment settings is if they are set in the environment of the shell that starts node.exe.\n\n## References\n\n - https://github.com/joyent/node/blob/7c0419730b237dbfa0ec4e6fb33a99ff01825a8f/src/node.cc#L2311-L2359\n - http://www.codeproject.com/Articles/43029/When-what-you-set-is-not-what-you-get-SetEnvironme\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspringmeyer%2Fnode-addon-env-debug","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspringmeyer%2Fnode-addon-env-debug","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspringmeyer%2Fnode-addon-env-debug/lists"}