You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This solves the so called resolveMethod problems cross runtimes and enables so easier error free references.
which enables dependent projects to refactor the build and we can all share again the same codebaase
as we agree on a build able module standard that we all can share. the rest is only a sideEffect
This builds on the following ECMAScript Module Design Principles
Build valid ECMAScript Spec Compliant Modules
If you use bar specifiers or none js code assets you need to supply loader and resolveId hooks.
Auditability and readability of your code is the highest principle to make it easy use able by others. Runtime Optimization gets done via Jit on execution you as the developer do not need to optimize for the runtime.
a runtime gets used and is designed for the code optimization it self and can do it better then you almost always. And at last always repeatable and so scaleable for all.
Creating code-oss (code Open Source Studio)
a p2p code environment that can connect to other environments including private and public shared build grids for your software stacks and deployments. Allows live development with the whole web in real time.
This issue tracks the transformation of the code-oss build process it self into the first existing full implementation of web-modules as also will be the first consumer of it to build it self. So this is like with the creation of coding languages we take the existing one till our own can build it self.
web-modules has evolved the infrastructure of the Web,
with many things we've learned from successful systems, like Git, BitTorrent, Kademlia, Bitcoin, and many, many more. This is the sort of thing that would have come out of ARPA/DARPA, IETF, or Bell Labs in another age. Web 4.0 state 2 after genesis boot so V_ETH2 on top of WebRTC for interop with the existing legacy web.
addressed by content and references so called specifiers. It enables the creation of completely distributed applications, and in doing so aims to make the web faster, safer, and more open.
patch needs to get handled via web-modules including exposing the settings
as patch able modules. Makes sure we do not brake the others. and also reduce maintenance so they can stop forking.
webmodule later will get splitted up to implement code-oss-idl a interface definition language a subset of Typescript to allow easy static types for any language including JS using directly the compiler feedback of the engine and the parser of the engine. drops a lot of code from the typescript codebase overall.
first iteration:
Will Incremental upgrade the build will let it as is produce the AMD loader will merge the AMD loader in under build/ as it is build related. will incremental switch over parts project size is to big for a batch upgrade. I got good progress with incremental commits.
This Proposes to algin the engineering labeled tasks that are related to the ESM Build creation and the vscode-loader (AMD) to port the AMD Resolution algos in a compatible way to the NodeJS --import and --require flags respectivly so that it would enable shared loader resolution
Execution Plan
A Resolution map needs to exist it can be generated via typescript. a PR is WiP to show the concept.
esm.js it is importent to keep that as esm file for compat and import.meta.url usage as smallest patch able modifier.
// Slash at the end is importent for relativ bases to start without// explicitly setting ./ on each dependencie so keep current styleexportconstbaseUrl=newURL(import.meta.url).path+'code-oss-dev/src'+'/'// vscode internal specifiers resolution exportconstvscodeResolve={'specifier': 'relativeToAbsoulteBaseUrl',// Needs to be relativ logic less if that is to much we can shorten that with import maps compatible string replace // patterns it is the same concept that nodeNext resolve uses in typescript implemented via package.json exports.// there can be only 1 x * char in the string it gets replaced 1:1 with the right hand side of the object 'vs/*': baseUrl+'vs/*.js'// requesting vs/my-module will be resolved to the most specific // match of the left hand see vscodeVirtualResolved}// isRelative ./ or bare xx or absolute /// turn all into absolute from vscodeResolve via use of baseUrl turn relative into absolute via baseUrl turn bare to absolute via vscodeResolve use new URL(any, baseUrl) where any should already be none relative via new URL(any, import.meta.url);// (modSpecifier) => moduleSpecifier// const getAll parts of vscodeResolve before the * turn that into absolute // We need to implement nodeNextResolve as that is not implemented in typescript it self the current node next is fake and does not even support import conditions. // this is only to show the in memory viewconstvscodeVirtualResolved={'specifier': 'relativeToAbsoulteBaseUrl',// 'vs/*': baseUrl + 'vs/*.js','vs/my-module': baseUrl+'vs/my-module.js',}// this creates shared memory references on each import with a other urlexportconstresolvedId=baseUrl+(`...code here resolves import.meta.url params to return a result on import`)// above gets static typed internal with valueof keyof Type Const the map will be even accessible in the IDE.
The above is pseudo code to show more readable the importent parts later tagged template strings are favored.
Module usage example same sandbox
all context share the same module reference to the resolution result in memory worker service worker all tabs all that belongs to the same URL
Do stop relativ path transformation in the source like you do in your current ESM Loader transformation.
Implement above bespoken resolve module that is reuseable cross ecosystem and context.
Use Rollup as Loader API and do not create a migration.js create build/plugin-migration.js
We need to build the src only 1x as ESM this will produce namedExports this type declarations will get 1:1 reused shared with the CJS build and ESM while CJS makes Only sense to run the existing tests till all are upgraded
Current
Why? in this issue
This solves the so called resolveMethod problems cross runtimes and enables so easier error free references.
which enables dependent projects to refactor the build and we can all share again the same codebaase
as we agree on a build able module standard that we all can share. the rest is only a sideEffect
This builds on the following ECMAScript Module Design Principles
Auditability and readability of your code is the highest principle to make it easy use able by others. Runtime Optimization gets done via Jit on execution you as the developer do not need to optimize for the runtime.
a runtime gets used and is designed for the code optimization it self and can do it better then you almost always. And at last always repeatable and so scaleable for all.
Creating code-oss (code Open Source Studio)
a p2p code environment that can connect to other environments including private and public shared build grids for your software stacks and deployments. Allows live development with the whole web in real time.
This issue tracks the transformation of the code-oss build process it self into the first existing full implementation of web-modules as also will be the first consumer of it to build it self. So this is like with the creation of coding languages we take the existing one till our own can build it self.
web-modules has evolved the infrastructure of the Web,
with many things we've learned from successful systems, like Git, BitTorrent, Kademlia, Bitcoin, and many, many more. This is the sort of thing that would have come out of ARPA/DARPA, IETF, or Bell Labs in another age. Web 4.0 state 2 after genesis boot so V_ETH2 on top of WebRTC for interop with the existing legacy web.
addressed by content and references so called specifiers. It enables the creation of completely distributed applications, and in doing so aims to make the web faster, safer, and more open.
see: a early example https://beakerbrowser.com/
see: Web Modules - The Standard for the Web 4.0 https://github.com/lemanschik/web-modules/blob/main/README.md
as patch able modules. Makes sure we do not brake the others. and also reduce maintenance so they can stop forking.
Ecosystem dependent
Iteration Tracking
first iteration:
Will Incremental upgrade the build will let it as is produce the AMD loader will merge the AMD loader in under build/ as it is build related. will incremental switch over parts project size is to big for a batch upgrade. I got good progress with incremental commits.
secund iteration
backlog:
some nice additional demos as context
History
i would love to chain this with:
This Proposes to algin the engineering labeled tasks that are related to the ESM Build creation and the vscode-loader (AMD) to port the AMD Resolution algos in a compatible way to the NodeJS --import and --require flags respectivly so that it would enable shared loader resolution
Execution Plan
A Resolution map needs to exist it can be generated via typescript. a PR is WiP to show the concept.
esm.js it is importent to keep that as esm file for compat and import.meta.url usage as smallest patch able modifier.
The above is pseudo code to show more readable the importent parts later tagged template strings are favored.
Module usage example same sandbox
all context share the same module reference to the resolution result in memory worker service worker all tabs all that belongs to the same URL
the trick is that we use import meta parse the url parms in the resolver and this way get share able in memory references
this leads to directly in memory pointers that are cross isolate scope shareAble
the internal module cache will return the same module by url as the cache is url indexed it returns a reference to the same instance
only one instance in memory total shared can be referenced also in shadow Dom i use that to share CSS at scale
we can call the below pattern css modules it saves us from the hoax that css gets its own lang today.
also note at scale this references only one time the utf8 string red in memory! and one additional pointer reference 1 byte
Originally posted by @lemanschik in rollup/rollup#4729 (comment)
Action able items
tsc --module esnext --target esnext
Closes also
The text was updated successfully, but these errors were encountered: