@angular/pwa 19.2.0-next.2 → 19.2.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.
Files changed (2) hide show
  1. package/package.json +4 -4
  2. package/pwa/index.js +12 -10
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular/pwa",
3
- "version": "19.2.0-next.2",
3
+ "version": "19.2.0",
4
4
  "description": "PWA schematics for Angular",
5
5
  "keywords": [
6
6
  "Angular CLI",
@@ -17,12 +17,12 @@
17
17
  "save": false
18
18
  },
19
19
  "dependencies": {
20
- "@angular-devkit/schematics": "19.2.0-next.2",
21
- "@schematics/angular": "19.2.0-next.2",
20
+ "@angular-devkit/schematics": "19.2.0",
21
+ "@schematics/angular": "19.2.0",
22
22
  "parse5-html-rewriting-stream": "7.0.0"
23
23
  },
24
24
  "peerDependencies": {
25
- "@angular/cli": "^19.2.0-next.2"
25
+ "@angular/cli": "^19.2.0"
26
26
  },
27
27
  "peerDependenciesMeta": {
28
28
  "@angular/cli": {
package/pwa/index.js CHANGED
@@ -10,9 +10,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
10
10
  exports.default = default_1;
11
11
  const schematics_1 = require("@angular-devkit/schematics");
12
12
  const utility_1 = require("@schematics/angular/utility");
13
- const path_1 = require("path");
14
- const stream_1 = require("stream");
15
- const promises_1 = require("stream/promises");
13
+ const node_path_1 = require("node:path");
14
+ const node_stream_1 = require("node:stream");
15
+ const promises_1 = require("node:stream/promises");
16
16
  function updateIndexFile(path) {
17
17
  return async (host) => {
18
18
  const originalContent = host.readText(path);
@@ -35,7 +35,7 @@ function updateIndexFile(path) {
35
35
  }
36
36
  rewriter.emitEndTag(endTag);
37
37
  });
38
- return (0, promises_1.pipeline)(stream_1.Readable.from(originalContent), rewriter, async function (source) {
38
+ return (0, promises_1.pipeline)(node_stream_1.Readable.from(originalContent), rewriter, async function (source) {
39
39
  const chunks = [];
40
40
  for await (const chunk of source) {
41
41
  chunks.push(Buffer.from(chunk));
@@ -68,10 +68,12 @@ function default_1(options) {
68
68
  const testTargets = [];
69
69
  for (const target of project.targets.values()) {
70
70
  if (target.builder === '@angular-devkit/build-angular:browser' ||
71
- target.builder === '@angular-devkit/build-angular:application') {
71
+ target.builder === '@angular-devkit/build-angular:application' ||
72
+ target.builder === '@angular/build:application') {
72
73
  buildTargets.push(target);
73
74
  }
74
- else if (target.builder === '@angular-devkit/build-angular:karma') {
75
+ else if (target.builder === '@angular-devkit/build-angular:karma' ||
76
+ target.builder === '@angular/build:karma') {
75
77
  testTargets.push(target);
76
78
  }
77
79
  }
@@ -91,15 +93,15 @@ function default_1(options) {
91
93
  }
92
94
  }
93
95
  // Setup sources for the assets files to add to the project
94
- const sourcePath = project.sourceRoot ?? path_1.posix.join(project.root, 'src');
96
+ const sourcePath = project.sourceRoot ?? node_path_1.posix.join(project.root, 'src');
95
97
  // Setup service worker schematic options
96
98
  const { title, ...swOptions } = options;
97
99
  await (0, utility_1.writeWorkspace)(host, workspace);
98
- let assetsDir = path_1.posix.join(sourcePath, 'assets');
100
+ let assetsDir = node_path_1.posix.join(sourcePath, 'assets');
99
101
  let iconsPath;
100
102
  if (host.exists(assetsDir)) {
101
103
  // Add manifest to asset configuration
102
- const assetEntry = path_1.posix.join(project.sourceRoot ?? path_1.posix.join(project.root, 'src'), 'manifest.webmanifest');
104
+ const assetEntry = node_path_1.posix.join(project.sourceRoot ?? node_path_1.posix.join(project.root, 'src'), 'manifest.webmanifest');
103
105
  for (const target of [...buildTargets, ...testTargets]) {
104
106
  if (target.options) {
105
107
  if (Array.isArray(target.options.assets)) {
@@ -116,7 +118,7 @@ function default_1(options) {
116
118
  iconsPath = 'assets';
117
119
  }
118
120
  else {
119
- assetsDir = path_1.posix.join(project.root, 'public');
121
+ assetsDir = node_path_1.posix.join(project.root, 'public');
120
122
  iconsPath = 'icons';
121
123
  }
122
124
  return (0, schematics_1.chain)([