yeoman-environment 4.0.0-beta.5 → 4.0.0-beta.6
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/commit.js +1 -9
- package/dist/environment-base.d.ts +2 -3
- package/dist/environment-base.js +1 -4
- package/package.json +7 -4
package/dist/commit.js
CHANGED
|
@@ -3,8 +3,6 @@ import createdLogger from 'debug';
|
|
|
3
3
|
import { create as createMemFsEditor } from 'mem-fs-editor';
|
|
4
4
|
// eslint-disable-next-line n/file-extension-in-import
|
|
5
5
|
import { isFilePending } from 'mem-fs-editor/state';
|
|
6
|
-
// eslint-disable-next-line n/file-extension-in-import
|
|
7
|
-
import { createCommitTransform } from 'mem-fs-editor/transform';
|
|
8
6
|
const debug = createdLogger('yeoman:environment:commit');
|
|
9
7
|
/**
|
|
10
8
|
* Commits the MemFs to the disc.
|
|
@@ -15,11 +13,5 @@ export const commitSharedFsTask = ({ adapter, conflicterOptions, sharedFs, strea
|
|
|
15
13
|
debug('Running commitSharedFsTask');
|
|
16
14
|
const fs = createMemFsEditor(sharedFs);
|
|
17
15
|
stream = stream ?? fs.store.stream({ filter: file => isFilePending(file) });
|
|
18
|
-
return fs.commit([
|
|
19
|
-
createYoResolveTransform(),
|
|
20
|
-
forceYoFiles(),
|
|
21
|
-
createConflicterTransform(adapter, conflicterOptions),
|
|
22
|
-
// Use custom commit transform due to out of order transform.
|
|
23
|
-
createCommitTransform(fs),
|
|
24
|
-
], stream);
|
|
16
|
+
return fs.commit([createYoResolveTransform(), forceYoFiles(), createConflicterTransform(adapter, conflicterOptions)], stream);
|
|
25
17
|
};
|
|
@@ -3,7 +3,7 @@ import EventEmitter from 'node:events';
|
|
|
3
3
|
import { QueuedAdapter, type TerminalAdapterOptions } from '@yeoman/adapter';
|
|
4
4
|
import type { ApplyTransformsOptions, BaseEnvironment, BaseEnvironmentOptions, BaseGenerator, BaseGeneratorConstructor, BaseGeneratorMeta, ComposeOptions, GeneratorMeta, GetGeneratorConstructor, InputOutputAdapter, InstantiateOptions, LookupGeneratorMeta } from '@yeoman/types';
|
|
5
5
|
import { type Store as MemFs } from 'mem-fs';
|
|
6
|
-
import { type
|
|
6
|
+
import { type MemFsEditorFile } from 'mem-fs-editor';
|
|
7
7
|
import { FlyRepository } from 'fly-import';
|
|
8
8
|
import GroupedQueue from 'grouped-queue';
|
|
9
9
|
import { type FilePipelineTransform } from '@yeoman/transform';
|
|
@@ -29,10 +29,10 @@ export type EnvironmentOptions = BaseEnvironmentOptions & Omit<TerminalAdapterOp
|
|
|
29
29
|
export declare function removePropertiesWithNullishValues(object: Record<string, any>): Record<string, any>;
|
|
30
30
|
export default class EnvironmentBase extends EventEmitter implements BaseEnvironment {
|
|
31
31
|
cwd: string;
|
|
32
|
+
logCwd: string;
|
|
32
33
|
adapter: QueuedAdapter;
|
|
33
34
|
sharedFs: MemFs<MemFsEditorFile>;
|
|
34
35
|
conflicterOptions?: ConflicterOptions;
|
|
35
|
-
protected logCwd: string;
|
|
36
36
|
protected readonly options: EnvironmentOptions;
|
|
37
37
|
protected readonly aliases: Array<{
|
|
38
38
|
match: RegExp;
|
|
@@ -42,7 +42,6 @@ export default class EnvironmentBase extends EventEmitter implements BaseEnviron
|
|
|
42
42
|
protected command?: YeomanCommand;
|
|
43
43
|
protected runLoop: GroupedQueue;
|
|
44
44
|
protected composedStore: ComposedStore;
|
|
45
|
-
protected fs: MemFsEditor;
|
|
46
45
|
protected lookups: string[];
|
|
47
46
|
protected sharedOptions: Record<string, any>;
|
|
48
47
|
protected repository: FlyRepository;
|
package/dist/environment-base.js
CHANGED
|
@@ -5,7 +5,6 @@ import process from 'node:process';
|
|
|
5
5
|
import { realpathSync } from 'node:fs';
|
|
6
6
|
import { QueuedAdapter } from '@yeoman/adapter';
|
|
7
7
|
import { create as createMemFs } from 'mem-fs';
|
|
8
|
-
import { create as createMemFsEditor } from 'mem-fs-editor';
|
|
9
8
|
import { FlyRepository } from 'fly-import';
|
|
10
9
|
import createdLogger from 'debug';
|
|
11
10
|
// @ts-expect-error grouped-queue don't have types
|
|
@@ -88,17 +87,16 @@ export function removePropertiesWithNullishValues(object) {
|
|
|
88
87
|
// eslint-disable-next-line unicorn/prefer-event-target
|
|
89
88
|
export default class EnvironmentBase extends EventEmitter {
|
|
90
89
|
cwd;
|
|
90
|
+
logCwd;
|
|
91
91
|
adapter;
|
|
92
92
|
sharedFs;
|
|
93
93
|
conflicterOptions;
|
|
94
|
-
logCwd;
|
|
95
94
|
options;
|
|
96
95
|
aliases = [];
|
|
97
96
|
store;
|
|
98
97
|
command;
|
|
99
98
|
runLoop;
|
|
100
99
|
composedStore;
|
|
101
|
-
fs;
|
|
102
100
|
lookups;
|
|
103
101
|
sharedOptions;
|
|
104
102
|
repository;
|
|
@@ -122,7 +120,6 @@ export default class EnvironmentBase extends EventEmitter {
|
|
|
122
120
|
// Node won't complain about event listeners leaks.
|
|
123
121
|
this.runLoop.setMaxListeners(0);
|
|
124
122
|
this.sharedFs.setMaxListeners(0);
|
|
125
|
-
this.fs = createMemFsEditor(sharedFs);
|
|
126
123
|
this.lookups = defaultLookups;
|
|
127
124
|
this.sharedOptions = sharedOptions;
|
|
128
125
|
// Create a default sharedData.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "yeoman-environment",
|
|
3
|
-
"version": "4.0.0-beta.
|
|
3
|
+
"version": "4.0.0-beta.6",
|
|
4
4
|
"description": "Handles the lifecyle and bootstrapping of generators in a specific environment",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"development",
|
|
@@ -57,8 +57,8 @@
|
|
|
57
57
|
"doc_path": "./yeoman-environment-doc"
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
|
-
"@yeoman/adapter": "^1.
|
|
61
|
-
"@yeoman/conflicter": "^1.0
|
|
60
|
+
"@yeoman/adapter": "^1.4.0",
|
|
61
|
+
"@yeoman/conflicter": "^1.1.0",
|
|
62
62
|
"@yeoman/namespace": "^1.0.0",
|
|
63
63
|
"@yeoman/transform": "^1.2.0",
|
|
64
64
|
"arrify": "^3.0.0",
|
|
@@ -101,9 +101,12 @@
|
|
|
101
101
|
"yeoman-test": "^8.0.0-rc.1"
|
|
102
102
|
},
|
|
103
103
|
"peerDependencies": {
|
|
104
|
-
"@yeoman/types": "^1.0
|
|
104
|
+
"@yeoman/types": "^1.1.0",
|
|
105
105
|
"mem-fs": "^3.0.0"
|
|
106
106
|
},
|
|
107
|
+
"acceptDependencies": {
|
|
108
|
+
"mem-fs": "^4.0.0-beta.1"
|
|
109
|
+
},
|
|
107
110
|
"engines": {
|
|
108
111
|
"node": "^18.17.0 || >=20.5.0"
|
|
109
112
|
}
|