Nâng cấp dotenv từ 16.x lên 17.x
So sánh API công khai của dotenv 16.6.1 và 17.4.2, được tính tự động từ kiểu TypeScript. Chữ ký thay đổi là thay đổi có thể không tương thích, không phải điều chắc chắn.
Tóm tắt
| Đường dẫn import bị xóa | 0 |
|---|---|
| Export bị xóa | 0 |
| Chữ ký thay đổi | 1 |
| Thành viên lớp hoặc interface bị xóa | 0 |
| Thành viên lớp hoặc interface thay đổi | 1 |
| Mới bị ngừng hỗ trợ | 0 |
| Thay đổi yêu cầu (engines, phụ thuộc peer) | 0 |
| Export mới | 2 |
Export bị xóa
Không phát hiện.
Chữ ký thay đổi
| export | Trước | Sau |
|---|---|---|
dotenv · populate | (processEnv: DotenvPopulateInput, parsed: DotenvPopulateInput, options?: DotenvConfigOptions | undefined): void | (processEnv: DotenvPopulateInput, parsed: DotenvPopulateInput, options?: DotenvPopulateOptions | undefined): DotenvPopulateOutput |
Thành viên lớp hoặc interface bị xóa
Không phát hiện.
Thành viên lớp hoặc interface thay đổi
| member | Trước | Sau |
|---|---|---|
DotenvConfigOutput.error | Error | undefined | DotenvError | undefined |
Mới bị ngừng hỗ trợ
Không phát hiện.
Thay đổi yêu cầu (engines, phụ thuộc peer)
Không phát hiện.
Export mới (2)
| import | export | kind |
|---|---|---|
dotenv | DotenvError | type |
dotenv | DotenvPopulateOutput | interface |
Changelog giữa các phiên bản này
Văn bản do tác giả gói công bố, hiển thị nguyên trạng.
17.4.2
17.4.2
### Changed
* Improved skill files - tightened up details ([#1009](https://github.com/motdotla/dotenv/pull/1009))17.4.1
### Changed
* Change text `injecting` to `injected` ([#1005](https://github.com/motdotla/dotenv/pull/1005))17.4.0
### Added
* Add `skills/` folder with focused agent skills: `skills/dotenv/SKILL.md` (core usage) and `skills/dotenvx/SKILL.md` (encryption, multiple environments, variable expansion) for AI coding agent discovery via the skills.sh ecosystem (`npx skills add motdotla/dotenv`)
### Changed
* Tighten up logs: `◇ injecting env (14) from .env` ([#1003](https://github.com/motdotla/dotenv/pull/1003))17.3.1
### Changed
* Fix as2 example command in README and update spanish README17.3.0
### Added
* Add a new README section on dotenv’s approach to the agentic future.
### Changed
* Rewrite README to get humans started more quickly with less noise while simultaneously making more accessible for llms and agents to go deeper into details.17.2.4
### Changed
* Make `DotenvPopulateInput` accept `NodeJS.ProcessEnv` type ([#915](https://github.com/motdotla/dotenv/pull/915))
- Give back to dotenv by checking out my newest project [vestauth](https://github.com/vestauth/vestauth). It is auth for agents. Thank you for using my software.17.2.3
### Changed
* Fixed typescript error definition ([#912](https://github.com/motdotla/dotenv/pull/912))17.2.2
### Added
- 🙏 A big thank you to new sponsor [Tuple.app](https://tuple.app/dotenv) - *the premier screen sharing app for developers on macOS and Windows.* Go check them out. It's wonderful and generous of them to give back to open source by sponsoring dotenv. Give them some love back.17.2.1
### Changed
* Fix clickable tip links by removing parentheses ([#897](https://github.com/motdotla/dotenv/pull/897))17.2.0
### Added
* Optionally specify `DOTENV_CONFIG_QUIET=true` in your environment or `.env` file to quiet the runtime log ([#889](https://github.com/motdotla/dotenv/pull/889))
* Just like dotenv any `DOTENV_CONFIG_` environment variables take precedence over any code set options like `({quiet: false})`
```ini
# .env
DOTENV_CONFIG_QUIET=true
HELLO="World"
```
```js
// index.js
require('dotenv').config()
console.log(`Hello ${process.env.HELLO}`)
```
```sh
$ node index.js
Hello World
or
$ DOTENV_CONFIG_QUIET=true node index.js
```17.1.0
### Added
* Add additional security and configuration tips to the runtime log ([#884](https://github.com/motdotla/dotenv/pull/884))
* Dim the tips text from the main injection information text
```js
const TIPS = [
'🔐 encrypt with dotenvx: https://dotenvx.com',
'🔐 prevent committing .env to code: https://dotenvx.com/precommit',
'🔐 prevent building .env in docker: https://dotenvx.com/prebuild',
'🛠️ run anywhere with `dotenvx run -- yourcommand`',
'⚙️ specify custom .env file path with { path: \'/custom/path/.env\' }',
'⚙️ enable debug logging with { debug: true }',
'⚙️ override existing env vars with { override: true }',
'⚙️ suppress all logs with { quiet: true }',
'⚙️ write to custom object with { processEnv: myObject }',
'⚙️ load multiple .env files with { path: [\'.env.local\', \'.env\'] }'
]
```17.0.1
### Changed
* Patched injected log to count only populated/set keys to process.env ([#879](https://github.com/motdotla/dotenv/pull/879))17.0.0
### Changed
- Default `quiet` to false - informational (file and keys count) runtime log message shows by default ([#875](https://github.com/motdotla/dotenv/pull/875))Cung cấp dữ liệu này cho tác tử AI của bạn
Vigia là máy chủ MCP miễn phí: tác tử lập trình của bạn kiểm tra phiên bản, thay đổi phá vỡ tương thích và lỗ hổng trước khi viết mã. Không cần đăng ký, không cần khóa API.
claude mcp add --transport http vigia https://vigia.coredls.cloud/mcp
Thêm vào CursorThêm vào VS Code★ Gắn sao trên GitHub
Mọi ứng dụng MCP khác
{ "mcpServers": { "vigia": { "url": "https://vigia.coredls.cloud/mcp" } } }Kỹ năng cho tác tử (SKILL.md): cho tác tử biết khi nào dùng Vigia · GitHub Action cho pull request
Câu hỏi thường gặp
Nâng cấp dotenv từ 16 lên 17 có những thay đổi không tương thích nào?
Giữa dotenv 16.6.1 và 17.4.2, Vigia tìm thấy 0 export bị xóa, 1 chữ ký thay đổi và 1 thành viên lớp hoặc interface bị xóa hay thay đổi.
Những gì bị ngừng hỗ trợ trong dotenv 17?
0 export hoặc thành viên mới bị đánh dấu ngừng hỗ trợ trong dotenv 17.4.2.
Dành cho tác tử
GET https://vigia.coredls.cloud/v1/packages/npm/dotenv/upgrade?from=16.6.1&to=17.4.2