As NodeJS LTS Now Reached the state where ESM Works and we got a 100% Way to shim it for older NodeJS Versions it
is time to Refactor this to ESM Only which would directly run Inside Nodejs & WebBrowsers
Issus to Tackle in this Major
Old Issue that got noisy and out of topic discussions
TODO
5th iteration conclusions
Findings:
The Result of new Parser() should get wrapped when extending the parser it is not so easy to follow the inharitance of objects with
the self written Mixin Class system that offers a later install method which will patch a eventual existing _bootstrap method that later
gets eventual called when using Parser.parse or Parser.parseFragment.
All extensions should be written as proxy the treeAdapter should be named NodeAdapter is it is not forming the tree out of browser view
it is a Node api so we should express it like that to make more clear for other developers that there is the place to manipulate Node
Creation and handling. Proxy support starts with Nodejs 6.4 shim https://github.com/GoogleChrome/proxy-polyfill/blob/master/src/proxy.js
8ef28cd
Lexer implementation started. 0.6.1 … master v6.0.1 Ivan Nikulin committed on 15 Mar 2013
Why ESM Only?
my final Way to go will be a ESM only version this can then get transpiled via babel to cjs or with anything else.
Then the ESM version gets released as new Major version and can get used with current NodeJS via import() inside CJS
the README will show instructions to create a CJS version if needed. And it will point out that this new Major Version is Only ESM and to use it you will need NodeJS Version > 9.7.x or the npm esm package.
What do you think about it?
Browser ESM Support
NodeJS ESM Support
- NodeJS 13.2+ .use import or import()
- NodeJS 9.7+ use --experimental-modules then use import or import()
- NodeJS 6+ use "npm install esm" then use import or import()
- With TypeScript or with node-ts you can use it inside .ts files.
- Most other Environments like Current Browsers and Deno or GraalJS will also work out of the box
NodeJS & BrowserProxy Support
As NodeJS LTS Now Reached the state where ESM Works and we got a 100% Way to shim it for older NodeJS Versions it
is time to Refactor this to ESM Only which would directly run Inside Nodejs & WebBrowsers
Issus to Tackle in this Major
Old Issue that got noisy and out of topic discussions
TODO
5th iteration conclusions
Findings:
The Result of new Parser() should get wrapped when extending the parser it is not so easy to follow the inharitance of objects with
the self written Mixin Class system that offers a later install method which will patch a eventual existing _bootstrap method that later
gets eventual called when using Parser.parse or Parser.parseFragment.
All extensions should be written as proxy the treeAdapter should be named NodeAdapter is it is not forming the tree out of browser view
it is a Node api so we should express it like that to make more clear for other developers that there is the place to manipulate Node
Creation and handling. Proxy support starts with Nodejs 6.4 shim https://github.com/GoogleChrome/proxy-polyfill/blob/master/src/proxy.js
on the same sharedState Object that got passed to the hireOrderFunction
I Think .js JSDOC import is better as it supports to even bundle the TypeDefintions)
8ef28cd
Lexer implementation started. 0.6.1 … master v6.0.1 Ivan Nikulin committed on 15 Mar 2013
Why ESM Only?
my final Way to go will be a ESM only version this can then get transpiled via babel to cjs or with anything else.
Then the ESM version gets released as new Major version and can get used with current NodeJS via import() inside CJS
the README will show instructions to create a CJS version if needed. And it will point out that this new Major Version is Only ESM and to use it you will need NodeJS Version > 9.7.x or the npm esm package.
What do you think about it?
Browser ESM Support
NodeJS ESM Support
NodeJS & BrowserProxy Support