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
// package-3 has a peer/devDependency on package-2
210
+
"package-3",
211
+
"package-4",
212
+
"package-2",
213
+
// package-5 is private
214
+
]);
215
+
216
+
constlogMessages=loggingOutput("warn");
217
+
expect(logMessages).toMatchInlineSnapshot(`
218
+
Array [
219
+
"--graph-type=dependencies is deprecated and will be removed in lerna v6. If you have a use-case you feel requires it please open an issue to discuss: https://github.com/lerna/lerna/issues/new/choose",
220
+
]
221
+
`);
222
+
});
223
+
187
224
it("throws an error when value is _not_ 'all' or 'dependencies'",async()=>{
Copy file name to clipboardExpand all lines: commands/publish/index.js
+40-9Lines changed: 40 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -58,6 +58,9 @@ class PublishCommand extends Command {
58
58
configureProperties(){
59
59
super.configureProperties();
60
60
61
+
// For publish we want to enable topological sorting by default, but allow users to override with --no-sort
62
+
this.toposort=this.options.sort!==false;
63
+
61
64
// Defaults are necessary here because yargs defaults
62
65
// override durable options provided by a config file
63
66
const{
@@ -102,6 +105,13 @@ class PublishCommand extends Command {
102
105
);
103
106
}
104
107
108
+
if(this.options.graphType==="dependencies"){
109
+
this.logger.warn(
110
+
"graph-type",
111
+
"--graph-type=dependencies is deprecated and will be removed in lerna v6. If you have a use-case you feel requires it please open an issue to discuss: https://github.com/lerna/lerna/issues/new/choose"
112
+
);
113
+
}
114
+
105
115
if(this.options.skipNpm){
106
116
// TODO: remove in next major release
107
117
this.logger.warn("deprecated","Instead of --skip-npm, call `lerna version` directly");
@@ -626,15 +636,21 @@ class PublishCommand extends Command {
Copy file name to clipboardExpand all lines: core/lerna/schemas/lerna-schema.json
+4-2Lines changed: 4 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1600,8 +1600,10 @@
1600
1600
},
1601
1601
"graphType": {
1602
1602
"type": "string",
1603
-
"enum": ["all", "depencencies"],
1604
-
"description": "For `lerna publish`, the type of dependency to use when determining package hierarchy."
1603
+
"enum": ["all", "dependencies"],
1604
+
"description": "DEPRECATED: For `lerna publish`, if you want to ignore devDependencies when considering the package graph you can set this property equal to 'dependencies'. This will be removed in v6 of lerna.",
0 commit comments