@angular/build 19.0.0-next.5 → 19.0.0-next.6

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular/build",
3
- "version": "19.0.0-next.5",
3
+ "version": "19.0.0-next.6",
4
4
  "description": "Official build system for Angular",
5
5
  "keywords": [
6
6
  "Angular CLI",
@@ -23,7 +23,7 @@
23
23
  "builders": "builders.json",
24
24
  "dependencies": {
25
25
  "@ampproject/remapping": "2.3.0",
26
- "@angular-devkit/architect": "0.1900.0-next.5",
26
+ "@angular-devkit/architect": "0.1900.0-next.6",
27
27
  "@babel/core": "7.25.2",
28
28
  "@babel/helper-annotate-as-pure": "7.24.7",
29
29
  "@babel/helper-split-export-declaration": "7.24.7",
@@ -54,7 +54,7 @@
54
54
  "@angular/localize": "^19.0.0-next.0",
55
55
  "@angular/platform-server": "^19.0.0-next.0",
56
56
  "@angular/service-worker": "^19.0.0-next.0",
57
- "@angular/ssr": "^19.0.0-next.5",
57
+ "@angular/ssr": "^19.0.0-next.6",
58
58
  "less": "^4.2.0",
59
59
  "postcss": "^8.4.0",
60
60
  "tailwindcss": "^2.0.0 || ^3.0.0",
@@ -40,11 +40,6 @@ class ParallelCompilation extends angular_compilation_1.AngularCompilation {
40
40
  useAtomics: !process.versions.webcontainer,
41
41
  filename: localRequire.resolve('./parallel-worker'),
42
42
  recordTiming: false,
43
- env: {
44
- ...process.env,
45
- // Enable compile code caching if enabled for the main process (only exists on Node.js v22.8+)
46
- 'NODE_COMPILE_CACHE': (0, node_module_1.getCompileCacheDir)?.(),
47
- },
48
43
  });
49
44
  }
50
45
  initialize(tsconfig, hostOptions, compilerOptionsTransformer) {
@@ -232,7 +232,6 @@ function createServerMainCodeBundleOptions(options, target, sourceFileCache) {
232
232
  `export * from '${mainServerEntryPointJsImport}';`,
233
233
  // Add @angular/ssr exports
234
234
  `export {
235
- ɵServerRenderContext,
236
235
  ɵdestroyAngularServerApp,
237
236
  ɵextractRoutesAndCreateRouteTree,
238
237
  ɵgetOrCreateAngularServerApp,
@@ -13,7 +13,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
13
13
  exports.JavaScriptTransformer = void 0;
14
14
  const node_crypto_1 = require("node:crypto");
15
15
  const promises_1 = require("node:fs/promises");
16
- const node_module_1 = require("node:module");
17
16
  const piscina_1 = __importDefault(require("piscina"));
18
17
  /**
19
18
  * A class that performs transformation of JavaScript files and raw data.
@@ -49,11 +48,6 @@ class JavaScriptTransformer {
49
48
  // Shutdown idle threads after 1 second of inactivity
50
49
  idleTimeout: 1000,
51
50
  recordTiming: false,
52
- env: {
53
- ...process.env,
54
- // Enable compile code caching if enabled for the main process (only exists on Node.js v22.8+)
55
- 'NODE_COMPILE_CACHE': (0, node_module_1.getCompileCacheDir)?.(),
56
- },
57
51
  });
58
52
  return this.#workerPool;
59
53
  }
@@ -64,7 +64,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
64
64
  Object.defineProperty(exports, "__esModule", { value: true });
65
65
  exports.SassWorkerImplementation = void 0;
66
66
  const node_assert_1 = __importDefault(require("node:assert"));
67
- const node_module_1 = require("node:module");
68
67
  const node_url_1 = require("node:url");
69
68
  const node_worker_threads_1 = require("node:worker_threads");
70
69
  const piscina_1 = require("piscina");
@@ -101,11 +100,6 @@ class SassWorkerImplementation {
101
100
  // Shutdown idle threads after 1 second of inactivity
102
101
  idleTimeout: 1000,
103
102
  recordTiming: false,
104
- env: {
105
- ...process.env,
106
- // Enable compile code caching if enabled for the main process (only exists on Node.js v22.8+)
107
- 'NODE_COMPILE_CACHE': (0, node_module_1.getCompileCacheDir)?.(),
108
- },
109
103
  });
110
104
  return this.#workerPool;
111
105
  }
package/src/typings.d.ts CHANGED
@@ -17,10 +17,3 @@
17
17
  declare module 'esbuild' {
18
18
  export * from 'esbuild-wasm';
19
19
  }
20
-
21
- /**
22
- * Augment the Node.js module builtin types to support the v22.8+ compile cache functions
23
- */
24
- declare module 'node:module' {
25
- function getCompileCacheDir(): string | undefined;
26
- }
@@ -10,7 +10,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
10
10
  exports.normalizeCacheOptions = normalizeCacheOptions;
11
11
  const node_path_1 = require("node:path");
12
12
  /** Version placeholder is replaced during the build process with actual package version */
13
- const VERSION = '19.0.0-next.5';
13
+ const VERSION = '19.0.0-next.6';
14
14
  function hasCacheMetadata(value) {
15
15
  return (!!value &&
16
16
  typeof value === 'object' &&
@@ -6,13 +6,12 @@
6
6
  * found in the LICENSE file at https://angular.dev/license
7
7
  */
8
8
  import type { ApplicationRef, Type } from '@angular/core';
9
- import type { ɵServerRenderContext, ɵextractRoutesAndCreateRouteTree, ɵgetOrCreateAngularServerApp } from '@angular/ssr';
9
+ import type { ɵextractRoutesAndCreateRouteTree, ɵgetOrCreateAngularServerApp } from '@angular/ssr';
10
10
  /**
11
11
  * Represents the exports available from the main server bundle.
12
12
  */
13
13
  interface MainServerBundleExports {
14
14
  default: (() => Promise<ApplicationRef>) | Type<unknown>;
15
- ɵServerRenderContext: typeof ɵServerRenderContext;
16
15
  ɵextractRoutesAndCreateRouteTree: typeof ɵextractRoutesAndCreateRouteTree;
17
16
  ɵgetOrCreateAngularServerApp: typeof ɵgetOrCreateAngularServerApp;
18
17
  }
@@ -112,12 +112,12 @@ async function renderPages(baseHref, sourcemap, allRoutes, maxThreads, workspace
112
112
  for (const route of allRoutes) {
113
113
  // Remove base href from file output path.
114
114
  const routeWithoutBaseHref = addLeadingSlash(route.slice(baseHrefWithLeadingSlash.length - 1));
115
- const isAppShellRoute = appShellRoute === routeWithoutBaseHref;
116
- const render = renderWorker.run({ url: route, isAppShellRoute });
115
+ const render = renderWorker.run({ url: route });
117
116
  const renderResult = render
118
117
  .then((content) => {
119
118
  if (content !== null) {
120
119
  const outPath = node_path_1.posix.join(removeLeadingSlash(routeWithoutBaseHref), 'index.html');
120
+ const isAppShellRoute = appShellRoute === routeWithoutBaseHref;
121
121
  output[outPath] = { content, appShellRoute: isAppShellRoute };
122
122
  }
123
123
  })
@@ -11,11 +11,10 @@ export interface RenderWorkerData extends ESMInMemoryFileLoaderWorkerData {
11
11
  }
12
12
  export interface RenderOptions {
13
13
  url: string;
14
- isAppShellRoute: boolean;
15
14
  }
16
15
  /**
17
16
  * Renders each route in routes and writes them to <outputPath>/<route>/index.html.
18
17
  */
19
- declare function renderPage({ url, isAppShellRoute }: RenderOptions): Promise<string | null>;
18
+ declare function renderPage({ url }: RenderOptions): Promise<string | null>;
20
19
  declare const _default: typeof renderPage;
21
20
  export default _default;
@@ -12,12 +12,10 @@ const load_esm_from_memory_1 = require("./load-esm-from-memory");
12
12
  /**
13
13
  * Renders each route in routes and writes them to <outputPath>/<route>/index.html.
14
14
  */
15
- async function renderPage({ url, isAppShellRoute }) {
16
- const { ɵgetOrCreateAngularServerApp: getOrCreateAngularServerApp, ɵServerRenderContext: ServerRenderContext, } = await (0, load_esm_from_memory_1.loadEsmModuleFromMemory)('./main.server.mjs');
15
+ async function renderPage({ url }) {
16
+ const { ɵgetOrCreateAngularServerApp: getOrCreateAngularServerApp } = await (0, load_esm_from_memory_1.loadEsmModuleFromMemory)('./main.server.mjs');
17
17
  const angularServerApp = getOrCreateAngularServerApp();
18
- const response = await angularServerApp.render(new Request(new URL(url, 'http://local-angular-prerender'), {
19
- signal: AbortSignal.timeout(30_000),
20
- }), undefined, isAppShellRoute ? ServerRenderContext.AppShell : ServerRenderContext.SSG);
18
+ const response = await angularServerApp.renderStatic(new URL(url, 'http://local-angular-prerender'), AbortSignal.timeout(30_000));
21
19
  return response ? response.text() : null;
22
20
  }
23
21
  function initialize() {
@@ -12,7 +12,9 @@ const load_esm_from_memory_1 = require("./load-esm-from-memory");
12
12
  /** Renders an application based on a provided options. */
13
13
  async function extractRoutes() {
14
14
  const { ɵextractRoutesAndCreateRouteTree: extractRoutesAndCreateRouteTree } = await (0, load_esm_from_memory_1.loadEsmModuleFromMemory)('./main.server.mjs');
15
- const routeTree = await extractRoutesAndCreateRouteTree(new URL('http://local-angular-prerender/'));
15
+ const routeTree = await extractRoutesAndCreateRouteTree(new URL('http://local-angular-prerender/'),
16
+ /** manifest */ undefined,
17
+ /** invokeGetPrerenderParams */ true);
16
18
  return routeTree.toObject();
17
19
  }
18
20
  function initialize() {