Closed
Description
Incorrectly Formatted Packages in --moduleResolution bundler/node16
- Test to see what breaks if
node
is redirected tobundler
. - Previously
types
would have been resolved.- Now the
exports.import
condition is resolved as per Node 16 rules.
- Now the
- 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 inlib
. - 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.
- But then people can't clone TypeScript and just run from
- Not great to snapshot 40MB of JS on every LKG!
- Git doesn't store that as a diff!
- Cloning takes a while these days
- Though there are ways to make this easier: https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/
- So switch to nightlies on npm instead of building from
lib
?- Have to always
npm ci
ongit 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.
- Have to always
- Edge case - ESLint looks at the current package
typescript/
instead of thetypescript/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
onrelease-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.
- Switch to using npm and