1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-22 23:34:47 -05:00
denoland-deno/tests/specs/npm/user_agent_env_var
Nathan Whitaker 04ae1a5517
fix(cli): set npm_config_user_agent when running npm packages or tasks (#26639)
Fixes #25342.

Still not sure on the exact user agent to set (should it include
`node`?).

After this PR, here's the state of running some `create-*` packages
(just ones I could think of off the top of my head):

| package                  | prints/runs/suggests deno install | notes |
| ---------------- | ------------- | ------ |
| `create-next-app` |  | falls back to npm, needs a PR
([code](c32e280209/packages/create-next-app/helpers/get-pkg-manager.ts (L3)))
| `sv create` |  | uses `package-manager-detector`, needs a PR
([code](https://github.com/antfu-collective/package-manager-detector/tree/main))
| `create-qwik` |  | runs `deno install` but suggests `deno start`
which doesn't work (should be `deno task start` or `deno run start`)
| `create-astro` |  | runs `deno install` but suggests `npm run dev`
later in output, probably needs a PR
| `nuxi init` |  | deno not an option in dialog, needs a PR
([code](f04e2e8944/src/commands/init.ts (L96-L102)))
| `create-react-app` |  | uses npm
| `ng new` (`@angular/cli`) |  | uses npm
| `create-vite` |  | suggests working deno commands 🎉 
| `create-solid` |   | suggests npm commands, needs PR

It's possible that fixing `package-manager-detector` or other packages
might make some of these just work, but haven't looked too carefully at
each
2024-10-31 22:19:19 -07:00
..
__test__.jsonc fix(cli): set npm_config_user_agent when running npm packages or tasks (#26639) 2024-10-31 22:19:19 -07:00
bin_command.out fix(cli): set npm_config_user_agent when running npm packages or tasks (#26639) 2024-10-31 22:19:19 -07:00
deno.jsonc fix(cli): set npm_config_user_agent when running npm packages or tasks (#26639) 2024-10-31 22:19:19 -07:00
main.ts fix(cli): set npm_config_user_agent when running npm packages or tasks (#26639) 2024-10-31 22:19:19 -07:00
package.json fix(cli): set npm_config_user_agent when running npm packages or tasks (#26639) 2024-10-31 22:19:19 -07:00
postinstall.out fix(cli): set npm_config_user_agent when running npm packages or tasks (#26639) 2024-10-31 22:19:19 -07:00
run.out fix(cli): set npm_config_user_agent when running npm packages or tasks (#26639) 2024-10-31 22:19:19 -07:00
test.mjs fix(cli): set npm_config_user_agent when running npm packages or tasks (#26639) 2024-10-31 22:19:19 -07:00