Coder Social home page Coder Social logo

Comments (6)

theluk avatar theluk commented on June 1, 2024 3

So my arguments are

  1. Your dotenv (no TS) is doing it
  2. .env files in general are inspired by how bash is setting environment variables, which allows quotes and omits them.
  3. Opinion: There is no benefit of having quotes in the JavaScript object

I guess being compatible what the broadly known standard is, would be beneficial

from ts-dotenv.

Nicholaiii avatar Nicholaiii commented on June 1, 2024 2

This would be really nice, for two reasons:

  1. The reference implementation of dotenv supports it (and the PR jacks the implementation from said lib). This means people moving from dotenv to ts-dotenv will face unexpected issues.
  2. VSC syntax highlighting only registers it as a string with quotes
    image

Another thing aside is that allowing quotes gives you the option of having whitespace padding, while normally trimming.

from ts-dotenv.

LeoBakerHytch avatar LeoBakerHytch commented on June 1, 2024 2

At very long last, this is implemented in 0.9.0 😅

from ts-dotenv.

LeoBakerHytch avatar LeoBakerHytch commented on June 1, 2024

IIRC, you don’t need to use quotes at all. Everything after the = up to the newline becomes the value of the environment variable.

from ts-dotenv.

theluk avatar theluk commented on June 1, 2024

I know. But if you use them, you want them to be removed. That's what this PR is doing

from ts-dotenv.

LeoBakerHytch avatar LeoBakerHytch commented on June 1, 2024

I hope this doesn’t come across as me being awkward, but I don’t see any need. You’re of course welcome to maintain a fork that removes quotes, but couldn’t you just remove the quotes from your env file? I’m happy to hear a good argument for why it’s necessary, but otherwise it’s just an additional complication. 🙂

from ts-dotenv.

Related Issues (4)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.