Skip to content

Design Meeting Notes, 1/11/2023 #52199

Closed
Closed
@DanielRosenwasser

Description

@DanielRosenwasser

Incorrectly Formatted Packages in --moduleResolution bundler/node16

#51973

  • Test to see what breaks if node is redirected to bundler.
  • Previously types would have been resolved.
    • Now the exports.import condition is resolved as per Node 16 rules.
  • Now providing a better error message when we can detect this. You'd get the same error in node16.
    • The messages are still bad because we provide an absolute path to the file instead of a relative path.
    • Presumably we did this because the relative path isn't the correct thing when printing paths in the command line.
  • Aside: would be good to do the same tests for redirecting node16/nodenext

LKG versus node_modules

  • ESLint relies on node_modules, our builds rely on LKG builds in lib.
  • Would be nice if they could agree with each other!
  • Would also be nice to get rid of lib and use npm for boostrapping.
    • But then people can't clone TypeScript and just run from lib.
    • But we could just do that on release branches anyway.
  • Not great to snapshot 40MB of JS on every LKG!
  • So switch to nightlies on npm instead of building from lib?
    • Have to always npm ci on git pull
    • Technically true today, but it's rare that that even makes a difference. So you can get away with it.
    • But it would also be rare for us too. How often do we update LKG?
    • EXCEPT you still need to when you're bisecting!
      • Ugh - annoying. But might be worth it long term.
  • Edge case - ESLint looks at the current package typescript/ instead of the typescript/node_modules/typescript.
    • Follow up on if this is true.
  • So
    • Switch to using npm and node_modules
    • Delete lib
    • lib gets .gitignore'd
    • We force-add lib on release-X.Y branches and commit it.
    • lib gets published on npm.
    • When we need to take advantage of a new feature sooner than the same day, we can publish an insiders or early nightly instead.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Design NotesNotes from our design meetings

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions