@schematics/angular 18.0.0 → 18.0.2

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.
@@ -201,7 +201,7 @@ function addAppToWorkspaceFile(options, appDir, folderName) {
201
201
  polyfills: ['zone.js'],
202
202
  tsConfig: `${projectRoot}tsconfig.app.json`,
203
203
  inlineStyleLanguage,
204
- assets: [{ 'glob': '**/*', 'input': 'public' }],
204
+ assets: [{ 'glob': '**/*', 'input': `${projectRoot}public` }],
205
205
  styles: [`${sourceRoot}/styles.${options.style}`],
206
206
  scripts: [],
207
207
  },
@@ -241,7 +241,7 @@ function addAppToWorkspaceFile(options, appDir, folderName) {
241
241
  polyfills: ['zone.js', 'zone.js/testing'],
242
242
  tsConfig: `${projectRoot}tsconfig.spec.json`,
243
243
  inlineStyleLanguage,
244
- assets: [{ 'glob': '**/*', 'input': 'public' }],
244
+ assets: [{ 'glob': '**/*', 'input': `${projectRoot}public` }],
245
245
  styles: [`${sourceRoot}/styles.${options.style}`],
246
246
  scripts: [],
247
247
  },
@@ -3,7 +3,7 @@
3
3
  # https://github.com/browserslist/browserslist#queries
4
4
 
5
5
  # For the full list of supported browsers by the Angular framework, please see:
6
- # https://angular.io/guide/browser-support
6
+ # https://angular.dev/reference/versions#browser-support
7
7
 
8
8
  # You can see what browsers were selected by your queries by running:
9
9
  # npx browserslist
@@ -21,4 +21,4 @@ Run `ng test <%= name %>` to execute the unit tests via [Karma](https://karma-ru
21
21
 
22
22
  ## Further help
23
23
 
24
- To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
24
+ To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli) page.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@schematics/angular",
3
- "version": "18.0.0",
3
+ "version": "18.0.2",
4
4
  "description": "Schematics specific to Angular",
5
5
  "homepage": "https://github.com/angular/angular-cli",
6
6
  "keywords": [
@@ -22,8 +22,8 @@
22
22
  },
23
23
  "schematics": "./collection.json",
24
24
  "dependencies": {
25
- "@angular-devkit/core": "18.0.0",
26
- "@angular-devkit/schematics": "18.0.0",
25
+ "@angular-devkit/core": "18.0.2",
26
+ "@angular-devkit/schematics": "18.0.2",
27
27
  "jsonc-parser": "3.2.1"
28
28
  },
29
29
  "repository": {
package/ssr/index.js CHANGED
@@ -253,7 +253,7 @@ function addServerFile(options, isStandalone) {
253
253
  if (!project) {
254
254
  throw new schematics_1.SchematicsException(`Invalid project name (${projectName})`);
255
255
  }
256
- const isUsingApplicationBuilder = project?.targets?.get('build')?.builder === workspace_models_1.Builders.Application;
256
+ const isUsingApplicationBuilder = usingApplicationBuilder(project);
257
257
  const browserDistDirectory = isUsingApplicationBuilder
258
258
  ? (await getApplicationBuilderOutputPaths(host, projectName)).browser
259
259
  : await getLegacyOutputPaths(host, projectName, 'build');
@@ -277,7 +277,7 @@ function default_1(options) {
277
277
  if (!clientProject) {
278
278
  throw (0, project_targets_1.targetBuildNotFoundError)();
279
279
  }
280
- const isUsingApplicationBuilder = clientProject.targets.get('build')?.builder === workspace_models_1.Builders.Application;
280
+ const isUsingApplicationBuilder = usingApplicationBuilder(clientProject);
281
281
  return (0, schematics_1.chain)([
282
282
  (0, schematics_1.schematic)('server', {
283
283
  ...options,
@@ -299,3 +299,8 @@ function default_1(options) {
299
299
  };
300
300
  }
301
301
  exports.default = default_1;
302
+ function usingApplicationBuilder(project) {
303
+ const buildBuilder = project.targets.get('build')?.builder;
304
+ const isUsingApplicationBuilder = buildBuilder === workspace_models_1.Builders.Application || buildBuilder === workspace_models_1.Builders.BuildApplication;
305
+ return isUsingApplicationBuilder;
306
+ }
@@ -15,6 +15,6 @@ exports.latestVersions = {
15
15
  ...dependencies,
16
16
  // As Angular CLI works with same minor versions of Angular Framework, a tilde match for the current
17
17
  Angular: dependencies['@angular/core'],
18
- DevkitBuildAngular: '^18.0.0',
19
- AngularSSR: '^18.0.0',
18
+ DevkitBuildAngular: '^18.0.2',
19
+ AngularSSR: '^18.0.2',
20
20
  };
@@ -30,7 +30,10 @@ async function getMainFilePath(tree, projectName) {
30
30
  throw (0, project_targets_1.targetBuildNotFoundError)();
31
31
  }
32
32
  const options = buildTarget.options;
33
- return buildTarget.builder === workspace_models_1.Builders.Application ? options.browser : options.main;
33
+ return buildTarget.builder === workspace_models_1.Builders.Application ||
34
+ buildTarget.builder === workspace_models_1.Builders.BuildApplication
35
+ ? options.browser
36
+ : options.main;
34
37
  }
35
38
  exports.getMainFilePath = getMainFilePath;
36
39
  /**
@@ -28,7 +28,8 @@ export declare enum Builders {
28
28
  NgPackagr = "@angular-devkit/build-angular:ng-packagr",
29
29
  DevServer = "@angular-devkit/build-angular:dev-server",
30
30
  ExtractI18n = "@angular-devkit/build-angular:extract-i18n",
31
- Protractor = "@angular-devkit/build-angular:protractor"
31
+ Protractor = "@angular-devkit/build-angular:protractor",
32
+ BuildApplication = "@angular/build:application"
32
33
  }
33
34
  export interface FileReplacements {
34
35
  replace: string;
@@ -34,4 +34,5 @@ var Builders;
34
34
  Builders["DevServer"] = "@angular-devkit/build-angular:dev-server";
35
35
  Builders["ExtractI18n"] = "@angular-devkit/build-angular:extract-i18n";
36
36
  Builders["Protractor"] = "@angular-devkit/build-angular:protractor";
37
+ Builders["BuildApplication"] = "@angular/build:application";
37
38
  })(Builders || (exports.Builders = Builders = {}));
@@ -24,4 +24,4 @@ Run `ng e2e` to execute the end-to-end tests via a platform of your choice. To u
24
24
 
25
25
  ## Further help
26
26
 
27
- To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
27
+ To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli) page.