yeoman-environment 5.0.0-beta.2 → 5.1.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.
|
@@ -19,13 +19,14 @@ export type EnvironmentLookupOptions = LookupOptions & {
|
|
|
19
19
|
/** Customize the namespace to be registered */
|
|
20
20
|
customizeNamespace?: (ns?: string) => string | undefined;
|
|
21
21
|
};
|
|
22
|
-
export type EnvironmentOptions = BaseEnvironmentOptions & Omit<TerminalAdapterOptions, 'promptModule'> & {
|
|
22
|
+
export type EnvironmentOptions = ConflicterOptions & BaseEnvironmentOptions & Omit<TerminalAdapterOptions, 'promptModule'> & {
|
|
23
23
|
adapter?: InputOutputAdapter;
|
|
24
24
|
logCwd?: string;
|
|
25
25
|
command?: YeomanCommand;
|
|
26
26
|
yeomanRepository?: string;
|
|
27
27
|
arboristRegistry?: string;
|
|
28
28
|
nodePackageManager?: string;
|
|
29
|
+
generatorLookupOptions?: Pick<EnvironmentLookupOptions, 'customizeNamespace' | 'lookups'>;
|
|
29
30
|
};
|
|
30
31
|
/**
|
|
31
32
|
* Copy and remove null and undefined values
|
|
@@ -39,7 +40,8 @@ export default class EnvironmentBase extends EventEmitter implements BaseEnviron
|
|
|
39
40
|
adapter: QueuedAdapter;
|
|
40
41
|
sharedFs: MemFs<MemFsEditorFile>;
|
|
41
42
|
conflicterOptions?: ConflicterOptions;
|
|
42
|
-
|
|
43
|
+
readonly sharedOptions: Record<string, any>;
|
|
44
|
+
readonly options: EnvironmentOptions;
|
|
43
45
|
protected readonly aliases: Array<{
|
|
44
46
|
match: RegExp;
|
|
45
47
|
value: string;
|
|
@@ -49,7 +51,6 @@ export default class EnvironmentBase extends EventEmitter implements BaseEnviron
|
|
|
49
51
|
protected runLoop: GroupedQueue;
|
|
50
52
|
protected composedStore: ComposedStore;
|
|
51
53
|
protected lookups: string[];
|
|
52
|
-
protected sharedOptions: Record<string, any>;
|
|
53
54
|
protected repository: FlyRepository;
|
|
54
55
|
protected experimental: boolean;
|
|
55
56
|
protected _rootGenerator?: BaseGenerator;
|
package/dist/environment-base.js
CHANGED
|
@@ -91,6 +91,7 @@ export default class EnvironmentBase extends EventEmitter {
|
|
|
91
91
|
adapter;
|
|
92
92
|
sharedFs;
|
|
93
93
|
conflicterOptions;
|
|
94
|
+
sharedOptions;
|
|
94
95
|
options;
|
|
95
96
|
aliases = [];
|
|
96
97
|
store;
|
|
@@ -98,7 +99,6 @@ export default class EnvironmentBase extends EventEmitter {
|
|
|
98
99
|
runLoop;
|
|
99
100
|
composedStore;
|
|
100
101
|
lookups;
|
|
101
|
-
sharedOptions;
|
|
102
102
|
repository;
|
|
103
103
|
experimental;
|
|
104
104
|
_rootGenerator;
|
|
@@ -121,7 +121,7 @@ export default class EnvironmentBase extends EventEmitter {
|
|
|
121
121
|
// Node won't complain about event listeners leaks.
|
|
122
122
|
this.runLoop.setMaxListeners(0);
|
|
123
123
|
this.sharedFs.setMaxListeners(0);
|
|
124
|
-
this.lookups = defaultLookups;
|
|
124
|
+
this.lookups = this.options.generatorLookupOptions?.lookups ?? defaultLookups;
|
|
125
125
|
this.sharedOptions = sharedOptions;
|
|
126
126
|
// Create a default sharedData.
|
|
127
127
|
this.sharedOptions.sharedData = this.sharedOptions.sharedData ?? {};
|
|
@@ -416,7 +416,7 @@ export default class EnvironmentBase extends EventEmitter {
|
|
|
416
416
|
* registered as `dummy:yo` generator.
|
|
417
417
|
*/
|
|
418
418
|
async lookup(options) {
|
|
419
|
-
const { registerToScope, customizeNamespace = (ns) => ns, lookups = this.lookups, ...remainingOptions } = options ?? { localOnly: false };
|
|
419
|
+
const { registerToScope, customizeNamespace = this.options.generatorLookupOptions?.customizeNamespace ?? ((ns) => ns), lookups = this.lookups, ...remainingOptions } = options ?? { localOnly: false };
|
|
420
420
|
options = {
|
|
421
421
|
...remainingOptions,
|
|
422
422
|
lookups,
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type EnvironmentOptions } from './environment-base.ts';
|
|
2
2
|
import Environment from './environment-full.ts';
|
|
3
3
|
export { default } from './environment-full.ts';
|
|
4
|
-
export { default as EnvironmentBase } from './environment-base.ts';
|
|
4
|
+
export { default as EnvironmentBase, type EnvironmentOptions } from './environment-base.ts';
|
|
5
5
|
export declare const createEnv: (options?: EnvironmentOptions) => Environment;
|
|
6
6
|
export declare const enforceUpdate: () => void;
|
|
7
7
|
export * from './commands.ts';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "yeoman-environment",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.1.0",
|
|
4
4
|
"description": "Handles the lifecyle and bootstrapping of generators in a specific environment",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"development",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
60
|
"@yeoman/adapter": "^3.1.0",
|
|
61
|
-
"@yeoman/conflicter": "^
|
|
61
|
+
"@yeoman/conflicter": "^4.0.0",
|
|
62
62
|
"@yeoman/namespace": "^1.0.1",
|
|
63
63
|
"@yeoman/transform": "^2.1.0",
|
|
64
64
|
"@yeoman/types": "^1.8.0",
|
|
@@ -68,15 +68,15 @@
|
|
|
68
68
|
"debug": "^4.4.1",
|
|
69
69
|
"execa": "^9.6.0",
|
|
70
70
|
"fly-import": "^1.0.0",
|
|
71
|
-
"globby": "^
|
|
71
|
+
"globby": "^16.0.0",
|
|
72
72
|
"grouped-queue": "^2.1.0",
|
|
73
|
-
"locate-path": "^
|
|
73
|
+
"locate-path": "^8.0.0",
|
|
74
74
|
"lodash-es": "^4.17.21",
|
|
75
75
|
"mem-fs": "^4.1.2",
|
|
76
76
|
"mem-fs-editor": "^11.1.4",
|
|
77
77
|
"semver": "^7.7.2",
|
|
78
78
|
"slash": "^5.1.0",
|
|
79
|
-
"untildify": "^
|
|
79
|
+
"untildify": "^6.0.0",
|
|
80
80
|
"which-package-manager": "^1.0.1"
|
|
81
81
|
},
|
|
82
82
|
"devDependencies": {
|
|
@@ -109,9 +109,13 @@
|
|
|
109
109
|
"yeoman-test": "^11.0.0-0"
|
|
110
110
|
},
|
|
111
111
|
"peerDependencies": {
|
|
112
|
+
"@yeoman/adapter": "^3.0.0",
|
|
112
113
|
"@yeoman/types": "^1.8.0",
|
|
113
114
|
"mem-fs": "^4.1.2"
|
|
114
115
|
},
|
|
116
|
+
"acceptDependencies": {
|
|
117
|
+
"@yeoman/adapter": ">=3.0.0"
|
|
118
|
+
},
|
|
115
119
|
"engines": {
|
|
116
120
|
"node": "^20.17.0 || >=22.9.0"
|
|
117
121
|
},
|