Comments (2)
This requires checking if the incoming URL starts with one of the import paths, or is at least equal by using semver rules on the version number, notice the difference between 3.0.0 and ^3.0.0 above. It then has to check that the trailing part of the URL matches the trailing part of one of the importPath URLs. And then it has to replace the overlapping part with the value of the map. This makes the operation quite a bit more complicated but is feasible to do.
I guess some semver-equivalence mapping is required here indeed.
First case is having "lsd:module": true in your config. How is the server supposed to know how to map the URL to a file path in the tarball?
I would suggest just calling this function: https://github.com/LinkedSoftwareDependencies/Components.js/blob/master/lib/loading/ModuleStateBuilder.ts#L175-L220
The other case is when there are only lsd:contexts entries. What should be done in that case? Or should only the exact URLs there be supported and mapped to their values, while other paths should be ignored?
Then there should be no mapping I guess? Are there cases where only lsd:contexts is present? Because I'm not even sure CJS supports that if no importPaths are present.
from npm-extraction-server.
Are there cases where only lsd:contexts is present? Because I'm not even sure CJS supports that if no importPaths are present.
No idea. The comment above that block implies it's there for backwards compatibility.
from npm-extraction-server.
Related Issues (5)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from npm-extraction-server.