Stake Holder list
- microsoft/typescript
- microsoft/vscode
- microsoft/playwright
- microsoft/vscode-loader
- ts-node
- mocha
- jest
- pnpm
- yarn
- rollup
- opentelemetry-js
- puppeteer
- nodejs/main
- electron/main
- nwjs/main
Ambient Loader Progress
The behavior of experimental loader hooks is not solved if all is solved we can implement rollup resolver finally as a plugin system to resolve hooks to enable:
TypeScript Closes
This closes all typescript resolve issues as typescript runs in nodejs and it respect nodejs flags you can finally apply loader Plugins to Typescript while typescript will work with frozzen intrinsics.
Closes vscode build
As this allows to write a single build instruction that works via loader resolveId hooks in every context
Closes Electron Issues
This closes the ESM Resolution Issues cross context which are the real problems that the users face when developing cross context cross module system boundary.
Closes Rollup Issues
Copyed from package maintainance discussion as aggreed on that this is future not current
This could be better adddressed when the Plugin Hook Loader API Exists and would get used without Package.json resolve or at last a none magical package.json resolve that is explicitly written in a reuseable loader.. As that exists in all other Engines also
Also interristing observation
- all none nodejs ECMAScript engines that depend on ECMAScript do not have any module reuse exchange problems.
- all none nodejs ECMAScript engine ship NodeJS or a NodeJS fork to load ECMAScript Modules written for NodeJS as a language.
- It is importent to keep in mind ECMAScript is a UTF8 Char based language it should run without nativ code anywhere.
- console.log('') should not require a 4gb stack of binary instructions. to build in a away that it is useable in many places out of the box.
Identified Fundamentals when incremental upgrading CJS to ESM
- noSideEffects everything with a sideEffect is not a Module its a Script.
- try to run the code isolated with "use strict" on top if it works it is a indicator that you can do a ESM Wrapper where you use import and correct the namedExports and then bundle that to get relativ clean ESM if the CJS code has no additional dependencies left over so is already like a bundle.
- make sure that there is no usag of this. outside Classes. functions that use this are highly danger later for code hardening and security analyzes Many people like the author of "clean code" a book that maybe all know here pointed that out. This security reasons are by the way a blocker for commercial adoption of ECMAScript in general.
- see: above mentioned educational fundamental problems. As rule of thumb you need to be execution Context aware.
- You should treat JS/ECMAScript like lua with dynamic JIT Build abilitys. in Fact a lua and ECMAScript have many common and the amount of ECMAScript engines is exploding so it gets more and more a lua replacement.
- You should be aware of the fact that there will be no original Python 4 and the reasons for that.
Short Conclusion
package.json when used for anything else then referencing a main + dependencies is a bad thing. For Example the new import maps features overlap with ECMAScript import as soon as used you need to recode them the reuse the code. This could be directly done as additional js file that only injects the dependencie specifiers.
also the whole scripts section can be replaced by simply putting the same scripts into the folder and run node script.js and not npm run-script build which calles node build.js the list is endless. Then on Top the Require CJS breaks everything as it simply supports to much diffrent resolutions and module types.
Stake Holder list
Ambient Loader Progress
--importflag nodejs/node#43942 and nodejs/node@77cb88bThe behavior of experimental loader hooks is not solved if all is solved we can implement rollup resolver finally as a plugin system to resolve hooks to enable:
as rollup is the best plugin loader hook system at present that we got with the largest ecosystem and most quirks handled also support cascading versioning with consistent hashing which is essential for module cache handling and dynamic updates
TypeScript Closes
This closes all typescript resolve issues as typescript runs in nodejs and it respect nodejs flags you can finally apply loader Plugins to Typescript while typescript will work with frozzen intrinsics.
Closes vscode build
As this allows to write a single build instruction that works via loader resolveId hooks in every context
Closes Electron Issues
This closes the ESM Resolution Issues cross context which are the real problems that the users face when developing cross context cross module system boundary.
Closes Rollup Issues
type: modulepackage rollup/rollup#4301Copyed from package maintainance discussion as aggreed on that this is future not current
This could be better adddressed when the Plugin Hook Loader API Exists and would get used without Package.json resolve or at last a none magical package.json resolve that is explicitly written in a reuseable loader.. As that exists in all other Engines also
Also interristing observation
Identified Fundamentals when incremental upgrading CJS to ESM
Short Conclusion
package.json when used for anything else then referencing a main + dependencies is a bad thing. For Example the new import maps features overlap with ECMAScript import as soon as used you need to recode them the reuse the code. This could be directly done as additional js file that only injects the dependencie specifiers.
also the whole scripts section can be replaced by simply putting the same scripts into the folder and run node script.js and not npm run-script build which calles node build.js the list is endless. Then on Top the Require CJS breaks everything as it simply supports to much diffrent resolutions and module types.