Giter VIP home page Giter VIP logo

Comments (19)

orta avatar orta commented on August 25, 2024 2

its all green on https://kangax.github.io/compat-table/es2016plus/

from bases.

LinusU avatar LinusU commented on August 25, 2024 2

Hey, author of https://stackoverflow.com/a/61305579/148072 here 👋

Since Node.js 14 supports ES Modules, I wanted to take advantage of that. That's why it uses "module": "ES2020" & "moduleResolution": "node", instead of "module": "commonjs".

I wouldn't say that anyone is right or wrong! It depends on wether you want to stick with require('...') for a while longer, or start using import _ from _ even though it's still quite new to Node.js...

from bases.

orta avatar orta commented on August 25, 2024 2

Nice write-up in that SO Linus!

TS's support of the node implementation of ESM isn't complete enough that we class it as a feature in TypeScript yet - but when we do, I think we can ship a separate node14-esm base for folks to work from 👍🏻

from bases.

orta avatar orta commented on August 25, 2024 1

It should auto publish overnight, if it doesn't that's a bug!

from bases.

orta avatar orta commented on August 25, 2024 1

It did https://github.com/tsconfig/bases/runs/1163996333?check_suite_focus=true#step:6:17

from bases.

BenjD90 avatar BenjD90 commented on August 25, 2024

+1 to add this 😄

from bases.

orta avatar orta commented on August 25, 2024

Want to take a look at figuring it out?

from bases.

BenjD90 avatar BenjD90 commented on August 25, 2024

I think that the tsconfig for Node 14 could be something like this :

{
  "$schema": "https://json.schemastore.org/tsconfig",
  "display": "Node 14",
  "compilerOptions": {
    "lib": ["es2019", "es2020"],
    "module": "commonjs",
    "target": "es2020",
    "strict": true,
    "esModuleInterop": true,
    "skipLibCheck": true,
    "forceConsistentCasingInFileNames": true
  }  
}

@orta What do you think about this ?

from bases.

orta avatar orta commented on August 25, 2024

It could be it - Did you verify the features in es2019 / es2020 are available inside that version of node?

from bases.

BenjD90 avatar BenjD90 commented on August 25, 2024

yes, it's all in the page you linked before : https://kangax.github.io/compat-table/es2016plus/

To be complete, more details are available here :
image

ES2019 is already supported in Node 12 ;) :
https://github.com/tsconfig/bases/blob/master/bases/node12.json

from bases.

BenjD90 avatar BenjD90 commented on August 25, 2024

And, by the way, all ESNEXT at Stage 3 are supported too : https://node.green/#ESNEXT

from bases.

orta avatar orta commented on August 25, 2024

Great, agree - want to ship a PR to claim the credit?

from bases.

BenjD90 avatar BenjD90 commented on August 25, 2024

Ok, I'll try to do the PR this evening, on 1-2 hours 😉

thanks

from bases.

BenjD90 avatar BenjD90 commented on August 25, 2024

Here's the PR #36

from bases.

BenjD90 avatar BenjD90 commented on August 25, 2024

@orta is it possible to publish @tsconfig/node14 ?

from bases.

cowwoc avatar cowwoc commented on August 25, 2024

Hi,

Your config disagrees with https://stackoverflow.com/a/61305579/14731. Who is right?

from bases.

LinusU avatar LinusU commented on August 25, 2024

@orta Thanks!

TS's support of the node implementation of ESM isn't complete enough that we class it as a feature in TypeScript yet

Is this documented somewhere? 🤔 or is there anything in particular that doesn't work?

from bases.

SCDevel avatar SCDevel commented on August 25, 2024

does node 14 base work with node 15?

EDIT: it did not crash, so I'm just going to go with it 😆

from bases.

orta avatar orta commented on August 25, 2024

Node 14 is in, so I'm closing this

from bases.

Related Issues (20)

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.