@angular-devkit/core 14.1.0-next.3 → 14.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.
- package/package.json +2 -2
- package/src/workspace/json/reader.js +10 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular-devkit/core",
|
|
3
|
-
"version": "14.1.0
|
|
3
|
+
"version": "14.1.0",
|
|
4
4
|
"description": "Angular DevKit - Core Utility Library",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"typings": "src/index.d.ts",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"dependencies": {
|
|
16
16
|
"ajv-formats": "2.1.1",
|
|
17
17
|
"ajv": "8.11.0",
|
|
18
|
-
"jsonc-parser": "3.
|
|
18
|
+
"jsonc-parser": "3.1.0",
|
|
19
19
|
"rxjs": "6.6.7",
|
|
20
20
|
"source-map": "0.7.4"
|
|
21
21
|
},
|
|
@@ -39,8 +39,10 @@ async function readJsonWorkspace(path, host) {
|
|
|
39
39
|
// TODO: Diagnostic reporting support
|
|
40
40
|
throw new Error(message);
|
|
41
41
|
},
|
|
42
|
-
warn(
|
|
42
|
+
warn(message, _node) {
|
|
43
43
|
// TODO: Diagnostic reporting support
|
|
44
|
+
// eslint-disable-next-line no-console
|
|
45
|
+
console.warn(message);
|
|
44
46
|
},
|
|
45
47
|
};
|
|
46
48
|
const workspace = parseWorkspace(ast, context);
|
|
@@ -48,7 +50,7 @@ async function readJsonWorkspace(path, host) {
|
|
|
48
50
|
}
|
|
49
51
|
exports.readJsonWorkspace = readJsonWorkspace;
|
|
50
52
|
const specialWorkspaceExtensions = ['cli', 'defaultProject', 'newProjectRoot', 'schematics'];
|
|
51
|
-
const specialProjectExtensions = ['cli', 'schematics', 'projectType'];
|
|
53
|
+
const specialProjectExtensions = ['cli', 'schematics', 'projectType', 'i18n'];
|
|
52
54
|
function parseWorkspace(workspaceNode, context) {
|
|
53
55
|
const jsonMetadata = context.metadata;
|
|
54
56
|
let projects;
|
|
@@ -73,7 +75,7 @@ function parseWorkspace(workspaceNode, context) {
|
|
|
73
75
|
}
|
|
74
76
|
else {
|
|
75
77
|
if (!specialWorkspaceExtensions.includes(name) && !/^[a-z]{1,3}-.*/.test(name)) {
|
|
76
|
-
context.warn(`Project extension with invalid name found.`, name);
|
|
78
|
+
context.warn(`Project extension with invalid name (${name}) found.`, name);
|
|
77
79
|
}
|
|
78
80
|
if (extensions) {
|
|
79
81
|
extensions[name] = value;
|
|
@@ -124,6 +126,10 @@ function parseProject(projectName, projectNode, context) {
|
|
|
124
126
|
properties = Object.create(null);
|
|
125
127
|
}
|
|
126
128
|
const projectNodeValue = (0, jsonc_parser_1.getNodeValue)(projectNode);
|
|
129
|
+
if (!('root' in projectNodeValue)) {
|
|
130
|
+
// TODO(alan-agius4): change this to error in v15.
|
|
131
|
+
context.warn(`Project "${projectName}" is missing a required property "root". This will become an error in the next major version.`, projectNodeValue);
|
|
132
|
+
}
|
|
127
133
|
for (const [name, value] of Object.entries(projectNodeValue)) {
|
|
128
134
|
switch (name) {
|
|
129
135
|
case 'targets':
|
|
@@ -149,7 +155,7 @@ function parseProject(projectName, projectNode, context) {
|
|
|
149
155
|
break;
|
|
150
156
|
default:
|
|
151
157
|
if (!specialProjectExtensions.includes(name) && !/^[a-z]{1,3}-.*/.test(name)) {
|
|
152
|
-
context.warn(`Project extension with invalid name found.`, name);
|
|
158
|
+
context.warn(`Project extension with invalid name (${name}) found.`, name);
|
|
153
159
|
}
|
|
154
160
|
if (extensions) {
|
|
155
161
|
extensions[name] = value;
|