@o3r/schematics 10.0.0-alpha.3 → 10.0.0-alpha.6
Sign up to get free protection for your applications and to get access to all the features.
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@o3r/schematics",
|
3
|
-
"version": "10.0.0-alpha.
|
3
|
+
"version": "10.0.0-alpha.6",
|
4
4
|
"description": "Schematics module of the Otter framework",
|
5
5
|
"main": "./src/public_api.js",
|
6
6
|
"typings": "./src/public_api.d.ts",
|
@@ -52,7 +52,7 @@
|
|
52
52
|
"@angular-devkit/build-angular": "~17.0.3",
|
53
53
|
"@angular-devkit/core": "~17.0.3",
|
54
54
|
"@angular-devkit/schematics": "~17.0.3",
|
55
|
-
"@angular-eslint/eslint-plugin": "~17.
|
55
|
+
"@angular-eslint/eslint-plugin": "~17.2.0",
|
56
56
|
"@angular/cli": "~17.0.3",
|
57
57
|
"@angular/common": "~17.0.4",
|
58
58
|
"@angular/compiler": "~17.0.4",
|
@@ -63,17 +63,17 @@
|
|
63
63
|
"@babel/core": "~7.23.0",
|
64
64
|
"@babel/preset-typescript": "~7.23.0",
|
65
65
|
"@compodoc/compodoc": "^1.1.19",
|
66
|
-
"@nx/eslint": "~17.
|
67
|
-
"@nx/eslint-plugin": "~17.
|
68
|
-
"@nx/jest": "~17.
|
69
|
-
"@nx/js": "~17.
|
70
|
-
"@o3r/build-helpers": "^10.0.0-alpha.
|
71
|
-
"@o3r/eslint-plugin": "^10.0.0-alpha.
|
66
|
+
"@nx/eslint": "~17.2.0",
|
67
|
+
"@nx/eslint-plugin": "~17.2.0",
|
68
|
+
"@nx/jest": "~17.2.0",
|
69
|
+
"@nx/js": "~17.2.0",
|
70
|
+
"@o3r/build-helpers": "^10.0.0-alpha.6",
|
71
|
+
"@o3r/eslint-plugin": "^10.0.0-alpha.6",
|
72
72
|
"@schematics/angular": "~17.0.3",
|
73
73
|
"@types/jest": "~29.5.2",
|
74
74
|
"@types/node": "^20.0.0",
|
75
75
|
"@types/semver": "^7.3.13",
|
76
|
-
"@typescript-eslint/eslint-plugin": "6.
|
76
|
+
"@typescript-eslint/eslint-plugin": "^6.19.0",
|
77
77
|
"@typescript-eslint/parser": "^6.11.0",
|
78
78
|
"cpy-cli": "^5.0.0",
|
79
79
|
"eslint": "^8.42.0",
|
@@ -86,7 +86,7 @@
|
|
86
86
|
"jest-junit": "~16.0.0",
|
87
87
|
"jsonc-eslint-parser": "~2.4.0",
|
88
88
|
"jsonschema": "~1.4.1",
|
89
|
-
"nx": "~17.
|
89
|
+
"nx": "~17.2.0",
|
90
90
|
"rxjs": "^7.8.1",
|
91
91
|
"ts-jest": "~29.1.1",
|
92
92
|
"type-fest": "^4.3.1",
|
@@ -3,20 +3,24 @@
|
|
3
3
|
* @param packageJsonPath
|
4
4
|
* @param pattern
|
5
5
|
*/
|
6
|
-
export declare function getPeerDepWithPattern(packageJsonPath: string, pattern?: RegExp): {
|
6
|
+
export declare function getPeerDepWithPattern(packageJsonPath: string, pattern?: RegExp | string[]): {
|
7
7
|
packageName: string | undefined;
|
8
8
|
packageVersion: string | undefined;
|
9
9
|
matchingPackages: string[];
|
10
|
+
matchingPackagesVersions: {
|
11
|
+
[k: string]: string | undefined;
|
12
|
+
};
|
10
13
|
};
|
11
14
|
/**
|
12
15
|
* Get the list of o3r peer deps from a given package.json file
|
13
16
|
* @param packageJsonPath The package json on which we search for o3r peer deps
|
14
17
|
* @param filterBasics If activated it will remove the basic peer deps (o3r/core, o3r/dev-tools, o3r/workspace and o3r/schematics) from the list of results
|
15
18
|
* @param packagePattern Pattern of the package name to look in the packages peer dependencies.
|
19
|
+
* @param versionRangePrefix Prefix to add to the package version to determine Semver Range
|
16
20
|
*/
|
17
|
-
export declare function getO3rPeerDeps(packageJsonPath: string, filterBasics?: boolean, packagePattern?: RegExp): {
|
21
|
+
export declare function getO3rPeerDeps(packageJsonPath: string, filterBasics?: boolean, packagePattern?: RegExp, versionRangePrefix?: string): {
|
18
22
|
packageName: string | undefined;
|
19
|
-
packageVersion: string
|
23
|
+
packageVersion: string;
|
20
24
|
o3rPeerDeps: string[];
|
21
25
|
};
|
22
26
|
/**
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"matching-peers.d.ts","sourceRoot":"","sources":["../../../src/utility/matching-peers.ts"],"names":[],"mappings":"AAGA;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,eAAe,EAAE,MAAM,EAAE,OAAO,
|
1
|
+
{"version":3,"file":"matching-peers.d.ts","sourceRoot":"","sources":["../../../src/utility/matching-peers.ts"],"names":[],"mappings":"AAGA;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,eAAe,EAAE,MAAM,EAAE,OAAO,GAAE,MAAM,GAAG,MAAM,EAA4B;;;;;;;EAelH;AASD;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,eAAe,EAAE,MAAM,EAAE,YAAY,UAAO,EAAE,cAAc,SAAsB,EAAE,kBAAkB,SAAM;;;;EAU1I;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,eAAe,EAAE,MAAM,EAAE,cAAc,SAAsB;;;;EAahG"}
|
@@ -14,9 +14,10 @@ function getPeerDepWithPattern(packageJsonPath, pattern = /^@(otter|o3r|ama-sdk)
|
|
14
14
|
const optionalPackages = Object.entries(packageJsonContent.peerDependenciesMeta || {})
|
15
15
|
.filter(([, dep]) => dep?.optional)
|
16
16
|
.map(([depName]) => depName);
|
17
|
-
const
|
18
|
-
.filter(peerDep => pattern.test(peerDep) && !optionalPackages.includes(peerDep));
|
19
|
-
|
17
|
+
const matchingPackagesVersions = Object.fromEntries(Object.entries(packageJsonContent.peerDependencies || {})
|
18
|
+
.filter(([peerDep]) => (Array.isArray(pattern) ? pattern.includes(peerDep) : pattern.test(peerDep)) && !optionalPackages.includes(peerDep)));
|
19
|
+
const matchingPackages = Object.keys(matchingPackagesVersions);
|
20
|
+
return { packageName, packageVersion, matchingPackages, matchingPackagesVersions };
|
20
21
|
}
|
21
22
|
exports.getPeerDepWithPattern = getPeerDepWithPattern;
|
22
23
|
const basicsPackageName = new Set([
|
@@ -30,12 +31,13 @@ const basicsPackageName = new Set([
|
|
30
31
|
* @param packageJsonPath The package json on which we search for o3r peer deps
|
31
32
|
* @param filterBasics If activated it will remove the basic peer deps (o3r/core, o3r/dev-tools, o3r/workspace and o3r/schematics) from the list of results
|
32
33
|
* @param packagePattern Pattern of the package name to look in the packages peer dependencies.
|
34
|
+
* @param versionRangePrefix Prefix to add to the package version to determine Semver Range
|
33
35
|
*/
|
34
|
-
function getO3rPeerDeps(packageJsonPath, filterBasics = true, packagePattern = /^@(?:o3r|ama-sdk)
|
36
|
+
function getO3rPeerDeps(packageJsonPath, filterBasics = true, packagePattern = /^@(?:o3r|ama-sdk)/, versionRangePrefix = '^') {
|
35
37
|
const depsInfo = getPeerDepWithPattern(packageJsonPath, packagePattern);
|
36
38
|
return {
|
37
39
|
packageName: depsInfo.packageName,
|
38
|
-
packageVersion: depsInfo.packageVersion,
|
40
|
+
packageVersion: versionRangePrefix + depsInfo.packageVersion,
|
39
41
|
o3rPeerDeps: filterBasics ?
|
40
42
|
depsInfo.matchingPackages.filter((peerDep) => !basicsPackageName.has(peerDep))
|
41
43
|
: depsInfo.matchingPackages
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"matching-peers.js","sourceRoot":"","sources":["../../../src/utility/matching-peers.ts"],"names":[],"mappings":";;;AAAA,8BAA8B;AAG9B;;;;GAIG;AACH,SAAgB,qBAAqB,CAAC,eAAuB,EAAE,
|
1
|
+
{"version":3,"file":"matching-peers.js","sourceRoot":"","sources":["../../../src/utility/matching-peers.ts"],"names":[],"mappings":";;;AAAA,8BAA8B;AAG9B;;;;GAIG;AACH,SAAgB,qBAAqB,CAAC,eAAuB,EAAE,UAA6B,uBAAuB;IACjH,MAAM,kBAAkB,GAAgB,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,YAAY,CAAC,eAAe,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC;IA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AE,CAAC;AAE3D,CAAC;AAbD,kDAaC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"template-property.helper.js","sourceRoot":"","sources":["../../../src/utility/template-property.helper.ts"],"names":[],"mappings":";;;AAAA,+CAA6C;AAE7C;;;GAGG;AACH,SAAS,uBAAuB,CAAC,aAAqB;IACpD,OAAO,CAAC,aAAa,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;AAC5C,CAAC;AAED;;;GAGG;AACH,SAAgB,qBAAqB,CAAC,aAAqB;IACzD,MAAM,oBAAoB,GAAG,uBAAuB,CAAC,aAAa,CAAC,CAAC;IACpE,OAAO,oBAAoB,CAAC,oBAAoB,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;AAC/D,CAAC;AAHD,sDAGC;AAED;;;GAGG;AACH,SAAgB,sBAAsB,CAAC,aAAqB;IAC1D,MAAM,kBAAkB,GAAG,qBAAqB,CAAC,aAAa,CAAC,CAAC;IAChE,OAAO,cAAO,CAAC,SAAS,CAAC,kBAAkB,
|
1
|
+
{"version":3,"file":"template-property.helper.js","sourceRoot":"","sources":["../../../src/utility/template-property.helper.ts"],"names":[],"mappings":";;;AAAA,+CAA6C;AAE7C;;;GAGG;AACH,SAAS,uBAAuB,CAAC,aAAqB;IACpD,OAAO,CAAC,aAAa,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;AAC5C,CAAC;AAED;;;GAGG;AACH,SAAgB,qBAAqB,CAAC,aAAqB;IACzD,MAAM,oBAAoB,GAAG,uBAAuB,CAAC,aAAa,CAAC,CAAC;IACpE,OAAO,oBAAoB,CAAC,oBAAoB,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;AAC/D,CAAC;AAHD,sDAGC;AAED;;;GAGG;AACH,SAAgB,sBAAsB,CAAC,aAAqB;IAC1D,MAAM,kBAAkB,GAAG,qBAAqB,CAAC,aAAa,CAAC,CAAC;IAChE,OAAO,cAAO,CAAC,SA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