-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create a new pull request by comparing changes across two branches #926
Commits on Sep 5, 2024
-
perf(@angular/cli): enable Node.js compile code cache when available
The Angular CLI will now enable the Node.js compile cache when available for use. Node.js v22.8 and higher currently provide support for this feature. The compile cache stores the v8 intermediate forms of JavaScript code for the Angular CLI itself. This provides a speed up to initialization on subsequent uses the Angular CLI. The Node.js cache is stored in a temporary directory in a globally accessible location so that all Node.js instances of a compatible version can share the cache. The code cache can be disabled if preferred via `NODE_DISABLE_COMPILE_CACHE=1`. Based on initial profiling, this change provides an ~6% production build time improvement for a newly generated project once the cache is available. ``` Benchmark 1: NODE_DISABLE_COMPILE_CACHE=1 node ./node_modules/.bin/ng build Time (mean ± σ): 2.617 s ± 0.016 s [User: 3.795 s, System: 1.284 s] Range (min … max): 2.597 s … 2.640 s 10 runs Benchmark 2: node ./node_modules/.bin/ng build Time (mean ± σ): 2.475 s ± 0.017 s [User: 3.555 s, System: 1.354 s] Range (min … max): 2.454 s … 2.510 s 10 runs Summary node ./node_modules/.bin/ng build ran 1.06 ± 0.01 times faster than NODE_DISABLE_COMPILE_CACHE=1 node ./node_modules/.bin/ng build ```
Configuration menu - View commit details
-
Copy full SHA for ecc107d - Browse repository at this point
Copy the full SHA ecc107dView commit details
Commits on Sep 6, 2024
-
feat(@angular/ssr): introduce
AngularNodeAppEngine
API for Node.js ……integration Expose a variant of `AngularAppEngine` tailored for Node.js. These additions streamline the process by minimizing boilerplate code and eliminate the need for users to call `createWebRequestFromNodeRequest` before invoking the render method.
Configuration menu - View commit details
-
Copy full SHA for 576ff60 - Browse repository at this point
Copy the full SHA 576ff60View commit details -
feat(@angular/ssr): Add
getHeaders
Method toAngularAppEngine
and…… `AngularNodeAppEngine` for handling pages static headers This commit introduces a new `getHeaders` method to the `AngularAppEngine` and `AngularNodeAppEngine` classes, designed to facilitate the retrieval of HTTP headers based on URL pathnames for statically generated (SSG) pages. ```typescript const angularAppEngine = new AngularNodeAppEngine(); app.use(express.static('dist/browser', { setHeaders: (res, path) => { // Retrieve headers for the current request const headers = angularAppEngine.getHeaders(res.req); // Apply the retrieved headers to the response for (const { key, value } of headers) { res.setHeader(key, value); } } })); ``` In this example, the `getHeaders` method is used within an Express application to dynamically set HTTP headers for static files. This ensures that appropriate headers are applied based on the specific request, enhancing the handling of SSG pages.
Configuration menu - View commit details
-
Copy full SHA for 41fb2ed - Browse repository at this point
Copy the full SHA 41fb2edView commit details -
refactor(@angular/ssr): remove singleton helpers
This commit removes the singleton helpers and instead exposes the classes directly.
Configuration menu - View commit details
-
Copy full SHA for 7d9ce24 - Browse repository at this point
Copy the full SHA 7d9ce24View commit details -
fix(@angular/ssr): resolve circular dependency issue from main.server…
….js reference in manifest The issue was addressed by changing the top-level import to a dynamic import. Closes #28358
Configuration menu - View commit details
-
Copy full SHA for e9c9e49 - Browse repository at this point
Copy the full SHA e9c9e49View commit details -
Configuration menu - View commit details
-
Copy full SHA for 63d4f92 - Browse repository at this point
Copy the full SHA 63d4f92View commit details -
Configuration menu - View commit details
-
Copy full SHA for d87822c - Browse repository at this point
Copy the full SHA d87822cView commit details
Commits on Sep 9, 2024
-
Configuration menu - View commit details
-
Copy full SHA for eb97c43 - Browse repository at this point
Copy the full SHA eb97c43View commit details -
docs: elaborate on debugging jasmine node tests
The existing instructions don't quite cover a full debugging setup and miss some flags that allow debugging without modification of BUILD files.
Configuration menu - View commit details
-
Copy full SHA for f8b2203 - Browse repository at this point
Copy the full SHA f8b2203View commit details -
Configuration menu - View commit details
-
Copy full SHA for 201b60e - Browse repository at this point
Copy the full SHA 201b60eView commit details -
Configuration menu - View commit details
-
Copy full SHA for e4d598f - Browse repository at this point
Copy the full SHA e4d598fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 27c1c77 - Browse repository at this point
Copy the full SHA 27c1c77View commit details
Commits on Sep 10, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 724cd41 - Browse repository at this point
Copy the full SHA 724cd41View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7981dd2 - Browse repository at this point
Copy the full SHA 7981dd2View commit details -
build: update all remaining places to TypeScript 5.6
Updates a few leftover places to the TypeScript 5.6 final version.
Configuration menu - View commit details
-
Copy full SHA for 8f051a4 - Browse repository at this point
Copy the full SHA 8f051a4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 26c6d2d - Browse repository at this point
Copy the full SHA 26c6d2dView commit details -
refactor(@angular/build): add explicit type annotations to avoid infe…
…rred types This refactor resolves an issue where the inferred type of `renderSassStylesheet` required an external reference, which could affect portability. Fixes the following error: ``` packages/angular/build/src/tools/sass/worker.ts:59:31 - error TS2742: The inferred type of 'renderSassStylesheet' cannot be named without a reference to '../../../../../../external/npm/node_modules/source-map-js/source-map'. This is likely not portable. A type annotation is necessary. ``` Explicit type annotation added to `renderSassStylesheet` function to prevent reliance on inferred types. **Note:** Ensure compatibility with Windows Bazel builds.
Configuration menu - View commit details
-
Copy full SHA for 6c6248e - Browse repository at this point
Copy the full SHA 6c6248eView commit details
Commits on Sep 11, 2024
-
refactor: Add
lines-around-comment
ruleI often struggle with spacing around block comments, so I've decided to add the `lines-around-comment` lint rule to help manage this. For more details, see the https://eslint.style/rules/js/lines-around-comment
Configuration menu - View commit details
-
Copy full SHA for 743188b - Browse repository at this point
Copy the full SHA 743188bView commit details -
fix(@angular/build): prevent transformation of Node.js internal depen…
…dencies by Vite This commit excludes Node.js module imports from being processed by Vite when prebundling is enabled. Closes #28390
Configuration menu - View commit details
-
Copy full SHA for 4153a6e - Browse repository at this point
Copy the full SHA 4153a6eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 99ee012 - Browse repository at this point
Copy the full SHA 99ee012View commit details -
Configuration menu - View commit details
-
Copy full SHA for af6e200 - Browse repository at this point
Copy the full SHA af6e200View commit details
Commits on Sep 12, 2024
-
feat(@angular-devkit/architect): merge object options from CLI
We recently introduced the ability to pass object values from the command line (#28362). @clydin noticed that the initial behavior didn't work well for `--define`: It completely replaced all values even if just one of multiple defines is specified. This updates the architect to support merging of object options. If both the base option (e.g. from `angular.json`) and the override (e.g. from a CLI `--flag`) are objects, the objects are merged. See: #28362
Configuration menu - View commit details
-
Copy full SHA for 78f7648 - Browse repository at this point
Copy the full SHA 78f7648View commit details -
Configuration menu - View commit details
-
Copy full SHA for 52f4aa1 - Browse repository at this point
Copy the full SHA 52f4aa1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5bba61d - Browse repository at this point
Copy the full SHA 5bba61dView commit details -
refactor(@angular/build): support dev server direct component style s…
…erving The Vite-based development server now provides support for serving individual component stylesheets both with and without emulated view encapsulation. This capability is not yet used by the Angular runtime code. The ability to use external stylesheets instead of bundling the style content is an enabling capability primarily for automatic component style HMR features. Additionally, it has potential future benefits for development mode deferred style processing which may reduce the initial build time when using the development server. The application build itself also does not yet generate external stylesheets.
Configuration menu - View commit details
-
Copy full SHA for 434979a - Browse repository at this point
Copy the full SHA 434979aView commit details -
refactor(@angular/cli): remove unused imports
Remove unused imports from command-module file.
Configuration menu - View commit details
-
Copy full SHA for 929d483 - Browse repository at this point
Copy the full SHA 929d483View commit details -
refactor(@angular/ssr): use
ReadonlyMap
instead ofReadonly
mappe……d type The `Readonly` mapped type only introduces the `readonly` modifier for each property, but `Map` has mutating methods like `clear`, `delete` and `set` that would still remain usable. This commit switches those usages over to the `ReadonlyMap` type which doesn't have any of the mutating methods.
Configuration menu - View commit details
-
Copy full SHA for 056d17a - Browse repository at this point
Copy the full SHA 056d17aView commit details -
fix(@angular/ssr): resolve
bootstrap is not a function
errorIn cases where the application is not zoneless and async/await is downleveled, an issue occurred where `await` was not being downleveled correctly. This led to the `bootstrap is not a function` error. See: https://github.com/angular/angular/actions/runs/10817795242/job/30014914340?pr=57776
Configuration menu - View commit details
-
Copy full SHA for 85df401 - Browse repository at this point
Copy the full SHA 85df401View commit details -
Configuration menu - View commit details
-
Copy full SHA for 793f6a0 - Browse repository at this point
Copy the full SHA 793f6a0View commit details -
feat(@angular/ssr): add server routing configuration API
This commit introduces a new server routing configuration API, as discussed in RFC angular/angular#56785. The new API provides several enhancements: ```ts const serverRoutes: ServerRoute[] = [ { path: '/error', renderMode: RenderMode.Server, status: 404, headers: { 'Cache-Control': 'no-cache' } } ]; ``` ```ts const serverRoutes: ServerRoute[] = [ { path: '/product/:id', renderMode: RenderMode.Prerender, async getPrerenderPaths() { const dataService = inject(ProductService); const ids = await dataService.getIds(); // Assuming this returns ['1', '2', '3'] return ids.map(id => ({ id })); // Generates paths like: [{ id: '1' }, { id: '2' }, { id: '3' }] } } ]; ``` ```ts const serverRoutes: ServerRoute[] = [ { path: '/product/:id', renderMode: RenderMode.Prerender, fallback: PrerenderFallback.Server, // Can be Server, Client, or None async getPrerenderPaths() { } } ]; ``` ```ts const serverRoutes: ServerRoute[] = [ { path: '/product/:id', renderMode: RenderMode.Server, }, { path: '/error', renderMode: RenderMode.Client, }, { path: '/**', renderMode: RenderMode.Prerender, }, ]; ``` These additions aim to provide greater flexibility and control over server-side rendering configurations and prerendering behaviors.
Configuration menu - View commit details
-
Copy full SHA for d66aaa3 - Browse repository at this point
Copy the full SHA d66aaa3View commit details
Commits on Sep 13, 2024
-
Configuration menu - View commit details
-
Copy full SHA for ac71ce1 - Browse repository at this point
Copy the full SHA ac71ce1View commit details -
Revert "perf(@angular/cli): enable Node.js compile code cache when av…
…ailable" This reverts commit ecc107d.
Configuration menu - View commit details
-
Copy full SHA for de17cbc - Browse repository at this point
Copy the full SHA de17cbcView commit details -
Configuration menu - View commit details
-
Copy full SHA for 62b2c6c - Browse repository at this point
Copy the full SHA 62b2c6cView commit details -
refactor(@angular/build): implement custom middleware for header appe…
…nding Replaced multiple `appendServerConfiguredHeaders` calls with a single custom middleware to append headers to all responses, simplifying the code and ensuring consistency.
Configuration menu - View commit details
-
Copy full SHA for 740c648 - Browse repository at this point
Copy the full SHA 740c648View commit details -
refactor(@angular/build): assign name to custom Vite middleware for b…
…etter debugging Naming the custom middleware improves the ability to identify middleware order during debugging.
Configuration menu - View commit details
-
Copy full SHA for 902dbf3 - Browse repository at this point
Copy the full SHA 902dbf3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 89e6d2c - Browse repository at this point
Copy the full SHA 89e6d2cView commit details
Commits on Sep 16, 2024
-
Configuration menu - View commit details
-
Copy full SHA for c9324e7 - Browse repository at this point
Copy the full SHA c9324e7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 93542bf - Browse repository at this point
Copy the full SHA 93542bfView commit details -
Configuration menu - View commit details
-
Copy full SHA for d60f3fe - Browse repository at this point
Copy the full SHA d60f3feView commit details -
fix(@angular/ssr): correct route extraction and error handling
This commit introduces the following changes: - Disallows paths starting with a slash to match Angular router behavior. - Errors are now stored and displayed at a later stage, improving UX by avoiding unnecessary stack traces that are not useful in this context.
Configuration menu - View commit details
-
Copy full SHA for 2640bf7 - Browse repository at this point
Copy the full SHA 2640bf7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5d6f1db - Browse repository at this point
Copy the full SHA 5d6f1dbView commit details -
Configuration menu - View commit details
-
Copy full SHA for fecb00e - Browse repository at this point
Copy the full SHA fecb00eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 09d2eb9 - Browse repository at this point
Copy the full SHA 09d2eb9View commit details
Commits on Sep 17, 2024
-
feat(@angular/ssr): add
isMainModule
functionAdds a new function `isMainModule` that checks if the current module is the main entry point of the application. This is useful to ensure that server listener handlers are only registered when the module is executed directly and not when it's imported as a dependency such as the dev-server. This prevents potential issues with multiple listeners being registered unintentionally.
Configuration menu - View commit details
-
Copy full SHA for f346ee8 - Browse repository at this point
Copy the full SHA f346ee8View commit details -
refactor(@angular/ssr): add option to exclude fallback SSG routes fro…
…m extraction This option allows validation during the build process to ensure that, when the output mode is set to static, no routes requiring server-side rendering are included.
Configuration menu - View commit details
-
Copy full SHA for ea4b99b - Browse repository at this point
Copy the full SHA ea4b99bView commit details
Commits on Sep 18, 2024
-
perf(@angular/cli): enable Node.js compile code cache when available
The Angular CLI will now enable the Node.js compile cache when available for use. Node.js v22.8 and higher currently provide support for this feature. The compile cache stores the v8 intermediate forms of JavaScript code for the Angular CLI itself. This provides a speed up to initialization on subsequent uses the Angular CLI. The Node.js cache is stored in a temporary directory in a globally accessible location so that all Node.js instances of a compatible version can share the cache. The code cache can be disabled if preferred via `NODE_DISABLE_COMPILE_CACHE=1`. Based on initial profiling, this change provides an ~6% production build time improvement for a newly generated project once the cache is available. ``` Benchmark 1: NODE_DISABLE_COMPILE_CACHE=1 node ./node_modules/.bin/ng build Time (mean ± σ): 2.617 s ± 0.016 s [User: 3.795 s, System: 1.284 s] Range (min … max): 2.597 s … 2.640 s 10 runs Benchmark 2: node ./node_modules/.bin/ng build Time (mean ± σ): 2.475 s ± 0.017 s [User: 3.555 s, System: 1.354 s] Range (min … max): 2.454 s … 2.510 s 10 runs Summary node ./node_modules/.bin/ng build ran 1.06 ± 0.01 times faster than NODE_DISABLE_COMPILE_CACHE=1 node ./node_modules/.bin/ng build ```
Configuration menu - View commit details
-
Copy full SHA for f249e7e - Browse repository at this point
Copy the full SHA f249e7eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 33e6cb0 - Browse repository at this point
Copy the full SHA 33e6cb0View commit details -
fix(@angular/build): support HTTP HEAD requests for virtual output files
When using the development server, HTTP HEAD requests will now correctly respond for the virtual output files generated from the Angular build system. Previously Vite only handled GET requests for the files. While HEAD requests are not common in development workflows, it can be needed in more complex cases with additional servers/proxies/etc. during development.
Configuration menu - View commit details
-
Copy full SHA for f6b7cd9 - Browse repository at this point
Copy the full SHA f6b7cd9View commit details -
refactor(@angular-devkit/core): fix up internal typings
Resolves some type errors that showed up internally.
Configuration menu - View commit details
-
Copy full SHA for a3bbe0e - Browse repository at this point
Copy the full SHA a3bbe0eView commit details -
Configuration menu - View commit details
-
Copy full SHA for bd782db - Browse repository at this point
Copy the full SHA bd782dbView commit details -
Configuration menu - View commit details
-
Copy full SHA for 8c9bf69 - Browse repository at this point
Copy the full SHA 8c9bf69View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3d10fa1 - Browse repository at this point
Copy the full SHA 3d10fa1View commit details -
Configuration menu - View commit details
-
Copy full SHA for ed2aecf - Browse repository at this point
Copy the full SHA ed2aecfView commit details