@tai1windcss/forms 0.5.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +504 -0
- package/README.md +142 -0
- package/config.d.ts +1 -0
- package/config.js +9 -0
- package/lib/cli-options.js +11 -0
- package/lib/env-options.js +24 -0
- package/lib/main.d.ts +153 -0
- package/lib/main.js +361 -0
- package/package.json +55 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,504 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
|
+
|
|
5
|
+
## [Unreleased](https://github.com/motdotla/dotenv/compare/v16.5.0...master)
|
|
6
|
+
|
|
7
|
+
## [16.5.0](https://github.com/motdotla/dotenv/compare/v16.4.7...v16.5.0) (2025-04-07)
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- 🎉 Added new sponsor [Graphite](https://graphite.dev/?utm_source=github&utm_medium=repo&utm_campaign=dotenv) - *the AI developer productivity platform helping teams on GitHub ship higher quality software, faster*.
|
|
12
|
+
|
|
13
|
+
> [!TIP]
|
|
14
|
+
> **[Become a sponsor](https://github.com/sponsors/motdotla)**
|
|
15
|
+
>
|
|
16
|
+
> The dotenvx README is viewed thousands of times DAILY on GitHub and NPM.
|
|
17
|
+
> Sponsoring dotenv is a great way to get in front of developers and give back to the developer community at the same time.
|
|
18
|
+
|
|
19
|
+
### Changed
|
|
20
|
+
|
|
21
|
+
- Remove `_log` method. Use `_debug` [#862](https://github.com/motdotla/dotenv/pull/862)
|
|
22
|
+
|
|
23
|
+
## [16.4.7](https://github.com/motdotla/dotenv/compare/v16.4.6...v16.4.7) (2024-12-03)
|
|
24
|
+
|
|
25
|
+
### Changed
|
|
26
|
+
|
|
27
|
+
- Ignore `.tap` folder when publishing. (oops, sorry about that everyone. - @motdotla) [#848](https://github.com/motdotla/dotenv/pull/848)
|
|
28
|
+
|
|
29
|
+
## [16.4.6](https://github.com/motdotla/dotenv/compare/v16.4.5...v16.4.6) (2024-12-02)
|
|
30
|
+
|
|
31
|
+
### Changed
|
|
32
|
+
|
|
33
|
+
- Clean up stale dev dependencies [#847](https://github.com/motdotla/dotenv/pull/847)
|
|
34
|
+
- Various README updates clarifying usage and alternative solutions using [dotenvx](https://github.com/dotenvx/dotenvx)
|
|
35
|
+
|
|
36
|
+
## [16.4.5](https://github.com/motdotla/dotenv/compare/v16.4.4...v16.4.5) (2024-02-19)
|
|
37
|
+
|
|
38
|
+
### Changed
|
|
39
|
+
|
|
40
|
+
- 🐞 Fix recent regression when using `path` option. return to historical behavior: do not attempt to auto find `.env` if `path` set. (regression was introduced in `16.4.3`) [#814](https://github.com/motdotla/dotenv/pull/814)
|
|
41
|
+
|
|
42
|
+
## [16.4.4](https://github.com/motdotla/dotenv/compare/v16.4.3...v16.4.4) (2024-02-13)
|
|
43
|
+
|
|
44
|
+
### Changed
|
|
45
|
+
|
|
46
|
+
- 🐞 Replaced chaining operator `?.` with old school `&&` (fixing node 12 failures) [#812](https://github.com/motdotla/dotenv/pull/812)
|
|
47
|
+
|
|
48
|
+
## [16.4.3](https://github.com/motdotla/dotenv/compare/v16.4.2...v16.4.3) (2024-02-12)
|
|
49
|
+
|
|
50
|
+
### Changed
|
|
51
|
+
|
|
52
|
+
- Fixed processing of multiple files in `options.path` [#805](https://github.com/motdotla/dotenv/pull/805)
|
|
53
|
+
|
|
54
|
+
## [16.4.2](https://github.com/motdotla/dotenv/compare/v16.4.1...v16.4.2) (2024-02-10)
|
|
55
|
+
|
|
56
|
+
### Changed
|
|
57
|
+
|
|
58
|
+
- Changed funding link in package.json to [`dotenvx.com`](https://dotenvx.com)
|
|
59
|
+
|
|
60
|
+
## [16.4.1](https://github.com/motdotla/dotenv/compare/v16.4.0...v16.4.1) (2024-01-24)
|
|
61
|
+
|
|
62
|
+
- Patch support for array as `path` option [#797](https://github.com/motdotla/dotenv/pull/797)
|
|
63
|
+
|
|
64
|
+
## [16.4.0](https://github.com/motdotla/dotenv/compare/v16.3.2...v16.4.0) (2024-01-23)
|
|
65
|
+
|
|
66
|
+
- Add `error.code` to error messages around `.env.vault` decryption handling [#795](https://github.com/motdotla/dotenv/pull/795)
|
|
67
|
+
- Add ability to find `.env.vault` file when filename(s) passed as an array [#784](https://github.com/motdotla/dotenv/pull/784)
|
|
68
|
+
|
|
69
|
+
## [16.3.2](https://github.com/motdotla/dotenv/compare/v16.3.1...v16.3.2) (2024-01-18)
|
|
70
|
+
|
|
71
|
+
### Added
|
|
72
|
+
|
|
73
|
+
- Add debug message when no encoding set [#735](https://github.com/motdotla/dotenv/pull/735)
|
|
74
|
+
|
|
75
|
+
### Changed
|
|
76
|
+
|
|
77
|
+
- Fix output typing for `populate` [#792](https://github.com/motdotla/dotenv/pull/792)
|
|
78
|
+
- Use subarray instead of slice [#793](https://github.com/motdotla/dotenv/pull/793)
|
|
79
|
+
|
|
80
|
+
## [16.3.1](https://github.com/motdotla/dotenv/compare/v16.3.0...v16.3.1) (2023-06-17)
|
|
81
|
+
|
|
82
|
+
### Added
|
|
83
|
+
|
|
84
|
+
- Add missing type definitions for `processEnv` and `DOTENV_KEY` options. [#756](https://github.com/motdotla/dotenv/pull/756)
|
|
85
|
+
|
|
86
|
+
## [16.3.0](https://github.com/motdotla/dotenv/compare/v16.2.0...v16.3.0) (2023-06-16)
|
|
87
|
+
|
|
88
|
+
### Added
|
|
89
|
+
|
|
90
|
+
- Optionally pass `DOTENV_KEY` to options rather than relying on `process.env.DOTENV_KEY`. Defaults to `process.env.DOTENV_KEY` [#754](https://github.com/motdotla/dotenv/pull/754)
|
|
91
|
+
|
|
92
|
+
## [16.2.0](https://github.com/motdotla/dotenv/compare/v16.1.4...v16.2.0) (2023-06-15)
|
|
93
|
+
|
|
94
|
+
### Added
|
|
95
|
+
|
|
96
|
+
- Optionally write to your own target object rather than `process.env`. Defaults to `process.env`. [#753](https://github.com/motdotla/dotenv/pull/753)
|
|
97
|
+
- Add import type URL to types file [#751](https://github.com/motdotla/dotenv/pull/751)
|
|
98
|
+
|
|
99
|
+
## [16.1.4](https://github.com/motdotla/dotenv/compare/v16.1.3...v16.1.4) (2023-06-04)
|
|
100
|
+
|
|
101
|
+
### Added
|
|
102
|
+
|
|
103
|
+
- Added `.github/` to `.npmignore` [#747](https://github.com/motdotla/dotenv/pull/747)
|
|
104
|
+
|
|
105
|
+
## [16.1.3](https://github.com/motdotla/dotenv/compare/v16.1.2...v16.1.3) (2023-05-31)
|
|
106
|
+
|
|
107
|
+
### Removed
|
|
108
|
+
|
|
109
|
+
- Removed `browser` keys for `path`, `os`, and `crypto` in package.json. These were set to false incorrectly as of 16.1. Instead, if using dotenv on the front-end make sure to include polyfills for `path`, `os`, and `crypto`. [node-polyfill-webpack-plugin](https://github.com/Richienb/node-polyfill-webpack-plugin) provides these.
|
|
110
|
+
|
|
111
|
+
## [16.1.2](https://github.com/motdotla/dotenv/compare/v16.1.1...v16.1.2) (2023-05-31)
|
|
112
|
+
|
|
113
|
+
### Changed
|
|
114
|
+
|
|
115
|
+
- Exposed private function `_configDotenv` as `configDotenv`. [#744](https://github.com/motdotla/dotenv/pull/744)
|
|
116
|
+
|
|
117
|
+
## [16.1.1](https://github.com/motdotla/dotenv/compare/v16.1.0...v16.1.1) (2023-05-30)
|
|
118
|
+
|
|
119
|
+
### Added
|
|
120
|
+
|
|
121
|
+
- Added type definition for `decrypt` function
|
|
122
|
+
|
|
123
|
+
### Changed
|
|
124
|
+
|
|
125
|
+
- Fixed `{crypto: false}` in `packageJson.browser`
|
|
126
|
+
|
|
127
|
+
## [16.1.0](https://github.com/motdotla/dotenv/compare/v16.0.3...v16.1.0) (2023-05-30)
|
|
128
|
+
|
|
129
|
+
### Added
|
|
130
|
+
|
|
131
|
+
- Add `populate` convenience method [#733](https://github.com/motdotla/dotenv/pull/733)
|
|
132
|
+
- Accept URL as path option [#720](https://github.com/motdotla/dotenv/pull/720)
|
|
133
|
+
- Add dotenv to `npm fund` command
|
|
134
|
+
- Spanish language README [#698](https://github.com/motdotla/dotenv/pull/698)
|
|
135
|
+
- Add `.env.vault` support. 🎉 ([#730](https://github.com/motdotla/dotenv/pull/730))
|
|
136
|
+
|
|
137
|
+
ℹ️ `.env.vault` extends the `.env` file format standard with a localized encrypted vault file. Package it securely with your production code deploys. It's cloud agnostic so that you can deploy your secrets anywhere – without [risky third-party integrations](https://techcrunch.com/2023/01/05/circleci-breach/). [read more](https://github.com/motdotla/dotenv#-deploying)
|
|
138
|
+
|
|
139
|
+
### Changed
|
|
140
|
+
|
|
141
|
+
- Fixed "cannot resolve 'fs'" error on tools like Replit [#693](https://github.com/motdotla/dotenv/pull/693)
|
|
142
|
+
|
|
143
|
+
## [16.0.3](https://github.com/motdotla/dotenv/compare/v16.0.2...v16.0.3) (2022-09-29)
|
|
144
|
+
|
|
145
|
+
### Changed
|
|
146
|
+
|
|
147
|
+
- Added library version to debug logs ([#682](https://github.com/motdotla/dotenv/pull/682))
|
|
148
|
+
|
|
149
|
+
## [16.0.2](https://github.com/motdotla/dotenv/compare/v16.0.1...v16.0.2) (2022-08-30)
|
|
150
|
+
|
|
151
|
+
### Added
|
|
152
|
+
|
|
153
|
+
- Export `env-options.js` and `cli-options.js` in package.json for use with downstream [dotenv-expand](https://github.com/motdotla/dotenv-expand) module
|
|
154
|
+
|
|
155
|
+
## [16.0.1](https://github.com/motdotla/dotenv/compare/v16.0.0...v16.0.1) (2022-05-10)
|
|
156
|
+
|
|
157
|
+
### Changed
|
|
158
|
+
|
|
159
|
+
- Minor README clarifications
|
|
160
|
+
- Development ONLY: updated devDependencies as recommended for development only security risks ([#658](https://github.com/motdotla/dotenv/pull/658))
|
|
161
|
+
|
|
162
|
+
## [16.0.0](https://github.com/motdotla/dotenv/compare/v15.0.1...v16.0.0) (2022-02-02)
|
|
163
|
+
|
|
164
|
+
### Added
|
|
165
|
+
|
|
166
|
+
- _Breaking:_ Backtick support 🎉 ([#615](https://github.com/motdotla/dotenv/pull/615))
|
|
167
|
+
|
|
168
|
+
If you had values containing the backtick character, please quote those values with either single or double quotes.
|
|
169
|
+
|
|
170
|
+
## [15.0.1](https://github.com/motdotla/dotenv/compare/v15.0.0...v15.0.1) (2022-02-02)
|
|
171
|
+
|
|
172
|
+
### Changed
|
|
173
|
+
|
|
174
|
+
- Properly parse empty single or double quoted values 🐞 ([#614](https://github.com/motdotla/dotenv/pull/614))
|
|
175
|
+
|
|
176
|
+
## [15.0.0](https://github.com/motdotla/dotenv/compare/v14.3.2...v15.0.0) (2022-01-31)
|
|
177
|
+
|
|
178
|
+
`v15.0.0` is a major new release with some important breaking changes.
|
|
179
|
+
|
|
180
|
+
### Added
|
|
181
|
+
|
|
182
|
+
- _Breaking:_ Multiline parsing support (just works. no need for the flag.)
|
|
183
|
+
|
|
184
|
+
### Changed
|
|
185
|
+
|
|
186
|
+
- _Breaking:_ `#` marks the beginning of a comment (UNLESS the value is wrapped in quotes. Please update your `.env` files to wrap in quotes any values containing `#`. For example: `SECRET_HASH="something-with-a-#-hash"`).
|
|
187
|
+
|
|
188
|
+
..Understandably, (as some teams have noted) this is tedious to do across the entire team. To make it less tedious, we recommend using [dotenv cli](https://github.com/dotenv-org/cli) going forward. It's an optional plugin that will keep your `.env` files in sync between machines, environments, or team members.
|
|
189
|
+
|
|
190
|
+
### Removed
|
|
191
|
+
|
|
192
|
+
- _Breaking:_ Remove multiline option (just works out of the box now. no need for the flag.)
|
|
193
|
+
|
|
194
|
+
## [14.3.2](https://github.com/motdotla/dotenv/compare/v14.3.1...v14.3.2) (2022-01-25)
|
|
195
|
+
|
|
196
|
+
### Changed
|
|
197
|
+
|
|
198
|
+
- Preserve backwards compatibility on values containing `#` 🐞 ([#603](https://github.com/motdotla/dotenv/pull/603))
|
|
199
|
+
|
|
200
|
+
## [14.3.1](https://github.com/motdotla/dotenv/compare/v14.3.0...v14.3.1) (2022-01-25)
|
|
201
|
+
|
|
202
|
+
### Changed
|
|
203
|
+
|
|
204
|
+
- Preserve backwards compatibility on exports by re-introducing the prior in-place exports 🐞 ([#606](https://github.com/motdotla/dotenv/pull/606))
|
|
205
|
+
|
|
206
|
+
## [14.3.0](https://github.com/motdotla/dotenv/compare/v14.2.0...v14.3.0) (2022-01-24)
|
|
207
|
+
|
|
208
|
+
### Added
|
|
209
|
+
|
|
210
|
+
- Add `multiline` option 🎉 ([#486](https://github.com/motdotla/dotenv/pull/486))
|
|
211
|
+
|
|
212
|
+
## [14.2.0](https://github.com/motdotla/dotenv/compare/v14.1.1...v14.2.0) (2022-01-17)
|
|
213
|
+
|
|
214
|
+
### Added
|
|
215
|
+
|
|
216
|
+
- Add `dotenv_config_override` cli option
|
|
217
|
+
- Add `DOTENV_CONFIG_OVERRIDE` command line env option
|
|
218
|
+
|
|
219
|
+
## [14.1.1](https://github.com/motdotla/dotenv/compare/v14.1.0...v14.1.1) (2022-01-17)
|
|
220
|
+
|
|
221
|
+
### Added
|
|
222
|
+
|
|
223
|
+
- Add React gotcha to FAQ on README
|
|
224
|
+
|
|
225
|
+
## [14.1.0](https://github.com/motdotla/dotenv/compare/v14.0.1...v14.1.0) (2022-01-17)
|
|
226
|
+
|
|
227
|
+
### Added
|
|
228
|
+
|
|
229
|
+
- Add `override` option 🎉 ([#595](https://github.com/motdotla/dotenv/pull/595))
|
|
230
|
+
|
|
231
|
+
## [14.0.1](https://github.com/motdotla/dotenv/compare/v14.0.0...v14.0.1) (2022-01-16)
|
|
232
|
+
|
|
233
|
+
### Added
|
|
234
|
+
|
|
235
|
+
- Log error on failure to load `.env` file ([#594](https://github.com/motdotla/dotenv/pull/594))
|
|
236
|
+
|
|
237
|
+
## [14.0.0](https://github.com/motdotla/dotenv/compare/v13.0.1...v14.0.0) (2022-01-16)
|
|
238
|
+
|
|
239
|
+
### Added
|
|
240
|
+
|
|
241
|
+
- _Breaking:_ Support inline comments for the parser 🎉 ([#568](https://github.com/motdotla/dotenv/pull/568))
|
|
242
|
+
|
|
243
|
+
## [13.0.1](https://github.com/motdotla/dotenv/compare/v13.0.0...v13.0.1) (2022-01-16)
|
|
244
|
+
|
|
245
|
+
### Changed
|
|
246
|
+
|
|
247
|
+
* Hide comments and newlines from debug output ([#404](https://github.com/motdotla/dotenv/pull/404))
|
|
248
|
+
|
|
249
|
+
## [13.0.0](https://github.com/motdotla/dotenv/compare/v12.0.4...v13.0.0) (2022-01-16)
|
|
250
|
+
|
|
251
|
+
### Added
|
|
252
|
+
|
|
253
|
+
* _Breaking:_ Add type file for `config.js` ([#539](https://github.com/motdotla/dotenv/pull/539))
|
|
254
|
+
|
|
255
|
+
## [12.0.4](https://github.com/motdotla/dotenv/compare/v12.0.3...v12.0.4) (2022-01-16)
|
|
256
|
+
|
|
257
|
+
### Changed
|
|
258
|
+
|
|
259
|
+
* README updates
|
|
260
|
+
* Minor order adjustment to package json format
|
|
261
|
+
|
|
262
|
+
## [12.0.3](https://github.com/motdotla/dotenv/compare/v12.0.2...v12.0.3) (2022-01-15)
|
|
263
|
+
|
|
264
|
+
### Changed
|
|
265
|
+
|
|
266
|
+
* Simplified jsdoc for consistency across editors
|
|
267
|
+
|
|
268
|
+
## [12.0.2](https://github.com/motdotla/dotenv/compare/v12.0.1...v12.0.2) (2022-01-15)
|
|
269
|
+
|
|
270
|
+
### Changed
|
|
271
|
+
|
|
272
|
+
* Improve embedded jsdoc type documentation
|
|
273
|
+
|
|
274
|
+
## [12.0.1](https://github.com/motdotla/dotenv/compare/v12.0.0...v12.0.1) (2022-01-15)
|
|
275
|
+
|
|
276
|
+
### Changed
|
|
277
|
+
|
|
278
|
+
* README updates and clarifications
|
|
279
|
+
|
|
280
|
+
## [12.0.0](https://github.com/motdotla/dotenv/compare/v11.0.0...v12.0.0) (2022-01-15)
|
|
281
|
+
|
|
282
|
+
### Removed
|
|
283
|
+
|
|
284
|
+
- _Breaking:_ drop support for Flow static type checker ([#584](https://github.com/motdotla/dotenv/pull/584))
|
|
285
|
+
|
|
286
|
+
### Changed
|
|
287
|
+
|
|
288
|
+
- Move types/index.d.ts to lib/main.d.ts ([#585](https://github.com/motdotla/dotenv/pull/585))
|
|
289
|
+
- Typescript cleanup ([#587](https://github.com/motdotla/dotenv/pull/587))
|
|
290
|
+
- Explicit typescript inclusion in package.json ([#566](https://github.com/motdotla/dotenv/pull/566))
|
|
291
|
+
|
|
292
|
+
## [11.0.0](https://github.com/motdotla/dotenv/compare/v10.0.0...v11.0.0) (2022-01-11)
|
|
293
|
+
|
|
294
|
+
### Changed
|
|
295
|
+
|
|
296
|
+
- _Breaking:_ drop support for Node v10 ([#558](https://github.com/motdotla/dotenv/pull/558))
|
|
297
|
+
- Patch debug option ([#550](https://github.com/motdotla/dotenv/pull/550))
|
|
298
|
+
|
|
299
|
+
## [10.0.0](https://github.com/motdotla/dotenv/compare/v9.0.2...v10.0.0) (2021-05-20)
|
|
300
|
+
|
|
301
|
+
### Added
|
|
302
|
+
|
|
303
|
+
- Add generic support to parse function
|
|
304
|
+
- Allow for import "dotenv/config.js"
|
|
305
|
+
- Add support to resolve home directory in path via ~
|
|
306
|
+
|
|
307
|
+
## [9.0.2](https://github.com/motdotla/dotenv/compare/v9.0.1...v9.0.2) (2021-05-10)
|
|
308
|
+
|
|
309
|
+
### Changed
|
|
310
|
+
|
|
311
|
+
- Support windows newlines with debug mode
|
|
312
|
+
|
|
313
|
+
## [9.0.1](https://github.com/motdotla/dotenv/compare/v9.0.0...v9.0.1) (2021-05-08)
|
|
314
|
+
|
|
315
|
+
### Changed
|
|
316
|
+
|
|
317
|
+
- Updates to README
|
|
318
|
+
|
|
319
|
+
## [9.0.0](https://github.com/motdotla/dotenv/compare/v8.6.0...v9.0.0) (2021-05-05)
|
|
320
|
+
|
|
321
|
+
### Changed
|
|
322
|
+
|
|
323
|
+
- _Breaking:_ drop support for Node v8
|
|
324
|
+
|
|
325
|
+
## [8.6.0](https://github.com/motdotla/dotenv/compare/v8.5.1...v8.6.0) (2021-05-05)
|
|
326
|
+
|
|
327
|
+
### Added
|
|
328
|
+
|
|
329
|
+
- define package.json in exports
|
|
330
|
+
|
|
331
|
+
## [8.5.1](https://github.com/motdotla/dotenv/compare/v8.5.0...v8.5.1) (2021-05-05)
|
|
332
|
+
|
|
333
|
+
### Changed
|
|
334
|
+
|
|
335
|
+
- updated dev dependencies via npm audit
|
|
336
|
+
|
|
337
|
+
## [8.5.0](https://github.com/motdotla/dotenv/compare/v8.4.0...v8.5.0) (2021-05-05)
|
|
338
|
+
|
|
339
|
+
### Added
|
|
340
|
+
|
|
341
|
+
- allow for `import "dotenv/config"`
|
|
342
|
+
|
|
343
|
+
## [8.4.0](https://github.com/motdotla/dotenv/compare/v8.3.0...v8.4.0) (2021-05-05)
|
|
344
|
+
|
|
345
|
+
### Changed
|
|
346
|
+
|
|
347
|
+
- point to exact types file to work with VS Code
|
|
348
|
+
|
|
349
|
+
## [8.3.0](https://github.com/motdotla/dotenv/compare/v8.2.0...v8.3.0) (2021-05-05)
|
|
350
|
+
|
|
351
|
+
### Changed
|
|
352
|
+
|
|
353
|
+
- _Breaking:_ drop support for Node v8 (mistake to be released as minor bump. later bumped to 9.0.0. see above.)
|
|
354
|
+
|
|
355
|
+
## [8.2.0](https://github.com/motdotla/dotenv/compare/v8.1.0...v8.2.0) (2019-10-16)
|
|
356
|
+
|
|
357
|
+
### Added
|
|
358
|
+
|
|
359
|
+
- TypeScript types
|
|
360
|
+
|
|
361
|
+
## [8.1.0](https://github.com/motdotla/dotenv/compare/v8.0.0...v8.1.0) (2019-08-18)
|
|
362
|
+
|
|
363
|
+
### Changed
|
|
364
|
+
|
|
365
|
+
- _Breaking:_ drop support for Node v6 ([#392](https://github.com/motdotla/dotenv/issues/392))
|
|
366
|
+
|
|
367
|
+
# [8.0.0](https://github.com/motdotla/dotenv/compare/v7.0.0...v8.0.0) (2019-05-02)
|
|
368
|
+
|
|
369
|
+
### Changed
|
|
370
|
+
|
|
371
|
+
- _Breaking:_ drop support for Node v6 ([#302](https://github.com/motdotla/dotenv/issues/392))
|
|
372
|
+
|
|
373
|
+
## [7.0.0] - 2019-03-12
|
|
374
|
+
|
|
375
|
+
### Fixed
|
|
376
|
+
|
|
377
|
+
- Fix removing unbalanced quotes ([#376](https://github.com/motdotla/dotenv/pull/376))
|
|
378
|
+
|
|
379
|
+
### Removed
|
|
380
|
+
|
|
381
|
+
- Removed `load` alias for `config` for consistency throughout code and documentation.
|
|
382
|
+
|
|
383
|
+
## [6.2.0] - 2018-12-03
|
|
384
|
+
|
|
385
|
+
### Added
|
|
386
|
+
|
|
387
|
+
- Support preload configuration via environment variables ([#351](https://github.com/motdotla/dotenv/issues/351))
|
|
388
|
+
|
|
389
|
+
## [6.1.0] - 2018-10-08
|
|
390
|
+
|
|
391
|
+
### Added
|
|
392
|
+
|
|
393
|
+
- `debug` option for `config` and `parse` methods will turn on logging
|
|
394
|
+
|
|
395
|
+
## [6.0.0] - 2018-06-02
|
|
396
|
+
|
|
397
|
+
### Changed
|
|
398
|
+
|
|
399
|
+
- _Breaking:_ drop support for Node v4 ([#304](https://github.com/motdotla/dotenv/pull/304))
|
|
400
|
+
|
|
401
|
+
## [5.0.0] - 2018-01-29
|
|
402
|
+
|
|
403
|
+
### Added
|
|
404
|
+
|
|
405
|
+
- Testing against Node v8 and v9
|
|
406
|
+
- Documentation on trim behavior of values
|
|
407
|
+
- Documentation on how to use with `import`
|
|
408
|
+
|
|
409
|
+
### Changed
|
|
410
|
+
|
|
411
|
+
- _Breaking_: default `path` is now `path.resolve(process.cwd(), '.env')`
|
|
412
|
+
- _Breaking_: does not write over keys already in `process.env` if the key has a falsy value
|
|
413
|
+
- using `const` and `let` instead of `var`
|
|
414
|
+
|
|
415
|
+
### Removed
|
|
416
|
+
|
|
417
|
+
- Testing against Node v7
|
|
418
|
+
|
|
419
|
+
## [4.0.0] - 2016-12-23
|
|
420
|
+
|
|
421
|
+
### Changed
|
|
422
|
+
|
|
423
|
+
- Return Object with parsed content or error instead of false ([#165](https://github.com/motdotla/dotenv/pull/165)).
|
|
424
|
+
|
|
425
|
+
### Removed
|
|
426
|
+
|
|
427
|
+
- `verbose` option removed in favor of returning result.
|
|
428
|
+
|
|
429
|
+
## [3.0.0] - 2016-12-20
|
|
430
|
+
|
|
431
|
+
### Added
|
|
432
|
+
|
|
433
|
+
- `verbose` option will log any error messages. Off by default.
|
|
434
|
+
- parses email addresses correctly
|
|
435
|
+
- allow importing config method directly in ES6
|
|
436
|
+
|
|
437
|
+
### Changed
|
|
438
|
+
|
|
439
|
+
- Suppress error messages by default ([#154](https://github.com/motdotla/dotenv/pull/154))
|
|
440
|
+
- Ignoring more files for NPM to make package download smaller
|
|
441
|
+
|
|
442
|
+
### Fixed
|
|
443
|
+
|
|
444
|
+
- False positive test due to case-sensitive variable ([#124](https://github.com/motdotla/dotenv/pull/124))
|
|
445
|
+
|
|
446
|
+
### Removed
|
|
447
|
+
|
|
448
|
+
- `silent` option removed in favor of `verbose`
|
|
449
|
+
|
|
450
|
+
## [2.0.0] - 2016-01-20
|
|
451
|
+
|
|
452
|
+
### Added
|
|
453
|
+
|
|
454
|
+
- CHANGELOG to ["make it easier for users and contributors to see precisely what notable changes have been made between each release"](http://keepachangelog.com/). Linked to from README
|
|
455
|
+
- LICENSE to be more explicit about what was defined in `package.json`. Linked to from README
|
|
456
|
+
- Testing nodejs v4 on travis-ci
|
|
457
|
+
- added examples of how to use dotenv in different ways
|
|
458
|
+
- return parsed object on success rather than boolean true
|
|
459
|
+
|
|
460
|
+
### Changed
|
|
461
|
+
|
|
462
|
+
- README has shorter description not referencing ruby gem since we don't have or want feature parity
|
|
463
|
+
|
|
464
|
+
### Removed
|
|
465
|
+
|
|
466
|
+
- Variable expansion and escaping so environment variables are encouraged to be fully orthogonal
|
|
467
|
+
|
|
468
|
+
## [1.2.0] - 2015-06-20
|
|
469
|
+
|
|
470
|
+
### Added
|
|
471
|
+
|
|
472
|
+
- Preload hook to require dotenv without including it in your code
|
|
473
|
+
|
|
474
|
+
### Changed
|
|
475
|
+
|
|
476
|
+
- clarified license to be "BSD-2-Clause" in `package.json`
|
|
477
|
+
|
|
478
|
+
### Fixed
|
|
479
|
+
|
|
480
|
+
- retain spaces in string vars
|
|
481
|
+
|
|
482
|
+
## [1.1.0] - 2015-03-31
|
|
483
|
+
|
|
484
|
+
### Added
|
|
485
|
+
|
|
486
|
+
- Silent option to silence `console.log` when `.env` missing
|
|
487
|
+
|
|
488
|
+
## [1.0.0] - 2015-03-13
|
|
489
|
+
|
|
490
|
+
### Removed
|
|
491
|
+
|
|
492
|
+
- support for multiple `.env` files. should always use one `.env` file for the current environment
|
|
493
|
+
|
|
494
|
+
[7.0.0]: https://github.com/motdotla/dotenv/compare/v6.2.0...v7.0.0
|
|
495
|
+
[6.2.0]: https://github.com/motdotla/dotenv/compare/v6.1.0...v6.2.0
|
|
496
|
+
[6.1.0]: https://github.com/motdotla/dotenv/compare/v6.0.0...v6.1.0
|
|
497
|
+
[6.0.0]: https://github.com/motdotla/dotenv/compare/v5.0.0...v6.0.0
|
|
498
|
+
[5.0.0]: https://github.com/motdotla/dotenv/compare/v4.0.0...v5.0.0
|
|
499
|
+
[4.0.0]: https://github.com/motdotla/dotenv/compare/v3.0.0...v4.0.0
|
|
500
|
+
[3.0.0]: https://github.com/motdotla/dotenv/compare/v2.0.0...v3.0.0
|
|
501
|
+
[2.0.0]: https://github.com/motdotla/dotenv/compare/v1.2.0...v2.0.0
|
|
502
|
+
[1.2.0]: https://github.com/motdotla/dotenv/compare/v1.1.0...v1.2.0
|
|
503
|
+
[1.1.0]: https://github.com/motdotla/dotenv/compare/v1.0.0...v1.1.0
|
|
504
|
+
[1.0.0]: https://github.com/motdotla/dotenv/compare/v0.4.0...v1.0.0
|
package/README.md
ADDED
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
# @tailwindcss/forms
|
|
2
|
+
|
|
3
|
+
A plugin that provides a basic reset for form styles that makes form elements easy to override with utilities.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
Install the plugin from npm:
|
|
8
|
+
|
|
9
|
+
```sh
|
|
10
|
+
npm install -D @tailwindcss/forms
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Then, when using Tailwind CSS v4, add the plugin to your main stylesheet:
|
|
14
|
+
|
|
15
|
+
```css
|
|
16
|
+
/* app.css */
|
|
17
|
+
@import "tailwindcss";
|
|
18
|
+
@plugin "@tailwindcss/forms";
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
If you are still using **Tailwind CSS v3**, add the plugin to your `tailwind.config.js` file:
|
|
22
|
+
|
|
23
|
+
```js
|
|
24
|
+
// tailwind.config.js
|
|
25
|
+
module.exports = {
|
|
26
|
+
theme: {
|
|
27
|
+
// ...
|
|
28
|
+
},
|
|
29
|
+
plugins: [
|
|
30
|
+
require('@tailwindcss/forms'),
|
|
31
|
+
// ...
|
|
32
|
+
],
|
|
33
|
+
}
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Basic usage
|
|
37
|
+
|
|
38
|
+
[**View the live demo**](https://tailwindcss-forms.vercel.app/)
|
|
39
|
+
|
|
40
|
+
All of the basic form elements you use will now have some simple default styles that are easy to override with utilities.
|
|
41
|
+
|
|
42
|
+
Currently we add basic utility-friendly form styles for the following form element types:
|
|
43
|
+
|
|
44
|
+
- `input[type='text']`
|
|
45
|
+
- `input[type='password']`
|
|
46
|
+
- `input[type='email']`
|
|
47
|
+
- `input[type='number']`
|
|
48
|
+
- `input[type='url']`
|
|
49
|
+
- `input[type='date']`
|
|
50
|
+
- `input[type='datetime-local']`
|
|
51
|
+
- `input[type='month']`
|
|
52
|
+
- `input[type='week']`
|
|
53
|
+
- `input[type='time']`
|
|
54
|
+
- `input[type='search']`
|
|
55
|
+
- `input[type='tel']`
|
|
56
|
+
- `input[type='checkbox']`
|
|
57
|
+
- `input[type='radio']`
|
|
58
|
+
- `select`
|
|
59
|
+
- `select[multiple]`
|
|
60
|
+
- `textarea`
|
|
61
|
+
|
|
62
|
+
Every element has been normalized/reset to a simple visually consistent style that is easy to customize with utilities, even elements like `<select>` or `<input type="checkbox">` that normally need to be reset with `appearance: none` and customized using custom CSS:
|
|
63
|
+
|
|
64
|
+
```html
|
|
65
|
+
<!-- You can actually customize padding on a select element now: -->
|
|
66
|
+
<select class="rounded-full px-4 py-3">
|
|
67
|
+
<!-- ... -->
|
|
68
|
+
</select>
|
|
69
|
+
|
|
70
|
+
<!-- Or change a checkbox color using text color utilities: -->
|
|
71
|
+
<input type="checkbox" class="rounded text-pink-500" />
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
More customization examples and best practices coming soon.
|
|
75
|
+
|
|
76
|
+
### Using classes to style
|
|
77
|
+
|
|
78
|
+
In addition to the global styles, we also generate a set of corresponding classes which can be used to explicitly apply the form styles to an element. This can be useful in situations where you need to make a non-form element, such as a `<div>`, look like a form element.
|
|
79
|
+
|
|
80
|
+
```html
|
|
81
|
+
<input type="email" class="form-input rounded-full px-4 py-3" />
|
|
82
|
+
|
|
83
|
+
<select class="form-select rounded-full px-4 py-3">
|
|
84
|
+
<!-- ... -->
|
|
85
|
+
</select>
|
|
86
|
+
|
|
87
|
+
<input type="checkbox" class="form-checkbox rounded text-pink-500" />
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
Here is a complete table of the provided `form-*` classes for reference:
|
|
91
|
+
|
|
92
|
+
| Base | Class |
|
|
93
|
+
| ------------------------- | ------------------ |
|
|
94
|
+
| `[type='text']` | `form-input` |
|
|
95
|
+
| `[type='email']` | `form-input` |
|
|
96
|
+
| `[type='url']` | `form-input` |
|
|
97
|
+
| `[type='password']` | `form-input` |
|
|
98
|
+
| `[type='number']` | `form-input` |
|
|
99
|
+
| `[type='date']` | `form-input` |
|
|
100
|
+
| `[type='datetime-local']` | `form-input` |
|
|
101
|
+
| `[type='month']` | `form-input` |
|
|
102
|
+
| `[type='search']` | `form-input` |
|
|
103
|
+
| `[type='tel']` | `form-input` |
|
|
104
|
+
| `[type='time']` | `form-input` |
|
|
105
|
+
| `[type='week']` | `form-input` |
|
|
106
|
+
| `textarea` | `form-textarea` |
|
|
107
|
+
| `select` | `form-select` |
|
|
108
|
+
| `select[multiple]` | `form-multiselect` |
|
|
109
|
+
| `[type='checkbox']` | `form-checkbox` |
|
|
110
|
+
| `[type='radio']` | `form-radio` |
|
|
111
|
+
|
|
112
|
+
### Using only global styles or only classes
|
|
113
|
+
|
|
114
|
+
Although we recommend thinking of this plugin as a "form reset" rather than a collection of form component styles, in some cases our default approach may be too heavy-handed, especially when integrating this plugin into existing projects.
|
|
115
|
+
|
|
116
|
+
If generating both the global (base) styles and classes doesn't work well with your project, you can use the `strategy` option to limit the plugin to just one of these approaches.
|
|
117
|
+
|
|
118
|
+
When using Tailwind CSS v4, configure the plugin in your main stylesheet:
|
|
119
|
+
|
|
120
|
+
```css
|
|
121
|
+
/* app.css */
|
|
122
|
+
@plugin "@tailwindcss/forms" {
|
|
123
|
+
strategy: "base"; /* only generate global styles; or */
|
|
124
|
+
strategy: "class"; /* only generate classes */
|
|
125
|
+
}
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
If you are still using **Tailwind CSS v3**, configure the plugin in your `tailwind.config.js` file:
|
|
129
|
+
|
|
130
|
+
```js
|
|
131
|
+
// tailwind.config.js
|
|
132
|
+
plugins: [
|
|
133
|
+
require("@tailwindcss/forms")({
|
|
134
|
+
strategy: 'base', // only generate global styles
|
|
135
|
+
strategy: 'class', // only generate classes
|
|
136
|
+
}),
|
|
137
|
+
],
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
When using the `base` strategy, form elements are styled globally, and no `form-{name}` classes are generated.
|
|
141
|
+
|
|
142
|
+
When using the `class` strategy, form elements are not styled globally, and instead must be styled using the generated `form-{name}` classes.
|
package/config.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/config.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
const re = /^dotenv_config_(encoding|path|debug|override|DOTENV_KEY)=(.+)$/
|
|
2
|
+
|
|
3
|
+
module.exports = function optionMatcher (args) {
|
|
4
|
+
return args.reduce(function (acc, cur) {
|
|
5
|
+
const matches = cur.match(re)
|
|
6
|
+
if (matches) {
|
|
7
|
+
acc[matches[1]] = matches[2]
|
|
8
|
+
}
|
|
9
|
+
return acc
|
|
10
|
+
}, {})
|
|
11
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// ../config.js accepts options via environment variables
|
|
2
|
+
const options = {}
|
|
3
|
+
|
|
4
|
+
if (process.env.DOTENV_CONFIG_ENCODING != null) {
|
|
5
|
+
options.encoding = process.env.DOTENV_CONFIG_ENCODING
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
if (process.env.DOTENV_CONFIG_PATH != null) {
|
|
9
|
+
options.path = process.env.DOTENV_CONFIG_PATH
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
if (process.env.DOTENV_CONFIG_DEBUG != null) {
|
|
13
|
+
options.debug = process.env.DOTENV_CONFIG_DEBUG
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
if (process.env.DOTENV_CONFIG_OVERRIDE != null) {
|
|
17
|
+
options.override = process.env.DOTENV_CONFIG_OVERRIDE
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
if (process.env.DOTENV_CONFIG_DOTENV_KEY != null) {
|
|
21
|
+
options.DOTENV_KEY = process.env.DOTENV_CONFIG_DOTENV_KEY
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
module.exports = options
|