yeoman-environment 4.0.0-alpha.8 → 4.0.0-beta.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/dist/environment-base.js
CHANGED
package/dist/util/namespace.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { parse } from 'node:path';
|
|
2
2
|
import slash from 'slash';
|
|
3
|
-
import { findLast } from 'lodash-es';
|
|
4
|
-
import escapeStringRegexp from 'escape-string-regexp';
|
|
3
|
+
import { findLast, escapeRegExp } from 'lodash-es';
|
|
5
4
|
export const defaultLookups = ['.', 'generators', 'lib/generators', 'dist/generators'];
|
|
6
5
|
/**
|
|
7
6
|
* Given a String `filepath`, tries to figure out the relative namespace.
|
|
@@ -45,7 +44,7 @@ export const asNamespace = (filepath, { lookups = defaultLookups }) => {
|
|
|
45
44
|
// If `ns` contains a lookup dir in its path, remove it.
|
|
46
45
|
for (const lookup of nsLookups) {
|
|
47
46
|
// Only match full directory (begin with leading slash or start of input, end with trailing slash)
|
|
48
|
-
ns = ns.replace(new RegExp(`(?:/|^)${
|
|
47
|
+
ns = ns.replace(new RegExp(`(?:/|^)${escapeRegExp(lookup)}(?=/)`, 'g'), '');
|
|
49
48
|
}
|
|
50
49
|
const folders = ns.split('/');
|
|
51
50
|
const scope = findLast(folders, folder => folder.startsWith('@'));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "yeoman-environment",
|
|
3
|
-
"version": "4.0.0-
|
|
3
|
+
"version": "4.0.0-beta.0",
|
|
4
4
|
"description": "Handles the lifecyle and bootstrapping of generators in a specific environment",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"development",
|
|
@@ -65,21 +65,18 @@
|
|
|
65
65
|
"chalk": "^5.2.0",
|
|
66
66
|
"commander": "^10.0.1",
|
|
67
67
|
"debug": "^4.3.4",
|
|
68
|
-
"escape-string-regexp": "^5.0.0",
|
|
69
68
|
"execa": "^7.1.1",
|
|
70
|
-
"fly-import": "^0.
|
|
69
|
+
"fly-import": "^0.3.0",
|
|
71
70
|
"globby": "^13.1.4",
|
|
72
71
|
"grouped-queue": "^2.0.0",
|
|
73
72
|
"locate-path": "^7.2.0",
|
|
74
73
|
"lodash-es": "^4.17.21",
|
|
75
|
-
"log-symbols": "^5.1.0",
|
|
76
74
|
"mem-fs": "^3.0.0",
|
|
77
75
|
"mem-fs-editor": "^10.0.1",
|
|
78
|
-
"npmlog": "^7.0.1",
|
|
79
76
|
"preferred-pm": "^3.0.3",
|
|
80
77
|
"semver": "^7.5.0",
|
|
81
78
|
"slash": "^5.0.1",
|
|
82
|
-
"untildify": "^
|
|
79
|
+
"untildify": "^5.0.0"
|
|
83
80
|
},
|
|
84
81
|
"devDependencies": {
|
|
85
82
|
"@types/debug": "^4.1.8",
|
|
@@ -102,7 +99,7 @@
|
|
|
102
99
|
"xo": "0.54.2",
|
|
103
100
|
"yeoman-assert": "^3.1.1",
|
|
104
101
|
"yeoman-generator": "^5.9.0",
|
|
105
|
-
"yeoman-test": "^8.0.0-rc.
|
|
102
|
+
"yeoman-test": "^8.0.0-rc.1"
|
|
106
103
|
},
|
|
107
104
|
"peerDependencies": {
|
|
108
105
|
"@yeoman/types": "^1.0.1",
|