-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: don't include
from
arrays in tree
as the backend doesn't need these anymore, and it reduces the result json size by factor of ~3x
- Loading branch information
1 parent
d55bc84
commit 3023d60
Showing
2 changed files
with
0 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,35 +37,20 @@ test('inspect', function (t) { | |
t.ok(pkg, 'package'); | ||
t.equal(pkg.name, 'pip-app', 'name'); | ||
t.equal(pkg.version, '0.0.0', 'version'); | ||
// t.equal(pkg.full, '[email protected]', 'full'); // do we need this? | ||
t.same(pkg.from, ['[email protected]'], 'from self'); | ||
t.end(); | ||
}); | ||
|
||
t.test('package dependencies', function (t) { | ||
t.same(pkg.dependencies.django, { | ||
name: 'django', | ||
version: '1.6.1', | ||
from: [ | ||
'[email protected]', | ||
'[email protected]', | ||
], | ||
}, 'django looks ok'); | ||
|
||
t.match(pkg.dependencies.jinja2, { | ||
name: 'jinja2', | ||
version: '2.7.2', | ||
from: [ | ||
'[email protected]', | ||
'[email protected]', | ||
], | ||
dependencies: { | ||
markupsafe: { | ||
from: [ | ||
'[email protected]', | ||
'[email protected]', | ||
/markupsafe@.+$/, | ||
], | ||
name: 'markupsafe', | ||
version: /.+$/, | ||
}, | ||
|
@@ -75,39 +60,21 @@ test('inspect', function (t) { | |
t.match(pkg.dependencies['python-etcd'], { | ||
name: 'python-etcd', | ||
version: '0.4.5', | ||
from: [ | ||
'[email protected]', | ||
'[email protected]', | ||
], | ||
dependencies: { | ||
dnspython: { | ||
name: 'dnspython', | ||
version: /.+$/, | ||
from: [ | ||
'[email protected]', | ||
'[email protected]', | ||
/dnspython@.+$/, | ||
], | ||
}, | ||
urllib3: { | ||
name: 'urllib3', | ||
version: /.+$/, | ||
from: [ | ||
'[email protected]', | ||
'[email protected]', | ||
/urllib3@.+$/, | ||
], | ||
}, | ||
}, | ||
}, 'python-etcd is ok'); | ||
|
||
t.match(pkg.dependencies['django-select2'], { | ||
name: 'django-select2', | ||
version: '6.0.1', | ||
from: [ | ||
'[email protected]', | ||
'[email protected]', | ||
], | ||
dependencies: { | ||
'django-appconf': { | ||
name: 'django-appconf', | ||
|
@@ -118,10 +85,6 @@ test('inspect', function (t) { | |
t.match(pkg.dependencies['irc'], { | ||
name: 'irc', | ||
version: '16.2', | ||
from: [ | ||
"[email protected]", | ||
"[email protected]" | ||
], | ||
dependencies: { | ||
'more-itertools': {}, | ||
'jaraco.functools': {}, | ||
|
@@ -141,10 +104,6 @@ test('inspect', function (t) { | |
t.match(pkg.dependencies['testtools'], { | ||
name: 'testtools', | ||
version: '2.3.0', | ||
from: [ | ||
"[email protected]", | ||
"[email protected]" | ||
], | ||
dependencies: { | ||
'pbr': {}, | ||
'extras': {}, | ||
|
@@ -200,66 +159,39 @@ test('transitive dep not installed, but with allowMissing option', function (t) | |
t.equal(pkg.name, 'pip-app', 'name'); | ||
t.equal(pkg.version, '0.0.0', 'version'); | ||
// t.equal(pkg.full, '[email protected]', 'full'); // do we need this? | ||
t.same(pkg.from, ['[email protected]'], 'from self'); | ||
t.end(); | ||
}); | ||
|
||
t.test('package dependencies', function (t) { | ||
t.same(pkg.dependencies.django, { | ||
name: 'django', | ||
version: '1.6.1', | ||
from: [ | ||
'[email protected]', | ||
'[email protected]', | ||
], | ||
}, 'django looks ok'); | ||
|
||
t.match(pkg.dependencies.jinja2, { | ||
name: 'jinja2', | ||
version: '2.7.2', | ||
from: [ | ||
'[email protected]', | ||
'[email protected]', | ||
], | ||
dependencies: {}, | ||
}, 'jinja2 looks ok'); | ||
|
||
t.match(pkg.dependencies['python-etcd'], { | ||
name: 'python-etcd', | ||
version: '0.4.5', | ||
from: [ | ||
'[email protected]', | ||
'[email protected]', | ||
], | ||
dependencies: { | ||
dnspython: { | ||
name: 'dnspython', | ||
version: /.+$/, | ||
from: [ | ||
'[email protected]', | ||
'[email protected]', | ||
/dnspython@.+$/, | ||
], | ||
}, | ||
urllib3: { | ||
name: 'urllib3', | ||
version: /.+$/, | ||
from: [ | ||
'[email protected]', | ||
'[email protected]', | ||
/urllib3@.+$/, | ||
], | ||
}, | ||
}, | ||
}, 'python-etcd is ok'); | ||
|
||
t.match(pkg.dependencies['django-select2'], { | ||
name: 'django-select2', | ||
version: '6.0.1', | ||
from: [ | ||
'[email protected]', | ||
'[email protected]', | ||
], | ||
dependencies: { | ||
'django-appconf': { | ||
name: 'django-appconf', | ||
|
@@ -305,7 +237,6 @@ test('deps not installed, but with allowMissing option', function (t) { | |
t.ok(pkg, 'package'); | ||
t.equal(pkg.name, 'pip-app-deps-not-installed', 'name'); | ||
t.equal(pkg.version, '0.0.0', 'version'); | ||
t.same(pkg.from, ['[email protected]'], 'from self'); | ||
t.end(); | ||
}); | ||
}); | ||
|
@@ -336,18 +267,10 @@ test('package name differs from requirement', function (t) { | |
.then(function (result) { | ||
var pkg = result.package; | ||
t.same(pkg.dependencies['dj-database-url'], { | ||
from: [ | ||
'[email protected]', | ||
'[email protected]', | ||
], | ||
name: 'dj-database-url', | ||
version: '0.4.2', | ||
}, 'dj-database-url looks ok'); | ||
t.same(pkg.dependencies['posix-ipc'], { | ||
from: [ | ||
'[email protected]', | ||
'[email protected]', | ||
], | ||
name: 'posix-ipc', | ||
version: '1.0.0', | ||
}, 'posix-ipc looks ok'); | ||
|
@@ -368,10 +291,6 @@ test('package depends on platform', function (t) { | |
var pkg = result.package; | ||
t.notOk(pkg.dependencies.pypiwin32, 'win32 dep ignored'); | ||
t.same(pkg.dependencies['posix-ipc'], { | ||
from: [ | ||
'[email protected]', | ||
'[email protected]', | ||
], | ||
name: 'posix-ipc', | ||
version: '1.0.0', | ||
}, 'posix-ipc looks ok'); | ||
|
@@ -393,10 +312,6 @@ test('editables ignored', function (t) { | |
t.notOk(pkg.dependencies['simple'], 'editable dep ignored'); | ||
t.notOk(pkg.dependencies['sample'], 'editable subdir dep ignored'); | ||
t.same(pkg.dependencies['posix-ipc'], { | ||
from: [ | ||
'[email protected]', | ||
'[email protected]', | ||
], | ||
name: 'posix-ipc', | ||
version: '1.0.0', | ||
}, 'posix-ipc looks ok'); | ||
|
@@ -429,27 +344,18 @@ test('deps withs options', function (t) { | |
t.ok(pkg, 'package'); | ||
t.equal(pkg.name, 'pip-app-with-options', 'name'); | ||
t.equal(pkg.version, '0.0.0', 'version'); | ||
t.same(pkg.from, ['[email protected]'], 'from self'); | ||
t.end(); | ||
}); | ||
|
||
t.test('package dependencies', function (t) { | ||
t.match(pkg.dependencies.markupsafe, { | ||
name: 'markupsafe', | ||
version: '1.0', | ||
from: [ | ||
'[email protected]', | ||
'[email protected]', | ||
], | ||
}, 'MarkupSafe looks ok'); | ||
|
||
t.match(pkg.dependencies.dnspython, { | ||
name: 'dnspython', | ||
version: '1.13.0', | ||
from: [ | ||
'[email protected]', | ||
'[email protected]', | ||
], | ||
}, 'dnspython looks ok'); | ||
|
||
t.end(); | ||
|