@angular/cli 17.1.0-next.1 → 17.1.0-next.3
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/lib/config/schema.json +51 -4
- package/package.json +12 -12
- package/src/command-builder/architect-base-command-module.js +36 -15
- package/src/command-builder/schematics-command-module.js +1 -0
- package/src/commands/add/cli.d.ts +1 -1
- package/src/commands/add/cli.js +2 -2
- package/src/commands/version/cli.js +4 -6
- package/src/utilities/version.js +1 -1
package/lib/config/schema.json
CHANGED
|
@@ -1874,8 +1874,40 @@
|
|
|
1874
1874
|
"default": []
|
|
1875
1875
|
},
|
|
1876
1876
|
"outputPath": {
|
|
1877
|
-
"
|
|
1878
|
-
"
|
|
1877
|
+
"description": "Specify the output path relative to workspace root.",
|
|
1878
|
+
"oneOf": [
|
|
1879
|
+
{
|
|
1880
|
+
"type": "object",
|
|
1881
|
+
"properties": {
|
|
1882
|
+
"base": {
|
|
1883
|
+
"type": "string",
|
|
1884
|
+
"description": "Specify the output path relative to workspace root."
|
|
1885
|
+
},
|
|
1886
|
+
"browser": {
|
|
1887
|
+
"type": "string",
|
|
1888
|
+
"pattern": "^[-\\w\\.]*$",
|
|
1889
|
+
"default": "browser",
|
|
1890
|
+
"description": "The output directory name of your browser build within the output path base. Defaults to 'browser'."
|
|
1891
|
+
},
|
|
1892
|
+
"server": {
|
|
1893
|
+
"type": "string",
|
|
1894
|
+
"pattern": "^[-\\w\\.]*$",
|
|
1895
|
+
"default": "server",
|
|
1896
|
+
"description": "The output directory name of your server build within the output path base. Defaults to 'server'."
|
|
1897
|
+
},
|
|
1898
|
+
"media": {
|
|
1899
|
+
"type": "string",
|
|
1900
|
+
"pattern": "^[-\\w\\.]+$",
|
|
1901
|
+
"default": "media",
|
|
1902
|
+
"description": "The output directory name of your media files within the output browser directory. Defaults to 'media'."
|
|
1903
|
+
}
|
|
1904
|
+
},
|
|
1905
|
+
"additionalProperties": false
|
|
1906
|
+
},
|
|
1907
|
+
{
|
|
1908
|
+
"type": "string"
|
|
1909
|
+
}
|
|
1910
|
+
]
|
|
1879
1911
|
},
|
|
1880
1912
|
"aot": {
|
|
1881
1913
|
"type": "boolean",
|
|
@@ -2049,6 +2081,11 @@
|
|
|
2049
2081
|
"minLength": 1,
|
|
2050
2082
|
"default": "index.html",
|
|
2051
2083
|
"description": "The output path of the application's generated HTML index file. The full provided path will be used and will be considered relative to the application's configured output path."
|
|
2084
|
+
},
|
|
2085
|
+
"preloadInitial": {
|
|
2086
|
+
"type": "boolean",
|
|
2087
|
+
"default": true,
|
|
2088
|
+
"description": "Generates 'preload', `modulepreload', and 'preconnect' link elements for initial application files and resources."
|
|
2052
2089
|
}
|
|
2053
2090
|
}
|
|
2054
2091
|
},
|
|
@@ -3786,8 +3823,18 @@
|
|
|
3786
3823
|
"description": "Do not use the real path when resolving modules. If unset then will default to `true` if NodeJS option --preserve-symlinks is set."
|
|
3787
3824
|
},
|
|
3788
3825
|
"browsers": {
|
|
3789
|
-
"
|
|
3790
|
-
"
|
|
3826
|
+
"description": "Override which browsers tests are run against. Set to `false` to not use any browser.",
|
|
3827
|
+
"oneOf": [
|
|
3828
|
+
{
|
|
3829
|
+
"type": "string",
|
|
3830
|
+
"description": "A comma seperate list of browsers to run tests against."
|
|
3831
|
+
},
|
|
3832
|
+
{
|
|
3833
|
+
"const": false,
|
|
3834
|
+
"type": "boolean",
|
|
3835
|
+
"description": "Does use run tests against a browser."
|
|
3836
|
+
}
|
|
3837
|
+
]
|
|
3791
3838
|
},
|
|
3792
3839
|
"codeCoverage": {
|
|
3793
3840
|
"type": "boolean",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular/cli",
|
|
3
|
-
"version": "17.1.0-next.
|
|
3
|
+
"version": "17.1.0-next.3",
|
|
4
4
|
"description": "CLI tool for Angular",
|
|
5
5
|
"main": "lib/cli/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -25,10 +25,10 @@
|
|
|
25
25
|
},
|
|
26
26
|
"homepage": "https://github.com/angular/angular-cli",
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@angular-devkit/architect": "0.1701.0-next.
|
|
29
|
-
"@angular-devkit/core": "17.1.0-next.
|
|
30
|
-
"@angular-devkit/schematics": "17.1.0-next.
|
|
31
|
-
"@schematics/angular": "17.1.0-next.
|
|
28
|
+
"@angular-devkit/architect": "0.1701.0-next.3",
|
|
29
|
+
"@angular-devkit/core": "17.1.0-next.3",
|
|
30
|
+
"@angular-devkit/schematics": "17.1.0-next.3",
|
|
31
|
+
"@schematics/angular": "17.1.0-next.3",
|
|
32
32
|
"@yarnpkg/lockfile": "1.1.0",
|
|
33
33
|
"ansi-colors": "4.1.3",
|
|
34
34
|
"ini": "4.1.1",
|
|
@@ -47,13 +47,13 @@
|
|
|
47
47
|
"ng-update": {
|
|
48
48
|
"migrations": "@schematics/angular/migrations/migration-collection.json",
|
|
49
49
|
"packageGroup": {
|
|
50
|
-
"@angular/cli": "17.1.0-next.
|
|
51
|
-
"@angular/ssr": "17.1.0-next.
|
|
52
|
-
"@angular-devkit/architect": "0.1701.0-next.
|
|
53
|
-
"@angular-devkit/build-angular": "17.1.0-next.
|
|
54
|
-
"@angular-devkit/build-webpack": "0.1701.0-next.
|
|
55
|
-
"@angular-devkit/core": "17.1.0-next.
|
|
56
|
-
"@angular-devkit/schematics": "17.1.0-next.
|
|
50
|
+
"@angular/cli": "17.1.0-next.3",
|
|
51
|
+
"@angular/ssr": "17.1.0-next.3",
|
|
52
|
+
"@angular-devkit/architect": "0.1701.0-next.3",
|
|
53
|
+
"@angular-devkit/build-angular": "17.1.0-next.3",
|
|
54
|
+
"@angular-devkit/build-webpack": "0.1701.0-next.3",
|
|
55
|
+
"@angular-devkit/core": "17.1.0-next.3",
|
|
56
|
+
"@angular-devkit/schematics": "17.1.0-next.3"
|
|
57
57
|
}
|
|
58
58
|
},
|
|
59
59
|
"engines": {
|
|
@@ -6,14 +6,36 @@
|
|
|
6
6
|
* Use of this source code is governed by an MIT-style license that can be
|
|
7
7
|
* found in the LICENSE file at https://angular.io/license
|
|
8
8
|
*/
|
|
9
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
12
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
13
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
14
|
+
}
|
|
15
|
+
Object.defineProperty(o, k2, desc);
|
|
16
|
+
}) : (function(o, m, k, k2) {
|
|
17
|
+
if (k2 === undefined) k2 = k;
|
|
18
|
+
o[k2] = m[k];
|
|
19
|
+
}));
|
|
20
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
21
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
22
|
+
}) : function(o, v) {
|
|
23
|
+
o["default"] = v;
|
|
24
|
+
});
|
|
25
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
26
|
+
if (mod && mod.__esModule) return mod;
|
|
27
|
+
var result = {};
|
|
28
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
29
|
+
__setModuleDefault(result, mod);
|
|
30
|
+
return result;
|
|
31
|
+
};
|
|
9
32
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
33
|
exports.ArchitectBaseCommandModule = void 0;
|
|
11
34
|
const architect_1 = require("@angular-devkit/architect");
|
|
12
35
|
const node_1 = require("@angular-devkit/architect/node");
|
|
13
36
|
const core_1 = require("@angular-devkit/core");
|
|
14
|
-
const
|
|
15
|
-
const
|
|
16
|
-
const path_1 = require("path");
|
|
37
|
+
const node_fs_1 = require("node:fs");
|
|
38
|
+
const node_path_1 = require("node:path");
|
|
17
39
|
const analytics_1 = require("../analytics/analytics");
|
|
18
40
|
const analytics_parameters_1 = require("../analytics/analytics-parameters");
|
|
19
41
|
const error_1 = require("../utilities/error");
|
|
@@ -139,14 +161,12 @@ class ArchitectBaseCommandModule extends command_module_1.CommandModule {
|
|
|
139
161
|
if (!basePath) {
|
|
140
162
|
return;
|
|
141
163
|
}
|
|
142
|
-
// Check
|
|
143
|
-
if (
|
|
164
|
+
// Check if yarn PnP is used. https://yarnpkg.com/advanced/pnpapi#processversionspnp
|
|
165
|
+
if (process.versions.pnp) {
|
|
144
166
|
return;
|
|
145
167
|
}
|
|
146
|
-
// Check for yarn PnP
|
|
147
|
-
if ((0,
|
|
148
|
-
(0, fs_1.existsSync)((0, path_1.resolve)(basePath, '.pnp.cjs')) ||
|
|
149
|
-
(0, fs_1.existsSync)((0, path_1.resolve)(basePath, '.pnp.mjs'))) {
|
|
168
|
+
// Check for a `node_modules` directory (npm, yarn non-PnP, etc.)
|
|
169
|
+
if ((0, node_fs_1.existsSync)((0, node_path_1.resolve)(basePath, 'node_modules'))) {
|
|
150
170
|
return;
|
|
151
171
|
}
|
|
152
172
|
this.context.logger.warn(`Node packages may not be installed. Try installing with '${this.context.packageManager.name} install'.`);
|
|
@@ -172,13 +192,14 @@ class ArchitectBaseCommandModule extends command_module_1.CommandModule {
|
|
|
172
192
|
const packageToInstall = await this.getMissingTargetPackageToInstall(choices);
|
|
173
193
|
if (packageToInstall) {
|
|
174
194
|
// Example run: `ng add @angular-eslint/schematics`.
|
|
175
|
-
const
|
|
176
|
-
|
|
177
|
-
|
|
195
|
+
const AddCommandModule = (await Promise.resolve().then(() => __importStar(require('../commands/add/cli')))).default;
|
|
196
|
+
await new AddCommandModule(this.context).run({
|
|
197
|
+
interactive: true,
|
|
198
|
+
force: false,
|
|
199
|
+
dryRun: false,
|
|
200
|
+
defaults: false,
|
|
201
|
+
collection: packageToInstall,
|
|
178
202
|
});
|
|
179
|
-
if (error) {
|
|
180
|
-
throw error;
|
|
181
|
-
}
|
|
182
203
|
}
|
|
183
204
|
}
|
|
184
205
|
else {
|
|
@@ -14,7 +14,7 @@ interface AddCommandArgs extends SchematicsCommandArgs {
|
|
|
14
14
|
registry?: string;
|
|
15
15
|
'skip-confirmation'?: boolean;
|
|
16
16
|
}
|
|
17
|
-
export default class
|
|
17
|
+
export default class AddCommandModule extends SchematicsCommandModule implements CommandModuleImplementation<AddCommandArgs> {
|
|
18
18
|
command: string;
|
|
19
19
|
describe: string;
|
|
20
20
|
longDescriptionPath: string;
|
package/src/commands/add/cli.js
CHANGED
|
@@ -36,7 +36,7 @@ const packageVersionExclusions = {
|
|
|
36
36
|
// @angular/material@7.x versions have unbounded peer dependency ranges (>=7.0.0).
|
|
37
37
|
'@angular/material': '7.x',
|
|
38
38
|
};
|
|
39
|
-
class
|
|
39
|
+
class AddCommandModule extends schematics_command_module_1.SchematicsCommandModule {
|
|
40
40
|
command = 'add <collection>';
|
|
41
41
|
describe = 'Adds support for an external library to your project.';
|
|
42
42
|
longDescriptionPath = (0, path_1.join)(__dirname, 'long-description.md');
|
|
@@ -362,4 +362,4 @@ class AddCommadModule extends schematics_command_module_1.SchematicsCommandModul
|
|
|
362
362
|
return false;
|
|
363
363
|
}
|
|
364
364
|
}
|
|
365
|
-
exports.default =
|
|
365
|
+
exports.default = AddCommandModule;
|
|
@@ -10,8 +10,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
10
10
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
11
11
|
};
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
const
|
|
14
|
-
const
|
|
13
|
+
const node_module_1 = __importDefault(require("node:module"));
|
|
14
|
+
const node_path_1 = require("node:path");
|
|
15
15
|
const command_module_1 = require("../../command-builder/command-module");
|
|
16
16
|
const color_1 = require("../../utilities/color");
|
|
17
17
|
const command_config_1 = require("../command-config");
|
|
@@ -22,9 +22,7 @@ const SUPPORTED_NODE_MAJORS = [18, 20];
|
|
|
22
22
|
const PACKAGE_PATTERNS = [
|
|
23
23
|
/^@angular\/.*/,
|
|
24
24
|
/^@angular-devkit\/.*/,
|
|
25
|
-
/^@bazel\/.*/,
|
|
26
25
|
/^@ngtools\/.*/,
|
|
27
|
-
/^@nguniversal\/.*/,
|
|
28
26
|
/^@schematics\/.*/,
|
|
29
27
|
/^rxjs$/,
|
|
30
28
|
/^typescript$/,
|
|
@@ -42,9 +40,9 @@ class VersionCommandModule extends command_module_1.CommandModule {
|
|
|
42
40
|
}
|
|
43
41
|
async run() {
|
|
44
42
|
const { packageManager, logger, root } = this.context;
|
|
45
|
-
const localRequire =
|
|
43
|
+
const localRequire = node_module_1.default.createRequire((0, node_path_1.resolve)(__filename, '../../../'));
|
|
46
44
|
// Trailing slash is used to allow the path to be treated as a directory
|
|
47
|
-
const workspaceRequire =
|
|
45
|
+
const workspaceRequire = node_module_1.default.createRequire(root + '/');
|
|
48
46
|
const cliPackage = localRequire('./package.json');
|
|
49
47
|
let workspacePackage;
|
|
50
48
|
try {
|
package/src/utilities/version.js
CHANGED
|
@@ -25,5 +25,5 @@ class Version {
|
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
// TODO(bazel): Convert this to use build-time version stamping after flipping the build script to use bazel
|
|
28
|
-
// export const VERSION = new Version('17.1.0-next.
|
|
28
|
+
// export const VERSION = new Version('17.1.0-next.3');
|
|
29
29
|
exports.VERSION = new Version(JSON.parse((0, fs_1.readFileSync)((0, path_1.resolve)(__dirname, '../../package.json'), 'utf-8')).version);
|