It FINALLY happened

แชร์
ฝัง
  • เผยแพร่เมื่อ 8 ม.ค. 2025

ความคิดเห็น • 88

  • @baetz2
    @baetz2 14 ชั่วโมงที่ผ่านมา +29

    I love how you could've made this video 25 minutes long with all that bs everyone doing novadays, but instead didn't waste everyone's time and simply delivered the news and addressed future questions by linking the article.

    • @automatehub-dev
      @automatehub-dev 3 ชั่วโมงที่ผ่านมา

      yep..... ive never seen a video from this channel before, but damn that was good - subscribed instantly 🙌🏼

  • @Zakher
    @Zakher 21 ชั่วโมงที่ผ่านมา +116

    RIP ts-node

    • @maelstrom57
      @maelstrom57 20 ชั่วโมงที่ผ่านมา +27

      It's amazing how some people are still using ts-node when tsx is a thing.

    • @ivyZorz
      @ivyZorz 20 ชั่วโมงที่ผ่านมา +1

      @@maelstrom57 Wait can you explain?

    • @hhhhhhhhhhhhhhhhhhhhhh
      @hhhhhhhhhhhhhhhhhhhhhh 19 ชั่วโมงที่ผ่านมา +5

      ​@@ivyZorzThere's a NodeJS library called tsx which is basically ts-node but faster and just better

    • @gooseob
      @gooseob 18 ชั่วโมงที่ผ่านมา

      @@hhhhhhhhhhhhhhhhhhhhhh is it better than esrun?

    • @dinckelman
      @dinckelman 17 ชั่วโมงที่ผ่านมา +2

      definitely will not be missed. Treating typescript as a first-party entity is the new default

  • @shivan2418
    @shivan2418 21 ชั่วโมงที่ผ่านมา +33

    The fact that node is made by volunteers blows my mind.

    • @adnanearef2959
      @adnanearef2959 14 ชั่วโมงที่ผ่านมา +2

      Just like Blender, I swear free open source products with a volunteer community that's listenning to the users needs and feedbacks are always the best.

  • @hicoop
    @hicoop 21 ชั่วโมงที่ผ่านมา +10

    This is such a win for the ecosystem. So excited

  • @BlackAsLight448
    @BlackAsLight448 14 ชั่วโมงที่ผ่านมา +14

    If we're being honest, node wouldn't have done something like this if other runtimes like Deno and Bun didn't come out and offer competition.

    • @mattpocockuk
      @mattpocockuk  13 ชั่วโมงที่ผ่านมา +6

      We can't know, but I think this narrative is lazy and unsubstantiated.

    • @whoknows3679
      @whoknows3679 6 ชั่วโมงที่ผ่านมา +2

      @@mattpocockukwhy is lazy to say that competition pushes technology further?

    • @karlstein9572
      @karlstein9572 6 ชั่วโมงที่ผ่านมา +2

      cannot disagree more, the fact is that NodeJS has a massive ecosystem, a small change could break tons on dependencies... that's why it's evolving slowly.
      what is true is that TypeScript support has "maybe" come faster due to the competition, but maybe not because as you see it's "just" an option to strip types, no conversion from TS to JS (not really), this is kind of faster to implement and it could have been released a few months after Deno/Bun releases, however that is not what happened, we had to wait a years for that, but now it's becoming a reality. I am so happy that finally happened.

  • @MrGoGetItt
    @MrGoGetItt 20 ชั่วโมงที่ผ่านมา +8

    your short videos are JAM-PACKED & AWESOME

    • @rawallon
      @rawallon 17 ชั่วโมงที่ผ่านมา

      Good thing I like JAM

  • @BeeBeeEight
    @BeeBeeEight 6 ชั่วโมงที่ผ่านมา +4

    IMO, we have Deno to thank for taking the initiative to include TypeScript and Rust-based bundlers/compilers. Call me biased if you like, Rust has done for JS compilers what TypeScript did for JS code, which is achieving runtime safety. If they weren't the first to do it I'm not sure when we will ever see TS in node by default, notwithstanding that node being run by volunteers is doing an already great job.

  • @anissan
    @anissan 17 ชั่วโมงที่ผ่านมา +10

    Can we put breakpoints in .ts files and debug it like a normal .js file?

    • @satanacchio
      @satanacchio 17 ชั่วโมงที่ผ่านมา +1

      Yes

    • @mattpocockuk
      @mattpocockuk  16 ชั่วโมงที่ผ่านมา +7

      Yes, and it rocks

  • @Sahil.1
    @Sahil.1 14 ชั่วโมงที่ผ่านมา +2

    I remember the quote any which is not written in javascript will eventually be written in javascript

  • @glazevolda823
    @glazevolda823 4 ชั่วโมงที่ผ่านมา

    It’s a great thing. Hope it will be added as a standard feature.
    And I hope there’s an opportunity to automise type check / lint ts code in order to use it with CI tools etc
    Ps there’s one thing I like in this approach especially developing frontend applications. I’ve replaced vue-cli with vite & was pleasantly surprised that I can develop vue applications with ts without type checks in dev mode. Previously, using webpack I had to wait until the entire project was builder and checked for types before the dev server was started, and with each new save there was also a type check. There were also difficulties with setting up ssr, but now it has all become much easier, and type checking can be done for production build only.

  • @serge8085
    @serge8085 11 ชั่วโมงที่ผ่านมา +2

    Yeah, finally, it only took Deno and Bun to appear and push hard enough

  • @ColinRichardson
    @ColinRichardson 22 ชั่วโมงที่ผ่านมา

    YAY, I knew it was coming out on the 8th, but wasn't sure of the exact time 23.6 was gonna be released.. Thank you for giving me the prod..
    I think we just need to old-yellow typescript enums and we can be happy.

  • @Alcani3ca
    @Alcani3ca 19 ชั่วโมงที่ผ่านมา +1

    Since all it does is just ignore the types does this means a project can have some parts be typescript and others be javascript without any compilation/bundling? This would be awesome to migrate old projects slowly to typescript

    • @mattpocockuk
      @mattpocockuk  19 ชั่วโมงที่ผ่านมา +2

      Yep, pretty sure that'll just work.

  • @dovh49
    @dovh49 16 ชั่วโมงที่ผ่านมา

    I didn't see this in your blog. But when I was using this feature before I wasn't able to use this feature in node_modules. I have a package that I use that I call to build my project from a node_module. Did they fix that yet?

  • @amerimohammedayoub7272
    @amerimohammedayoub7272 9 ชั่วโมงที่ผ่านมา

    What about performance?
    Is this only for development phase? And push js files ih productions ?

    • @philheathslegalteam
      @philheathslegalteam 3 ชั่วโมงที่ผ่านมา

      Only startup performance is affected. They’re using SWC so it will be crazy fast.
      Then that stripped version is byte code cached by V8 so the next run will be instant

  • @bitcoinxofficial
    @bitcoinxofficial 2 ชั่วโมงที่ผ่านมา

    Rip deno, rip bun

  • @netssrmrz
    @netssrmrz 4 ชั่วโมงที่ผ่านมา

    🤣I love that TS "support" is just a flag to strip it out! It's like a Monty Python sketch! Hopefully there's a flag to save the resulting files.

  • @ilmupadiyoutubechanel
    @ilmupadiyoutubechanel 17 ชั่วโมงที่ผ่านมา

    Welcome back bro

  • @HikaruAkitsuki
    @HikaruAkitsuki 6 ชั่วโมงที่ผ่านมา

    Okay? So Typescript is kinda pseudo native now?

  • @atuttle
    @atuttle 19 ชั่วโมงที่ผ่านมา

    Node v22 is available on AWS lambda. Is it possible to pass the flag (or maybe set an ENV var?) that turns on type stripping?

    • @mattpocockuk
      @mattpocockuk  19 ชั่วโมงที่ผ่านมา +5

      Definitely don't do this on lambda, you should be type stripping and minifying to squeeze the most juice out of your cold starts.

    • @joelv4495
      @joelv4495 17 ชั่วโมงที่ผ่านมา

      @@mattpocockuk 100% this. I recommend bundling code that's destined for Lambda, just be sure to exclude any aws-sdk dependencies as those come for free.

    • @joebowbeer
      @joebowbeer 4 ชั่วโมงที่ผ่านมา

      For fastest coldstart times, AWS advises bundling everything (incl. aws-sdk modules) in your uploaded zip.

  • @l00k210
    @l00k210 11 ชั่วโมงที่ผ่านมา

    What about emitDecoratorMetadata?

    • @philheathslegalteam
      @philheathslegalteam 3 ชั่วโมงที่ผ่านมา

      Flag needed

    • @l00k210
      @l00k210 3 ชั่วโมงที่ผ่านมา

      @philheathslegalteam it's supported? :O

  • @alvaromoe
    @alvaromoe 17 ชั่วโมงที่ผ่านมา

    Does it typecheck my files?

  • @danko95bgd
    @danko95bgd 20 ชั่วโมงที่ผ่านมา +4

    classic node, remove 1 flag, need another flag

  • @fatihozgen2886
    @fatihozgen2886 20 ชั่วโมงที่ผ่านมา

    But when it is in LTS?

    • @mattpocockuk
      @mattpocockuk  19 ชั่วโมงที่ผ่านมา

      It will be unflagged in 22, so whenever 22 becomes LTS

    • @statuschannel8572
      @statuschannel8572 17 ชั่วโมงที่ผ่านมา

      @@mattpocockuk u mean 24? because 22 is already LTS though!

    • @mattpocockuk
      @mattpocockuk  15 ชั่วโมงที่ผ่านมา

      @@statuschannel8572 Whoops, yes, 22 is LTS. So, soon!

  • @anasouardini
    @anasouardini 16 ชั่วโมงที่ผ่านมา

    tried it; doesn't work yet!

    • @mattpocockuk
      @mattpocockuk  16 ชั่วโมงที่ผ่านมา

      What was different about your setup to mine?

  • @tusharsnx
    @tusharsnx 20 ชั่วโมงที่ผ่านมา

    RIP ts-node, tsx, tsup, ts-jest and whatnot...

  • @kilo.ironblossom
    @kilo.ironblossom 21 ชั่วโมงที่ผ่านมา

    It's time for me to go back to node from bun 😅

  • @arpanmukherjee4625
    @arpanmukherjee4625 16 ชั่วโมงที่ผ่านมา

    Let’s remove ts-node.

  • @kinsondigital
    @kinsondigital 12 ชั่วโมงที่ผ่านมา +1

    Deno Deno Deno. I always using Deno much as possible.

  • @itsMapleLeaf
    @itsMapleLeaf 16 ชั่วโมงที่ผ่านมา +1

    y'all are like "rip tsx" which is funny because tsx is still needed for .tsx files lol

  • @shapelessed
    @shapelessed 21 ชั่วโมงที่ผ่านมา

    JESUS christ finally no need for ts-node and it's utterly terrible bugs...
    I swear this thing must be deciding whether or not it wants to work based on quantum mechanics cause I couldn't find a single reason it randomly switched opinions.
    You start your day, test something out, it works just fine, you take a break, get some coffe, come back half an hour later and suddenly it doesn't recognise the .ts extension...

  • @edgeeffect
    @edgeeffect 21 ชั่วโมงที่ผ่านมา +2

    Congratulations Node... you've now (almost) got something that gives you a sub-standard alternative to Deno's default behaviour... that's ... erm... great... I suppose?????? ;)

    • @mattpocockuk
      @mattpocockuk  20 ชั่วโมงที่ผ่านมา +1

      I'd say it's different from Deno's implementation - wouldn't say it's worse.

  • @prashlovessamosa
    @prashlovessamosa 15 ชั่วโมงที่ผ่านมา

    thanks sir

  • @JankkPL
    @JankkPL 21 ชั่วโมงที่ผ่านมา +1

    That's great and all but just removing the experimental flag is not that revolutionary, because the functionality stays the same. I feel like the real next step is to add a flag that turns on typechecking (maybe without the additional linting that tsc does?)

    • @mattpocockuk
      @mattpocockuk  21 ชั่วโมงที่ผ่านมา +7

      What's the benefit of having Node.js run typechecking? Just run tsc && node index.ts

    • @rafael.aloizio1769
      @rafael.aloizio1769 21 ชั่วโมงที่ผ่านมา +1

      ​@mattpocockuk what's the benefit of not having it? The other platforms do this by default, if so, is still needed to install typescript isn't it?

    • @JankkPL
      @JankkPL 21 ชั่วโมงที่ผ่านมา

      ​@@mattpocockuk assuming typechecking should only be run once, that works, although using 2 commands just to run typescript code can be a bit confusing for beginners.
      The main problem for me is when I try setting up a nice dev environment with node's --watch flag and typechecking.

    • @mattpocockuk
      @mattpocockuk  20 ชั่วโมงที่ผ่านมา +1

      ​@@JankkPL You only need node index.ts now to run TypeScript code.
      Just run tsc --watch in one terminal and node --watch in another. Or run them in parallel with concurrently/pnpm.

    • @mattpocockuk
      @mattpocockuk  20 ชั่วโมงที่ผ่านมา +1

      ​@@rafael.aloizio1769 The benefit is so you can run your code WITHOUT seeing the type errors, which is a critically important way to get a fast feedback loop running.

  • @sp3ctum
    @sp3ctum 17 ชั่วโมงที่ผ่านมา

    Rust mentioned!

  • @JoshIbbotson
    @JoshIbbotson 3 ชั่วโมงที่ผ่านมา

    Thank christ

  • @Gontran_
    @Gontran_ 4 ชั่วโมงที่ผ่านมา

    Wow 1!

  • @fullstackspiderman
    @fullstackspiderman 17 ชั่วโมงที่ผ่านมา

    Coming from Bun, it’s no excitement as we already have it in Bun.. 😂

    • @malvoliosf
      @malvoliosf 16 ชั่วโมงที่ผ่านมา +1

      I was excited about Bun for two reasons: (1) Bun is awesome, and (2) it forces Node to up their game.

  • @rafadydkiemmacha7543
    @rafadydkiemmacha7543 12 ชั่วโมงที่ผ่านมา

    You always exaggerate the news. It's nice, but it's not even a big deal.

  • @RobertFerentz
    @RobertFerentz 7 ชั่วโมงที่ผ่านมา

    Your collection of Discworld books is too small. Shame.

    • @mattpocockuk
      @mattpocockuk  4 ชั่วโมงที่ผ่านมา

      It is!

  • @coffeefps
    @coffeefps 22 ชั่วโมงที่ผ่านมา +1

    FIRST!

    • @shapelessed
      @shapelessed 21 ชั่วโมงที่ผ่านมา

      But at what cost?

  • @user-abc855
    @user-abc855 21 ชั่วโมงที่ผ่านมา +1

    Excuse me, but I do not understand why everyone so excited about this?
    Is it so hard to run 'npx tsx index.ts' or 'swc index.ts' after 'npm install @swc/cli'?
    Why anybody does not curious which exact version of TS is used on built in node's implementation? On this depends TS behavior.
    A lot of people speak about Deno and Bun TS support, but for some reason they don't speak about the thing, that you cannot independently manage TS version from your JS runtime version.
    For me native TS support is just cargo cult of people that find complicated running few more cli commands that give more flexibility and more expected TS behavior

    • @mattpocockuk
      @mattpocockuk  21 ชั่วโมงที่ผ่านมา +3

      > that you cannot independently manage TS version from your JS runtime version
      Node just strips the types, so it's somewhat decoupled from the TS version.
      > is it so hard to run 'npx tsx index.ts'
      It's annoying that tsx, ts-node, swc and the million other alternatives all have slightly different module resolution strategies and work in slightly different ways. They are hard to hook up to the debugger. They are just a compat layer that shouldn't exist.

    • @maelstrom57
      @maelstrom57 20 ชั่วโมงที่ผ่านมา +5

      The fewer extra tools needed, the better. It's really that simple.

    • @mattpocockuk
      @mattpocockuk  20 ชั่วโมงที่ผ่านมา +1

      @@maelstrom57 It has all sorts of good compounding effects in the ecosystem.

    • @user-abc855
      @user-abc855 19 ชั่วโมงที่ผ่านมา

      @@mattpocockuk I don't know the situation on frontend, but on backend I never had any problems with TS setup, for example in NestJS it is made out of the box, so no manual setup needed, if I just need to launch something simple, I just use 'npx tsx'

    • @statuschannel8572
      @statuschannel8572 17 ชั่วโมงที่ผ่านมา

      @@user-abc855 Nest is a framework and abstract away all these steps. try to setup an express app with typescript