Closed villadora closed 10 years ago
do version fix during build, make a package as closure of all the information that it contains.
additional config value may added as shrinkwrap:
shrinkwrap
define('a@1.0.0', ['b@~1.0.0'], factory, { shrinkwrap: { 'a@1.0.0': [ '1.0.0', { 'b@~1.0.0': [ '1.0.1', { 'c@^1.2.0': ['1.3.0'] }] }] } });
which make shrinkwrap info only be contains in the package itself
As it's no longer json configs, shared objects can be represented as:
var a = ['1.0.0']; { "b@1.0.0": [ "1.0.0": { "a@~1.0.0": a, "c@~0.1.0": [" 0.1.0", { "a@^1.0.0": a }] }] }
and cyclic dependencies could be represented as:
var a = ['1.0.0', {}]; var b = ['1.0.0', { 'a@~1.0.0': a }]; a[1]['b@~1.0.0'] = b;
But this kind of code might be hard for auto generator, candidates can be:
ref
~
For normal modules, the resolved map should flat, as a global object:
{ "a": { "~1.0.0": "1.0.1", "^1.0.0": "1.2.0" } }
So, close for now
do version fix during build, make a package as closure of all the information that it contains.
additional config value may added as
shrinkwrap
:which make shrinkwrap info only be contains in the package itself
As it's no longer json configs, shared objects can be represented as:
and cyclic dependencies could be represented as:
But this kind of code might be hard for auto generator, candidates can be:
ref
~
and last element of array to indicates the scope, may looks like circular-json but with scope additionsFor normal modules, the resolved map should flat, as a global object:
Pros
Cons