yeoman-generator 7.4.0 → 7.5.1
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/dist/actions/lifecycle.d.ts +1 -1
- package/dist/actions/lifecycle.js +8 -8
- package/dist/actions/user.d.ts +6 -0
- package/dist/actions/user.js +6 -0
- package/package.json +11 -6
- package/readme.md +1 -1
|
@@ -83,7 +83,7 @@ export declare abstract class TasksMixin {
|
|
|
83
83
|
* @param args: Task arguments.
|
|
84
84
|
* @param taskStatus.
|
|
85
85
|
*/
|
|
86
|
-
executeTask(this: BaseGeneratorImpl, task: Task, args?: any[] | ((generator: Generator) => any[]), taskStatus?: TaskStatus | undefined): Promise<void>;
|
|
86
|
+
executeTask(this: BaseGeneratorImpl, task: Task, args?: any[] | ((generator: Generator) => any[]) | undefined, taskStatus?: TaskStatus | undefined): Promise<void>;
|
|
87
87
|
/**
|
|
88
88
|
* Ignore cancellable tasks.
|
|
89
89
|
*/
|
|
@@ -22,15 +22,15 @@ export class TasksMixin {
|
|
|
22
22
|
* Register priorities for this generator
|
|
23
23
|
*/
|
|
24
24
|
registerPriorities(priorities) {
|
|
25
|
-
priorities = priorities.filter(priority => {
|
|
26
|
-
if (
|
|
27
|
-
const queue = this._queues[
|
|
25
|
+
priorities = priorities.filter(({ priorityName, edit, ...priority }) => {
|
|
26
|
+
if (edit) {
|
|
27
|
+
const queue = this._queues[priorityName];
|
|
28
28
|
if (!queue) {
|
|
29
|
-
throw new Error(`Error editing priority ${
|
|
29
|
+
throw new Error(`Error editing priority ${priorityName}, not found`);
|
|
30
30
|
}
|
|
31
31
|
Object.assign(queue, { ...priority, edit: undefined });
|
|
32
32
|
}
|
|
33
|
-
return !
|
|
33
|
+
return !edit;
|
|
34
34
|
});
|
|
35
35
|
const customPriorities = priorities.map(customPriority => ({ ...customPriority }));
|
|
36
36
|
// Sort customPriorities, a referenced custom queue must be added before the one that reference it.
|
|
@@ -241,17 +241,17 @@ export class TasksMixin {
|
|
|
241
241
|
* @param args: Task arguments.
|
|
242
242
|
* @param taskStatus.
|
|
243
243
|
*/
|
|
244
|
-
async executeTask(task, args = task.args
|
|
244
|
+
async executeTask(task, args = task.args, taskStatus = this._taskStatus) {
|
|
245
245
|
const { reject, queueName = 'default', taskName: methodName, method } = task;
|
|
246
246
|
const { _namespace: namespace } = this;
|
|
247
|
-
const priority = Object.entries(this._queues).find(([_, options]) => options.queueName === queueName);
|
|
248
|
-
const priorityName = priority ? priority[0] : undefined;
|
|
249
247
|
debug(`Running ${namespace}#${methodName}`);
|
|
250
248
|
this.emit(`method:${methodName}`);
|
|
251
249
|
const taskCancelled = task.cancellable && taskStatus?.cancelled;
|
|
252
250
|
if (taskCancelled) {
|
|
253
251
|
return;
|
|
254
252
|
}
|
|
253
|
+
const [priorityName, priority] = Object.entries(this._queues).find(([_, queue]) => queue.queueName === queueName) ?? [];
|
|
254
|
+
args ??= priority?.args ?? this.args;
|
|
255
255
|
args = typeof args === 'function' ? args(this) : args;
|
|
256
256
|
this.runningState = { namespace, queueName, methodName };
|
|
257
257
|
try {
|
package/dist/actions/user.d.ts
CHANGED
|
@@ -20,8 +20,14 @@ declare class GitUtil {
|
|
|
20
20
|
export declare abstract class GitMixin {
|
|
21
21
|
_git?: GitUtil;
|
|
22
22
|
get git(): GitUtil;
|
|
23
|
+
/**
|
|
24
|
+
* @deprecated Will be removed in version 8.
|
|
25
|
+
* GitHub utilities.
|
|
26
|
+
*/
|
|
23
27
|
get github(): {
|
|
24
28
|
/**
|
|
29
|
+
* @deprecated Will be removed in version 8. Use 'github-username' package with `await this.git.email()` result instead.
|
|
30
|
+
*
|
|
25
31
|
* Retrieves GitHub's username from the GitHub API
|
|
26
32
|
* @return Resolved with the GitHub username or rejected if unable to
|
|
27
33
|
* get the information
|
package/dist/actions/user.js
CHANGED
|
@@ -31,9 +31,15 @@ export class GitMixin {
|
|
|
31
31
|
}
|
|
32
32
|
return this._git;
|
|
33
33
|
}
|
|
34
|
+
/**
|
|
35
|
+
* @deprecated Will be removed in version 8.
|
|
36
|
+
* GitHub utilities.
|
|
37
|
+
*/
|
|
34
38
|
get github() {
|
|
35
39
|
return {
|
|
36
40
|
/**
|
|
41
|
+
* @deprecated Will be removed in version 8. Use 'github-username' package with `await this.git.email()` result instead.
|
|
42
|
+
*
|
|
37
43
|
* Retrieves GitHub's username from the GitHub API
|
|
38
44
|
* @return Resolved with the GitHub username or rejected if unable to
|
|
39
45
|
* get the information
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "yeoman-generator",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.5.1",
|
|
4
4
|
"description": "Rails-inspired generator system that provides scaffolding for your apps",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"development",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"doc:generate": "jsdoc -c jsdoc.json -d $npm_package_config_doc_path$DOC_FOLDER",
|
|
45
45
|
"doc:prettier": "prettier $npm_package_config_doc_path$DOC_FOLDER --write --ignore-path .prettierignore-doc",
|
|
46
46
|
"prepare": "npm run build",
|
|
47
|
-
"pretest": "eslint . && npm run build",
|
|
47
|
+
"pretest": "eslint . && prettier . --check && npm run build",
|
|
48
48
|
"test": "vitest run --coverage"
|
|
49
49
|
},
|
|
50
50
|
"config": {
|
|
@@ -52,12 +52,11 @@
|
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
54
|
"@types/lodash-es": "^4.17.9",
|
|
55
|
-
"@types/node": ">=18.18.5",
|
|
56
55
|
"@yeoman/namespace": "^1.0.0",
|
|
57
56
|
"chalk": "^5.3.0",
|
|
58
57
|
"debug": "^4.1.1",
|
|
59
58
|
"execa": "^8.0.1",
|
|
60
|
-
"github-username": "^
|
|
59
|
+
"github-username": "^9.0.0",
|
|
61
60
|
"json-schema": "^0.4.0",
|
|
62
61
|
"latest-version": "^9.0.0",
|
|
63
62
|
"lodash-es": "^4.17.21",
|
|
@@ -77,7 +76,7 @@
|
|
|
77
76
|
"@types/semver": "^7.5.3",
|
|
78
77
|
"@types/sinon": "^17.0.1",
|
|
79
78
|
"@types/text-table": "^0.2.3",
|
|
80
|
-
"@vitest/coverage-v8": "^
|
|
79
|
+
"@vitest/coverage-v8": "^3.0.2",
|
|
81
80
|
"@yeoman/adapter": "^2.0.0",
|
|
82
81
|
"@yeoman/eslint": "^0.2.0",
|
|
83
82
|
"@yeoman/transform": "^2.0.0",
|
|
@@ -90,15 +89,21 @@
|
|
|
90
89
|
"sinon": "^19.0.0",
|
|
91
90
|
"type-fest": "^4.26.1",
|
|
92
91
|
"typescript": "^5.2.2",
|
|
93
|
-
"vitest": "^
|
|
92
|
+
"vitest": "^3.0.2",
|
|
94
93
|
"yeoman-assert": "^3.1.1",
|
|
95
94
|
"yeoman-environment": "^4.4.1",
|
|
96
95
|
"yeoman-test": "^10.0.1"
|
|
97
96
|
},
|
|
98
97
|
"peerDependencies": {
|
|
98
|
+
"@types/node": ">=18.18.5",
|
|
99
99
|
"@yeoman/types": "^1.1.1",
|
|
100
100
|
"mem-fs": "^4.0.0"
|
|
101
101
|
},
|
|
102
|
+
"peerDependenciesMeta": {
|
|
103
|
+
"@types/node": {
|
|
104
|
+
"optional": true
|
|
105
|
+
}
|
|
106
|
+
},
|
|
102
107
|
"engines": {
|
|
103
108
|
"node": "^18.17.0 || >=20.5.0"
|
|
104
109
|
},
|
package/readme.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Generator [](http://badge.fury.io/js/yeoman-generator) [](http://badge.fury.io/js/yeoman-generator) [](https://github.com/yeoman/generator/actions/workflows/integration.yml) [](https://coveralls.io/r/yeoman/generator) [](https://gitter.im/yeoman/yeoman)
|
|
2
2
|
|
|
3
3
|
> Rails-inspired generator system that provides scaffolding for your apps
|
|
4
4
|
|