-
Notifications
You must be signed in to change notification settings - Fork 229
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle missing pubspec.lock in dependency_services list (#3439)
- Loading branch information
Showing
3 changed files
with
245 additions
and
4 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
205 changes: 205 additions & 0 deletions
205
test/testdata/goldens/dependency_services/dependency_services_test/No pubspec.lock.txt
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 |
---|---|---|
@@ -0,0 +1,205 @@ | ||
# GENERATED BY: test/dependency_services/dependency_services_test.dart | ||
|
||
$ cat pubspec.yaml | ||
{"name":"app","dependencies":{"foo":"^1.0.0","bar":{"git":{"url":"../bar.git"}}},"environment":{"sdk":">=0.1.2 <1.0.0"}} | ||
$ cat pubspec.lock | ||
No such file pubspec.lock. | ||
-------------------------------- END OF OUTPUT --------------------------------- | ||
|
||
## Section list | ||
$ dependency_services list | ||
{ | ||
"dependencies": [ | ||
{ | ||
"name": "bar", | ||
"version": "92cdd4ac724a6da0db2a69ac149820aa220e8518", | ||
"kind": "direct", | ||
"constraint": "any", | ||
"source": { | ||
"type": "git", | ||
"description": { | ||
"url": "../bar.git", | ||
"ref": "HEAD", | ||
"resolved-ref": "92cdd4ac724a6da0db2a69ac149820aa220e8518", | ||
"path": "." | ||
} | ||
} | ||
}, | ||
{ | ||
"name": "foo", | ||
"version": "1.2.3", | ||
"kind": "direct", | ||
"constraint": "^1.0.0", | ||
"source": { | ||
"type": "hosted", | ||
"description": { | ||
"name": "foo", | ||
"url": "http://localhost:$PORT" | ||
} | ||
} | ||
}, | ||
{ | ||
"name": "transitive", | ||
"version": "1.0.0", | ||
"kind": "transitive", | ||
"constraint": "null", | ||
"source": { | ||
"type": "hosted", | ||
"description": { | ||
"name": "transitive", | ||
"url": "http://localhost:$PORT" | ||
} | ||
} | ||
} | ||
] | ||
} | ||
|
||
-------------------------------- END OF OUTPUT --------------------------------- | ||
|
||
## Section report | ||
$ dependency_services report | ||
{ | ||
"dependencies": [ | ||
{ | ||
"name": "bar", | ||
"version": "92cdd4ac724a6da0db2a69ac149820aa220e8518", | ||
"kind": "direct", | ||
"source": { | ||
"type": "git", | ||
"description": { | ||
"url": "../bar.git", | ||
"ref": "HEAD", | ||
"resolved-ref": "92cdd4ac724a6da0db2a69ac149820aa220e8518", | ||
"path": "." | ||
} | ||
}, | ||
"latest": "92cdd4ac724a6da0db2a69ac149820aa220e8518", | ||
"constraint": "any", | ||
"compatible": [], | ||
"singleBreaking": [], | ||
"multiBreaking": [ | ||
{ | ||
"name": "foo", | ||
"version": "2.2.3", | ||
"kind": "direct", | ||
"source": { | ||
"type": "hosted", | ||
"description": { | ||
"name": "foo", | ||
"url": "http://localhost:$PORT" | ||
} | ||
}, | ||
"constraintBumped": "^2.2.3", | ||
"constraintWidened": ">=1.0.0 <3.0.0", | ||
"constraintBumpedIfNeeded": "^2.2.3", | ||
"previousVersion": "1.2.3", | ||
"previousConstraint": "^1.0.0", | ||
"previousSource": { | ||
"type": "hosted", | ||
"description": { | ||
"name": "foo", | ||
"url": "http://localhost:$PORT" | ||
} | ||
} | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "foo", | ||
"version": "1.2.3", | ||
"kind": "direct", | ||
"source": { | ||
"type": "hosted", | ||
"description": { | ||
"name": "foo", | ||
"url": "http://localhost:$PORT" | ||
} | ||
}, | ||
"latest": "2.2.3", | ||
"constraint": "^1.0.0", | ||
"compatible": [], | ||
"singleBreaking": [ | ||
{ | ||
"name": "foo", | ||
"version": "2.2.3", | ||
"kind": "direct", | ||
"source": { | ||
"type": "hosted", | ||
"description": { | ||
"name": "foo", | ||
"url": "http://localhost:$PORT" | ||
} | ||
}, | ||
"constraintBumped": "^2.2.3", | ||
"constraintWidened": ">=1.0.0 <3.0.0", | ||
"constraintBumpedIfNeeded": "^2.2.3", | ||
"previousVersion": "1.2.3", | ||
"previousConstraint": "^1.0.0", | ||
"previousSource": { | ||
"type": "hosted", | ||
"description": { | ||
"name": "foo", | ||
"url": "http://localhost:$PORT" | ||
} | ||
} | ||
} | ||
], | ||
"multiBreaking": [ | ||
{ | ||
"name": "foo", | ||
"version": "2.2.3", | ||
"kind": "direct", | ||
"source": { | ||
"type": "hosted", | ||
"description": { | ||
"name": "foo", | ||
"url": "http://localhost:$PORT" | ||
} | ||
}, | ||
"constraintBumped": "^2.2.3", | ||
"constraintWidened": ">=1.0.0 <3.0.0", | ||
"constraintBumpedIfNeeded": "^2.2.3", | ||
"previousVersion": "1.2.3", | ||
"previousConstraint": "^1.0.0", | ||
"previousSource": { | ||
"type": "hosted", | ||
"description": { | ||
"name": "foo", | ||
"url": "http://localhost:$PORT" | ||
} | ||
} | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "transitive", | ||
"version": "1.0.0", | ||
"kind": "transitive", | ||
"source": { | ||
"type": "hosted", | ||
"description": { | ||
"name": "transitive", | ||
"url": "http://localhost:$PORT" | ||
} | ||
}, | ||
"latest": "1.0.0", | ||
"constraint": null, | ||
"compatible": [], | ||
"singleBreaking": [], | ||
"multiBreaking": [] | ||
} | ||
] | ||
} | ||
|
||
-------------------------------- END OF OUTPUT --------------------------------- | ||
|
||
## Section apply | ||
$ echo '{"dependencyChanges":[{"name":"foo","version":"2.2.3"},{"name":"transitive","version":null}]}' | dependency_services apply | ||
{"dependencies":[]} | ||
|
||
-------------------------------- END OF OUTPUT --------------------------------- | ||
|
||
$ cat pubspec.yaml | ||
{"name":"app","dependencies":{"foo":^2.2.3,"bar":{"git":{"url":"../bar.git"}}},"environment":{"sdk":">=0.1.2 <1.0.0"}} | ||
$ cat pubspec.lock | ||
No such file pubspec.lock. |