oclif 4.6.2 → 4.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commands/generate.js +4 -4
- package/oclif.manifest.json +5 -3
- package/package.json +3 -3
package/lib/commands/generate.js
CHANGED
|
@@ -89,8 +89,8 @@ const FLAGGABLE_PROMPTS = {
|
|
|
89
89
|
},
|
|
90
90
|
'package-manager': {
|
|
91
91
|
message: 'Select a package manager',
|
|
92
|
-
options: ['npm', 'yarn'],
|
|
93
|
-
validate: (d) => ['npm', 'yarn'].includes(d) || 'Invalid package manager',
|
|
92
|
+
options: ['npm', 'yarn', 'pnpm'],
|
|
93
|
+
validate: (d) => ['npm', 'pnpm', 'yarn'].includes(d) || 'Invalid package manager',
|
|
94
94
|
},
|
|
95
95
|
repository: {
|
|
96
96
|
message: 'What is the GitHub name of repository (https://github.com/owner/REPO)',
|
|
@@ -196,9 +196,9 @@ class Generate extends generator_1.GeneratorCommand {
|
|
|
196
196
|
},
|
|
197
197
|
repository: `${owner}/${repository}`,
|
|
198
198
|
};
|
|
199
|
-
if (packageManager
|
|
199
|
+
if (packageManager !== 'yarn') {
|
|
200
200
|
const scripts = (updatedPackageJSON.scripts || {});
|
|
201
|
-
updatedPackageJSON.scripts = Object.fromEntries(Object.entries(scripts).map(([k, v]) => [k, v.replace('yarn',
|
|
201
|
+
updatedPackageJSON.scripts = Object.fromEntries(Object.entries(scripts).map(([k, v]) => [k, v.replace('yarn', `${packageManager} run`)]));
|
|
202
202
|
}
|
|
203
203
|
const { default: sortPackageJson } = await import('sort-package-json');
|
|
204
204
|
await (0, promises_1.writeFile)((0, node_path_1.join)(location, 'package.json'), JSON.stringify(sortPackageJson(updatedPackageJSON), null, 2));
|
package/oclif.manifest.json
CHANGED
|
@@ -89,7 +89,8 @@
|
|
|
89
89
|
"multiple": false,
|
|
90
90
|
"options": [
|
|
91
91
|
"npm",
|
|
92
|
-
"yarn"
|
|
92
|
+
"yarn",
|
|
93
|
+
"pnpm"
|
|
93
94
|
],
|
|
94
95
|
"type": "option"
|
|
95
96
|
},
|
|
@@ -157,7 +158,8 @@
|
|
|
157
158
|
"message": "Select a package manager",
|
|
158
159
|
"options": [
|
|
159
160
|
"npm",
|
|
160
|
-
"yarn"
|
|
161
|
+
"yarn",
|
|
162
|
+
"pnpm"
|
|
161
163
|
]
|
|
162
164
|
},
|
|
163
165
|
"repository": {
|
|
@@ -907,5 +909,5 @@
|
|
|
907
909
|
]
|
|
908
910
|
}
|
|
909
911
|
},
|
|
910
|
-
"version": "4.
|
|
912
|
+
"version": "4.7.0"
|
|
911
913
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "oclif",
|
|
3
3
|
"description": "oclif: create your own CLI",
|
|
4
|
-
"version": "4.
|
|
4
|
+
"version": "4.7.0",
|
|
5
5
|
"author": "Salesforce",
|
|
6
6
|
"bin": {
|
|
7
7
|
"oclif": "bin/run.js"
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"@oclif/core": "^3.21.0",
|
|
17
17
|
"@oclif/plugin-help": "^6.0.18",
|
|
18
18
|
"@oclif/plugin-not-found": "^3.0.14",
|
|
19
|
-
"@oclif/plugin-warn-if-update-available": "^3.0.
|
|
19
|
+
"@oclif/plugin-warn-if-update-available": "^3.0.14",
|
|
20
20
|
"async-retry": "^1.3.3",
|
|
21
21
|
"chalk": "^4",
|
|
22
22
|
"change-case": "^4",
|
|
@@ -132,7 +132,7 @@
|
|
|
132
132
|
"posttest": "yarn run lint",
|
|
133
133
|
"prepack": "yarn build && bin/run.js manifest",
|
|
134
134
|
"prepare": "husky",
|
|
135
|
-
"test:integration:cli": "mocha test/integration/cli
|
|
135
|
+
"test:integration:cli": "mocha test/integration/cli.test.ts --timeout 600000",
|
|
136
136
|
"test:integration:deb": "mocha test/integration/deb.test.ts --timeout 900000",
|
|
137
137
|
"test:integration:macos": "mocha test/integration/macos.test.ts --timeout 900000",
|
|
138
138
|
"test:integration:publish": "mocha test/integration/publish.test.ts --timeout 900000",
|